Today, I download a Linux version of QQ, a Deb file, but when I install it, I get an error : “version number does not start with digit”.
I search the internet and Google tells me the solution.
Today, I download a Linux version of QQ, a Deb file, but when I install it, I get an error : “version number does not start with digit”.
I search the internet and Google tells me the solution.
I couldn’t believe it was true when I recieved Dave’s email that told me I was a winner of the Udacity CS101 Contest and awarded an expenses-paid to Palo Alto, California. But it was true. Thanks to Udacity.
On Saturday 07 July, I arrived at San Francisco International Airport transiting via Vancouver BC, Canada. That was my first time to take a flight. It was fabulous.
Today, I spent a long time to find a bug. I read code, but finally I found the cause is that the character set of table is not correct.
Record this to avoid making the same mistake. Character set should always be set while a table is created. For MySQL, the syntax is:
Today, I find a vim plugin called vimrepress. So I install it and write this blog here.
Note: this blog is expired for it was for Wordpress. However currently this blog is built with Octopress instead of Wordpress.
Just record these steps for possible uses in the future.
Check the favicon of the website
Check the title and meta data: add description and keywords
Performance test, get the maximum concurrent access the website can bear
Database security check
Database backup configuration
Web server backup
Cache images, java script and css files.
Use gzip to compress web pages.
Use a dedicate domain name and server for images and other static files.
Customize your 404 not found page
Write the robots.txt file
Write the sitemap.xml file
Use optipng to compress png and gif files
Use jpegoptim to compress jpeg files
Use Google’s Chrome and PageSpeed plugin to optimize website’s speed
Use Google’s Webmaster Tools to find dead links and other errors in your pages.
There are many cases you need to use friendly url. If you are using Apache, tipcially you can activate the URL rewriting module and write some rewriting rules with .htaccess file; While if you are using Nginx, you can also write some rewriting rules. Both of them support regular expression, so it’s easy to translate from one to the other.
To translate from the Apache’s rewriting rule to the Nginx’s, simply do the following substitutions:
This is an adaptive color selector. It can dynamically choose which color of checkmark to use. When a light color is chosen, a black checkmark display; while when dark color is chosen, a white checkmark display.
Here is a screenshot.
In my previous blog, I wrote the code to replace all string in a file: http://leons.im/2011/02/replace-all-strings-in-a-file/. Today, I write a cooler code – It can replace all strings in many files, actually it can replace all strings in files that are in a same folder.
Unless you really want to use Block Formatting Context, it’s usually a good idea to clear the float.
I have got this error many times. Today, I dived into it and resolved it.
I use php-fpm and nginx on my server. Occasionally, I got 502 bad request error. When I check the nginx log, it says upstream sent too big header
. In my memory, the default buffer size if big enough. To make sure it’s not caused by this, I add the following lines to the nginx configuration file:
I received Certificate of Accomplishment with Highest Distinction, which the highest level of certificates, from Udacity for both CS101 (Introduction To Computer Science - Building A Search Engine) and CS373 (Programming a Robotic Car).
When I was a college student, I participated a contest of mathimatical model. It’s a physical problem, which I didn’t find the model to solve. While I am studying the Udacity’s class Progamming a Robotic Car, and when it comes to PID control, it occurs to me that it’s the model exactly to solve the contest’s problem!
PID control is really an interesting and excellent algorithm. The detail information can be found at Wikipedia. The main point is that the control system has 3 parts: the Proportional, the Integral and the Derivative.
The formular is:
\[u(t) = MV(t) = K_pe(t)+K_i\int_0^t \! {e(\tau) \, \mathrm{d}\tau}+K_d\dfrac{d}{dt}e(t)\]With Google Map API, you can do a lot of thing. Here I will use it to turn latitude and longitude into human-readable addresses.
Before I know CLOC, SourceCounter or Ohcount, I write this script.
I’m using vim while still using emacs.
Just record my .vimrc file here.
UPDATE: As Vensires mentions in the comment, this post is obsolete.
Usually, when we want to arrange some blocks horizontally with CSS, we may choose to use float: left;
property, or display: inline-block;
alternatively.
According to http://www.quirksmode.org/css/display.html, inline-block is not supported by IE 5.5 and it’s not completely supported by IE 6 and IE 7.
Let’s play an interesting Crack-me — muckis’s crackme #2.
When you run the crack-me with a debugger, say OllyDbg, the program pops up a message box saying “What the hell are you doing in my app with a debugger?” and then exists, but when you run the crack-me without a debugger, just double-click on it, it runs normally.
Recently, I’m reading pediy’s book: Encryption and Decryption
. This is a really good book with many practical technologies and skills, and it’s also very interesting. In Chapter 2, I met a problem, so I cracked the demo crack-me program with ollydbg, but I’m not satisfied with that, so I studied the encrytion algorithm and wrote a keygen program.
The main algorithm is very simple, but it took me a lot of time to deal with the multi-byte characters problems, and I found there is another defination of unicode on Microsoft’s platform! I can’t figure out why Micro$oft didn’t use UTF-8 to build his system just like Macintosh, because with UTF-8, we programmers don’t have to deal with these troubles at all. Anyway, Windows is such a snorty that most people still have to use it.
Why must login without password? Because it saves time and automizes tasks.