以mysql为例:新建两张表table1和table2CREATE TABLE `table1` ( `id` int(11) NOT NULL auto_increment, `name` varchar(20) default NULL, PRIMARY KEY (`id`) ) ...
分类:
数据库 时间:
2014-06-27 20:25:32
阅读次数:
146
语言:C++描述:使用单链表实现,HeadNode是key=-1,value=-1,next=NULL的结点。距离HeadNode近的结点是使用频度最小的Node。 1 struct Node { 2 int key; 3 int value; 4 Node* next; 5...
分类:
其他好文 时间:
2014-06-27 18:48:42
阅读次数:
209
private function decode(data:ByteArray):ByteArray{ var dest:ByteArray = new ByteArray(); var index:int; var key:String = "I'm a big big girl ...
分类:
其他好文 时间:
2014-06-27 17:50:20
阅读次数:
185
在Android当中,SharedPreferences是一种轻量级数据存储,以键值对形式操作;SharedPreferences的使用非常简单,能够轻松的存放数据和读取数据。SharedPreferences只能保存基本数据类型。 使用SharedPreferences保存key-value...
分类:
移动开发 时间:
2014-06-27 17:20:38
阅读次数:
273
以下为php代码PHP加解密函数: function encrypt($string) { //加密用的密钥文件 $key = "xxxxxxxx"; //加密方法 $cipher_alg = MCRYPT_TRIP...
分类:
Web程序 时间:
2014-06-27 15:56:23
阅读次数:
228
Bundle类是一个key-value对,“A mapping from String values to various Parcelable types.”类继承关系:java.lang.Object android.os.BundleBundle类是一个final类:public final....
分类:
移动开发 时间:
2014-06-27 15:16:23
阅读次数:
271
#encoding=utf-8 print '中国' #字典的一键多值 print'方案一 list作为dict的值 值允许重复' d1={} key=1 value=2 d1.setdefault(key,[]).append(value) value=2 d...
分类:
编程语言 时间:
2014-06-27 13:00:23
阅读次数:
212
package foo;import java.util.Arrays;public class Main { /** * 二分查找 * @param key 搜索的目标 * */ private static int binarySearch(int[]...
分类:
其他好文 时间:
2014-06-27 11:07:49
阅读次数:
182
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The left subtree of a node contains only nodes with keys less than the node's key....
分类:
其他好文 时间:
2014-06-27 09:15:12
阅读次数:
196
关联容器操作
关联容器中还定义了三个类型,如下:
set::value_type v1; //这个v1是string类型
set::key_type v2; //这个v2是string类型
map::value_type v3; //v3是pair类型pair
map::key_type v4; //v4是stri...
分类:
编程语言 时间:
2014-06-27 08:19:46
阅读次数:
284