如何在Firefox中强制重画页面

[不指定 2008/06/24 16:17 | by ipaddr ]

How to force firefox redraw ( admin.net [at] 163.com)

Firefox中,有时会发现使用JS改变了一些表格的宽度或页面,但Firefox并没有重画,手动调整一下窗口大小后才正常。
可以使用下面的代码,让Firefox强制重画网页:

    var objTemp=document.firstChild;
    if (objTemp)
    {
     //Tom Zhou (admin.net[at]163.com
     objTemp.style.width = objTemp.offsetWidth - 1;
     objTemp.style.width = objTemp.offsetWidth + 1;
    }

   

如何在网页中显示邮件地址

[不指定 2008/06/23 12:31 | by ipaddr ]

如果将邮件地址直接显示在网页上的话,可能会被很多邮件扫描器扫到,接踵而来的是大量的垃圾邮件。
垃圾邮件是一个复杂的课题,我个人认为已经超出了技术范畴了,垃圾邮件的防治也是比较麻烦的问题,如果你的邮件地址被垃圾邮件发送者得到的话,即使是Yahoo,Gmail,163,同样会有大量的垃圾邮件骚扰。所以,防治垃圾邮件的一个重要方法,就是不要在网站上公布你的邮件地址。
目前,有效的做法有几种:
1. 使用图片显示邮件地址,代替文本形式的Email地址 (请访问 http://www.makepic.com 生成图片形式的邮件地址)
2. 邮件地址中不带@字符,例如:admin.net(At )163.com
以下两种方式都有弊端,浏览者不可以直接复制邮件地址,也不可以直接点击发送邮件。

另外一些方法,是使用Javascript来显示邮件地址,这样,在网页中没有username@domain.com形式的地址,通过Javascript来显示。Javascript如下:

//Author: admin.net( AT )163.com http://www.eit.name/
function displayEmail(userName,displayName,domainName,className) {
 var tmpEmail;
 if (userName.length==0 || domainName.length==0) return;
 if (displayName.length==0) displayName=userName+"@"+domainName;
 if (className.length>0) className=" class='"+className+"'";
 tmpEmail=userName+"@"+domainName;
 document.write("<a href='mailto:"+tmpEmail+"'"+className+">"+displayName+"</a>");
}

调用方法:

<script language="javascript">displayEmail("admin.net","鱼漂","163.com","email");</script>

使用这种方式,不影响浏览者的使用和显示,但却有效的防止邮件地址被扫描。

最近安装了MindManager 7.1,安装完后,无法启动,总是提示"由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。"。按照网上的说法,MindManager 7.1是用VC2005 SP1编译的,我安装了VC2005 SP1的运行库,仍然不能解决问题。刚开始还怀疑是.net framewok的问题,重装过也没有效果。

后来仔细想想,我的机器上已经安装了VC2005,但没有打到SP1,可能与有这关系,MindManager7.1首先找到了VC2005(没有sp1)的运行库运行,结果发现不匹配,所以报错。
(鱼漂原创,转载请注明)

于是,按下面的思路修复了此问题:
1. 重新安装vc2005 sp1 runtime library (google搜索vc2005 sp1,即可以MS官方网站找到下载)
2. 在C:\Windows目录,开始搜索"msvcr80.dll"文件,果然发现很多个版本的msvcr80.dll,其中,C:\Windows\system32目录下的应该是安装Visual Studio 2005(没有sp1)带过来的,不是sp1版本,而MindManager7.1首先会有这个版本启动,由于版本不匹配,所以启动失败。
### http://www.eit.name ###
3. 解决方法,将vc20005sp1版本目录下的3个DLL文件,复制到MindManager7.1的安装目录即可,vc2005sp1 runtime library的安装目录为:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700
(版本号为8.0.50727.762)

HTML2Image For Linux and Unix

[不指定 2008/06/13 16:16 | by ipaddr ]

Have you ever wanted a solution for converting html to image on Linux/Unix? Html2Image for Linux is a command line tool that can convert html to image on Linux or Unix platform.

html2image linux now solves this problem. It is a standalone tool package that can generate raster image from html content. The html page can be on a remote server or local file disk. html2image can convert them into images on the fly.
  

html2image can convert html to bmp, convert html to png and convert html to jpg. The URL and image file name can be specified on command line paramters, which is useful for batch processing a lot of html files. You can also call the command line program from your favourite programming languages like php or C++ in order to add html to image functionality to your server applications.

You can also control the compression quality of the jpeg image by specifying the quality parameters on command line.

http://www.guangmingsoft.net/htmlsnapshot/html2image.htm

1、通用类:

zamzar 是一个很牛的在线转换工具,能转换100M以下的到40种格式的文件,包括图象格式、文档格式、音频格式、视频格式等,几乎囊括了我们熟知的所有文件格式,可以自由转换,功能相当不错的了,可以说是一个比较全能的工具了,而且页面简洁易用,速度也很不错!!

Youconvertit 提供堪称最完美的在线文件转换服务,能在线对文档、图片、音频以及视频文件进行转换。能在41种文档格式(常用如html,txt,ppt,doc,pdf,rtf,csv,psd,xls,xhtml,xls等)、85种图片格式(常用如bmp,jpg,gif,tiff,ico,png等)、7种音频格式(aac、aif、aiff、mp3、ra、wav、wma)、11种视频格式(3gp、asf、avi、flv、mov、mp4、mpeg、mpg、rm、swf、wmv)进行相互转换。实在是一项非常不错的服务。

Xurrency 是在线的当前货币兑换查询工具,界面非常简单,选择币种,输入金额即可快速获得目标币种的数额。同时,底部还有一个实时的汇率表,直观的反馈一些主要币种的现时汇率。放在此类有些牵强,对一些朋友会很有用。


分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]