參考資料:
http://stackoverflow.com/questions/5015593/how-to-replace-part-of-string-by-position
2016年10月8日 星期六
2016年10月4日 星期二
Apache CXF 3.X已經移掉XMLUtils
http://cxf.apache.org/docs/30-migration-guide.html
Move ALL XML parsing and writing to StaxUtils and DOM based utilities to DOMUtils. The XMLUtils class that used SAX based parsing and Transformer based writing has been eliminated. This simplifies the code as well as increases security as we can provide better limits and have more control with the StAX based IO.
XMLUtils (Apache CXF Bundle Jar 2.7.0 API)
https://cxf.apache.org/javadoc/latest-2.7.x/org/apache/cxf/helpers/XMLUtils.html
Move ALL XML parsing and writing to StaxUtils and DOM based utilities to DOMUtils. The XMLUtils class that used SAX based parsing and Transformer based writing has been eliminated. This simplifies the code as well as increases security as we can provide better limits and have more control with the StAX based IO.
XMLUtils (Apache CXF Bundle Jar 2.7.0 API)
https://cxf.apache.org/javadoc/latest-2.7.x/org/apache/cxf/helpers/XMLUtils.html
2016年9月25日 星期日
2016年9月8日 星期四
免費的Enterprise Architect Viewer
http://www.sparxsystems.com.au/products/ea/downloads.html
http://www.sparxsystems.com.au/bin/EALite.msi
可以用來檢視使用Sparx Systems的UML軟體(Enterprise Architect)製作的eap檔
http://www.sparxsystems.com.au/bin/EALite.msi
可以用來檢視使用Sparx Systems的UML軟體(Enterprise Architect)製作的eap檔
2016年9月3日 星期六
使用非同步的方式執行SQL命令
連線字串加上Asynchronous Processing=True啟動非同步模式
比如:
String strConnectionString = "Data Source=localhost;" +
"Integrated Security=True;" +
"Initial Catalog=AdventureWorks;" +
"Asynchronous Processing=True";
用途:同步模式是單執行緒,如果查詢結果要等待很久,程式會發生無法回應的狀態,就必須改用非同步
備註:
IAsyncResult result = cmd.BeginExecuteReader();
while (!result.IsCompleted)
{
System.Threading.Thread.Sleep(100);
textBox1.Text = "執行中!";
}
REF:
Visual C# 2012資料庫程式設計暨進銷存系統實作
第5-43頁
程式5-8-1
比如:
String strConnectionString = "Data Source=localhost;" +
"Integrated Security=True;" +
"Initial Catalog=AdventureWorks;" +
"Asynchronous Processing=True";
用途:同步模式是單執行緒,如果查詢結果要等待很久,程式會發生無法回應的狀態,就必須改用非同步
備註:
IAsyncResult result = cmd.BeginExecuteReader();
while (!result.IsCompleted)
{
System.Threading.Thread.Sleep(100);
textBox1.Text = "執行中!";
}
REF:
Visual C# 2012資料庫程式設計暨進銷存系統實作
第5-43頁
程式5-8-1
訂閱:
文章 (Atom)

