Example 1: Display specific lines (based on line number) of a file using sed command
View only the specific lines mentioned by line numbers.
Syntax:
$ sed -n -e Xp -e Yp FILENAME
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Open App</title> | |
<!-- | |
URL Params: | |
customSchemeURL: Your custom scheme app |
document.createElement = function ( | |
createElement, // the native one | |
createResponse // the function "in charge" | |
) { | |
return function (nodeName) { | |
var result, src; | |
// if we are creating a script | |
if (/^script$/i.test(nodeName)) { | |
// result will be a place holder | |
result = createElement.call( |
/* global window */ | |
function StageResizer (stageElement, options) { | |
options = options || {}; | |
this._element = stageElement; | |
this._stageWidth = options.stageWidth || stageElement.offsetWidth || 1; | |
this._stageHeight = options.stageWidth || stageElement.offsetWidth || 1; | |
this._snapToEdge = options.snapToEdge || true; |
// Author Brad P. Taylor ([email protected]) license MIT | |
///<reference path="../../../../bower_components/phaser-official/build/phaser.d.ts"/> | |
///<reference path="./prefab.ts"/> | |
// TODO - support PIXI.Texture/BaseTexture/Atlas (if texture then use inner texture) | |
// TODO - error checking ? possibly correct bad snap requests (not multiple) | |
module bpt { | |
export class Scale9 extends Phaser.Group { |
function string.fromhex(str) | |
return (str:gsub('..', function (cc) | |
return string.char(tonumber(cc, 16)) | |
end)) | |
end | |
function string.tohex(str) | |
return (str:gsub('.', function (c) | |
return string.format('%02X', string.byte(c)) | |
end)) |
################################# | |
# Snippets for the Lua language # | |
################################# | |
##### quick-x support : start #### | |
snippet device.showActivityIndicator "quickx: 显示活动指示器" | |
device.showActivityIndicator() | |
snippet device.hideActivityIndicator() "quickx: 隐藏正在显示的活动指示器" |
set showcmd " display incomplete commands | |
set showmode " display the current editing mode | |
"set cursorcolumn " 高亮当前光标所在列 | |
set cursorline " 高亮当前光标所在行 | |
"hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=NONE guifg=NONE | |
" get rid of the F1 help | |
inoremap <F1> <ESC> | |
nnoremap <F1> <ESC> |
function hashCode(str) { // java String#hashCode | |
var hash = 0; | |
for (var i = 0; i < str.length; i++) { | |
hash = str.charCodeAt(i) + ((hash << 5) - hash); | |
} | |
return hash; | |
} | |
function intToARGB(i){ | |
var resualt = "" |
语言: | |
CPP = 'cpp' | |
LUA = 'lua' | |
JS = 'js' | |
OS: | |
ANDROID = 'android' | |
IOS = 'ios' | |
MAC = 'mac' |