-
เรื่องล่าสุด
คลังเก็บ
- กุมภาพันธ์ 2021
- ธันวาคม 2020
- กรกฎาคม 2020
- มิถุนายน 2020
- กุมภาพันธ์ 2020
- มกราคม 2020
- มีนาคม 2015
- มกราคม 2015
- ธันวาคม 2014
- พฤศจิกายน 2014
- ตุลาคม 2014
- กันยายน 2014
- สิงหาคม 2014
- กรกฎาคม 2014
- มิถุนายน 2014
- พฤษภาคม 2014
- เมษายน 2014
- มีนาคม 2014
- กุมภาพันธ์ 2014
- มกราคม 2014
- ธันวาคม 2013
- พฤศจิกายน 2013
- ตุลาคม 2013
- กันยายน 2013
- สิงหาคม 2013
- กรกฎาคม 2013
- มิถุนายน 2013
- พฤษภาคม 2013
- เมษายน 2013
- มีนาคม 2013
- กุมภาพันธ์ 2013
- มกราคม 2013
- ธันวาคม 2012
- พฤศจิกายน 2012
- ตุลาคม 2012
Monthly Archives: ตุลาคม 2013
sort array multiple field by select field sort
[cc lang = “php”] $tmp = Array(); foreach($result[“data”] as &$ma) $tmp[] = &$ma[“app_id”]; array_multisort($tmp,SORT_ASC,$result[“data”]); [/cc] In above example $result[“data”] is an array multiple field and sort by app_id field asc(SORT_ASC) or you want sort by desc(SORT_DESC) http://uk.php.net/manual/en/function.array-multisort.php
Posted in knowledge, php
Leave a comment
json pretty printing
PHP 5.4 offers the JSON_PRETTY_PRINT option for use with the json_encode() call. http://php.net/manual/en/function.json-encode.php normal json [cc] {“a”:”apple”,”b”:”banana”,”c”:”catnip”} [/cc] pretty json [cc] { “a”: “apple”, “b”: “banana”, “c”: “catnip” } [/cc] [cc lang=”php”] $json_pretty = print_r(json_encode($data, JSON_PRETTY_PRINT),true); echo “ “; echo … Continue reading
Posted in knowledge, php, เกร็ดความรู้
Leave a comment
new project cocos2d-x v2.1.4 c++
Step by step download cocos2d-x from cocos2d-x v2.1.4 extract to someplace such as drive d Go to [COCOS_PATH]/tools and run command [cc]project-creator -project [PROJECT_NAME] -package [PACKAGE_NAME] -language cpp [/cc] the location of new project is [COCOSPATH]/projects/[PROJECT_NAME] you can run [COCOSPATH]/projects/[PROJECT_NAME]/proj.win32/HelloCpp.sln on … Continue reading
Posted in cocos2d-x
Leave a comment
Google app engine datastore GQL
GQL is a SQL-like language for retrieving entities or keys from the App Engine scalable datastore. While GQL’s features are different from those of a query language for a traditional relational database, the GQL syntax is similar to that of … Continue reading
Posted in google app engine
Leave a comment
Google app engine free datastore quota limit
Limit search query request ~ 1000 query per days deploy limit ~ 1000 times per days index limit ~ 100 index Restrictions on queries(ข้อจำกัดในการใช้คิวรี่) โค้ดตัวอย่างเป็นภาษา python คิวรี่ที่ใช้ Inequality filters (>,>=,<,<=,!=) จะใช้ได้เพียงฟิลด์เดียวต่อ 1 query เช่น [cc lang=”python”] files = files.filter(‘eventStart >=’, … Continue reading
Posted in google app engine
Leave a comment