name = $in_name; $this->age = $in_age;
$this->owner = $in_owner; } function getage() { return ($this->age * 365);
} f...
分类:
其他好文 时间:
2014-05-08 12:36:51
阅读次数:
336
string sKey = username.Text.ToString().Trim(); //
得到Cache中的给定Key的值 string sUser = Convert.ToString(Cache[sKey]); // 检查是否存在 if
(sUser == null || sUser....
分类:
其他好文 时间:
2014-05-08 12:18:20
阅读次数:
258
困惑一:先看一个例子:function test(){
message = "hi";
}
test();
alert(message);会输出字符串“hi"在函数内部使用var定义的变量是局部变量,省略var操作符的变量是全局变量。困惑二:alert(undefined == null)结果是”true"我们知道在js中分为基本类型和引用类型,基本类型包括number、string、boole...
分类:
编程语言 时间:
2014-05-07 23:20:30
阅读次数:
361
-- Create table
create table TECHNOLOGYCOMPANY
(
ID VARCHAR2(32) default SYS_GUID() not null,
FLOWID VARCHAR2(50),
CONPANYID NUMBER,
ISCOMMUNICATION VARCHAR2(10)
)
...
分类:
数据库 时间:
2014-05-07 23:18:29
阅读次数:
455
defgetResult(cmd,timeout=2):#命令超时时间
deadline=time.time()+timeout
r=subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE)
whiletime.time()<deadlineandr.poll()isNone:
time.sleep(0.1)
ifr.poll()isNone:#检查子进程
r.kill()
r.wait()
return‘‘
r.wait()
..
分类:
编程语言 时间:
2014-05-07 22:30:17
阅读次数:
504
很早写的,最近别人问过一次,贴出来吧。#!/bin/bash
#
source/etc/profile&>/dev/null
basedir=$(cd`dirname$0`;pwd)
nowmonth=`date+%m`
nowday=`date+%d`
email="$basedir/email/sendemail.sh"
functionGaiMiMa(){
user="$1"
passwd=$(/usr/bin/mkpasswd-l20-d5-c2-C..
分类:
其他好文 时间:
2014-05-07 22:26:08
阅读次数:
951
static BOOL flag=NO;
dispatch_queue_t myQueue=dispatch_queue_create("identifier", NULL);
dispatch_async(myQueue, ^{
for (int i=0; i
NSLog(@"...
分类:
编程语言 时间:
2014-05-07 21:37:21
阅读次数:
305
Explain的type显示的是访问类型,是较为重要的一个指标,结果值从好到坏依次是:system
> const > eq_ref > ref > fulltext > ref_or_null > index_merge
> unique_subquery > index_subquery > r...
分类:
其他好文 时间:
2014-05-07 21:26:56
阅读次数:
282
建立数据库: mysql>create database test;
//建立一个名为"test"的数据库建立数据库表: mysql> create table test -> (name char(16) not
null, -> passwd...
分类:
数据库 时间:
2014-05-07 21:22:19
阅读次数:
378
1 def bubble_sort(array) 2 return array if
array.size = array[j+1] 7 end 8 end 9 10 return array11 end12 13 a =
[12,42,1,25,32,63...
分类:
其他好文 时间:
2014-05-07 20:33:20
阅读次数:
260