00编写一个程序,统计当前目录下每个文件类型的文件数import osall_files = os.listdir(os.curdir)type_dict =dict()for each_file in all_files: if os.path.isdir(each_file): ...
分类:
其他好文 时间:
2014-07-09 18:46:33
阅读次数:
215
1. Open a terminal window.2. Type in the following commands, then hit Enter after each.wget ftp://ftp.mondorescue.org/ubuntu/`lsb_release -r|awk '{pri...
分类:
其他好文 时间:
2014-07-09 17:51:26
阅读次数:
272
$(document).click(function(){ $('.checkval').find('li').each(function(){ $(this).click(function(){ var checkvalue...
分类:
Web程序 时间:
2014-07-09 17:18:55
阅读次数:
282
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
题目
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent
a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find ...
分类:
其他好文 时间:
2014-07-08 21:43:08
阅读次数:
219
For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each i (2...
分类:
其他好文 时间:
2014-07-08 17:54:12
阅读次数:
297
字典树
看题库上说这是字典树,不过被我水过去了。
题意是说用对应的字典,翻译出火星文。
each line will contain at most 3000 characters.
看到这句话我就安心了。Time Limit: 10000/5000 MS (Java/Others)
果断用map 来水了。还真AC了。3296MS 。本来是想巩固一下字典树的,不过……。
...
分类:
其他好文 时间:
2014-07-08 14:42:44
阅读次数:
173
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s ...
分类:
其他好文 时间:
2014-07-08 13:34:40
阅读次数:
195
Problem Description
A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially...
分类:
其他好文 时间:
2014-07-08 11:10:23
阅读次数:
164
$(function() {
//alert($("div").text());
//对数组元素使用匿名函数进行逐个处理。
$("div").each(function(key, value) {
//alert(key+value);
// ...
分类:
Web程序 时间:
2014-07-08 11:02:36
阅读次数:
158