Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation.
The teacher has written down the sum of multiple numbers. Pupils should ca...
分类:
其他好文 时间:
2014-07-22 23:05:53
阅读次数:
382
OJ题目:click here~~
题目分析:n个数,从中取若干个数,和为n的倍数。给出一种取法。
因为只要给出其中一种方案就行,鸽笼原理可以求出取出的数为连续的方案。
关于鸽笼原理,点这里~
直接贴过来:
有n+1件或n+1件以上的物品要放到n个抽屉中,那么至少有一个抽屉里有两个或两个以上物品。
如果你知道这个结论:
a1,a2,a3...am是正整数序列,至少存在整数k和r,...
分类:
其他好文 时间:
2014-07-22 23:04:32
阅读次数:
258
1.利用返回值而不是副作用来写程序(副作用包含破坏性修改对象以及对变量赋值).2.需要返回多个值请使用multiple-value-bind和values的组合方式.3.函数式编程需要思考你要什么,而不是要怎么做.4.一个给定的调用可以安全的修改它唯一拥有的东西(函数拥有被调用函数返回的对象,但不拥...
分类:
其他好文 时间:
2014-05-05 23:30:48
阅读次数:
358
reference
from:http://www.cs.bgu.ac.il/~spl051/Personal_material/Practical_sessions/Ps_12/ps12.htmlJava
server class with multiple client connections:...
分类:
其他好文 时间:
2014-05-04 10:15:23
阅读次数:
355
参考:http://docs.jboss.org/hibernate/annotations/3.4/reference/zh_cn/html_single/1、系统配置:
可以通过使用 mapping的 resource,于class 属性混合配置在创建SessionFactory 也可以通过代码...
分类:
系统相关 时间:
2014-05-03 22:50:55
阅读次数:
584
When multiple threads share mutable data, each
thread that reads or writes the data must perform synchronization. Without
synchronization, there is no...
分类:
数据库 时间:
2014-05-01 09:14:25
阅读次数:
506
Look under the start
memcahcedthreadingprocessmemcached multi-threaded mainly by instantiating
multiple libevent, are a main thread and n workers thre...
分类:
其他好文 时间:
2014-05-01 06:15:27
阅读次数:
356
Defining annotations
Here is the definition of the annotation above. You can see that annotation definitions look a lot like interface definitions.
In fact, they compile to class files like any oth...
分类:
编程语言 时间:
2014-04-27 21:47:05
阅读次数:
348
Annotations are one of the fundamental language changes
introduced in Java SE5. They provide information that you need to fully describe your program, but that cannot be expressed in Java. Thus, anno...
分类:
编程语言 时间:
2014-04-27 21:14:59
阅读次数:
431
Meta-annotations
@Target
CONSTRUCTOR: Constructor declarationFIELD: Field declaration (includes enum constants) LOCAL_VARIABLE: Local variable declaration METHOD: Method declarationPACKAGE: Pack...
分类:
编程语言 时间:
2014-04-27 21:12:04
阅读次数:
385