题目描述:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in th...
分类:
其他好文 时间:
2015-06-23 13:10:08
阅读次数:
319
<script?type="text/javascript">
????Wind.use(‘validate‘,?‘ajaxForm‘,?‘artDialog‘,?function?()?{
????????var?form?=?$(‘form.J_ajaxForms‘);
????????//ie处理placeholder提...
分类:
Web程序 时间:
2015-06-23 12:04:35
阅读次数:
213
#14 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
这个题求多个字符串的公共前缀,除了要考虑串空外,如果存在公共前缀,那么必定也是第一个串的前缀。
所以可以以第一个串为基准,比较其他串的前缀是否与第一个串相同。
c...
分类:
其他好文 时间:
2015-06-23 11:55:01
阅读次数:
129
Contains DuplicateGiven an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at leas...
分类:
其他好文 时间:
2015-06-23 11:44:45
阅读次数:
122
function len(s) { var l = 0; var a = s.split(""); for (var i = 0; i < a.length; i++) { if (a[i].charCodeAt(0) < 299) { l++; } else { l += 2; } } retur...
分类:
其他好文 时间:
2015-06-23 11:36:01
阅读次数:
109
1 //关闭等待窗口 2 function closediv() { 3 //Close Div 4 document.body.removeChild(document.getElementById("bgDiv")); 5 document.getEl...
分类:
Web程序 时间:
2015-06-23 11:24:48
阅读次数:
112
因为每日构建需求, 需要用脚本下载代码, 实现自动化编译, 这个脚本是整个系统的一小块功能
#!/bin/bash
#@author Liuyang
#@date 2015-06-23
function help() {
echo "Usage: $0"
echo " First argument should be the git repository's ad...
分类:
其他好文 时间:
2015-06-23 10:12:58
阅读次数:
130
原文: ThinkPHP分页使用例子(二十一) ThinkPHP分页使用 PHP代码: public function fenye(){ $User = M('Leyangjun'); // 实例化User对象 import('ORG.Util.Page');// 导入分页类 $count = $U...
分类:
Web程序 时间:
2015-06-23 10:07:19
阅读次数:
140
一、apply介绍1、apply是前端javascript方法默认自带的方法,这要的用法是替换掉当前执行的方法的this对象,从而实现继承,或者修改方法内部使用到this对象;这次先说继承:例如:首先,在test方法里边声明两个方法,add,sub:function test(){this.add=...
分类:
移动开发 时间:
2015-06-23 10:05:47
阅读次数:
175
一、如何动态更改屏幕分辨率 有许多小工具可以在不重新启动Windows的条件下,动态更改屏幕分辨率。你是不是也想自己动手做一个呢?请在interface段中加入下面一句 function Resolution(X,Y:word):boolean; 然后在implementation段中写入如下...