??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美午夜精品久久久久免费视,91精品国产综合久久香蕉,色综合久久中文字幕无码 http://www.shnenglu.com/Robertxiao/category/5521.htmlzh-cn Fri, 09 Nov 2012 01:34:44 GMT Fri, 09 Nov 2012 01:34:44 GMT 60 ?某地做到"q个口号惛_?/title> http://www.shnenglu.com/Robertxiao/archive/2009/08/17/93555.htmlRobertxiao Robertxiao Mon, 17 Aug 2009 02:03:00 GMT http://www.shnenglu.com/Robertxiao/archive/2009/08/17/93555.html http://www.shnenglu.com/Robertxiao/comments/93555.html http://www.shnenglu.com/Robertxiao/archive/2009/08/17/93555.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/93555.html http://www.shnenglu.com/Robertxiao/services/trackbacks/93555.html 阅读全文 ]]> 由visual studio ~译优化而获得的启示 http://www.shnenglu.com/Robertxiao/archive/2009/07/23/90934.htmlRobertxiao Robertxiao Thu, 23 Jul 2009 08:01:00 GMT http://www.shnenglu.com/Robertxiao/archive/2009/07/23/90934.html http://www.shnenglu.com/Robertxiao/comments/90934.html http://www.shnenglu.com/Robertxiao/archive/2009/07/23/90934.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/90934.html http://www.shnenglu.com/Robertxiao/services/trackbacks/90934.html 阅读全文 ]]> 由正则表辑ּ"\."引出的问题,而谈及DOS文g格式 http://www.shnenglu.com/Robertxiao/archive/2009/04/28/81311.htmlRobertxiao Robertxiao Tue, 28 Apr 2009 05:48:00 GMT http://www.shnenglu.com/Robertxiao/archive/2009/04/28/81311.html http://www.shnenglu.com/Robertxiao/comments/81311.html http://www.shnenglu.com/Robertxiao/archive/2009/04/28/81311.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/81311.html http://www.shnenglu.com/Robertxiao/services/trackbacks/81311.html
1 ' 更改所有资源的输出路径 2 3 ' get folder path 4 scriptName = wscript.scriptfullname 5 scriptPath = Left(scriptName, instrRev(scriptName, " \ " )) 6 scriptPath = Left(scriptPath, Len(scriptPath) - 1 ) 7 scriptPath = Left(scriptPath, instrRev(scriptPath, " \ " )) 8 folderPath = scriptPath & " Loc\ " 9 10 ' create filesystemobject activex object 11 Set fso = CreateObject( " Scripting.FileSystemObject " ) 12 Set fol = fso.GetFolder(folderPath) 13 14 ' visit each file which in the folder 15 fileshortName = "" 16 Set fileArr = fol.Files 17 For each fil in fileArr 18 fileName = fil.name 19 If LCase(Right(fileName, 7 )) = " .vcproj " Then 20 fileshortName = Left(fileName,Len(fileName) - 7 ) 21 If LCase(Right(fileshortName, 4 )) <> " _enu " Then 22 modifyResource fil.path,status23 If status = False Then 24 errlist = errlist & fil.Path & vbCr 25 End If26 End If27 End If28 Next29 30 ' Tip when complete the work 31 If Len(errlist) > 0 Then 32 MsgBox errlist & " Can not modify " 33 Else34 MsgBox " modify successfully " 35 End If36 37 ' modify the resource project setting. 38 Function modifyResource(filePath,status) 39 On Error Resume Next40 41 resLanguage = UCase(Right(fileshortName, 3 )) 42 43 ' Read Content 44 Set fRead = fso.opentextfile(filePath, 1 ) 45 fContent = fRead.readAll 46 fRead.close47 48 ' Replace each output file 49 changed = False 50 Set regEx = New RegExp 51 regEx.pattern = " \bOutputFile=.+ " 52 regEx.Global = True 53 Set matches = regEx.Execute(fContent) 54 Set childReg = New RegExp 55 For Each match in matches 56 If LCase(Right(match.Value, 9 )) <> " \loc.dll """ Then 57 tmpValue = match.Value 58 childReg.pattern = tmpValue 59 If instrRev(tmpValue, " \ " ) > 0 Then 60 tmpValue = Left(tmpValue, instrRev(tmpvalue, " \ " )) 61 ElseIf instrRev(tmpValue," / " ) > 0 Then 62 tmpValue = Left(tmpValue,instrRev(tmpValue, " / " )) 63 End If64 tmpValue = tmpValue & resLanguage & " \loc.dll """ 65 childMatches = childReg.Execute(fContent) 66 ' fContent = childReg.Replace(fContent, tmpValue) 67 fContent = Replace(fContent, match.Value, tmpValue) 68 changed = True 69 End If70 Next 71 72 ' write back 73 If changed = True Then 74 Set fWrite = fso.opentextfile(filePath, 2 , False) 75 fWrite.Write fContent76 fWrite.close77 End If78 ' clear error 79 If Not err.number = 0 Then 80 err.clear81 status = False 82 Else83 status = True 84 End If85 End Function
q行l果W合我们的要求?br> 用ultraEdit打开文gӞ会提C是否要转换成DOS文g格式Q但在{换前用ultraEdit打开不会出现q种问题。问题出在哪儿呢Q这q得从DOS文g与非DOS文g格式的区别分析,q两U文件的差别是一些控制符不同Q如DOS是用\r\n来换行,而Unix是用\n来换行。有了这个分析,q道问题出在哪了。原因是正则表达?br>regEx.pattern = "\bOutputFile=.+"q个表达式把后面?\r"也匹配进MQ而后来随着替换字符串时而消׃。所以上面的正则应写成regEx.pattern = "\bOutputFile=.+"""。改好之后运行,再用ultraEdit打开不会出现q个提示了?
]]> 理目的版本号 http://www.shnenglu.com/Robertxiao/archive/2009/04/24/80924.htmlRobertxiao Robertxiao Fri, 24 Apr 2009 02:45:00 GMT http://www.shnenglu.com/Robertxiao/archive/2009/04/24/80924.html http://www.shnenglu.com/Robertxiao/comments/80924.html http://www.shnenglu.com/Robertxiao/archive/2009/04/24/80924.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/80924.html http://www.shnenglu.com/Robertxiao/services/trackbacks/80924.html 分ؓVersion.h, Version.rc,和一D脚本?br>
// Version.h #define SHADOW_MAJOR_VERSION 4 #define SHADOW_MINOR_VERSION 5 #define SHADOW_BETA_MAJOR_VERSION 7 #define SHADOW_BETA_MINOR_VERSION 155 #define SHADOW_VERSION "4.5.7.155" #define SHADOW_REVISION "0"
在version.rc中,包含Version.hq把相应的版本信息用上面的SHADOW_REVISION?SHADOW_VERSION赋?br>
1 ' Set the revision for the application 2 ' 3 4 ' Get File path 5 scriptName = wscript.scriptfullname 6 scriptPath = Left (scriptName, instrRev (scriptName, " \ " )) 7 8 ' create svn object and get the last revision 9 Set svnObj = CreateObject ( " SubWCRev.object " ) 10 svnObj.GetWCInfo scriptPath,0 , 0 11 versionDes = " Revision: " & svnObj.Revision & " . Date: " & svnObj.Date 12 13 ' update the version.h with the lastest version 14 Set fs = CreateObject ( " Scripting.FileSystemObject " ) 15 scriptPath = Left (scriptPath, Len (scriptPath) - 1 ) 16 slnPath = Left (scriptName, instrRev (scriptPath, " \ " )) 17 versionFullName = slnPath & " Version.h " 18 19 ' check file valid 20 If Not fs.fileexists(versionFullName) Then 21 MsgBox " The file version.h does not exists. " 22 wscript.quit23 End If 24 25 ' read content from the file 26 Set fRead = fs.OpenTextFile(versionFullName, 1 ) 27 fContent = fRead.ReadAll 28 fRead.close29 30 ' modify the revision value 31 Set regEx = New RegExp 32 regEx.Pattern = " #define\s+SHADOW_REVISION\s+""(.*)"" " 33 Set Matches = regEx.Execute(fContent) 34 For Each Match in Matches 35 RetStr = RetStr & " Match found at position " 36 RetStr = RetStr & Match.FirstIndex & " . Match Value is ' " 37 RetStr = RetStr & Match.Value & " '. " & vbCRLF 38 If Match.submatches( 0 ) = versionDes Then 39 MsgBox " The revision is already lastest " 40 wscript.quit41 End If 42 Next 43 fContent = regEx.Replace(fContent, " #define SHADOW_REVISION "" " & versionDes & " "" " ) 44 45 ' Write to version.h 46 Set fWrite = fs.OpenTextFile(versionFullName, 2 ) 47 fWrite.Write fContent48 fwrite.close49 MsgBox " Update the revision successful "
可以看出实现h比较ȝ?br>q里介绍一U新的方法。新M个模板文Ӟ格式如下?br>
1 /**/ /* 2 Substitution keyword file for SubWCRev (part of Tortoise SVN), to autochange version number with SVN Rev number 3 */ 4 5 #pragma once 6 7 8 #define _ProductVersion "3.0.0.1" 9 #define _FileVersion "3.2.0.$WCREV$"; 10 #define _Revision "$WCREV$"; 11 #define _Modified "$WCMODS?Modified:Not modified$"; 12 #define _Date "$WCDATE$"; 13 #define _Range "$WCRANGE$"; 14 #define _Mixed "$WCMIXED?Mixed revision WC:Not mixed$"; 15 #define _URL "$WCURL$"; 16 #define _ProductName "Software 1.0" 17 #define _CompanyName "Company" 18 #define _FileDescription "SoftWare module" 19 #define _LegalCopyright "Company, All rights reserved." 20 #define _FileVersion_0 3 21 #define _FileVersion_1 2 22 #define _FileVersion_2 0 23 #define _FileVersion_3 $WCREV$ 24 #define _ProductVersion_0 3 25 #define _ProductVersion_1 2 26 #define _ProductVersion_2 0 27 #define _ProductVersion_3 1
在打包时q行如下的批处理文g׃自动生成或者更新version.h SubWCRev.exe ..\ SubWCRev.txt ..\version.h
pause
资源文gq是引用version.h定义好的帔R。这U方式就很简单,而且不易出错。上面介lC++斚w的版本跟t,在C#中则是先制定AssemblyInfo.cs的一个模板,在打包时用上面的命oL新AssemblyInfo.cs?
]]> 删除文g夹下指定cd的文?/title> http://www.shnenglu.com/Robertxiao/archive/2009/03/04/75495.htmlRobertxiao Robertxiao Wed, 04 Mar 2009 04:04:00 GMT http://www.shnenglu.com/Robertxiao/archive/2009/03/04/75495.html http://www.shnenglu.com/Robertxiao/comments/75495.html http://www.shnenglu.com/Robertxiao/archive/2009/03/04/75495.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/75495.html http://www.shnenglu.com/Robertxiao/services/trackbacks/75495.html 昨日Q我的一个分区报告磁盘容量低。这个分区我是专门用来存储例子及目Q经q分析发现是因ؓ太多的例子程序编译后产生的dll, exe, ncb文g占据了大量的I间Q而代码文件占用的I间q不是很多。只有去删除q些生成的文件了。但l过长久的用,U篏了大大小有数百个小例子Q要删除每个例子的这些文件是一件很枯燥J重的重复工作。删?个搞得h都有些晕了。后来想想ؓ什么不用程序来做这件事了。于是我写了段脚本来处理这工作了。效果还不错?br>mydir = "E:\klfd" ' 指定要删除哪个目录下的文?br>specifyExt = "exe,dll,ilk,pdb,obj,exp,lib,pch,res,dep,idb,manifest" '指定要删除的文gcdQ可千万不要? ?br>extArr = split(specifyExt, ",") Set fs = CreateObject("scripting.filesystemobject") Set rootFolder = fs.getfolder(mydir) DeleteFile rootFolder MsgBox "Delete complete"
Sub DeleteFile(myfolder) On Error Resume Next Set subfolders = myfolder.Subfolders For Each Subfolder in subfolders DeleteFile subfolder Next
For Each strExt in extArr strTemp = myfolder.path & "\*." & strExt fs.deletefile strTemp, True Next 'For each myfile in myfolder.files ' strFileExt = LCase(fs.getextensionname(myfile.name)) ' For each strExt in extArr ' If strExt = strFileExt Then ' fs.deletefile myfile.path, True ' End If ' Next 'Next End Sub
]]>搭徏Vbscript脚本开发环?/title> http://www.shnenglu.com/Robertxiao/archive/2009/02/23/74656.htmlRobertxiao Robertxiao Mon, 23 Feb 2009 02:59:00 GMT http://www.shnenglu.com/Robertxiao/archive/2009/02/23/74656.html http://www.shnenglu.com/Robertxiao/comments/74656.html http://www.shnenglu.com/Robertxiao/archive/2009/02/23/74656.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/74656.html http://www.shnenglu.com/Robertxiao/services/trackbacks/74656.html d新徏Vbscript 文g的快捯?/span>filetype = ".vbs" set WSHShell = CreateObject("WScript.Shell") prg = ReadReg("HKCR\" & filetype & "\") prgname = ReadReg("HKCR\" & prg & "\") ask = "what shoud be the name for new VBScript scripts?" title = "New menu entry" prgname = InputBox(ask, title, prgname) WSHShell.RegWrite "HKCR\" & prg & "\",prgname WSHShell.RegWrite "HKCR\" & filetype & "\ShellNew\NullFile", "" function ReadReg(key) on error resume next ReadReg = WSHShell.RegRead(key) if err.Number > 0 then error = "Error: Registry-key""" & key & """ could not be found!" msgbox error, vbCritical WScript.Quit end if end function 创徏Vbscript调试快捷菜单 Set wshshell = CreateObject("wscript.shell") vbsfile = wshshell.regread("HKCR\.vbs\") master = "HKCR\" & vbsfile & "\shell\" wshshell.regwrite master & "debug\", "&Debug" wshshell.regwrite master & "debug\command\", "wscript.exe //x ""%L""" wshshell.regwrite master & "check\", "&Monitor" wshshell.regwrite master & "check\command\", "wscript.exe //D ""%L""" MsgBox "Debugging Command Setup Successful" 写私有日?/span>Set wshshell = CreateObject("wscript.shell") Set fs = CreateObject("Scripting.FileSystemObject") windir = wshshell.ExpandEnvironmentStrings("%WINDIR%") logfile = windir & "\wsh.log" debugging = True LogIt "Script has started." LogIt "Loop is entered." For x = 1 To 10 LogIt "Variable x:" & x Next LogIt "Loop is done." MsgBox "done!" LogIt "Script is done."
Sub LogIt(text) If Not debugging Then Exit Sub Set output = fs.OpenTextFile(logfile, 8, True, -2) output.writeLine Now() & vbTab & "Information: " & text output.close End Sub
声明Q上q内Ҏ源脚本编E的相关书中?
]]> 为新建PERL文gd菜单?/title> http://www.shnenglu.com/Robertxiao/archive/2009/02/22/74609.htmlRobertxiao Robertxiao Sun, 22 Feb 2009 13:49:00 GMT http://www.shnenglu.com/Robertxiao/archive/2009/02/22/74609.html http://www.shnenglu.com/Robertxiao/comments/74609.html http://www.shnenglu.com/Robertxiao/archive/2009/02/22/74609.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/74609.html http://www.shnenglu.com/Robertxiao/services/trackbacks/74609.html 在用WINDOWS 操作pȝQ我们可以很方便地在桌面上及览器的文g夹中快速徏立txt格式的文件。如果系l中q安装了OFFICE中的应用软gQ我们也可以很方便快速地建立Ҏ式的文g。在I白处按鼠标右键Q在弹出菜单的新建子菜单中单ȝ应的格式可以非常快捷地建立一个新文g?br> 最q在学Perl语言。我每次写一个小的PerlE序Q我都是新徏一个文本文Ӟ然后重命名该文本文g。这个过E很ҎQ但是非怹呟뀂当l习要徏立许多Perl文件时Q我实在不能再忍受这U重复乏味的工作。我希望建立一?pl文g能象.txt文g一样快捗经q研I注册表q经q试验,只要在HKCR\.pl\Perl\ShellNew的键中新Z个字W串NullFileq赋I值给它就可以了。我们可以直接修Ҏ册表Q当然我们也可以采用E序的方式来实现。在q里我给Z段利用脚本来实现的代码供大家参考?br> set wshell = createobject("wscript.shell") wshell.regwrite "HKCR\.pl\Perl\shellnew\NullFile", ""
]]> Talk about user account control http://www.shnenglu.com/Robertxiao/archive/2008/09/19/62245.htmlRobertxiao Robertxiao Fri, 19 Sep 2008 01:50:00 GMT http://www.shnenglu.com/Robertxiao/archive/2008/09/19/62245.html http://www.shnenglu.com/Robertxiao/comments/62245.html http://www.shnenglu.com/Robertxiao/archive/2008/09/19/62245.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/62245.html http://www.shnenglu.com/Robertxiao/services/trackbacks/62245.html Introduction
Microsoft corporation is proud of user account control ?/span>It provides maximum protect ability for computer ?/span>It is very useful for beginner and generally users Q?/span>but people that has experience is very unsuitable ?/span>Especially program developer Q?/span>When we debug our program Q?/span>some access reject ?/span>
We must run the executable file without debug under administrator ?/span>At Last I can not bear it ?/span>And I disable it ?/span>
Method
Open Control panel and go into “user account and family safety”?/span>Click Change your windows password linkbutton ?/span>Now at end of row is “Turn user Account Control on or off”.
Run msconfig.exe. and open the tools tab page. Here provide tool to disable and enable user account control.
Okay.We can change the pattern now. change it and restart computer. The annoying pop dialog about the permission go away. Oh the Sky is blue back.
Above I resolve the debug trouble. But I can not be sure that the client hate this control yet. Before We release our program, we should configure the project property to request the administrator right.
If we work under Vs2008 environment. Open the project property page,configuration properties->linker->manifest file. Here you can configurate it.
If we work under VS2005 environment. It is difficult to configuate. Follow me.
Add a xml document which comment like:
<? xml version = "1.0 " encoding = "UTF-8 " standalone = "yes "?>
< assembly xmlns = "urn:schemas-microsoft-com:asm.v1 " manifestVersion = "1.0 ">
< trustInfo xmlns = "urn:schemas-microsoft-com:asm.v3 ">
<security >
<requestedPrivileges >
<requestedExecutionLevel level = "requireAdministrator " uiAccess = "false "></ requestedExecutionLevel >
</requestedPrivileges >
</security >
</ trustInfo >
< dependency >
<dependentAssembly >
<assemblyIdentity type = "win32 " name = "Microsoft.VC90.DebugCRT " version = "9.0.21022.8 " processorArchitecture = "x86 " publicKeyToken = "1fc8b3b9a1e18e3b "></ assemblyIdentity >
</dependentAssembly >
</ dependency >
</ assembly >
This document must is a embedded resource. And in property page specify this file as additional manifest file. build your program.
At end
]]>从Excel转成SQL<2> http://www.shnenglu.com/Robertxiao/archive/2008/03/28/45287.htmlRobertxiao Robertxiao Fri, 28 Mar 2008 14:46:00 GMT http://www.shnenglu.com/Robertxiao/archive/2008/03/28/45287.html http://www.shnenglu.com/Robertxiao/comments/45287.html http://www.shnenglu.com/Robertxiao/archive/2008/03/28/45287.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/45287.html http://www.shnenglu.com/Robertxiao/services/trackbacks/45287.html 阅读全文 ]]> 把Execl转成SQL <1> http://www.shnenglu.com/Robertxiao/archive/2008/03/26/45286.htmlRobertxiao Robertxiao Wed, 26 Mar 2008 11:21:00 GMT http://www.shnenglu.com/Robertxiao/archive/2008/03/26/45286.html http://www.shnenglu.com/Robertxiao/comments/45286.html http://www.shnenglu.com/Robertxiao/archive/2008/03/26/45286.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/45286.html http://www.shnenglu.com/Robertxiao/services/trackbacks/45286.html 阅读全文 ]]> 个h软gq程宣a http://www.shnenglu.com/Robertxiao/archive/2007/12/02/37650.htmlRobertxiao Robertxiao Sun, 02 Dec 2007 13:17:00 GMT http://www.shnenglu.com/Robertxiao/archive/2007/12/02/37650.html http://www.shnenglu.com/Robertxiao/comments/37650.html http://www.shnenglu.com/Robertxiao/archive/2007/12/02/37650.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/37650.html http://www.shnenglu.com/Robertxiao/services/trackbacks/37650.html 1Q采用合适的技?br> E序员大凡都是聪明的人,臛_在抽象思维斚w是比较强的。这也决定了我们q些E序员大都有一U追求技术的好斗心。当然有q个好斗心是好的Q这是我们得以不断追赶日新月异技术的源动力。但是在开发项目时我们应只能采用合适的技术,因ؓ我们的项目有商业目的。我们不能ؓ了一个小项目而搬出EJB、DCOM{高q技术来。也不能因ؓ一时的目旉吃紧而放弃应有的技术?br> 2Q利用可复用的资?br> 我L对别人写的代码抱以审视的态度QM以ؓ别的代码里有着BUG或者他的模块里有着某种机关。我L试图自已从无到有地搭建所有的模块。有时甚x疑MICROSOFT在MFCq个框架里放入了储如什?#8220;H听?#8221;Q我变得很糟p。一个生产飞机的公司得要从零开始地生每一个零件了Q这实是很有趣。我们会发现公司会很快进入一?#8220;疲惫”的状态。当然生产飞机的公司不会q样做,他会采购有质量保证的零gQؓ什么我们不q样做呢Q当然我们也要对要采用的资源给以质量验证了?br> 3Q画Z的意?br> 蜜蜂建筑的蜂巢漂亮极了,q最伟大的徏{师也不得不如是说。但是它的徏巢行为ƈ没有M的图U、规划,它们完全凭着本能Q是不是我们?#8220;q种艺术行ؓ”Q我在这里这栯Q但实际上别人ƈ不会q样认ؓ的)也不需要图U、规划呢Q的是Q不q前提是你必M出生׃写漂亮代码了Q那是你的一U本能)。别以ؓdU、规划ؕ费了你的旉。看看指南针再走路,是不是等你走出森林才发现走错了方向更好?br> 4Q提高沟通、协作能?br> 软g开发是一个集体的力_Q至现在的大多数商业Y件不再是单枪匚w地完成的。就是一个h完成的Y仉么这个程序员也会有他的上司。我们应在一个愉快的环境中工作,q样我们的艺术细胞才能蟩动v来,灉|才能冒出来。又有谁愿意在一个郁L环境中工作呢Q一句意思相同的话,用两个句子表辄作用是可能完全不同。我们要跟同事进行良好沟通以最快速度来完成工作,我们要跟上司良好的沟通以取得支持。我要提高自q沟通、协作能力?br> 5Q持l学?br> 软g开发技术在飞速地变化Qn在这个浪潮中的我们只有不断地学习。不学习q于倒退Q再说就不倒退。我怿在我所专的q个领域里我q是有太多的未知Qؓ什么我不在I闲时去探烦它呢Q学h涯,但我们不一定是苦作舟呀Q如果你Ҏ已不感兴或者是讨厌了,我徏议是马上退出去做别的。因世上赚钱的法子还很多?br> 6Q测试自q模块 不要以ؓ试是测试员的事Q我们要对自己做出的模块有质量的保证Q我们也可以c此来验证自q思\、发现自己某处的~陷。这h们就在ȝ着l验Q一些从“错误”中发掘出来的错误更加宝贵Q因些都是经q实跉|C{就像电视里l过战的战士比较历害一栗?br> 7Q写好的注释 我阅q很多的目代码Q我发现大师U的模块里L有很多良好的注释Q相反有一些有点功底的Z们的代码里的注释相当,有的Ҏ没有。现在的很多集成环境能够自动C我们的注释中生成文档Q有q样的支持,我们Z么还吝啬我们的注释呢Q?br>
]]>json 之我?/title> http://www.shnenglu.com/Robertxiao/archive/2007/11/27/37397.htmlRobertxiao Robertxiao Tue, 27 Nov 2007 12:36:00 GMT http://www.shnenglu.com/Robertxiao/archive/2007/11/27/37397.html http://www.shnenglu.com/Robertxiao/comments/37397.html http://www.shnenglu.com/Robertxiao/archive/2007/11/27/37397.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/37397.html http://www.shnenglu.com/Robertxiao/services/trackbacks/37397.html JSON:是一U轻量的数据交换格式。易于h们的阅读、理解及~写。同时也易于机器的解析和生成Q这是一U文本格式。这是一U在多语a之间交换数据的理惌a?br> JSON主要有两U结构: 1Q名U?值对Q有点像字典、哈希表{。如下这U表C?br>"Name":"zhang","Birthday":"2007-8-9" 2Q值的有序列表Q类g数据的表C方式。如下表C?br>"zhang","li","zhao" 下面我用Javascript来描qC下JSON的表现Ş?br>对象的表CŞ式:
function employee() { this .Name = " zhang " ; this .Birthday = " 2007-8-9 " ; } var em = new emplyee(); var str = em.toJSONString(); /**/ /* ************************************ *str={"Name":"zhang"}会是q个样子 * 以{ }括住的名U?值对 * ************************************ */
值的表示形式Q?br>
var str = " zhang " ; var i = 67 ; var strJS = str.toJSONSting(); var iJS = i.toJSONString(); /**/ /* *********************** *strJS "zhang" *iJS=67 * ************************ */
数组的表CŞ式:
var arr = new Array(); arr.push( " a " ); arr.push( " b " ); arr.push( " c " ); arr.push( " d " ); var arrJS = arr.toJSONString(); /**/ /* ********************************** *arrJS :["a","b","c","d"] *是以 [ ]括住的值或者对象?br> ***********************************
对于以上的内容,大家可以?a >www.json.org中得到更多的帮助。我上面介绍的只是ؓ了我记录的一些用法作基础。今天先写到q里?br>
]]> XmlDom 用法谈 http://www.shnenglu.com/Robertxiao/archive/2007/11/09/36231.htmlRobertxiao Robertxiao Fri, 09 Nov 2007 09:17:00 GMT http://www.shnenglu.com/Robertxiao/archive/2007/11/09/36231.html http://www.shnenglu.com/Robertxiao/comments/36231.html http://www.shnenglu.com/Robertxiao/archive/2007/11/09/36231.html#Feedback 0 http://www.shnenglu.com/Robertxiao/comments/commentRss/36231.html http://www.shnenglu.com/Robertxiao/services/trackbacks/36231.html 今天Q我觉得自己的情l不够好Q我看他们的设计太不考虑性能斚w的问题。而一呛_讲究不要冗余Q是啊教U书上也老是说数据库的设计要辑ֈ什么样的标准。我个h却老是觉得寚w当地用冗余能换来大的性能提升是很有帮助的。我q个于死板了些吧Q所以把q种情A带进了工作,觉得很是不该。开写了题外话?br> 前两天我设计了一个页?q是一个多U联动的面Q当选了目后,目后面的单元格中的下拉框中出现与这个项目对应的ҎQ方法过后则是出CA器,目q联动着标准。当初考虑性能上的问题我在q个面中采用了AJAXQAjaxPro)技?l过使用发现了其中的一个很严重的错误(E序员爱把它UCؓBUGQ但我认为没有满求的是错误Q。当点了一单元格时Q会异步回到服务端拿数据Q而在q期间用h可以点其它的地方Q这时候返回来的数据只会写在当前活动的单元gQ但q时zd的单元格却早已不是源目标了。所以出Cq个难以忍受的错误。我们不能要求或者假讄户不以很快的cM玩游戏的速度来操作MOUSE。所以我的这个设计构x错误的?br> 鉴于上面的原因,我决定对面做如下的修改。在载入之初,通过服务端预期地把这个数据组强成XML文g攑ֈ面上去Q而页面单L数据也就在客L可以完成。这样就会大提高反应的速试了,也不会出现前面说的在q个异步的过E中客户的操作而引发错误?br> 在服务端的工作(q是C#做的Q:我先把数据组l成XML文gQ进而把它放在页面上。在服务端我采用了XmlWritterq个cR用法如?br>
StringBuilder sb = new StringBuilder(); XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true ; settings.OmitXmlDeclaration = true ; settings.NewLineOnAttributes = false ; _writer = XmlWriter.Create(sb,settings); _writer.WriteStartDocument();
在上面我们就构造好了XML写入器了。而在以下只要调用下面几个方法就可以了?br>
_writer.WriteStartElement( " ITEMS " ); _writer.WriteStartElement( " ITEM " ); _writer.WriteAttributeString( " ID " , " 10 " ); _writer.WriteAttributeString( " Name " , " PH " ); _writer.WriteEndElement(); _writer.WriteFullEndElement() // 产生出来的样?br> < ITEMS > < ITEM ID = " 10 " Name = " PH " /> </ ITEMS >
好了上面的代码可以让我生出一个XML来了?br> 上面准备好服务端Q现在我得开始客L了。这里我用到了IE览器中的XMLDOMq个lg了,在别的浏览器中也有另处的DOMlg的,其操作和语法甚至函数上都有很大相同的了?br>
xmlDom=new ActiveXObject("MSXML2.DOMDocument");
xmlDom.loadXML(strXml);//q是一个字W串
var root=xmlDom.selectSingleNode("ITEMS");
var items=root.selectNodes("ITEM");//找ROOT下所有的ITEM子节炏V?br>
var item=root.selectSingleNode("ITEM[@id=10]");//则是扑օ下一个ITEM其ID属性ؓ10了?br>
关于XQL的语法,我在有空时会以一个短文来说一说的了?/div>
]]>
RUP l一软g开发过E?谈 http://www.shnenglu.com/Robertxiao/archive/2007/11/08/36130.htmlRobertxiao Robertxiao Thu, 08 Nov 2007 05:43:00 GMT http://www.shnenglu.com/Robertxiao/archive/2007/11/08/36130.html RUPQ是一U统一软g开发过E,是Y件开发的通用框架。它适用面非常的qѝ适用于许多的应用领域、适合各种不同软g的开、适合不同性能要求软g的开发。这是一个演化的开发过E?br>RUPQ基于构件的开发,在这个开发过E里较ؓ重视构g的应用?br>RUPQ特?br> 1Q用例驱动开?br> Ҏ需求分析的用例来构建系l?br> 2Q以基本架构Z?br> AQ首先根据^台而不考虑用例来设计系l的架构?br> BQ选用其中几个成熟的用例来修改或扩展先前的架构 3QP代增量开?br> 每次q代Ӟ都选一l还没有实理的用例来作ؓ增量的开发。优先实现风险较大的用例?br>RUPQ过E?br> 1Q初?br> q个阶段的Q务是获取用户需求、徏立系l的业务模型和用户交。进而确定项目的边界?br> q和传统的系l定义、可行性研I、需求分q程是对应的Q如果细分这个阶D它主要有以下几个步?br> 1.1:明确目的规模。确定系l边界、验收标准、重要的需求及U束识别主要的业务流E?br> 1.2:评估目风险。风险的评估有技术、经、政ȝ斚w。主要是前两者?br> 1.3:制定目计划。根据项目规模、复杂度、交互时间来合理地制定h员的配备、资源的利用{方?nbsp; 的用计划?br> 1.4:阶段评审?br> 2Q细?br> dQ分析问题域Q徏立v健全的构架基Q{UL降低目中风险最高的部䆾 2.1:定构架。构架应E_Q充分降低风险。其ơ性能要好?br> 2.2:制定构徏计划?br> 2.3:建立支持环境?br> 2.4:选择构g?br> 2.5:阶段技术评?br> 3Q构?br> 开发完成Y件系l的全部功能q进行详l的试Q重Ҏ在管理资源、控制操作、优化成本、进 度和质量。在构徏完后也要q行阶段评审?br> 4Q交?br> 主要dQ对软gq行B试、制作品发布及后箋的培训等工作。这个阶D完成后也要q行阶段评审Q其内容主要有是否要q行下一步的演化、目标实C吗?及客L满意度?br> 每一个过E中都要技术评审,技术评审的步骤一般是 1Q安排会议日E,定参与会议的h员?br> 2Q分发会议材料给评审人员Q让他们有时间进行审阅ƈ准备?br> 3Q召开评审会议 4Q会议记录情c?br>RUP目理 RUP的工作流E包括两部䆾Q核心工作流E(需求调研、业务徏模、分析设计、实施、测试、部|Ԍ及核心支持流E(目理、变更管理、配|管理) 业务建模阶段应提交的材料有:商业逻辑模型、业务需求说明、专业词汇表、风险说明、评审说明书?br> 分析设计应提交:M设计报告、系l设计模型、数据库设计模型、数据字典、详l设计报告?br> 实施应提交:实施ȝ书、代码审核意见书、源E序、错误报告及解决情况、应用构件说明书?
]]>
ŷպĻþþò |
ɫۺϾþ88ɫۺ |
þþƷ |
ۺҹҹþ |
þþƷ99Ӱ |
þþƷһ |
ŷ龫Ʒþþþþþ |
˾þ111վ |
Ѿþþþþ |
ڵþ |
þ99ֻоƷ
|
˾þþƷ |
ŷƷþø |
þþþavרˮ
|
ĻƷþþþþ3Dն
|
ҰĻþ |
þþþþþþþþ |
ɫþ |
Ʒþþwww |
þ99þ99СݾƷӿ
|
þþþùһëƬ |
ŷ˾þۺһ
|
۲˾þþƷٸAV |
þۺϹƷ |
þ99Ʒþþþþˮ |
ҹƷƬþӰ
|
ޡvþþ뾫Ʒ |
þþþùƷ鶹ARӰԺ |
þþþùһëƬ |
Ļձþþ
|
רþ |
ھƷþþþþþþ |
þùƷһ |
Ʒһþ㽶߿ۿ |
Ұ¾þþƷ |
ٸþþþþþþþ |
þҹɫƷav |
þԭav |
þþþƷĻ |
Ʒþþþþù |
ɫ99þþþø߳ۺӰԺ |