1.the using of exception2.file oprationimport os>>> try: data = open('sketch.txt') for each in data: try: (role,message) = eac...
分类:
编程语言 时间:
2014-09-09 11:28:28
阅读次数:
189
public class Solution { public ListNode detectCycle(ListNode head) { ListNode slow = head; ListNode fast = head; boolean hasCy...
分类:
其他好文 时间:
2014-09-09 11:13:48
阅读次数:
204
GET: 请求指定的页面信息,并返回实体主体。 HEAD: 只请求页面的首部。 POST: 请求服务器接受所指定的文档作为对所标识的URI的新的从属实体。 HTTP 定义了与服务器交互的不同方法,最基本的方法是 GET 和 POST。事实上 GET 适用于多数请求,而保留 POST 仅用于更新站点....
分类:
其他好文 时间:
2014-09-09 10:59:18
阅读次数:
305
1.publish2.update print_lolPS:for Step 1.write the code in to a py file. put the py file into a folder named nester. new a py file named 'setup' and t...
分类:
编程语言 时间:
2014-09-09 10:44:28
阅读次数:
309
注意: 前两个互换的时候,head 要改变位置。还要有一个 pre 指针。注意: 前两个互换的时候,head 要改变位置。还要有一个 pre 指针。思路: 双指针。
分类:
其他好文 时间:
2014-09-09 10:30:28
阅读次数:
292
贴友需求:以html+css仿照书本的页面实现布局效果(见图)html代码: 1: DOCTYPE HTML>html>head>meta http-equiv="content-type" content="text/html;charset=utf-8">title>Testmeta name=...
分类:
Web程序 时间:
2014-09-08 02:09:06
阅读次数:
409
觉着自己写的比看到的答案精简,分享一下:
class Solution {
public:
ListNode *deleteDuplicates(ListNode *head) {
if(head == NULL) return NULL;
ListNode res(-1);
ListNode* pre = &res;
pr...
分类:
其他好文 时间:
2014-09-08 01:03:16
阅读次数:
267
1.the concept of List2. how to define a method of myself3.how to iterator a listPS:for Step 2,3. it is related with a key word: 'def'. we define a fun...
分类:
编程语言 时间:
2014-09-07 21:00:15
阅读次数:
229
学习云风的skynet源代码,简单记录下。void skynet_globalmq_push(struct message_queue * queue) { struct global_queue *q= Q; uint32_t tail = GP(__sync_fetch_and_add(&q->...
分类:
Web程序 时间:
2014-09-06 17:24:23
阅读次数:
228