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
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
LIKE % 1+ Character | |
LIKE _ 1 Character |
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
<?php | |
$test1 = 1234; | |
$test2 = 5678; | |
echo "test1:'$test1', test2:'$test2'"; | |
?> | |
==>output | |
test1:'1234', test2:'5678' |
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
From:http://www.ahlinux.com/php/12992.html | |
<?php | |
//Example_1 | |
$query = sprintf("SELECT * FROM Users where UserName='%s' and Password='%s'", | |
mysql_real_escape_string($Username), | |
mysql_real_escape_string($Password)); | |
mysql_query($query); | |
//Example_2 | |
$db = new mysqli("localhost", "user", "pass", "database"); |
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
From: http://blog.csdn.net/luckyp/article/details/3929895 | |
Built-in user group: | |
Administrators: 无法删除, 系统管理员, 域管理员也具有管理员权限 | |
Guests: -> Guest | |
Power users: 介于Administrators和Users | |
可以:创建、删除、更改本地用户帐户, 创建、删除、管理本地计算机内的共享文件夹与共享打印机,自定义系统设置,例如更改计算机时间、关闭计算机等 | |
不可以: 更改Administrators与Backup Operators,`无法夺取文件的所有权`、无法备份与还原文件、无法安装删除与删除设备驱动程序、`无法管理安全与审核日志`. | |
Backup operators: 备份还原 |
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
Linux中标准输入为0,标准输出为1,标准错误输出为2 | |
$./a.out 0 就是测试标准输入是否可读。因为默认标准输入是终端,终端是可读可写的。故输出为read write | |
$ ./a.out 0 < /dev/tty 实际是$ ./a.out 0 0< /dev/tty是把/dev/tty重定向为标准输入,而/dev/tty是只读的,…… |
OlderNewer