码迷,mamicode.com
首页 >  
搜索关键字:case when then else end    ( 68558个结果
【LeetCode】- Length of Last Word(最后一个单词的长度)
[ 问题: ] Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. [...
分类:其他好文   时间:2014-07-22 23:01:35    阅读次数:331
Lua基础(二)——表
表 a = { } b = { x = 1, ["hello, "] = "world!" } a.astring = "ni, hao!" a[1] = 100 a["a table"] = b function foo() end function bar() end a[foo] = bar --分别穷举表a和b for k, v in pairs(a) do print(k, "=>",...
分类:其他好文   时间:2014-07-22 23:00:33    阅读次数:261
Lua进阶(二)——函数环境、包
函数环境 function foo() print(g or "No g defined!") end foo() setfenv(foo, { g = 100, print = print }) --设置foo的环境为表{ g=100, ...} foo() print(g or "No g defined!") --No g defined! --100 --No g defined!...
分类:其他好文   时间:2014-07-22 22:59:54    阅读次数:338
Lua进阶(一)——函数闭包、元表
函数闭包 function createCountdownTimer(second) local ms=second * 1000; local function countDown() ms = ms - 1; return ms; end return countDown; end timer1 = createCountdownTimer(1); for...
分类:其他好文   时间:2014-07-22 22:59:53    阅读次数:307
汇编转移指令的原理
1.操作符offset 操作符offset在汇编语言中是由编译器处理的符号,他的功能是取得标号的偏移地址 比如下面程序: assume cs:codesg codesg segment start:mov ax,offset start 相当于mov ax,0     s:mov ax,offset s 相当于mov ax,3 codesg ends end start 在上...
分类:其他好文   时间:2014-07-22 22:59:34    阅读次数:506
[ACM] poj 2823 Sliding Window(单调队列)
Sliding Window Time Limit: 12000MS   Memory Limit: 65536K Total Submissions: 36212   Accepted: 10723 Case Time Limit: 5000MS Description An array of size n ≤ 106 is gi...
分类:Windows程序   时间:2014-05-02 22:56:12    阅读次数:570
Oracle ——存储过程——分页
输入:表名、每页显示的记录数、当前页输出:总记录数、总页数、结果集--首先,创建一个包,定义游标类型CREATE OR REPLACE PACKAGE fenye_package ISTYPE fenye_cursor IS REF CURSOR;END fenye_package; --输入:表名...
分类:数据库   时间:2014-05-02 22:02:04    阅读次数:411
字符串或者数字数组全排列
//字符串全排列package com.demo.acm;public class AllSortChar { public static void allSort(char[] buf,int start,int end){ if(start==end){ ...
分类:其他好文   时间:2014-05-02 19:43:21    阅读次数:256
CASE 表达式
CASE 表达式是一个标量表达式,它基于条件逻辑来返回一个值。注意,CASE 是一个表达式,而不是一条语句;也就是说,不能用它来控制活动的流程,也不能根据条件逻辑来做某些处理。相反,它只是根据条件逻辑来返回某个值。因为CASE是一个标量表达式,所以它可以支持任何标量表达式(如SELECT、WHERE...
分类:其他好文   时间:2014-05-02 01:46:34    阅读次数:306
umlの用例图
我的总结是在看完uml学习之后又参考了同学借的《uml和ooad快速入门》的思路,利用齿轮带动的原理进行。废话不多说了,首先分析一下类图和用例图的联系与区别。 类图 用例图 类class 用例use case 、参与者actor 关联association 包含include、扩展extend 静态结构 动态功能 系统内观 系统外观...
分类:其他好文   时间:2014-05-01 18:37:36    阅读次数:407
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!