js模拟php的shuffle函数,用来打乱一维数组3+

16,974 views / 2010.12.09 / 6:06 下午
Array.prototype.shuffle = function() {
for(var j, x, i = this.length; i; j = parseInt(Math.random() * i), x = this[--i], this[i] = this[j], this[j] = x);
return this;
};
 
非原创,纯分享
Categories: 分享 Tags: ,

新版 MSN 2011 移除广告 两个用户同时登录 补丁3+

21,624 views / 2010.11.19 / 12:12 下午

上个月刚发布的   Windows Live Essentials 2011 不知道你是不是也更新了呢?大多数的朋友都说新版2011狠难用,少数人觉得还好,反正迟早也是要适应。无论你使用的是新版或是旧版,都可以通过这个小工具来移除广告以及破解多用户同时登录限制,使用上非常简单喔!如果你有这个需要,不妨试试看本篇文章。

A-Patch updated for Windows Live Messenger 2011 (15.4.3502.0922)

Praise be to God.

Added 6 new options! At the moment this build is only available in English but will be available in more languages shortly, God-Willing, as soon as the new options have been translated.

Changelog (1.43 build 11)

New: Disable Nudge Shake (thanks digitaldj).
New: Remove Nudge Delay (thanks digitaldj).
New: Remove the top of the Contact List.
New: Remove Search Bar.
New: Remove the “Connected to…” bar.
New: Accept more than 3 files (transfers at a time) (thanks digitaldj).
Fix: Fixed graphical glitch when removing text ad banner in the conversation window.

Note: To remove the image ad banner in the conversation window, untick the “Show expanded footer in conversation windows” option under the Tools > Options > Messages window in the Windows Live Messenger options.

Changelog (1.43 build 10):

New: Ad Banner completely removed! Thanks to a brainstorming session with user bedrock, I was able to completely remove the ad banner from the contact list.

Feature: Remove advertisement from main window.
Feature: Remove text advertisement in the IM window.
Feature: Polygamy – open more than one Messenger at once.
Feature: Remove the “See More Offerings” items in the file menus.
Feature: Remove “Featured” section from the Emoticons “more” dialog box.

Download A-Patch for Windows Live Messenger 2011 (15.4.3502.0922)

Categories: 分享 Tags: ,

让浏览器仅显示当页所有图片的代码3+

6,646 views / 2010.10.10 / 11:11 下午

可在看图时候免除广告骚扰,并提高页面整体加载速度。适合摄影爱好者、美女图片爱好者、色狼等等。

1.打开浏览器,随便添加一个网页到收藏夹中,添加的时候把名称更改为“只看图片”,确定。

2.在收藏夹中右键点击刚添加的链接,属性,把url替换为 如下代码,确定。

javascript:Ai7Mg6P=”;for%20(i7M1bQz=0;i7M1bQz<document.images.length;i7M1bQz++){Ai7Mg6P+='<img%20src=’+document.images[i7M1bQz].src+’><br>’};if(Ai7Mg6P!=”){document.write(‘<center>’+Ai7Mg6P+'</center>’)} 

3.随便打开一个含有多个图片的页面,如http://club.news.tom.com/item_400_278031_0_1.html,然后点击收藏夹中的“只看图片”这个链接,目标实现。

各位,这样看美女图是不是很爽啊?!(淫笑ing)

Categories: 分享 Tags:

乐phone版联想服务站查询工具3+

12,304 views / 2010.09.15 / 4:04 下午

用你的乐phone随时查找身边的联想服务站、维修站,满意服务就在您身边。集成GPS定位功能,使您一目了然身边的服务站。支持全国所有省市查询。
下载地址




下载地址

Categories: 分享 Tags: ,

将数字转换为大写人民币格式的函数0+

14,288 views / 2010.06.02 / 2:02 下午

这个函数用来把数字转换为人民币大写格式,经过测试已经接近完美。如果有bug,欢迎反馈!

function toCNFormat($data) {
 $data = strpos($data, ".") === false? $data . ".00":$data;
 if (!preg_match("/^[0-9\.]+$/", $data))return "";
 $capnum = array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
 $capdigit = array("", "拾", "佰", "仟");
 $subdata = explode(".", $data);
 $yuan = $subdata[0];
 $j = 0;
 $nonzero = 0;
 for($i = 0;$i < strlen($subdata[0]);$i++) {
  if (0 == $i) {
   if ($subdata[1]) {
    $cncap = substr($subdata[0], -1, 1) != 0?"元":"元零";
   } else {
    $cncap = "元";
   }
  }
  if (4 == $i) {
   $j = 0;
   $nonzero = 0;
   $cncap = "万" . $cncap;
  }
  if (8 == $i) {
   $j = 0;
   $nonzero = 0;
   $cncap = "亿" . $cncap;
  }
  $numb = substr($yuan, -1, 1);
  $cncap = ($numb)?$capnum[$numb] . $capdigit[$j] . $cncap:(($nonzero)?"零" . $cncap:$cncap);
  $nonzero = ($numb)?1:$nonzero;
  $yuan = substr($yuan, 0, strlen($yuan)-1);
  $j++;
 }
 
 if ($subdata[1]) {
  $chiao = substr($subdata[1], 0, 1)?$capnum[substr($subdata[1], 0, 1)] . "角":"零";
  $cent = substr($subdata[1], 1, 1)?$capnum[substr($subdata[1], 1, 1)] . "分":"";
 }
 $cncap .= $chiao . $cent . "整";
 $cncap = preg_replace("/(零)+/", "\\1", $cncap);
 $cncap = str_replace("零整", "整", $cncap);
 return $cncap;
}
echo toCNFormat("110502.35");
Categories: 分享 Tags: ,