这篇对应的是习题39 字典, 可爱的字典
#encoding:utf-8
#列表与字典的区别
#列表
thing = ['name',1,'age','AD','sex']
print thing[1]
#print thing['name'] #会报错,列表只能通过整数去访问:TypeError: list indices must be integers, not str
stuff...
分类:
编程语言 时间:
2014-05-07 06:00:20
阅读次数:
365
SQL SERVER命令总结
查询语句:
SELECT [ALL/DISTINCT][TOP]
[as 别名][, as 别名]…
FROM [as 别名]…
[WHERE 条件表达式…]
[GROUP BY [HAVING]]
[ORDER BY[ASC/DESC]]
应该注意:SELECT语句的顺序:
SELECT-->FROM-->WHERE-->GROUP B...
分类:
数据库 时间:
2014-05-07 04:32:52
阅读次数:
561
【题目】
Chapter 1 | Arrays and Strings
原文:
1.1 Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?
译文:
实现一个算法来判断一个字符串中的字符...
分类:
其他好文 时间:
2014-05-07 04:27:41
阅读次数:
312
CareerCup
目录
Chapter 1 | Arrays and Strings
1.1 Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?
1.2 Write co...
分类:
其他好文 时间:
2014-05-07 04:25:44
阅读次数:
320
【Question】
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the p...
分类:
其他好文 时间:
2014-05-07 04:17:18
阅读次数:
259
我喜欢用自己的语言通过联系现实生活中的一些现象解释一些概念,当我能做到这一点时,说明我已经理解了这个概念.今天要解释的概念是:同步/异步与阻塞/非阻塞的区别.
这两组概念常常让人迷惑,因为它们都是涉及到IO处理,同时又有着一些相类似的地方.
首先来解释同步和异步的概念,这两个概念与消息的通知机制有关.
举个例子,比如我去银行办理业务,可能选择排队等候,也可能取一个小纸条上面有我的...
分类:
其他好文 时间:
2014-05-07 04:14:40
阅读次数:
309
关于结构体的一个问题:
看下面这个结构体的声明,把它记作A
struct node
{
int a;
float b;
struct node *next;
}s;
和如下的结构体声明,把它记作Bstruct node
{
int a;
float b;
struct node next;
}s;
他们的区别是啥?
今天学习《C和指针》第10...
分类:
编程语言 时间:
2014-05-07 03:19:10
阅读次数:
313
Subtraction Game 1
Chef is playing a game on a sequence of N positive integers, say A1, A2, ... AN. The game is played as follows.
If all the numbers are equal, the game ends.Otherwise
Sele...
分类:
其他好文 时间:
2014-05-07 03:14:01
阅读次数:
280
TCP和UDP区别
TCP
UDP
是否连接
面向连接
面向非连接
传输可靠性
可靠的
不可靠的
应用场合
传输大量的数据
少量数据
速度
慢
快
OSI 和 TCP/I...
分类:
其他好文 时间:
2014-05-06 15:02:55
阅读次数:
253