Session per Operation (Anti pattern) 2. Session per Request use "Open Session In View" when rendering layer seperate from servlet, e.g. in JSP 3. Session per Request with detached object when a user case spans several transaction, considering the user think time, we can detach and re-attach the object to different session. Here we mean one session on transaction. For making sure only one user modifying that data, we need to user optimistic lock such as automatic versioning to isolate business use case. 4. Session per Conversation the Hibernate Session can be disconnected from the underlying JDBC connection after the database transaction has been committed and reconnected when a new client request occurs. This pattern is known as session-per-conversation and makes even reattachment unnecessary. Automatic versioning is used to isolate concurrent modifications and the Session will not be allowed to be flushed automatically, but explicitly.
excel中功能很丰富,掌握了对程序员帮助很大。 基本的有 Filter功能。记得以前给一个老外发excel报表,他说漏掉了一些。我百思不得其解,明明都包括了啊。最后发现是filter功能过滤了,他没有注意到。这是一个题外话。 新公司有个牛人excel应用得很溜。最近学了一招 VLookup, 很好使。 基本上,VLOOKUP作用是 在表格或数值数组的首列查找指定的数值,并由此返回表格或数组当前行中指定列处的数值。 VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) 参数定义如下: 1. Lookup_value 为需要在数组第一列中查找的数值。Lookup_value 可以为数值、引用或文本字符串。 2. Table_array 为需要在其中查找数据的数据表。可以使用对区域或区域名称的引用,例如数据库或列表。 3. Col_index_num 为 table_array 中待返回的匹配值的列序号。Col_index_num 为 1 时,返回 table_array 第一列中的数值;col_index_num 为 2,返回 table_array 第二列中的数值,以此类推。 4. Range_lookup 为一逻辑值,指明函数 VLOOKUP 返回时是精确匹配还是近似匹配。如果为 TRUE 或省略,则返回近似匹配值,也就是说,如果找不到精确匹配值,则返回小于 lookup_value 的最大数值;如果 range_value 为 FALSE,函数 VLOOKUP 将返回精确匹配值。 一个基本用法是: 在excel中我有一列数据Column A, 我需要找哪些在column F中出现了。方法是: 对应column A第一行数据在column B中用函数 =VLookUp(A2, sheet1!$a$2:$f$100, 1, false). 这样在Column B中非Null中都是匹配上的,通过filter功能可以过滤出来。 其他还有 =UPPer(A2) =Lower(A2) 关键有两个地方: 1. 应用函数需要 = 才能生效 2. 上面函数只是对一列中的一行数据生效了,对整列生效,需要选中已生效的那个Cell(A12)按住鼠标往下拖,该列所有行都会生效的。
测试工具
RMI / RPC / Web Service 调用时需要客户端服务端维护同样的调用接口?
Oracle start with
Oracle rank
Oracle返回奇数行或者偶数行数据库表记录
不用max函数返回表中最大值或者最小值