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...

Monday, October 17, 2011

Install Linux on Your Mac

Read this article: http://www.maclife.com/article/howtos/install_linux_your_mac.

How to speed up Visual Studio 2010

According to the current version of Visual Studio, that is 2010. We can't deny that this version of Visual Studio is running slower when compared to the previous version (2008). So, I found some blogs wrote about the solution to improve Visual Studio 2010 running performance. I followed his steps, I think it should work for everyone else. Enjoy coding time!


Later, it seems like the link I posted is not exist already. So, I would tell the steps from my memory 555.

1. Go to options and click at Environment then look at startup tab. Select show empty environment.

2. Go to main environment tab, in Visual experience, deselect automatically adjust visual experience based on client performance then select Use hardware graphics acceleration if available.


3. Go to IntelliTrace tab, deselect enable IntelliTrace.


4. Go to Buld and Run tab under Projects and Solutions, check at Only build startup projects and dependencies on Run


Finally, I hope that it can help your Visual Studio run faster a bit ^^".

Sunday, October 9, 2011

Remapping the keyboard layout in Windows 7

For some reasons, you may want to change to keyboard layout, such as playing games, changing mac keyboard layout to be more comfortable when using Windows. Try this program Sharpkeys at: http://www.randyrants.com/2006/07/sharpkeys_211.html.
There are also other programs that do the same purpose at: http://vlaurie.com/computers2/Articles/remap-keyboard.htm.

Thursday, October 6, 2011

Useful Resources for developing Python GUI Applications with Tkinter

How to force a thread to stop when the main program has been closed in Python

Last week, I had done with Tkinter GUI programming, and that program requires a lot of processing power to crawl and parse web pages. So, when I was running the program, it was hang. The solution is using multi-threading, but I found a next problem that threads were not killed when the main program was closed. To stop threads, we need to set daemon thread letting the threads die when the program is terminated.
Thread.setDaemon()

Compile Python apps to .exe with py2exe

Normally, to run Python applications, we need to have a Python Interpreter. However, it's not always end in this way. If you are using Windows-based Operating Systems, you can compile your Python program to an executable file, and let other Windows-based users to use it without any of Python interpreter installation. You can download the py2exe from http://www.py2exe.org/ according to your Python version.

Examples:    A console application
print 'Hello World!'
 To compile console applications, create a setup.py file and then write the following code:  
from distutils.core import setup
import py2exe
setup(console=['hello.py'])
Then, terminal access is required for compiling process. Write it as the following code:
python setup.py py2exe
Next, py2exe will try to generate the executable file for running that Python program on Windows.   A GUI application
from Tkinter import *
app = Tk()
app.mainloop()
 GUI applications need to modify console application setup code a bit as the following commands:
from distutils.core import setup
import py2exe
setup(windows=['ui.py'])
Then, use the same command that I already mentioned above. In addition, py2exe tutorial can be looked for more information at: http://www.py2exe.org/index.cgi/Tutorial

Saturday, October 1, 2011

How to print percent sign in Python

Hahaha! until now, I still don't know how to print percent sign in Python yet because I haven't needed to use it. The solution is in your printout string, you need to put '%%' (concatenate percent signs). Then, the output will show the percent sign.

print 'Your accuracy is 80%%.' # Your accuracy is 80%.

Friday, September 23, 2011

Lexalytics: Text Analytics Software

     Lexalytics, Inc. builds text analytics software, and also libraries as well to deal with the natural text from human. It provides the software that can be used to take competitive advantages in businesses such as social media monitoring, marketing intelligence, voice of customers, and enterprise searching. The most interesting thing for me is Tripadvisor is a one of Lexalytics partner, which this website is the world largest travel site, enabling travelers plan and have a perfect trip. Tripadvisor offers trusted advice from real travelers to make beginner travelers plan a suitable solution for themselves.
     In my B.Sc. project, I built a software that have tried to extract sentiment of travelers in positive and negative based on various traveling aspects such as appearance, atmosphere, cleanliness, value, and etc. The hardest things for me are entity mapping, set of vocabularies with feeling for each concerned aspect, error of data, and topic separation. Many things of Lexalytics made me feel curious , and I have tried to study about NLP more at http://www.lexalytics.com/sentiment-extraction-measuring-emotional-tone-text.
     Later, I will summarize important information and write down on this blog.

Monday, September 5, 2011