Search This Blog

Thursday, April 30, 2009

Use WinMerge for compare / merge in StarTeam

We use StarTeam for source control at my work. I'm not a huge StarTeam fan, and I think the compare / merge portion is pretty much unusable. Fortunately, you can pick your own alternative merge and compare utilities. I like WinMerge . Here's how to set it up:

1. Tools / Options / File tab.
2. Check "Merge utility" and "Comparison utility" checkboxes.
3. Browse to WinMergeU.exe
4. Enter the following for merge utility options: /dl "StarTeam Version" /dr "Your Changes" $branchtip $usertip $resultfile
5. Enter the following for comparison utility options: /dl "StarTeam or Older Version" /dr "Your Changes or Newer Version" $file1 $file2

WinMerge command line info:
Araxis Merge integration info for various source control systems:

John Galloay :

- Mihir Patel

Wednesday, April 29, 2009

LEX & YACC Debugging

When compiling include the


flag and the lexer will tell what it's accepting and what not.

this might save you a bit of time in debugging.

- Mihir Patel.

Tip : the lex grammar is checked incremental.

Wednesday, April 22, 2009

unexpected file size increase in Microsoft Word document \ Word Document Size Increase : size, word, document, increases

The quick solution to this problem is to save the document to the *.rtf format and open it and re save it to doc format.

  1. 1st doc -> test.doc (20MB) save it as test.rtf
  2. check the size of test.rtf (now the size might have gone down to 400 KB)
  3. open this test.rtf (with microsoft word) and save it as test1.doc (size will be 400 KB)

By the way microsoft Office is peace of crap just use Open office (Free, Open source and no surprise like this)

I don't have any other quick solution then this but If you have found one then add your comment. I have found this problem with word 2003. In case you have the same problem but diffrent version then just report it as a comment. Thanks...

- Mihir Patel

Wednesday, April 15, 2009

How to check free disk space in linux

The Command you should use is

df -h

-h is the flag which makes it more readable

- Mihir Patel

Few Examples

[mihir@mp tests]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              65G  5.0G   57G   9% /
/dev/sda1              99M   14M   81M  14% /boot
none                  2.0G     0  2.0G   0% /dev/shm
hirouxx:/work         145G   12G  126G   9% /work

[mihir@mp tests]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2             67740692   5224076  59075496   9% /
/dev/sda1               101086     13377     82490  14% /boot
none                   2018500         0   2018500   0% /dev/shm
hirouxx:/work        151689392  12434096 131549904   9% /work

Sunday, April 12, 2009

Solved : Gyache --> An error occured at 'ioctl VIDIOCSPICT.'

Gyache offers one of the best webcam integration. although, It's older version did not supported v4l and v4l2 type webcame integration (layman term :newer webcam , integrated in the lattest laptops)

Solution :

I have tested version 1.1.59, which supports both v4l and v4l2.

Download it from :

Problem : the program is not maintained by a single authority...

-- Mihir Patel

Thursday, April 2, 2009

How to Beat Rapidshare Download Limits and Waiting Time

1. Use a proxy with SwitchProxy and Firefox:

2. Use an anonymous service:

    Running your system through the tor network should in theory work; however, it is difficult to use and setup. Plus, you allow others to run their evil deeds through your system as well by using this system. Anonymizer 2005 is inexpensive, easy to use, but not free. Other pay services would likely work as well.

3. You can use a bookmarklet to stop your wait times:

    1. Open IE
    2. Right Click On This Link
    3. Select Add to Favorites
    4. Select Yes to the warning that the bookmark may be unsafe.
    5. Name it “RapidShare No Wait”
    6. Click on the Links folder (if you want to display it in your IE toolbar)
    7. Click OK
    8. You may need to close and reopen IE to see it
    9. Goto rapidshare and click the bookmarklet when you are forced to wait

Recursive grep

Since grep -R <> <> is not available on all flavors, this can be really helpful.

The command is as follows :-

find -name | xargs grep

Create a symbolic link in UNIX

To create a symbolic link, the syntax of the command is similar to a copy or move command: existing file first, destination file second. For example, to link the directory /export/space/common/archive to /archive for easy access, use:

ln -s /export/space/common/archive /archive

To link the runtime control script /etc/init.d/httpd to /etc/rc2.d/S77httpd, use:

cd /etc/rc2.d
ln -s ../init.d/httpd S77httpd

Show line numbers in vi or vim

While editing a document (and not inserting text), type the following to turn on line numbers:

:set number

If you tire of the line numbers, enter the following command to turn them off:

:set nonumber

Copy and paste text with vi or vim

The command ‘Y’ or ‘yy’ copies (yanks) one or more lines. To copy one line, two lines, 10 lines, and all lines to the end of the file, respectively:


To paste the text contained in the buffer above (uppercase P) or below the current cursor position (lowercase p), respectively:


It is also possible to yank text within a line. The following commands yank text from the current cursor position to the end of the word and the end of the line, respectively:


The same commands paste the text within a line. Lower case p pastes after the cursor position and upper case P pastes before.

Paste will also work with deleted text, either lines or parts of lines. Be careful not to execute any other commands prior to pasting as this will empty the buffer.