<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2574493011919476762</id><updated>2011-09-11T22:10:01.658+08:00</updated><category term='ACL'/><category term='Checkbox'/><category term='Train'/><category term='PHP'/><category term='Access'/><category term='MySQL'/><category term='UTP'/><category term='CSS'/><category term='Chrome'/><category term='html5'/><category term='Daily'/><category term='Javascript'/><category term='iframe'/><category term='Wifi'/><category term='EasyPHP'/><category term='HTML'/><category term='mod_rewrite'/><category term='Opera'/><category term='Apache'/><category term='Programming'/><category term='LAN'/><category term='CakePHP'/><title type='text'>FROM ANOTHER ANGLE</title><subtitle type='html'>From what i know, what i see, what i think, share with you all. You are welcome, as long as you are open-minded enough.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-2189117313891961967</id><published>2011-08-09T08:12:00.000+08:00</published><updated>2011-08-09T08:12:18.354+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><title type='text'>MYSQL - mysql_real_escape_string error</title><content type='html'>&lt;blockquote&gt;Warning: mysql_real_escape_string() [function.mysql-real-escape- string]: Access denied for user 'SYSTEM'@'localhost' (using password: ..........&amp;nbsp;&lt;/blockquote&gt;&lt;br /&gt;If we have encountered the problem above, make sure we have made connection to the database before using the mysql_real_escape_string() function.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-2189117313891961967?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/2189117313891961967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=2189117313891961967&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/2189117313891961967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/2189117313891961967'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/08/mysql-mysqlrealescapestring-error.html' title='MYSQL - mysql_real_escape_string error'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-7935709407915863208</id><published>2011-07-14T17:12:00.001+08:00</published><updated>2011-07-14T17:13:32.362+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><title type='text'>CakePHP preg_match Error</title><content type='html'>&lt;blockquote&gt;Warning (2): preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash...&lt;/blockquote&gt;If you have met a warning similar with above, you will have to check on the $pattern of the preg_match() function. According to &lt;a href="http://www.php.net/manual/en/regexp.reference.delimiters.php"&gt;php manual&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;When using the PCRE functions, it is required that the pattern is enclosed by delimiters. A delimiter can be any non-alphanumeric, non-backslash, non-whitespace character.&amp;nbsp;&lt;/blockquote&gt;&lt;br /&gt;So if your $pattern is a pure alphanumeric string,you will need to enclose the $pattern with delimiters such as / , or # or etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-7935709407915863208?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/7935709407915863208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=7935709407915863208&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/7935709407915863208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/7935709407915863208'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/07/cakephp-pregmatch-error.html' title='CakePHP preg_match Error'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-4940158141702191225</id><published>2011-06-27T16:22:00.000+08:00</published><updated>2011-06-27T16:22:15.019+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><category scheme='http://www.blogger.com/atom/ns#' term='ACL'/><title type='text'>CakePHP Update ACL</title><content type='html'>Let's say we have created new controller(s). For authentication and security purposes, we will need to update the acl. If we are lazy to go through the bake cake console, we can try the following steps:&lt;br /&gt;&lt;br /&gt;1. In initDb() function under controllers/acls_controller.php, defined the user groups properly. (the actions allowed/denied for each user group) Save the file.&lt;br /&gt;2. Comment all functions/variables besides the Auth-related, in app/app_controller.php. (To make sure that initDb() will be executed).&lt;br /&gt;3. In the web browser, type the url and launch it:&lt;br /&gt;{address}/acls/initdb&lt;br /&gt;4. Uncomment functions/variables in app/app_controller.php, if they were commented just now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-4940158141702191225?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/4940158141702191225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=4940158141702191225&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4940158141702191225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4940158141702191225'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/06/cakephp-update-acl.html' title='CakePHP Update ACL'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-8912538977363397359</id><published>2011-06-22T10:36:00.000+08:00</published><updated>2011-06-22T10:36:37.069+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><title type='text'>CakePHP - Parse Data From Controller To View</title><content type='html'>Let's say $a = '123', in index() in users_controller.&lt;br /&gt;If we want to use the $a in users/index, we can use set() and compact():&lt;br /&gt;&lt;br /&gt;$this-&amp;gt;set(compact('a'));&lt;br /&gt;&lt;br /&gt;*set() : Send data from controller to view.&lt;br /&gt;**compact() : Creates an array containing variables and their values.&lt;br /&gt;***Note that we need to remove the dollar($) sign when using compact().&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;1.&amp;nbsp;&lt;a href="http://www.littlehart.net/atthekeyboard/2007/08/07/stupid-cakephp-controller-tricks"&gt;Stupid CakePHP Controller Tricks&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://book.cakephp.org/view/978/Interacting-with-Views"&gt;Interacting with Views&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-8912538977363397359?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/8912538977363397359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=8912538977363397359&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/8912538977363397359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/8912538977363397359'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/06/cakephp-parse-data-from-controller-to.html' title='CakePHP - Parse Data From Controller To View'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-54009830273538725</id><published>2011-06-20T18:03:00.001+08:00</published><updated>2011-06-21T10:02:50.735+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><title type='text'>CakePHP Trap: findAllBy() and find('all', ...)</title><content type='html'>&lt;strike&gt;I have a variable $productId. Comparing these two functions:&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;1. $pricelists = $this-&amp;gt;PricesProduct-&amp;gt;find('all',array('conditions'=&amp;gt;array('PricesProduct.id'=&amp;gt;$productId)));&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;$pricelists = $this-&amp;gt;paginate('PricesProduct',$pricelists);&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;2. $pricelists = $this-&amp;gt;PricesProduct-&amp;gt;findAllByProductId($productId);&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;$pricelists = $this-&amp;gt;paginate('PricesProduct',$pricelists); &lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;If $productId = 1, the 2nd function will generate error but not for the 1st function.&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;strike&gt;Warning (512): SQL Error: 1054: Unknown column 'PricesProduct' in 'where clause' [CORE/cake/libs/model/datasources/dbo_source.php, line 684]&amp;nbsp;&lt;/strike&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;strike&gt;Warning (2): Invalid argument supplied for foreach() [APP/views/...]&amp;nbsp;&lt;/strike&gt;&lt;/blockquote&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;Why?&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;I dont know the reason, but from the logs, two similar functions generated different sql codes:&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;For the 1st function:&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;1.&amp;nbsp; SELECT ... WHERE `PricesProduct`.`id` = 1, &lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;which then generate normal sql code:&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;SELECT COUNT(*) AS ... &amp;nbsp;WHERE 1 = 1&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;For the 2nd function:&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;1. SELECT ... WHERE `PricesProduct`.`product_id` = 1,&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;which then generate the following problematic sql code:&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;SELECT COUNT(*) AS ... WHERE ((PricesProduct IN ('28', '1', '13' .....&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;I guess that findAllBy() is unable to generate a key for the find result, causing all data to be fed into the coming functions.&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;Therefore, it is advised to avoid using findAllBy() although it may have saved some programming time, yet it increase the risk of having to waste more time on debugging.&lt;/strike&gt;&lt;br /&gt;&lt;strike&gt;&amp;nbsp;&lt;/strike&gt;&lt;br /&gt;Sorry, it's my mistake that i myself is confused with two different functions that cause different result.&lt;br /&gt;So, there is currently no trap in cakephp!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-54009830273538725?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/54009830273538725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=54009830273538725&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/54009830273538725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/54009830273538725'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/06/cakephp-trap-findallby-and-findall.html' title='CakePHP Trap: findAllBy() and find(&apos;all&apos;, ...)'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-7771162387946190775</id><published>2011-06-13T17:15:00.000+08:00</published><updated>2011-06-13T17:15:04.247+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><title type='text'>CakePHP Login Redirection</title><content type='html'>Let's said we want page to be redirected to Reservation index page after a User's login to the website, we can therefore create the login redirection in the beforeFilter() function in UsersController:&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;blockquote&gt;$this-&amp;gt;Auth-&amp;gt;loginRedirect = array('controller'=&amp;gt;'reservations', 'action'=&amp;gt;'index');&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&amp;nbsp;&lt;/blockquote&gt;And, i really need to shout at CakePHP for having such a lousy documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-7771162387946190775?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/7771162387946190775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=7771162387946190775&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/7771162387946190775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/7771162387946190775'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/06/cakephp-login-redirection_13.html' title='CakePHP Login Redirection'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-8169260073258801520</id><published>2011-06-09T14:35:00.000+08:00</published><updated>2011-06-09T14:35:11.251+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>CakePHP Drop Down List - Same value for 'keys' and 'values'</title><content type='html'>By default, when we use the form helper to generate a [select] drop down list, the [value] of each [option] is the [id] of the particular table. However, we sometimes need to have [value] which is the same as the content of the [option], therefore we will need to use array_combine() function.&lt;br /&gt;&lt;br /&gt;We can do in such a way:&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;$array1=array_combine($array1, $array1)&lt;/blockquote&gt;$array1 is an array of data. The first parameter will go to be the [key] of the new array and the second parameter will go to be the [value] of the new array, thus making both the [key] and the [value] of the new array having the same value.&lt;br /&gt;&lt;br /&gt;Let's said :&lt;br /&gt;$array1(&lt;br /&gt;[1] =&amp;gt; a&lt;br /&gt;[3] =&amp;gt; b&lt;br /&gt;[4] =&amp;gt; c&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;After using the array_combine() function, the $array1 becomes:&lt;br /&gt;$array1(&lt;br /&gt;[a] =&amp;gt; a&lt;br /&gt;[b] =&amp;gt; b&lt;br /&gt;[c] =&amp;gt; c&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;1.&amp;nbsp;&lt;a href="http://cakephp.1045679.n5.nabble.com/FormHelper-Setting-Option-Value-in-Select-Dropdown-td1310991.html"&gt;FormHelper - Setting Option Value in Select Dropdown&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://php.net/manual/en/function.array-combine.php"&gt;php.net - array-combine&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-8169260073258801520?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/8169260073258801520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=8169260073258801520&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/8169260073258801520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/8169260073258801520'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/06/cakephp-drop-down-list-same-value-for.html' title='CakePHP Drop Down List - Same value for &apos;keys&apos; and &apos;values&apos;'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-6000273134821105588</id><published>2011-05-23T11:19:00.001+08:00</published><updated>2011-05-23T11:20:40.094+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><title type='text'>Disabling CakePHP Auto Escape In Helpers</title><content type='html'>As we know, CakePHP will automatically escape special characters to sanitize the data.&lt;br /&gt;Sometimes we do not want to escape the special characters, for example "Textarea" inputs, or some inline javascript (eg: onclick= "return function (&lt;span style="background-color: yellow;"&gt;'&lt;/span&gt;xxxx&lt;span style="background-color: yellow;"&gt;'&lt;/span&gt;)" when we are using form/html helpers.&lt;br /&gt;For these reasons, we can declared&lt;br /&gt;&lt;blockquote&gt;'escape'=&amp;gt;false&lt;/blockquote&gt;&lt;br /&gt;in the $options (or $attribute ??) array.&lt;br /&gt;As a result, the special characters in html code will be preserved.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;blockquote&gt;echo $html-&amp;gt;tableCells &amp;nbsp; &amp;nbsp;(array &amp;nbsp; &amp;nbsp;(array &amp;nbsp; &amp;nbsp;($form-&amp;gt;checkbox('Checkbox1', array &amp;nbsp; &amp;nbsp;('escape'=&amp;gt;false,'onlick'=&amp;gt;'return checkbox(\'CheckboxCheckbox1\')')) .....&amp;nbsp;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/5455873/cakephp-1-3-disabled-htmlspecialchar-in-textarea"&gt;Look for the first reply of the article.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-6000273134821105588?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/6000273134821105588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=6000273134821105588&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/6000273134821105588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/6000273134821105588'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/05/disabling-cakephp-auto-escape-in.html' title='Disabling CakePHP Auto Escape In Helpers'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-5715604408767797140</id><published>2011-05-19T16:36:00.004+08:00</published><updated>2011-05-19T16:37:37.065+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Checkbox'/><title type='text'>CakePHP - Matching Multiple Checkbox Inputs With Join/Cross Tables Without Magic</title><content type='html'>Given the situation: A `trainee` wants to select available time for courses. We have Table `days` and Table `sessions`, having a join table `days_sessions`. Each `days` may have 3 `sessions`, and &amp;nbsp;can select multiple `days` in the form. In the end, we end up with another join table like `trainees_days_sessions`&lt;br /&gt;&lt;br /&gt;1. We have predefined data in `days_sessions`, e.g. Monday morning - 'MonM', Tuesday night - 'TueN', etc.&lt;br /&gt;2. In the form we have checkboxes for each `days_sessions`. We may code it as&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Input type='checkbox' id='data[DaySession][DaySession][]' name='data[DaySession][DaySession][]' value='*'/&lt;/blockquote&gt;&lt;br /&gt;Note that the `id` must be coded in such a way of &lt;span style="background-color: yellow;"&gt;data[model_name][model_name][]&lt;/span&gt; (as defined in your model), while the value (* sign) must be the &lt;span style="background-color: yellow;"&gt;`id` column&lt;/span&gt; in `days_sessions` table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-5715604408767797140?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/5715604408767797140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=5715604408767797140&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/5715604408767797140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/5715604408767797140'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/05/cakephp-matching-multiple-checkbox.html' title='CakePHP - Matching Multiple Checkbox Inputs With Join/Cross Tables Without Magic'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-799012598912841297</id><published>2011-05-12T09:46:00.000+08:00</published><updated>2011-05-14T04:27:32.809+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Port'/><title type='text'>Bake Cake MySQL error</title><content type='html'>If you have come across to warnings like&lt;br /&gt;&lt;blockquote&gt;Warning: mysql_connect(): [2002] No connection could be made because the target machine actively &lt;try connect="" localhost:3306="" tcp:="" to="" via=""&gt; in ...cake\libs\model\datasources\dbo\dbo_mysql.php on line...&lt;/try&gt;&lt;/blockquote&gt;&lt;blockquote&gt;PHP Warning: mysql_connect(): No connection could be made because the target machine actively refused it. in ...cake\libs\model\datasources\dbo\dbo_mysql.php on line ...&amp;nbsp;&lt;/blockquote&gt;And etc. Can try the following solution below:&lt;br /&gt;&lt;br /&gt;1. Open php.ini&lt;br /&gt;2. Look for the mysql.default_port, set it to the number accordingly, e.g.&lt;br /&gt;&lt;em&gt;mysql.default_port = 3306&amp;nbsp;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-799012598912841297?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/799012598912841297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=799012598912841297&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/799012598912841297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/799012598912841297'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/05/bake-cake-mysql-error.html' title='Bake Cake MySQL error'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-8446157416682791852</id><published>2011-05-12T09:34:00.000+08:00</published><updated>2011-05-14T04:27:32.865+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Fatal Error While Baking Cakes</title><content type='html'>&lt;blockquote&gt;Fatal error: Call to undefined function mysql_connect() in C:\...\cake\libs\model\datasources\dbo\dbo_mysql.php on line 600'&lt;/blockquote&gt;If you are using easyphp and have met this fatal error when baking cakes, can try this:&lt;br /&gt;1. Copy &lt;span style="background-color: yellow;"&gt;php.ini&lt;/span&gt; from [easyphp]\apache to [easyphp]\php.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/828899/cakephp-problem-bake-views-easyphp-mysql"&gt;Look for reply from &lt;em&gt;andrej&lt;/em&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-8446157416682791852?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/8446157416682791852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=8446157416682791852&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/8446157416682791852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/8446157416682791852'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/05/fatal-error-while-baking-cakes.html' title='Fatal Error While Baking Cakes'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-711133014403894341</id><published>2011-05-12T09:11:00.000+08:00</published><updated>2011-05-14T04:27:32.478+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><title type='text'>Bake Cake with PHP in windows</title><content type='html'>In my case, i am using Windows 7.&lt;br /&gt;&lt;br /&gt;1. Open cmd&lt;br /&gt;2. CD to php directory&lt;br /&gt;e.g. c:\program files\easyphp\&lt;span style="background-color: yellow;"&gt;php&lt;/span&gt;&lt;br /&gt;3. Bake the cake using php.exe.&lt;br /&gt;e.g. c:\program files\easyphp\php&lt;span style="background-color: yellow;"&gt;\php.exe "c:\[your localhost+project name]&lt;your localhost=""&gt;\cake\console\cake.php" bake&lt;/your&gt;&lt;/span&gt;&lt;br /&gt;4. Start baking the cake!&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;http://kodegeek.wordpress.com/2009/06/13/how-to-bake-on-windows-xampp-environment/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-711133014403894341?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/711133014403894341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=711133014403894341&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/711133014403894341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/711133014403894341'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/05/bake-cake-with-php-in-windows.html' title='Bake Cake with PHP in windows'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-3499488066839214928</id><published>2011-05-10T10:50:00.002+08:00</published><updated>2011-05-10T10:54:25.326+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><title type='text'>First Attempt With CakePHP</title><content type='html'>Currently learning from the IBM tutorial:&lt;br /&gt;&lt;a href="http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake1/index.html"&gt;Cook up Web sites fast with CakePHP, Part 1: Getting started&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I am using easyphp, and is go to set up the new cake as a production installation.&lt;br /&gt;&lt;br /&gt;Several important steps:&lt;br /&gt;1. In httpd.conf, &lt;b&gt;set document root&lt;/b&gt; to:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="background-color: yellow;"&gt;DocumentRoot "${path}/www/cakephp/app/webroot"&lt;/span&gt;&lt;span style="background-color: yellow;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;2. Also in httpd.conf, also &lt;b&gt;set document root directory&lt;/b&gt; to&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;directory "${path}="" app="" cakephp="" webroot"="" www=""&gt;Directory "${path}/www/cakephp/app/webroot"&amp;nbsp;&lt;/directory&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&amp;nbsp;AllowOverride All&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;3. &lt;b&gt;Setting up the database configuration&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;Copy and rename the "app/config/database.php.default" into "&lt;span style="background-color: yellow;"&gt;app/config/database.php&lt;/span&gt;" and edit accordingly.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;4. &lt;b&gt;Create a user mode&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;l:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;Create the file as "&lt;span style="background-color: yellow;"&gt;app/model/user.php&lt;/span&gt;" (or whatever name, as long as know how to handle)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;5. &lt;b&gt;Create a register view&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;Create the file as "&lt;span style="background-color: yellow;"&gt;app/views/users/register.ctp&lt;/span&gt;"&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;6. &lt;b&gt;Create a controller and register action&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;Create the file as "&lt;span style="background-color: yellow;"&gt;app/controller/users_controller.php&lt;/span&gt;".&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;7. &lt;b&gt;Bake it:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: #f3f3f3;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="background-color: yellow;"&gt;&lt;span style="background-color: white;"&gt;Go to the url: "&lt;span style="background-color: yellow;"&gt;http://localhost/users/register&lt;/span&gt;".&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-3499488066839214928?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/3499488066839214928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=3499488066839214928&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3499488066839214928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3499488066839214928'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/05/first-attempt-with-cakephp.html' title='First Attempt With CakePHP'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-3324738853598901985</id><published>2011-05-09T12:58:00.000+08:00</published><updated>2011-05-09T12:58:20.012+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CakePHP'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_rewrite'/><category scheme='http://www.blogger.com/atom/ns#' term='EasyPHP'/><title type='text'>CakePHP, EasyPHP and mod_rewrite</title><content type='html'>For a standard EasyPHP package, mod_rewrite is off in httpd.conf.&lt;br /&gt;As using CakePHP requires the mod_rewrite, we will need to modify the httpd.conf of EasyPHP by just, &lt;strong&gt;uncomment it.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;#&lt;/span&gt;LoadModule rewrite_module modules/mod_rewrite.so&amp;nbsp;&lt;/strong&gt;-&amp;gt; remove the hash&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-3324738853598901985?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/3324738853598901985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=3324738853598901985&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3324738853598901985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3324738853598901985'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/05/cakephp-easyphp-and-modrewrite.html' title='CakePHP, EasyPHP and mod_rewrite'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-4274686096903401328</id><published>2011-05-03T12:30:00.000+08:00</published><updated>2011-05-03T12:30:40.290+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='Opera'/><title type='text'>Switching Back To Opera Again</title><content type='html'>Since switching over to Chrome 15 months ago, now finally come back to Opera.&lt;br /&gt;&lt;br /&gt;Opera 10 series, for me is quite a failure which contributes to the switch over, particularly in web compatibilities and extremely slow javascript execution speed as compared to chrome. (Or maybe i should say it is the result of following the protocols and procedures 100%?)&lt;br /&gt;&lt;br /&gt;But now, Opera 11 is just as nice as Chrome, so it's time for me to come back to Opera again.&lt;br /&gt;&lt;br /&gt;A major weakness for both web browsers:&lt;br /&gt;&lt;br /&gt;Chrome 10: Sometimes will still crash when visiting some websites that contain flash applications.&lt;br /&gt;&lt;br /&gt;Opera 11: Speed is still lacking a bit compared to chrome, but is very much faster than opera 10.&lt;br /&gt;&lt;br /&gt;And don't ask/suggest me to use IE or Firefox unless they are proven...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-4274686096903401328?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/4274686096903401328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=4274686096903401328&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4274686096903401328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4274686096903401328'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/05/switching-back-to-opera-again.html' title='Switching Back To Opera Again'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-3043163201784897040</id><published>2011-04-21T18:49:00.001+08:00</published><updated>2011-04-21T18:49:49.111+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LAN'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Using Apache As Server In A Local Area Network (LAN)</title><content type='html'>Let's said, you have set up server for LAN usage only. If you have ever come across to a page stating "Could not connect to remote server" or alike, can try out this solution.&lt;br /&gt;&lt;br /&gt;1. Open the apache configuration file, httpd.conf.&lt;br /&gt;2. Go to the section that configure the ip address.&lt;br /&gt;3. Make sure it listen to the server's ip (not 127.0.0.1)&lt;br /&gt;eg. Server's ip is 192.168.x.x using port 80, the make sure you have the following line :&lt;br /&gt;&lt;br /&gt;Listen 192.168.x.x:80&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-3043163201784897040?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/3043163201784897040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=3043163201784897040&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3043163201784897040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3043163201784897040'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/04/using-apache-as-server-in-local-area.html' title='Using Apache As Server In A Local Area Network (LAN)'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-2137706938405132106</id><published>2011-04-18T17:31:00.000+08:00</published><updated>2011-04-18T17:31:13.176+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>Time Wasted On Nested Javascript Functions With onSubmit()</title><content type='html'>I want to create nested Javascript functions for my onSubmit() validation. However, it seems that my skill is still not there yet, (or there is javascript rendering problem in Opera?) where the form is still submitted even though the value returned for the onSubmit() is false.&lt;br /&gt;&lt;br /&gt;So, the solution is: &lt;br /&gt;Use back the old school method -- &lt;b&gt;Structured programming without calling of nested functions!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;And several hours has been wasted...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-2137706938405132106?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/2137706938405132106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=2137706938405132106&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/2137706938405132106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/2137706938405132106'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/04/time-wasted-on-nested-javascript.html' title='Time Wasted On Nested Javascript Functions With onSubmit()'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-4333809372920034494</id><published>2011-04-13T17:33:00.000+08:00</published><updated>2011-04-13T17:33:39.604+08:00</updated><title type='text'>Internet Explorer 7 Failed To Render Simple Javascript and HTML DOM</title><content type='html'>Speechless, where i can use the same portion of code successfully in Opera, Chrome, Firefox and Safari...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-4333809372920034494?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/4333809372920034494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=4333809372920034494&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4333809372920034494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4333809372920034494'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/04/internet-explorer-7-failed-to-render.html' title='Internet Explorer 7 Failed To Render Simple Javascript and HTML DOM'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-1442698747690064240</id><published>2011-04-12T18:21:00.001+08:00</published><updated>2011-04-12T18:22:00.315+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>CSS in PHP file</title><content type='html'>To enable css effects in a php file, just remember to declare !DOCTYPE (for HTML5) and HTML tag inside the php file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-1442698747690064240?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/1442698747690064240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=1442698747690064240&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/1442698747690064240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/1442698747690064240'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/04/css-in-php-file.html' title='CSS in PHP file'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-5412706624117077979</id><published>2011-04-12T16:15:00.002+08:00</published><updated>2011-04-12T16:17:26.700+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='html5'/><category scheme='http://www.blogger.com/atom/ns#' term='iframe'/><title type='text'>HTML5 iframes line up horizontally</title><content type='html'>Feel troublesome when want to have several iframes lining-up horizontally? Because at least one of the iframes will move to the next row?&lt;br /&gt;&lt;br /&gt;Solution: &lt;b&gt;Make sure that the sum of iframes' "width" is less than 100%.&lt;/b&gt; (only applicable if you are using percentage for the width)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-5412706624117077979?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/5412706624117077979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=5412706624117077979&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/5412706624117077979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/5412706624117077979'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/04/html5-iframe.html' title='HTML5 iframes line up horizontally'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-6372393748489145693</id><published>2011-04-12T10:48:00.004+08:00</published><updated>2011-04-12T11:10:28.381+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Access'/><title type='text'>To Convert Microsoft Access Table Into MySQL Table - Part 2</title><content type='html'>There are some common practices to be done when doing this type of conversion:&lt;br /&gt;&lt;br /&gt;1. Before converting Access file into CSV file, make sure&lt;br /&gt;a) Data does not contain any &lt;b&gt;backslash (\)&lt;/b&gt; and &lt;b&gt;semicolon (;)&lt;/b&gt; -- programming common sense. &lt;br /&gt;b) Be careful of the usage of any special characters, because utf8_bin will not recognize it.&lt;br /&gt;c) In Access, when changing column of "Currency", it's better to change into "Text" but not "Number" because the decimal of the data will be removed when changing into "Number" whereas the decimal of data will still be kept if it is changed into "Text".&lt;br /&gt;&lt;br /&gt;2. If using phpMyAdmin and MySQL, make sure&lt;br /&gt;a) The format of date/datetime/timestamp and the number/currency/float/decimal in the Access file is compatible with the field formats in the MySQL table -- otherwise you will get something like 0000-00-00 00:00:00 for your datetime, or $123.00 in your price/amount field.&lt;br /&gt;b) My suggestion is to set the date/time into text/varchar format for the conversion, and later change them into date/time format in MySQL using php, and so with the number/currency field.&lt;br /&gt;&lt;br /&gt;3. Try to play with it, and you will know what i am talking about.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-6372393748489145693?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/6372393748489145693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=6372393748489145693&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/6372393748489145693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/6372393748489145693'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/04/to-convert-microsoft-access-table-into_12.html' title='To Convert Microsoft Access Table Into MySQL Table - Part 2'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-3331918632956578553</id><published>2011-04-11T16:48:00.003+08:00</published><updated>2011-04-12T10:36:30.811+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Access'/><title type='text'>To Convert Microsoft Access Table Into MySQL Table</title><content type='html'>Currently using: Microsoft Access 2007, phpMyAdmin.&lt;br /&gt;&lt;br /&gt;1. In Access, export into csv file.&lt;br /&gt;a) &lt;b&gt;export the table into text format, however in the file name, make sure the file extension is csv.&lt;/b&gt;&lt;br /&gt;b) do not specify any export options.&lt;br /&gt;c) choose 'delimited' format, my preference: delimiter - Semicolon, text qualifier - " -- to match with the options in phpMyAdmin later.&lt;br /&gt;d) finish it.&lt;br /&gt;&lt;br /&gt;2. In phpMyAdmin, import the csv file.&lt;br /&gt;a) &lt;b&gt;make sure that the database and tables are using collation of "utf8_unicode_ci", benefit: it will avoid the conversion of special characters when importing the csv file.&lt;/b&gt;&lt;br /&gt;b) create a table where the field structure types are to be the same as in the Access table.&lt;br /&gt;c) in the table, select 'import' and choose the csv file.&lt;br /&gt;d) 'character set of the file' is 'utf8', 'Format of imported file' is 'CSV'.&lt;br /&gt;d) finish it.&lt;br /&gt;&lt;br /&gt;3. There it goes!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-3331918632956578553?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/3331918632956578553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=3331918632956578553&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3331918632956578553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3331918632956578553'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2011/04/to-convert-microsoft-access-table-into.html' title='To Convert Microsoft Access Table Into MySQL Table'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-8404009681321101006</id><published>2010-12-14T21:15:00.001+08:00</published><updated>2010-12-14T21:21:37.794+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wifi'/><category scheme='http://www.blogger.com/atom/ns#' term='UTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Train'/><title type='text'>Wifi Outside UTP 2</title><content type='html'>Long long time not blogging. (again)&lt;br /&gt;&lt;br /&gt;Am still feeling lucky to be a UTP student. Since i am going to Alor Setar soon, and it is still quite early from the departure, i therefore try my luck again, here at Ipoh Train Station.&lt;br /&gt;&lt;br /&gt;And now, the reason i am writing here is truly an enjoyable experience. Still using my UTP student id to log into Streamyx Zone... :)&lt;br /&gt;&lt;br /&gt;But then, when i connect to the Streamyx Zone:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;i&gt;The certificate is not trusted&lt;/i&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;So, should TM upgrade the system again?&lt;br /&gt;&lt;br /&gt;***&lt;br /&gt;&lt;br /&gt;Update: Enjoying movie at Ipoh Train Station, no buffering time!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-8404009681321101006?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/8404009681321101006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=8404009681321101006&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/8404009681321101006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/8404009681321101006'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2010/12/wifi-outside-utp-2.html' title='Wifi Outside UTP 2'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-4061547996009140171</id><published>2010-08-14T23:31:00.000+08:00</published><updated>2010-08-14T23:31:26.349+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Daily'/><title type='text'>Another Day Passed</title><content type='html'>After one day, still i am not doing much in homework and study. &lt;br /&gt;What is my ambition?&lt;br /&gt;Where is my ambition?&lt;br /&gt;Should i just be an ordinary one?&lt;br /&gt;&lt;br /&gt;Other topic, in the orchestra practice in the afternoon, i was told to "smile" more, and not only with a serious face. So, my old one remains unchanged. Time for me to change? Or shall i remains to be the old one?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-4061547996009140171?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/4061547996009140171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=4061547996009140171&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4061547996009140171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4061547996009140171'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2010/08/another-day-passed.html' title='Another Day Passed'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-7433268360885020196</id><published>2010-08-12T20:03:00.000+08:00</published><updated>2010-08-12T20:03:10.797+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Daily'/><title type='text'>Instant Messaging</title><content type='html'>If it is not to disturb/be disturbed by others, then what for to have IM like gtalk, msn or ym? So please feel free to disturb.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-7433268360885020196?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/7433268360885020196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=7433268360885020196&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/7433268360885020196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/7433268360885020196'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2010/08/instant-messaging.html' title='Instant Messaging'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-5602470422735610583</id><published>2010-03-19T19:13:00.002+08:00</published><updated>2010-03-19T19:21:14.382+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wifi'/><category scheme='http://www.blogger.com/atom/ns#' term='UTP'/><title type='text'>Wifi Outside UTP</title><content type='html'>Long long time not blogging.&lt;br /&gt;&lt;br /&gt;This time really feel lucky to be UTP students.&lt;br /&gt;Now i am at Kampar, using free wifi by logging into Streamyx Zone using my UTP id. &lt;br /&gt;Where is the place? Somewhere near Kampar Pizza Hut.&lt;br /&gt;&lt;br /&gt;What can i say?&lt;br /&gt;&lt;br /&gt;However, the proxy server is still required to be enabled to surf internet.&lt;br /&gt;But why? Isn't the proxy server just for LAN in UTP?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-5602470422735610583?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/5602470422735610583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=5602470422735610583&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/5602470422735610583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/5602470422735610583'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2010/03/wifi-outside-utp.html' title='Wifi Outside UTP'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-4725527146318810381</id><published>2009-12-09T11:41:00.003+08:00</published><updated>2009-12-09T11:42:38.365+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><title type='text'>How Different Web Browsers Handle history.go Function</title><content type='html'>I am using php and html to do the case.&lt;br /&gt;&lt;br /&gt;Step 1:&lt;br /&gt;Create a search page using form which the action of the form will be the search page itself, e.g. pageA.html.&lt;br /&gt;&lt;textarea cols="50" readonly="readonly" rows="5"&gt;&amp;lt;form action="pageA.html" method="post"&amp;gt;&amp;lt;input type="submit" name="submit" value="submit"/&amp;gt;&amp;lt;/form&amp;gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Step 2:&lt;br /&gt;In pageA.html, create a link to a new page, e.g. pageB.html that will be shown after submission of form.&lt;br /&gt;&lt;textarea cols="50" readonly="readonly" rows="5"&gt;&amp;lt;?php if (isset($_POST['submit'])){ &amp;nbsp;echo "&amp;lt;p&amp;lt;a href=\"pageB.html\"&amp;gt;link to new page&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;"; &amp;nbsp;}?&amp;gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Step 3:&lt;br /&gt;In pageB.html, create a button that use history.go(-1) to move backward to the previous page.&lt;br /&gt;&lt;textarea cols="50" readonly="readonly" rows="5"&gt;&amp;lt;html&amp;gt;&amp;lt;input type="button" value="back" onlick="history.go(-1)"/&amp;gt;&amp;lt;/html&amp;gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Step 4:&lt;br /&gt;Now let's try it.&lt;br /&gt;a. Go to pageA.html&lt;br /&gt;b. Click on the "submit" button.&lt;br /&gt;c. You should be brought to pageA.html with a link to pageB.html now.&lt;br /&gt;d. Click on the link.&lt;br /&gt;e. You should be brought to pageB.html&lt;br /&gt;f. Now click on the "back" button&lt;br /&gt;g. You should have the following the following result&lt;br /&gt;&lt;br /&gt;Opera 10.10: pageA.html after form submission is still there&lt;br /&gt;Google Chrome 4.0.249.30: error page with title "Confirm Form Resubmission"&lt;br /&gt;IE 7.0.6000.16890: error page with title "Webpage has expired"&lt;br /&gt;Safari 4.0.4(531.21.10 ): a confirmation prompt to ask you to resend the form&lt;br /&gt;Mozilla Firefox 3.5.5: a confirmation prompt to ask you to resend the form&lt;br /&gt;&lt;br /&gt;Step 5:&lt;br /&gt;However, if you access pageA.html by parsing variables using URL and not by submitting the form, and then click on the link to pageB.html and click "back" button in pageB.html, you will see that you will be at the pageA.html where it has the variables parsed using URL already.&lt;br /&gt;E.g. in pageA.html&lt;br /&gt;&lt;textarea cols="50" readonly="readonly" rows="5"&gt;&amp;lt;html&amp;gt;&amp;lt;input type="button" onclick="location.href='pageA.html?a=123'"/&amp;gt; &amp;lt;?php if ($_GET[a]) { $var=$_GET[a]; &amp;nbsp;echo "&amp;lt;p&amp;gt;&amp;lt;a href=\"pageB.html\"&amp;gt;link to new page&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;"; &amp;nbsp;} ?&amp;gt;&amp;lt;/html&amp;gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;So you will need to consider the structure of the website before using history.go(-1).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-4725527146318810381?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/4725527146318810381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=4725527146318810381&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4725527146318810381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/4725527146318810381'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2009/12/how-different-web-browsers-handle_09.html' title='How Different Web Browsers Handle history.go Function'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-3609848838718625809</id><published>2009-11-03T22:42:00.001+08:00</published><updated>2009-11-03T22:43:43.813+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Daily'/><title type='text'>Anxiety</title><content type='html'>&lt;i&gt;To talk, you may not like it and not accept it.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Not to talk, but i cant stop to tell the facts to the others.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Should i talk or not?&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Being open-minded to myself save me a lot of problems.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Being open-minded to others may cause problems to the others.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Should i be open-minded to all people?&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I have a feeling of anxiety recently. It seems that i am going to lost my direction again. To uphold my principles of living, i feel it is not easy.&lt;br /&gt;&lt;br /&gt;I want to be frank on everything i want to talk, but it seems difficult (? ) as i want to take care of others' feelings. Should i not consider others' feelings? Am i selfish if i want to be frank to the others?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-3609848838718625809?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/3609848838718625809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=3609848838718625809&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3609848838718625809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3609848838718625809'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2009/11/anxiety.html' title='Anxiety'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2574493011919476762.post-3534539692514362385</id><published>2009-10-10T23:02:00.000+08:00</published><updated>2009-10-10T23:02:59.798+08:00</updated><title type='text'>Deleted... First Post Again</title><content type='html'>Reason is so simple.&lt;br /&gt;&lt;br /&gt;This post has become my FIRST POST, just because i am wondering around and trying to go through all settings and functions of blogger, and here is the result.&lt;br /&gt;&lt;br /&gt;My posts in the past are now r.i.p.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2574493011919476762-3534539692514362385?l=from-another-angle.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://from-another-angle.blogspot.com/feeds/3534539692514362385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2574493011919476762&amp;postID=3534539692514362385&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3534539692514362385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2574493011919476762/posts/default/3534539692514362385'/><link rel='alternate' type='text/html' href='http://from-another-angle.blogspot.com/2009/10/deleted-first-post-again.html' title='Deleted... First Post Again'/><author><name>Ban Ban</name><uri>http://www.blogger.com/profile/02540992137754503539</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
