Yii 2.0 - Getting Started

Install Composer via Composer on Mac OS X curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer Install Yii composer create-project --prefer-dist yiisoft/yii2-app-basic basic Installing Assets Add the following lines to /basic/composer.json "replace": { "bower-asset/jquery": ">=1.11.0", "bower-asset/inputmask": ">=3.2.0", "bower-asset/punycode": ">=1.3.0", "bower-asset/yii2-pjax": ">=2.0.0" }, Verify the Installation Go into the basic/ php yii serve User browser to access: http://localhost:8080/ CHeck if the minimum requirements are met by running cd basic php requirements.php ...

May 26, 2020 · 2 min · 408 words · Ken Cho

OOP

What is OOP? Object-oriented programming is a style of coding that allows developers to group similar tasks into classes. This helps keep code following the tenet “don’t repeat yourself” (DRY) and easy-to-maintain. Object-oriented programming is a style of coding that allows developers to group similar tasks into classes. What is a class? A blueprint for a house. It defines the shape of the house on paper, with relationships between the different parts of the house clearly defined and planned out, even though the house doesn’t exist. ...

May 26, 2020 · 8 min · 1700 words · Ken Cho

How to format text using Markdown?

Markdown is a simple way to format text that looks great on any device. It doesn’t do anything fancy like change the font size, color, or type — just the essentials, using keyboard symbols you already know. Here is the source of the following cheatsheet.

May 22, 2020 · 1 min · 45 words · Ken Cho

PHP progress

Learning PHP at Codecademy Topics String and variables - Done Number - Done Functions - Done Intro to Built-in PHP functions - Done find variable types gettype(); var_dump(); string functions strrev();strtolower(); strtoupper(); str_repeat(); substring substr_count(); number function abs(); round(); generating random numbers rand(); getrandmax(); ceil(); documentation str_pad(); check value in array in_array("valuetocheck", $array) Ordered Arrays can be integer or string or any data type $my_array = array(); or $my_array=[]; returns the array length count($array); print the array in array list print_r(); print the array into string implode ("glue", array); accessing the array $my_array[pos]; adding and changing elements $my_array[pos] = new value; pushing and popping remove the last element array_pop(); append the element array_push(); remove first element array_shift(); prepend the element array_unshit(); remove the first element array_shift(); nestede array value = $my_array[][][] Associative Arrays - concept of dictionary - key and valure pair $my_array = array("key"=>"value"); or $my_array = ["key"=>"value"]; - remove element unset(); - joining the array in union manner - assign by reference ...

May 19, 2020 · 9 min · 1843 words · Ken Cho

Github usage example

The development cycle of the gigadb. 1. fork gigadb-website 2. clone the gigadb-website into local SSD git clone https://github.com/kencho51/gigadb-website.git 3. add remote origin git remote add origin https://github.com/kencho51/gigadb-website.git 4. add remote upstream origin git remote add upstream https://github.com/gigascience/gigadb-website.git 5. follow here to build the docker container for the testing. 6. The flow to make changes: 6.1 Create branch for an issue git branch issue-no 6.2 Go to that branch git checkout issue-no ...

May 19, 2020 · 4 min · 816 words · Ken Cho