Latexmk + GVim + SumatraPDF (WINE) On Linux

July 23, 2014

0

OK. I admit they are an awkward combination. It is just for me to get rid of ugly evince red box for forward search. I hope this post can help those who want some other awkward combination. Basic I am a daily user of GVim, some time for coding and some time for writing. Latex […]

Posted in: LInux

Add vim key bindings for IPython 1.0.0

October 4, 2013

12

I am a fun of vim and work a lot with IPython Notebook recently. It would be cool to combine the two. Not like emacs having a great plugin supporting IPython protocol, vim is just not good at interacting with external processes. Luckily, I found CodeMirror, the rich editor js lib used by IPython Notebook, […]

Tagged: ,
Posted in: Python

Overriding in class inheriting

June 4, 2013

0

As Python is a dynamic language, there are a lot you can play with. However, it also produces a lot of confusion. As one of those, inheriting (or extending) of classes is sometimes different from expected. The following snippet shows a case. The purpose was to extend the the original class meanwhile fixing the implementation […]

Tagged:
Posted in: Python

Adding table markdown to IPython

April 14, 2013

2

IPython (0.13.2) uses pagedown as Markdown backend, specifically Markdown.Converter.js. Thus the extra feature provided by pagedown-extra can be plugged in, which enables a flavor of Markdown supporting tables. The first thing to do is replacing the integrated Markdown.Converter.js (pagedown) with the latest one, which implements some hooks pagedown-extra required. Download and put the Markdown.Extr.js (pagedown-extra) next […]

Posted in: Python

Compiling and Installing rar2fs and unrar

May 25, 2012

0

Recently, I found vifs an interesting console-based file managing application. The command system is based on vi which is a great editor and can be configured to use FUSE to mount archives. However, I couldn’t find an easier way to install rar2fs on Ubuntu 11.04. Therefore I tried to compile it myself. Two source trees […]

Posted in: Uncategorized

Iterators, Generators and yield

May 10, 2011

0

Python is really a great programming language as not only does it provide simple access to text and data but also does it facilitate simple method to boost batch processing. In python programmers can easily use for ... in ... to iterate over a collection. Moreover, they can simply make their objects iterable by generators […]

Posted in: Python

Long string in source code

May 9, 2011

0

It is annoying to have a long string in source code, but sometimes it is hard to get rid of it from your source code. But for python it is suggested that to have 79 chars per line in source code. Here comes a trick from [1]. OR Do REMEMBER that commas are not allowed […]

Posted in: Python

Magic Asterisk

May 9, 2011

0

In python, programmers can use *-operator to unpack a list or tuple as a set of parameters to a function. It is quite tricky to pass multiple arguments to a function with this operator. For keyword arguments, programmers can use **-operator.

Posted in: Python

ID-PHONE

March 9, 2008

0

This idea comes from the combination of credit cards and mobile phones. Consider the following scenes. 1   When you get on a bus, take out a RF-card. 2   When you shopping in a mall, and prepare to pay. 3   When you want to buy some food in a restaurant. etc. These situations […]

Posted in: Futurism

PHP 5 Setup Notes

November 16, 2007

0

There is something missed in previous notes about configuration of Apache and PHP. Frequently, MySQL goes with them together, but it’s disabled in php.ini by default. Since MySQL 5 is now spreadly used instead of the forth edition, so it’d better remove ‘;’ before the line showed below in php.ini. ;extension=php_mysqli.dll mysqli maybe means MySQL […]

Posted in: Uncategorized