Monday, December 29, 2014

Netgear router default user name and password

Username: admin
Password: password

how to turn your PC into wifi router

Easiest way for windows 7 users:

Use this software http://download.cnet.com/My-WIFI-Router/3000-18508_4-76086273.html

Make sure to click "direct download link" to avoid downloading the downloader itself.

Sunday, December 28, 2014

creating wine shortcuts on ubuntu

http://askubuntu.com/questions/437555/creating-wine-shortcuts


  1. Open your favourite text editor (gedit, nano, etc.), create a new file with the following content and save it to your Desktop with a name having extension .desktop
    In this example, I've chosen to the name inetexplorer.desktop and saved it to my desktop.
    [Desktop Entry]
    Name=Internet Explorer
    Exec=wine "C:\Program Files\Internet Explorer\iexplore.exe"
    Icon=/path/to/iconfile
    Type=Application
    Categories=Wine;
    
    Here, replace the value for Name field with that of the target application's name. (In the example, it's Internet Exolorer.) The value of Exec would be in the format:
    wine "C:\path to the\executable file"
    
    (for GUI applications)
    wineconsole "C:\path to the\executable file"
    
    (for CLI application) like say
    wine "C:\Program Files\Internet Explorer\iexplore.exe"
    
    (enclosing the path within double quotes ".. .." is important if the path contain blank spaces.)
    Replace /path/to/iconfile (the value for Icon field) with the path of an icon file (like Icon=/home/username/Pictures/internet-explorer.png) or you can omit this line of entry.
    On the left is a shortcut with icon specified, for the one on right, not. iconField
  2. Turn on the file's execute bit on.
    Graphically you can do it by right clicking the .desktop file, and from the context menu select Properties. In the properties window, select Permission tab, look for a label Execute: and check-mark the check-box next to it so that the shortcut becomes executable.
    selecting property from right-click context menu rightClickTheFile
    setting execute permission executableProperty
    From terminal, you can do this with:
    chmod +x $USER/Desktop/inetexplorer.desktop
    
    where $USER/Desktop/inetexplorer.desktop should be the absolute path of the desktop shortcut that was created.

Wednesday, December 24, 2014

How to copy paste format from excel --- generating heat map with customer-defined scale using just excel 2013

This might sound silly but it is beneficial for those who doesn't know programming.

Example task: generate a heat map of a matrix based on the values of log2(value + 1)

1. You create a new sheet and use formula to generate the matrix of log transformed value   value' = log2(value + 1)

2. highlight/select all the elements inside this new matrix, click conditional formatting button on excel
3. copy (ctrl + c)
4. paste it onto a ppt file with the formatting preserved
5. copy and past it back to the ORIGINAL(non log transformed) data matrix by choosing to paste format only

And thus the heatmap is done, with numbers on it.

Monday, December 22, 2014

SyntaxError: Non-ASCII character '\x8d' in file /woldlab/castor/proj/programs/samtools-0.1.16/bin/samtools on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

This python error can have a lot of reasons to trigger, one of which is a silly one:
If you use python to run a non-python script, or you simply mistakenly added "python" in your code when feeding the server.  : (

Sunday, December 21, 2014

How to use linux virtual platform Wine (use windows on linux system)

1. open terminal, and use sudo apt-get install to download wine program
2. Install wine program
3. Everytime you want to run a windows program on linux, use wine + [program name]

To uninstall a program:
 use wine uninstaller


Tuesday, December 16, 2014

[Solved][Excel] Sorting doesn't work

After doing custom sorting on excel, it's always a good idea to double check, because sometimes it doesn't work.

Things to check:
1. Area to sort. The new excel 2013 will be "smart" enough to interpret your Ctrl + A as selecting the whole local area you are paying attention. So it may not include all the elements in the sheet, which will bring extra trouble

2. After sorting. It may not sort out the result you want, at least when you are using calculated values to sort and the formula are somewhat not beautiful to excel.
When sorting doesn't work on calculated values(the results of formula dependent on other columns), tidy up the formula (better use C:C rather than C1 C2 C3...) and it should work, hopefully

Sunday, December 7, 2014

有人听说过1949吗【星際效應interstellar影評】

轉載自http://movie.douban.com/review/7232516/

  其实吧, 
  这讲的就是某个国家自我救赎的故事。 
  黄沙象征着列强的鲸吞蚕食, 
  NASA地下基地就是各路地下党。 
   
  邪恶的Dr. Man就是袁世凯,虽然是个先进人才,但由白转黑,到后来库珀(Cooper)发现信错人了就后悔莫及。 
   
  库珀就是孙文,超级精神领袖,虽然出师未捷身先死,自己掉入黑洞,但他在幕后起的巨大作用是无法被人类精确感知到的。 
   
  虽然库珀死了,但他的队友安妮海瑟薇却继承他的遗志,带领着来自地球的精英在宇宙中漂洋过海来到一个可以开发的宇宙荒岛上,保留地球文明,延续人类血脉。她最大的功劳就是成功完成了大规模移民,而且保证了移民的精英化和多样性。 
   
  地球上的Murph(库珀女儿)本来是个带有神经质的图书馆管理员,但是从小被培养参与地下工作,后来她发现原来其他革命党不靠谱,无法拯救地球,于是搞出来新思路,把地球重力给革命了,改朝换代,建立新的人类帝国。建国之后还请老同志们拍各种纪录片,回忆旧社会的黑暗,歌颂领导人的聪明才智,还建立牌坊。Murph死后被印在钞票上,她的话被编写成了语录。 
   
  接下来问题就来了,因为世界上只能有一个人族,一边是移民狂人安妮海瑟薇建立的政权,一边是革命屌丝Murph建立的新世界,究竟谁才是人类的唯一合法代表?谁代表了先进生产力?宇宙社会是否允许两个人类,一边一国?究竟怎样的统战策略才能完成人类的伟大统一?虫洞两边对话是否能顺利展开? 
   
  请看续集。