Pages
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... |
Wednesday, June 29, 2011
Using Google App Engine as Proxy for Silverlight and Flash Cross-Domain Requests
Try this link, he explained important issues for doing it: http://gregdoesit.com/2010/12/using-google-app-engine-as-proxy-for-cross-domain-requests/.
Labels:
Internet Technology,
Programming,
Python,
Security,
Silverlight
Wednesday, June 22, 2011
Did you meant to say/did you mean to say
It must be "Did you mean to say" because meant is a past participle form of mean and did shows that this sentence is in the past.
Credit: http://www.englishforums.com/English/DidMeantMeanSay/ddkbn/post.htm
Credit: http://www.englishforums.com/English/DidMeantMeanSay/ddkbn/post.htm
Labels:
Language
Monday, June 20, 2011
Requiring HTTPS in ASP.NET MVC3
You can simply use RequireHttpsAttribute to your Action or Controller.
For Example:
More details at: http://weblogs.asp.net/dwahlin/archive/2009/08/25/requiring-ssl-for-asp-net-mvc-controllers.aspx, http://salvoz.com/blog/2009/04/25/partial-ssl-and-authorization-with-asp-net-mvc-revisited/
For Example:
[RequireHttps]
public ActionResult SignIn()
{
return View();
}
More details at: http://weblogs.asp.net/dwahlin/archive/2009/08/25/requiring-ssl-for-asp-net-mvc-controllers.aspx, http://salvoz.com/blog/2009/04/25/partial-ssl-and-authorization-with-asp-net-mvc-revisited/
Labels:
ASP.NET,
Internet Technology,
MVC,
Programming
Sunday, June 19, 2011
Lets vs let's
To let means to "allow".
Let him in. = Allow him to come in.
The word "let's" means "let us"
The first comes with the pronoun "us".
The second does not come with the pronoun "us".
She lets [allows] him to paint. = She allows him to paint.
So the rule is that when you mean let us, or allow us, or permits us, you use let's.
The following examples do not have the plural pronoun [us] contraction so no apostrophy is used.
She lets me paint. = She allows me to paint.
She lets them paint. = She allows them to paint.
She lets him or her paint. She allows him or her to paint.
Credit: http://www.englishforums.com/English/LetsVsLets/gnbh/post.htm from Radrook
Let him in. = Allow him to come in.
The word "let's" means "let us"
The first comes with the pronoun "us".
The second does not come with the pronoun "us".
She lets [allows] him to paint. = She allows him to paint.
So the rule is that when you mean let us, or allow us, or permits us, you use let's.
The following examples do not have the plural pronoun [us] contraction so no apostrophy is used.
She lets me paint. = She allows me to paint.
She lets them paint. = She allows them to paint.
She lets him or her paint. She allows him or her to paint.
Credit: http://www.englishforums.com/English/LetsVsLets/gnbh/post.htm from Radrook
Labels:
Language
Monday, June 13, 2011
The Purdue Online Writing Lab (OWL)
It may helpful for people who not use English as the first language. Check out this link: https://owl.english.purdue.edu/.
Labels:
Language
Saturday, June 11, 2011
Silverlight vs WPF
Check this link: http://stackoverflow.com/questions/2010452/silverlight-vs-wpf
Labels:
Internet Technology,
Programming,
Silverlight,
WPF
Saturday, May 28, 2011
Fetch Web Pages in Python using urllib2
urllib2 is an extensible library for opening URLs. Mostly, we will use fetch data from URLs via HTTP. We can use it to access normal Website, HTTP Authentication, Web Proxy, and etc. urllib2 is included in python standard library.
Example:
In the example, It use GET to fetch data. If you want to change it to POST, you have to put data attribute in the method.
The basic usage is "urllib2.urlopen(url[, data][, timeout])".
More details at: http://docs.python.org/library/urllib2.html
Example:
import urllib2
# Normal usage
f = urllib2.urlopen('http://wwww.google.com')
print f.read()
# Use under Proxy
auth_handler = urllib2.ProxyBasicAuthHandler(urllib2.HTTPPasswordMgrWithDefaultRealm())
auth_handler.add_password(realm=None,uri='proxy-name',user='username',passwd='password')
opener = urllib2.build_opener(auth_handler)
urllib2.install_opener(opener)
f = urllib2.urlopen('http://wwww.bing.com')
print f.read()
In the example, It use GET to fetch data. If you want to change it to POST, you have to put data attribute in the method.
The basic usage is "urllib2.urlopen(url[, data][, timeout])".
More details at: http://docs.python.org/library/urllib2.html
Labels:
Internet Technology,
Programming,
Python
Sunday, May 22, 2011
So You Think You Can Dance Online
So You Think You Can Dance is an American Dance reality show. It is broadcast on the Fox Channel. It's marvelous. I began to watch it since March via AXN Channel during vacation. Each competitor has a high standard in dancing, so it make me feel excited when I'm watching it.
Watch at: http://www.sidereel.com/So_You_Think_You_Can_Dance
Or you may download it directly using KeepVid, or Keep-Tube without any limitation from MegaUploadVideo. Enjoy watching ><!
Watch at: http://www.sidereel.com/So_You_Think_You_Can_Dance
Or you may download it directly using KeepVid, or Keep-Tube without any limitation from MegaUploadVideo. Enjoy watching ><!
Labels:
Videos
Wednesday, May 18, 2011
The differences between get and post method in HTTP
Sometimes, I confuse which method should be used in HTTP. Now, I have found the answer from http://wiki.answers.com.
The answer is here:
GET Method:
Read more: http://wiki.answers.com/Q/What_is_the_difference_between_get_and_post_method_in_HTTP
The answer is here:
GET Method:
- All the name value pairs are submitted as a query string in URL.
- It's not secured as it is visible in plain text format in the Lacation bar of the web browser.
- As the data transfers through address bar (URL) there are some restrictions in using space, some characters like ampersand (&) etc in the GET method of posting data. We have to take special care for encoding data if such special characters are present.
- Length of the string is restricted.
- If method is not mentioned in the Form tag, this is the default method used.
- If get method is used and if the page is refreshed it would not prompt before the request is submitted again.
- One can store the name value pairs as bookmark and directly be used while sharing with others - example search results.
- Data is always submitted in the form of text
- If the response of the page is always same for the posted query then use GET example database searches
POST Method:
- All the name value pairs are submitted in the Message Body of the request.
- Length of the string (amount of data submitted) is not restricted.
- Post Method is secured because Name-Value pairs cannot be seen in location bar of the web browser.
- If post method is used and if the page is refreshed it would prompt before the request is resubmitted.
- If the service associated with the processing of a form has side effects (for example, modification of a database or subscription to a service), the method should be POST.
- Data is submitted in the form as specified in enctype attribute of form tag and thus files can be used in FileUpload input box.
Read more: http://wiki.answers.com/Q/What_is_the_difference_between_get_and_post_method_in_HTTP
Labels:
Internet Technology
Subscribe to:
Posts (Atom)