摘要: Java Socket簡(jiǎn)單入門例子.
閱讀全文
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 == 情人節(jié) )
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);
}
(注:稍懂點(diǎn)C語言的應(yīng)該都能看懂吧!)
摘要: 組件(Component)類必須在類一級(jí)定義@Embeddable注解.
在特定的實(shí)體的關(guān)聯(lián)屬性上使@Embedded和@AttributeOverride注解可以覆蓋該屬性對(duì)應(yīng)的嵌入式對(duì)象的字段映射:
閱讀全文
摘要: 1.簡(jiǎn)單主鍵:
使用@Id注解可以將實(shí)體bean中的某個(gè)屬性定義為標(biāo)識(shí)字段.使用 @GeneratedValue注解可以定義標(biāo)識(shí)字段的生成策略:
AUTO - 可以是identity類型的字段,或者sequence類型或者table類型,取決于不同的底層數(shù)據(jù)庫(kù).
TABLE - 使用表保存id值
IDENTITY - identity字段
SEQUENCE - sequence
閱讀全文
摘要: 1. 基本屬性映射
通過 @Basic 可以聲明屬性的存取策略:
@Basic(fetch=FetchType.EAGER) 即時(shí)獲取(默認(rèn)的存取策略)
@Basic(fetch=FetchType.LAZY) 延遲獲取
閱讀全文
摘要: Displaytag1.1支持在外部實(shí)現(xiàn)大數(shù)據(jù)量分頁。主要有兩種方式實(shí)現(xiàn):
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.把瀏覽器地址欄清空,再將下面的內(nèi)容復(fù)制到地址欄內(nèi):
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,一款免費(fèi)開源軟件實(shí)現(xiàn)了鍵盤快捷啟動(dòng)程序的功能。
你只需要輸入程序的名稱,Launchy就可以自動(dòng)幫你匹配出你想要運(yùn)行的程序:
閱讀全文
摘要: Table
Table用來定義entity主表的name,catalog,schema等屬性。
元數(shù)據(jù)屬性說明:
name: 表名
catalog: 對(duì)應(yīng)關(guān)系數(shù)據(jù)庫(kù)中的catalog
schema:對(duì)應(yīng)關(guān)系數(shù)據(jù)庫(kù)中的schema
UniqueConstraints:定義一個(gè)UniqueConstraint數(shù)組,指定需要建唯一約束的列
閱讀全文
摘要: Apache的Jakata項(xiàng)目的POI子項(xiàng)目,目標(biāo)是處理ole2對(duì)象。
POI可以到
http://www.apache.org/dyn/closer.cgi/jakarta/poi/
下載。...
閱讀全文
摘要: 方法一:循環(huán)元素刪除
方法二:通過HashSet剔除
方法三:刪除ArrayList中重復(fù)元素,保持順序
閱讀全文
摘要: 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條數(shù)據(jù)
sort="external" 外部排序
id="row" 表格id值,用于程序得相關(guān)的參數(shù)
partialList="true" 分段從數(shù)據(jù)庫(kù)中讀數(shù)據(jù)
size="resultSize" 記錄的總條數(shù),用于計(jì)算總頁數(shù)
閱讀全文
摘要: Apache jakarta
各項(xiàng)目主要用途及簡(jiǎn)單說明
來源出處:http://www.javaworld.com.tw/jute/post/view?bid=11&id=1672
為了讓大...
閱讀全文
一定得是N層結(jié)構(gòu),
層數(shù)越多越好,層少了用戶會(huì)誤會(huì)我們不重視,
什么數(shù)據(jù)訪問層呀,實(shí)體控制層啊,能給他加上的全加上。
程序員一定都得是老鳥,30以下基本不考慮,
還得清一色的外企空降兵,
都有10年以上編程經(jīng)驗(yàn)的那種,用過的語言越多越好,
編程都不帶查MSDN的,牛吧!
程序員個(gè)個(gè)都配IBM筆記本,
CPU要3G以上的,內(nèi)存硬盤和屏幕都要最大的,
擴(kuò)展槽別剩下,能插上的全插上。
能安的操作系統(tǒng)全安上,開機(jī)一屏幕上就一堆系統(tǒng)等你選,
倍有面子!
系統(tǒng)平臺(tái)就得是J2EE,人家競(jìng)爭(zhēng)對(duì)手除了C++就是JAVA,
你要用一.NET都不好意思和別人打招呼。
你說這樣的系統(tǒng)設(shè)計(jì)出來得賣多少錢?
我覺得怎么也得100萬吧?
100萬,那是單機(jī)版!
1000萬起!
你還別嫌太貴,還不免實(shí)施服務(wù)費(fèi)。
你得研究有錢用戶得心理,
愿意花1000萬買這套軟件用的,
根本不在乎再多花上幾百萬!
什么叫軟件泡沫你知道么?
軟件泡沫就是做都做最復(fù)雜的,
用就得用最貴的,還得特難用,顯得用戶水平高。
所以我們搞軟件的口號(hào)就是:
不求好用,但求費(fèi)勁!
摘要: 參考文檔:使用 Spring 更好地處理 Struts 動(dòng)作
可以通過三種方式實(shí)現(xiàn)Spring管理Struts Action:
1.使用 Spring 的 ActionSupport 類整合 Structs
2.使用 Spring 的 DelegatingRequestProcessor 覆蓋 Struts 的 RequestProcessor
3.將 Struts Action 管理委托給 Spring 框架
閱讀全文
摘要: DCBP連接池的簡(jiǎn)單使用方法。
閱讀全文
摘要: 元字符及其在正則表達(dá)式中行為的列表
閱讀全文