>>> import thisThe Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is...
分类:
编程语言 时间:
2014-07-06 23:48:26
阅读次数:
303
1. [代码]tmpl.js // Simple JavaScript Templating// John Resig - http://ejohn.org/ - MIT Licensed(function() {var cache = {};this.tmpl = function tmpl(s....
分类:
编程语言 时间:
2014-07-06 23:21:22
阅读次数:
278
define simple method定义简单方法关键字def用于方法定义,在其后是方法名和可选的参数名列表,参数名列表会用一对圆括号括住。构成方法主体的代码放在参数列表之后,end用于结束方法定义。#define a methoddef factorial(n) if n0" ...
分类:
其他好文 时间:
2014-07-06 22:23:36
阅读次数:
241
参考:1,linux下编译运行驱动http://blog.csdn.net/zeroboundary/article/details/92947152,A Simple Driver for Linux OShttp://www.codeproject.com/Articles/112474/A-S...
分类:
系统相关 时间:
2014-07-06 18:28:31
阅读次数:
202
Problem DescriptionI think that you might have played the traditional Chinese ring game: The Chinese Linking Rings (here we call its nickname Jiulianh...
分类:
其他好文 时间:
2014-07-06 17:06:04
阅读次数:
293
1. [代码]Simple JavaScript Inheritance (function(){ var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; // The base ....
分类:
编程语言 时间:
2014-07-06 13:28:10
阅读次数:
262
hdu2374 A Game with Marbles(简单数学题)...
分类:
其他好文 时间:
2014-07-05 10:43:52
阅读次数:
243
题目链接:uva 10368 - Euclid's Game
题目大意:给出两个数,两个人做一个游戏,每次有stan开始操作,每次操作可以从最大的数中取走若干个小的数,即a-kb,a为比较大的数,b为比较小的数,kb为取走的值,k必须为整数,并且kb≤a。如果不能顺利执行操作,则对手胜利。
解题思路:模拟,直到k的最大值不为1时,当前操作者就掌握了主动权,既可以获胜。特殊情况为a=b的...
分类:
其他好文 时间:
2014-07-03 17:25:46
阅读次数:
198
SQS即Simple Queue Service, 是一个分布式的消息队列服务,使用它非常简单,消息队列服务可以用来buffer burst, 使整个服务异步处理,不要求组件始终可用.
开发人员最初使用 Amazon SQS 时只需用到五个 API:
CreateQueue、SendMessage、ReceiveMessage、ChangeMessageVisibility 和 DeleteM...
分类:
其他好文 时间:
2014-07-03 13:29:36
阅读次数:
163