//下面是关于字典的
//字典的格式[key:value]
//字典可以存放基本类型和对象类型的
//声明一个字典
var dictionary1=["key1":"鸭鸭","key2":"肉包"]
var keyValueCount=dictionary1.count//获取这个字典里面键值对的个数
dictionary1["key1"]="鸡鸡"//改变对应健的值
//updat...
分类:
其他好文 时间:
2014-06-09 23:44:46
阅读次数:
310
题目
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
G...
分类:
其他好文 时间:
2014-06-08 17:29:07
阅读次数:
315
题目
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 ...
分类:
其他好文 时间:
2014-06-08 17:06:58
阅读次数:
235
上一篇讲了MongoDB的安装和管理,其中涉及到了一些概念,数据结构还有一些API的调用,不知道的没关系,其实很简单,这篇会简单介绍一下。
1.文档
文档是MongoDB的核心概念,多个键值对有序的放在一起就是一个文档,文档是MongoDB存储数据最基本的数据结构。对MongoDB都是以文档的形式来操作的,使用了一种类似JSON的二进制BSON数据格式,对API的调用都是传的文...
分类:
数据库 时间:
2014-06-08 16:55:23
阅读次数:
273
1,如何理解HTTP/Soap协议
SOAP (Simple Object Access Protocol):简单对象访问协议。 主要用于 Web Service, Web Service协议主要包括两个方面:传输协议和数据表示,关于传输协议可以是 HTTP 或其他,数据表示也可以是 Key -Value (键值对)、XML或其他,只不过现在通用的是http+soap
一言以蔽之, SOAP...
分类:
其他好文 时间:
2014-06-08 16:45:57
阅读次数:
445
题目
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
...
分类:
其他好文 时间:
2014-06-08 15:15:26
阅读次数:
223
Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载。它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态、数据库驱动网站的速度。Memcached基于一个存储键/值对的hashmap。其守护进程(daemon
)是用C写的,但是客户端可以用任何语言来编写,并通过memcached协议与守护进程通信。
简介
memcached是一套分布式...
分类:
其他好文 时间:
2014-06-08 10:26:57
阅读次数:
226
题目
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20...
分类:
其他好文 时间:
2014-06-08 09:23:34
阅读次数:
230
(1)机器免登录ssh-keygen -t rsacd ~/.ssh/cat
id_rsa.pub >> authorized_keyschmod 600
authorized_keys[tip].ssh目录的权限必须是700[tip].ssh/authorized_keys文件权限必须是600(2...
分类:
其他好文 时间:
2014-06-07 23:11:37
阅读次数:
382
在iOS中可变字典增加一个键值对的方法有setObject: forKey:
和setValue : forKey:
.为了方便我们把这两个方法简称为方法A和方法B。B这个方法中其中的value值是不能为nil,否则程序会出项崩溃。而A方法中的这个value可以为nil,但是当这个value位nil...
分类:
其他好文 时间:
2014-06-07 21:24:08
阅读次数:
241