<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.6.5" -->
<rss version="0.92">
<channel>
	<title>Đỗ Nam Khánh weblog</title>
	<link>http://donamkhanh.com</link>
	<description>Tích góp kinh nghiệm - Nhặt nhạnh kỹ năng...</description>
	<lastBuildDate>Sat, 13 Jun 2009 06:09:35 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Create short IDs with PHP - Like Youtube or TinyURL</title>
		<description><![CDATA[IDs are often numbers. Unfortunately there are only 10 digits to work with, so if you have a lot of records, IDs tend to get very lengthy. For computers that&#8217;s OK. ButOther title options where

How to create unique short string IDs with PHP &#38; MySQL
 Or how to create IDs similar to YouTube e.g. yzNjIBEdyww

I [...]]]></description>
		<link>http://donamkhanh.com/2009/06/13/create-short-ids-with-php-like-youtube-or-tinyurl.html</link>
			</item>
	<item>
		<title>PHP Fatal error</title>
		<description><![CDATA[Trong 1 dự án gặp đến 2 lỗi có thể nói là nghiêm trọng  

Cannot use object of type __PHP_Incomplete_Class as array
406 Not Acceptable

Lỗi thứ nhất &#8220;thường&#8221; xảy ra ở khu vực tương tự như sau:

[-]?View Code PHP1
2
3
4
5
6
   $user = isset&#40;$_SESSION&#91;'user'&#93;&#41;?$_SESSION&#91;'user'&#93;:'';
   if &#40;$user&#91;'user_id'&#93;&#60;0 &#124;&#124; $user&#91;'user_id'&#93; == ''&#41;
   &#123;
 [...]]]></description>
		<link>http://donamkhanh.com/2009/04/13/php-fatal-error.html</link>
			</item>
	<item>
		<title>is_dir vs file_exists</title>
		<description><![CDATA[Hôm nay ở cty anh Linh đã hỏi có ai biết hàm kiểm tra thư mục đã tồn tại hay chưa không? (anh ấy đang làm cái liên quan đến theme thì phải :-?). Theo phản xạ tôi bật ngay ra hàm is_dir, ngay lúc đấy chỉ biết hàm is_dir là kiểm tra xem tên [...]]]></description>
		<link>http://donamkhanh.com/2009/03/17/is_dir-vs-file_exists.html</link>
			</item>
	<item>
		<title>&#8220;Một nghề cho chín còn hơn chín nghề&#8221;</title>
		<description><![CDATA[Tự nhiên lại nhớ đến blog của Thái nên vào &#38; đọc được 1 bài khá thú vị. Nó đã giúp &#8220;chỉnh đốn&#8221; lại phần nào tư tưởng của mình trong thời gian khó khăn này  
người ta nói, cách tốt nhất để ăn một con voi, là ăn một miếng thịt của nó [...]]]></description>
		<link>http://donamkhanh.com/2009/01/18/mot-nghe-cho-chin-con-hon-chin-nghe.html</link>
			</item>
	<item>
		<title>SELECT BINARY trong MySQL</title>
		<description><![CDATA[Hôm nay được chị tester thông báo 1 bug: Khi user login thì hệ thống không phân biệt username &#38; password dạng chữ hoa, chữ thường  
Câu query chỉ đơn giản là:

[-]?View Code SQL1
2
3
4
SELECT user_login	
FROM sys_user 
WHERE user_login = '$user_login' 
          AND user_passwd = '$password'

Hóa [...]]]></description>
		<link>http://donamkhanh.com/2009/01/05/select-binary-trong-mysql.html</link>
			</item>
	<item>
		<title>Generate data</title>
		<description><![CDATA[Trước đây từng hơi bí với việc test performance với lượng dữ liệu lớn vì phía khách hàng họ &#8220;gợi ý&#8221; là dữ liệu tuy là để test nhưng cũng phải &#8220;đẹp&#8221; nữa, và họ không thích kiểu tên nhân viên có dạng như: employee 1, employee 2&#8230;
Hôm qua chả hiểu lang thang thế nào [...]]]></description>
		<link>http://donamkhanh.com/2008/12/21/generate-data.html</link>
			</item>
	<item>
		<title>Accept only positive number using Jquery</title>
		<description><![CDATA[Có thể sử dụng Event Handling hoặc Event Helper. Tất nhiên là sử dụng Event Helper thì ngắn hơn rồi  

[-]?View Code JAVASCRIPT1
2
3
4
5
6
7
8
9
10
11
//when key is pressed in the textbox
$&#40;&#34;#quantity&#34;&#41;.keypress&#40;function &#40;e&#41;
&#123;
  //if the letter is not digit then display error and don't type anything
  if&#40; e.which!=8 &#38;&#38; e.which!=0 &#38;&#38; &#40;e.which&#60;48 &#124;&#124; e.which&#62;57&#41;&#41;
  [...]]]></description>
		<link>http://donamkhanh.com/2008/12/20/accept-only-positive-number-using-jquery.html</link>
			</item>
	<item>
		<title>General Style and Syntax in CodeIgniter</title>
		<description><![CDATA[http://codeigniter.com/user_guide/general/styleguide.html
Tạm đặt cái title đã, còn nhiều vấn đề với thằng này  
PHP Closing Tag
Trong PHP có thể bỏ qua thẻ đóng ?>, điều này tránh được những lỗi vớ vẩn do bị output thừa  Cái này chuẩn, không có gì phải bàn cả. Tuy nhiên 1 số IDE hơi man mát, phải [...]]]></description>
		<link>http://donamkhanh.com/2008/11/24/general-style-and-syntax-in-codeigniter.html</link>
			</item>
	<item>
		<title>Cài font Windows cho Ubuntu</title>
		<description><![CDATA[Dùng 1 trong 2 cách sau:

Chép các fonts windows vào thư mục /usr/share/fonts/truetype
sudo apt-get install msttcorefonts

Khởi động lại hoặc dùng lệnh sudo fc-cache   -fv










]]></description>
		<link>http://donamkhanh.com/2008/10/31/cai-font-windows-cho-ubuntu.html</link>
			</item>
	<item>
		<title>Lấy bảng dự báo thời tiết</title>
		<description><![CDATA[Dễ lắm  Ngày xửa ngày xưa thì dùng đoạn Javascript của bên Vnexpress.net. Nhưng giờ ít ai dùng cái đó nữa vì nó quá đơn giản. Thế nên sẽ lấy ở các nguồn khác thôi. Chung quy lại, là nên lấy của thằng Trung tâm khí tượng thủy văn Việt Nam (http://www.nchmf.gov.vn) là chuẩn [...]]]></description>
		<link>http://donamkhanh.com/2008/10/10/lay-bang-du-bao-thoi-tiet.html</link>
			</item>
</channel>
</rss>
