Wednesday, August 15, 2012

Naruto

"九喇嘛。我們上吧!!!"
--漩渦鳴人

"你和我一樣,都是在虛僞世界裏行走的人“
--鼬

虛僞的不是世界, 是行走在世界裏的人. :) 只要你的世界裏没有虛僞的人, 那你就不用感慨他人的虚伪. :)
--Soon J FF


Sunday, August 5, 2012

Text-enhancer ruining my blog!

Unfortunate events come in a series and I must say irritating events too... The double scroll-bar first then when I am documenting things on my blog, "text enhancers" start smearing my blog and every other blog that I visit with ads and "text enhancers"! *roll eyes*

Seriously man... 

I scoured the net again and found these remedies:

Putting things together, I came up with a little protocol:
1) Go to "Wrench">Settings. 
2) Scroll all the way down to "Show advanced settings", click to open.
3) Find "Privacy" (first one), click "Contents Settings">Cookies>Manage Exceptions.
4) Add "textsrv.com" and BLOCK it.
5) Next, back up one level, on "Contents Settings">Cookies>"All cookies and site data", search for "text" and delete anything suspicious.
6) Go "wrench" again and Tools>Extensions. Disable anything weird.

Hopefully, these will work... *cross fingers*

Double scroll bar on Chrome

Notice the double scroll bar to the right. The squishing is hard to make out but it makes highlighting and clicking on hyperlinks extremely difficult since despite everything being skewed to the left, somehow the cursor doesn't register the skew when you highlight... Discombobulated.

For some reason, recently, I have been getting this VERY IRRITATING double-scroll-bar-squished webpages from my Chrome browser for non-Google pages. This makes surfing an extremely painful experience, unfortunately, especially with all the Olympics going on. I didn't want to give up on Chrome yet.

1) So I reinstalled Chrome --> didn't solve the problem.

2) I search deeper and found this:
http://productforums.google.com/forum/#!topic/chrome/Q3bCcMuDGTo

Follow the steps here:
a) Go to "chrome://plugins"
b) Click on "+" sign next to Details at the top right to expand all the information about the plugins.
c) Under "Flash" (which is the first one for me), search for the Location that ends with "...PepperFlash/pepflashplayer.dll" (use the search function, or it's the first one for me too) and DISABLE it.
d) Re-start the browser and the problem should go away!! Hurray!!

Saturday, August 4, 2012

UNIX wget fetch equivalent of pdb files!

Wanted a very easy way to grab PDB files like the 'fetch' command in Pymol.

Found this gem:
http://nsaunders.wordpress.com/2008/01/14/rapid-command-line-access-to-the-pdb/

I tried and it worked:
 wget http://www.rcsb.org/pdb/files/1LZW.pdb

I am so gonna put this into a simple shell script.

Tuesday, June 26, 2012

Of Gothic and Vintage

Recently got hooked onto "motifs". Not only that it's part of my scientific work, but also my own leisure art.

Apart from my usual doodles of leaves, grasses, rocks, snails, butterflies and random borders, I have a little added gothic and vintage motifs to my (limited) repertoire...

Some of my inspirations (the websites that these originated are awesome, click on them to go there):


Now with my trusty black marker, I decided to put my brain and hands to work:
As people can see, this is really a sketch on a piece of rough paper.
Right after this I decided to dive right in...
Took me a while but not too long. It didn't seem too bad LOLX

Successfully gave my brain the little break it needed. Unexpectedly, I think taking that shot above made inadequacies really apparent. Some fine-tunings need to be done!

Last tip of the day: Google Image = best friend in searching for images - it can use keywords like Google, or you upload a picture and voila, images just roll in!

Sunday, June 24, 2012

Mendeley Bibliography Vancouver format

For some reason, the Vancouver format given by Mendeley does not seem to be exactly Vancouver at all. I had to make drastic changes to the CSL file to tailor it to a journal's requests.

In any case, I made these changes to the original Vancouver:
A) square brackets in bibliography and in text
B) et. al. beyond 3 authors
C) et. al. italicized
D) remove website, access dates and some other junk
E) journal abbreviations

Let me document how I made those changes.

NOTE THAT for all changes to occur, Mendeley has to be closed and reopened. If you are using the Microsoft Word plugin, Word does NOT need to be closed, only Mendeley, then just click "Refresh" in the plugin in Word.

1) Start "Mendeley Desktop", press Ctrl+Shift+D, click on "Open data directory".
2) That will lead you to this folder "C:\Users\<.username>.\AppData\Local\Mendeley Ltd\Mendeley Desktop\citationStyles-1.0". (Replace <.username>. with your username)
--- Note that this is where Mendeley will look to find your edited versions. The default citation styles (those installed from Mendeley) are stored in another folder - "C:\Program Files\Mendeley Desktop\citationStyles-1.0". For a detailed description (especially on OS-specific issues), look here.

3) Copy Vancouver.csl from the default citation style folder to this folder, and name it Vancouver_new.csl in this folder. Open in a text editor. The Citation Style Format is in XML format, so preferably have an editor that preserves formatting (not Notepad).

4) Go to container <.info>. (somewhere on line 3), under tag "'"\<.title>."'" (line 4), change that to """Vancouver_new""".<./title\>.<./info>.

5) To use square brackets in both text and biblio, go to about line 132 and 168, change """(""" and """)""" to """[""" and """]""" respectively. The first one changes the brackets in the text, and the second in the biblio. So if you require any other variations, you know where to change.

6) To change to et. al. beyond 3 authors, go to line 136, change both the numbers after """et-al-min=""" and """et-al-use-first""" to 3. I read on some forums, sometimes this doesn't work. So play around with the numbers. Having both as 3, worked for me though.

7) To italicize et al. in the biblio, look under the macro container for """author""" or """author-short""". The command tag """et-al""" is provided by """Name""" (or cs:name), so you need to look for a line something like this:
<.blockquote class="""tr_bq""">.
 <.span style="""font-family: "'"Courier New"'", Courier, monospace;""">.<.name sort-separator=""" """ initialize-with="""""" name-as-sort-order="""all""" delimiter=""", """ delimiter-precedes-last="""always"""/>.<./span>.<./blockquote>.

and insert this line AFTER this """name""" tag:
<.span style="""font-family: "'"Courier New"'", Courier, monospace;""">.<.et-al font-style="""italic"""/>.<./span>.

So finally it should end up looking something like this:

<.blockquote class="""tr_bq""">.
<.span style="""font-family: "'"Courier New"'", Courier, monospace;""">.<.macro name="""author""">.
<.names variable="""author""" suffix=""". """>.
<.span class="""Apple-tab-span""" style="""white-space: pre;""">. <./span>.     <.name sort-separator=""" """ initialize-with="""""" name-as-sort-order="""all""" delimiter=""", """ delimiter-precedes-last="""always"""/>.
<.span class="""Apple-tab-span""" style="""white-space: pre;""">. <./span>. <.et-al font-style="""italic"""/>.
<.span class="""Apple-tab-span""" style="""white-space: pre;""">. <./span>. <.label form="""short""" prefix=""", """ text-case="""lowercase"""/>.
<.substitute>.
<.names variable="""editor"""/>.
<./substitute>.
<./names>.
<./macro>.<./span>.<./blockquote>.

8) Removing all those what I call "junk",  requires going to the container """bibliography""". Remove things like these: <.span style="""font-family: "'"Courier New"'", Courier, monospace;""">.<.text macro="""accessed-date""" prefix=""" """/>.<./span>..

Similarly, junk are also found within the """journal-title""" container, such as <.span style="""font-family: "'"Courier New"'", Courier, monospace;""">.<.text term="""internet""" prefix=""" [""" suffix="""]""" text-case="""capitalize-first"""/>.<./span>.

Remove as many of these as you want.

9) Journal abbreviations. Procedure on how to do this is found here. I provide a more succinct description here.

--- Ctrl+Shift+D, click "Open data directory"
--- Create a folder called "journalAbbreviations"
--- Within this folder, create a plain text file called "default.txt". This is a tab-delimited 2-column text file. First column is the full journal name or the name it is printed in your bibliography (case-sensitive, e.g. American Journal of Human Genetics and American journal of human genetics, are 2 DIFFERENT THINGS, so you need to have 2 lines for these). 2nd column is the journal abbreviation.

--- A great start for "default.txt" is found here. Right-click and save as "default.txt".
--- In Mendeley Desktop, when you change to a new style, the default.txt file will be read and the abbrevations will be used since the Vancouver style specifies form="short" for "author".<./title>.<./info>.


*EDIT: If 'refresh' doesn't work, try switching to other styles and then switch back.

ADD1) If you want to get rid of et. al. in the bibliography, set et-al-min = 3 and et-al-first = 1