自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Tomson Xu

@CityU

  • 博客(16)
  • 资源 (1)
  • 收藏
  • 关注

转载 Hibernate: cannot simultaneously fetch multiple bags 问题的解决办法

如果在一个pojo里使用超过一个List的变量,则会出现这个错误详见: http://www.quanlei.com/2011/10/2817.html他提供了4个解决方法,我采用方案3: 改变FetchMode为@Fetch(FetchMode.SUBSELECT)其他参考links:http://www.mkyong.com/hibernate/hibe

2012-04-30 11:07:02 4712

原创 iOS: label如果支持多行

在storyboard选中label控件,在属性窗口里设置"lines"属性为2,然后在"Text"属性里输入string,换行时按ctrl + enter

2012-04-24 10:17:10 3462

转载 iOS: resource file folder in xCode 4

http://stackoverflow.com/questions/5789223/how-do-i-get-the-resources-folder-back-in-xcode-4

2012-04-24 09:59:04 1085

转载 iOS: Detecting which UIButton was pressed in a UITableView

http://stackoverflow.com/questions/1802707/detecting-which-uibutton-was-pressed-in-a-uitableview

2012-04-24 09:55:12 699

转载 iOS: 在navigation controller里,如何hide navigation bar of first sub controller?

ref link: http://stackoverflow.com/questions/845583/iphone-hide-navigation-bar-only-on-first-page- (void) viewWillAppear:(BOOL)animated{ [self.navigationController setNavigationBarHidden:YE

2012-04-23 23:21:30 2211

转载 iOS: 设计优秀的iPhone通知

http://elya.cc/2011/11/22/notification/

2012-04-19 11:09:44 1071

原创 iOS: Device token and registerForRemoteNotificationTypes, didReceiveRemoteNotification

Device token for an iPhone device生成之后就永远不变吗?不是,if a device is wiped (应该是重装系统), it will get a new device token. 官方网站是这样写的: If the user restores backup data to a new device or computer, or reinsta

2012-04-18 19:25:35 13808

原创 iOS: NSUserDefaults issues

NSUserDefaults用于存储一些app setting。当你关闭app之后再打开后,之前存储的setting依然可以从NSUserDefaults里读取。注意:密码最好不要存储在NSUserDefaults里,要存储也必须用AES/DES加密存储,更安全的方法是 https://github.com/ldandersen/scifihifi-iphone把密码存储在NSUserDefa

2012-04-18 16:24:47 3730

原创 html table with matrix effect

同事帮写的。test1.html table {border: 1px solid #000;} td.item {border: 1px solid #f00;} a b c y z test2.html t

2012-04-16 09:51:04 865

转载 Android: 详细的对话框AlertDialog.Builder使用方法

http://www.cnblogs.com/Gaojiecai/archive/2011/12/10/2283156.html

2012-04-15 02:16:49 607

原创 Android: thread & handler

Android UI操作并不是线程安全的, UI操作必须在UI线程中执行,也就是说你不能在自己另起的一个thread里进行UI操作。举个例子,下列代码是希望在自定义的thread中修改Activity里的button name。ThreadHandlerDemoActivity.javapublic class ThreadHandlerDemoActivity extends Act

2012-04-15 01:20:09 754

原创 Android: get IP address of device

在网上查了下,多数使用下列代码: private String getLocalIpAddress() { try { for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf

2012-04-15 00:49:06 3234

原创 Java UDP Socket

Java UDP Socket使用2个class: DatagramSocket and DatagramPacket在DatagramSocket中並不區分ServerSocket和ClientSocket,调用send方法的就相当于socket client,调用receive方法的就相当于socket server。调用DatagramSocket 的receive方法时

2012-04-13 15:35:02 1735 1

转载 AJAX & IE Caching Issues

http://sitecrafting.com/blog/ajax-ie-caching-issues/

2012-04-13 11:14:29 597

原创 Java操作Microsoft office

如果是java操作excel,那么选用Apache POI (http://poi.apache.org/)为什么不选用java excel api (http://jexcelapi.sourceforge.net/)? 因为它不支持excel 2007 or later format (xlsx)poi基本操作的参考文档:http://blog.yslifes.com/ar

2012-04-12 10:51:14 6490 2

原创 spring 3 file upload

参考:http://static.springsource.org/spring/docs/3.0.0.M3/spring-framework-reference/html/ch16s08.htmlhttp://www.ioncannon.net/programming/975/spring-3-file-upload-example/http://www.cnblogs.com/

2012-04-11 18:00:39 1008

EJBTest.war

EJBTest.war

2007-07-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除