[javascript]列出对象所有属性
当我们想知道某个对象拥有哪些的属性时,可以用下面的方法(现代浏览器):
var properties = Object.keys(obj);
这个方法对于我们使用第三方 javascript 插件,而该插件的文档不是很详细时有很大的帮助
trackFormatter: function(obj){ console.debug('properties:'); console.debug(Object.keys(obj)); }
当我们想知道某个对象拥有哪些的属性时,可以用下面的方法(现代浏览器):
var properties = Object.keys(obj);
这个方法对于我们使用第三方 javascript 插件,而该插件的文档不是很详细时有很大的帮助
trackFormatter: function(obj){ console.debug('properties:'); console.debug(Object.keys(obj)); }
通过 screen 命令可以让终端命令在我们断开远程服务器后依旧运行而不会中断。
redhat/centos:
yum install screen
ubuntu:
sudo apt-get install screen
新建一个名为 django 的 screen shell:
screen -S django
新建一个名为 django 的后台 screen shell:
screen -dS django
查看所有的 screen shell:
$ screen -ls There are screens on: 1429.django (Detached) 23264.abc (Detached ...
编译安装 aria2c 时,出现了如下错误:
[root@dev aria2-1.17.1]# ./configure checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/root/temp/aria2-1.17.1': configure: error: C compiler cannot create executables See `config.log' for more details
解决办法: 清空 LIBS 及 CFLAGS 变量的值 ...
more ...