记住密码 登录 重置 $(document).ready(function(){ $(document).keydown(f...
分类:
其他好文 时间:
2015-06-09 23:35:16
阅读次数:
476
String.prototype.Trim = function(){ return this.replace(/^\s+/g,"").replace(/\s+$/g,""); } function JSCookie(){ this.GetCookie = function(key){ va...
分类:
Web程序 时间:
2015-06-09 23:26:50
阅读次数:
120
ECMAScript中的构造函数可用来创建特定类型的对象。像Object和Array这样的原生构造函数,在运行时会自动出现在执行环境中。此外,也可以创建自定义的构造函数,从而定义自定义对此昂类型的属性和方法。例如: function Person(name,age,job){ this....
分类:
其他好文 时间:
2015-06-09 23:26:07
阅读次数:
86
具体代码如下:CREATE FUNCTION [dbo].[fn_NumberToChinese] (@number INT)RETURNS VARCHAR(20)AS BEGIN DECLARE @res VARCHAR(20); DECLARE @str VAR...
分类:
数据库 时间:
2015-06-09 23:18:44
阅读次数:
175
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 the arr...
分类:
编程语言 时间:
2015-06-09 23:09:15
阅读次数:
141
多线程中,在互斥量和 读写锁的 属性中,都有一个叫 进程共享属性 。对于互斥量,查询和设置这个属性的方法为:
pthread_mutexattr_getpshared
pthread_mutexattr_setpshared我一开始不理解什么是 进程共享属性。 看了man中的说明如下The pthread_mutexattr_getpshared() function shall obtai...
分类:
编程语言 时间:
2015-06-09 22:04:12
阅读次数:
175
作为值的函数 因为ECMAScript中的函数名本身就是变量,所以函数也可以作为值来使用。也就是说,不仅可以像参数一样把一个函数传递给另一个函数,而且可以将一个函数作为另一个函数的结果返回。来看一看下面的函数。function callSomeFunction(someFunction,someA....
分类:
其他好文 时间:
2015-06-09 21:30:02
阅读次数:
138
Give an array of integers,find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two num...
分类:
其他好文 时间:
2015-06-09 21:25:47
阅读次数:
127
本篇博客接上篇是关于OpenLayers的地图标注及弹出窗(marker+popup),先来看下效果图:
下面给出代码,都写了注释,不做过多解释了:
///添加标记
function addMarke(x, y, attribute)
{
//设置marker样式
var style_mark = OpenLayers.Util.extend({}, OpenLaye...
分类:
Web程序 时间:
2015-06-09 20:06:04
阅读次数:
8208