Python and MongoDB: A Quick Reference to PyMongo
2013年5月23日 11:09
Installing the MongoDB Library
$ easy_install pymongo or # sudo easy_install pymongo
Importing the MongoDB Library
from pymongo import MongoClient
Connecting to MongoDB
client = MongoClient("192.168.1.1", 27017)
Selecting a Database
client = MongoClient("192.168.1.1", 27017) db_instance = client["database_name"]
The 100 Words That Will Get You Hired Anywhere
2013年3月07日 11:08
You should hire me because I will work harder than anyone else you’re going to talk to. On Sunday evenings I process all of my email and write out my goals for the week. I show up an hour before everyone else each morning to make the coffee and get my most important task for the day done. I spend as many lunches and breakfasts as possible with prospective or current clients. And I take the local train instead of the express so I can write thank you cards or notes to clients. That’s why you should hire me.
Rails Partial
2013年3月06日 22:33
Collection:
<%= render :partial => "common/post", :collection => @posts %>
Partials are very useful in rendering collections. When you pass a collection to a partial via the :collection option, the partial will be inserted once for each member in the collection
Object:
<%= render :partial => "customer", :object => @new_customer %>
ERROR: Error installing mysql2
2013年3月06日 00:42
bundle install 时,ubuntu下,mysql2 gem安装报错。
解决办法:sudo apt-get install libmysqlclient-dev