2010年10月24日 星期日

B&G 1725 波爾多 (Average - Very Good)

Costco買的,價格NT399...


梅洛,卡本內蘇維翁,建議醒酒30分鐘,但此時喝,口感淡如水,風味生硬,只有average...



第60分鐘,生硬的風味化開來,酸澀浮現,開始活了起來,鼻韻也開始感受到香氣,但單寧不夠細緻,酸味過強,香氣味仍弱,average and half...


中午失望滴喝完一半後,晚上再拿來喝,再經過約40分鐘醒酒後,整體香氣強烈滴浮現,鼻韻充滿覆盆莓、黑醋栗果香氣息,酸味和單寧皆轉變為柔順,口感也更為圓潤,不輸NT899紅酒,非常超值 (Very Good)~~

2010年10月19日 星期二

ThreadPool 多工好幫手

留個記錄:

Imports System.Threading

Dim callBack As New WaitCallback(AddressOf ProcessDeviceDataThread)

ThreadPool.QueueUserWorkItem(callBack)

Private Sub ProcessDeviceDataThread(ByVal obj As Object)
While True
Threading.Thread.Sleep(10)
'do something or then exit
End While
End Sub

2010年10月18日 星期一

Parsing jpos.xml

原來JPOS內提供的source code已經有現成的library,我居然用jdom來土法煉鋼。

留個記錄:

SimpleEntryRegistry reg = new SimpleEntryRegistry(new SimpleXmlRegPopulator());
reg.load();
Enumeration entriesEnum = reg.getEntries();

int count = 0;
while (entriesEnum.hasMoreElements())
{
JposEntry entry = (JposEntry) entriesEnum.nextElement();

if (entry.getLogicalName().equals(sDeviceName))
{
int ii = entry.getPropertyCount();

Iterator ppp = entry.getProps();
while (ppp.hasNext())
{
JposEntry.Prop prop = (JposEntry.Prop) ppp.next();
propName = prop.getName();
propValue = prop.getValueAsString();

if (propName.equals("Debug"))
{
DEBUG = (propValue.equals("1") ? true : false);
String sDebug = (propValue.equals("1") ? "true" :
"false");
//save to system property
System.setProperty("msr.msr.debug", sDebug);
TraceLog.WriteMessage("MSRService.open() " +
sDeviceName, DEBUG);
}
else if (propName.equals("Port"))
{
comid = Integer.parseInt(propValue.substring(3));
sComport = propValue;
TraceLog.WriteMessage("Port Connected: " + sComport,
DEBUG);
}
else if (propName.equals("PhysicalDeviceName"))
{
physicalDeviceName = propValue;
}
else if (propName.equals("DeviceServiceDescription"))
{
deviceServiceDescription = propValue;
}
else if (propName.equals("PhysicalDeviceDescription"))
{
physicalDeviceDescription = propValue;
}
else
{
//do nothing here
}
}
}
count++;
}

2010年10月16日 星期六

Costco德國白酒 - 2009 Riesling Kabinett (Good and Half)

實際價格忘記了,大概約在NT450 - 500之間。





從冰箱拿出來開瓶喝,剛開始時味道淡到不行,跟生啤酒差不多的淡口感,沒啥甜味,只剩酒精刺辣感。以為又買到地雷酒。但當溫度回升到10C以上時,帶黏稠度的果味、甜味,還有動感的酸味慢慢浮現。

這算清爽型白酒,不是風味濃郁型的,Good and Half~~

JPOS Xml modification

jpos.xml的格式不合客戶所需,把人家的 ISV 搞掛了。

又要重回java世界。

實在想不通,OPOS這麼好用,環境還是用Windows平台,幹嘛要用JPOS?

2010年10月13日 星期三

將來應該會買 Windows Phone 7

palm已經再見,就算是hp買下,但已經不是原來的palm。

當treo650壽終至寢時,就轉換到Windows Phone 7.

它的廣告我很喜歡~


還有這個~~

blog文章排版問題

部落格文章怎麼作排版呀,沒法作段落,space和tab在每一行前頭都被吃掉,貼的程式碼可讀性就變差了

實在不想寫html code,也不想貼screen shot圖檔來解決...

Open an OleDB Connection

要撈資料,就從這裡開始吧.



Imports oledb = System.Data.OleDb

Private Sub InitializeAccessDatabase()
Dim connOleDb As oledb.OleDbConnection
Dim dataSource As String

dataSource = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\xxx.mdb"

If connOleDb Is Nothing Then
connOleDb = New oledb.OleDbConnection(dataSource)
End If

If connOleDb.State <> ConnectionState.Open Then
connOleDb.Open()
End If

_conn = connOleDb
End Sub

開版囉~~

開始要好好的來用這個部落格作記錄~~