[ 问题: ]
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
[ 问题: ]
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were
inserted in order. You may assume no duplicates in th...
分类:
其他好文 时间:
2014-07-22 23:01:15
阅读次数:
270
函数闭包
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
Windows开发中,经常会碰到一个常见的字眼HWND,如下
HWND hWnd;
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);HW...
分类:
其他好文 时间:
2014-05-03 00:37:59
阅读次数:
378
JQuery工具方法.
(1)$.isNumeric(obj)
此方法判断传入的对象是否是一个数字或者可以转换为数字.
isNumeric: function(
obj ) {
// parseFloat NaNs numeric-cast false positives (null|true|false|"")
// ...bu...
分类:
Web程序 时间:
2014-05-02 19:17:27
阅读次数:
352
看一小段C语言程序:int main(){ float x = 1.3; x = x -
(int)x; int i = (int)(x*10); return 0;}在你心目中, 变量 I 是怎样的结果?如果你理所当然地认为是3的话,
那么你就错了~~~实际结果应该是2. ...
分类:
编程语言 时间:
2014-05-02 09:23:52
阅读次数:
288
Reverse a linked list from positionmton. Do it
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m=
2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-05-02 09:10:46
阅读次数:
252
函数指针
1. 函数与函数指针类型要匹配;
2. 函数指针用来保存函数首地址,即可以通过该指针访问函数;
3. 函数指针可以指向一类函数,而不是一个函数,即可以重新赋值。
int maxNumber(int a, int b)
{
return a > b? a: b;
}
void fileFunc(){ cout
void editFunc(){ ...
分类:
其他好文 时间:
2014-05-02 04:33:25
阅读次数:
276
在 SQL 中,实现的是三值谓词逻辑。通常一个命题要么为 TRUE,要么就为 FALSE。而在
SQL 中,它用 NULL
符号来表示缺少值。SQL的谓词的计算机结果可以是TRUE、FALSE或UNKNOWN(未知)。如果逻辑表达式只涉及已经存在的值,那么最终的计算机结果要么为TRUE,要么为FAL...
分类:
其他好文 时间:
2014-05-02 01:20:34
阅读次数:
357
Swing 中窗体具有默认的布局管理器,如JFrame 使用是边界布局。虽然布局管理器能够简化程序的开发,但是为了获取最大的灵活性,可以使用绝对布局,即不使用任何布局管理器,是哦那个该布局的步骤如下:
(1) 使用Container.setLayout(null)方式取消布局管理器。
(2)使用Component.setBounds()方法来设置每个控件的大小与位置。
/**
* java...
分类:
编程语言 时间:
2014-05-01 18:46:35
阅读次数:
338