Tuesday, December 14, 2010

Comparison of Oracle, MySQL and Postgres DBMS


Comparison are given below with include all the basic concept :-
Category Problem Assessment
MySQL Oracle8 Postgres
Elementary features Basic data types B C A
SQL C B B
Declarative constraints C A A
Programming abstractions D A C
Generation of ids C A A
National chars B A B
Transactions Transactions D A A
Locks D A A
Multiuser access C A C
Programming in DB

Sunday, November 28, 2010

TMUX – The Terminal Multiplexer

tmux is similar to screen as it lets you run numerous TTY’s in the same terminal window. It enables a number of terminals to becreated, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.
Usecommand for attach after detached to reattached.
$ tmux attach

When tmux is started it creates a new session with a single window and displays it on screen. A status line at the bottom of the screen shows information on the current session and is used to enter interactive
commands.

Thursday, November 18, 2010

Sphinx Auto genrate documentation for Django Project

 
Sphinx is a tool that makes it easy to create intelligent and beautiful documentation.

Installing your doc directory

python -c 'import sphinx'
If that fails grab the latest version of and install it with:
> sudo easy_install sphinx
Now you are ready to build a template for your docs, using sphinx-quickstart:
> sphinx-quickstart
accepting most of the defaults. I choose “sampledoc” as the name of my project. cd into your new directory and check the contents:
home:~/tmp/sampledoc> ls
Makefile      _static         conf.py
_build                _templates      index.rst

The index.rst is the master ReST for your project, but before adding anything, let’s see if we can build some html:
make html
If you now point your browser to _build/html/index.html, you should see a basic sphinx site.

Monday, October 25, 2010

Django-Cms Installation error "PageAdmin.exclude' refers to field 'created_by' that is missing from"


Error :
Error "ImproperlyConfigured at / 'PageAdmin.exclude' refers to field 'created_by' that is 
missing from the form" 
Problem Solve :
Fixed this error 
by just setting editable=False on created_by and changed_by and removing all fields from 
PageAdmin.exclude (the other fields already were editable=False)
Edit two files to fix this error
 
Edit file: cms/admin/pageadmin.py
Line no. 65 approximately. 
 revision_form_template = "admin/cms/page/revision_form.html"
Change this line
-    exclude = ['created_by', 'changed_by', 'lft', 'rght', 
'tree_id', 'level']
by 
+  exclude = []  
 mandatory_placeholders = ('title', 'slug', 'parent', 'site',  
'meta_description', 'meta_keywords', 'page_title', 'menu_title') 
top_fields = [] 
 general_fields = ['title', 'slug', ('published', 'in_navigation')]
 

Monday, September 20, 2010

Python : Virtual Python Environment builder

Virtual Python Environment builder
virtualenv is a tool to create isolated Python environments.
The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications? If you install everything into /usr/lib/python2.4/site-packages (or whatever your platform's standard location is), it's easy to end up in a situation where you unintentionally upgrade an application that shouldn't be upgraded.
Or more generally, what if you want to install an application and leave it be? If an application works, any change in its libraries or the versions of those libraries can break the application.
Also, what if you can't install packages into the global site-packages directory? For instance, on a shared host.
In all these cases, virtualenv can help you. It creates an environment that has its own installation directories, that doesn't share libraries with other virtualenv environments (and optionally doesn't use the globally installed libraries either).

The basic usage is:
$ python virtualenv.py ENV