kenlistian

勤学多思

  IT博客 :: 首页 :: 新随笔 ::  :: 聚合  :: 管理 ::
  412 随笔 :: 0 文章 :: 23 评论 :: 0 Trackbacks

#

  看到axgle 兄解释ruby中的yield的概念,形象的理解为“占位”的作用。
   但是对yield还可以带着参数的概念总觉得有点不够形象,
   def foo
     yield [1,2,3]
   end
   foo {|v| p v}
   以我看来更像是,比喻成一个纯虚函数更好理解,其中,在方法后跟块后,不过就是对yield的声明化了而已。

 不过对于初步理解yield还是有很好帮助,算是完美解释了。
  下转:(完整贴在:http://www.javaeye.com/topic/31018 )


大学里常常发生占位置的现象:头天晚上拿一本书放在课座上,表示位置已经被占了;第二天才来到这个座位上,翻开书正式上课.在这个现象中,“书本”充当了“占位符”的作用。
在Ruby语言中,yield是占位符:先在前面的某部分代码中用yield把位置占着,然后才在后面的某个代码块(block)里真正实现它,从而完成对号入座的过程.
  1. #定义find  
  2. def find(dir)  
  3.   Dir.entries(dir).each {|f| yield f} #获得dir目录下的文件名列表;对每个文件名,用yield来处理(至于怎么处理,还不知道,占个位置先^_^)  
  4. end  
  5.   
  6. #使用find  
  7. find(".") do |f| #block开始  
  8.   puts f  #用输出文件名这个语句,真正实现了yield的处理(也可以用任何其他语句)  
  9. end #block结束  

由此可见,yield属于定义层,属于宣告层,也就是在心里说一句:"这个位置不错,我先用书本占了再说!";而block属于使用层,实现层,也就是最终你坐在了你先前占的位置上,从而真正的实现了对号入座的过程.
最后,请大家不要问我"万一书本被偷了怎么办?"之类的问题,谢谢合作 


posted @ 2008-03-16 00:13 kenlistian 阅读(10680) | 评论 (5)编辑 收藏

在ruby中,其闭包和块最为有趣和让习惯传统编程后感觉有些别扭,

闭包:理解为一段代码,能作为参数传递给其它方法。其实,从传统编程角度讲也就是传递一个函数指针的意味比较浓。
块:  相当是一个匿名函数。

在模式设计中,常常把类的共性部分抽离到一个父类,然后通过子类继承来实现。在ruby中,可以
采用闭包模式,把各异的处理部分(也可理解为函数指针)作为参数传给方法中处理。

有时:感觉就是无非一个函数指针传给另一个函数中调用而已。
如下测试例子

 1 def method(&func)
 2    func.call(self)
 3 end
 4 
 5 
 6 def func1
 7    puts "func1 by call 1"
 8 end
 9 
10 method(){ func1 }
11 method(){ puts "call function 2" }
在method中声明参数为 &func,有点想c++中的带指针模式。
在11行中,其就是一个整个块被传入。

下面看一个类中调用的闭包的例子。

 1 class Button
 2 def initialize(label)
 3    puts label
 4 end
 5 
 6 end
 7 
 8 class JukeboxButton < Button  
 9 def initialize(label, &action)  
10     super(label)    
11     @action = action 
12 end 
13 
14 def buttonPressed  
15     @action.call(self) 
16 end
17 end 
18 
19 class SongList
20  def start
21     puts "press start"
22  end
23  def pause
24     puts "press pause"
25  end
26 end
27 
28 songList = SongList.new
29 bStart = JukeboxButton.new("Start") { songList.start }   
30 bStart.buttonPressed
31 bPause = JukeboxButton.new("Pause") { songList.pause } 
32 bPause.buttonPressed

posted @ 2008-03-15 21:08 kenlistian 阅读(163) | 评论 (0)编辑 收藏

     摘要: 用了下netbeans ide6.0.1 工具的确不错,但是,速度太慢,到底还是java的东西啊,虽然我的机子够快,但是再快也不能这样浪费机子的资源啊,一旦打开10来个窗口,(通常又是看文档,翻资料,测试文件时)转回netbeans还得从pagefile切换到内存中来。还是轻量级的编辑器强,虽然没有函数等自动处理,但是有个语法高亮就已经足已。速度快,界面也优良,没办法,还是用原来的编辑器吧,下面,...  阅读全文
posted @ 2008-03-15 10:42 kenlistian 阅读(2878) | 评论 (0)编辑 收藏

当然用ri来看文档细节

文本

文件

  • ftools.rb 文件操作utility(旧)
  • fileutils.rb 文件操作utility (ftools.rb 的升级版) ruby 1.7 特性
  • find.rb 文件搜索模块
  • io/nonblock.rb IO 类的扩展(添加与nonblock模式相关的方法)
  • io/wait.so IO 类的扩展(添加负责等待IO输入的方法)
  • pathname.rb 路径名类 ruby 1.8 特性
  • tempfile.rb 生成临时文件
  • tmpdir.rb 返回临时目录 ruby 1.8 特性
  • un.rb 类似Unix命令的文件操作utility ruby 1.8 特性

网络

输入输出

日语

数学

数据库

画面控制/CUI

GUI

日期·时间

多线程·同步

Unix

MS Windows

正则表达式

  • eregex.rb 可使用`|', `&'操作符将2个正则表达式连接起来

GC

Design Pattern

开发工具

命令行

其他




posted @ 2008-03-14 18:24 kenlistian 阅读(1327) | 评论 (0)编辑 收藏

Text Editor – HEX Editor
HTML Editor – Programmers Editor

Additional Downloads Page

* This page has been put together to provide you, the user, with wordfiles, macros, tag lists, and autocomplete files generated for different programming languages, all of which have been developed by other users.

* I have not necesessarily tried all of the wordfiles, macros, tag lists, and autocomplete files here so use them with care, however, I only add the files that I believe are going to be helpful.

* If you have any suggestions or contributions you would like make to this page, please send an email to me.

* If wordfiles, macros, tag lists, dictionaries, or autocomplete files are not what you intended to download, please return to the Main Downloads page for UltraEdit or UltraCompare Shareware Evaluation Files.

Wordfiles

Each wordfile contains one language. Each wordfile has been set up to be language twenty "/L20" (UltraEdit supports up to twenty languages - "/L1" to "/L20" - in one wordfile at the same time). With this in mind, you should be able to open the file in your browser and copy it and append it to your existing wordfile without too much difficulty.

The "/Lnn" number corresponds to the language's position in the Language Lists that are available via the follwing dialogs:

  1. View --> View As (Highlighting File Type)
  2. Advanced --> Configuration --> Syntax Highlighting --> Language dropdown
If a new lanugage is added as "/L20", for example, the language list will look like this:

     8. ...
     9. JavaScript
     10. language 10
     ...
     19. language 19
     20. The New Language You Added

The default languages in wordfile.txt are numbered from /L1 to /L9. New languages that are added should not conflict with those, or with each other. For example, Python 2 and and Unix Shell Scripts are *both* numbered /L20. So one or the other has to change, if both extensions are to be added. You add new languages by appending the contents of appropriate wordfile to wordfile.txt.

If it is desired to incorporate multiple wordfiles into the default wordfile it may be easiest to download and save these in a temporary directory and work from the saved local copies while editing the wordfile. You can open the active wordfile for editing by going to Advanced -> Configuration -> Syntax Highlighting (in UltraEdit) and clicking on the Open button.

To edit wordfile.txt go to Advanced --> Configuration --> Syntax Highlighting and click on the "Open" button beside the "Full path name for wordlist". After editing the file, it is not necessary to restart UltraEdit. The changes take effect immediately, as may be seen by reloading a file with an extension listed in one of the newly added wordfiles.

In the case of the zip files you will need to download these and unzip them and then copy and paste the wordfiles from the archive. UltraEdit's help file includes help on modifying the wordfile if it is needed under Syntax Highlighting.

Click on the type of item you wish to download:

ALL WORDFILES IN ONE PACKAGE
ABAP/4 - 08/02/2002
ABB Rapid Command - 08/24/99
ABB-S4 Rapid Command - 02/18/2003
ActionScript 2.0 - NEW - 04/14/2004
ASL/ACPI - 12/01/2000
Ada95 - NEW - 04/14/2004
ADEPT Command Language - 06/02/99
ADEPT V+ - 7/24/2003
ADSP2181 - 12/01/2000
AHDL - 03/28/2000
AlphaScript - 03/28/2000
AML (Arc Macro Language) & SML (Simple Macro Language)
AMPL - 03/28/2000
AMTrix- 03/02/99
ANSYS - 05/30/2000
ANSYS Parametric Design Language - 03/28/2000
Apache Web Server - 10/12/2001
ASN.1 - 10/12/2001
ASP (JScript) - 03/28/2000
ASP (PerlScript) - 08/02/2002
ASP (Visual Basic) - 03/28/2000
ASP (Visual Basic/HTML) - 12/31/2001
ASP (VBScript) - 03/28/2000
ASP (VBScript - Hipertools) - 10/12/2001
ASPX - 08/02/2002
ASPECT - 10/12/2001
Assembly for 21xx - 05/30/2000
Assembly for 2106x - 01/21/99
Assembly for 6502 - 08/02/2002
Assembly for 6809
Assembly for 68HC908 - 12/01/2000
Assembly for 68HC11 - 03/28/2000
Assembly for 8051 - 12/01/2000
Assembly for ARM - 12/01/2000
Assembly for AVR - 08/24/99
Assembly for CALM - 10/12/2001
Assembly for C167 V7.0 - 08/02/2002
Assembly for C515C - 12/01/2000
Assembly for DSP56K - 03/28/2000
Assembly for F240 - 03/28/2000
Assembly for H8S - 12/01/2000
Assembly for MASM - 06/02/99
Assembly for Microchip PIC - NEW - 04/14/2004
Assembly for MIPS - 08/02/2002
Assembly for M68000 - 10/12/2001
Assembly for MPC860 - 12/01/2000
Assembly for NEC 75X Microcontroller - 11/3/98
Assembly (Netwide) - 08/02/2002
Assembly for NSC COP8 - 7/24/2003
Assembly for RDS-500 - 08/24/99
Assembly for S/370 - 05/30/2000
Assembly for TEAK - 10/12/2001
Assembly for TI MSP430 - 02/18/2003
Assembly for MSP4301 - 7/24/2003
Assembly for V850 - 10/12/2001
Assembly for x86 - 10/12/2001
Assembly for x86 (GNU) - 12/31/2001
Assembly for Z80 - 08/24/99
Assembly for z/OS - 7/24/2003
Assembly (High Level) - 12/31/2001
AutoIT - 10/12/2001
AutoIT 2.61 - 12/31/2001
AutoIT 2.64 - 7/24/2003
AutoIT 3.00 - NEW - 04/14/2004
AutoLev - 12/31/2001
AutoLISP - NEW - 04/14/2004
Automate 5.04 - NEW - 04/14/2004
Avenue - 03/28/2000
AVISynth - 7/24/2003
AWK - 06/02/99
Baan C - 05/30/2000
BaanERP - 05/30/2000
Baan 3 / 4GL - 01/21/99
Bash - 08/24/99
Batch - 12/01/2000
BibTex - 06/02/99
Blitz Basic 3D - 10/12/2001
Blitz Basic v1.73 - 08/02/2002
Blitz+ v1.35 - 7/24/2003
BM Scripts - 03/28/2000
BMC Patrol Scripting - 7/24/2003
Bourne & Korn Shell - 08/24/99
Broadvision JavaScript - 10/12/2001
Bullant - 10/12/2001
C/C++ - 03/18/99
C/C++ for Amiga - 7/24/2003
CA Visual Objects - 10/12/2001
ChordPro - 7/24/2003
C++ Header - 12/01/2000
C++ Source - 12/01/2000
C# - 7/24/2003
C for C167 - 08/02/2002
CA OpenROAD 4.01 - 10/26/98
CA Realizer 2.0 - 2/24/98
Coq - 02/18/2003
Cascading Style Sheets 2.0 - 10/12/2001
Cascading Style Sheets for IE 6 - 08/02/2002
Ch - NEW - 04/14/2004
Cisco IOS Config - 10/12/2001
Clarion - 12/01/2000
Clarion-Template - 12/01/2000
ClearBasic - 10/12/2001
Clipper - 03/02/99
CLIPS - 6/25/98
Cobol - 03/28/2000
Cold Fusion 4.31 - 2/24/98
Cold Fusion 4.5/5.0 - 08/02/2002
Comau PDL - NEW - 04/14/2004
Config Files - 03/28/2000
Corba - 06/02/99
Cron Scripts - 10/12/2001
CSound csd - 10/12/2001
CSound orchestra - 10/12/2001
CSound score - 10/12/2001
Cue Sheets - 03/02/99
Cup 1 - 08/02/2002
CUPL - 08/02/2002
C-Win API - 01/21/99
Dataflex - 03/02/99
DB4Web - 03/28/2000
DB/C - 03/28/2000
DCAL - 03/28/2000
Digital Command Language - 10/12/2001
Delphi 4 - 03/28/2000
Dial-Up Scripting - 7/24/2003
Direct X Mesh - 12/31/2001
Directives - 01/21/99
Divx Player 2.0 - 10/31/2003
docBook - 7/24/2003
DOS Batch - 10/12/2001
DOS/NT Batch - 08/02/2002
DSSSL - 7/24/2003
DTD (XML) - 10/31/2003
DTML (Zope) - 08/02/2002
Dial-Up Scripting - 7/24/2003
DXL - 12/01/2000
e Scripts - 02/18/2003
Eiffel - 03/28/2000
EPLD - 03/28/2000
EScript 88 - 05/30/2000
EScript 92 - 10/12/2001
Esprit post processor language - 11/17/97
ESRI Avenue(DBa 2.1) - 10/12/2001
Euphoria - 05/30/2000
EXAPTplus - 08/02/2002
Fame - 03/28/2000
FlagShip (Clipper/dBASE) - 11/17/97
Flash ActionScript v5 - 10/12/2001
Flash ActionScript - JavaScript - 10/12/2001
Flash MX ActionScript 3 - 08/02/2002
Flash MX ActionScript 2004 - 10/31/2003
FLISP - 08/24/99
Focus - 03/28/2000
Formida - 10/12/2001
Fortran 90 - 05/30/2000
FoxPro 2.6 - 12/01/2000
Visual FoxPro 6.0 - 12/01/2000
Frame-/ElmScript - 01/21/99
Gauss - 10/31/2003
General Algebraic Modeling System - 08/02/2002
GDL Scripts - 03/28/2000
GED2HTML - 03/28/2000
Gedcom - 03/02/99
Gembase - 08/02/2002
Genexus - 7/24/2003
Geopak - 10/31/2003
Ghost Installer - 7/24/2003
GNU Makefiles - 08/02/2002
Hamster Scripts - 03/28/2000
Hamster Scripts - NEW - 04/14/2004
Hamster Mail Filter - NEW - 04/14/2004
Haskell - 08/24/99
HTML 4.01 - 10/12/2001
HTML/PHP/SQL - 12/01/2000
Hugo - 03/28/2000
IBM Bookmaster - 04/14/99
IBM DirectTalk - 10/12/2001
IBM Net.Data - 08/24/99
IDL - 10/12/2001
Inform - 03/28/2000
Inform 6 - 03/28/2000
Inger - 7/24/2003
INI Files - 03/28/2000
Informix 4GL - 08/02/2002
Informix Forms - 08/02/2002
Install Shield - 10/31/2003
Interbase SQL - 5/18/98
JamagicScript - 10/12/2001
Jasmin - 12/01/2000
Java 1.1.7/Swing - 03/28/2000
Java 1.2.2 - 08/24/99
Java 1.2 with FAME TimeIQ - 03/28/2000
Java 1.3 - 10/12/2001
Java 1.4 - 08/02/2002
Java 1.4 with JSP - 08/02/2002
JavaScript - 08/02/2002
JavaScript 2.0 - 10/12/2001
JavaScript/WMLS - 05/30/2000
Jess 6.1 - 10/31/2003
JHTML - 12/01/2000
JScript - 6/25/98
JSP - 03/28/2000
JSTL - 7/24/2003
Karel - 7/24/2003
Kawasaki - 7/24/2003
Kixtart - 10/12/2001
Kixtart v4.11 - 02/18/2003
Kixtart v4.12 - 7/24/2003
Kixtart v4.22 - 10/31/2003
KRL - KUKA Robot Language - NEW - 04/14/2004
LaTex - 03/17/99
TeX/LaTex (ATT98580) - 10/31/2003
LDAP - 03/02/99
LDIF for the Netscape Directory Server - 03/02/99
Lingo - 03/28/2000
Lingo 8.51 - 08/02/2002
Linker 6.0 - 08/02/2002
Linker 7.0 - 08/02/2002
Lisp - 12/01/2000
Litestep - 08/02/2002
LOGIC - 08/24/99
LotusScript - 03/02/99
LotusScript 5 - NEW 04/14/2004
LPC - 12/01/2000
Lotus Script 5 - 7/24/2003
Lua - 08/02/2002
LULL - 10/12/2001
Lumonics GCode - 05/30/2000
Macro Scheduler Script - 02/18/2003
Macro ToolsWorks - 7/24/2003
Makefile - 05/30/2000
Map - 08/02/2002
MapBasic - 6/25/98
Maple - 02/18/2003
Mapserver - 10/12/2001
Mason - 05/30/2000
MathML - 11/3/98
MATLAB 5 - 01/21/99
MATLAB 6 - 10/12/2001
Maxima 5.9.0 - 7/24/2003
MAXScript - 12/01/2000
MDX - NEW - 04/14/2004
Maya Embedded Language (MEL) Script - 10/12/2001
ME10 Macro Language - 10/12/2001
MessageBuilder - 05/30/2000
Microsoft Resource Files - 08/02/2002
MicroStation Basic - 04/14/99
Mill G Code - 04/14/99
MINC DSL - 11/17/97
Miva - 05/30/2000
Modelica - 10/12/2001
Modula 2 - 05/30/2000
Modula 3 - 03/28/2000
MOF - 10/12/2001
Mosel - 7/24/2003
Motive Maps - 04/14/99
Motorola DSP56000 - 11/17/97
MRTG Config - 10/12/2001
MSIL - 02/18/2003
MSSQL 7 - 10/26/98
MSSQL 2000 - 08/02/2002
Mud Master Script - 05/30/2000
Multibase SQL - 10/12/2001
Mumps - 01/21/99
MySQL - 03/28/2000
Navision - 08/02/2002
NC Files - 08/24/99
NC Siemens 840D - 08/02/2002
netCDF CDL - 11/17/97
Neuron (MC3150,3120) Chip Language - 04/14/99
nnCron - 7/24/2003
Notes Formula Language - 03/28/2000
NQC - 08/02/2002
NSIS Installer - 7/24/2003
NT Commands - 03/28/2000
NVIDIA Cg 1.0 - 7/24/2003
OCAML
OEM Setup - NT INF file language - 10/26/98
Omnimark - 08/24/99
OpenROAD - 08/24/99
OPL - 03/02/99
Oracle SQL - 10/12/2001
Palm Pilot Resource Script - 12/01/2000
Paradox
Pascal - 10/12/2001
PASCALFC - 7/24/2003
Passport - 11/3/98
Patrol Scripting - 03/28/2000
Pearl - 6/25/98
PeopleCode 8.14 - 7/24/2003
PeopleSoft SQR - NEW - 04/14/2004
Perl - 03/02/99
Perl/CGI - 10/12/2001
Perl/Tk - 08/02/2002
Portable Game Notation - NEW - 04/14/2004
PHP - 12/01/2000
PHP3 - 03/28/2000
PHP4 - 10/12/2001
Pick Basic - 08/02/2002
Pixar's Renderman Interface - 04/14/99
Pixar's Renderman Shader - 04/14/99
PeopleSoft SQR - 10/31/2003
Pixel Shader 1.4 - 12/31/2001
PL/I - 7/24/2003
PL/I IBM-Visual Age - 02/18/2003
PLM - 05/30/2000
PL/SQL - 10/12/2001
PocoMAIL - NEW - 04/14/2004
PostScript - 08/24/99
PovRay - 10/12/2001
PowerBasic - 08/24/99
PowerBuilder 7 - 03/28/2000
PowerTerm - 10/12/2001
Progress 8.3 - 11/3/98
Progress 9.1 - 10/31/2003
ProvideX - 7/21/97
Python - 05/30/2000
Python 2.0 - 10/12/2001
Python 2.3 - NEW - 04/14/2004
QBasic - 03/28/2000
QBasic 7.1 - 08/02/2002
QNAP - 7/24/2003
Quake Configuration - 03/02/99
Quake 3 Arena Shader - 10/31/2003
R Scripting - 02/18/2003
Rapid Q - 08/02/2002
RealPix - 11/3/98
RealText - 11/3/98
REBOL - 10/12/2001
REXX - 03/28/2000
RTF - 05/30/2000
Ruby - 12/31/2001
S/S+ - 01/21/99
S/390 Assembler Macro Language - 7/24/2003
SACS IV - 03/28/2000
SAP - ABAP/4 - 12/01/2000
SAS - 5/5/98
SBP - 7/24/2003
Scenix - 05/30/2000
Schema - 10/12/2001
Scheme - 08/24/99
Scilab 2.7 - 7/24/2003
SearchScript - 03/28/2000
Standard Delay Format - NEW - 04/14/2004
SDL-PR - 10/12/2001
SGML - 08/24/99
Simulink - 12/31/2001
Sisctus Prolog - 10/12/2001
Small - 12/31/2001
SmartGEN Template - 08/02/2002
SMIL - 11/3/98
Spin - 03/28/2000
SPSS Base - 7/24/2003
SQL/SQC - 08/02/2002
SQL Server Manager - 10/12/2001
SQR - 03/28/2000
Stata 7 - 10/12/2001
Sybase 11.x SQL - 04/14/99
Symbian OS - NEW - 04/14/2004
System Policies - 03/02/99
Tcl/tk - NEW - 04/14/2004
Teradata SQL - 12/01/2000
Tera Term Language - 7/24/2003
Tivoli - 10/12/2001
TSL - NEW - 04/14/2004
Transact SQL - 7/24/2003
True Basic - 7/24/2003
Turbo C - 08/02/2002
Turbo Pascal- 03/02/99
UC - 08/02/2002
UC4 - 7/24/2003
UEMacro - 12/01/2000
UG/APT Source - 05/30/2000
UniBasic 5.2 - 08/02/2002
Unidata - 10/12/2001
Uniface 6 - 03/28/2000
Uniface 7.1 - 03/28/2000
Uniface 7.2 - 03/28/2000
Unisys Linc LDL - 08/02/2002
Universe DATABASIC - 08/02/2002
UNIX Shell - 10/12/2001
UnrealScript - 7/24/2003
VB - 08/24/99
VB.Net - 12/01/2000
VBScript - 12/01/2000
Velocity (Jakarta) - 12/31/2001
Verify- 03/02/99
Verilog - 5/5/98
Verilog 2001 - 10/31/2003
Verity Style - 5/5/98
Verity Topics
Vertex Shader 1.1 - 12/31/2001
VHDL - 08/24/99
VHDL 9.3 - 08/02/2002
VircScript - 2/28/98
Visual Dialog Script - 03/02/99
Visual Objects - 10/12/2001
Visual Pro 5 Basic - 10/12/2001
Voice XML - 10/12/2001
VOS PL/1 - 08/24/99
VRML - 8/21/98
VRML97 - 10/12/2001
VTML - 03/02/99
WAP - 12/01/2000
WAPScript - 12/01/2000
WDL 3.9 - 10/26/98
WebFOCUS - NEW - 04/14/2004
WIL - 03/02/99
WinBatch - 10/12/2001
WinRexx - 03/28/2000
Winrunner - 7/24/2003
WML - 05/30/2000
WML Script - 10/12/2001
Wordfile Editing - 08/02/2002
XBasic - 10/12/2001
XHTML 1.0 - 12/01/2000
XHTML Basic - Mobile Apps - 12/01/2000
XHTML 1.1 - Modular HTML - 12/01/2000
XML - 03/28/2000
XML Schema - 7/24/2003
XSL - 12/01/2000
Zillions of Games - 10/12/2001
zMUD Script - 05/30/2000
* Back to Top

Tag Lists

README.TXT - Adding / Modifying Tag Lists - 10/26/98
ASP Tags - 10/12/2001
CFML Tags - Cold Fusion 4.5 - 10/12/2001
C# Tags - 10/12/2001
EScript Tags - 12/01/2000
HDML Tags - Handheld Device Markup Tags - 10/26/98
HTML Tags - 10/26/98
HTML Upper ASCII Tags - 10/26/98
IMFL Tags - Real Pix Markup Tags - 10/26/98
LaTeX Tags - 10/12/2001
MathML Tags - 03/28/2000
Miva Tags - 12/01/2000
Perl Scripting Tags - 03/02/99
RTF Tags - 12/01/2000
SMIL Tags - Synchronized Media Integrated Language - 10/26/98
VBS Tags - NEW - 08/02/2002
WinBatch Tags - 10/12/2001
WML Tags - 12/01/2000
XML Tags - 10/26/98
XSL Tags - 10/12/2001
ALL TAGS IN ONE FILE
* Back to Top

Macros

C Indent Macro by Oliver Tscherwitschke - 12/01/2000
HTML Strip Macros by Gabe Anguiano - 08/24/99
HTML Macros by D. Richmond - 06/19/2000
HTML Macros by S. Bellone - 6/12/97
Misc Macros by R. Dotson - 6/12/97
Misc Macros by John Goodman - 10/26/98
Spanish Macro by David Dodds - 01/15/2001
* Back to Top

AutoComplete Files

Java AutoComplete - 05/30/2000
C# AutoComplete - 10/12/2001
Perl AutoComplete - 10/12/2001
PHP4 AutoComplete - NEW - 08/02/2002
* Back to Top

Dictionaries Download

The localized spell-checking dictionaries are still available for FTP download. Please click on the dictionary you'd like to download:

American English
British English
Dutch
Finnish
French
German
Hungarian
Italian
Spanish
Swedish

NOTE: The Sentry Spelling-Checker Engine and Lexicons (Dictionaries) are Copyright© 1993 by Wintertree Software Inc.

UltraEdit/UltraEdit-32 10.00 Online Manual

This manual is published in PDF format and requires the Adobe Acrobat Reader for access. The Adobe Acrobat Reader is available for free download. If you don't have the Adobe Acrobat Reader click here to go to Adobe's download site.

* Click here to view the manual online. (688k)
* Click here to download the online manual. (514k)

Please note: This manual is currently only available in PDF format. Registered users may print this manual as required.

Replacing Notepad With UltraEdit-32

Some applications automatically call Notepad without offering the user any options as to which utility to use. If you'd like UltraEdit-32 to replace Notepad in these instances please download the following zip file and follow the instructions in the NOTEPAD.TXT file.

* Click here to download the notepad.zip file and follow the instructions in the NOTEPAD.TXT file.

Miscellaneous Downloads

To download an IDM Screensaver please click here.
UltraEdit (16-bit) American English version with dictionary file
UltraEdit (16-bit) American English version

posted @ 2008-03-13 16:21 kenlistian 阅读(3661) | 评论 (0)编辑 收藏

在读写数据库时失败时,脚本是会不运行的,所以:

1.不管在函数还是在过程中,必须加入
   On Error Resume Next
2. 采用Err 抓取错误信息。方法如下:
   if Err.Number <> 0 then
      Response.Write "<br>Number:" &Err.Number
      Response.Write "<br>source:" & Err.Source
      Response.Write "<br>Description:" & Err.Description
      Err.Clear
   end if   

   或者在执行conn,rs后面跟参,如
   conn.exec strsql ,num
   if num = ""  then 表示失败,否则继续判断

    
   
  
posted @ 2008-02-29 12:31 kenlistian 阅读(113) | 评论 (0)编辑 收藏

  在安装sql server时,有时装不上去,除了上一次卸载没卸载干净外,还有一些其他的问题。我就遇到一次。
  打开sqlstp.log 查看,一般就是报这些安装不成功:

09:23:53 Process Exit Code: (-1)
09:24:14 安装程序配置服务器失败。参考服务器错误日志和 C:\WINNT\sqlstp.log 了解更多信息。
09:24:14 Action CleanUpInstall:
09:24:14 C:\WINNT\TEMP\SqlSetup\Bin\scm.exe -Silent 1 -Action 4 -Service SQLSERVERAGENT
09:24:14 Process Exit Code: (1060) 指定的服务并未以已安装的服务存在。

09:24:14 C:\WINNT\TEMP\SqlSetup\Bin\scm.exe -Silent 1 -Action 4 -Service MSSQLSERVER
09:24:14 Process Exit Code: (0)
09:24:14 StatsGenerate returned: 2
09:24:14 StatsGenerate (0x0,0x1,0xf0000000,0x400,2052,303,0x0,0x1,0,0,0
09:24:14 StatsGenerate -1,Administrator)
09:24:14 Installation Failed.

综合网上有些问题原因:
1. 目录可能不能是中文名
2. 帐号不能是中文名
3. 卸载需要删除sql server目录和注册表。
4. odbc被误删。

我就是第4条原因,把odbc 下载安装了几次都没法解决,
而且这个症状表现在odbc中建立一条通往mssql的连接都报该odbc无法找到数据驱动的错误。
最后找到网友给与的一条方法:重建一下odbc的注册信息即可正常安装。

如下:
用odbcconf.exe来重新注册一下ODBC Driver。

在Windows/System32目录下有几个脚本文件,可以来完成驱动程序的注册:

odbcconf.exe /S /Lv odbcconf.log /F %systemroot%\system32\mdaccore.rsp
odbcconf.exe /S /Lv odbcconf.log /F %systemroot%\system32\sqlclnt.rsp
odbcconf.exe /S /Lv odbcconf.log /F %systemroot%\system32\odbcconf.rsp
odbcconf.exe /S /Lv odbcconf.log /F %systemroot%\system32\redist.rsp





posted @ 2008-02-28 11:45 kenlistian 阅读(147) | 评论 (0)编辑 收藏

  ANSI----->GB2312------>GBK
  Unicode---->utf-8
 
ASCII:是编码,它映射了127个字符,因此7位(bit)二进制数足够用来表示127个字符。
Unicode:为每个字符提供了唯一的特定数值,它世界上使用的所有字符都列出来,并给每一个字符一个唯一特定数值。
   通常Unicode编码指的是utf-16,如在文本中以unicode存储的话则是指UTF-16。在vc环境中就是wchar,宽字节。
Utf-8 则是unicode的中的一种编码方式。
GB2312: 或GB2312-80是一个简体中文字符集的中国国家标准,全称为《信息交换用汉字编码字符集--基本集》,由中国国家标准总局发布,1981年5月1日实施。GB2312编码通行于大陆,几乎所有的中文系统和国际化的软件都支持GB2312。 是一种编码字符集。
GBK 理解为则是GB2312 的扩展集。gbk和gb2312不存在转换
BIG5 台湾人用的中文字符集合。
 

当unicode->gb2312 or gb2312->unicode 时,存在着转换函数。
当utf-8->gb2312 or gb2312->utf-8        也存在转换
当utf-8->unicode or unicode->utf-8      也存在转换
当然也存在
  gbk 到  unicode 和 unicode 到gbk转换

干脆列个表吧:

unicode utf-8
gb2312
big5
 unicode
-
v
v
v
utf-8
v
-
v
v
gb2312
v
v
-
v
big5
v
v
v
-


其中转换依据各自的编码原理,当然各种语言也各自的方法,如在vc中,当转换,一般就是采用的
WideCharToMultiByte or MultiByteToWideChar方式倒来倒去。
而在asp中则一般是utf-8到gb2312or gb2312 到utf-8,
下面摘抄一段:
'gb2312 ->utf-8 转换
Function chinese2unicode(Str)
  dim i
  dim Str_one
  dim Str_unicode
  for i=1 to len(Str)
    Str_one=Mid(Str,i,1)
    Str_unicode=Str_unicode&chr(38)
    Str_unicode=Str_unicode&chr(35)
    Str_unicode=Str_unicode&chr(120)
    Str_unicode=Str_unicode& Hex(ascw(Str_one))
    Str_unicode=Str_unicode&chr(59)
  next
  Response.Write Str_unicode
end function  

至于为啥细节,则需要了解它们的编码规则,这里不用讨论了,那些转换函数,在各个语言中都有人总结出来,拿来直接用即可。
那些编码规范,其实说来,大致了解就可以了。


 









posted @ 2008-02-27 12:04 kenlistian 阅读(1424) | 评论 (0)编辑 收藏

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;

using System.Xml;
using System.Text;
using System.IO;


/// <summary>
/// 改自http://www.codeproject.com/cs/miscctrl/treeviewxml.asp
/// 原作者:UsualDosage.
/// 改: kenlistian
/// </summary>

namespace xml2tree
{

public class Xml2TreeList
{
private XmlTextWriter xr;
string xmlfile;

public Xml2TreeList(string filename)
{
xmlfile = filename;
if (xmlfile == "")
{
xmlfile = Application.ProductName + ".xml";
}
}

//写到xml文件中
public void ToXml(TreeView tv,string sFileName)
{
if (sFileName == "")
sFileName = xmlfile;
xr = new XmlTextWriter(sFileName, System.Text.Encoding.UTF8);
xr.WriteStartDocument();
xr.WriteStartElement(tv.Nodes[0].Text);
foreach (TreeNode node in tv.Nodes)
{
saveNode2(node.Nodes);
}

xr.WriteEndElement();
xr.Close();
}

//从xml文件中读出到treeview中
// sFileName 读取的文件名
// TreeView 传入的控件树
public bool ToTreeView(TreeView tv, string sFileName)
{
if (sFileName == "")
sFileName = xmlfile;
try
{
XmlDocument xDoc = new XmlDocument();
xDoc.Load(sFileName);
tv.Nodes.Clear();

tv.Nodes.Add(new TreeNode(xDoc.DocumentElement.Name));

TreeNode tNode = new TreeNode();
tNode = (TreeNode)tv.Nodes[0];

addTreeNode(xDoc.DocumentElement, tNode);
tv.ExpandAll();
}
catch (XmlException xExc)
{
// sMsg = xExc.Message;
return false;
}
catch (Exception ex)
{
//sMsg = ex.Message
return false;

}
finally
{

}
return true;
}









//
private void saveNode2(TreeNodeCollection tnc)
{
foreach (TreeNode node in tnc)
{
if (node.Nodes.Count > 0)
{
xr.WriteStartElement(node.Text);
saveNode2(node.Nodes);
xr.WriteEndElement();
}
else
{
xr.WriteString(node.Text);
}
}
}
//
private void addTreeNode(XmlNode xmlNode, TreeNode treeNode)
{
XmlNode xNode;
TreeNode tNode;
XmlNodeList xNodeList;
if (xmlNode.HasChildNodes)
{
xNodeList = xmlNode.ChildNodes;
for (int x = 0; x <= xNodeList.Count - 1; x++)
{
xNode = xmlNode.ChildNodes[x];
treeNode.Nodes.Add(new TreeNode(xNode.Name));
tNode = treeNode.Nodes[x];
addTreeNode(xNode, tNode);
}
}
else
treeNode.Text = xmlNode.OuterXml.Trim();
}





}



/* 采用XmlTextWriter方法是一种写xml文件的方法
* 采用StreamWriter 方法也是一种xml文件的方法

private StreamWriter sr;

public void exportToXml(TreeView tv, string filename)
{
sr = new StreamWriter(filename, false, System.Text.Encoding.UTF8);
//Write the header
sr.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
//Write our root node
sr.WriteLine("<" + treeView1.Nodes[0].Text + ">");
foreach (TreeNode node in tv.Nodes)
{
saveNode(node.Nodes);
}
//Close the root node
sr.WriteLine("</" + treeView1.Nodes[0].Text + ">");
sr.Close();
}

private void saveNode(TreeNodeCollection tnc)
{
foreach (TreeNode node in tnc)
{
//If we have child nodes, we'll write
//a parent node, then iterrate through
//the children
if (node.Nodes.Count > 0)
{
sr.WriteLine("<" + node.Text + ">");
saveNode(node.Nodes);
sr.WriteLine("</" + node.Text + ">");
}
else //No child nodes, so we just write the text
sr.WriteLine(node.Text);
}
}
*/

}

posted @ 2007-08-03 13:56 kenlistian 阅读(571) | 评论 (1)编辑 收藏

学习.Net的经典网站

(标记一下)

http://dev.csdn.net/author/kingjiang/859b0ce9b30f45b18530329758df65fd.html


原文——
名称:快速入门
地址:http://chs.gotdotnet.com/quickstart/
描述:本站点是微软.NET技术的快速入门网站,我们不必再安装.NET Framework中的快速入门示例程序,直接在网上查看此示例即看。
****************************************************
名称:微软官方.NET指导站点
地址:http://www.gotdotnet.com/
描述:上面的站点是本站的一个子站点,本站点提供微软.NET官方信息,并且有大量的用户源代码、控件下载,微软.NET开发组的人员也经常在此站点发表一些指导性文章。
****************************************************
名称:SourceForge
地址:http://www.sourceforge.net
描述:世界上最大的Open Source项目在线网站,上面已经有.NET的各种大型Open Source项目上千件,包括SharpDevelop、NDoc、Mono等都是在此站点发布最新源代码信息。
****************************************************
名称:CodeProject
地址:http://www.codeproject.com
描述:很多非官方的中小型示例源代及文章,相当全面,基本上我们想要的各种方面的资料都可以在此处查找。
****************************************************
名称:Fabrice's weblog
地址:http://dotnetweblogs.com/FMARGUERIE/Story/4139.aspx
描述:这是一个WebLog形式的在线日志网站,定期更新,包括.NET相关的工具、混淆器、反编译器等各种信息,十分值得收藏。
****************************************************
名称:
地址:http://www.aspalliance.com/aldotnet/examples/translate.aspx
描述:c#翻译为vb.net,提供一个文本框,将你的C#源代码贴进去,就可以帮你翻译成VB.NET语法。
****************************************************
名称:CSharpHelp
地址:http://www.csharphelp.com
描述: 专业的C#语言在线帮助网站,主要提供C#语言方面的技术文章。专业性很强。
****************************************************
名称:DotNet247
地址:http://www.dotnet247.com
描述:最好的索引网站,分别按照门类及命名空间的索引,也提供了Microsoft KB知识库。



补记——
****************************************************
名称:ASP.NET
地址:http://www.asp.net
描述:微软.NET webform的老巢,资料和实例代码都非常难得。
****************************************************
名称:微软.NET Winform
地址:http://www.windowsforms.net/
描述:微软.NET Winform的老巢。
****************************************************
名称:微软 KnowledgeBase
地址:http://support.microsoft.com/
描述:微软知识库,开发的时候遇到的怪问题,可能会在这里找到答案。
****************************************************
名称:MSDN
地址:http://msdn.microsoft.com/
描述:这个就不用多说了吧,虽然出了中文MSDN,但是资料还是不够全,英文的就什么都有了。
****************************************************
名称:HotScripts
地址:http://www.hotscripts.com/
描述:Welcome to HotScripts.com, the net’s largest PHP, CGI, Perl, JavaScript and ASP script collection and resource web portal. We currently have 24,004 scripts across 11 different programming languages and 1,240 categories, as well as links to books, articles, as well as programming tips and tutorials.
****************************************************
名称:ASPAlliance
地址:http://www.aspalliance.com/
描述:提供相当丰富的文章和示例代码,思路匮乏的时候可以找找思路
****************************************************
名称:CSDN文档中心
地址:http://dev.csdn.net/
描述:中文的,资料还算丰富,可以作为国内首选。
****************************************************
名称:DOTNET中华网
地址:http://www.aspxcn.com/
描述:2002-2003年的时候这个站点很不错的,不过现在好像管理不得力,有点疲软,资料更新也不过及时,论坛里人也不够热心了,因为希望它好起来,所以列出来。资料都比较老,不过有些D版的东西还可以。提供很多学习代码。
****************************************************
名称:中国DotNet俱乐部
地址:http://www.chinaspx.com/
描述:有点公司背景的网站,很健壮,资料更新及时,比较丰富。论坛解答也不错。
****************************************************
名称:【孟宪会之精彩世界】
地址:http://dotnet.aspx.cc/
描述:MS-MVP的个人站点,包括了他所有的经验文章,还是很值得一看的。
****************************************************
名称:dotNET Tools.org
地址:http://www.dotnettools.org
描述:ccboy,也就是CSDN的小气的神的站点,里面有很多关于.NET等的好东东。
****************************************************
名称:博客堂
地址:http://blog.joycode.com/
描述:半官方性质的MS-MVP汇集blog,大家可以在这里接触到最新的技术,了解发展趋势,对技术的探索等等,优秀的文章。
****************************************************
名称:DotNetBips.com - Applying .NET
地址:http://www.dotnetbips.com/
描述:该站点的文章,涉及到了整个.NET,从底层的IL到语言到架构,文章很多,质量还不错。
****************************************************
名称:C# Frequently Asked Questions
地址:http://blogs.msdn.com/csharpfaq/
描述:The C# team posts answers to common questions
****************************************************
再补记--------
****************************************************
名称:正则表达式
地址:http://www.regexplib.com/
描述:  正则表达式学习站点
****************************************************
名称:WINDOW FORMS FAQ
地址:http://www.syncfusion.com/FAQ/WinForms/
描述:常见的forms faq问题,很多问题都可以在这里找到答案。
****************************************************
名称:ASP.NET 常用类库说明
地址:http://www.123aspx.com/rotor/default.aspx
描述:不用多说,看标题就知道是关于asp.net的名称空间的
****************************************************
名称:ASP.NET System.Web.Mail
地址:http://www.systemwebmail.com/faq/3.8.aspx
描述:邮件发送常见问题解决方法
****************************************************
名称:VB.NET & C# 比较
地址:http://www.harding.edu/USER/fmccown/WWW/vbnet_csharp_comparison.html
描述:VB.NET跟C#语法区别
****************************************************
名称:VB.NET架构师 BLOG
地址:http://panopticoncentral.net/
描述:不用多说,想了解VB.NET的朋友不可不去的站点(PS,不知道我有没有记错是不是这个地址)


****************************************************
http://blog.csdn.net/hbzxf

IE功能汇总
http://blog.csdn.net/hbzxf/archive/2004/07/21/46922.aspx

C# 编码规范
http://blog.csdn.net/hbzxf/archive/2004/07/16/43050.aspx

高效CSDNBLOG技巧终结篇(原创)
http://blog.csdn.net/hbzxf/archive/2004/06/28/28847.aspx

制作自定义CSDNBLOG皮肤 
http://blog.csdn.net/hbzxf/archive/2004/06/27/27879.aspx

DataGrid应用样式文件定义动态样式

ASP.NET如何获得一个表的结构信息

ASP.NET如何解决页面之间传输中文乱码的问题

在DataGrid中选择,确认,删除多行复选框列表

使用DataGrid动态绑定DropDownList

在DataGrid产生空行纪录

posted @ 2007-08-02 11:25 kenlistian 阅读(146) | 评论 (0)编辑 收藏

仅列出标题
共42页: First 34 35 36 37 38 39 40 41 42