public function connect($h,$u,$p) { $this->conn = mysql_connect($h,$u,$p); if(!$this->conn) { $err = new Exception('连接失败'); ...
分类:
其他好文 时间:
2014-08-23 13:50:40
阅读次数:
214
@interface UINavigationController (CustomTransition)- (void) pushWithCustomAnimation:(UIViewController *) controller;- (void) popWithCustomAnimation;@...
分类:
其他好文 时间:
2014-08-23 13:50:20
阅读次数:
160
对于n个样本,如何均匀随机的取出m个样本?即n个样本中每个样本都能有m/n的概率被取中。1.简单插入取样 这是最基本,最直观的方法。在一个初始为空的集合中插入1~n的随机整数,知道个数为m个为止。但这个方法有个弱点,就是要插入一个数时,判断集合中是否存在该数,如果其存在,则要继续取样直到取到一个不在...
分类:
其他好文 时间:
2014-08-23 12:41:30
阅读次数:
317
Simple select statement examplestatic void selectExample(Args _args){CustTable custTable;int counter;;select * from custTable;while(custTable.AccountN...
分类:
其他好文 时间:
2014-08-23 12:37:30
阅读次数:
320
Javascript去掉字符串前后空格 function String.prototype.trim(){ return this.toString().replace(/^\s+|\s+$/g,""); } ===================================== =======...
分类:
编程语言 时间:
2014-08-23 12:32:40
阅读次数:
188
要理解变量的作用域范围就得先理解作用域链 用var关键字声明一个变量时,就是为该变量所在的对象添加了一个属性。 作用域链:由于js的变量都是对象的属性,而该对象可能又是其它对象的属性,而所有的对象都是window对象的属性,所以这些对象的关系可以看作是一条链 链头就是变量所处的对象,链尾就是wind...
分类:
Web程序 时间:
2014-08-23 11:18:20
阅读次数:
222
一、变量的类型 Javascript和Java、C这些语言不同,它是一种无类型、弱检测的语言。它对变量的定义并不需要声明变量类型,我们只要通过赋值的形式,可以将各种类型的数据赋值给同一个变量。例如: i=100;//Number类型 i="variable";//String类型 i={x:4}.....
分类:
Web程序 时间:
2014-08-23 11:14:00
阅读次数:
255
There are some specialists pointing out the mechanical tools together with the positive aspects of energy-saving and environmental protection is just ...
分类:
移动开发 时间:
2014-08-23 11:12:20
阅读次数:
280
http://acm.hdu.edu.cn/showproblem.php?pid=4975题意:同HDU 4888。给N行M列,每行之和,每列之和,判断矩阵是不是唯一。题解:网络流。源点和每行之和建边,容量为和;汇点和没列之和建边,容量为和;行之和和列之和建边,容量为9(每位只能是0~9)。 .....
分类:
其他好文 时间:
2014-08-23 11:11:00
阅读次数:
250
环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G) 系统版本:Centos-6.5-x86_64 路由器网关:192.168.1.1步骤: 1.查看网络MAC地址 [root@centos ~]# cat /etc/udev/rules.d/70-persi...
分类:
其他好文 时间:
2014-08-23 11:10:40
阅读次数:
360