I got a lot of error from a LINQ DataContext, such as "Invalid attempt to call Read when reader is closed" . That is because I was using a singleton for DataContext in a multi-threads.
The codes like that:
That is not very thread-safe. A thread will close the DataContext, but others threads are still using DataContext. Then it will throw the error above.
I changed the DataContext in a pre-thread. I initialize the DataContext in each thread. The errors are gone! You also can do the DataContext in a pre-object. That is simpler.
I am implementing a Windows Service. I did a foolish mistake. I opened the design view of windows service and drag-and-drop the Timer from toolbar. Because I need the windows service to execute some code periodically. I found the timer won't triggered at all. I found that is Timer in Windows.Forms. It never works in Windows Service. You need to create a timer of System.Timers. Like the example following:
I found the jQuery validation is very good! Moreover, that is very easy to customize the error message. You just need to put the message in the "title" attribute.
We built a tool to check network information in your Android. It will find out all internal IP addresses and the external address. That is very useful for your developer and to do security audit.
By the way, I found even I am using 3G to connect internet. It only has a private network address!
Please click here to download
Scan this QRCode