Wednesday, January 14, 2015

Create Website Using Flask -- A Step by Step Guide

Part 1 How to compile and run the website

virtualenv env
. env/bin/activate

pip install Flask Flask-Script Flask-Mail Flask-SQLAlchemy Flask-Uploads Flask-WTF python-dateutil 

Next time:


mkdir flask
cd flask ; mv ~/path/to/Merlot .
virtualenv env
. flask/env/bin/activate
pip install pip install Flask Flask-Script Flask-Mail Flask-SQLAlchemy Flask-Uploads Flask-WTF python-dateutil merlot
cd Merlot
python mangae.py runserver
the only like you need to repeat the next time is the
. flask/env/bin/activate

Part 2 register and login

flask login and principal

Emacs Cheatsheet

C-x C-f: find file
C-s: search

C-x + enter: dir
C-w: delete selection

C-x u: undo

C-x 3: split window horizontally
C-x 2: split window vertically

Sunday, December 14, 2014

Latex TextBox

 \begin{mdframed}[roundcorner=15pt, frametitle  
 ={Abstract},frametitlerule=true,frametitlebackgroundcolor=brown!30!white,]  
  ...  
 \end{mdframed}   

Thursday, December 4, 2014

The Truth of Being Problematic

There are two categories of students in the world:

"Good students" and "Problematic students".

I have been a good student much of the time, but I am somehow being problematic when I was in Hong Kong.

But I don't think it is a big deal. There are many problematic students (and professors) in MIT and Stanford as of what I know.

Of course I wish I were a Straight-A student which will make my life easier, but being problematic does not mean a straight fail.

Anyway I am back to the Good-Student mode now and I am totally cool about continuing this way for the rest of my life. I guess that's what others say about growing up and being mature. =)