00编写一个程序,接受用户的输入并保存为新的文件:def file_write(file_name): f = open(file_name, 'w') print('请输入内容【单独输入\':w\'保存退出】:') while True: write_some ...
分类:
其他好文 时间:
2014-07-08 22:10:19
阅读次数:
353
Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do th...
分类:
其他好文 时间:
2014-07-08 22:06:25
阅读次数:
222
原题: ZOJ 3674http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3674题意不难理解,很容易想到用暴力,但是无从下手,不知道怎么实现。后来看了网上的代码,直接用vector和map暴力,用到了set_intersect...
分类:
其他好文 时间:
2014-07-08 22:04:57
阅读次数:
239
最近工作中,发现了一个bug,是和ListView Adapter有关的。产生了FC,描述信息大约是
"The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a b...
分类:
其他好文 时间:
2014-07-08 20:09:41
阅读次数:
199
一句话的区别就是:trigger will bubbling jQuery events (not default DOM events) and triggerHnadler will not do that!...
分类:
Web程序 时间:
2014-07-08 19:41:55
阅读次数:
158
Robot Motion
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 10267
Accepted: 5001
Description
A robot has been programmed to follow the instructions ...
分类:
其他好文 时间:
2014-07-08 19:13:43
阅读次数:
203
《Think in java·第 4 章初始化和清除》
本章介绍对象的创建和消除。
4.1 用构建器自动初始化
【You can imagine creating a method called initialize( ) for every class you write.】一句话的正确解读是,你(男生)将自己想象成为女生。所以,我专门用一节 《 编程导论(Java)·2.3.6 构造器...
分类:
其他好文 时间:
2014-07-08 15:52:03
阅读次数:
223
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 possible input ca...
分类:
其他好文 时间:
2014-07-08 12:52:05
阅读次数:
200
#!/usr/bin/envpythonfromQueueimportQueuefromthreadingimportThreadimportrandomimporttimedefperson(i,q):whileTrue:#这个人一直处与可以接活干的状态q.get()print"Thread",i,"do_job"time.sleep(random.randint(1,5))#每个人干活的时间不一样,自然就会导致每个人分配的件..
分类:
编程语言 时间:
2014-07-08 09:48:06
阅读次数:
222
权限一、文件的基本权限所谓的权限就是用户访问文件的能力,文件的基本权限包括r(读),write(写),x(可执行)。用ls-ldfile查看文件的权限属性:drwxr-xr-x4rootroot4096Jul321:29filedrwxr-xr-x:说明文件类型,常见的文件类型有:d目录文件,l链接文件,c线性设备文件,b块设备..
分类:
系统相关 时间:
2014-07-08 08:27:49
阅读次数:
230