Profile

Click to view full profile
Hi, I'm Veerapat Sriarunrungrueang, an expert in technology field, especially full stack web development and performance testing.This is my coding diary. I usually develop and keep code snippets or some tricks, and update to this diary when I have time. Nowadays, I've been giving counsel to many well-known firms in Thailand.
view more...

Friday, September 7, 2012

Let's create own Neuron Networks (C#)

It's a kind of fun to create own Neuron Networks. To review a school age lol (in AI class), take a look at http://msdn.microsoft.com/en-us/magazine/hh975375.aspx. He described very clear and detailed. You can follow him to create your own :D. 

The following page is a preview page that I just referred above:

Wednesday, September 5, 2012

How to Implement IDisposable correctly

Before getting to know how to implement IDisposable, must has some basic about .NET system first.

Unmanaged Code, which means the code developed outside .NET Framework is known as unmanaged code. It's not run under CLR (Common Language Runtime) such as C++ can be used to write such applications , for examples, access low level functions of the operating system. It offers the powerful features that managed code does not, and might damaging as well. Unmanaged code can be unmanged source code and unmanaged compile code, and  unmanged  code is execute with the help of wrapper classes, and caution is required (doesn't be executed by CLR). It will be compiled into machine code and executed by the OS directly.

Managed Code is the code that targets to common language runtime which is under foundation of .NET Framework. Managed Code will supply necessary things for CLR to provides services such as memory management, cross-language integration, handling security, lifetime control of objects, in short, it will look after your applications. All code based on IL (Intermediate Language) executes as managed code.

Garbage Collector will clean unused resources automatically, but can still call it explicitly. It will do finalizer in destructor of each object. The process of cleaning resources are done in a finalizer thread not a main thread.

Unmanaged Resources falls into two categories:
  1. Resources that are wrapped in a managed class (ie Bitmap, Font etc) but still need Dispose to be called to clean them up property.
  2. Resources that you allocated that are representations of native resources (ie device contexts that need to be released)
The propose of using dispose is we want to free both kinds of unmanged resources. Note that for the first kind of unmanged resources, the garbage collector will take care of them  when it have to clean them up. We only need to focus about true native resources that we have allocated (in case we have).

Monday, September 3, 2012

Quick Prototyper for Web and Mobile Apps

Take a loook at: http://www.justinmind.com/prototyper/free-edition. It's free and easy to use for prototype Mobile and Web Applications. It will be useful in case you want to show idea of your apps to others, want to make them understand look and feel of your apps in the same time, and want to avoid misunderstand and communication when deliver messages to others.

The following demo is the example of this program.

Thursday, July 26, 2012

How to temporary fix mouse cursor disappear in Google Chrome

Some of you may face this problem in Google Chrome that the mouse cursor will be dis appear when it stay idle just for seconds, and it will be appear again when it is moved. Moreover, it will be gone during drag a web content. So, this problem is very annoying. I, personally , don't know how this problem come from, but to fix this problem (may be just temporary fix) you need to kill process of plug-in "Shockwave Flash" task using Chrome Task Manager then your cursor will be like the old one you miss T^T.

Saturday, July 7, 2012

Silverlight Binding and StringFormat in XAML

This link is help a lot to know string format syntax in Silverlight Binding.

Tilt Effect in Windows Phone

Take a look at a following link, he clearly explained about the problem of tilt effect in Windows Phone Toolkit, and then how to use his effect in Windows Phone development in a pace.     

Monday, June 25, 2012

SQL Server Database Filegroup is Full; What, Why and How?

Take a look at http://learnsqlwithbru.com/2012/01/10/sql-server-database-filegroup-is-full-what-why-and-how/. The author stated it very clear. In short, the problem can be summarize into 3 cases: disable auto growth, data size is over the given limit, and not enough disk space available.

Sunday, June 17, 2012

How to configure FTP Server in Windows Server 208 R2



After that, you may need to config the Passive Port Range for FTP Service which you can follow this instruction. It will show you steps, and explain what they are.

Create Global Unique Identifier (GUID) in C#

Similar to the previous post, Microsoft introduced another standard called Global Unique Identifier to create a unique key in order to use in applications.
It is pretty much easy as following lines of code:
Guid id = new Guid();
id = Guid.NewGuid();
Console.WriteLine(id.ToString());
Now, you can enjoy creating GUID for your applications ^^.