Unsorted
PHP編碼轉換方法
$url = "http://j-jis.com/"; $html = file_get_contents($url); $html = preg_replace("/rn|n|t/", "", $html); //remove unwanted characters $html = iconv("Shift_JIS","UTF-8",$html); //convert encoding echo $html;
Unsorted
$url = "http://j-jis.com/"; $html = file_get_contents($url); $html = preg_replace("/rn|n|t/", "", $html); //remove unwanted characters $html = iconv("Shift_JIS","UTF-8",$html); //convert encoding echo $html;
Unsorted
Usually while we extract information from other websites, character encoding might not correct. For example, j-jis.com is encoded with Shift-JIS. Therefore if your MySQL charset is UTF-8, it causes incorrect information. To handle the changing of character encoding, we can use iconv in PHP. $url = "http://j-jis.com/
Unsorted
$string = '你好嗎'; echo json_encode($string); //Output "u4f60u597du55ce" echo preg_replace("#u([0-9a-f]+)#ie", "iconv(‘UCS-2’, ‘UTF-8’, pack(‘H4’, ‘1’))", json_encode($string)); // Output "你好嗎"
Unsorted
Json has been an efficient way to handle information and message exchanges in web programming. For example, I usually use PHP to connect MySQL and retrieve information, then display as Json. So a webpage can “AJAX” the displayed Json to create a dynamic view on itself. However, while the information
Unsorted
To construct a website, from nothing to a pretty one, what is needed is not only technique, but also ideas. When I was young, I constructed my website with Microsoft Frontpage. Later, I uses Dreamwaver to handle coding, programming web functions with PHP and javascript. Now, I even start using
Unsorted
將一個網頁從零開始,製作成一個美觀,有實際用途的網站,要的不只是時間,精力,還要靈感。從少時候用MICROSOFT FRONTPAGE,到現在只用DREAMWAVER打HTML,甚至用TEMPLATES例如GRID SYSTEM去加快製作流程,現在大多時間都不再是花在TECHNIQUE上,而是DESIGN上。近來我正替人做一個蛋糕網,我專登留了一些截圖,看看製作網頁的變化(其實都只是一天的時間LOL)。好了,中文不好,打字又慢,不打了,要看就看英文版吧XD。謝!
Unsorted
合理膳食,有助於肌肉生長。近來網上看見這遍文章,加上我也在為自己增加一點肌肉,轉載過來為自己作個記錄和參考。 1.全脂奶: 如果你真得很難長重然而卻很渴望長肉,別喝脫脂、減脂牛奶!那些是給減肥的人用的。 16盎司的全脂奶提供16克蛋白質和16克脂肪。 和其他食物比較起來,牛奶中的脂肪一般都是短鏈的。 短鏈脂肪比較促合成,防止肌肉分解,而且它們比其他脂肪更不容易被儲存為體脂。 牛奶中的脂肪可以幫助身體吸收維生素D,減少癌症風險。 2.蘋果汁: 具有諷刺意味的是,瘋狂地去健身房其實是為了把肌肉撕裂,過後你會收穫,當你的身體開始修復,而且是超量恢復。 去健身前喝上12- 16盎司的蘋果汁可以提供45-60克碳水化合物並且迅速給你補充能量(因為果汁裡的葡萄糖),而且能量源源不斷(因為還含有果糖)。 這得以幫助抑制皮質醇,減少肌肉損傷,讓你可以訓練更多組。 3.白麵包: 你知道這一原則——少吃精細碳水化合物,因為相比粗糧它們含纖維素少、營養也少,而且提升胰島素水平。 很多時候是這樣的。 然後,白麵包對於剛鍛煉完的你確實非常好的。 因為你需要容易消化的碳水化合物來恢復你已經倒空的
Unsorted
My main website has been updated. Advertisements and a page for this blog is added. Anyway, I actually do not anticipate many income from the advertisements, as they are not CPC at all. I am still looking for some more advertising company to offer me CPC ads. Fingers crossed. XD
Unsorted
This is visual basic. Private Function TempPath() As String Const MaxPathLen = 256 ‘Max length of the path, just as big as possible Dim FolderName As String ‘Name of the folder Dim ReturnVar As Long ‘Return Value End Function To do so, you need to wrap the code between [sourcecode language=
Unsorted
Actually the development this website has been suspended for a while due to my busy life XD. Anyway just take a look and give me some comments. Link: http://nicholasworkshop.co.cc
Unsorted
Open default.smurfmap with Hex Editor from your Documents. Edit it according to the screenshot. PS. This is only for version 1.0.0.
Unsorted
Feeling sick with your FAT32 portable harddisk which cannot store files bigger than 4G? Use ExFAT. Currently the most updated stable version of Mac OSX is 10.6.4. And it doesn’t support ExFAT formatting (except some models of Macintosh). The next version, however, support ExFAT. These days, I