CREATE DATABASE db_test;CREATE TABLE `tb1` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `rank` int(10) unsigned NOT NULL DEFAULT...
分类:
数据库 时间:
2015-04-02 16:21:10
阅读次数:
174
借用多字节字符串函数function my_reverse($str=null){ $encode = mb_detect_encoding($str); for($i = 0 ; $i < mb_strlen($str,$encode) ; $i++) { ...
分类:
Web程序 时间:
2015-04-02 14:52:09
阅读次数:
261
控制可访问性: private一个方法或字段只允许从类的内部访问,private关键字是默认的 public方法或字段既能从类的内部访问也能从外部访问 方法中声明的变量默认是不初始化的,而类中的字段自动初始化为0,null,false使用构造器: 与类同名。能获取参数,但不能返回任何的值(即...
1 '; //123,45739 echo number_format($number,null,null,' ').''; //123 45740 echo number_format($number,2,'.','').''; //123456.7941 ...
分类:
Web程序 时间:
2015-04-02 13:13:35
阅读次数:
136
problem:
Given a list, rotate the list to the right by k places, where k is non-negative.
For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->5->1->2->3->NULL.
Hide Tags
L...
分类:
其他好文 时间:
2015-04-02 10:31:03
阅读次数:
117
先献上源代码
#include
class CNumber
{
public:
CNumber()
{
m_nNumber = 1;
}
int m_nNumber;
};
void main()
{
CNumber *pNumber = NULL;
pNumber = new CNumber;
pNumber->m_nNumber = 3;
printf("%d \r\n...
分类:
其他好文 时间:
2015-04-02 09:14:10
阅读次数:
236
Find the nth to last element of a singly linked list. The minimum number of nodes in list is n.ExampleGiven a List 3->2->1->5->null and n = 2, return....
分类:
其他好文 时间:
2015-04-02 06:34:52
阅读次数:
101
Sqlite3支持的数据类型 :NULL、INTEGER、REAL、TEXT、BLOB但实际上,sqlite3也接受如下的数据类型: smallint 16 位元的整数。 interger32 位元的整数。 decimal(p,s) p 精确值和 s 大小的十进位整数,精确值p是指全部有几个数(.....
分类:
移动开发 时间:
2015-04-02 01:02:04
阅读次数:
365
判断是否为二叉搜索树
定义上下确界
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
*...
分类:
其他好文 时间:
2015-04-01 23:51:43
阅读次数:
130