banner ad

Archive for March, 2013

JSON Request and Response

JSON Request and Response

| March 29, 2013 | 0 Comments

JSONRequest is a proposed new standard that could replace XMLHttpRequest and shed the crippling “same domain policy” that makes it a pain to consume outside APIs in Javascript. request a JSON response

Continue Reading

Configure python path for Sublime Text 2

Configure python path for Sublime Text 2

| March 27, 2013 | 0 Comments

I am using sublime text 2 for python development along.  Before you use this editor, you may need to edit path about sublime. Edit Path ~~ /Library/Application Support/sublime text 2/Packages/Python : (path point to the Python path) { “path”: “/ opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/”, / / “cmd”: [“python”, “-u”, “$ file”], “cmd”: [“python2.7”, “-u”, “$ file”], “file_regex”: “^ [] * File \” […]

Continue Reading

Node.JS + MongoDB

Node.JS + MongoDB

| March 23, 2013 | 0 Comments

Continue Reading

Mongo –help

Mongo –help

| March 21, 2013 | 0 Comments

Continue Reading

Mongod –help

Mongod –help

| March 21, 2013 | 0 Comments

Continue Reading

htop install for Linux

htop install for Linux

| March 21, 2013 | 0 Comments

Htop is an interactive system-monitor process-viewer written for Linux. It is designed to replace the Unix program top. It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage. Unlike top, htop provides a full list of processes running, instead of the top resource-consuming processes. […]

Continue Reading

Pymongo  Python and MongoDB

Pymongo Python and MongoDB

| March 19, 2013 | 0 Comments

The PyMongo distribution contains tools for interacting with MongoDB database from Python. The bson package is an implementation of the BSON format for Python. The pymongo package is a native Python driver for MongoDB. The gridfs package is a gridfs implementation on top of pymongo.PyMongo is a Python distribution containing tools for working with MongoDB, […]

Continue Reading

MongoDB Map-Reduce db.collection.mapReduce()

MongoDB Map-Reduce db.collection.mapReduce()

| March 19, 2013 | 0 Comments

Map-reduce operations can handle complex aggregation tasks. To perform map-reduce operations, MongoDB provides the mapReduce command and, in the mongo shell, the db.collection.mapReduce() wrapper method. db.collection.mapReduce(map, reduce, {<out>, <query>, <sort>, <limit>, <finalize>, <scope>, <jsMode>, <verbose>}) db.collection.mapReduce( <map>, <reduce>, { out: <collection>, query: <document>, sort: <document>, limit: <number>, finalize: <function>, scope: <document>, jsMode: <boolean>, verbose: <boolean> } ) Parameters: map –A JavaScript function that associates or […]

Continue Reading

Install MongoDB on Windows

Install MongoDB on Windows

| March 16, 2013 | 0 Comments

Download the latest production release of MongoDB from the MongoDB downloads page. If your MongoDB in c:\mongodb. c:\mongodb\bin\mongod –install –dbpath c:\mongodb\data –logpath c:\mongodb\logs\mongodb.log then command: C:\mongodb>mongo if you have this problem when you install mongodb on windows. MongoDB shell version: 2.0.2 connecting to: test Sat Mar 16 16:56:42 Error: couldn’t connect to server 127.0.0.1 shell/mongo.js:8 […]

Continue Reading

Ubuntu install NPM

Ubuntu install NPM

| March 16, 2013 | 0 Comments

To install npm in one command, here: curl https://npmjs.org/install.sh | sudo sh Now the url address is https://npmjs.org/install.sh ( http://npmjs.org/install.sh before). If you use curl http://npmjs.org/install.sh | sh and you may see :sh: 2: Syntax error: newline unexpected. install.sh

Continue Reading