Showing posts from January, 2011

Chrome - Revive Closed Tab

If you closed your chrome tab accidentally, you can restore your last tab wth Ctrl + Shift + T (PC/Linux) or Cmd + Shift + T (Mac)
But, it does not work if you accidentally close your whole browser!!

.Net Framework - How to check the version installed

.Net Framework is needed for Microsoft Application development. Sometime, you may want to find what is the latest version installed in your machine. You can checked it at
is the directory of your Window install path. Most of the time, it is C:\Windows
Inside this folder, it will have sub folders start with vXXXX, ie v3.5. The XXXX is the version installed and supported by your machine.

RTSP - Basic Authentication

RTSP authentication use the implementation of HTTP authentication specified at RFC2617.
In RFC 2068, HTTP/1.1 section 11, provide details for Basic and Digeste authorization. However, RFC 2068 is obsolete and it will be better to read RFC 2617.
This entry only talks about Basic Authentication for RTSP.
Before understanding Basic RTSP authentication, you have to understand Basic HTTP authentication.
HTTP/1.1 Basic Authorization
When client access an unauthorized page, a Unauthorized 401 should be returned to the client. More importantly, the following header should be returned
WWW-Authenticate: Basic realm=your_realm
You should replace your_realm with your own security realm. Also, for HTTP page, it is recommended to return a HTTP Unauthorized 401 content with simple HTML code
Upon receiving the response, the client should retry with a username and password.
The credential format is username:password and this credential is Base64 encoded. The encoded credential should be placed in the following…

Postgres - nonstandard use of \\ in a string error

If you see
WARNING: nonstandard use of \\ in a string literal HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
Changing all '\\' to E'\\' is a good solution.
However, it will be very tedious if you have a bunch of data. Worst case is when this happen to \n in Linux machine.
A faster fix will be as follow
1. Open postgresql.conf 2. Find #standard_conforming_strings=off. By default, it is commented out by # and set to off 3. Change it to standard_conforming_strings=on 4. Restart postgres
This will cause postgres to treat backslashes as normal character.
If you want postgres to treat backslashes as escape character after turning stardard_conforming_string to on, you must put an E in front. IE, E'this is \\n a string'