摘要: Java Socket簡單入門例子.
閱讀全文
Dear all:
result love(boy, girl)
{
if ( boy.有房() and boy.有車() )
{boy.set(nothing);
return girl.嫁給(boy); }
if ( girl.愿意等() )
{
while( ! (boy.賺錢 > 100,000 and girl.感情 > 8 )
{for ( day=1; day <=365; day++)
{if ( day == 情人節 )
if ( boy.give girl(玫瑰) )
girl.感情++;
else
girl.感情--;
if( day == girl.生日)
if ( boy.give girl(玫瑰) )
girl.感情++;
else
girl.感情--;
boy.拼命賺錢();
}
}
if ( boy.有房() and boy.有車() )
{ boy.set(nothing);
return girl.嫁給(boy);
}
年齡++;
girl.感情--;
return girl.goto( another_boy);
}
(注:稍懂點C語言的應該都能看懂吧!)
摘要: 組件(Component)類必須在類一級定義@Embeddable注解.
在特定的實體的關聯屬性上使@Embedded和@AttributeOverride注解可以覆蓋該屬性對應的嵌入式對象的字段映射:
閱讀全文
摘要: 1.簡單主鍵:
使用@Id注解可以將實體bean中的某個屬性定義為標識字段.使用 @GeneratedValue注解可以定義標識字段的生成策略:
AUTO - 可以是identity類型的字段,或者sequence類型或者table類型,取決于不同的底層數據庫.
TABLE - 使用表保存id值
IDENTITY - identity字段
SEQUENCE - sequence
閱讀全文
摘要: 1. 基本屬性映射
通過 @Basic 可以聲明屬性的存取策略:
@Basic(fetch=FetchType.EAGER) 即時獲取(默認的存取策略)
@Basic(fetch=FetchType.LAZY) 延遲獲取
閱讀全文
摘要: Displaytag1.1支持在外部實現大數據量分頁。主要有兩種方式實現:
Displaytag 1.1 offers two alternative ways for working with partial lists:
the first one uses the valuelist pattern, and requires that the object that you give to displaytag implements the org.displaytag.pagination.PaginatedList interface. You can pass this object to displaytag as an usual list, and it will extract paging and sorting information from it. This way is more recommended if you have to build your backend layer and you can easily
閱讀全文
1.打開
Google主頁
2.把瀏覽器地址欄清空,再將下面的內容復制到地址欄內:
javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);
3.回車....
摘要: Launchy,一款免費開源軟件實現了鍵盤快捷啟動程序的功能。
你只需要輸入程序的名稱,Launchy就可以自動幫你匹配出你想要運行的程序:
閱讀全文
摘要: Table
Table用來定義entity主表的name,catalog,schema等屬性。
元數據屬性說明:
name: 表名
catalog: 對應關系數據庫中的catalog
schema:對應關系數據庫中的schema
UniqueConstraints:定義一個UniqueConstraint數組,指定需要建唯一約束的列
閱讀全文
摘要: Apache的Jakata項目的POI子項目,目標是處理ole2對象。
POI可以到
http://www.apache.org/dyn/closer.cgi/jakarta/poi/
下載。...
閱讀全文
摘要: 方法一:循環元素刪除
方法二:通過HashSet剔除
方法三:刪除ArrayList中重復元素,保持順序
閱讀全文
摘要: As per the documentation on MySQL I moved the storage of passwords from using Password() to using MD5(). I read a number of places that stated that this was a method that couldn't be reversed and it was far more secure than the previous method. I was feeling confident that life was about to get a little more secure. While going through my daily RSS feeds and mailing lists for SpikeSource, I happenned upon a thread about someone discussing how easy it was to break MD5 hashes. It was a simple matt
閱讀全文
摘要: name="resultList" 將記錄集存在session或者request中的鍵值
pagesize="100" 每頁顯示100條數據
sort="external" 外部排序
id="row" 表格id值,用于程序得相關的參數
partialList="true" 分段從數據庫中讀數據
size="resultSize" 記錄的總條數,用于計算總頁數
閱讀全文
摘要: Apache jakarta
各項目主要用途及簡單說明
來源出處:http://www.javaworld.com.tw/jute/post/view?bid=11&id=1672
為了讓大...
閱讀全文
一定得是N層結構,
層數越多越好,層少了用戶會誤會我們不重視,
什么數據訪問層呀,實體控制層啊,能給他加上的全加上。
程序員一定都得是老鳥,30以下基本不考慮,
還得清一色的外企空降兵,
都有10年以上編程經驗的那種,用過的語言越多越好,
編程都不帶查MSDN的,牛吧!
程序員個個都配IBM筆記本,
CPU要3G以上的,內存硬盤和屏幕都要最大的,
擴展槽別剩下,能插上的全插上。
能安的操作系統全安上,開機一屏幕上就一堆系統等你選,
倍有面子!
系統平臺就得是J2EE,人家競爭對手除了C++就是JAVA,
你要用一.NET都不好意思和別人打招呼。
你說這樣的系統設計出來得賣多少錢?
我覺得怎么也得100萬吧?
100萬,那是單機版!
1000萬起!
你還別嫌太貴,還不免實施服務費。
你得研究有錢用戶得心理,
愿意花1000萬買這套軟件用的,
根本不在乎再多花上幾百萬!
什么叫軟件泡沫你知道么?
軟件泡沫就是做都做最復雜的,
用就得用最貴的,還得特難用,顯得用戶水平高。
所以我們搞軟件的口號就是:
不求好用,但求費勁!
摘要: 參考文檔:使用 Spring 更好地處理 Struts 動作
可以通過三種方式實現Spring管理Struts Action:
1.使用 Spring 的 ActionSupport 類整合 Structs
2.使用 Spring 的 DelegatingRequestProcessor 覆蓋 Struts 的 RequestProcessor
3.將 Struts Action 管理委托給 Spring 框架
閱讀全文
摘要: 元字符及其在正則表達式中行為的列表
閱讀全文