Thursday, November 14, 2013

Erase Telosb Motes

tos-bsl --telosb -c /dev/ttyUSB0 -e

Wednesday, November 13, 2013

Linux/Unix Basic (but useful) Commands


Split the file into parts
  1. Find out how many lines do you have in your file. 
  2. Know how many parts you require. 
  3. Accordingly apply this command in your terminal: split -l 10000 filename (Here 10000 is the no of lines in my files. So if I have 20000 lines in my file, and if I issue above command, then my file will be divided in two parts.)
Change directory folder with spaces

If I have my folder as /home/jenis/folder name/

then, 

cd /home/jenis/folder\ name

        or
cd /home/jenis
cd "folder name"

Thursday, November 07, 2013

Funny bug about teamviewer

I was having some problems with using teamviewer lately. Sometimes, when I switch window from Remote computer to local computer, I was not able to key anything in the remote computer. Teamviewer (or whatever) was behaving as if teamviewer is not running at all. Finally, I thought that let me see if any of my keys are having some problems ( I figured this out as I had used old 90s computers where keyboards were different than what we have right now. During that time too, there was a similar problem, if some key is halt or jammed, if you try to type in anything, you won't be able to type.)

So, anyway, if you find similar problem with teamviewer, try holding "Alt" key for 2-3 seconds and your problem would be resolved. I would be curious if someone knows the exact reason behind it. Anyway, enjoy. 

Matlab Tricks

MATLAB tricks.

1. If you have two cell arrays, you can concat them together using concat(c1,c2);
2. To delete element from Vector (or Double matrix), Use:
a=[1,2,3,4,5];
b = a(a~=3);

Output: [1,2,4,5]
Ref: http://www.mathworks.com/matlabcentral/answers/48938

3. To remove space between string, 
regexprep(stringvalue,'[^\w'']','')