- mysql terminal import
- CREATE DATABASE dbname;
- mysql>USE dbname;
- mysql>SET NAMES utf8
- mysql>SOURCE /absolute/path/YOURs.sql;
- terminal import
$mysql -uUSERNAME -p DBNAME < DBNAME.sql
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
var Point = new function(x,y){ | |
this.x = x; | |
this.y = y; | |
}(1,1); | |
console.log(Point.x); |
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. 子选择器 | |
X Y 所有后代 | |
X>Y 只选择儿子 | |
2.兄弟 | |
X~Y Y是X的之后的所有兄弟 | |
X+Y Y是X之后的直接兄弟 | |
3.属性 | |
X[href="foo"] | |
4.包含属性* | |
a[href*="a1ex"]{ |
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
基本的vim 操作(有中文) http://vim.rtorr.com/ | |
#常用: | |
! 强制执行 | |
n->Enter 向下移动n行 | |
:s/word1/word2/g 单行替换 | |
:n1,n2s/word1/word2/g n1行和n2行之间批量替换:word2->word1 | |
:%s/word1/word2/g 全局替换 | |
:s/word1/word2/gc c选项==>confirm 确认选项 |
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
import base64 | |
encoded = base64.b64encode(b'DATA') | |
data = base64.b64decode(encoded) | |
print data | |
16 | |
32 | |
base64.bXXencode() | |
''' | |
from https://docs.python.org/3.3/library/base64.html |
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
Move to: | |
Ctrl + a Home | |
Ctrl + e End | |
By words: | |
Alt + f front | |
Alt + b back | |
Delete: | |
Ctrl + u to Home |
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
\ 一般用于转义字符 | |
^ 断言目标的开始位置(或在多行模式下是行首) | |
$ 断言目标的结束位置(或在多行模式下是行尾) | |
. 匹配除换行符外的任何字符(默认) | |
[ 开始字符类定义 | |
] 结束字符类定义 | |
| 开始一个可选分支 | |
( 子组的开始标记 | |
) 子组的结束标记 | |
? 作为量词,表示 0 次或 1 次匹配。位于量词后面用于改变量词的贪婪特性。 (查阅量词) |
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
sass --watch srouce.scss:target.css |
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
function array_traverse($arr) | |
{ | |
while (list($key, $value) = each($arr)) { | |
echo "$key => $value"."<br>"; | |
} | |
} | |
$arr = array(1,2,3,4); | |
function array_powN ($arr, $n) { | |
return (array_map(function ($val) use($n){ |
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
SHOW VARIABLES LIKE 'validate_password%'; ==> current settings | |
SET GLOBAL validate_password_policy = 'LOW'; | |
SET GLOBAL validate_password_length = 5; ==> global change to this plugin | |
SET password=PASSWORD("your passwd"); |
OlderNewer