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

[不指定 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

HttpWatch

[不指定 2008/02/28 19:56 | by ipaddr ]

HttpWatch is an HTTP viewer and debugger that integrates with Internet Explorer to provide seamless HTTP and HTTPS monitoring without leaving the browser window.

HttpWatch is used in a wide variety of companies and industries for tasks such as:

  • Testing a web application to ensure that it is correctly issuing cookies or setting headers that control page expiration
  • Finding out how other sites work and how they implement certain features
  • Checking the information that Internet Explorer is supplying when you visit a site
  • Verifying that a secure web site is not issuing sensitive data in cookies or headers
  • Tuning the performance of a web site by measuring download times, caching or the number of network round trips
  • Learning about how HTTP works (useful for programming and web design classes)
  • Allowing webmasters to fine tune the caching of images and other content
  • Performing regression testing on production servers to verify performance and correct behavior

====安装====
1.将PHP5解压到C:\PHP目录
2.修改Apache的配置文件,加入:
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
修改:
DirectoryIndex index.php index.htm index.html default.htm

====配置====
1.将C:\PHP\php.ini-dist改为php.ini并移动到C:\Windows\目录
2.修改php.ini里面的extension_dir = "C:\php\ext\"
3.打开需要使用的extension,比如php_mbstring.dll, php_mysql.dll
Ipaddr特别提醒:某些extension需要使用其它的DLL,你可能需要将C:\php目录下的相关Dll复制到C:\Windows目录(比如,php_mysql.dll需要将C:\php下的libmysql.dll复制到C:\Windows)
4.重新启动Apache,并检查Apache的error.log是否有PHP的错误信息

====测试====
在Apache的DocumentRoot目录下,创建一个php.php,使用phpinfo()函数,检查PHP是否安装正确,以及所需的extension是否加载.

Glossword WAMP source code (NSIS)

[不指定 2007/12/29 00:05 | by ipaddr ]
// NSIS (http://nsis.sourceforge.net/)
// Glossword WAMP (http://sourceforge.net/projects/glossword/)
// Apache, MySQL and PHP are stored in archive usr.exe, directory /usr/local
// phpMyAdmin is in archive htdocs.exe, directory /htdocs/phpmyadmin
// Additionaly you need files with phrases: English.nsh and Russian.nsh
// ------------------------------------------
// English.nsh:
// LangString SECT_01 ${LANG_ENGLISH} "Glossword ${PRODUCT_VERSION}"
// LangString TXT_02 ${LANG_ENGLISH} "Thank you for installing Glossword.\r\nFor news and updates go to http://sourceforge.net/projects/glossword/"
// LangString DESC_SecGw ${LANG_ENGLISH} "Glossword program core files."
// ------------------------------------------
// install.bat
// @echo on
// cls
// SET ipath=%1
// cd "%ipath%/usr/local/apache2/bin"
// httpd.exe -k install -n Apache2_GW
// httpd.exe -k start -n Apache2_GW
// cd "%ipath%/usr/local/mysql5/bin"
// mysqld-nt.exe --install MySQL50_GW --defaults-file="%ipath%/usr/local/mysql5/bin/my-custom.cnf"
// net start MySQL50_GW
// ------------------------------------------
// uninstall.bat
// @echo off
// cls
// SET ipath=%1
// cd "%ipath%/usr/local/apache2/bin"
// httpd.exe -k stop -n Apache2_GW
// httpd.exe -k uninstall -n Apache2_GW
// net stop MySQL50_GW
// cd "%ipath%/usr/local/mysql5/bin"
// mysqld-nt.exe --remove MySQL50_GW
// ------------------------------------------
// unpack.bat
// @echo off
// usr.exe -y
// htdocs.exe -y
// del usr.exe
// del htdocs.exe
// del unpack.bat


Now you can create your own WAMP package.

; Glossword Desktop edition: Apache, MySQL, PHP
; Written by Dmitry Shilnikov (c) 2002-2007
; tty01@rambler.ru
;--------------------------------
;Include Modern UI

!include "MUI.nsh"

; replace in file with count of changes
!include "FileFunc.nsh"

;--------------------------------
;Custom variables

!define PRODUCT_NAME "Apache, MySQL, PHP"
!define PRODUCT_VERSION "Apache/2.2.4, MySQL 5.0.41-community-nt, PHP 5.2.3 for Windows"
!define DIR_SRC "."
!define THIS_DIR_INSTALLTO "Glossword-WAMP"

;--------------------------------
;General

Name "${PRODUCT_NAME}"
OutFile "glossword-wamp.exe"

;Folder selection page
InstallDir "$PROGRAMFILES\Glossword-WAMP"

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING
!define MUI_UI ${NSISDIR}\Contrib\UIs\modern.exe
!define MUI_ICON ${DIR_SRC}\install\gw_new.ico
!define MUI_UNICON ${DIR_SRC}\install\gw_remove.ico
!define MUI_FINISHPAGE_TEXT $(TXT_02)

;--------------------------------
;Pages

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

;Uninstaller pages
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Russian"

;--------------------------------
;Installer Sections

Section "$(SECT_01)" SecGw

SetDetailsPrint textonly
DetailPrint "Installing server files..."
SetOverwrite ifnewer

DetailPrint "htdocs..."
CreateDirectory "$INSTDIR\htdocs"
CreateDirectory "$INSTDIR\htdocs\glossword"

SetOutPath "$INSTDIR"
File "usr.exe"
File "htdocs.exe"
File "unpack.bat"
File "install.bat"
File "uninstall.bat"
File "localhost.url"
File "phpinfo.url"
File "phpmyadmin.url"
File "news.url"
File "glossword-wamp224_5041_523.txt"

ExecWait '"unpack.bat"'

SetOutPath "$INSTDIR"
; change configuraiton files
DetailPrint "httpd.conf..."
ClearErrors
FileOpen $0 "$INSTDIR\usr\local\apache2\conf\httpd.conf" "r"
GetTempFileName $R0
FileOpen $1 $R0 "w"
loop1:
FileRead $0 $2
IfErrors done1
StrCmp $2 "# Created by install$\r$\n" 0 +2
StrCpy $2 "# Created by glossword-amp.exe$\r$\n"
StrCmp $2 "DocumentRoot $\"E:/usr/httpdocs/svn/Glossword Desktop/htdocs$\"$\r$\n" 0 +2
StrCpy $2 "DocumentRoot $\"$INSTDIR\htdocs$\"$\r$\n"
StrCmp $2 "ServerRoot $\"E:/usr/httpdocs/svn/Glossword Desktop/usr/local/apache2$\"$\r$\n" 0 +2
StrCpy $2 "ServerRoot $\"$INSTDIR\usr\local\apache2$\"$\r$\n"
FileWrite $1 $2
Goto loop1
done1:
FileClose $0
FileClose $1
Delete "$INSTDIR\usr\local\apache2\conf\httpd.conf"
CopyFiles /SILENT $R0 "$INSTDIR\usr\local\apache2\conf\httpd.conf"
Delete $R0
;
DetailPrint "my-custom.cnf..."
ClearErrors
FileOpen $0 "$INSTDIR\usr\local\mysql5\bin\my-custom.cnf" "r"
GetTempFileName $R0
FileOpen $1 $R0 "w"
loop2:
FileRead $0 $2
IfErrors done2
StrCmp $2 "basedir=$\"../mysql5/$\"$\r$\n" 0 +2
StrCpy $2 "basedir=$\"$INSTDIR\usr\local\mysql5\$\"$\r$\n"
StrCmp $2 "datadir=$\"../mysql5/data/$\"$\r$\n" 0 +2
StrCpy $2 "datadir=$\"$INSTDIR\usr\local\mysql5\data\$\"$\r$\n"
FileWrite $1 $2
Goto loop2
done2:
FileClose $0
FileClose $1
Delete "$INSTDIR\usr\local\mysql5\bin\my-custom.cnf"
CopyFiles /SILENT $R0 "$INSTDIR\usr\local\mysql5\bin\my-custom.cnf"
Delete $R0
;
DetailPrint "php.ini..."
ClearErrors
FileOpen $0 "$INSTDIR\usr\local\php5\php.ini" "r"
GetTempFileName $R0
FileOpen $1 $R0 "w"
loop5:
FileRead $0 $2
IfErrors done5
StrCmp $2 "extension_dir = $\"../../php5/ext$\"$\r$\n" 0 +2
StrCpy $2 "extension_dir = $\"$INSTDIR\usr\local\php5\ext$\"$\r$\n"
StrCmp $2 "session.save_path = $\"c:/temp$\"$\r$\n" 0 +2
StrCpy $2 "session.save_path = $\"$TEMP$\"$\r$\n"
FileWrite $1 $2
Goto loop5
done5:
FileClose $0
FileClose $1
Delete "$INSTDIR\usr\local\php5\php.ini"
CopyFiles /SILENT $R0 "$INSTDIR\usr\local\php5\php.ini"
Delete $R0
;
DetailPrint "install.bat..."
ClearErrors
FileOpen $0 "$INSTDIR\install.bat" "r"
GetTempFileName $R0
FileOpen $1 $R0 "w"
loop3:
FileRead $0 $2
IfErrors done3
StrCmp $2 "set ipath=%1$\r$\n" 0 +2
StrCpy $2 "set ipath=$INSTDIR$\r$\n"
FileWrite $1 $2
Goto loop3
done3:
FileClose $0
FileClose $1
Delete "$INSTDIR\install.bat"
CopyFiles /SILENT $R0 "$INSTDIR\install.bat"
Delete $R0
;
DetailPrint "uninstall.bat..."
ClearErrors
FileOpen $0 "$INSTDIR\uninstall.bat" "r"
GetTempFileName $R0
FileOpen $1 $R0 "w"
loop4:
FileRead $0 $2
IfErrors done4
StrCmp $2 "set ipath=%1$\r$\n" 0 +2
StrCpy $2 "set ipath=$INSTDIR$\r$\n"
FileWrite $1 $2
Goto loop4
done4:
FileClose $0
FileClose $1
Delete "$INSTDIR\uninstall.bat"
CopyFiles /SILENT $R0 "$INSTDIR\uninstall.bat"
Delete $R0
ExecWait '"install.bat"'
;nsExec::ExecToStack '"install.bat"'

SetOverwrite off

CreateDirectory "$SMPROGRAMS\${THIS_DIR_INSTALLTO}"
CreateShortCut "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Glossword at localhost.lnk" "$INSTDIR\localhost.url"
CreateShortCut "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Glossword development news.lnk" "$INSTDIR\news.url"
CreateShortCut "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\phpinfo().lnk" "$INSTDIR\phpinfo.url"
CreateShortCut "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\phpMyAdmin.lnk" "$INSTDIR\phpmyadmin.url"
CreateShortCut "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Apache Monitor.lnk" "$INSTDIR\usr\local\apache2\bin\ApacheMonitor.exe"
CreateShortCut "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Remove Glossword WAMP.lnk" "$INSTDIR\uninstall.exe"
CreateShortCut "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Release notes.lnk" "$INSTDIR\glossword-wamp224_5041_523.txt"

WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd


;--------------------------------
;Descriptions

!include "${DIR_SRC}\install\English.nsh"
!include "${DIR_SRC}\install\Russian.nsh"

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecGw} $(DESC_SecGw)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;--------------------------------
; Functions

Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd

;--------------------------------
;Uninstaller Section

Section Uninstall

SetOutPath "$INSTDIR"
ExecWait '"uninstall.bat"'

SetShellVarContext current
Delete "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Remove Glossword WAMP.lnk"
Delete "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Apache Monitor.lnk"
Delete "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Glossword at localhost.lnk"
Delete "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Glossword development news.lnk"
Delete "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\phpinfo().lnk"
Delete "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\phpMyAdmin.lnk"
Delete "$SMPROGRAMS\${THIS_DIR_INSTALLTO}\Release Notes.lnk"
RMDir /r "$SMPROGRAMS\${THIS_DIR_INSTALLTO}"
RMDir /r "$INSTDIR\usr\local\apache2"
RMDir /r "$INSTDIR\usr\local\php5"
RMDir /r "$INSTDIR\usr\local\mysql5\bin"
RMDir /r "$INSTDIR\usr\local\mysql5\share"
RMDir /r "$INSTDIR\htdocs\phpmyadmin"
Delete "$INSTDIR\install.bat"
Delete "$INSTDIR\uninstall.bat"
Delete "$INSTDIR\glossword-wamp224_5041_523.txt"
Delete "$INSTDIR\localhost.url"
Delete "$INSTDIR\phpinfo.url"
Delete "$INSTDIR\phpmyadmin.url"

;RMDir /r "$INSTDIR"
SetAutoClose true

SectionEnd

官方 NSIS 插件全集简单介绍

[不指定 2007/12/28 23:41 | by ipaddr ]
Math plugin (contain examples) -- 数学函数插件,NSIS 软件已包含,这个不用说了吧,计算的时候必用。

System plugin (contain examples) -- 调用其他动态链接库(*.dll)插件,NSIS 软件已包含,超级好用,把 windows 的 API 发挥到极限。

A Plugin for controlling Internet Explorer -- 控制 IE 浏览器操作的插件,例如打开浏览器,关闭浏览器等等。

AccessControl plugin -- 存取控制插件,只适用于 Win2000 或以上。

BDE Alias -- Borland BDE 数据库别名创建修改插件(DELPHI 数据库程序安装制作的好东东)

BitTorrent downloads for NSIS -- BT 下载的插件,呵呵,作单独下载某个 BT 文件的好东西

CabDLL: Plugin to extract all the files from a cabinet (CAB) -- 从 CAB 压缩包中抽取文件的插件

Change Variable Plugin -- 可用来改变 $TEMP 的临时目录的插件,打破只能由安装程序自动选择系统 temp 路径。

ChangeRes Plugin -- 改变屏幕分辨率,颜色数,刷新率的插件。

ComPlusAdmin -- COM+ 组件的添加删除插件

CPUDesc -- 获取 CPU 相关参数的插件,例如 3DNOW, MMX 支持等等

CRC generator plugin -- 用来获取文件标准 ZIP CRC32(CRC 校验值) 的插件。

Crypto Plugin -- 用来加密的插件,算法包括 MD5, SHA1, MD2, MD4,可加密文字,文件,呵呵,绝对可以作出一个需要序列号的安装程序,即使别人有解包工具也需要懂得破解算法加密才行,否则只会得到一堆乱码字节。

Customisable MessageBox Plugin -- 可自定义消息对话框的插件,呵呵,可以作出4个按钮的消息框。

Detect Windows Version -- 检查windows系统版本的插件,在严格需要指定系统的时候有用。

Dialogs 2.3 -- 调用系统标准对话框插件,例如打开,保存等等的标准对话框。

DumpState -- 可列出安装过程中变量,堆栈里面内容的插件,用来调试之用超一流。

Enumerate CD-ROM Drives -- 列举当前可用的CD-ROM列表。

ExecDos -- 创建控制台环境运行DOS程序的插件。

Execute & Set Priority -- 以进程方式运行程序,而且可以指定运行优先级的插件。

ExLicensePage -- 扩展 License 页的插件,是否有很多 License 要用户同意才能安装呢,这个东东就是为了解决这个问题的,实现多页 License 效果。

external install file system -- 分卷安装制作的插件,用 NSIS把安装程序做到多个软盘中已经不是很困难的事了。

ExtractDLL -- 解压 compressfile.exe 压缩的文件,在用 NSISdl 插件制作在线升级程序时有用。只支持 zlib 算法。

ExtractDLLEx Plugin (LZMA containerfile decompressor) -- 同上,支持 LZMA 算法。这个插件和上面那个插件出现的目的是为了,在线升级程序多数人都要把升级文件打包以减少体积,而 NSIS 并没有属于自己的解压插件,所以不得不把一些没有精简过代码的解压程序来作为客户端的解压工具,这是不可取的,所以这两个插件随之出现。

Find Process By Name -- 查找进程的专用插件,呵呵,这下不用自己用API函数来互斥来知道进程是否运行了。

FloatOP plugin -- IntOp 只能操作整数,该插件就是为了解决浮点数运算问题的。

Help Support Plugin -- 这是一个可以令到你点击一个按钮或按“F1”就可以通过关键字调出相关帮助中的相关章节的插件。

InetLoad -- 一个类似 NSISdl 的下载插件,支持 http 和 ftp ,基于 MS WinInet API,对于在线升级程序制作有一定用处。

InstallOptionsEx 2.4.2 beta 1 -- 扩展自原 InstallOptions 插件,更多控件支持 Animation(动画), ProgressBar(进度条), TrackBar(位置调节), IPAddress(IP 输入), DateTime(日期时间编辑框), MonthCalendar(日历), UpDown(上下调节), TreeView(树形结构视图框)。还有其他改进功能。

Internet plugin -- 网络功能插件,取本地计算机的主机名,IP 地址,还有 urls 的状态代码,例如:404 就代表 urls 不存在。

IPTest -- 检测 IP 段中的可用地址。可用来检测一个IP是否存在并可用。

KillProcDLL Manual -- 清除进程的插件,既然能检测出阻碍安装过程的进程当然少不了这个清除进程的东东啦。

Lazarus Registration Component -- 可添加一个输入序列号和注册码的页面,呵呵,想做一个要输入注册码的安装程序吗?这个插件就是用来这样做的。

Marquee (text scroll) -- 可以在 INSTFILES 页面(安装程序进度列表页面)的列表中添加滚动条的插件。还可以改列表的颜色,字体,边框等等

MD5 plugin -- md5 插件,著名的校验算法插件,用来检验一个文件的版本是否对应的最好插件。

MSIBanner - Plugin to display a dialog with a progress bar -- 一个仿效标准 MSI 安装程序(Windows Installer) banner 的界面插件。

new directory selection page -- 安装目录选择页面插件,能检测是否满足需要空间大小。

NSIS Debugger -- NSIS 调试器插件,用来调试脚本用的。

NSIS-Date 1.0 -- 取本地时间的插件,在 API 函数中也能做到,但是这个插件是推荐用的,因为它包括了处理例如夏令时这类的时间问题。

NSISLog -- 写安装日志的插件,用来记录安装过程,从而准确删除安装过的文件的好插件。

nsRandom -- 能产生随机数的插件,某些时候,这个插件是很有用的。

nsScreenshot -- 保存屏幕截图为一个BMP文件的插件。可全屏幕截图或指定窗口截图

nsWeb: A plugin to display the web browser control in a custom page -- 可以插入一个支持 HTML 的页面插件,也可以以弹出窗口的方式显示,做广告的东东。

NxS MSI LoaderDlg -- MSIBanner 只是个仿效插件,所以就产生了这个插件,要求完美的人总会有的。

ODBC Configuration Manager -- ODBC 数据源配置管理插件。制作数据库安装程序的又一个好东东。

Perl plugin - v. 1.3 -- 这是一个允许在 NSIS 安装程序中执行 Perl 代码的插件。

Plugin Tester (or Wrapper) -- 这是个能使用命令行参数调用其他插件中函数的插件。

Processes plug-in -- 查找和清除进程(包括设备驱动)的插件。(适用:WinNT,Win2K,WinXP,Win2003 Server)

Python Interpreter -- 这是一个允许在 NSIS 安装程序中执行 Python 代码的插件。

Refresh Desktop Plugin -- 这是一个刷新桌面的插件,有时候程序安装了桌面图标,为什么用户看不见呢,那就需要这个插件了。

Service Control Manager plugin (install services and drivers on NT/2K/XP) -- 安装服务程序(包括查看服务程序状态,停止,运行操作)的插件。适用:NT/2K/XP

ShellLink plugin -- 这是允许你读取一个快捷方式文件(*.lnk)的插件,那样你就可以知道这个快捷方式的情况,例如指向哪个文件等等。

System hardware detection -- 检查系统硬件信息的插件,目前能检测 CPU 名称,CPU 速度,系统内存大小,显卡名称,显卡内存大小。

System Tray NotifyIcon creator plugin -- 可以产生一个右下角区域中图标的插件,超级酷,估计没有人做过这样的安装程序吧。^__^,可以自定义图标,自定义文字和安装进度百分比。

TAPI Helper Plugin -- 用来检测 modem 的 ID 和名称的插件。

ToolTips -- 可以设置安装程序的提示窗口(例如按钮的帮助提示,正常情况下是浅黄背景色)的前景和背景颜色。

TTF Font Name Plugin -- 能够获取 TTF 字体在计算机中显示的名字的插件,这是个方便制作安装字体的插件。

UnTGZ -- 这是一个解压缩插件。(*.tgz/*.tar.gz)

UserMgr Plugin -- 这是一个能够管理用户帐号和用户组的插件。例如创建计算机用户或计算机用户组等的功能。

VPatch -- 用来制作补丁的插件,能够根据前后版本的不同,根据差异制作出体积非常小的补丁安装程序。

Write arbitrary sized, runtime assigned binary data to Registry -- 在注册表中写入二进制值的插件,限制最大 511 字节。

xtInfoPlugin - System Information Plugin -- 检查系统信息插件,安装程序文件名(ie. Setup.exe)  安装程序放置路径(ie. D:\SetupFiles) 安装程序全路径含文件名(ie. D:\SetupFiles\Setup.exe)  计算机当前语言(ie. Danish, English, German, etc.)  .NET Framework IDs(ie. 1.0, 1.1, 2.0, etc.)  .NET Framework 版本(ie. 1.0.3705, 1.1.4322, etc.)  Internet Explorer IDs(ie. 4.01, 5.0, 5.01, 6.0, etc.)  Internet Explorer 版本(ie, 5.00.2920.0000, 6.00.2600.0000, etc.)  Windows IDs(ie. 95, 98, me, xp, nt3, nt4, 2003, etc)  Windows 版本(ie, 5.1.2800, etc.)  MDAC IDs(ie. 2.5)  MDAC 版本(ie. 2.50.4403.9)  OLEDB IDs(ie. 2.5) OLEDB 版本(ie. 2.50.4403.8)  Windows Service Pack IDs(ie, 1, 2a, 6a, etc.)

ZipDLL -- 解压 Zip 压缩文件的插件。

以上插件都是体积非常小的,务求做到了体积小,功能全的效果,以目前来说,NSIS 是安装程序小且功能齐全多样的安装程序制作软件。

关于nsis概述

[不指定 2007/12/28 23:41 | by ipaddr ]

NSIS是 win32安装、卸载系统

NSIS 是“Nullsoft 脚本安装系统”(Nullsoft Scriptable Installation System)的缩写,
它是一个免费的 Win32 安装、卸载系统,采用了简洁高效的脚本方式。
它本来是一个由 Nullsoft 创建并用于作为 Winamp 及其插件发布的系统,
但现已被上百个应用程序所应用,作为它们进行程序发布的工具。
NSIS 创建的安装程序可以进行安装、卸载、设置系统设置、解压文件等等。
几乎可以做所有事情。因为它基于脚本文件,所以你可以完全控制你的安装程序的每个部分。
它的脚本语言支持变量、函数、字串处理,就像是一个普通的程序语言 - 但其仅设计用来创建安装程序。
即使它有所有这些功能,NSIS 仍然是好用的最小的安装系统。在默认选项下,它仅用 34KB 的开销。
NSIS 安装程序不会因为解压缩而令人烦扰, 它会告诉用户“请稍候”。它们开始这点后就会完成工作。

官方网站: http://nsis.sourceforge.net

Eclipse首度推出PHP开发工具

[不指定 2007/12/24 22:39 | by ipaddr ]

本部在渥太华的Eclipse Foundation宣布了Eclipse PHP 开发工具项目1.0 版本的可用性。

这个Eclipse PDT是一套开发工具和框架,可以提高PHP开发者的效率。PHP这一脚本语言被广泛用于Web开发而且可以植入HTML。

Eclipse PDTEclipse推出的第一个针对PHP开发者社区的项目,据估计PHP开发者约有四百万。而Eclipse这一开源平台拥有大约230万使用者,主要用于Java和C/C++的开发。

Eclipse Foundation官方表示,PDT 1.0的发布允许PHP开发者使用基于Eclipse的IDE,也因此将增加整个Eclipse社区的人数。“这将是PHP和Eclipse的双赢。”Forrester Research 的分析师Jeffrey Hammond说,“Eclipse更多地被认为是优秀的JavaIDE,这也将更好地改变人们的这种观念。”

“我们已经收到来自PHP社区对此的巨大反响,”Eclipse PDT 项目领导Yossi Leon说,“到目前我们已有超过40,000 下载的PDT,反馈非常积极。”

Zend Technologies 和IBM在去年向Eclipse提议了这个PDT。该PHP PDT标准基于Eclipse Public License,是用Java实现的一套插件到Eclipse 平台的工具。

PDT 1.0的主要特性包括:Context sensitive editors:语法突出显示,代码辅助和代码折叠;综合Eclipse 项目模型:可使用File和Project Outline Views和一个新的PHP Explorer View来检查;支持PHP 代码的增量调试;允许开发人员和独立软件供应商能够轻松地扩展PDT 来创建新的和有趣的PHP 开发工具。

Javascript给元素添加事件

[不指定 2007/09/18 19:02 | by ipaddr ]

最简单的是这样:

<input type="button" onclick="alert(this.value)" value="我是 button" />

动态添加onclick事件:

<input type="button" value="我是 button" id="bu">
<script type="text/javascript">
var bObj=document.getElementById("bu");
bObj.onclick= objclick;
function objclick(){alert(this.value)};
</script>

如果使用匿名函数 function(){},则如下面所示:

<input type="button" value="我是 button" id="bu">
<script type="text/javascript">
var bObj=document.getElementById("bu");
bObj.onclick=function(){alert(this.value)};
</script>


FF中应该使用bObj.click=function() {}

上面的方法其实原理都一样,都是定义 onclick 属性的值。值得注意的是,如果多次定义 obj.onclick,例如:obj.onclick=method1; obj.onclick=method2; obj.onclick=method3,那么只有最后一次的定义obj.onclick=method3才生效,前两次的定义都给最后一次的覆盖掉了。

再看 IE 中的 attachEvent:

<input type="button" value="我是拉登" id="bu">
<script type="text/javascript">
var bObj = document.getElementById("bu");
bObj.attachEvent("onclick",method1);
bObj.attachEvent("onclick",method2);
bObj.attachEvent("onclick",method3);
function method1(){alert("第一个alert")}
function method2(){alert("第二个alert")}
function method3(){alert("第三个alert")}
</script>

执行顺序是 method3 > method2 > method1 ,先进后出,与堆栈中的变量相似。需要注意的是attachEvent 中第一个参数是on开头的,可以是 onclick/onmouseover/onfocus 等等

据说(未经确认验证)在 IE 中使用 attachEvent 后最好再使用 detachEvent 来释放内存

再看看 Firefox 中的的 addEventListener:

<input type="button" value="我是布什" id="bu">
<script type="text/javascript">
var bObj = document.getElementById("bu");
bObj.addEventListener("click",method1,false);
bObj.addEventListener("click",method2,false);
bObj.addEventListener("click",method3,false);
function method1(){alert("第一个alert")}
function method2(){alert("第二个alert")}
function method3(){alert("第三个alert")}
</script>

可以看到,在 ff 中的执行顺序是 method1 > method2 > method3 , 刚好与 IE 相反,先进先出。需要注意的是 addEventListener 有三个参数,第一个是不带“on”的事件名称,如 click/mouseover/focus等。

分页: 7/13 第一页 上页 2 3 4 5 6 7 8 9 10 11 下页 最后页 [ 显示模式: 摘要 | 列表 ]