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
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.Iterator; | |
| import java.util.ListIterator; | |
| import java.util.Set; | |
| public class Main { | |
| public static void main(String[] args) { | |
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
| import java.util.HashMap; | |
| public class Main { | |
| public static void main(String[] args) { | |
| // HashMap works like associate array | |
| HashMap<String, String> map = new HashMap<String, String>(); | |
| map.put("California", "Sacramento"); | |
| map.put("Oregon", "Salem"); |
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
| import java.util.ArrayList; | |
| public class Main { | |
| public static void main(String[] args) { | |
| /** | |
| * ArrayList in Java is for create dynamic arrays | |
| */ |
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
| public class Main { | |
| public static void main(String[] args) { | |
| String[][] states = new String[3][2]; | |
| states[0][0] = "California"; | |
| states[0][1] = "Sacremento"; | |
| states[1][0] = "Oregon"; |
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
| JavaScript Notes | |
| ========================================================== | |
| To declare an object | |
| ========================================================== | |
| function Rectangle(w, h) { | |
| this.width = w; | |
| this.height = h; | |
| }; | |
| ========================================================== | |
| Create a new instance of the object |
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
| Install Package control first: https://sublime.wbond.net/installation | |
| Great Sublime plugins to have: | |
| LESS | |
| Git | |
| Gist | |
| GitGutter | |
| Emmet | |
| PlainTasks | |
| WordPress Developer Resources |
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
| Composer Commands: | |
| composer self-update | Update composer for Windows environment |
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
| Working in terminal | |
| cd | Change directory | |
| ls | List directory | |
| ls -al | List all files with permissions showned | |
| mv | Change file name, mv #filename1 #filename2 | |
| mv * .. | Move everything up one directory | |
| rm | Remove file, rm #filename | |
| wget | Download a file, wget #filelocation | |
| tar --xzvf | Extract .gz file, tar --xzvf #filename |
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
| function limiting($num) { | |
| $fruits = array('bananas', 'apples', 'pear'); | |
| foreach ( $fruits as $v ) { | |
| if ( $num-- === 0) { | |
| break; | |
| } |
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 | |
| /* | |
| Plugin Name: VH Options | |
| Plugin URI: http://vienhoang.com | |
| Description: Options page for a theme. | |
| Version: 1.0 | |
| Author: Vien Hoang | |
| Author URI: http://vienhoang.com | |
| License: GPL2 | |
| */ |