码迷,mamicode.com
首页 >  
搜索关键字:return null    ( 92144个结果
自己写了一个类(serialize 和 unserialize)
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
JavaScript你所不知道的困惑(1)
困惑一:先看一个例子: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
ORACLE uuid自动生成主键
-- 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
python subprocess
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, where 和 order by 组合是索引的选择
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
Linux下MYSQL数据库的基本操作
建立数据库: mysql>create database test; //建立一个名为"test"的数据库建立数据库表: mysql> create table test -> (name char(16) not null, -> passwd...
分类:数据库   时间:2014-05-07 21:22:19    阅读次数:378
Ruby实现冒泡排序
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!