/*
函数:可以有返回值得命名的PL/SQL子程序,必须有返回值
关键字:function return
*/...
分类:
数据库 时间:
2014-05-15 14:49:18
阅读次数:
359
作者:iamlaosong
一个简单的函数,从包含有数字信息的字符串中取出这个数据,利用VAL函数将字符串转换为数值,该函数或略数字字符串后面的字母和汉字信息,所以,只要把数字前面的字母和汉字信息去掉就行了。
'函数,从字符串“ABC123456.78DEF”中取出数据
Function mydata(mystring As String) As Double
Dim...
分类:
其他好文 时间:
2014-05-15 11:16:23
阅读次数:
448
test
// alert(jQuery());
function print(string){
document.write(string+"");
};
document.write("********无返回值的情况***************");
(function(){
var jq = (function(){
var jq = fun...
分类:
编程语言 时间:
2014-05-15 11:14:55
阅读次数:
373
1. synchronized
If two threads are using the same function( here we use output to print out string) of another instance, if we want to make sure that these two threads are not disturbing each other.
...
分类:
其他好文 时间:
2014-05-15 11:14:14
阅读次数:
389
你可能会发现别人写的代码中有这么一句:var that = this;,这代表什么意思呢?
在javascript中,this代表的是当前对象。
var that=this就是将当前的this对象复制一份到that变量中。这样做有什么意义呢?
$('#zhetenga').click(function(){
//this是被点击的#zhetenga
...
分类:
编程语言 时间:
2014-05-15 07:19:29
阅读次数:
368
window.document.onkeydown = disableRefresh;
function disableRefresh(evt){
evt = (evt) ? evt : window.event
if (evt.keyCode) {
if(evt.keyCode == 116){
//do something
}
}
}
keycode 8...
分类:
Web程序 时间:
2014-05-15 06:08:18
阅读次数:
315
下面是标准库STL中allocator的实现
template
class allocator
: public _Allocator_base
{ // generic allocator for objects of class _Ty
public:
typedef allocator other;
typedef _Allocator_base _Mybase;
t...
分类:
其他好文 时间:
2014-05-15 05:05:57
阅读次数:
385
LeetCode-001 Two Sum
Given 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 numbers such that they add up to the target, where index1 must be less than index2...
分类:
其他好文 时间:
2014-05-15 04:34:50
阅读次数:
293
Call back function easily implement
#include
void HelloWorld(int nIndex)
{
printf("%d person say Hello World\n",nIndex);
}
void MyName(int len)
{
printf...
分类:
其他好文 时间:
2014-05-15 04:21:05
阅读次数:
270
在前几篇文章中我介绍过js的闭包,这一篇主要简单的介绍一下js中闭包的范式。
那么何谓闭包的范式呢?
首先回顾一下闭包的概念,闭包是外部函数与函数内部之间通信的桥梁,通过对函数的返回,使得外部的函数可以访问函数内部的
一些数据。也就是说闭包可以使得函数内部的数据私有化或者说是公有化。
范式实际上就是js中的匿名函数,看起来像这样,下面就是个匿名函数,也就是闭包
(function(){...
分类:
Web程序 时间:
2014-05-14 14:41:17
阅读次数:
360