Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
/* | |
* Normalized hide address bar for iOS & Android | |
* (c) Scott Jehl, scottjehl.com | |
* MIT License | |
*/ | |
(function( win ){ | |
var doc = win.document; | |
// If there's a hash, or addEventListener is undefined, stop here | |
if( !location.hash && win.addEventListener ){ |
-webkit-border-radius: 3px 3px 0 0; | |
-khtml-border-radius: 3px 3px 0 0; | |
-moz-border-radius: 3px 3px 0 0; | |
-ms-border-radius: 3px 3px 0 0; | |
-o-border-radius: 3px 3px 0 0; | |
border-radius: 3px 3px 0 0; |
<?php | |
define("APP_DIR", dirname(dirname(__FILE__))); | |
define("WWW_DIR", dirname(APP_DIR)); | |
define("CONF_DIR", APP_DIR . "/protected/config/"); | |
$clusters = require_once(CONF_DIR . "clusters.php"); | |
$mainConfig = require_once(CONF_DIR . "main.php"); | |
// 根据应用程序所在环境加载配置, 默认为develop | |
if (isset($clusters["product"]) && in_array(strtolower(php_uname("n")), $clusters["product"])) { |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
var nightCss = 'html,body,div,span,applet,object,' | |
+ 'h1,h2,h3,h4,h5,h6,p,blockquote,' | |
+ 'pre,abbr,acronym,address,big,cite,' | |
+ 'code,del,dfn,em,font,img,ins,kbd,' | |
+ 'q,s,samp,small,strike,strong,sub,' | |
+ 'sup,tt,var,b,u,i,center,dl,dt,dd,' | |
+ 'ol,ul,li,fieldset,form,label,' | |
+ 'legend,table,caption,tbody,tfoot,thead,th,td' | |
+ '{background:#333333 !important;' | |
+ 'color:#A0A0A0 !important;' |
/** | |
* 检测下一页javascript层面的实现, 支持html5形式,时间复杂度n | |
* | |
* @author wangshijun <[email protected]> | |
* @package default | |
* @subpackage default | |
* @copyright (c) [email protected] | |
* @todo Implement this in a OOP style | |
*/ |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" 一般设定 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" 设定默认解码 | |
set fenc=utf-8 | |
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936 | |
" 不要使用vi的键盘模式,而是vim自己的 | |
set nocompatible |
/* | |
* Continuous Recognition and Visualization of Pen Strokes and Touch-Screen Gestures | |
* Version: 2.0 | |
* | |
* If you use this code for your research then please remember to cite our paper: | |
* | |
* Kristensson, P.O. and Denby, L.C. 2011. Continuous recognition and visualization | |
* of pen strokes and touch-screen gestures. In Procceedings of the 8th Eurographics | |
* Symposium on Sketch-Based Interfaces and Modeling (SBIM 2011). ACM Press: 95-102. | |
* |
<?php | |
$data = array(55,41,59,26,53,58,97,93); | |
quicksort(0, sizeof($data)-1); | |
function quicksort($lower, $upper) { | |
global $data; | |
if ($lower >= $upper) { | |
return; |
<?php | |
/** | |
* 根据用户IP获取用户所在城市 | |
* @param string $userip IP | |
* @return string Location | |
* @todo Implement this service in an OOP way, and Silington Pattern | |
*/ | |
function get_client_location($userip) { | |
//IP数据库路径 |