xiaoxing tech

November 13, 2008

using local Subversion server with Netbeans

Filed under: subversion, tool — xiaoxing @ 10:38 am

tool subversion

1. download CollabNet Subversion Server and Client v1.5.4 (for Windows) and install (Apache mod is not necessary)
2. make local repository from command line c:\: svnadmin create svn_repository
3. (folder c:\svn_repository will be created with some svn contents)
4. (from server point of view) import a project into the repository, from Netbeans: right click the project……, repository url: file:///svn_repository

also, to delete a repository, just do it through windows explorer. no this command from svnadmin.

August 16, 2007

faind: cmd tool, to locate the file that contains content we are searching

Filed under: tool — xiaoxing @ 1:57 pm

Windows’s “Ctrl+E” search dog is lame.
Then I try Google Desktop. It’s indexing seems never end, and it doesn’t search for content within a folder. So, I have to look for another tool.

faind, is a good command line tool, a tool not easy to use, but works.
http://solarix.ru/for_users/download_them/faind/faind-en.shtml

1. download “φaind for Windows” (faind-setup-pro.exe 4029kb) from http://solarix.ru/for_users/map/map-en.shtml
xiaoxingz aug 16, 2007 txt

2. install it: C:\Program Files\Bulldozer.Win32

3. make a bat file contains:
“C:\Program Files\Bulldozer.Win32\faind.exe” %1 %2 %3 %4 %5 %6 %7 %8 %9
put the file here: C:\Program Files\Java\jdk1.6.0_02\bin
save as name: faind.bat

4. create a text file: faindCommands.txt
put it in the “Start -  Programs”
put commonly used faind commands and DOS commands here.

5. use cases:
Open cmd window.
Use cls to clear the window.
Use cd to go to the folder.

a. The basic function of this program is to search files for text (usually lines or sentences) that contain certain patterns. The following example performs the search for very first occurrence of single word “cat” in one file 501140729-LAC-PREP222.txt, morphology is disabled:
faind 501140729-LAC-PREP222.txt -sample “PSAMER”

b. The next example is nearly the same as above, but all files in current folder are scanned:
faind . -sample “PSAMER”

the result:
Aug. 16Screen_15

This result says that within the current folder, there are two files that contain “PSAMER”. They are:
.\20070716\CN=Gerardo Ruben Garlog.html
and
.\20070719\CN=Gerardo Ruben Garlog.html

(to copy selected content from the cmd window, simply key “Enter”)

c. Searching for pattern “white cat” in the single file a.txt with morphology engine enabled:
faind a.txt  -wordforms -distance=s -minbound=1 -sample “white cat

Here: 1. the option -wordforms lets the program to find also the plural forms like “white cats“.
          2. -distance=s requires that all words of pattern to be in one sentence.
          3. -minbound=1 requites that all words of query pattern must be found. Otherwise, too frequent and meaningless words (like artictes) can be omitted.
         4. Options -ordered is not set so contexts like “cat is white” can also be matched.

reference:
http://solarix.ru/for_users/download_them/faind/samples-en.shtml


 

 

Blog at WordPress.com.