Double-checked locking
摘要:The DCL idiom was designed to support lazy initialization, which occurs when a class defers initialization of an owned object until it is actually needed:public class WorldCup { private static WorldCup instance; public static WorldCup getInstance(){ if(instance == null) //A instance = new WorldCu...
阅读全文
posted @
2013-02-26 22:27
jnuyao
阅读(175)
推荐(0)
past life with BlackBerry
摘要:My blackberryspotaneously reboots repeatedly, does it like miui?I use bb Aug2012,for it's encrypt reputation,then i bought 9850 which isnot full qwerty but touch screen.Recently,BlackBerry cannot start up and it keep restarting itself until my battery drained out!Pull battery,not work.Google fin
阅读全文
posted @
2013-02-25 23:00
jnuyao
阅读(278)
推荐(0)
Java Memory Model
摘要:JMM defines how threads interact through memory.It used to be somewhat unclear and unnecessarily limiting,and so was revised.JSR133:Shared variables/Heap memory Memory that can be shared between threads is called shared or heap memory. All instance fields, static fields and array elements are stored
阅读全文
posted @
2013-02-25 12:09
jnuyao
阅读(207)
推荐(0)
Foreign Exchange: Spot Market
摘要:The spot FX market:is an exchange of one currency against another at an agreed rate.Settlement takes place two daysafter the trade date,although there is an exception to the rule.(most spot trades settle on a T+2 basis,that is,settlement occurs after two working days.)(T+1 is a notable exception to
阅读全文
posted @
2013-02-21 12:16
jnuyao
阅读(439)
推荐(0)
Method:Openwrt lua with serial port communication
摘要:Yes,as the caption show,I want to study how to find a way to make DB120's serial port communication with web page.Openwrt choose the luci web page as the default.So lua language is the first gap to breakthrough.A simple i.e given as below:#!/usr/bin/luaio.output("/dev/ttyS0")io.write(o
阅读全文
posted @
2013-02-06 00:40
jnuyao
阅读(561)
推荐(0)
java lib to handle csv date column
摘要:Handle csv column:especially date formatI have a task to handle the date between oracle and csv. So want to find out some lib to parse some CSV I do not know.You can assign any delimiter.You can use opencsv or supercsv.But the most difficult point is that there is very hard to handle the date format
阅读全文
posted @
2013-02-05 16:29
jnuyao
阅读(334)
推荐(0)
orcle exception:java.sql.SQLException: Io exception: Socket closed
摘要:expriencing problem: java从DB拿数据,大概6000+行,使用简单的PreparedStatement execute 得到ResultSet,本机报了Socket closed exception。export jar 到server上跑,正常,因此估计是jre版本或者jdbc驱动问题。server runtime:java version "1.6.0_11"Java(TM) SE Runtime Environment (build 1.6.0_11-b03)Java HotSpot(TM) Client VM (build 11.0-b16,
阅读全文
posted @
2013-02-01 10:51
jnuyao
阅读(800)
推荐(0)