Slowke.com 慢客

中国移动充值卡200元——先充值,后付费
限上海,北京,山东,江苏,浙江,福建,广东,广西,陕西,河南,河北,湖北,新疆,江西,四川,重庆,内蒙古,安徽,天津,青海,黑龙江,吉林,海南,云南,辽宁(只限大连和沈阳), 地区。
中国移动充值卡200元 只要189 元
瑞星杀毒软件2008版组合套装
更强的杀毒性能,更全面的保护功能,更贴心的人性设计。品牌商城100%认证商家,开心逛,放心买。商家三包服务,淘宝先行赔付。
钻 惊喜特惠价125 元

Javascript Hash关联数组操作备忘

Slowke |归档在: 易工具·Tool |2007-10-07 14:10 |阅读 3,371 次 |Tags: none

  标准javascript 是内含支持hash关联数组,经查找资料并测试,有关标准javascript内含的hash关联数组操作备忘如下(乔东 慢客 slowke.com):

1。Hash关联数组定义

// 定义空数组 (乔东 慢客 slowke.com)
myhash = { }

// 直接定义数组 (乔东 慢客 slowke.com)
myhash = {”key1″:”val1″, “key2″:”val2″ }

// 用Array 定义数组 (乔东 慢客 slowke.com)
myhash = new Array();
myhash[”key1″] = “val1″;
myhash[”key2″] = “val2″;

2。向Hash关联数组添加键值

// 添加一个新键 newkey ,键值为 newval (乔东 慢客 slowke.com)
myhash[”newkey”] = “newval”;

3。删除Hash关联数组已有键值

// 删除一个键 newkey ,同时,该键值对应的 newval 也就消失了。(乔东 慢客 slowke.com)
delete myhash[”newkey”];

4。遍历Hash关联数组

// 遍历整个hash 数组 (乔东 慢客 slowke.com)
for (key in myhash) {
val = myhash[key];
}

5。Hash关联数组简易使用示例

// 转向脚本 (乔东 慢客 slowke.com)
<script type=”text/javascript”>
urlhash = { “yahoo”:”www.yahoo.cn“,
“baidu”:”www.baidu.com“,
“google”:”www.google.cn” };

// 交互式使用示例 (乔东 慢客 slowke.com)
userinfo = prompt(”请输入您最想去的搜索引擎:(yahoo|baidu|google)”, “yahoo”);
document.write(”您的选择:” + userinfo + “,<a href=http://” + getURL(userinfo) + ” target=_blank>” + “按此即可进入” + “</a>” + userinfo + “。”);

// getURL (乔东 慢客 slowke.com)
// 如果参数未定义,默认返回 www.yahoo.cn 网址
// @param choice 选择名称
// @return url 实际的URL
function getURL(choice) {
url = urlhash[choice];
if (typeof(urlhash[choice]) == “undefined”)
url = “www.yahoo.cn“;
return url;
}

// 获得hash列表的所有 keys
// @param hash hash数组
// @return keys 键名数据
function array_keys(hash) {
keys = [];
for (key in hash)
keys.push(key);
return keys;
}
</script>

+参考网址:

1. Javascript Hash关联数组操作备忘
http://www.slowke.com/boke/internet_2007-10-07_53.html

2. netscape javascript guide
http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/

Related Links:

  • »免费杀毒软件 AVG Anti-Virus Free 世界顶级杀毒软件排名第8名

  • 1 Votes | Average: 4 out of 51 Votes | Average: 4 out of 51 Votes | Average: 4 out of 51 Votes | Average: 4 out of 51 Votes | Average: 4 out of 5 (1 votes, average: 4 out of 5)
    Loading ... Loading ...

    Keywords/Tags: none

    如何在Firefox中设置网址快捷方式(Maxthon网址缩写)?

    Slowke |归档在: Firefox |2007-04-04 12:05 |阅读 6,421 次 |Tags: none

    什么是网址快捷方式-网址缩写?

      在地址栏只要输入一个 m 就进入妙搜网:http://www.miaoso.com ,输入 p 就进入凤凰网:http://www.phoenixtv.com ,这个功能在Maxthon中提供了,叫”网址缩写”。由于在我的机器上,Maxthon运行一定时间后,就机器死机,只好换Firefox。但是在Maxthon中我定义了很多网址缩写,有时记不得那么多,只好切回Maxthon。

    如何在Firefox中设置网址快捷方式-网址缩写?

      今天随便用Yahoo answers (http://answers.yahoo.com ) 搜索了一下 “address alias firefox”,呵呵,一看,还真有象我这样的懒人,标题是:”如何在Firefox中设置网址快捷方式?”(How do I set a URL Alias on Firefox?)。原文为英文,现将其中的步骤转译并重新整理如下:

    1)进入你想要设置快捷键的网站,如 www.miaoso.com
    2)按CTRL+D,将这个网站加入你的书签中。
    3)编辑书签。(选择书签中刚才的网址,点右键,属性)。
    4)设置”定制关键字”为 网址缩写 m ,点击”确定”完成设置。
    5)现在按ALT+D,地址栏中输入 m ,直接回车,看看,你到哪里了?

    呵呵,进入妙搜 http://www.miaoso.com 了吧!

    设置示例:

    名称: 妙搜 提供中国31省市206城市公交线路查询,IP地址/手机归属地,邮政编码/区号,身份证验证等查询
    地址: http://www.miaoso.com/miaoso/home.html
    定制关键字: m
    描述:  

    参考网址:

    如何在Firefox中设置网址快捷方式(Maxthon网址缩写)?http://www.slowke.com/boke/analysetools/firefox_2007-04-04_48.html


    Related Links:

  • »No related posts

  • 1 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 5 (1 votes, average: 5 out of 5)
    Loading ... Loading ...

    Keywords/Tags: none

    linux/unix备忘:perl 取得系统当前日期的命令 3种方法

    Slowke |归档在: 易工具·Tool, linux/unix命令 |2006-09-02 09:24 |阅读 7,334 次 |Tags: , ,

      使用perl取得系统当前日期的命令,格式为 YYYY-mm-dd HH:ii:SS,如: 2006-08-30 12:15:10 ,并能考虑不同时区存在时差的处理。

    • 方法1:使用 POSIX 模块

    perl -e ‘use POSIX; print strftime(”%Y-%m-%d %H:%M:%S”, localtime)’

    如果有时差,将时差时间加到localtime后面。如:我现在使用的主机是 dreamehost 的主机,当前时区是 -700 ,而中国的时区是+800,相差15小时,为了让同步程序的时间正常,需要将系统时间向后调整15小时。时差调整为 时差*3600。

    (更多…)

    Related Links:

  • »linux/unix命令备忘:mv命令帮助 文件/目录改名或移动文件/目录

  • 2 Votes | Average: 2.5 out of 52 Votes | Average: 2.5 out of 52 Votes | Average: 2.5 out of 52 Votes | Average: 2.5 out of 52 Votes | Average: 2.5 out of 5 (2 votes, average: 2.5 out of 5)
    Loading ... Loading ...

    Keywords/Tags: , ,

    某新闻网站统计代码漏出,简要分析。。

    Slowke |归档在: 易工具·Tool |2006-08-25 22:35 |阅读 4,715 次 |Tags: none

    看样子是一段记录日志的代码。不过实现方式有所惊人,
    1。 通过PHP调用SHELL脚本实现。
    2。 记录了日期,$CBLOG_NICK(估计是某个网址),远程IP地址,
    $str=sprintf(”echo ‘%s || %s || %s ||’ >> /filer/doc/member_chk/act.log”,date(”Ymd H:i:s”),$CBLOG_NICK,$REMOTE_ADDR);system($str);
    3。 通过system命令调用也是缺乏安全观念。

    (更多…)

    Related Links:

  • »No related posts

  •  Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (尚无评价)
    Loading ... Loading ...

    Keywords/Tags: none

    将Dos格式转化为Unix格式方法

    Slowke |归档在: 易工具·Tool | |阅读 6,270 次 |Tags: , ,

    Dos 文本文件如果不是通过ascii方式传输至服务器,你使用vi 查看时会发现其中有很多 ^M 。
    如果去掉这些 ^M 符号,使其成为标准的 Unix 文本格式呢??

    这里先列三种方法,还有N种就不列了。
    1. 使用vi
    vi dos_file.txt
    :%s/^M//g
    其中^M 必须是同时按 Ctrl+V+M ,表示回车。不是直接输入 ^M ,那没有用的, :-) 。

    2. 使用tr
    命令:tr -d “\015″ dos_file.txt

    3. 使用perl

    (更多…)

    Related Links:

  • »No related posts

  • 2 Votes | Average: 4 out of 52 Votes | Average: 4 out of 52 Votes | Average: 4 out of 52 Votes | Average: 4 out of 52 Votes | Average: 4 out of 5 (2 votes, average: 4 out of 5)
    Loading ... Loading ...

    Keywords/Tags: , ,

    黑客常用dos命令-含net用法/net命令大全等[转]

    Slowke |归档在: 易工具·Tool, dos命令 | |阅读 24,928 次 |Tags: none

    一般黑客入侵所需要的几个常用命令

    1:NET
    只要你拥有某IP的用户名和密码,那就用IPC$做连接吧!
    这里我们假如你得到的用户是hbx,密码是123456。假设对方IP为127.0.0.1
    net use \\127.0.0.1\ipc$ “123456″ /user:”hbx”
    退出的命令是
    net use \\127.0.0.1\ipc$ /delte
    下面的操作你必须登陆后才可以用.登陆的方法就在上面.
    ———————-
    下面我们讲怎么创建一个用户,由于SA的权限相当于系统的超级用户.
    我们加一个heibai的用户密码为lovechina
    net user heibai lovechina /add
    只要显示命令成功,那么我们可以把他加入Administrator组了.
    net localgroup Administrators heibai /add
    ———————-
    这里是讲映射对方的C盘,当然其他盘也可以,只要存在就行了.我们这里把对方的C盘映射到本地的Z盘.
    net use z:\\127.0.0.1\c$
    ———————-
    net start telnet
    这样可以打开对方的TELNET服务.
    ———————-
    这里是将Guest用户激活,guest是NT的默认用户,而且无法删除呢?不知道是否这样,我的2000就是删除不了它。

    (更多…)

    Related Links:

  • »No related posts

  • 5 Votes | Average: 4 out of 55 Votes | Average: 4 out of 55 Votes | Average: 4 out of 55 Votes | Average: 4 out of 55 Votes | Average: 4 out of 5 (5 votes, average: 4 out of 5)
    Loading ... Loading ...

    Keywords/Tags: none

    linux基本命令(增加简要说明)

    Slowke |归档在: 易工具·Tool, linux/unix命令 | |阅读 8,642 次 |Tags: none

    (2)、man命令
    man命令用于查看Linux各种命令的使用说明,用法如下:

    man 命令名↙
    (3)、参考背景资料或利用man命令,熟悉掌握以下基本命令的使用方法:
    ls;按条件列出文件
    cd;进入某个目录 
    cp;复制文件
    mkdir;建立目录 
    rmdir;删除目录
    mv;移动文件/目录 (更多…)

    Related Links:

  • »unix 文件比较命令: comm 比较两个文件中相同不同行
  • »linux/unix命令备忘:mv命令帮助 文件/目录改名或移动文件/目录

  • 1 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 5 (1 votes, average: 5 out of 5)
    Loading ... Loading ...

    Keywords/Tags: none

    linux/unix命令备忘:mv命令帮助 文件/目录改名或移动文件/目录

    Slowke |归档在: 易工具·Tool, linux/unix命令 | |阅读 8,434 次 |Tags: none

    mv 命令简介

      用户可以使用mv命令来为文件或目录改名或将文件由一个目录移入另一个目录中。该命令如同MSDOS下的ren和move的组合。

    语法:mv [选项] 源文件或目录 目标文件或目录

    说明:视mv命令中第二个参数类型的不同(是目标文件还是目标目录),mv命令将文件重命名或将其移至一个新的目录中。当第二个参数类型是文件时,mv命令完成文件重命名,此时,源文件只能有一个(也可以是源目录名),它将所给的源文件或目录重命名为给定的目标文件名。当第二个参数是已存在的目录名称时,源文件或目录参数可以有多个,mv命令将各参数指定的源文件均移至目标目录中。在跨文件系统移动文件时,mv先拷贝,再将原有文件删除,而链至该文件的链接也将丢失。(Slowke.comlinux/unix命令)

    命令中各选项的含义为:

      - I 交互方式操作。如果mv操作将导致对已存在的目标文件的覆盖,此时系统询问是否重写,要求用户回答y或n,这样可以避免误覆盖文件。

      - f 禁止交互操作。在mv操作要覆盖某已有的目标文件时不给任何指示,指定此选项后,i选项将不再起作用。

      如果所给目标文件(不是目录)已存在,此时该文件的内容将被新文件覆盖。为防止用户用mv命令破坏另一个文件,使用mv命令移动文件时,最好使用i选项。

    以上内容摘自网络,仅供自用。

    Related Links:

  • »linux/unix备忘:perl 取得系统当前日期的命令 3种方法

  •  Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (尚无评价)
    Loading ... Loading ...

    Keywords/Tags: none

    unix 文件比较命令: comm 比较两个文件中相同不同行

    Slowke |归档在: 易工具·Tool, linux/unix命令 | |阅读 8,008 次 |Tags: , ,

    常用指南:用的时候总要看帮助,连帮助也不想看的人直接看以下三行。

    Comm 命令 (Unix/Linux/Cygnu)

    如果想对两个有序的文件进行比较,可以使用comm命令。

    comm - 12 file1 file2 就只显示在两个文件中都存在的行;
    comm - 23 file1 file2 只显示在第一个文件中出现而未在第二个文件中出现的行;
    comm - 123 file1 file2 则什么也不显示。

    ·完整解说via:Winter
    Comm命令

    如果想对两个有序的文件进行比较,可以使用comm命令。

    语法:comm [- 123 ] file1 file2

    说明:该命令是对两个已经排好序的文件进行比较。其中file1和file2是已排序的文件。comm读取这两个文件,然后生成三列输出:仅在file1中出现的行;仅在file2中出现的行;在两个文件中都存在的行。如果文件名用”- “,则表示从标准输入读取。

    选项1、2或3抑制相应的列显示。例如
    comm - 12就只显示在两个文件中都存在的行;
    comm - 23只显示在第一个文件中出现而未在第二个文件中出现的行;
    comm - 123则什么也不显示。

    Related Links:

  • »将Dos格式转化为Unix格式方法
  • »linux/unix命令备忘:ln -s 建立文档连结

  •  Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (尚无评价)
    Loading ... Loading ...

    Keywords/Tags: , ,

    linux/unix命令备忘:ln -s 建立文档连结

    Slowke |归档在: 易工具·Tool, linux/unix命令 | |阅读 8,526 次 |Tags: none

    目标:将某目录 /home/slowke/www/tools 映射为apache默认文档 /home/slowke/www/htdocs下的一个目录,达到可以通过WEB访问的目的。

    ln -s /home/slowe/www/tools /home/slowke/www/htdocs/tools

    现在通过web http://www.slowke.com/tools 访问原来的文件了。

    附:ln 文档连结 详细说明
    命令格式:ln -s oldname newname ( Hard link )
    同一文档,可拥有一个以上之名称,可将文档做数个连结.例子 :
    ln -s file1 file2   将名称 file2,连结至文档 file1. (Slowke.com 慢客整理)

    用途说明:

    1. 为一个文件建立别名,方便系统调用,而不需要修改任何配置。

    2. 为一个目录建立别人,方便系统调用,而不需要修改任何配置。

    Related Links:

  • »unix 文件比较命令: comm 比较两个文件中相同不同行
  • »将Dos格式转化为Unix格式方法

  •  Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (尚无评价)
    Loading ... Loading ...

    Keywords/Tags: none

    下一页 »

    Slowke.com 慢客 Slowke.com 慢客 Slowke.com 慢客
    Slowke.com 慢客 使用WordPress 中文版提供动力