摘要:
var http = require("http");var iconv = require('iconv-lite');var option = { hostname: "stockdata.stock.hexun.com", path: "/gszl/s601398.shtml"}... 阅读全文
摘要:
之前由于输入错误不小心在chrome中访问了wwww.baidu.com这个网址,结果谷歌帐号把这个记录下来,每次想输入www时,总是先提示wwww.baidu.com这个网址,看着很别扭。在网上找了一圈也没发现怎样可以删除。后来随便试了一下,原来可以通过UP/DOWN键来选中提示的网址,然后使用shift + delete键来删除记录的网址。 阅读全文
摘要:
在php中,当文件位于软链路径中,__FILE__无法获取软链路径,只能获取实际路径,开始想从重写__FILE__或重写require*方法入手,没有找到好的解决办法。后来发现把目录通过mount --bind这个命令映射,可以起到和软链相同的作用。还可以避免__FILE__自动获取实际路径的问题。shell 命令:mount --bind /source /target在fstab文件中添加,实现启动自动挂载:/source /target none rw,bind 0 0经测试此处的gid和uid 是无效的,mount后的目录权限和源目录相同,所以,目标目录的使用者需要拥有源目录的相应权限 阅读全文
该文被密码保护。 阅读全文
摘要:
服务端\n";} else { while ($conn = stream_socket_accept($socket)) { fwrite($conn, "Content-Type: text/plain\n\n"); fwrite($conn, "hello socket\n"); fclose($conn); } fclose($socket);}?>客户端\n";} else { while (!feof($fp)) { echo fgets($fp, 1024); } fclose($fp);}?> 阅读全文
摘要:
Tutorial教程Thistutorial introduces you to the concepts and features of the Bottleweb framework and covers basic and advanced topics alike. You canread it from start to end, or use it as a reference later on. Theautomatically generatedAPIReferencemaybe interesting for you, too. It covers more details, 阅读全文
摘要:
在IE6下,给元素绑定mouseover事件时,当元素的子元素之间有空隙,在鼠标滑过元素与子元素时,会触发mouseover事件,当出现抖动现象,可以使用mouseenter代替mouseover,即可使鼠标在元素内滑动时,不再触发mouseover事件,同样,要使用mouseleave代替mouseout事件.参考链接: http://hi.baidu.com/web_vv/item/dbd8b5e98c7f0a0665db0070 阅读全文
摘要:
1,定义和获取列表元素(list 1 2 3)(list :a 1 :b 3 :c 2)(getf (list :a 1 :b 3) :b); output:32,定义简单的函数(defun make-cd (title artist rating ripped) (list :title title :artist artist :rating rating :ripped ripped))3,定义全局变量(devar *db* nil)4,向全局变量添加纪录(defun add-record (cd) (push cd *db*))(add-record (make-cd "n. 阅读全文
摘要:
1,当String函数的参数拥有toString()方法时,String函数将以无参数的形式调用该参数的toString()方法并返回值。2,当参数没有toString方法时(null和undefined两种类型),String函数以字符串形式,返回参数的类型名称。var value1 = 10;var value2 = true;var value3 = null;var value4;alert(String(value1)); //”10” alert(String(value2)); //”true”alert(String(value3)); //”null”alert(Str... 阅读全文
摘要:
配置文件位于/etc/sudoers,修改方式和修改普通的文件不太一样,要先切换到root用户,再使用visudo命令修改配置文件。具体设置可以通过配置文件中的注释了解。 阅读全文