tiechui

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 4 5 6 7 8 9 10 下一页

2010年12月1日

摘要: 注意: 2个锁是调用关系的, 不是并列关系public class DeadLock { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub final Object resource1 = "res1"; final Object resource2 = "res2"; Thread t1 = new Thread() { public void run() { synchronized(resource1) { 阅读全文
posted @ 2010-12-01 16:54 tiechui 阅读(173) 评论(0) 推荐(0) 编辑

摘要: 注意: 1. wait()后 立即放锁, 给其他等待线程使用,当被唤醒,立即从wait()处执行(而不是从方法头重新执行) 2. notify(), 唤醒其他睡着的线程,不能唤醒自己。 3. 没有结束的问题用 while(用if, 则可能在错误情况下继续执行)。public class ProducerConsumer { public static void main(String[] args) { SyncStack ss = new SyncStack(); Producer p = new Producer(ss); Consumer c = new Consumer(ss... 阅读全文
posted @ 2010-12-01 16:25 tiechui 阅读(384) 评论(0) 推荐(0) 编辑

2010年11月30日

摘要: 书中讲:以下情况,Session结束生命周期,Servlet容器将Session所占资源释放:1.客户端关闭浏览器2.Session过期3.服务器端调用了HttpSession的invalidate()方法。"一个浏览器就是一个新session,关了浏览器session就结束了"session 是在服务器端建立的,浏览器访问服务器会有一个sessionid,浏览器端通过sessionid定位服务器端的session,session的创建和销毁由服务器端控制。当浏览器关闭后,session还存在在服务器端,只不过你新开的浏览器去访问服务器会创建另一个session,这个时候的 阅读全文
posted @ 2010-11-30 15:55 tiechui 阅读(53082) 评论(0) 推荐(10) 编辑

2010年11月22日

摘要: eg:Struts ValueStack DebugValue Stack ContentsObjectProperty NameProperty Valuecom.*******.******.action.HomeappUrlabctextsddddddStack ContextThese items are available using the #key notationKeyValuecom.opensymphony.xwork2.dispatcher.HttpServletRequest org.apache.struts2.dispatcher.StrutsRequestWrap 阅读全文
posted @ 2010-11-22 11:16 tiechui 阅读(416) 评论(0) 推荐(0) 编辑

2010年11月14日

摘要: 1. java.lang.reflect.Method o // UserService instrance, refObject // class instrance, eg UserDAOImpl (implement UserDAO) methodName = "setUserDAO"; // Method m = o.getClass().getMethod(methodName, refObject.getClass().getInterfaces()[0]); m.invoke(o, refObject); // = o.setUserDAO(refObject 阅读全文
posted @ 2010-11-14 15:39 tiechui 阅读(137) 评论(0) 推荐(0) 编辑

2010年11月12日

摘要: D:\Users\***>ping -a ***.**.***.***Pinging ROBIN [***.**.***.***] with 32 bytes of data:Reply from ***.**.***.***: bytes=32 time=25ms TTL=128Reply from ***.**.***.***: bytes=32 time=1ms TTL=128Reply from ***.**.***.***: bytes=32 time=1ms TTL=128Reply from ***.**.***.***: bytes=32 time=1ms TTL=128 阅读全文
posted @ 2010-11-12 17:19 tiechui 阅读(286) 评论(0) 推荐(0) 编辑

2010年11月10日

摘要: 1.apple api :http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.htmlothers:http://mobile.tutsplus.com/tutorials/iphone/iphone-web-app-meta-tags/full screen:1. add <meta name="apple-mobile-web-app-capable" content="ye 阅读全文
posted @ 2010-11-10 15:22 tiechui 阅读(626) 评论(0) 推荐(0) 编辑

2010年11月8日

摘要: 1. install tomcat 6.0 2. 其中只有bin, conf,lib,webapps(服务开启时, 临时站点?) 是必须的, 可以不安装,直接拷贝就可以使用 eclipse 设置 reference->server->Runtime Environments, add ..... 阅读全文
posted @ 2010-11-08 11:47 tiechui 阅读(156) 评论(0) 推荐(0) 编辑

2010年11月5日

摘要: 1. download http://maven.apache.org/download.html2. extract eg:C:\Program Files\apache-maven-3.03. 设置环境变量(一定要系统变量) M2_HOME=C:\Program Files\apache-maven-3.0 path=....;M2_HOME\bin4. test $mvn -v 阅读全文
posted @ 2010-11-05 17:32 tiechui 阅读(308) 评论(0) 推荐(0) 编辑

摘要: [转]windows下安装android及eclipse配置前几天安装android碰到问题,记录到这里1.下载android的SDK并配置解压下载的SDK,在Windows机器上,右键单击我的电脑,选择属性->高级,点“环境变量”按钮,修改“系统变量”下面的Path变量,把SDK tools的真实路径加入其中(即Android sdk 解压后的文件夹下的tool路径)。添加完后,可以在命令行下用命令测试:android -h,如果出现android的帮助命令就说明配置好了。2.安装Eclipse下android插件ADT解压下载的ADT,安装插件(和其他的插件一样的安装方法),copy 阅读全文
posted @ 2010-11-05 14:16 tiechui 阅读(1404) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 下一页