/**////<summary> /// DoWork event process method ///</summary> ///<param name="sender"></param> ///<param name="e"></param> privatevoid BackgroundWorker_DoWork(object sender, DoWorkEventArgs e) { long length; using (StreamReader sr =new StreamReader(m_FilePath)) { // Get file length length = sr.ReadToEnd().Length; }
using (StreamReader sr =new StreamReader(m_FilePath)) { long onePercentOfLength = length /100; long currentPosition =0; int i =0;
while (!sr.EndOfStream) { sr.Read(); currentPosition ++;
// Produce ProcessChanged event in each percent reading while (currentPosition > onePercentOfLength * i) { ((BackgroundWorker)sender).ReportProgress(i++); } }
// e.Result will be used in RunWorkerCompleted event process method e.Result = currentPosition; } }
什么是Hessian
The Hessian binary web service protocol makes web services usable without requiring a large framework, and without learning yet another alphabet soup of protocols. Because it is a binary p
在Spark Shell上,通过创建HiveContext可以直接进行Hive操作
1. 操作Hive中已存在的表
[hadoop@hadoop bin]$ ./spark-shell
Spark assembly has been built with Hive, including Datanucleus jars on classpath
Welcom
JMS Message Delivery Reliability and Acknowledgement Patterns
http://wso2.com/library/articles/2013/01/jms-message-delivery-reliability-acknowledgement-patterns/
Transaction and redelivery in
转载请出自出处:http://eksliang.iteye.com/blog/2177567 一、游标
数据库使用游标返回find的执行结果。客户端对游标的实现通常能够对最终结果进行有效控制,从shell中定义一个游标非常简单,就是将查询结果分配给一个变量(用var声明的变量就是局部变量),便创建了一个游标,如下所示:
> var