JavaScript语言精粹学习笔记

语法

1、注释
JS提供了两种注释方式：一种是块注释：/* 被注释的内容 */ ，另一种是行注释：// 被注释的内容。 使用块注释是不安全的，例如，使用正则表达式：

// /*
    var test = /test*/;
// */
2、数字

var isNaN = isNaN(number); // 用isNaN方法判断是否为数字，不是数字返回true,反之，返回false
3、字符串不可变

'A' === '\u0041'; // true
'c' + 'a' + 't' === 'cat'; // true
'cat'.toUpperCase() === 'CAT'; // true
4、语句
条件判断会被当成false的值：false,null,undefined,'',0,NaN,其他所有值都为被当做true。

5、运算符
typeof运算符产生的值有：'number','string','boolean','undefined','function','object'.
'+' 运算符只有在运算符两端运算数都为数字时进行相加，其他情况是字符串连接。
'/' 运算符可能产生一个非整数结果，即使两个运算数都是整数。
'&&' 运算符使用技巧：当&&的第一个运算数的值为假时，取第一个运算数的值，反之，取第二个的值。

0 && 1; // 0
false && true; // false
true && false; // false
1 && 2; // 2
|| 运算符使用技巧：当第一个运算数的值为为真时，取第一个运算数的值，反之，取第二个的值。一般使用这种技巧设置默认值。

undefined || 0; //0
null || {}; // {}
0 || []; // []
1 || true; // 1
以上技巧利用了&&和||的短路原理，&&运算符左边的值为假时，不再执行右边的值，||运算符左边的值为真，则不再执行右边的值。

对象

1、使用字面量创建对象
对象属性值可以使用undefined以外的任何值

var obj = {};
obj.name = 'Better';
obj.age = 24;
obj['first-name'] = 'liao'; //由于first-name不是合法的标识符，所以必须使用[]，不能使用.
obj.last_name = 'longdong'; // last_name为合法标识符
2、引用
对象通过引用进行传递

var a = {}, b ={}, c = {}; //a,b,c属于不同的对象，因为它们的引用不同
a == b; // false
a.name = 'Better';
b.name = 24;
console.log(a); // {name: 'Better'}
console.log(b); // {name: 24}

var a = b = c = {}; // a,b,c属于同一个对象，因为它们的引用（地址）相同
a === b; // true
a.name = 'Better';
b.age = 24;
console.log(a); // {name: 'Better', age: 24}
console.log(b); // {name: 'Better', age: 24}
3、原型
每个对象都有原型对象，所谓的原型链，就是查找对象的属性和方法时，首先，查找对象本身是否有该属性或者方法，如果没有，则沿着原型对象进行查找，直到Object.prototype，如果都没有则返回undefined.

// 模拟Object.create()方法创建新对象
if( typeof Object.create === 'function'){
    Object.create = function (obj) {
        var F = function(){};
        F.prototype = obj;
        return new F();
    }
}
obj.hasOwnProperty('name'); // 该方法用于检测对象本身是否拥有该属性，不会查找原型链中的属性和方法
4、全局变量
减少全局变量主要有两种方式：一、使用命名空间，二、使用闭包

// 使用命名空间
var mynamespace = {};
mynamespace.module1 = {
    name : 'xiaoxin',
    age: 24
};
mynamespace.module2 = {
    name: 'xiaowu',
    age: 22
};
// 使用闭包，创建唯一ID
var create = function(){
    var num = 0;
    return function(){
        return num ++;
    }
}
var uId = create();
uId(); // 0
uId(); // 1
uId(); // 2
函数

在JavaScript中函数就是对象。对象字面量产生的对象连接到Object.prototype，函数对象连接到Funtion.prototype（该原型对象本身连接到Object.prototype）。
每个函数在创建时两个附加隐藏属性：函数的上下文和实现函数行为的代码。每个函数对象在创建时也带有一个prototype属性，它的值是一个拥有constructor属性，该属性指向该函数对象。

var f = function(){};
f.prototype.constructor === f; // true
1、函数字面量（函数表达式）
函数表达式与函数声明的区别：

// 函数表达式
console.log(fun1); // undefined
var fun1 = function(){
    console.log(123);
};
console.log(fun1); // function(){console.log(123)};

// 函数声明
console.log(fun2); // function fun2(){console.log(456)};
function fun2(){
    console.log(456);
};
console.log(fun2); // function fun2(){console.log(456)};

var fun3 = function(){
    console.log(666);
};
function fun3(){
    console.log(888);
};
console.log(fun3()); // 666
//结论：1、函数表达式和函数声明都会进行变量提升；2、函数表达式会覆盖同名的函数声明
2、函数调用
JavaScript中一共有四种函数调用模式：方法调用模式、函数调用模式、构造函数调用模式和apply调用模式。

方法调用模式
当函数作为一个对象的方法（属性）时，this指向该对象。
var myObj = {}; // 创建一个对象
myObj.name = 'Better';
myObj.method = function(){ // 给对象添加方法
    console.log(this.name);
};
myObj.method(); // 'Better'
函数调用模式
当一个函数没有作为一个对象的方法（属性）时，this指向全局对象（window对象）
// 全局函数
function add(a, b){
    return a + b;
};
add(1, 2); // 3

myObj.value = 2;
myObj.double = function(){
    console.log(this);
    var that = this; // 把指向myObj对象的this指针，存到that变量中
    var helper = function(){
        console.log(this); // 这里的this指向window对象
        that.value = add(that.value, that.value);
    };
    helper(); // 以函数形式进行调用helper函数
};
myObj.double(); // 以方法的形式调用double函数
myObj.value; // 4
构造函数调用模式
如果函数前面带上new来调用，那么this指向该新对象上，使用new调用函数也会改变return语句的行为，如果return的是对象则返回该对象，否则，返回（this）新创建的对象。
// 创建一个构造函数，约定构造函数使用大写开头
function Fun(string){
    this.status = string;
};
// 给构造函数添加公共方法
Fun.prototype.getStatus = function(){
    return this.status;
};
// 创建实例
var fun = new Fun('Better');
fun.getStatus(); // 'Better'
// 不推荐使用该方法
apply调用模式
apply方法有两个参数，第一个参数thisObj，是绑定this执行的上下文，第二个参数argArr，参数数组。
// 创建一个构造函数，约定构造函数使用大写开头
function Fun(string){
    this.status = string;
};
// 给构造函数添加公共方法
Fun.prototype.getStatus = function(){
    return this.status;
};
// 创建实例
var fun = new Fun('Better');
fun.getStatus(); // 'Better'

// this指向全局对象
function add(a, b){
    return a + b;
};
var arr = [3, 4];
var sum = add.apply(null, arr); // 7

// this指向obj对象
var obj = {};
obj.status = 24;
Fun.prototype.getStatus.apply(obj); // 24
fun.getStatus.apply(obj); // 24
fun.getStatus.apply(this);

// apply方法第一个参数为null或者undefined时，this指向全局对象（非严格模式下）
function test(){
    console.log(this);
};
test.apply(null); // this指向全局对象（window对象）
test.apply(undefined); // this指向全局对象（window对象）
test.apply(this); // this指向全局对象（window对象）
test.apply(1); // this指向Number对象
test.apply('string'); // this指向String对象
test.apply(true); // this指向Boolean对象

// 结论：通俗的说，就是把某个方法放到apply方法的第一个参数（thisObj）作用域下执行。
3、arguments类数组参数对象
arguments对象是一个类数组对象，只有length属性，没有数组相关方法。它可以获取函数调用时的参数列表。该对象只能在函数内部使用。

var sum = function(){
    var sum = 0;
    for(var i = 0, len = arguments.length; i < len; i ++){
        sum += arguments[i];
    }
    return sum;
};
console.log(sum(1, 2, 3, 4, 5)); // 15
4、异常
JavaScript提供了一套异常处理机制。

var add = function(a, b){
    if(typeof a !== 'number' || typeof b !== 'number'){
        throw {
            name: 'TypeError',
            message: 'add needs numbers'
        };
    }
    return a + b;
};
add(1, 2); // 3
add(1, '2'); // 报错
add(); // 报错

// try_catch代码块
var try_it = function(){
    try{
        add('one');
    }catch(e){
        console.log(e.name + ' : ' + e.message);
    }
};
try_id(); // TypeError : add needs numbers
5、给类型添加方法
通过给Object.prototype添加方法使得该方法对所有对象可用。
通过给Function.prototype添加方法使得该方法对所有函数可用。

// 给Function.prototype添加方法
Function.prototype.method = function(name, func){
    if(!this.prototype[name]){
        this.prototype[name] = func;
    }
};

// 给Number对象添加一个integer方法
Number.method('integer', function(){
    var funName = this < 0 ? 'ceil' : 'floor';
    return Math[funName](this);
});
(10/4).integer(); // 2
(-10/4).integer(); // -2

// 给String对象添加一个移除两端字符串的方法
String.method('trim', function(){
    return this.replace(/^\s+|\s+$/, '');
});
'  Better '.trim(); // 'Better'
6、递归
递归函数会直接或间接地调用自身的一种函数。一般来说，一个递归函数调用自身去解决它的子问题。
递归可以非常高效地操作树形结构，比如浏览器端的文档对象模型（DOM）。每次递归调用时处理给定树的一小段。

// walk_the_DOM调用自身去处理每一个子节点
var walk_the_DOM = function walk(node, func){
    func(node);
    node = node.firstChild;
    while(node){
        walk(node, func);
        node = node.nextSibling;
    }
};
// 创建一个通过属性查找节点的函数
var getElementByAttribute = function(attr, value){
    var results = [];
    walk_the_DOM(document.body, function(node){
        var actual = node.nodeType === 1 && node.getAttribute(attr);
        if(typeof actual === 'string' && (actual === value || typeof value !== 'string')){
            results.push(node);
        }
    });
    return results;
};

// 利用递归，计算一个数的阶乘
var factorial = function factorial(i, a){
    a = a || 1;
    if(i < 2){
        return a;
    }
    return factorial(i - 1, a * i);
};
factorial(3); // 6
factorial(3, 2); // 12
factorial(3, 3); // 18

// 不建议在匿名函数中使用arguments.callee()
// 在给函数表达式一个名称或者使用函数声明而该函数必须调用自己时，禁止使用 arguments.callee()
// 在ES5的严格模式中禁止使用 arguments.callee()
function create(){
    return function(num){
        if(num < 2){
            return 1;
        }else{
            return num * arguments.callee(num - 1);
        }
    }
};
var result = create()(3); // 6
7、作用域
作用域控制着变量与参数的可见性和生命周期。
JavaScript有函数作用域，但没有块级作用域，最好的做法是在函数体的顶部声明函数中可能用到的所有变量。

// 函数内的变量会进行变量提升，所以运行cxt()函数，前两次console.log(c);没有报错
function cxt(){
    var a = 1, b = 2;
    console.log(c); // undefined
    function innerFun(){
        var a = 6, b =7, c = 8;
        console.log(a, b, c); // 6 7
    }
    innerFun();
    console.log(c); // undefined
    if(a == 1){ // false
        var c = 3;
    };
    console.log(c); // 3
}
8、闭包
闭包是指有权访问另一个函数作用域中的变量的函数，创建闭包的最常见的方式就是在一个函数内创建另一个函数，通过另一个函数访问这个函数的局部变量。

var myObject = function(){
    var value = 0;
    return {
        increment: function(inc){
            value += typeof inc === 'number' ? inc : 1;
        },
        getValue: function(){
            return value;
        }
    };
}();

// 创建一个名为quo的构造函数
var quo = function(status){
    return {
        getStatus: function(){
            return status;
        }
    };
};
// 构造一个quo实例
var myQuo = quo('crazy');
console.log(myQuo.getStatus()); // 'crazy'
// 这个构造函数被设计成无需加new来使用，所以名字也没有首字母大写

// 定义一个函数，它设置一个DOM节点为黄色，然后把它渐变为白色
var fade = function(node){
    var level = 1;
    var step = function(){
        var hex = level.toString(16); // 转化为16进制数
        console.log(hex);
        node.style.backgroundColor = '#FFFF' + hex + hex;
        if(level < 15){
            level += 1;
            setTimeout(step, 100);
        }
    };
    setTimeout(step, 100);
};
fade(document.body);
9、回调
回调函数可以让不连续的事件处理变得更容易。

// 这种同步请求会阻塞进程
request = prepare_the+request();
response = send_request_synchronously(request);
display(response);

// 更好的方式使用异步回调请求
request = prepare_the_request();
send_request_asynchronously(request, function(response){
    display(response);
});
10、模块
可以使用函数和闭包来构造模块。
模块是一个提供接口却隐藏状态与实现的函数或对象。
模块模式的一般形式：一个定义了私有变量和函数的函数；利用闭包创建可以访问私有变量和函数的特权函数；最后返回这个特权函数，或者把它们保存到一个可访问的地方。

// 给所有函数都添加该方法
Function.prototype.method = function(name, func){
    if(!this.prototype[name]){
        this.prototype[name] = func;
    }
}
String.method('deentityify', function(){
    // 字符实体表
    var entity = {
        quot: '""',
        lt: '<',
        gt: '>'
    };
    // 返回deentityify方法
    return function(){
        // 使用字符串的replace方法
        // 查找‘&’开头和‘;’结束的子字符串
        return this.replace(/&([^&;]+);/g, function(a, b){
            console.log(a, b); // a为正则表达式第一个匹配，b为第二个匹配（正则表达式圆括号里的匹配）
            var r = entity[b];
            return typeof r === 'string' ? r : a;
        });
    }
}()); // 这里使用立即执行函数
console.log('<">'.deentityify()); // <"">

// 构造一个用来产生序列号的对象
var serial_marker = function(){
    // 返回一个用来产生唯一字符串的对象
    // 唯一字符串由两部分组成：前缀+序列号
    // 该对象包含一个设置前缀的方法，一个设置序列号的方法和一个产生唯一字符串的gensym方法
    var prefix = '';
    var seq = 0;
    return {
        set_prefix: function(p){
            prefix = String(p);
        },
        set_seq: function(s){
            seq = s;
        },
        gensym: function(){
            var result = prefix + seq;
            seq += 1;
            return result;
        }
    };
};
var seqer = serial_marker();
seqer.set_prefix('Q');
seqer.set_seq(1000);
var unique = seqer.gensym(); // unique is "Q1000"
var unique = seqer.gensym(); // "Q1001"
模块模式通常结合单例模式（Singleton Pattern）使用。
JavaScript的单例就是用对象字面量表示法创建的对象，对象的属性值可以是数值或函数，并且属性值在该对象的生命周期中不会发生变化。

11、链式调用（级联）
方法返回this而不是undefined就可以启用链式调用（级联），链式调用可以产生出具备强大表现力的接口。

getElement('myBoxDiv').
    move(100, 200).
    width(100).
    height(200).
    color('red').
    on(mouseover, func);
12、记忆
函数可以用对象去记住先前操作的结果，从而避免多余的运算。这种优化被称为记忆。JavaScript的对象和数组要实现这种优化是非常方便的。

// Fibonacci数列，斐波那契数列，特点，前面相邻两项之和等于后一项的值。
var fibonacci = function(n){
    return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
};
for(var i =0; i <= 10; i ++){
    console.log(i, fibonacci(i));
}
// 0 0
// 1 1
// 2 1
// 3 2
// 4 3
// 5 5
// 6 8
// 7 13
// 8 21
// 9 34
// 10 55
// fibonacci被调用了453次，除了我们调用了11次，其它的调用大都在计算已经计算过的值

// 上面的例子做了很多重复的工作，下面进行一下优化
var fibonacci = function(){
    var memo = [0, 1];
    var fib = function(n){
        var result = memo[n];
        if(typeof result !== 'number'){ // 判断是否已经存在结果
            result = fib(n - 1) + fib(n - 2);
            memo[n] = result;
        }
        return result;
    };
    return fib;
}();
for(var i =0; i <= 10; i ++){
    console.log(i, fibonacci(i));
}
// 这样优化后只调用了29次，我们调用了11次，函数自身调用了18次

// 编写一个函数来帮助我们构造带记忆动能的函数，他返回一个管理memo存储和在需要是调用func函数的shell函数。
var memoizer = function(memo, func){
    var shell = function(n){
        var result = memo[n];
        if(typeof result !== 'number'){
            result = func(shell, n);
            memo[n] = result;
        }
        return result;
    };
    return shell;
};
// 使用memoizer来定义fibonacci函数
var fibonacci = memoizer([0, 1], function(shell, n){
    return shell(n - 1) + shell(n - 2);
});
// 使用memoizer来定义factoriala函数
var factorial = memoizer([1, 1], function(shell, n){
    return n * shell(n - 1);
});
继承

1、伪类
当一个函数对象被创建时，Function构造器产生的函数对象会运行类似这样的一些代码：

this.prototype = {constructor: this};
新函数对象被赋予一个prototype属性，其值是包含一个constructor属性且属性值为该新函数对象。每个函数都拥有一个prototype对象。

function f(){};
f.prototype.constructor === f; // true
定义一个构造器并给原型添加方法

// 父类
// 创建构造函数
var Mammal = function(name){
    this.name = name;
};
// 给原型添加方法
Mammal.prototype.getName = function(){
    return this.name;
};
Mammal.prototype.say = function(){
    return this.saying || 'hello';
};
var myMammal = new Mammal('Herb the Mammal');
var name = myMammal.getName(); // 'Herb the Mammal'

// 子类
var Cat = function(name){
    this.name = name;
    this.saying = 'meow';
};
// 替换Cat.prototype为一个新的Mammal实例(继承父类)
Cat.prototype = new Mammal();
// 给新的原型对象添加方法
Cat.prototype.purr = function(n){
    var i, s = '';
    for(i = 0; i < n; i += 1){
        if(s){
            s += '-';
        }
        s += 'r';
    }
    return s;
};
Cat.prototype.getName = function(){
    return this.say() + ' ' + this.name + ' ' + this.say();
};
var myCat = new Cat('Henrietta');
var say =  myCat.say(); // 'meow'
var purr = myCat.purr(5); // 'r-r-r-r-r'
var name = myCat.getName(); // 'meow Henrietta meow'

// 隐藏prototype操作细节，这部分代码要用到上面Mammal父类代码，才能运行
Function.prototype.method = function(name, func){
    if(!this.prototype[name]){
        this.prototype[name] = func;
    }
    return this;
};
Function.method('inherits', function(Parent){
    this.prototype = new Parent();
    return this;
});
var Cat = function(name){
    this.name = name;
    this.saying = 'meow';
}.
    inherits(Mammal).
    method('purr', function(n){
        var i, s = '';
        for(i = 0; i < n; i += 1){
            if(s){
                s += '-';
            }
            s += 'r';
        }
        return s;
    }).
    method('getName', function(){
        return this.say() + ' ' + this.name + ' ' + this.say();
    });
var cat = new Cat('icat');
cat.getName(); // 'icat'
cat.purr(5); // r-r-r-r-r
// 这种方法的缺点：没有私有环境，所有的属性都是公开的。
2、原型

// 创建一个有用的对象
var myMammal = {
    name: 'Herb the Mammal',
    getName: function(){
        return this.name;
    },
    says: function(){
        return this.saying || '';
    }
};
// 使用Object.create()方法构造出更多的实例来
var myCat = Object.create(myMammal);
myCat.name = 'Henrietta';
myCat.saying = 'meow';
myCat.purr = function(n){
    var i, s = '';
    for(i = 0; i < n; i ++){
        if(s){
            s += '-';
        }
        s += 'r';
    }
    return s;
};
myCat.getName = function(){
    return this.says() + ' ' + this.name + ' ' + this.says();
};
// 这是一种“差异化继承”，通过制定一个新的对象，我们指明了它与所基于的基本对象的区别。
3、函数化
前面的例子中的name属性和saying属性是完全公开的，下面这个例子让name属性和saying属性变成私有变量：

// 模块模式的应用
var mammal = function(spec){
    var that = {};
    that.getName = function(){
        return spac.name;
    };
    that.says = function(){
        return spec.saying || '';
    };
    return that;
};
var myMammal = mammal({name: 'Herb'});

var cat = function(spec){
    spec.saying = spec.saying || 'meow';
    var that = mammal(spec);
    that.purr = function(n){
        var i, s = '';
        for(i = 0; n < i; i ++){
            if(s){
                s += '-';
            }
            s += 'r';
        }
        return s;
    };
    that.getName = function(){
        return that.says() + ' ' + spec.name + ' ' + that.says();
    };
    return that;
};
var myCat = cat({name: 'Henrietta'});

// 函数化模式给我们提供了一个处理父类的方法
Function.prototype.method = function(name, func){
    if(!this.prototype[name]){
        this.prototype[name] = func;
    }
    return this;
};
Object.method('superior', function(name){
    var that = this;
    method = that[name];
    return function(){
        return method.apply(that, arguments);
    }
});
var coolcat = function(spec){
    var that = cat(spec);
    var superGetName = that.superior('getName');
    that.getName = function(){
        return 'like ' + superGetName() + ' baby';
    };
    return that;
};
var myCoolCat = coolcat({name: 'Bix'});
var name = myCoolCat.getName(); // 'like meow Bix meow baby'
4、部件

var eventuality = function(that){
    var registry = {};
    that.fire = function(event){
        var array,
            func,
            handler,
            i,
            type = typeof event === 'string' ? event : event.type;
        // 如果这个事件存在一组事件处理程序，那么就遍历它们并按顺序依次执行
        if(registry.hasOwnProperty(type)){
            array = registry[type];
            for(i = 0; i < array.length; i ++){
                handler = array[i];
                // 每个处理程序包含一个方法和一组可选的参数
                // 如果该方法是一个字符串形式的名字，那么寻找到该函数
                func = handler.method;
                if(typeof func === 'string'){
                    func = this[func];
                }
                func.apply(this, handler.parameters || [event]);
            }
        }
        return this;
    };
    that.on = function(type, method, parameters){
        // 注册一个事件，构造一条处理程序条目，将它插入到处理程序数组中，如果这种类型的事件还不存在，就构造一个
        var handler = {
            method: method,
            parameters: parameters
        };
        if(registry.hasOwnProperty(type)){
            registry[type].push(handler);
        }else{
            registry[type] = [handler];
        }
        return this;
    };
    return that;
};
// 用这种方式，一个构造函数可以从一套部件中组装出对象来
数组

数组是一段线性分配的内存，它通过整数去计算偏移并访问其中的元素。数组可以是很快的数据结构。但是，JavaScript没有像这种数组一样的数据结构。
JavaScript提供了一种拥有一些类数组（array-like）特性的对象，它把数组的下标转变成字符串，用其作为属性。它的性能明显的比真正的数组慢，但它可以更方便的使用。
1、数组字面量
数组的第一个值将获得属性名'0'，第二个将获得属性名'1'，依次类推：

// 数组字面量
var empty = [];
var numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
console.log(empty[1]); // undefined
console.log(numbers[1]); // 'one'
console.log(numbers['1']); // 'one'
console.log(empty.length); // 0
console.log(numbers.length); // 10

// 对象字面量
var numbers_object = {
    '0': 'zero',
    '1': 'one',
    '2': 'two',
    '3': 'three',
    '4': 'four',
    '5': 'five',
    '6': 'six',
    '7': 'seven',
    '8': 'eight',
    '9': 'nine'
};
// 在大多数语言中，一个数组的所有元素都要求是相同的类型。但是，JavaScript允许数组包含任意混合类型的值
var misc = ['steing', 66, true, null, undefined, [1, 2, 3], NaN, {name: 'Better'}];
numbers和numbers_object两者的区别：

numbers继承自Array.prototype，而numbers_object继承自Object.prototype
numbers继承了大量操作数组的方法
numbers有length属性，而numbers_object则没有
2、长度
JS数组的length属性没有上限，如果你用等于或大于当前length的数字作为下标来保存一个元素，那么length将增大来容纳新元素，不会发生数组越界错误。

// length属性的值是这个数组的最大整数属性名加1，它不一定等于数组里属性的个数
var myArray = [];
console.log(myArray.length); // 0
// myArray[10000] = true;
myArray['10000'] = true;
console.log(myArray.length); // 10001

// 可以直接设置数组length属性的值，设置更大的length不会给数组分配更多的空间，
// 而把length设小将导致所有等于大于新length的属性被删除
var numArr = [0, 1, 2, 3, 4, 5];
numArr.length = 3;
console.log(numArr); // [0, 1, 2]

// 添加新元素到数组尾部
numArr[numArr.length] = 3;
console.log(numArr); // [0, 1, 2, 3]

// 添加新元素到数组尾部，使用push方法
numArr.push(4);
console.log(numArr); // [0, 1, 2, 3, 4]
3、删除
由于JavaScript的数组其实就是对象，所以可以使用delete运算符移出数组中的元素，但是数组中会遗留一个空洞。

var numArr = [0, 1, 2, 3, 4, 5];
delete numArr[2];
console.log(numArr); // [0, 1, undefined, 3, 4, 5]

// 使用数组中的splice()方法
var numArr = [0, 1, 2, 3, 4, 5];
// 从数组下标为2的位置开始，删除1个数组元素，
// 并在该位置插入66这个元素，返回被删除的元素数组[2]
numArr.splice(2, 1, 66); // [2]
console.log(numArr); // [0, 1, 66, 3, 4, 5]
4、枚举
因为JS中的数组也是对象，所有可以使用for in语句来遍历数组的所有属性。
但是，使用for in语句无法保证属性的顺序，而且存在从原型链中得到意外属性的可能

// 使用for in遍历数组的属性（不推荐）
var nums = ['zero', 'one', 'two', 'three'];
for(var num in nums){
    console.log(num, nums[num]);
}
// 推荐使用for循环遍历数组
for(var i = 0, len = nums.length; i < len; i ++){
    console.log(i, nums[i]);
}
5、判断数组（包括其它类型）

// 本书中使用的方法（数组中的length不可枚举，length能否通过for in遍历出来？）
var arr = [];
var obj = {};
var is_array = function(value){
    return value &&  // 判断这个值是否为真
        typeof value === 'object' &&  // 是否为对象
        typeof value.length === 'number' &&  // 是否存在length属性而且值为数字类型
        typeof value.splice === 'function' &&  // 是否存在splice方法
        !(value.propertyIsEnumerable('length'));  // length属性是否可枚举
};
console.log(is_array(arr)); // true
console.log(is_array(obj)); // false

// 判断一个值是否为数组（最常用的方法）
function isArray(value){
    return Object.prototype.toString.call(value) === '[object Array]';
}
var arr = [];
var num = 1;
var bool = true;
var str = 'string';
var obj = {};
var func = function(){};
console.log(isArray(arr)); // true
console.log(Object.prototype.toString.call(num)); // '[object Number]'
console.log(Object.prototype.toString.call(bool)); // '[object Boolean]'
console.log(Object.prototype.toString.call(str)); // '[object String]'
console.log(Object.prototype.toString.call(obj)); // '[object Object]'
console.log(Object.prototype.toString.call(func)); // '[object Function]'
console.log(Object.prototype.toString.call(null)); // '[object Null]'
console.log(Object.prototype.toString.call(undefined)); // '[object Undefined]'
// PS: 使用该方法的前提是Object对象的toString()方法没有被重写
6、方法
JS提供了一套用于操作数组的方法，这些方法被存放在Array.prototype中，我们可以通过在Array.prototype中添加方法来扩充数组方法

// 扩充一个方法，每个数组都会继承这个方法
Array.prototype.reduce1 = function(func, value){
    for(var i =0, len = this.length; i < len; i ++){
        value = func(this[i], value);
    }
    return value;
};
var arr = [1, 2, 3, 4, 5];
var add = function(a, b){
    return a + b;
};
var mult = function(a, b){
    return a * b;
};
var sum = arr.reduce1(add, 0); // 15
var product = arr.reduce1(mult, 1); // 120

// 因为数组也是对象，所以可以单独给数组添加方法
arr.total = function(){
    return this.reduce1(add, 0);
};
total = arr.total(); // 15
7、维度

// 定义一个初始化数组的方法
Array.dim = function(dimension, initial){
    var a = [], i;
    for(i = 0; i < dimension; i ++){
        a[i] = initial;
    }
    return a;
}
// 创建一个包含6个6的数组
var myArray = Array.dim(6, 6); // [6, 6, 6, 6, 6, 6]

// 多维数组
var matrix = [
    [0, 1, 2],
    [3, 4, 5],
    [6, 7, 8]
];
matrix[2][0]; // 6

// 数组矩阵
Array.matrix = function(m, n, initValue){
    var i, j, a, mat = [];
    for(i = 0; i < m; i ++){
        a = [];
        for(j = 0; j < n; j ++){
            a[j] = initValue;
        }
        mat[i] = a;
    }
    return mat;
}
// 创建一个用6填充的4×4矩阵
var myMatrix = Array.matrix(4, 4, 6);
console.log(myMatrix[3][3]); // 6

// 创建一个恒等矩阵
Array.identity = function(n){
    var i, mat = Array.matrix(n, n, 6);
    for(i =0; i < n; i ++){
        mat[i][i] = 8
    }
    return mat;
}
var myMatrix1 = Array.identity(4);
console.log(myMatrix1[3][2]); // 6
console.log(myMatrix1[3][3]); // 8
正则表达式

正则表达式是一门简单语言的语法规范，它以方法的形式被用于对字符串中的信息进行查找、替换和提取操作。
处理正则表达式的方法主要有：regexp.exec、regepx.test、string.match、string.replace、string.search、string.split。

正则表达式常用字符说明：

点字符：. 匹配除回车（\r）、换行(\n) 、行分隔符（\u2028）和段分隔符（\u2029）以外的所有字符。
位置字符：^ 表示字符串的开始位置，$ 表示字符串的结束位置。
选择字符：| 表示“或”，如，a|b，表示匹配a或b。
转义符：\ 用来转义正在表达式中有特殊含义的字符，如+、-、?等，如，\+，表示匹配 + 。
脱字符： [^abc] 表示匹配除a、b、c之外的任意字符。
连字符：[0-9] 表示匹配0~9的数字。[A-Z] 表示匹配A到Z的26个大写字母。
预定义模式：
预定义模式常见模式的简写方式
重复类：{n,m} 表示重复不少于n次，不多于m次。
量词符：
1、a? 表示匹配a出现0次或1次，等同于a{0,1}。
2、a* 表示匹配a出现0次或多次，等同于a{0,}。
3、a+ 表示匹配a出现1次或多次，等同于a{1,}。
贪婪模式：默认情况下都是最大可能匹配，即匹配直到下一个字符不满足匹配规则为止。这被称为贪婪模式。
非贪婪模式：
1、*? 表示某个模式出现0次或多次，匹配时采用非贪婪模式。
2、+? 表示某个模式出现1次或多次，匹配时采用非贪婪模式。
修饰符：
1、g 修饰符表示全局匹配（global）。
2、i 修饰符表示忽略大小写（ignorecase）。
3、m 修饰符表示多行模式（multiline），会修改^和$的行为。
组匹配：(abc) 表示组匹配，正则表达式的括号表示分组匹配，括号中的模式可以用来匹配分组的内容。
非捕获组匹配： (?:abc) 表示非捕获组匹配，非捕获组匹配不返回该组匹配的内容，即匹配的结果中不计入这个括号（匹配分组）。
组匹配和非捕获组匹配的区别：
1、使用exec和match方法时会把组匹配放入到exec和match方法返回的匹配数组（匹配分组）中。
2、非捕获组匹配性能要比组匹配性能好。
1、例子

// 匹配URL的正则表达式
var parse_url = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/;

var url = 'http://www.better.com:8080/goodparts?q#fragment';

// 使用正则表达式的exec()方法，该方法返回一个匹配数组
var result_arr = parse_url.exec(url);
var names = ['url', 'scheme', 'slash', 'host', 'port', 'path', 'query', 'hash'];
var line_end = '\n';
var i;
for(i = 0, len = names.length; i < len; i ++){
    console.log(names[i] + ' : ' + result_arr[i] + line_end);
}
// 输出结果：
// url : http://www.better.com:8080/goodparts?q#fragment
// scheme : http
// slash : /
// host : www.better.com
// port : 8080
// path : goodparts
// query : q
// hash : fragment

// 匹配数字的正则表达式
var parse_num = /^-?\d+(?:\.\d*)?(?:e[+\-]?\d+)?$/i;
var test_num = function(num){
    return parse_num.test(num);
}
console.log(test_num('1')); // true
console.log(test_num('-1')); // true
console.log(test_num('0.01')); // true
console.log(test_num('0.')); // true
console.log(test_num('1.2.3')); // false
console.log(test_num('123.45e-67')); // true
console.log(test_num('123.45E+67')); // true
console.log(test_num('123.456D-7')); // false
// 通常用非捕获型分组来代替少量不优美的捕获型分组是很好的方法
// 因为捕获会有性能上的损失。
2、结构
正则表达式有两种创建方式：

// 最常用的方式（字面量）
var reg = /^\d+$/g;
console.log(reg.test(123)); // true
console.log(reg.test('123s')); // false

// 使用RegExp构造器，这时的反斜杠（\）和字面量中有不同的含义
// 通常需要双写反斜杠进行转义
var reg = new RegExp('^\\d+$', 'g');
console.log(reg.test(123)); // true
console.log(reg.test('123s')); // false
方法

JavaScript有不少内置对象，比如，Array,Date,RegExp,Error,Math以及基本数据类型的封装对象，Number,Boolean,String等，这些内置对象都提供许多操作该类型的属性和方法，这些方法存放在内置对象中或者内置对象的原型对象中。

1、Array

// array.concat(item...)方法，连接数组
var a = [1, 2, 3];
var b = ['a', 'b', 'c'];
var c = a.concat(b, true); // [1, 2, 3, "a", "b", "c", true]

// array.join(separator)方法，该方法性能优于+运算符连接字符串
var a = ['a', 'b', 'c'];
var c = a.join(' @ '); // "a @ b @ c"

// array.pop()方法，移出数组中最后一个元素，如果数组为空，则该方法返回undefined。
// array.pop()方法和array.push()方法组合使用可以模拟后进先出队列
var a = ['a', 'b', 'c'];
var c = a.pop(); // 'c'
console.log(a); // ['a', 'b']

// 实现pop()方法
Array.prototype.pop = function(){
    return this.splice(this.length - 1, 1)[0];
};

// array.push(item...)方法，在数组末尾添加元素
var a = [1, 2, 3];
var b = ['a', 'b', 'c'];
var c = a.push(b, true); // 5，返回新数组的长度
console.log(a); // [1, 2, 3, ['a', 'b', 'c'], true]

// 实现push()方法
Array.prototype.push = function(){
    // 把push方法的参数添加到splice方法的第三个参数中
    this.splice.apply(this, [this.length, 0].concat(Array.prototype.slice.apply(arguments)));
    return this.length;
};

// array.reverse()方法，反转数组中元素的顺序。
var a = [1, 2, 3];
var b = a.reverse(); // [3, 2, 1]

// array.shift()方法，移出数组中的第一个元素，如果数组为空，则该方法返回undefined。
// shift方法通常比pop方法慢得多
var a = [1, 2, 3];
var b = a.shift(); // 1
console.log(a); // [2, 3]

// 实现shift方法
Array.prototype.shift = function(){
    return this.splice(0, 1)[0];
};

// array.slice(startIndex, endIndex)方法，截取数组
var a = [1, 2, 3];
console.log(a.slice(0, 1)); // [0]
console.log(a.slice(1)); // [2, 3]
console.log(a.slice(1, 3)); // [2, 3]

// array.sort(comparefn)方法,对数组进型排序
// 不传比较函数，默认的比较函数会把所有元素转化为字符串然后再进行比较
var a = [3, 1, 5, 23, 16, 8];
console.log(a.sort()); // [1, 16, 23, 3, 5, 8]

// 使用比较函数
var a = [3, 1, 8, 5, '4', 23, 16, 8];
var compareFun = function(a, b){
    return a - b;
};
console.log(a.sort(compareFun)); // [1, 3, "4", 5, 8, 8, 16, 23]

// array.splice(startIndex, delCount, insertItem)
var a = [1, 2, 3, 4, 5];
var b = a.splice(2, 1, 6, 6); // [3] ,返回被移除的元素数组
console.log(a); // [1, 2, 6, 6, 4, 5]

var a = [1, 2, 3, 4, 5];
var b = a.splice(2, 1, [6, 6]); // [3] ,返回被移除的元素数组
console.log(a); // [1, 2, [6, 6], 4, 5]

// array.unshift(item...)方法，把元素添加到数组的首部
var a = [1, 2, 3, 4];
var b = a.unshift(0); // 5，返回新数组的长度
console.log(a); // [0, 1, 2, 3, 4]

// 实现unshift()方法
Array.prototype.unshift = function(){
    this.splice.apply(this, [0, 0].concat(Array.prototype.slice.apply(arguments)));
    return this.length;
};
操作数组的方法都存放在Array.prototype原型对象中，其中，包括ES5和ES6新增的数组方法，如forEach,reduce,map,entries,every,some等方法。

2、Function
函数对象有两个比较常用的方法：apply和call方法。这个两个方法的区别是：前者的参数是以数组的形式传递，而后者这是单个单个的传递。
func.apply(thisArg, argArray)，该方法的第一个参数：将func方法放到thisArg作用域下执行，也就是说，将func方法的this指向thisArg，第二个参数（可选）：要传递给func方法的参数数组。func.call(thisArg, arg1, arg2, ...)。

// 利用apply方法实现bind方法
Function.prototype.bind = function(that){
    // 返回一个函数，调用这个函数就像它是that对象的方法一样
    var self = this;
    console.log('self: ', self);
    var slice = Array.prototype.slice;
    console.log('arguments: ', arguments);
    var args = slice.apply(arguments, [1]);
    return function(){
        return self.apply(that, args.concat(slice.apply(arguments, [0])));
    };
};

var test = function(){
    return this.value;
}.bind({value: 'Better'});
console.log(test()); // 'Better'
3、Number
Number对象提供了很多操作数字的方法。这些属性和方法存放在Number对象或者Number.prototype原型对象中。

// number.toExponential(fractionDigits)，该方法把number转换成一个指数形式的字符串。
console.log(Math.PI.toExponential()); // 3.141592653589793e+0
console.log(Math.PI.toExponential(0)); // 3e+0
console.log(Math.PI.toExponential(2)); // 3.14e+0

// number.toFixed(fractionDigits)，该方法把number转换成一个十进制形式的字符串。
console.log(Math.PI.toFixed()); // 3
console.log(Math.PI.toFixed(0)); // 3
console.log(Math.PI.toFixed(2)); // 3.14

// number.toPrecision(precision)，该方法把number转换成一个十进制形式的字符串，precision是有效数字的位数
console.log(Math.PI.toPrecision()); // 3.141592653589793
console.log(Math.PI.toPrecision(2)); // 3.1
console.log(Math.PI.toPrecision(4)); // 3.142

// number.toString(radix)，该方法把number转换成一个字符，radix表示进制基数
console.log(Math.PI.toString()); // 3.141592653589793
console.log(Math.PI.toString(2)); // 11.001001000011111101101010100010001000010110100011
console.log(Math.PI.toString(8)); // 3.1103755242102643
console.log(Math.PI.toString(16)); // 3.243f6a8885a3
4、Object

// object.hasOwnProperty(name)，该方法用来检查某个对象是否包含某个属性或者方法，
// 该方法不会检测原型链中的属性和方法
var obj1 = {member: true};
var obj2 = Object.create(obj1);
console.log(obj1.hasOwnProperty('member')); // true
console.log(obj2.hasOwnProperty('member')); // false
console.log(obj2.member); // true
5、RegExp

regexp.exec(string)方法是正则表达式中最强大（和最慢）的方法。如果它成功的匹配，它会返回一个数组。数组中下标为0的元素将包含正则表达式regexp匹配的子字符串。下标为1的元素是分组1捕获的文本，下标为2的元素是分组2捕获的文本，依次类推。如果匹配失败，则返回null。
regexp.test(string)方法是正则表达式中最简单（和最快）的方法。如果匹配成功，返回true，否则，返回false。不要对这个方法使用g标识。
// regexp.exec(string)，匹配邮箱
var regexpEmail = /^(\w+)@(\w+\.\w{2,4})$/;
var QQEmail = '924902324@qq.com';
var gmail = 'liaolongdong@gmail.com';
console.log(regexpEmail.exec(QQEmail));

// 0: "924902324@qq.com"
// 1: "924902324"
// 2: "qq.com"
// index: 0
// input: "liaolongdong@gmail.com"

console.log(regexpEmail.exec(gmail));

// 0: "liaolongdong@gmail.com"
// 1: "liaolongdong"
// 2: "gmail.com"
// index: 0
// input: "liaolongdong@gmail.com"

// regexp.test(string)
var a = /&.+;/.test('Better & Beans'); // true

// 实现test方法
RegExp.prototype.test = function(string){
    return this.exec(string) !== null;
};
6、String
操作字符串的方法大多数都存放在String.prototype原型对象中

// string.charAt(pos)方法，返回string中pos位置的字符
var name = 'Better';
console.log(name.charAt(-1)); // ''
console.log(name.charAt(1)); // 'e'
console.log(name.charAt(8)); // ''

// 实现charAt方法
String.prototype.charAt = function(pos){
    return this.slice(pos, pos + 1);
};

// string.charCodeAt(pos)方法，返回string中pos位置处的字符的字符编码。
var name = 'Better';
console.log(name.charCodeAt(-1)); // NaN
console.log(name.charCodeAt(1)); // 101
console.log(name.charCodeAt(name.length)); // NaN

// string.concat(string...)方法，把字符串连接起来构造一个新字符串
// 这个方法比较少用，因为连接字符串使用+运算符更方便
var str = 'B'.concat('i', 'g'); // 'Big'

// string.indexOf(searchString, position)，在string中查找另一个字符串searchString
// 如果查找到，返回第一个匹配字符的位置，否则，返回-1
var name = 'Better';
console.log(name.indexOf('t')); // 2
console.log(name.indexOf('t', 3)); // 3
console.log(name.indexOf('Bet')); // 0
console.log(name.indexOf('BB')); // -1

// string.lastIndexOf(searchString, position)，该方法和indexOf方法类似
// 这个方法是从字符串末尾开始查找而不是从头开始查找
var name = 'Better';
console.log(name.lastIndexOf('t')); // 3
console.log(name.lastIndexOf('t', 2)); // 2
console.log(name.lastIndexOf('BB')); // -1

// string.localeCompare(that)，该方法用于比较两个字符串。
console.log('a'.charCodeAt(0)); // 97
console.log('A'.charCodeAt(0)); // 65
console.log('a'.localeCompare('A')); // -1
console.log('A'.localeCompare('a')); // 1
console.log('a'.localeCompare('a')); // 0
console.log('aa'.localeCompare('a')); // 1

var m = ['AAA', 'A', 'aa', 'a', 'Aa', 'aaa'];
m.sort(function(a, b){
    return a.localeCompare(b);
});
console.log(m); // ["a", "A", "aa", "Aa", "aaa", "AAA"]

// string.match(regexp)，如果没有g标识符，和使用regexp.exec(string)的结果相同
// 如果regexp带有g标识符，那么它返回一个包含除捕获分组之外的所有匹配数组
var text = '<html><body class="center"><p>' +
            'This is <b>bold</b>!</p></body></html>';
var tagsReg = /[^<>]+|<(\/?)([A-Za-z]+)([^<>]*)>/g;
var a, i;
a = text.match(tagsReg);
for(i = 0, len = a.length; i < len; i ++){
    console.log('[' + i + '] ' + a[i]);
}
// 结果：
// [0] <html>
// [1] <body class="center">
// [2] <p>
// [3] This is
// [4] <b>
// [5] bold
// [6] </b>
// [7] !
// [8] </p>
// [9] </body>
// [10] </html>

// string.replace(searchValue, replaceValue)
//该方法对string进行查找和替换操作，然后返回一个新的字符串。
// searchValue可以是字符串或者正则表达式，如果为字符串，只会替换第一个匹配
var string = 'fall_in_love_with';
console.log(string.replace('_', '-')); // fall-in_love_with

// 如果searchValue是一个正则表达式而且带有g标识符，那它将替换所有匹配
// 如果没有带g标识符，那么它仅替换第一个匹配的位置。
var string = 'fall_in_love_with';
console.log(string.replace(/_/g, '-')); // fall-in-love-with
console.log(string.replace(/_/, '-')); // fall-in_love_with

var oldareacode = /\((\d{3})\)/g;
console.log('(555)666-1212'.replace(oldareacode, '$1-')); // 555-666-1212

// 如果replaceValue是一个函数，此方法将对每个匹配依次调用，
// 并且该函数返回的字符串被用作替换文本。传递给这个函数的第一个参数是整个被匹配的文本。
// 第二个参数是分组1捕获的文本，下一个参数是分组2捕获的文本，依次类推
String.prototype.entityify = (function(){
    var character = {
        '<': '<',
        '>': '>',
        '&': '&',
        '"': '"'
    };
    return function(){
        return this.replace(/[<>&"]/g, function(c){
            return character[c];
        });
    }
}()); // 这里使用立即执行函数
console.log('<&>'.entityify()); // <&>

// string.search(regexp)，该方法和indexOf类似，
//区别是该方法只能接受一个正则表达式作为参数而不是字符串
var strSay = 'I fell in love with you at first sight !';
console.log(strSay.search(/love/)); // 10
console.log(strSay.search(/hate/)); // -1

// string.slice(start, end)，截取字符串
var strSay = 'I fell in love with you at first sight !';
console.log(strSay.slice(2, 23)); // fell in love with you
console.log(strSay.slice(24)); // at first sigth
console.log(strSay.slice(-7)); // sigth !

// string.split(separator, limit)，该方法把字符串分割成一个字符串数组。
// separator参数可以是字符串也可以是正则表达式
// limit参数可选，该参数用来限制被分割的片段数量
var digits = '0123456789';
console.log(digits.split('')); // ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
console.log(digits.split('', 6)); // ["0", "1", "2", "3", "4", "5"]

var ip = '192.168.1.0';
var str = '|a|b|c|';
console.log(ip.split('.')); // ["192", "168", "1", "0"]
console.log(str.split('|')); // ["", "a", "b", "c", ""]

var text = 'first, middle  , last';
console.log(text.split(/\s*,\s*/)); // ["first", "middle", "last"]

// PS：来自分组捕获的文本将会被包含在被分割的数组中
var text = 'first, middle  , last';
console.log(text.split(/\s*(,)\s*/)); // ["first", ",", "middle", ",", "last"]

// string.substring(start, end)，该方法和slice方法一样，只是它不能处理负数参数，我们平时可以使用slice替代它

// string.toLocaleLowerCase()和string.toLowerCase()，把字符串的字母转换成小写
console.log('ABCabc'.toLocaleLowerCase()); // 'abcabc'
console.log('ABCabc'.toLowerCase()); // 'abcabc'

// string.toLocaleUpperCase()和string.toUpperCase()，把字符串的字母转换成大写
console.log('ABCabc'.toLocaleUpperCase()); // 'ABCABC'
console.log('ABCabc'.toUpperCase()); // 'ABCABC'

// String.fromCharCode(char...)
console.log(String.fromCharCode(67, 97, 116)); // 'Cat'


It's wrong here . resolve_alias(alias)


使ってるとこない？


`net_udp_process_game_info` ignores the length argument.  If the remaining data is insufficient, `net_udp_process_game_info` will read off the end of the packet.


IE8に対応しないなら不要？


Yeah, had a mind blank on what kwargs was when I did that. I've already changed it back to your way in my version.

I hadn't encountered all the argparse stuff before and had spent a while getting used to that, but couldn't work out how kwargs fit in. Afterward when I looked at it again after the commit I remembered it was just "any number of keyword arguments" and that I just needed to add save=args.save.


J’ai mis tout un tas de commentaires, mais l’ensemble est plutôt bon :)


AFAIK `/proc/self/cmdline` can be up to 4096 (`PAGE_SIZE`), so having a small initial capacity might cause a few more reallocations, right? Perhaps 1KB (1024) is better aligned for general cases?


Great! No more BS like

    ln: failed to create hard link '/boot/initrd.img-3.14.79-odroidc2.dpkg-bak' => '/boot/initrd.img-3.14.79-odroidc2': Operation not permitted

any more. 👍


Okay. But there is a rule that calls for setting `font-size` to `62.5%` on `html` (root) element. It is dictated by the fact that default font size may vary between different browsers even though nowadays the standard font size is `16px` and when you make it percentage it will be still dependent on the default size even more the default browser font size may be set by user.


I'll look into it tonight for a bit


I think your talking about a view width. It's a responsive measure based on the viewers screen. An alternative to % or px.
Ryan

Sent from my iPhone

> On Oct 11, 2016, at 7:30 PM, Douglas Kelly <notifications@github.com> wrote:
>
> @ryanlynnhorlacher What's a vw?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.
>


Should this be `TxJob` instead of `TxModule`?


Because values.size is a long.


Interesting. Great to know.


So – please change the fixed `10px` value to percentage `62.5%` that really is `10px` in most cases.


TeamCity SayMore :: SayMore pull requests [Build *.*.3.3dad968f316c1cc48da6edaa7f721fa7acc1d74f](http://build.palaso.org/viewLog.html?buildId=77761&buildTypeId=SayMore_SayMorePullRequests) outcome was **FAILURE**
Summary: Compilation error: src\SayMore\SayMore.csproj; compilation error: src\SayMoreTests\SayMoreTests.csproj Build time: 00:00:52


Will fix tomorrow!


I guess because the delete doesn't just delete the item but the destructor also calls removeChild on the item's parent. So here's what would happen: The root item always has two children. So there should be two iterations in the while loop, but there actually was only one. In this one iteration the first child gets deleted properly but then the second child becomes the first and is then removed because of the second line - not deleted though! And because it's inaccessible for us from that point on it's leaking.

Putting it this way, the code can be simplified a bit. I'll try that in a second and check if it's still leaking.


Oh right! Good point.

But I suppose we may as well anticipate for future extension, so using BigInteger here seems fine.


някакви опити


To be more precise: vendor prefixes should only appear in output/compiled code that is for browser, not in the code that is for developers.


Do you have post as same for windows too


How would this count? Exit 0 is what I get.
Connection is safe against Lucky 13 attack:no ( TLSv1:DES-CBC3-SHA TLSv11:DES-CBC3-SHA TLSv12:DES-CBC3-SHA)


sd


Yep, can be simplified without leaking again. See 34246120d89042602c00d6f09903e97bd7008c3c


adscasdv


Maybe, I don't know. Go for example uses 512 bytes as a default, so they reallocate too. In my case the returned string was pretty small.


Got it, thanks. You're meaning something like:

    auto child = rootItem->child(0);
    delete child;
    rootItem->removeChild(child);

?

I don't know Qt enough, but it looks like delete should come after removing it from UI :-?


Yup, the global font size should be declared in the `html`. I hope you know that `font-size` value is [inherited](https://developer.mozilla.org/en-US/docs/Web/CSS/inheritance) but it would do not harm to remind this here.


TeamCity SayMore :: SayMore pull requests [Build *.*.4.3dad968f316c1cc48da6edaa7f721fa7acc1d74f](http://build.palaso.org/viewLog.html?buildId=77764&buildTypeId=SayMore_SayMorePullRequests) outcome was **FAILURE**
Summary: Compilation error: src\SayMore\SayMore.csproj; compilation error: src\SayMoreTests\SayMoreTests.csproj Build time: 00:00:40


why is this change necessary?


I think it will work if you change this back to `before_script`


I think we can rollback this commit. Agree @FKSI ?


images && images[0] && imageWithOnLoad(images[0].url);


BTW: On ODROID-C2 (and most likely C1 as well) it seems all cpufreq governors are broken except of `conservative`. Any objections from your side to change the default?


The rule is: In 21st century we should not use rems/ems to declare margins and paddings. These units are not intended for this purpose, but for fonts. I recommend you to use only pixels (and neither rems/ems nor viewport units – vh, vh) for: margins, paddings, width and height. The only case you can use `vw`/`vh` is to set width or height certain element/section that is explicitly dependent on viewport size.


:act_as is specific to delegation.  instead use opts[:xanchor_mailbox_address] then the calling application should populate opts[:xanchor_mailbox_address] with the correct value.


'template for genome submission'


Totally, but I  can't do it (left my 💻 at the 🏢)


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#CdZwcxZxRHqf0xqOFy7KyA/


I guess it all depends what we can expect to come back from the bot. I'm generally expecting things to be well formed. In this case I'm assuming that if the images field exists then it contains, you know, an image.

We should check with Other Dan. If we can't assume this, then we have lots of other code to fix.


Given that audio is always enabled (disabling it implies major changes to pru_rtaudio.p and PRU.cpp), why not just retrieve bufferDuration from the number of audio frames and the audio sample rate?

I don't see any reason to have a redundant item in BelaContext. I also would like to keep it as compact as possible. TBH I don't even really like adding all the capelet variables in there (though I did it), but a solution that scales to arbitrary future extensions will have to wait for a future release.

If for whatever reason `bufferDuration` needs to be calculated that way, then I would just pass another argument to `PRU::initialise()`.


How about having "default style" for every basic HTML tags (Headings, lists etc...) so one can even use the toolkit out-of-the-box with basic HTML?


Haha I didn't expect anyone to notice. Most computer scientists have an ad blocker (it doesn't detect me for example) but it should be interesting anyways. I'll give you guys access


good error message!


> Any objections from your side to change the default?

Can't say anything since don't know what is broken and why, needs more info.


You're right, it probably should be :smiley: But at least in this case it doesn't seem to matter as delete actually does a removeChild by itself. So the call to removeChild can be deleted entirely.

This seems to be the line in the Qt source which does that:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/itemviews/qtreewidget.cpp?id=b37539442f58fc7c0ba54380f07b132a15a037e8#n1501


@igorpecovnik @ThomasKaiser
This needs testing on both boards


It looks like this has been corrected since this PR was put in.  See [this commit](https://github.com/saltstack/salt/pull/36476/commits/755c069fb94d33de6b7a04f7a07d2d29d9ba0ef8).


![](https://github.trello.services/images/mini-trello-icon.png) [Mettre en place la compilation automatique de LESS vers CSS](https://trello.com/c/TLMGr5RP/19-mettre-en-place-la-compilation-automatique-de-less-vers-css)


![](https://github.trello.services/images/mini-trello-icon.png) [Trouver un moyen de récupérer un pdf.js qui va bien avec text_layer_builder.js qui fonctionne](https://trello.com/c/mw4rVBPy/13-trouver-un-moyen-de-recuperer-un-pdf-js-qui-va-bien-avec-text-layer-builder-js-qui-fonctionne)


Don't quite see how, in a straightforward manner (at least not in Java). Index  0 should return the same as first. Only other thing I currently can think of is passing for the index values.size - index - 1.


@halter73 Thanks for the clarification. Saw the first AV with both the pre-built Kestel version 1.1.0-alpha1-22324 and also with commits up to [3177ba0](https://github.com/aspnet/KestrelHttpServer/commit/3177ba0aaeb775e8347ebdc103b12c37f5e6cf44).

Noticed the second AV, also with commits up to [3177ba0](https://github.com/aspnet/KestrelHttpServer/commit/3177ba0aaeb775e8347ebdc103b12c37f5e6cf44).  This AV was tough to catch and occurred in around ~1% of our test runs. Originally saw this with the JSON scenario of TechEmpower, when run with a threadCount of 42 (this TC yielded max. throughput on our setup). Haven't seen this with the latest dev branch bits yet and shall get back if it happens.


What I mean: you declare width and height for two classes (which means that should be only one class) and, moreover, you subsequently overwrite the width for one of those.
So: the `.person-img` has `width: 20px` and below it has `width: 25px`. Thus I recommend you to move all common properties to one generic class (`.img`) and the specific properties to `.person-img` and `date-img` classes. You can use more than one class in your HTML code (`<img class="img person-img">`), though.


Missing href. Use `Shared.onClick` cancel bubbling.


> Idè: Hva om #Language, #Content og #Footer flyttes inn i en Div ID som bare inneholder dem?

Vil vi ikke da bare kunne bruke body taggen i stedet? Men kan kan sikkert endre det om det dukker opp et behov :)


oic ok!


You can try `git pull --rebase` next time this happens.


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#L0GkewkzShaEKa1ofuLjXg/


The whole idea for not implementing "enabled" in resume function is to ensure if device is ever suspended and someone turns off state notifier driver, device do come out of suspend.

Even if function is called during init, state_suspended boolean will remain false  till device goes to sleep and state notifier is enabled. So, there is NO queuing of work and thus clients are not asked to resume as such.

To conclude, if you see "resume called" in log, it is safe. There is no actual resume work as device was not suspended. Please correct me if still logic is not working.


this design originiated from Adobe Dreamweaver
with just some jquery and bootstrap modifications and a responsive welcome page
rilling in your clients with a mariculous UI Design.
Enjoy! And Rearrange in any way you like... new to this repository thing.


Two problems: `interactive` (or whatever kernel default) wins always (due to [`cpufrequtils` startscript being broken](http://forum.odroid.com/viewtopic.php?f=141&t=23964)) and then `interactive` itself is broken with meson kernel since always remaining at the highest clockspeed and therefore being fed with unnecessary high `VDD_CPUX` voltage.


Upgrating to master failed due to ```delegateHandle``` being undefined. The stacktrace is
```
 TypeError: Cannot read property 'length' of undefined
    at k (ionic.bundle.min.js:136)
    at new <anonymous> (ionic.contrib.drawer.vertical.js:59)
    at Object.invoke (ionic.bundle.min.js:75)
    at S.instance (ionic.bundle.min.js:122)
    at n (ionic.bundle.min.js:98)
    at g (ionic.bundle.min.js:92)
    at n (ionic.bundle.min.js:99)
    at g (ionic.bundle.min.js:92)
    at ionic.bundle.min.js:91
    at x.appendViewElement (ionic.bundle.min.js:471)
```


What if q=30, k=5 ? Will k always be a valid number?


Now fires due to protocol changes, but can be also triggered by missed packet.


Nobody adds "lol" in their logs – it's a great string to filter on. :)


The most important part of writing down values is using the values!


So name these classes on WHAT they style, not HOW they style. You can also use pseudoclasses like `:first-child` or `:first-of-type` if this is the case.


i = start_inner_index[0]; i < end_inner_index[0]; i++


Скрипт там не работает. Надо пофиксить TinyIB доски, перенести класс в движки.


Exactly!


i = start_outer_index[0]; i < end_outer_index[0]; i++


Hi,

In datatable.ts, the logic branches on "scrollable". This feature was not implemented taking that into account.
Pull request #938 has a fix for it.

Any idea when this pull request is going to be reviewed?

Thanks


I was fine, fine with PLUM but Berry isn't a color I'm sorry.


Maybe "RASBERRY" or "RED_APPLE"


Скрипт там работает и без этого. И вообще, никому не нужная иностранная мелкоборда с лошадьми.


Keep in mind that I see only the code. ;)


2chru.net умер


Okay, you can do it this way.


bah, I meant to push this to my fork and do a pr! sorry


uchan.to умер


I didn't realize the remote was setup to this repo


For some reason, Lint has not warned us that `Context.getDrawable()` is only available on API 21+ 😕


You could have used [record](https://crystal-lang.org/api/0.19.4/toplevel.html#record%28name%2C%2Aproperties%29-macro) for this :-)


`virtual`


Needs documentation


You need to mark `getFetchPack` as `override` in the declaration of `LedgerMaster`


ты продаешь байки, называй сущности соответственно и в единственном числе
Product -> Bike
Sprots -> SportByke


I presume you didn't move the directory locally to the new path.


pretty sure berry is a color. as backed up by the internet: http://digitalsynopsis.com/wp-content/uploads/2014/09/color-thesaurus-correct-names-red-shades.jpg


FYI this change broke API compatibility by returning a promose instead of taking a callback


this aligns the ANSI output of the SSLv3 output line, when testing all protocols offered, with all other lines, as it removes an additional sequence of ESC[m at the beginning of the line.

before: [m[1m SSLv3               [m[1;32mnot offered (OK)[m
after: [1m SSLv3               [m[1;32mnot offered (OK)[m


если уж решил делать factory, то выноси в отдельный класс всю ее логику,
Твои сущности(модель или домен) не должны содержать такой логики.
метод init - к нему тоже это относится.


No problem. Invisible PR retroactively approved 👍


Looking at this again, I suggest passing it directly into `ListenAndServe` so it mounts at the root. In this setup, this would run as a distinct service, so there is no reason to namespace the elastic functionality.


Why is this deprecated? Did it cause problems or is it just because nobody ever used this?


lol thx!


  public static final int HEAVY = 1;
  public static final int SPORTS = 2;
можно и так, но попробуй написать, используя enum, это лишь для того, чтобы ты поработал с этим типом данных


Do we have the same issue in composite trace writer?


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#eAufowRSTy-IUJnxEnSR6w/


  @Override
    public String toString(){
        return "Product " + "model: '" + getModel() + '\'' + ", price: " + getPrice();
    }
я показывал ToStringBuilder попробуй подключить его в мавене и использовать у себя в коде


I think LidarLite is now available from several vendors: https://buy.garmin.com/en-US/US/oem/sensors-and-boards/lidar-lite-v3/prod557294.html


In general, libraries should never panic. They should always pass the error back to the caller. In this case, the client is the caller and the interface is HTTP, so a response with a proper message should be returned such as `http.StatusUnprocessableEntity` (422) with a body container the error.


@iamruinous could this be a culprit? Just guessing. Timing fits.


@DomT4, @dwmw2:  Should we continue this discussion in a new issue by opening one and giving it a ['needs response' label](https://github.com/Homebrew/homebrew-core/labels/needs%20response)?  @stefwalter hasn't been very helpful here lately.  Perhaps we could go on and take him at his word and moving on on this without him by doing what he suggested, though?  What do you guys think?


@Swilloughby-github did you intend to commit guidelines.txt into the repository?  It looks like something from the in class exercise.  If so, please remove it.


Styling by ID is just a bad practice. You probably have to create a class for each section and this class has not to be `.flights`, though. Do you know the [Specificity Calculator](https://specificity.keegan.st/)?
Regarding the word "zakotwiczone" – I’m pretty sure you want to say the menu has some ID based anchors such as `#flights`, probably `#about`, `#contact` and so on. That’s it.


Actually this _is_ a server error since it is attempting to encode the output of `EncodeQuery`, so it should be a 500.


Please replace the `e.printStackTrace()` boilerplate at a minimum with calls to the logger.


All of the above can be simplified to this:

```go
b, err := ioutil.ReadAll(r.Body)
e := EncodeQuery(b)
```


I agree with John. My apologies for giving a hasty wrong answer to #84, I have been away from Remi for several months but hoping to catch up soon.

The observation I was making in #84 was that dialogs are the same as ordinary pages except that they 'interrupt' an ordinary page and return to it when the dialog is closed. As such I saw no reason why dialogs should be limited to append and append-with-label which add a new field vertically under the previous field. If they has add-field then the dialog could be any format just like an ordinary page.

Having said the above you can fudge it and make dialogs any format you like by appending a container to the dialog and then add-fields to the container. I di this quite extensively in the web based editor for Pi Presents.


Edited the previous code snippet.


Nice. The red definitely works!


Please write each selector from new line


Env var is npm convention, feel free to add comment, opt in was to be backwards compatible

Sent from my iPhone

> On Oct 12, 2016, at 12:29 PM, jongleberry <notifications@github.com> wrote:
>
> a comment would've been nice. or an env var name that made sense. why is it opt-in though? should be opt-out. if (process.CI) return;
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
>


Package level types and function names should be explicit, but not redundant. Since this is a package for _translating_ queries, the `Translate` prefix is unnecessary. It should only become so if there were other functionality added. Also constructors are generally prefixed with `New` to make their purpose clear.

Another thing you can do is initialize a package level handler since there is no configuration that needs to be set.

```go
var Handler http.Handler

func init() {
    mux := http.NewServeMux()
    mux.HandleFunc("/", handler)
    Handler = mux
}
```


@igorpecovnik I'm testing Roseapple Pi so please play the Guitar (is it still 'mine' or did LeMaker send you another one?)


Sorry - we need to use an explicit cast on flash target.


We added the Angular Router to navigate among different components.
We learned how to create router links to represent navigation menu items.
We used router link parameters to navigate to the details of user selected hero.
We shared the HeroService among multiple components.
We moved HTML and CSS out of the component file and into their own files.
We added the uppercase pipe to format data.
We refactored routes into a Routing Module that we import.


A language spec would be very useful for this to make sure we don't regress and notice in a much easier way than full integration tests.


Change to `translateHandler` or something rather than have a `t` prefix which is meaningless.


My results for _master_ are:
```
     Running target/release/horrorshow-00b3670205db60b5

running 3 tests
test bench_long      ... bench:       4,716 ns/iter (+/- 111)
test bench_short     ... bench:         755 ns/iter (+/- 37)
test bench_short_fmt ... bench:       1,296 ns/iter (+/- 10)

test result: ok. 0 passed; 0 failed; 0 ignored; 3 measured

     Running target/release/maud-38f3fce1274841af

running 2 tests
test bench_long  ... bench:       4,069 ns/iter (+/- 74)
test bench_short ... bench:         472 ns/iter (+/- 12)

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured
```
for _revert opt_ are:
```
     Running target/release/horrorshow-00b3670205db60b5

running 3 tests
test bench_long      ... bench:       5,316 ns/iter (+/- 240)
test bench_short     ... bench:         800 ns/iter (+/- 28)
test bench_short_fmt ... bench:       1,335 ns/iter (+/- 53)

test result: ok. 0 passed; 0 failed; 0 ignored; 3 measured

     Running target/release/maud-38f3fce1274841af

running 2 tests
test bench_long  ... bench:       4,075 ns/iter (+/- 206)
test bench_short ... bench:         473 ns/iter (+/- 271)

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured

```

I ran `cargo bench` a few times to make sure it was all properly cached, those are the last results


Tab this line so it's indented like the others inside the try block


__API Description file syntax error on line 952__: named type 'CampusReferenceSerializer' is defined more than once (Autogenerated message from apiary.io)


Not sure what it is @fetzerch but current ios nightlies are missing the binary addons since some weeks...


Although the variance seemed to jump a lot between each run, the time did not change too much... so I am not sure how useful those are


You are right, sorry for the noise.
What I did before: I downloaded CFish Master, and before compiling (as first step) I enabled lto in Makefile. For some reason a very slow binary was created. After make clean and reverting lto and building again, a fast binary is created. In my previous tests lto gave a small plus, I am still very confused about this. Somehow is the mingw-tool-chain not reliable.
Sorry again.


The first result is not guaranteed to have a valid state, so we should find the first one with valid state:
```C++
auto first_result_with_state = std::find(results.begin(), results.end(), [](MatchResult& result){return result.HasState();});
if (first_result_with_state != results.end()) {
baldr::PathLocation origin = matcher->mapmatching().state(first_result_with_state->stateid()).candidate();
}
```
Sorry about the missing documentation.


Improved old methods:
Sprite:getWidth(unmodified)
Sprite:getHeight(unmodified)
New methods:
Sprite:getAnchorPoint()
Sprite:setAnchorPoint(x, y)
Sprite:getClip()


@Evil-Spirit Even more bugs... in "draw occluded lines" mode on master the window looks like this:
![2630](https://cloud.githubusercontent.com/assets/54771/19327693/befa2d54-90bf-11e6-8643-b592fd48312b.png)

This sort of "refactoring" just introduces more bugs instead of fixing things, and is usually a waste of time.


Same here. Use `find(results.rbegin(), results.rend())` to find the last result with valid state.


(([А-Яа-я][А-Яа-я")]+)|[0-9])([\.\?!]|\.\.\.?|\?!|!\?|\?\?\??|!!!?)"?( [А-Я"])|( - [а-я])  // розпізнавання речення


Still needed to move this verification to the **streaming.js** directly.


Does this require a custom `typed_ast` as implied in 5f0d02ccf23ff6588e663b0696525f45080561cb?

Just trying out mypy variable type annotation support using Python 3.6b2, and always get `Parse error before :`


yep. I didn't change that. I assume the maintainer of raspilot had a reason?


(([А-Яа-я][А-Яа-я")]+)|[0-9])([.\?!]|...?|\?!|!\?|\?\?\??|!!!?)"?( [А-Я"])|( - [а-я]) // розпізнавання речення


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#etC9xlgzTT25uHvseREJWQ/


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#I_G1IX4LSSijPxlaFytuvQ/


Didn't want to get the message too long :p
https://github.com/graalvm/truffle/commit/674ff7604972ee10a82fe2be3251c7fb7b4d4ae1


TaskCluster: @owlishDeveloper does not have permission to trigger tasks.


Для читаемости -- на будущее -- обычно удобно разделять vendoring-коммиты (когда ты добавляешь внешнюю библиотеку к себе в репозиторий) и собственные. Так диффы читать проще.


Banaca essa ideia, acho que essa constante poderia ficar num arquivo separado só pra mostrar os erros, ficaria mais fácil pra dar manutenção. Era essa ideia mesmo pra inserir essa informação ..XD


I thought this was deprecated since few versions ago.


You added the wrong graphic for genecabinetright.png. It's a copy of genecabinetleft.png.


The only reason I'd think of is to implement the same kind of cork/push, but in a poor way.  Anyway, I'm all for not changing this behavior since very few people have this hw to test


Awesome!


This requires `typed_ast >= 0.6.1`.  (Try `python3 -m pip install --upgrade typed-ast`.)


If I understand correctly, this Dijkstra algorithm runs on a graph where nodes are identified by (city, set_of_fish_types). The size of this graph is O(N * 2^K), fortunately K <= 10.

Each time a road is evaluated, the set of fish types grows by the fish types available in the new city: `
for (const auto& neighbour: graph[src]) { InQueue(neighbour.first, current_shops | shops[neighbour.first], cost + neighbour.second); }`

Once the whole graph is processed, the shortest_path array contains the time needed to bring all possible combinations of fish to each city. The final double loop checks all possible ways to get all the fish types in the last city by combining two independent sets of fish types.


old


`translationService_ = std::make_shared<TranslationService>(target)`;

make_shared в одну аллокацию конструирует и счетчик, и объект.


Аналогично:
```
auto networkManager = std::make_shared<NetworkManager>();
```


unsa pasabot ana
+<<<<<<< HEAD
+				GET STARTED
+=======
 				GET STARTED
+>>>>>>> c637f868792ada99f1d779caf68a021d94b048b9

?????


TODO: Proper System - stop Rect errors


Those are in-line with my results. @TheNeikos if you feel up to it, could you try applying that patch in the first post against maud and running the maud benchmarks?


cc @isovector


Thanks @cro. This must have been a combination of my job that fetches the
daily updates not working and me not knowing how to view the code on GitHub
properly. I was unlucky enough to get the repo updated somewhere between
the change and the fix. I will have a look at it tomorrow.


Multiple outputs: Maybe toposort?


Если уж валидировать инпут, что будет по коду если я введу на prompt число -5 или -1?


That'll do it.


Hmm. I need to think about this. I always declare typeclasses with superclasses in the type signature, like `record Ord (t : Set) {{_ : Eq t}}`, so my functions are always `f : {t : Set} {{e : Eq t}} {{_ : Ord t}} {{_ : Num t}}`, which is painfully verbose once the hierarchy gets big, but to me feels more... semantically correct.

"Please find exactly one `Eq` which both an `Ord` and `Num` respect" is precisely what I want to say. I can't ever think of a time where I would want to allow two type classes with a common super class to resolve to two instances which disagree in the instance of the superclass.

But this makes things very verbose, unfortunately.


Tu peut créer un object companion et tu override la méthode apply pour mettre des valeurs par defaut
`
object User {
  def apply(email: String, ...) = User(java.util.UUID.randomUUID().toString, email, ...)
}
`


Add the summary of command version for adding turbine using 1D linear momentum here.


Delete vietnam and miami immediately.


The following doc(s) have been deployed to the [codeofcon](https://codeofcon-static-docs.pantheonsite.io/docs) Multidev environment:
- [docs/power-users](https://codeofcon-static-docs.pantheonsite.io/docs/power-users)
- [source/_views/doc.html](https://github.com/pantheon-systems/documentation/commit/5056c17b4c89e663ca0e196bccb1af944af6bcd9/source/_views/doc.html)
- [source/_views/default.html](https://github.com/pantheon-systems/documentation/commit/edbceba061d9ef1331af6ba574a9796be1aa4068/source/_views/default.html)


Write


[x] done:

    bus_id 0
    bus_mfp 0
    pmu_id 3
    vddr_pmu_dcdc_cfg 4
    ddr_clk 588
    ddr_cap 0
    ddr_bits_width 0
    rank 0
    ddr_type 0
    row_col 0
    rdodt 1
    wrodt 1
    zpzq 12
    rx_tx_adfu 1
    uart_id 2
    uart_baudrate 115200
    uart_pad 9
    jtag_pad 0
    bootdev 32
    version 1.1
    scan 1
    busid = 0bus_mfp = 0pmu_id = 3vddr_pmu_dcdc_cfg = 4
    ddr_clk = 0x24c ddr_cap = 0 ddr_bits_width = 0 rank = 0 ddr_type = 0 row_col = 0 rdodt = 1   wrodt = 1 zpzq = c, row_col_detect = 0
    consolse init :port  2, baudrate 115200 mfp 9
    pmu init
    busid = 0bus_mfp = 0pmu_id = 3vddr_pmu_dcdc_cfg = 4
    g_current_bus = 00x51:0x8b1:0x8b1
    0x39:0x325b:0x325b
    0x14:0x88a
    VERSION A:set val = 0x84cf
    0x14:0x84cf:0x84cf
    0x62:0x0
    0x15:0x6cae:0x6cae
    0x16:0x334b:0x334b
    ATC2609A_PMU_SYS_CTL3 = 16512
     ,s2 flag = 0
    enter from s40x3f:0x1e3:0x1e3
    check adfu
    reg_val = 0x0ddr init
    ddr_cap = 0  row_col = 0 row_col_detect = 0
    DRAM init mode0,type0,2cs,x32,588MHz,0x375d.@150616_R...Ok:2048MByte Cap.
    ddr size=2048MB
    load app
    load uboot: load address is 0x8000000, entry point is 0x8000040
    in fourth
    dvfs = 0xc583bb75
    ddr scan = 1
    dvfs maigc = 0x0, dvfs = 0x0ddr_clk = 0x24c ddr_cap = 800 ddr_bits_width = 0 rank = 2 ddr_type = 0 row_col = 0 rdodt = 1   wrodt = 1 zpzq = c, row_col_detect = 68
    SDC0 cfg:(MFP_CTL2=0x0  PAD_PULLCTL1=0x3e001)
    mmc->clock=187500
    low rate:0x100
    mmc->clock=50000000
    high:0x0
    boot sd/emmc init ok
    mmc cap:7774208

    U-Boot 2015.04-armbian (Oct 12 2016 - 22:55:05)Actions-Semi

    DRAM:  mem-size=2048MB
    2 GiB
    PLL:core=0x332,dev=0x1164,bus=0x1c710000,bus1=0x2e004,display=0x164, spead=0x0
    set kinfo addr = 7f700000
    gpio=23,mode=0,val=0
    gpio=25,mode=0,val=0
    gpio=33,mode=0,val=0
    gpio=55,mode=0,val=0
    pwm_init, blob 7deff0c8
    PWM init, node 3872
    not find HOSC dat = 0xca
    ret = 7104
    owl: begin analysis pmu in device tree
    node = 9060
    owl: have for pmu in device tree , node =9060
    pmu_config.bus_id = 0
    pmu_config.dcdc_en_bm  = 14
    pmu_config.dcdc_cfgs[0] = 0
    pmu_config.dcdc_cfgs[1] = 11
    pmu_config.dcdc_cfgs[2] = 10
    pmu_config.dcdc_cfgs[3] = 5
    pmu_config.ldo_en_bm  = 131
    pmu_config.ldo_cfgs[0] = 1
    pmu_config.ldo_cfgs[1] = 7
    pmu_config.ldo_cfgs[2] = 0
    pmu_config.ldo_cfgs[3] = 0
    pmu_config.ldo_cfgs[4] = 0
    pmu_config.ldo_cfgs[5] = 0
    pmu_config.ldo_cfgs[6] = 0
    pmu_config.ldo_cfgs[7] = 3
    pmu_config.ldo_cfgs[8] = 0
    pmu_config.ldo_cfgs[9] = 0
    pmu_config.ldo_cfgs[10] = 0
    pmu_config.ldo_cfgs[11] = 0
    pmu_type = 2
    pmu_config.pwm_config[0].pwm_val = 0x0
    pmu_config.pwm_config[0].mfp.shift = 0
    pmu_config.pwm_config[0].mfp.mask = 0
    ,pmu_config.pwm_config[0].mfp.val = 0
    pmu_config.pwm_config[0].mfp.no = 0
    pmu_config.pwm_config[1].pwm_val = 0x102c3f
    pmu_config.pwm_config[1].mfp.shift = 38
    pmu_config.pwm_config[1].mfp.mask = 7
    ,pmu_config.pwm_config[1].mfp.val = 3
    pmu_config.pwm_config[1].mfp.no = 1
    pmu_config.pwm_config[2].pwm_val = 0x10343f
    pmu_config.pwm_config[2].mfp.shift = 38
    pmu_config.pwm_config[2].mfp.mask = 7
    ,pmu_config.pwm_config[2].mfp.val = 3
    pmu_config.pwm_config[2].mfp.no = 1
    pwm1 val=0x102c3f
    pwm2 val=0x10343f
    0x51:0x8b1:0x8b1
    0x39:0x325b:0x325b
    dcdc_cfgs[1] = 11
    0x11:0xe5cf:0xe5cf
    0x12:0x2cae:0x2cae
    0x13:0x334b:0x334b
    0x17:0x8acf:0x8acf
    0x18:0x254c:0x254c
    0x19:0x338a:0x338a
    pmu init finish!
    begin to check power!
    wall_mv=5046
    ----------the plug_stat is 0-NO_PLUG,1-WALL_PLUG,2-USB_PLUG:1
    ----------bat_voltage = 76
    bat_mv:76
    node_path[2]=/i2c@b0170000/atc2603c@65/atc260x-power
    support type: both DCIN and USB
    low_power_boot_choice is 0
    support_minicharger:1
    MMC:   ERROR: v7_dcache_inval_range - stop address is not aligned - 0x7defd708
    error: SDC2 send CMD8, No rsp
    error: SDC2 send CMD55, No rsp
    error: SDC2 send CMD1, No rsp
    Card did not respond to voltage select!
    slot:2, error mmc_init
    error:-1,owl_sd_init fail
    SD0: 0 (SD), eMMC: 1
    error: SDC2 send CMD8, No rsp
    error: SDC2 send CMD55, No rsp
    error: SDC2 send CMD1, No rsp
    Card did not respond to voltage select!
    MMC init failed
    Using default environment

    bootmode = 0
    sd boot
    ** get_partition_info mmc0:6
    ** Partition 6 not valid on device 0 **
    Failed to register mmc: 0:0
    Failed to register mmc: 0:1
    bootlogo: if=mmc, dev=0
    ** Partition 2 not valid on device 0 **
    Failed to register mmc
    OWL VIDEO: video hw init
    OWL VIDEO: power on
    OWL VIDEO: wait res 998, 113301
    OWL LCD: lcd init
    fdtdec_get_lcd_par
    Can't get lcd mode node
    OWL LCD: fdt No lcd par
    OWL dsi: dsi init
    buf->vaddr  0x7df04370 buf->paddr  0x7df04370
    fdtdec_get_dsi_par0
    Can't get dsi mode node
    OWL dsi: fdt No dsi par
    fdtdec_get_hdmi_par
    fdtdec_get_hdmi_par: resolution  = auto
    fdtdec_get_hdmi_par: not support auto ,we used default vid  = 2112870944
    cvbs_init uboot
    fdtdec_get_cvbs_par: resolution  = PAL
    boot cvbs vid =0
    cvbs boot init
    def_display_name hdmi
    def_display_name  hdmi not found
    bpp 4
    get fb dss, img_w = 1280
    get fb dss, img_h = 720
    In:    serial
    Out:   serial
    Err:   serial
    adckey: AUX0, channel=0
    adckey: keynum=4
    adc_val=1023
    Net:   owl_mac_parse_fdtdec,phy_addr 3
    owl_mac_parse_fdtdec,power-gpio -1
    owl_mac_parse_fdtdec,reset-gpio 88
    owl_mac
    Warning: owl_mac using MAC address from net device
    Update MAC: 74:79:70:65:7d:20
    , usb_ether
    Error: usb_ether address not set.

    Enter s500 to abort autoboot in 2 seconds
    boot from mmc card ...
    ** Unrecognized filesystem type **
    908 bytes read in 26 ms (33.2 KiB/s)
    Jumping to boot.scr
    ## Executing script at 04400000
    33302 bytes read in 35 ms (928.7 KiB/s)
    3353974 bytes read in 380 ms (8.4 MiB/s)
    6154992 bytes read in 680 ms (8.6 MiB/s)
    Kernel image @ 0x007fc0 [ 0x000000 - 0x5deaf0 ]
    ## Loading init Ramdisk from Legacy Image at 01ffffc0 ...
       Image Name:   uInitrd
       Image Type:   ARM Linux RAMDisk Image (gzip compressed)
       Data Size:    3353910 Bytes = 3.2 MiB
       Load Address: 00000000
       Entry Point:  00000000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 04000000
       Booting using the fdt blob at 0x4000000
       Using Device Tree in place at 04000000, end 0400b215
    owl_boot_fdt_setup <NULL>
    read_mi_head, line 429, magic 0x0, length 0, item num 0
    read Head null
    read SN failed
    cmdline: console=ttyS2 earlyprintk clk_ignore_unused selinux=0 scandelay root=/dev/mmcblk0p1 rw console=tty1 rootfstype=ext4 loglevel=1 rootwait  androidboot.dvfslevel=0x705x androidboot.bootdev=sd boot_dev=sd0

    Starting kernel ...

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 3.10.103-s500 (root@armbian) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) ) #1 SMP PREEMPT Wed Oct 12 22:57:52 CEST 2016
    [    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: gs705a, model: Actions GS705A board
    [    0.000000] bootconsole [earlycon0] enabled

    Ubuntu 16.04.1 LTS roseapple ttyS2

    roseapple login:

Everything works as expected. Thank you!

Package update and reboot -- everything works flawlessly:

    roseapple login: tk
    Password:
    Last login: Wed Oct 12 21:13:43 UTC 2016 on ttyS2
     ____                                  _        ____  _
    |  _ \ ___  ___  ___  __ _ _ __  _ __ | | ___  |  _ \(_)
    | |_) / _ \/ __|/ _ \/ _` | '_ \| '_ \| |/ _ \ | |_) | |
    |  _ < (_) \__ \  __/ (_| | |_) | |_) | |  __/ |  __/| |
    |_| \_\___/|___/\___|\__,_| .__/| .__/|_|\___| |_|   |_|
                              |_|   |_|

    Welcome to ARMBIAN Ubuntu 16.04.1 LTS 3.10.103-s500
    System load:   0.63             Up time:       21 sec
    Memory usage:  3 % of 2004Mb    IP:            192.168.83.196
    CPU temp:      45?°C
    Usage of /:    32% of 3.5G

    Attention: Your SD card seems to be very slow. Please check performance using armbianmonitor -c

    tk@roseapple:~$ sudo armbianmonitor -u
    [sudo] password for tk:
    /var/log/armhwinfo.log has been uploaded to http://sprunge.us/hBGc
    Please post the URL in the Armbian forum where you've been asked for.

Now to eliminate the next FAT problem, @igorpecovnik's turn ;) or maybe 'team testers' consisting of zero users might jump in ;)


Hi bro nice work! - how can i convert this project from simple to multi targets


I think it is intended to send private replies?

Like when you do `hubot help` you will get the wall of text in a PM in stead of flooding the group chat.

The normal messages should also just come into the group chat.
The script you are using should just be configured correctly to use reply or message where appropriate.


https://github.com/dwelch67/dash_button  not sure how to contact you via github.  have had some success with the dash rev 2.  uart seems to work there is a command line to talk to.  cant get swd working yet.


Should this be "PCF Dev allows several different configurations."?


Follow https://github.com/oliviertassinari/react-event-listener/pull/17.


по код стайлу тут не фонтан, ты вроде как сэкономил одну переменную зато усложнил условие сделал менее читаемым условие...лучше вынести в отдельную переменную


Ввел дистанцию -10 км )))?


"regardless of the domain that it is configured with, you can run:" is meant to say that `cf dev target` works if the PCF Domain is `local.pcfdev.io` (the default) or something custom (such as `pcfdev.example.com`, if they were to run `cf dev start -d pcfdev.example.com`)


'`user' looks like it is missing a trailing backtick


As we don't have language infrastructure for defining strings as part of project in the files, but using DB instead, I am leaving here as reminder the list of strings that needs to be created to make feature work:

        bulk_invite_new => 'Invite new'
	bulk_invite_new_participants => 'Invite new participants'
	bulk_invite_new_form_sucessfully_uploaded => "File containing new participants have been uploaded successfully!"
	bulk_invite_new_form_error_upload => "There was an error uploading file."
	bulk_invite_new_form_error_not_csv => "Uploaded file is not CSV-format file."

	bulk_invite_new_total_uploaded = "Total uploaded participants"
	bulk_invite_new_total_unique = "Total unique participants"
	bulk_invite_new_total_sent = "Total participants sent invitation"
	monitor_bulk_invite_new_mailqueue = "Monitor new participants invitation mailqueue"
	send_to_all_unique = "Send to all unique participants"
	send_to_all_unique_not_sent = "Send to all unique participants who has not been sent already"

	bulk_invite_new_mail_subject = "Experiments at the School of Economics - Invitation to participate"

	xxx_bulk_invite_new_mails_sent_to_mail_queue = "invitation emails have been added to the queue"

In addition to that, mail template with invitation text needs to be defined:
        public_bulk_invite_new_participants


I don't know why, but N4141 has `return (*this);`, so we should show the parens as `\remove`d.


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#QFoTkG_0Reu4KYYGeKvQ_w/


Ahhh, that's a much simpler approach. :smile:


TaskCluster: @owlishDeveloper does not have permission to trigger tasks.


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#TLBmRANGQ1-prLSJHJ8VsA/


Thanks for adding me. May I ask what additional feature could I add? I made a python library for open channel hydraulics but it seems like you already covered it here. Thanks


EMS (brianlball) - x86_64-MacOS-10.10-clang: OK (2305 of 2501 tests passed, 0 test warnings)

![Build Badge](http://img.shields.io/badge/build%20status-warnings-yellow.svg) ![Test Badge](http://img.shields.io/badge/tests%20passed-92.16%25-yellow.svg)


while I'm working on glob stuff today I might come up with more test cases. mind if I push more unit tests up to this directly?


В целом все здорово, единственное что меня смущает, что при покупке менее суммы, от которой предоставляется скидка, все равно возможно бесплатная доставка...хотя не исключая что я мог быть не точен в описании задачи )


Why is vstest.ps1 intentionally not using $(Common.TestResultsDirectory)?


Y'a un fort potentiel de vannes sexistes sur ce commit. :smiling_imp:


Creo que la haz sabido cagar jajajajajaja


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#ImYxI3uhReGW8z-6q2rxUQ/


If Mataza the Zapper has on the field, Switch Hero can activate.

> http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=20124&keyword=&tag=-1
> Q.自分または相手のモンスターゾーンに「不意打ち又佐」が存在する場合、「スウィッチヒーロー」の『①：お互いのフィールドのモンスターの数が同じ場合、そのモンスターのコントロールを全て入れ替える』効果を発動する事はできますか？
> A.「スウィッチヒーロー」の効果は、お互いのモンスターゾーンのモンスター全てのコントロールを入れ替える効果となりますので、**『このカードは表側表示でフィールド上に存在する限り、コントロールを変更する事はできない』モンスター効果を持つ「不意打ち又佐」が、自分または、相手のモンスターゾーンに表側表示で存在する場合には、「スウィッチヒーロー」を発動する事自体ができません**。


Jajajajajajajajajaja


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#cP1ZfGVmSY-65y5BXPMLEA/


Bookmarklet can't be used normally :(


TaskCluster: https://tools.taskcluster.net/task-graph-inspector/#PX-8cB91RJS82kdzUdlzzQ/


Just curious to know if you can reference another repository issue from a fork. If so, its a good way to document that you have work done.

This line is the test:
https://github.com/pyvideo/data/issues/84


Forgot to say that I've turned FlamerSoldier actor a bit less threatening, their flames can really melt your ass in a second!


Hey @mdelillo! This will be fixed in the next commit. I'm still doing some editing and getting the subnav working.


Don't really mind - but also wouldn't mind reviewing them if you want to send them in the form of a PR :wink:

Feel free to push to a branch here rather than in a fork if you go that way with it.


Seems that it works :)


No, no, no.

Needs to be hidden in JEI and the creative tab until 1.11.

I dont want people to think somethings broken when it says missing block. I will add this back.


Wouldn't it be better to use a const string for `"<invalid name>"` and use it here and where the engine assigns it? (`SegManager::getObjectName` ? `Object::initBaseObject` ?)


This function should not be needed unless this is some special case? We have error paragraphs that pick up whether or not the inputs are valid.
there should be a regex pattern on the input.


I've cherry-picked this change and have it in my 1.0.1 branch


лучше пускай возвращает студента


> but also wouldn't mind reviewing them if you want to send them in the form of a PR

absolutely. I don't mind at all - in fact I prefer this knowing that someone else cares :)


I need to reason about this a bit more, and maybe we can right some more tests for correctness, the thing I'm wondering about is if this algorithm with the removal of topo sort, always has the invariant that we never calculate a node's upstream cache before all its parents have been calculated?


Just scrolled down and yeah, you shouldn't need it.
pattern="^Male$|^Female$" should do the trick.


Если это не задание "Практика по Comparable" тогда все хорошо))


asd


I'm trying to build on windows and I am running into issues. I tried your branch but I am still getting errors. Is there anything else I need to do to build on windows? Any environment variables I am missing? The build process didnt seem to like that I was missing INCLUDE and LIB. Thanks


dddd


Yep, done


asdasd


This should be an optional overload else it would be a breaking change.


zxc


Este merge es por modificar el proyecto desde clase teniéndolo abierto también en casa y sin hacer el push


@mdelillo Thanks for the clarification Mark!


as


a


sd


@mdelillo Fixed. Thanks!


xc


@isovector let me know if this is fine with you!


Menos mal que te diste cuenta loco!


Whyyyyy


да, это упустил, нужно было так while(!purchaseAmount || purchaseAmount < 0)


To delete / or set comments over the "ActionResult Index(int? pageIndex, string sortby)"

Otherwise we have a error from controller:
"The current request for action 'Index' on controller type 'MoviesController' is ambiguous between the following action methods:
System.Web.Mvc.ViewResult Index() on type Vidly.Controllers.MoviesController
System.Web.Mvc.ActionResult Index(System.Nullable`1[System.Int32], System.String) on type Vidly.Controllers.MoviesController "

        //public ActionResult Index(int? pageIndex, string sortby)
        //{
        //    // if pageIndex doesn't have a value
        //    if (!pageIndex.HasValue)
        //    {
        //        // pageIndex will be 1;
        //        pageIndex = 1;
        //    }
        //    if (String.IsNullOrEmpty(sortby))
        //    {
        //        sortby = "Name";
        //    }

        //    // return a simple Content with pageIndex = 1st parameter & sortBy = 2nd parameter  ;
        //    return Content(String.Format("pageIndex={0}&sortBy={1}", pageIndex, sortby));
        //}


Está bonito!


This still doesn't solve the issue of reliably getting a queue item or build with a single call.


@MikeVoermans misschien handig om het merge conflict op te lossen in Material.java en wat zijn die XML bestanden?

`<dir name="C:/Users/Mike/Documents/GitHub/PTS4/build/classes/main">`

Dat gaat natuurlijk niet werken he!


hmm...


@mdelillo Is this revision more accurate?


Good point @zonr, I can fix it as well if you don't have a PR inflight.


Nice work!


Please merge this one. I have tested it and it works to make the unit tests build.


@mdelillo Also, I added more information here.


http://wowwiki.wikia.com/wiki/Flametongue_Weapon?oldid=1055522
vs
http://wowwiki.wikia.com/wiki/Flametongue_Weapon?oldid=2135517

Also indeed it mentions those patch changes.

you certain about that last point there?


I never comment to blame someone, just to merely give some input.

googled some more proofs how it should be:

http://wowwiki.wikia.com/wiki/Flametongue_Weapon?oldid=1398968
http://web.archive.org/web/20080813085840/http://elitistjerks.com/f47/t19038-spell_coefficients/

both state 10%

and the patchnote "Patch 3.1.0 (2009-04-14): Bonus damage from spell power now based on weapon speed. Slower weapons will benefit more from spell power." implies that it was not weapon based before.

btw I've barly seen any sources mentioned in other commits shouldn't that be a standart before beeing allowed to commit?


Need to add Users, Accounts, and Transaction values to the database tables


var payCash = confirm("B случае оплаты наличными может быть проверена возможность бесплатной доставки. Желаете оплатить наличными?");
if(!payCash){....


I don't really know why it would be better to introduce a specific class that executes code on `iterator(start,end)` instead of adding a type that deferred the actual work until it's required?


Actually, it was weapon speed based before as well, according to wow wiki at least.


Aline, pq os botões de cancel tem um onclick de Save? Hehehehe


@abenderd Mudar "recipe" pra "prescription"


Why would we want to not touch literals indentation? That should be fixed too (or at least, reported).


Using enemy2 as the target for the Vulnerable duration was a hack for multi-target sims. Windburst applying a new Vulnerable debuff to the main target meant that using the main target's Vulnerable duration to know when it's safe to cast Aimed or when you need to use Marked Shot occasionally allowed a Marked Shot to go out that is buffed for the main target but not all other targets, since their Vulnerable debuffs were not extended. Apls before this one simply disabled Windburst in these situations or prioritized Marked Shot above all else for multi-target, which together prevent the problem from ever appearing, but doing that is a loss in most situations other than Barrage past 3 targets. I'm assuming this was caught because of the warnings that get thrown, which may be an issue in whatever environment you're running it in, but it defaulted to the main target for me if another enemy wasn't up so I left it in. I'd love to make it cleaner if possible if someone else knows a better way to track a debuff on another target. Otherwise, that variable can just be removed and all its uses reverted to debuff.vulnerable.remains


I would say that
> Bonus damage from spell power now based on weapon speed.

implies that bonus damage was added in after weapon speed, while it's now being multiplied in with the attack speed, which also fits more with the calculation of the wowwiki cached in late 2007.


XD 😈 Ima add it soon


Please do a pull request and merge this commit. I checked today and it is not in master so the unit tests build but they don't run. I have verified this commit fixes that.


Perfect!


да, тут как и с суммой покупки while (!distance || distance < 0) {..


This gulp dependency was breaking my `npm install`


We use this pattern quite a lot in the code, which is why i'm using it too.

As for it being "dangerous" -- there is an IntelliJ inspection "Suspicious indentation after control statement" which will catch such problems immediately (provided you have turned it on).


The database is set up to take all that input. Its up to the front-end team to develop the code that allows adding data.


ریدم تو گیتت...کانفیگ تو دیتا نیس


I clicked on a link that had your github address in it.
I must have pasted it from the chat at some point during our class.
I did not mean to make any changes to your code. sorry about that, just disregard it, no need to commit my change.


Seems about the same now, I'm mostly indifferent. You're the boss in this area, so whatever you want to do is fine as long as there's a reliable way to use the build id to fetch like this.


I think this largely fixes #28


Right, its been updated in later commit, pretty similar to what you have.


Sense that I shouldn't merge master to branches. The reason I did merge is that the current work on branch needs to be based on the latest work on master.
But I can create a new branch for that even if it serves the same purpose as the old one?


:+1: lgtm!


Quick & dirty.  I'd like to help out with the JSON rewrite, but I too am pretty busy these days.
Fixes #15


That's odd. Did you clone the repository or just copy the text?
Make sure the script starts with <?php

It looks like your terminal is tying to run this as if it's a command.
Do you have PHP installed on your command line? What does it say if you type **php -v** into your terminal?


The HTML and javascript is the front-end. Its up to the Java code or Business logic teams to handle this. (Crosby, Daniel and me will handle java interface class)

@rudyleiva93 This will be done at a later time.


@kzantow I think its matter of style, it could very well be done with anonymous inner class implementing a Container, if this is what you mean?


@Floessie :+1: to merge this


Also, `--fast-parser`. I've added a note to the docs about this.


nice update...


I'll look into it tomorrow hopefully, no time before raid tonight.


Broke my build as well. So is the solution to add a `compile` file with `brunch build --production` in it?


Why didn't you fix the line hiding bug to make to enhance my correct scaling change?  Blindly undoing my change is a waste of a lot of effort.


Minor grammatical nit: "are a macro used" should be "are macros used"


From this List :
private IEnumerable<Customer> GetCustomers()
        {
            return new List<Customer>
            {
                new Customer { Id = 1, Name = "John Smith" },
                new Customer { Id = 2, Name = "Mary Williams" }
            };
        }
 public ActionResult Details(int id)
        {
            var customer = GetCustomers().SingleOrDefault(c => c.Id == id);

            if (customer == null)
                return HttpNotFound();

            return View(customer);
        }

Detail (Id) of Customer will be available only if Id is declared in the List<Customer>.
If there is an Id = 3 like "http://localhost:49177/Customers/Details/3" will have a 404 error page.

Another example:

string[] fruits2 = { };
string fruit2 = fruits2.SingleOrDefault();
Console.WriteLine(
    String.IsNullOrEmpty(fruit2) ? "No such string!" : fruit2);
/*
 This code produces the following output:
 No such string!
*/


Why?  Reasoning would be nice.


The patchnotes implies that the spellpower scaling part of the spell was earlier not tied to the weaponspeed.
The early formula of wowwiki is "( 28 * weaponspeed + spellpower / 10 ) fire damage per hit at level 60"
which also supports that it should be 10% spellpower scaling + flat dmg scaling based on weapon speed.


Apparently since Vista, the Direct3D9 runtime does the multithreading itself:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff569875(v=vs.85).aspx

this looks like to what we discussed, but these few details are interesting:
. System pool is allocated by the driver. LockAsync will also be used for this pool. -> this seems to contradict the results of your locking tests where system pool was using data written before draw call, right ?
. Pretty much everything is in the other thread ('batched'), except async locks and getting result from queries. Some calls (create resource) force the queue to be flushed.

This means StretchRect and Update* calls are likely in the other thread as well.
Typically app would do lock systemmem texture, write, unlock, update default pool texture, and that would convert to asynclock the systemmem + add to the worker thread command to blit to the default pool texture. My guess is that if app is locking the systemmem texture again after that, the runtime will flush before locking.

Managed buffers are basically buffers with systemmem backing where dirty area is blitted to default pool,
however it needs special handling in case of lock write unlock draw lock -> we must do the blit before the lock. The msdn doc doesn't hint to what happens there. Your tests say that if we write the data just after the draw (without lock) the new data is used. That would point to having the second lock flush the worker thread. Any comment ?


Lol i didnt know ad blocker blocked analytics(I can make a simple analytics system if you want, shouldn't be detectable)


getreg not tested yet

need to fill all if elses


Commit nummer 12500!


![](https://github.trello.services/images/mini-trello-icon.png) [Test README.txt](https://trello.com/c/oi5lVVzh/3-test-readme-txt)


@Floessie :+1: for merge


Thanks again. I've cherry-picked your script https://github.com/StefanScherer/packer-windows/commit/7bda7787bad14ed57ed67182983c88e00e91a407 :-)


I'm certainly not saying we shouldn't fix the problem. The point is that increasing a lock timeout is a workaround with downsides, not a fix. There are other simple fixes that don't have these downsides.

As far as the other situations go, we should solve them in the same way. They're all the same pattern: do some work to produce a resource if it doesn't exist, then reuse to avoid having to pay the cost of producing the resource again. In none of these cases is it required that exactly one such resource be produced exactly once per machine. It's better if this ends up being mostly true, of course.


I'm commenting on this line as an example but I think you should use https://docs.python.org/2/library/stdtypes.html#str.format to do any string building in python.


@bluesunrise FYI: you wrote these tests a few months ago.   Here is how to check and continue only when the copy stream is complete so you can be sure that the new file exists.


I'm not sure what else you need from Stef. He clearly stated here (as I already had done) that the 0.23.2 release can be considered "stable".  He also posted to the mailing list to that effect, He also indicated that the next release *should* be stable too, which will be nice when it happens but isn't relevant now.


If you add this line, I would propose to remove the .py ending from the files because the system will automatically choose the correct interpreter for you and you get better looking commands.


That's a good idea.


Merged it today: https://github.com/Samsung/GearVRf/pull/888


It'll probably be evaluated at compile-time anyway, even with just `const`.


Is there a better approach to doing this, @ddomingues?


Ok, lets talk bit about this tomorrow and get to a conclusion. thanks.


Maybe you can look for a bit more distinctive command names so that they may not accidentally clash with another command on another machine.

Example:

* ```dhis2-pk-share-objects```


:smiley:


If you want to write a code block add  **```**


Sure it will haha


Typo - a`bbr --add`


mark the properties. a bunch of them are probably just readonly. things like `delegate` needs to be `weak` -- looks like `self` may be set as the delegate, which would be a retain cycle?


to fix some overlapping menus fixing a minor source and compensate with a larger scale in the font.


d('∀'*)


Please leave only the `redis_*` keys here, the the database doesn't need to be 3, can be 1 (since we don't use 1 and 2 for anything).


OMG how did I put a `return` here? I swear I knew Rust better than that...


Great improvement :smile:


Please add an `if` around everything here, that ignores all the code if `config/sidekiq.yml` doesn't exist (this way it naturally falls back to localhost and default port)


FuelCell (macumber) - x86_64-MacOS-10.10-clang: OK (2392 of 2452 tests passed, 0 test warnings)

![Build Badge](http://img.shields.io/badge/build%20status-warnings-yellow.svg) ![Test Badge](http://img.shields.io/badge/tests%20passed-97.55%25-yellow.svg)


Okay. But this will be removed in the end? I mean we decided to scrap it.


Yeah, when we port to 1.11


[R/util.r:634:8:](https://github.com/jackwasey/jwutil/blob/44f57b42b7c2e94bde1748078c2c973b5af9f1c3/R/util.r#L634) *style:* **Use <-, not =, for assignment.**
```r
  repo = getOption("repo")
       ^
```
[R/util.r:638:21:](https://github.com/jackwasey/jwutil/blob/44f57b42b7c2e94bde1748078c2c973b5af9f1c3/R/util.r#L638) *style:* **Commas should never have a space before.**
```r
  matches <- avail[ , "Package"] %in% pkgs
                   ~^
```
[R/util.r:645:11:](https://github.com/jackwasey/jwutil/blob/44f57b42b7c2e94bde1748078c2c973b5af9f1c3/R/util.r#L645) *style:* **Use <-, not =, for assignment.**
```r
  max_ver = vers[1]
          ^
```


Sounds like a very reasonable feature; don't you plan to pull request it to the original cra-ros-pkg's repo?


In controllers/clients.js I've used req.flash() twice (indicated by USING_FLASH)


I opted to lock at commit before this like so:

```bash
heroku buildpacks:remove https://github.com/gjaldon/heroku-buildpack-phoenix-static.git
heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git#4b794701eb8f08ee1da27f571539460f0b229e3f
```

That fixed my build. Will watch the repo to see how this is resolved.


I don't like "moveLeft" and "moveRight". That sounds like strafing. I think "turnLeft" and "turnRight" would be better.


Thanks for getting it started!


This commit never bundled the retina image. Won't this cause a 404 and possible the player controls not to be visible on a retina device?


@dwmw2:  My apologies, then; for _some_ reason, I incorrectly misconstrued @stefwalter's statements as indications that the p11-kit team was working _toward_ this, but hadn't _quite_ gotten everything in place for it (I apparently missed the mention that the _current_ release was stable; heh, d'oh!)  In any case, then, never mind my errant stupidity!  I suppose you guys are waiting for me to create a pull request reinstating v0.23.2 as stable, then?  😆


i don't think so. it's only used to visit the discovered inputs from last time, and at this point the order of those should not be significant.


Fantastic – thanks for the clarification + update @gvanrossum!


Ignore this - this was an error corrected in a later commit


wouldn't this make it so each errored upload may call into the `responseBlock`? the docs mentioned that `responseBlock` should only be called once though.


@hunterloftis Shouldn't this be:

```sh
echo "export PATH=\"$build_dir/.heroku/node/bin:$build_dir/.heroku/yarn/bin:\$PATH:$build_dir/node_modules/.bin\"" > $bp_dir/export
```

`node/bin:$build_dir` vs `node/bin:\"$build_dir`


I can always add this as a remote and cherry pick the commit. Agreed that it's very useful.


Create hello world python code.


also, seems like the responseBlock may be called from the handler queue (here), the caller thread (file size error), or the main queue in some cases. may want to clarify what the contract should be.


Hey I did some concept art
![cyberpunk_truck_chooper1](https://cloud.githubusercontent.com/assets/22775943/19330747/15bf4320-9095-11e6-9618-b7ed885505b4.jpg)


Begin implementation of #1


Esto es nuevo


@SubJunk Which 4? These?
```java
		sleep(100);
		socket.send(ssdpPacket);
		sleep(100);
		socket.send(ssdpPacket);
```


above commit was related to #6, and the correct comment for this commit should be as below:

Goal endpoint get by query string end point related to task #6,
also included the pagination work for the same endpoint


Write down meaning GIT commit message!


Not "char* val". Use "char *val" instead.


Don't leave extra blank lines.