1.利用返回值而不是副作用来写程序(副作用包含破坏性修改对象以及对变量赋值).2.需要返回多个值请使用multiple-value-bind和values的组合方式.3.函数式编程需要思考你要什么,而不是要怎么做.4.一个给定的调用可以安全的修改它唯一拥有的东西(函数拥有被调用函数返回的对象,但不拥...
分类:
其他好文 时间:
2014-05-05 23:30:48
阅读次数:
358
在做hibernate修改和删除的时候,可能会遇到
org.hibernate.NonUniqueObjectException异常,a different object with the same
identifier value was already associated with the s...
分类:
系统相关 时间:
2014-05-05 22:27:35
阅读次数:
361
题目:
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new len...
分类:
其他好文 时间:
2014-05-05 12:58:57
阅读次数:
294
题目:给定一个n*m大的纸张,上面表明了每块上的字母,在其背后给定了对应位置的字母的value,在最后给出需要剪出来的剪纸的字母序列。
方法:暴力搜索。
代码:
#include
#include
#include
#include
using namespace std;
char map[502][502];
int Map[502][502];
int vis[502][502...
分类:
其他好文 时间:
2014-05-05 12:53:36
阅读次数:
338
是新的方法,还是get方法本身就有这个功能?需要用到递归遍历的方法,将所有的key-value扫描出来。
分类:
其他好文 时间:
2014-05-05 11:53:20
阅读次数:
438
windows下安装redis1、redis简介redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted
set --有序集合)和hashs(哈希类型)。这些数据类型...
1: /// 2: ///
修改web.config或app.config文件appSettings配置节中的Add里的value属性 3: /// 4: /// 5: ///
注意,调用该函数后,会使整个Web Application重启,导致当前所有的会话丢...
分类:
移动开发 时间:
2014-05-04 11:05:06
阅读次数:
359
sessionScope整体的意思是获得存放在session.setAttrbute(key,value)的值本文转载自熊佳佳《sessionScope整体的意思是获得存放在session.setAttrbute(key,value)的值》package
com.demo.struts2;impor...
分类:
其他好文 时间:
2014-05-04 10:21:41
阅读次数:
313
为了减少所写JS代码对全局环境的污染,
可以采用对象写法来实现命名空间技术,以使得局部变量和函数都在对象中作为属性存在,它们组成某个主题(对象名称体现)的相关属性和方法的集合。如下例:var
MyLib = {}; // global Object cointainerMyLib.value =.....
分类:
其他好文 时间:
2014-05-04 09:57:12
阅读次数:
295
auto root = Dictionary::create();
auto string = String::create("string element value");
root->setObject(string, "string element key");
auto array = Array::create();
...
分类:
其他好文 时间:
2014-05-03 16:27:48
阅读次数:
380