跳到主要內容

發表文章

目前顯示的是 2008的文章

[windows]安装、移除、修改Windows Services

指令:sc [create | delete | config] 服務名稱 [參數] 主要參數列表:   start= demand|boot|system|auto|disabled|delayed-auto  //啟動類型   binPath= BinaryPathName                 //執行檔路徑 depend= 依存關係(以 / 分隔)   DisplayName=                 //服務顯示名稱 安裝 sc create svnservice binpath= "d:\p\wangxudong.com\bin\svnserve.exe --service -r e:\repos" displayname= "svnservice" depend= Tcpip start= auto 删除 sc delete svnservice 修改設定 sc config svnservice binpath= "d:\p\wangxudong.com\bin\svnserve.exe --service -r e:\repos" displayname= "svnservice" depend= Tcpip 啟動服務 net start svnservice

[MySQL]MySQL的conv函数(字串數字轉換整數數字)

CONV(N,from_base,to_base) N是要轉換的數據,from_base是原進制,to_base是目標進制。 這個function通常用在進制轉換 但是有個如果在資料庫中原本的數字數據存放類型是用字串 可是卻需要作些運算計算的話 可以用這個函數來將資料的強制轉換 CONV("20",10,10) 字面上的意思是將20以十進位轉換成十進位 所以回傳的時候 當然就是20囉 而不是"20"

[Oracle] Server change IP 對Oracle 設定影響

伺服器如果改變IP後,原本的oracleDB會無法啟動。 這個時候可以在command line下 emctl start dbconsole 來作測試,依照他給的錯誤訊息設定。 基本上有幾個部分要作設定 1.[$Orcale Path]\product\10.2.0\db_1\[機器名稱_DB名稱] 的資料夾要修改。 通常機器名稱就是ip的數值(或是host檔案對應的電腦名稱),因為ip改過了所以,要修改這個機器名稱為新ip(會host新ip對應的機器名稱)。 2.[$Orcale Path]\product\10.2.0\db_1\oc4j\j2ee\OC4J_DBConsole_[機器名稱_DB名稱]資料夾要修改。 修改方式同1.部分。 3.執行emca -config dbcontrol db 修改dbcontrol的配置。 4.執行oracle Net Manager管理程式確認服務和監聽器的連接正確與否。

[Oracle] Oracle10G emca,emctl 的簡單用法

EMCA和EMCTL的簡單用法 使用命令行工具emca可以創建,修改,重建或者刪除dbcontrol的配置。 emca常用命令語法︰ emca -repos create創建一個EM資料庫 emca -repos recreate重建一個EM資料庫 emca -repos drop刪除一個EM資料庫 emca -config dbcontrol db配置數據庫的 Database Control emca -deconfig dbcontrol db刪除數據庫的 Database Control配置 emca -reconfig ports 重新配置db control和agent的端口 注︰透過$ORACLE_HOME/install/portlist.ini 文件可以知道目前dbcontrol正在使用的port,預設dbcontrol http port:1158,agent port:3938。如果要重新配置port,可以使用下面的命令︰ emca -reconfig ports -dbcontrol_http_port 1159 emca -reconfig ports -agent_port 3939 emctl是用來啟動/停止EM console服務,察看服務狀態等。 emctl常用命令語法︰ emctl start dbconsole啟動EM console服務,使用前需要先設置ORACLE_SID emctl stop dbconsole停止EM console服務,使用前需要先設置ORACLE_SID環境變量

[JAVA]Tomcat 6.0 + Jre1.6無法啟動問題

當 Tomcat error 是 [2007-05-08 14:20:22] [764 prunsrv.c] [error] Failed creating java C:\Program Files\Java\jdk1.6.0\jre\bin\server\jvm.dll [2007-05-08 14:20:22] [982 prunsrv.c] [error] ServiceStart returned 1 [2007-05-08 14:20:22] [info] Run service finished. [2007-05-08 14:20:22] [info] Procrun finished. [2007-05-08 14:26:14] [173 javajni.c] [error] 找不到指定的模組。 C:\Program Files\Java\jre1.6.0_01\bin路徑下 複製"msvcr71.dll" 然後貼到tomcat安裝目錄下的"bin"裡面 重新啟動tomcat ok!!!

[MySQL]MySQL Alter Add/Drop Constraint語法

Add ALTER TABLE [$DBName].[$Table] ADD CONSTRAINT [$Constraint_Name] FOREIGN KEY [$Constraint_Name] ([$ColumnName]) REFERENCES [$RefTable] ([$ColumnName]) {ON DELETE [NO ACTION/CASCADE/SET NULL/RESTRICT]} {ON UPDATE [NO ACTION/CASCADE/SET NULL/RESTRICT]}; Drop ALTER TABLE [$DBName].[$Table] DROP FOREIGN KEY [$Constraint_Name] ;

[MySQL] MySQL備份與還原

MySQL 備份資料庫有兩種方法,一種是土法煉鋼法,就是直接把 /usr/local/mysql/data/[資料庫名稱]/* 備份,然後放回另一個 MySQL 的資料庫路徑裡,不過資料庫版本要一樣喔,以免發生非預期的結果。 PS. 第一個方法備份還原時最好先把 mysqld 停下來。 要看 MySQL 是否執行中可下: /usr/local/mysql/bin/mysqladmin status 另一種感覺較正規的作法就是用 mysqldump 把資料倒出來 *.sql,指令格式如下: mysqldump --user=[資料庫使用者] -p [資料庫名稱] > [備份檔名].sql Example: mysqldump --user=root -p wordpress > /Users/home/wordpress.sql 完成後你就會在 /Users/home/ 得到 wordpress.sql,把這個 .sql 上傳到你要轉移的主機上 注意喔,如果要還原回去的 MySQL 中不存在這個資料庫時,會發生這樣的錯誤: mysql --user=root -p wordpress < /Users/home/wordpress.sql Enter password: ERROR 1049 (42000): Unknown database 'wordpress' 所以記得要先進 MySQL 建好資料庫喔。 登入 MySQL mysql -u root -p 建 wordpress 資料庫 mysql> create database wordpress; Query OK, 1 row affected (0.00 sec) 離開資料庫 mysql> quit 接著準備匯入了,匯入的指令格式: mysql -h [mysqlhostserver] -u [資料庫使用者] -p [資料庫名稱] < [備份檔名].sqlExample: mysqldump --user=root -p wordpress < /Users/chun/wordpress.sql 註:我沒用到 -h [mysqlhostserver] 這個參數。 這樣囉!收工。

[VB.net] 整合excel的用法

1.在參考中加入excel COM元件   Microsoft Excel 11.0 object library 或   Microsoft Excel 12.0 object library 如果加入之後 有錯誤 可能是缺少 Office PIA 可以到網路上下載 2.使用code Dim excel As New Microsoft.Office.Interop.Excel.ApplicationClass Dim wBook As Microsoft.Office.Interop.Excel.Workbook Dim wSheet As Microsoft.Office.Interop.Excel.Worksheet wBook = excel.Workbooks.Add() wSheet = wBook.ActiveSheet() /*對內容處理*/ excel.Cells(1, 1) = "123" wSheet.Columns.AutoFit() Dim excelFileName As String = "F:\MyExcel.xls" wBook.SaveAs(excelFileName) wBook.Close() excel.Quit() excel = Nothing

[VB.net]特殊控制字元

ControlChars 模組成員 CrLf vbCrLf Chr( 13 ) + Chr( 10 ) 歸位/換行字元 (Carriage Return/Linefeed) 組合。 Cr vbCr Chr( 13 ) 歸位字元。 Lf vbLf Chr( 10 ) 換行字元。 NewLine vbNewLine Chr( 13 ) + Chr( 10 ) 新行字元 (Newline Character)。 NullChar vbNullChar Chr( 0 ) 具有 0 值的字元。 N/A vbNullString 具有 0 值的字串 與長度為零的字串 ("") 不同;用來呼叫外部程序。 N/A vbObjectError -2147221504 錯誤代碼。使用者定義錯誤代碼應大於這個值。例如: Err.Raise(Number) = vbObjectError + 1000 Tab vbTab Chr( 9 ) 定位字元。 Back vbBack Chr( 8 ) 退格鍵 (Backspace)。 FormFeed vbFormFeed Chr( 12 ) 在 Microsoft Windows 中的作用不大。 VerticalTab vbVerticalTab Chr( 11 ) 在 Microsoft Windows 中的作用不大。 Quote N/A Chr( 34 ) 用來封入值的引號字元 (" 或 ')。

[Data Mining]SVM -SVM, Support Vector Machine

SVM, Support Vector Machine, is something that has similar roots with neural networks. But recently it has been widely used in Classification . That means, if I have some sets of things classified (But you know nothing about HOW I CLASSIFIED THEM, or say you don't know the rules used for classification), when a new data comes, SVM can PREDICT which set it should belong to. Reference: SVMs piaip's Using (lib)SVM Tutorial Dr CJLin Kernel-Machines.Org

[.Net]__doPostBack用法

__doPostBack(__EVENTTARGET,__EVENTARGUMENT) _doPostBack是通過__EVENTTARGET,__EVENTARGUMENT兩個隱藏控制項向服務端發送控制要求的 __EVENTTARGET為要呼叫的控制項名稱,如果要呼叫的控制項是子控制項,用''$'或':'分割父控制項:子控制項, __EVENTARGUMENT 是調用事件時的參數,通常為空 Control如果含有":" ,需要預先替替換"$" 但是在我們呼叫__doPostBack函數時,有些時候呼叫這個函數會出現"物件不存在"的錯誤? 那是因為Html裏面沒有__doPostBack函數物件,一般在拖放那些有自動回傳功能的控制項時,當把他的autoPostback屬性設為True, 在運行的時候系統會自動添加__doPostback函數體,當然最直接的辦法就是添加一個LinkButton然後把其Text屬性設為空,切記不要設 Visible屬性,因為如果Visible=false,在翻譯成Html時,直接就忽略LinkButton的存在了。 Ref: __doPostBack用法感悟收藏

[.Net]JPG品質調整

Imports System.Drawing.Imaging Sub SaveJPG()  Dim Image as Bitmap = New Bitmap(OrigianalImageFile)   '設定壓縮品質90檔案大小約是100的一半 但是畫質還是很不錯  Dim quality As Integer = 90  Dim qualityParam As New EncoderParameter(Encoder.Quality, quality)  '取得編碼格式   Dim jgpEncoder As ImageCodecInfo = GetEncoder(ImageFormat.Jpeg)  Dim encoderParams As New EncoderParameters(1)  encoderParams.Param(0) = qualityParam  Image.Save(NewImageFile, jgpEncoder, encoderParams) End Sub '取得編碼格式的副程式 Private Function GetEncoder(ByVal format As ImageFormat) As ImageCodecInfo  Dim codecs As ImageCodecInfo() = ImageCodecInfo.GetImageDecoders()  Dim codec As ImageCodecInfo   For Each codec In codecs    If codec.FormatID = format.Guid Then     Return codec    End If   Next codec  Return Nothing End Function 參考資料: MSDN

[ASP.Net] 分頁型Excel匯出

用產生xml的方式 gene 標頭用 xmlTextWriter 產生Excel 會在Excel 2003無法開啟 所以改用response.write產生 Response.Charset = "UTF8" Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8") Response.AddHeader("content-disposition", "attachment; filename=" & filename & ".xls") Response.ContentType = "application/vnd.ms-excel" Response.Write("<?xml version='1.0'?>") Response.Write("<?mso-application progid='Excel.Sheet() '?>") Response.Write("<Workbook xmlns='urn:schemas-microsoft-com:office:spreadsheet'") Response.Write(" xmlns:o='urn:schemas-microsoft-com:office:office'") Response.Write(" xmlns:x='urn:schemas-microsoft-com:office:excel'") Response.Write(" xmlns:ss='urn:schemas-microsoft-com:office:spreadsheet'") Response.Write(" xmlns:html='http://www.w3.org/TR/REC-html40'>") 每個Sheet開頭 Respon

[ASP] ASP錯誤處理

ASP是非常簡單的,以至於許多的開發者不會去思考錯誤處理。 錯誤處理能夠讓你的應用程式更加合理。 我看到過很多個用ASP編寫的商業網站,大多數都忽略 了錯誤處理。 錯誤的類型 有三種主要的錯誤類型: 1.編譯錯誤:     這種錯誤出現一般都是代碼的語法問題。因為編譯錯誤而導致辭ASP停止運行。 2.運行錯誤:  這個錯誤是發生在你準備運行ASP時的。例如:如果你試圖給一個變數賦值,但是卻超出了該變數允許的範圍。 3.邏輯錯誤:  邏輯錯誤是最難被發現的,這種錯誤經常是一種結構錯誤,電腦是發現不了的。這就需要我們徹頭徹尾地檢查我們的代碼。    因為編譯錯誤一般是和邏輯錯誤一起發生的,一般都能顯示出來,所以我們擔心的就只是運行錯誤。 它都終止ASP的運行,而且給用戶丟下一堆很不友好的文字。 那麼我們要怎樣處理運行錯誤呢?    我們先來看看,ASP唯一提供給我們的錯誤命令--- On Error Resume Next(這裏提醒一下初學者,在ASP中只有On Error Resume Next語句,沒有On Error Resume Goto語句)如果你不使用On Error Resume Next語句的話,一切運行錯誤都會發生,這個是致命的,那麼就會有一段錯誤代碼“展現”給用戶,而且ASP程式也會停止。 下面就是一個錯誤代碼:    Microsoft OLE DB Provider for ODBC Drivers error 80004005 [Microsoft][ODBC Driver Manager]    Data source name not found and no default driver specified /test.asp, line 60    當我們在程式最上面使用On Error Resume Next語句時,所有的錯誤都會被忽略,程式會自動執行下一條語句。這樣程式就會完全執行,出錯後用戶也不會看到出錯資訊。但是這樣也有 不好的地方,那就是如果程式沒有按照你想像的執行的話,你就很難找到到底是哪里出了問題,所以你就得在必要的地方對錯誤進行處理。 處理錯誤在ASP中,處理錯誤的最好的辦法就是在程式最底端放上代碼來處理錯誤。 我也推薦在每個ASP程式都使用緩衝區。這樣的話,如果錯誤發生,頁面就會停 止, 頁面內容也會被清除,這樣用戶就

[WinCE] Driver Designe Course Note

BootLoader write process Connet Board by ICE install Banyan-UE-1.8.7b.exe Pass:5678088 execute Banyan-UE\DaemonU Unzip FlashWrite-V0.4.6b.zip execute FlashWrite-V0.4.6a.exe   >Initialize   >Detect   >Auto     Select "eboot.nb0"     Start Write Flash RAM Connet Board by COM Cable and Ethnet Cable(port cs8900) execute dnw.exe   Select com3 and 115200bps   [Serial Port]->[Connect]   and switch the Device power execute Platform Builder   open $MyOSDesign Workspace   [Target]->[Connectivity Options]->[Donwload]/[Setting]   [Target]->[Attach Device]       Build parameter setting set wincerel = 1 build 後自動複製 Driver *.reg write special [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\LED] "Dll"="leddrv.dll" /*Driver DLL檔名* "Prefix"="LED" /*Device名稱* "Index"=dword:1 /*設定driver共用編號* "Order"=dword:0 /*設定driver的載入順序 "FriendlyName"

[WinCE] Driver-

ActivateDevice This function loads a device driver. HANDLE ActivateDevice( LPCWSTR lpszDevKey, DWORD dwClientInfo ); ActivateDeviceEx This function loads a driver and adds its registry values to the Active key in the registry. HANDLE ActivateDeviceEx( LPCWSTR lpszDevKey, LPCVOID lpRegEnts, DWORD cRegEnts, LPVOID lpvParam ); Loading Device Drivers Developing a Device Driver

[C,C++]typedef struct 用法

typedef 可以幫已知數據類型定義新名稱 也可以用來定義struct 如果要幫已知數據類型定義新名稱可用下列方法: '幫已知數據類型long起個新名字,叫byte_4 typedef long byte_4; 要用來定義struct的話 則用下列的方式 '設計一個struct tagMyStruct struct tagMyStruct { int iNum; long lLength; }; 下面是比較複雜的宣告方式 typedef struct tagMyStruct {  int iNum;  long lLength; } MyStruct; --這可以看成兩個部分 1. 設計一個struct 為tagMyStruct struct tagMyStruct { int iNum; long lLength; }; 2. 將 struct tagMyStruct 定名為MyStruct; typedef struct tagMyStruct MyStruct; 宣告更名後 直接給定變數的方式 typedef struct tagMyStruct {  int iNum;  long lLength; } MyStruct, *MyVariable; 可看成以下三行程式 struct tagMyStruct {  int iNum;  long lLength; }; typedef struct tagMyStruct MyStruct; MyStruct, *MyVariable;

[WinCE]WinCE Drivers--Stream Interface Drivers

Stream Interface is appropriate for any I/O device that produces or consumes streams of data. A good example: Serial port device, bad example: Display device Stream Driver is a DLL and has 12 standard Entry Points(函式/介面) (Init 、Deinit、I OControl、PowerDown、PowerUp、Open、 Read、 Write、 Seek、 Close..etc ) 怎麼判斷是否為Stream Driver ? ? public\common\oak\drivers下 的 def 檔,通常會使用 CreateFile("XXXN:", FILES_EXIST, ....) DeviceIoControl 操作的 Driver 都是 Stream Driver,即將 Driver 模擬成檔案來操作 Several ways to implement the stream driver: 1. With only Init and Deinit entry points and no device prefix. ==>You cannot access this driver using CreateFile. (e.g. %_WINCEROOT%\Public\Common\OAK\Drivers\RegEnum) 2.With device prefix in driver entry points. ==> DWORD DEM_ Init( LPCTSTR pContext, LPCVOID lpvBusContext) { OutputDebugString(L"DEM_DRIVER - DEM_Init - Context: "); OutputDebugString(pContext); OutputDebugString(L"\n"); OutputDebugString(L"DEM_DRIVER - Exit DEM_In

[C,C++]CreateFile Function

CreateFile Function Creates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe. The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified. To perform this operation as a transacted operation, which results in a handle that can be used for transacted I/O, use the CreateFileTransacted function.

[C,C++]DataType

DWORD DWORD is not a standard C datatype. Typically it represents a double word. On a 16-bit machine a WORD would be 16 bits, on a 32-bit machine, it would be 32 bits. Having said that, it would imply that a double word on a 16 bit machine is 32 bits and on a 32 bit machine, it would be 64 bits. However, that is very vendor dependent. If you use the 32-bit Microsoft compilers, a WORD and DWORD are the same size!!! Since it deals with words, it is meant for low level use for instance bit patterns on an IO chip. If you want high level usage, use unsigned long. For windows (9x, ME, 2K & XP) registry a DWORD is a 32-bit unsigned long.

[WinCE] *.bib

BIB files ROMIMAGE uses Binary Image Builder (BIB) files to configure how it should configure the ROM. BIB files are just plain text files with keywords defining four different sections. The modules section is identified with the keyword MODULES on a line of its own. In the modules section, executable modules are listed for code that will execute in place (XIP). The files section (keyword FILES) lists other files to place in the image (bitmaps, data files, HTML pages, and so on). It can also specify executable modules not intended for XIP. Rarely used diagnostic applications are a good candidate for that. The items in the files section are compressed by default to reduce the size. modules and files The syntax is pretty straightforward for the entries of the modules and files sections: [target] [whitespace] [workstation][memory][flags][target] is the name of the file as it will appear in the ROM. is the path ROMIMAGE will use to find the actual file (normally based on $(_FLATRELEASEDIR

[WinCE] Driver-

DllMain Callback Function ---Windows架構下呼叫dll的主程式結構 BOOL WINAPI DllMain( __in HINSTANCE hinstDLL , __in DWORD fdwReason , __in LPVOID lpvReserved ); XXX_IOControl (Device Manager) This function sends a command to a device. BOOL XXX_IOControl( DWORD hOpenContext, DWORD dwCode, PBYTE pBufIn, DWORD dwLenIn, PBYTE pBufOut, DWORD dwLenOut, PDWORD pdwActualOut ); Parameters hOpenContext [in] Handle to the open context of the device. The XXX_Open (Device Manager) function creates and returns this identifier. dwCode [in] I/O control operation to perform. These codes are device-specific and are usually exposed to developers through a header file. pBufIn [in] Pointer to the buffer containing data to transfer to the device. dwLenIn [in] Number of bytes of data in the buffer specified for pBufIn. pBufOut [out] Pointer to the buffer used to transfer the output data from the device. dwLenOut [in] Maximum number of bytes in the buffer specified by pBufOut. pdwActualOut [out] Pointer to the DWORD bu

[WinCE] SOURCES文件詳解

SOURCES文件是WINCE底层开发中最重要的文件之一,主要的配置项如下: TARGETNAME,定义模块名称. TARGETTYPE,模块的种类,可以是DYNLINK, LIBRARY,EXE. 如果TARGETTYPE是DLL,则可以定义DLLENTRY,将Dll入口定义成别的不是DLLMain的函数,如果DLL的入口是DllMain,则不需要别的定义。 如果TARGETTYPE是EXE,则可以定义EXEENTRY,用于指定EXE的入口函数. 如果TARGETTYPE是LIBRARY,则不需要定义入口函数。 INCLUDES,如果一个模块需要使用非标准路径下的头文件时,需要定义INCLUDES,用于包含更多的头文件路径,用法如下: INCLUDES=$(INCLUDES);\new directory\...,注意定义新的INCLUDES时,需要包含INCLUDES原来的值,否则就需要包含所有可能的目录。 TARGETLIBS,SOURCELIBS用于定义该模块需要链接哪些库文件. TARGETLIBS,如果一个库以DLL的形式提供给调用者,就需要用TARGETLIBS,它只链接一个函数地址,系统执行时会将被链接的库加载。比如coredll.lib就是这样的库文件。即动态链接。 SOURCELIBS,将库中的函数实体链接进来。即静态链接,用到的函数会在我们的文件中形成一份拷贝。 注意,内核这个执行文件是没有TARGETLIBS的,GIISR.DLL也不能有TARGETLIBS。 WINCECOD,如果将其定义为1,则编译器会为每一个文件生成.cod文件,它是一个汇编文件,调试时查看汇编代码也是一种很好的办法。 SOURCES,定义该模块需要哪些源文件. 文章轉載自 WINCE Driver and BSP Develop Blog

[理財]合夥買賣房屋辦公室預告登記

先做預告登記 合夥投資保權益 商業辦公室買賣動輒數千萬元的交易,一般小投資人想介入門檻甚高。有投資人想到用合資的方式,將資金集合起來,一起購買,轉手賣出或出租,再按比例分享獲利,房仲業者表示,合夥人必須先到地政機關做好預告登記,來保障各自的權益。  信義房屋不動產企研室主任蘇啟榮表示,預告登記可以到地政機關申請,主要的好處就是避免房子的登記人,趁著其他的合夥人不注意,就私自將房子賣出,獲利全歸自己所有。 預告登記上可以註明,房屋的所有權人屬於哪幾個合夥人持有,一旦要出售,必須所有合夥人都同意,或者出示同意授權書,房子的登記人才有權利將房子出售,避免發生有人賣了房子後、捲款潛逃,剩下的合夥人被倒債狀況。 至於合資買的辦公室要登記誰的名字比較有利?永慶房屋協理黃增福說,有些人會登記在收入少的人名下,因為這樣來年要繳的稅比較少,不過,相對來說,跟銀行拿到的貸款額度也會比較低。 黃增福表示,登記在誰的名下,其實,沒有絕對的好壞,合夥人之間商量好即可,不過若是要拿到較高成數的銀行貸款,最好要登記在過去信用沒有瑕疵、所得比較高的人名下,能夠借到的錢最多。 住商不動產企研室主任徐佳馨表示,買賣房子一定是整個產權的過戶,也不可能將各自登記的比例,過戶給買方,合夥出資一定要在法律上保障到自己的權益,若是以為彼此感情好、只做口頭約定,沒有白紙黑字寫清楚,到最後都會出問題。 做了預告登記後,若不是出售而是出租,合夥人也不需要擔心登記人自己胡亂搞,出租給特種行業,或者是將持份的比例,亂租給來路不明的人,造成其他合夥人的困擾。 蘇啟榮表示,若是透過仲介公司做房屋租賃,房仲業者會到地政機關調出房子的謄本,包含持有人是誰、是否有做過預告登記等,房屋要順利出租,必須預告登記人都同意,才有辦法出租。 資料來源:【工商時報 許(清爭)文台北報導】 2008.6.15

JAVA裡字元(Integer)與字串(String)的互轉

‧字串轉為數值   byte Byte.parseByte(String s [, int radix]) 將參數 s 由 String 轉換成 byte 資料型態   short Short.parseShort(String s [, int radix]) 將參數 s 由 String 轉換成 short 資料型態   int Integer.parseInt(String s [, int radix]) 將參數 s 由 String 轉換成 int 資料型態   long Long.parseLong(String s [, int radix]) 將參數 s 由 String 轉換成 long 資料型態   float Float.parseFloat(String s) 將參數 s 由 String 轉換成 float 資料型態   double Double.parseDouble(String s) 將參數 s 由 String 轉換成 double 資料型態 ‧數值轉為字串  String.valueOf(boolean b)  String String.valueOf(char c)  String String.valueOf(char[] data [, int offset, int count])  String String.valueOf(int i)  String String.valueOf(long l)  String String.valueOf(float f)  String String.valueOf(double d)  String Byte.toString(byte b)  String Short.toString(short s)  String Integer.toString(int i [, int radix])  String Long.toString(long l [, int radix])  Float.toString(float f)  String Double.toString(double)

在 Windows 上安裝 Subversion 獨立伺服器

A.到 SVN的官方網站 下載svn(.zip) B.解壓縮到你預設的目錄下 我都是放在C:\Program Files\subversion下 , C.設定環境變數  1.在Path中加上 $[Subversion安裝的路徑] 讓之後在執行SVN相關程式比較方便   2.另外加上以下幾個變數     SVN_EDITOR=notepad.exe //設定commit message的編輯程式     LANG = zh_TW.UTF8 //設定SVN的語言語系     APR_ICONV_PATH = $[Subversion安裝的路徑]\iconv //設定SVN的語言語系 D.建立一個 SVN專案   svnadmin create $[要建立的專案路徑]     ex: svnadmin create D:\My_Project_SVN   就會在D:\下建立一個My_Project_SVN的資料夾,並且把相關的檔案複製過去。 E.設定SVN專案的權限   在D:\My_Project_SVN\conf下有三個檔案     svnserve.conf 中已經有一些設定了,請參照下面的設定,把 # 註解符號移除:       [general]       anon-access = read //匿名者的存取權限 有read , write ,none       auth-access = write //通過認證者存取權限 有read , write ,none       password-db = passwd //使用者密碼檔       authz-db = authz //認證權限設定檔       realm = CIMS Project     切換到 authz檔,參考以下的設定:       [groups] //群組的設定       CIMS = user1,user2 //群組名稱 = 使用者1, 使用者2       [/] //[Dir]下的權限設定 r(read),rw(read+write),””(none)       @CIMS =rw //@群組 = 權限       User1=rw //使用者名稱 =權限 (*代表所有登入者)