Below are addressing modes (immediate, register, memory) on the examples of the mov
assembly instruction. Here we use movl
("move long") for a 32-bit word.
Note: cannot move memory-to-memory, need two instructions.
Srcmovl |
---|
/** | |
* Created Date: Friday, September 8th 2017, 6:50:56 pm | |
* Author: hefangshi | |
* Copyright (c) 2017 Baidu.Inc | |
* | |
*/ | |
class Job { | |
constructor() { | |
this.running = 0; |
# lldb debugging v8-related functionality in Node.js | |
# ========================================================= | |
# lldb re-write of user-defined V8 debugging functions | |
# https://github.com/v8/v8/blob/master/tools/gdbinit | |
#allow the file to be read when lldb starts (set to false to ignore it) | |
settings set target.load-cwd-lldbinit true | |
# Print HeapObjects. |
var webpack = require('webpack'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var path = require('path'); | |
var folders = { | |
APP: path.resolve(__dirname, '../app'), | |
BUILD: path.resolve(__dirname, '../build'), | |
BOWER: path.resolve(__dirname, '../bower_components'), | |
NPM: path.resolve(__dirname, '../node_modules') | |
}; |
<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 --> | |
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa --> | |
<head> | |
<!-- 声明文档使用的字符编码 --> | |
<meta charset='utf-8'> | |
<!-- 优先使用 IE 最新版本和 Chrome --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> | |
<!-- 页面描述 --> | |
<meta name="description" content="不超过150个字符"/> | |
<!-- 页面关键词 --> |
// See http://www.bluejava.com/4NS/Speed-up-your-Websites-with-a-Faster-setTimeout-using-soon | |
// This is a very fast "asynchronous" flow control - i.e. it yields the thread and executes later, | |
// but not much later. It is far faster and lighter than using setTimeout(fn,0) for yielding threads. | |
// Its also faster than other setImmediate shims, as it uses Mutation Observer and "mainlines" successive | |
// calls internally. | |
// WARNING: This does not yield to the browser UI loop, so by using this repeatedly | |
// you can starve the UI and be unresponsive to the user. | |
// Note: For an even faster version, see https://gist.github.com/bluejava/b3eb39911da03a740727 | |
var soon = (function() { | |
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ nano ~/.zshrc
path=('/path/to/depot_tools' $path)
_script.onload = _script.onreadystatechange = function () { | |
var uA = navigator.userAgent.toLowerCase(); | |
if (!(!(uA.indexOf("opera") != -1) && uA.indexOf("msie") != -1) || /loaded|complete/i.test(this.readyState)) { | |
if (typeof onload == "function") { | |
onload(); | |
} | |
complete(_jsonpLoadState == "loaded" ? reportSuccessCode : reportErrorCode); | |
} | |
}; |
app.directive('ngEnter', function() { | |
return function(scope, element, attrs) { | |
element.bind("keydown keypress", function(event) { | |
if(event.which === 13) { | |
scope.$apply(function(){ | |
scope.$eval(attrs.ngEnter); | |
}); | |
event.preventDefault(); | |
} |
function getDocHeight() { | |
var D = document; | |
return Math.max( | |
Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), | |
Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), | |
Math.max(D.body.clientHeight, D.documentElement.clientHeight) | |
); | |
} |