Given an unsorted array of integers, find the
length of the longest consecutive elements sequence.For example,Given[100, 4,
200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-05-10 20:06:26
阅读次数:
404
Say you have an array for which theithelement
is the price of a given stock on dayi.Design an algorithm to find the maximum
profit. You may complete a...
分类:
其他好文 时间:
2014-05-06 00:51:29
阅读次数:
353
命令行如下find . -type f -size
+1000000kLinux系统下查找大文件或目录的技巧当硬盘空间不够时,我们就很关心哪些目录或文件比较大,看看能否干掉一些了,怎么才能知道呢?
#已易读的格式显示指定目录或文件的大小,-s选项指定对于目录不详细显示每个子目录或文件的大小 du.....
分类:
系统相关 时间:
2014-05-06 00:39:57
阅读次数:
504
Given an unsorted array of integers, find the
length of the longest consecutive elements sequence.For example,Given [100, 4,
200, 1, 3, 2],The longest...
分类:
其他好文 时间:
2014-05-05 23:01:41
阅读次数:
374
关于flex中的Button事件中的e.target。
今天想在事件中调用模块中的对象通过e.target获取单击的这个Button对象,但是可能是使用var btn:Button = e.target as
Button居然会使得btn为空,这就让我很奇怪了。最后终于发现了,原来是因为主程序...
分类:
其他好文 时间:
2014-05-05 22:08:40
阅读次数:
341
Handler主要接受子线程发送的数据, 并用此数据配合主线程更新UI..
当应用程序启动时,Android首先会开启一个主线程 (也就是UI线程) , 主线程为管理界面中的UI控件,进行事件分发。比如说, 你要是点击一个 Button ,Android会分发事件到Button上,来响应你的操作。 如果此时需要一个耗时的操作,例如: 联网读取数据或者读取本地较大的一个文件的时候,你不...
分类:
移动开发 时间:
2014-05-02 23:20:06
阅读次数:
512
1. 自定义验证--成功提示
1) 添加选项
errorClass: "unchecked",
validClass: "checked",
errorElement: "span",
errorPlacement: function (error, element) {
if (element.parent().find("span[for=""" + element.attr("id...
分类:
Web程序 时间:
2014-05-02 18:38:21
阅读次数:
467
Where's Waldorf?
Given a m by n grid
of letters, ( ),
and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line o...
分类:
其他好文 时间:
2014-05-02 10:59:15
阅读次数:
514
Android用户界面设计:基本按钮
本文向你展示了在你的Android应用程序中创建一个简单的Button或ImageButton控件的步骤。首先,你会学到如何向你的布局文件中添加按钮控件。然后你会学习如何用两种方法处理用户对按钮的点击。最后,我们讨论Android中按钮控件一些其它的可用特性。
本文向你展示了在你的Android应用程...
分类:
移动开发 时间:
2014-05-02 04:57:22
阅读次数:
453
join函数利用字符将数组中的元素分割开.[root@localhost~]#find`perl-e‘@array=join("","@INC");print"@array";‘`-name*.pm|wc-l547这个例子是利用空格分开了要查找的路径,然后find可以查找所有的路径下匹配*.pm的文件,我一共查到了547个模块.
分类:
系统相关 时间:
2014-05-02 04:13:56
阅读次数:
311