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
| set mypath=%~dp0 | |
| if not exist "%mypath%AI" mkdir "%mypath%AI" | |
| if not exist "%mypath%IMAGES" mkdir "%mypath%IMAGES" | |
| if not exist "%mypath%ICON" mkdir "%mypath%ICON" | |
| if not exist "%mypath%PSD" mkdir "%mypath%PSD" | |
| if not exist "%mypath%DOC" mkdir "%mypath%DOC" | |
| if not exist "%mypath%VIDEO" mkdir "%mypath%VIDEO" | |
| if not exist "%mypath%RAR" mkdir "%mypath%RAR" |
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
| #connect to postgres | |
| import psycopg2 | |
| try: | |
| conn = psycopg2.connect("dbname='databasename' user='user_name' host='localhost' password='pass'") | |
| except: | |
| print ("I am unable to connect to the database") | |
| cur = conn.cursor() | |
| cur.execute("SELECT * FROM table") #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
| from random import randint | |
| board = [] | |
| for x in range(5): | |
| board.append(["O"] * 5) | |
| def print_board(board): | |
| for row in board: | |
| print " ".join(row) |
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
| lloyd = { | |
| "name": "Lloyd", | |
| "homework": [90.0, 97.0, 75.0, 92.0], | |
| "quizzes": [88.0, 40.0, 94.0], | |
| "tests": [75.0, 90.0] | |
| } | |
| alice = { | |
| "name": "Alice", | |
| "homework": [100.0, 92.0, 98.0, 100.0], | |
| "quizzes": [82.0, 83.0, 91.0], |
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
| // CI_Controller.php | |
| <?php | |
| defined('BASEPATH') OR exit('No direct script access allowed'); | |
| class Welcome extends CI_Controller { | |
| public function index() | |
| { | |
| $this->home() ; | |
| } | |
| public function home(){ |
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 | |
| class Model{ | |
| public $string; | |
| public function __construct(){ | |
| $this->string = "Hello world" ; | |
| } | |
| } | |
| class View{ | |
| private $model ; | |
| private $controller ; |
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
| + ADMIN | |
| - controller | |
| - model | |
| - view | |
| + public | |
| - css | |
| - js | |
| - template | |
| - admin | |
| - site |
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
| /* CSS Document */ | |
| @charset "utf-8"; | |
| #container, .row { | |
| width: 100%; | |
| float: left; | |
| color: #fff; | |
| font-size: 30px; | |
| } | |
| .wrap { | |
| max-width: 960px; |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
| <!--thẻ meta bắt buộc phải có trong project responsive--> | |
| <title>Sichiblog - Tạo 1 trang web responsive đơn giản</title> | |
| <link rel="stylesheet" type="text/css" href="default.css"> | |
| <link rel="stylesheet" type="text/css" href="style.css"> | |
| </head> |
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 | |
| include_once 'dbconfig.php'; | |
| if($_POST['type_top']) | |
| { | |
| $type_top=$_POST['type_top']; | |
| $query = "SELECT * FROM type_child WHERE type_top='$type_top'" ; | |
| $result = mysqli_query($connection,$query) ; | |
| ?> | |
| <option selected="selected">Select State :</option> | |
| <?php |