Built with blockbuilder.org
This file contains hidden or 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
-- table | |
CREATE TABLE public.employee | |
( | |
id integer, | |
no_urut integer, | |
parent_id integer, | |
name character varying COLLATE pg_catalog."default" | |
); | |
-- query |
This file contains hidden or 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
### Testing if the client is a mobile or a desktop. | |
### The selection is based on the usual UA strings for desktop browsers. | |
## Testing a user agent using a method that reverts the logic of the | |
## UA detection. Inspired by notnotmobile.appspot.com. | |
map $http_user_agent $is_desktop { | |
default 0; | |
~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule | |
~*spider|crawl|slurp|bot 1; # bots | |
~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes |
This file contains hidden or 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 common\components\db\oci; | |
/** | |
* I'm using Yii2 Version 2.0.15.1 | |
* | |
* add this to db component config : | |
* 'db' => [ | |
* #... |
This file contains hidden or 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 | |
/** | |
* @link http://www.yiiframework.com/ | |
* @copyright Copyright (c) 2008 Yii Software LLC | |
* @license http://www.yiiframework.com/license/ | |
*/ | |
namespace console\controllers; |
This file contains hidden or 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 | |
function getCode($num) { | |
// $string1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
// $string2 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
// $string3 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
// $string4 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
// $string5 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
// $string6 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; | |
// $string7 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; |
This file contains hidden or 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 | |
function getLevel($n) { | |
for ($i = 1; $i < 12; $i++) { | |
if ($n <= getTopLevel($i)) { | |
break; | |
} | |
} | |
return $i; | |
} |
This file contains hidden or 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 common\components; | |
use Yii; | |
use yii\imagine\Image; | |
/** | |
* descriptcion class and example to use here | |
* |
This file contains hidden or 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 app\models; | |
use Yii; | |
/** | |
* This is the model class for table "tabel_a". | |
* | |
* @property integer $id |