You can use xmake to run the given target and need not know where is the target program.
e.g.
We define a simple target with named 'test'.
lua
target("test")
set_kind("console")
add_files("*.c")
So, we can run it directly.
bash
$xmake r test
or $xmake run test
xmake will compile it 继续阅读 »
1. failed to write data to stream
环境:ipython, OSX
操作:在ipython里import 一个pure module
问题: Python - ERROR - failed to write data to stream: ', mode 'w' at 0x104c8f150>
办法:export PYTHONIOENCODING=UTF-8 will solve it.
相关:stackoverflow继续阅读 »
写在前面
废话不多说,请看下面3道题,把6个console.log()的答案写下来,然后对照着在Console控制台里敲一遍,校验一下结果。
more
代码片段
```
var A = function() {};
a.prototype = {
num : 1,
text : 'aaa'
};
var x = new A();
// 第一题
console.log(x.num);
console.log(x.text);
// --这里是分割线--
var y = new A();
A.prototype = {
num : 2
};
// 第二题
console.log(y.num);
c继续阅读 »