Ajax : A simple and basic example with callback function
The function takes the request url and a function as parameter. The function as parameter is used as call back function whe ajax status is ready.
Feel free to use the code.
function sendRequest(req,fn){ // alert(req); var xmlHttp; try { // Firefox, Opera 8.0+, Safari [...]
PostgreSQL Cheat Sheet
CREATE DATABASE
CREATE DATABASE dbName;
CREATE TABLE (with auto numbering integer id)
CREATE TABLE tableName (id serial PRIMARY KEY,name varchar(50) UNIQUE NOT NULL,dateCreated timestamp DEFAULT current_timestamp);
Add a primary key
ALTER TABLE tableName ADD PRIMARY KEY (id);
Create an INDEX
CREATE UNIQUE INDEX indexName ON tableName (columnNames);
Backup a database (command line)
pg_dump dbName > dbName.sql
Backup all databases (command line)
pg_dumpall > pgbackup.sql
Run a SQL [...]
Apache Cheat Sheet
Apache Cheat Sheet
Setup a Virtual Domain
NameVirtualHost *
DocumentRoot /web/example.com/wwwServerName www.example.comServerAlias example.comCustomLog /web/example.com/logs/access.log combinedErrorLog /web/example.com/logs/error.log
Include another conf file
Include /etc/apache/virtual-hosts/*.conf
Hide apache version info
ServerSignature OffServerTokens Prod
Custom 404 Error message
ErrorDocument 404 /404.html
Create a virtual directory (mod_alias)
Alias /common /web/common
Perminant redirect (mod_alias)
Redirect permanent /old http://example.com/new
Create a cgi-bin
ScriptAlias /cgi-bin/ /web/cgi-bin/
Process .cgi scripts
AddHandler cgi-script .cgi
Add a directory index
DirectoryIndex index.cfm index.cfm
Turn off directory browsing
Options -Indexes
Turn [...]
Ajax : A simple and basic example with callback function
The function takes the request url and a function as parameter. The function as parameter is used as call back function whe ajax status is ready.
Feel free to use the code.
function sendRequest(req,fn){ // alert(req); var xmlHttp; try { // Firefox, Opera 8.0+, Safari [...]
PostgreSQL Cheat Sheet
CREATE DATABASE
CREATE DATABASE dbName;
CREATE TABLE (with auto numbering integer id)
CREATE TABLE tableName (id serial PRIMARY KEY,name varchar(50) UNIQUE NOT NULL,dateCreated timestamp DEFAULT current_timestamp);
Add a primary key
ALTER TABLE tableName ADD PRIMARY KEY (id);
Create an INDEX
CREATE UNIQUE INDEX indexName ON tableName (columnNames);
Backup a database (command line)
pg_dump dbName > dbName.sql
Backup all databases (command line)
pg_dumpall > pgbackup.sql
Run a SQL [...]
Apache Cheat Sheet
Apache Cheat Sheet
Setup a Virtual Domain
NameVirtualHost *DocumentRoot /web/example.com/wwwServerName www.example.comServerAlias example.comCustomLog /web/example.com/logs/access.log combinedErrorLog /web/example.com/logs/error.log
Include another conf file
Include /etc/apache/virtual-hosts/*.conf
Hide apache version info
ServerSignature OffServerTokens Prod
Custom 404 Error message
ErrorDocument 404 /404.html
Create a virtual directory (mod_alias)
Alias /common /web/common
Perminant redirect (mod_alias)
Redirect permanent /old http://example.com/new
Create a cgi-bin
ScriptAlias /cgi-bin/ /web/cgi-bin/
Process .cgi scripts
AddHandler cgi-script .cgi
Add a directory index
DirectoryIndex index.cfm index.cfm
Turn off directory browsing
Options -Indexes
Turn [...]
A typical source file header
//—————————————————————–/**
Author : Shaikh Sonny Aman eMail : mailtoaman@gmail.com Date : 14 AUG 2007 License [...]
Use versioning… an easy solution — TortoiseCVS.
Perhaps, most of us have been fallen under situation when we wished if we could get a earlier version of our work!Hence rises the importance of versioning and using some versioning tools like SourceSafe, Source Off Site and of course the CVS.
Most probably, CVS is the most widely used version controlling tool. Though undoubtedly, it [...]
A typical source file header
//—————————————————————–/**
Author : Shaikh Sonny Aman eMail : mailtoaman@gmail.com Date : 14 AUG 2007 License [...]
Use versioning… an easy solution — TortoiseCVS.
Perhaps, most of us have been fallen under situation when we wished if we could get a earlier version of our work!Hence rises the importance of versioning and using some versioning tools like SourceSafe, Source Off Site and of course the CVS.
Most probably, CVS is the most widely used version controlling tool. Though undoubtedly, it [...]