Ngocbd

Using Helper TinyMCE in cakePHP 1.2

Using tinyMCE in cakePHP already guide in previous lesson (http://blog.javamonday.com/2016/06/using-tinemce-ibrowser-with-cakephp.html). However, in this lesson, i am going to guide you how to using tinyMCE through a helper tinyMCE of cakePHP. Setup tinyMCE You can download newest tinyMCE at : http://tinymce.moxiecode.com/download.php and copy /tinymce/jscripts/tiny_mce folder to /app/webroot/js folder. Create helper tinyMCE You create a helper tinyMCE  with path…

Read More

Function Create Alias From Title

Here is code of  function create alias form title:  /** *This function will replace vietnamese character with latin character,space with ‘-‘ * *@author : noname *@param string *@return string */ function convert2Alias($cs) { $marTViet=array(“à”,”á”,”ạ”,”ả”,”ã”,”â”,”ầ”,”ấ”,”ậ”,”ẩ”,”ẫ”,”ă”, “ằ”,”ắ”,”ặ”,”ẳ”,”ẵ”,”è”,”é”,”ẹ”,”ẻ”,”ẽ”,”ê”,”ề” ,”ế”,”ệ”,”ể”,”ễ”, “ì”,”í”,”ị”,”ỉ”,”ĩ”, “ò”,”ó”,”ọ”,”ỏ”,”õ”,”ô”,”ồ”,”ố”,”ộ”,”ổ”,”ỗ”,”ơ” ,”ờ”,”ớ”,”ợ”,”ở”,”ỡ”, “ù”,”ú”,”ụ”,”ủ”,”ũ”,”ư”,”ừ”,”ứ”,”ự”,”ử”,”ữ”, “ỳ”,”ý”,”ỵ”,”ỷ”,”ỹ”, “đ”, “À”,”Á”,”Ạ”,”Ả”,”Ô,””,”Ầ”,”Ấ”,”Ậ”,”Ẩ”,”Ẫ”,”Ă” ,”Ằ”,”Ắ”,”Ặ”,”Ẳ”,”Ẵ”, “È”,”É”,”Ẹ”,”Ẻ”,”Ẽ”,”Ê”,”Ề”,”Ế”,”Ệ”,”Ể”,”Ễ”, “Ì”,”Í”,”Ị”,”Ỉ”,”Ĩ”, “Ò”,”Ó”,”Ọ”,”Ỏ”,”Õ”,”Ô”,”Ồ”,”Ố”,”Ộ”,”Ổ”,”Ỗ”,”Ơ” ,”Ờ”,”Ớ”,”Ợ”,”Ở”,”Ỡ”, “Ù”,”Ú”,”Ụ”,”Ủ”,”Ũ”,”Ư”,”Ừ”,”Ứ”,”Ự”,”Ử”,”Ữ”, “Ỳ”,”Ý”,”Ỵ”,”Ỷ”,”Ỹ”, “Đ”,” “); $marKoDau=array(“a”,”a”,”a”,”a”,”a”,”a”,”a”,”a”,”a”,”a”,”a” ,”a”,”a”,”a”,”a”,”a”,”a”, “e”,”e”,”e”,”e”,”e”,”e”,”e”,”e”,”e”,”e”,”e”,…

Read More

Begining HTML5 game part 2

To continue Begining HTML5 game part 1 . Download images for this tutorial . https://docs.google.com/open?id=0B3wmdk4k7b_-V3Q1TTVIWW5LaWM (Save s to get zip package) We using simple html5 game framework for develop a card game . Maybe blackjack First, you need create Struct Folder to easy manager when your project become  complex  In WebContent-> index.html : Body part, add…

Read More

Create slick effects with CSS3 box-shadow

Create slick effects with CSS3 box-shadow Drop shadows and inner shadows are some of the effects I learned to apply using Photoshop’s Blending options. But now, since CSS3 “hit the charts”, you don’t need Adobe’s design tool to add a drop shadow or an inner shadow to a box.  Nowadays, the cool thing is that…

Read More

Begining HTML5 game part 1

OK. Let’s start . Do you know HTML ? Create file game.html with content : <!DOCTYPE html> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″> <title>Insert title here</title> </head> <body> </body> </html> Adding some javascript as framework <!DOCTYPE html> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″> <title>Insert title here</title> <script type=”text/javascript”>     function update()     {       …

Read More

[How to] Install resin webserver on centos

Resin is very strong webserver/servlet container  . It really fast and strong ,  it may be keep ~10k  concurrent connection  . This tutorial will help you install Resin as service on Centos 1. Install jdk (best is  jdk7 , skip this step if you already have JDK [5,6,7]) http://download.oracle.com/otn-pub/java/jdk/7u2-b13/jdk-7u2-linux-x64.rpm     wget http://download.oracle.com/otn-pub/java/jdk/7u2-b13/jdk-7u2-linux-x64.rpm     rpm -i…

Read More

Cake Bake – Cake Console

Some quick tip to use cake bake In normal, you will type :  $cake bake After that, you will answer each question of cake bake as what do you generate (D/M/V/C/P/Q …) … how to gen. We have a quickly statement to do that :  Want to direct generate models $cake bake model Want to…

Read More