This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lat =-6.90163175029847 ; | |
longi = 107.618712186813; | |
var marker = new GMarker(new GLatLng(lat,longi),{draggable : true });var map; | |
if (GBrowserIsCompatible()) { | |
map = new GMap2(document.getElementById("map")); | |
map.setCenter(new GLatLng(lat,longi),14); | |
map.addOverlay(marker); | |
GEvent.addListener( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git archive -o update.zip HEAD $(git diff --name-only HEAD^) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. copy to vendor folder. | |
2. edit index.php | |
chdir(dirname(__DIR__)); | |
// Setup autoloading | |
require 'init_autoloader.php'; | |
//require the simplepie | |
require './vendor/SimplePie/autoloader.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace My\Modules\Authentication\Form; | |
use Zend\Form\Form; | |
use Zend\InputFilter\InputFilterProviderInterface; | |
class ChangePassword extends Form implements InputFilterProviderInterface | |
{ | |
public function __construct() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$browser = $_SERVER['HTTP_USER_AGENT']; | |
if( (preg_match('/android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$browser)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. create Controller Plugin that has routeShutdown(Zend_Controller_Request_Abstract $request) | |
class Zfgen_Controller_Boot extends Zend_Controller_Plugin_Abstract | |
{ | |
public function routeShutdown(Zend_Controller_Request_Abstract $request) | |
{ | |
$frontController = Zend_Controller_Front::getInstance(); | |
$bootstrap = $frontController->getParam('bootstrap'); | |
$activeModuleName = $request->getModuleName(); | |
$moduleList = $bootstrap->modules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chown -R 1:1 x2crm/ <-- set user id the folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//by servicelocator | |
$this->getServiceLocator()->get('Router') | |
->match($this->getServiceLocator()->get('Request')) | |
->getParam('controller'); | |
//by servicemanager | |
$sm->get('Router') | |
->match($sm->get('Request')) | |
->getParam('paramName') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Join Table scenario Proposal | |
---------------------------- | |
We have two table named *Album* and *Track* that joined at some function at *Album* table model or *Track* table model. | |
We can't make a standarditation of where join should comes, because the answer is 'depend' of the case. | |
so, we need a better scenario that unique, simple, and standardize at this project. | |
1. create an Album class model | |
class Album | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CFLAGS="-arch i386 $CFLAGS" | |
export CCFLAGS="-arch i386 $CCFLAGS" | |
export CXXFLAGS="-arch i386 $CXXFLAGS" | |
export LDFLAGS="-arch i386 $LDFLAGS" | |
/usr/local/zend/bin/pear config-set php_ini /usr/local/zend/etc/php.ini | |
/usr/local/zend/bin/pecl install xdebug |