List All Pages
Value Seekers, Stakeholders, business analysts are represented by the Product Owner.
A lot of time, people don't really know what they want until they start talking with other peoples.
Sharing DBA...
Twelve Principles of Agile Software
Comparison between Agile and Waterfall
Agile builds upon the success of other methodologies (Test First Development, Pair Programming, Extreme Programming).
Team...
People collaborate for various purposes:
To build and deliver product
To coordinate and synchronize projects
To develop architectural vision and coordinate designs
Scrum of Scrums are formed for...
There are three primary roles on an agile team: Value Seekers, Builders, and ScrumMasters. The Value Seekers manage the product vision and return-on-investment (ROI). Builders realize the product...
Adding column:
ALTER TABLE vendor ADD COLUMN phone CHAR(20);
ALTER TABLE vendor ADD phone CHAR(20) NOT NULL;
When you add a new column to a table, MySQL places it after all existing columns....
Sending Apache Logs to Syslog
How to start or stop apache using a different configuration file?
/usr/sbin/httpd -k start -f /etc/httpd/conf/httpd.conf
/usr/sbin/httpd -k stop -f...
Having log files aggregated to a single server (or even multiple servers) is important both for marketing (analytic) and for security. However, the reason why I am interested in aggregating log...
Why do my queries need to be covered by indexes, and how do I include them?
If you run a query that filters on multiple entity properties, or orders your entities in a descending order, you will...
Allows you to apply a method of another object in the context of a different object (the calling object).
var result = objectName.methodName.apply(thisArg[, argsArray]);
thisArg determines the...
An array-like object corresponding to the arguments passed to a function. The arguments object is a local variable available within all functions.
You can refer to a function's arguments within the...
Not so long ago, teen Ashley Qualls lived in a one-bedroom apartment with her mom and sister. But with her computer and savvy business sense she made a better life for all of them.
Ashley Qualls...
For the sake of simplicity, we require users to have Gmail account (be authenticated via Google). When we send invitation link to a Gmail user and he click on the link, because he already been...
Gather statistics. Know where the problem is, before you can diagnose. Various tools such as nagios (network monitoring), top, ps, free, and strace give you relevant information on each machine. If...
Replace / with underscore
Replace + with minus
How to unset / undefine environment variable:
unset myvar
Using single quotes disable shell expansion.
The '!' character is the history expansion character, which bash normally replaces with a...
history // display history
!n // repeat command n
!! // enter the last line
savehist // save history
telnet destination_server 25
220 dhost-002-99 dx002.intermedia.net MS ESMTP Service
HELO genius-network.com
250 dhost002-99 dx002.intermedia.net Hello 72.32.38.221
MAIL FROM:...
Beowulf is a multi-computer architecture, used for parallel computation. It is a system which usually consists of one server node, and one or more client nodes. It is a system built using commodity...
Design Patterns: Elements of Reusable Object Oriented Software (Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides )(Gang of Four)
Patterns of Enterprise Application Architecture (Martin...
User-agent: *
Disallow: /_mm/
Disallow: /_notes/
Disallow: /_baks/
Disallow: /MMWIP/
User-agent: googlebot
Disallow: *.csi
http://businesscatalyst.com/
http://www.thebkbakery.com/
http://www.openerp.com/
http://drupal.org/
http://www.ubercart.org/
http://civicrm.org/
Allows you to call (execute) a method of another object in the context of a different object (the calling object).
var result = objectName.methodName.call(thisArg[, arg1[, arg2[,...
Sometimes libraries that you use output error message to your standard error but you have no idea when it happened or how it happened. These two functions (using the fact that Perl allows us the...
Character sets are collection of letters and symbols. Encodings are the internal representations of the members of a character set. Collations are the instructions that dictates how characters are...
...
Original: Classical Inheritance in JavaScript by Douglas Crockford
JavaScript is a class-free, object-oriented language, and as such, it uses prototypal inheritance instead of classical...
Box.net
Huddle
Amazon Web Services / EC2
Google Cloud (Google App Engine, Google Apps)
Hive is a data warehouse infrastructure built on top of Hadoop that provides tools to enable easy data...
Plone
Joomla
Drupal
WebGUI
Proportion
Integrity (being able to do that task that it was designed to do)
Clarity
http://www.softwareverify.com/javascript/coverage/index.html
The Waterfall Methodology
The waterfall model is a sequential software development model, a process for creating software, in which development is seen as flowing steadily downwards (like a...
Releases of PHP newer than 5.0.5 removed pfpro extension, but if you are in the situation where you must get pfpro to work with PHP 5.2.1:
wget http://kdoan.dyndns.org/docs/pfpro-pecl.tar.gz
tar...
Complex table structure changes usually require a manual move process involving these steps:
Create a new table with the new column layout.
Use INSERT SELECT statement to copy data from the old...
Bash
C
C++
C#
CSS
Erlang
Euphoria
Flash
Fortran
Haskell
HTML
Java
JavaScript
Lisp
Lua
Perl (Larry Walls)
PHP
Python
REXX
Ruby
Scala
Scheme
Tcl
http://www.json.org/
Please change this page according to your needs
Continous Integration is a software development practice where members of a team integrate their work frequently, usually at least daily, leading to multiple integration per day. Each integration...
GuessWhere
BuddyPoke
Slap
Defining Indexes at table creation time:
CREATE TABLE HeadOfState
(
ID INT NOT NULL,
LastName CHAR(30) NOT NULL,
FirstName CHAR(30) NOT NULL,
CountryCode CHAR(3) NOT NULL,...
Salesforce.com
Oracle Seibl
Vanillasoft
SugarCRM
Avidian.com
FrontOfficeBox.com
oncontact.com
esalestrack.com
Personal CRM on mobile device ( iphone ):
Follow Up
Contact Hero
Daylite
Ability to...
http://www.unixgeeks.org/security/newbie/unix/cron-1.html
http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/custom-guide/cron-task.html
http://www.thefrontside.net/crosscheck
http://www.w3schools.com/css/css_reference.asp
Online Color Calculator
Effects
Image...
Shorthand for colors
#000 is the same as #000000
#369 is the same as #336699
Margin and Padding properties
margin: 1 ; all 4 margins are the same
margin: 1 2 ; top and bottom...
.className { cursor: cursorType } where cursorType: auto | crosshair | default | pointer | hand | wait | text | help | move | n-resize | ne-resize | nw-resize | e-resize | w-resize | s-resize |...
Let the first letter of the paragraph float to the left. See http://www.w3schools.com/css/tryit.asp?filename=trycss_float4
Let an image float to the right in a paragraph. See...
-d: specifies the delimiter to use
-f: specifies the list of fields
-s: do not print lines not containing delimiters
-c: specifies columns to display (each character is one column)
cat...
1. Do a full backup using dar
2. Do a full backup via system-imager
3. Do a full backup using tar (excluding mount points)
scp /var/lib/mysql
scp /home/frank/dbBackups
ssh...
Back up MBR and partition table:
dd if=/dev/hdx of=/path/to/image count=1 bs=512
Restore MBR and partition table:
dd if=/path/to/image of=/dev/hdx
Restore MBR without partition table:
dd...
You want to make an image of /dev/sda on boxA over the network.
1. Boot boxA using a liveCD
2. On boxB: nc -l 1010 | dd of=file.img // This will now sit and wait for incoming data and write...
XDebug
http://gubed.mccabe.nu/
http://quanta.kdewebdev.org/
Memory Profiler:
Purify
The Third Degree
Valgrind
fuser
sar
ps
top
netstat
hwconfig
lsdev
lspci
pnpdump
dmesg
sum...
telnet www.xyz.com 80
GET /default.aspx?ID=12 HTTP/1.1
Host: www.xyz.com
User-Agent: Mozilla/5.0 Firefox/2.0.0.14
Accept: text/xml, application/xml, application/xhtml+xml,...
MVC
Singleton
Mock
Dojo manual (old)
http://www.mefeedia.com/query.php?q=Dojo%20Toolkit%20Video
Dojo
Dojo sortable table
Dojo
SS12 Presentation: Dojo Toolkit Team
My XDataSystem showing some AJAX functionality using...
By the front door, must have too closets for hanging coats / jackets. One closet is for guess. One closet is for family. Also must have space for giant shoe rack.
Must have a exercise room on the...
DROP TABLE customer;
RENAME TABLE customer to customer2;
RENAME TABLE backup_customer TO customer, backup_vendor TO vendor, backup_products TO product;
1. syntax coloring
2. realtime syntax checking
3. version control integration
4. code-assist editor to provide a list of method when you type in an object reference (for example)
5....
The content of this page has been merged into Frontend Performance Tuning
InnoDB is a transaction-safe engine. It also support row level locking. It does not support full-text search.
MyISAM is a high-performance engine. It supports full-text searching, but does not...
(dst port 80 && dst net != 192.168.10) || (src port 80 && src net ! 192.168.10) || (dst port 30102 && dst net 192.168.10) || (src port 30102 && src net...
Google App Engine
Software Development:
REST
SOAP
XPath
Code Search:
Advance Google Code Search
Google Code Search
QuickRef.org
htmlUnit
Functional/UI Test
Test Concepts
Test Frameworks
Test Case...
Ext.onReady(function() {});
The Element API is fundamental to the entire Ext library.
var myDiv = Ext.get('myId');
The .get() method provides internal caching, so multiple calls to retrieve...
To find files with size greater than 1000k:
find / -size +1000k
To find files that have been modified within 2 days:
find / -mtime 2
To find files with size greater than 1000k and list files...
about:config
http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
Useful Firefox Extensions:
Firebug
XPather - for finding out the XPath expression of an element (for writing selenium...
Even Faster Websites
Cuzillion (web performance tool like YSlow)
Steve Souders: High Performance Web Sites: 14 Rules for Faster Pages
Gopal Venkatesan: Writing Efficient JavaScript
Julien Lecomte:...
MyISAM support full text search. InnoDB does not.
Wildcard and regular expression matching requires that MySQL try and match each and every row in a table, and table indexes are rarely used. As...
UI/Functional Testing on Windows
UI/Functional Testing on X11
In pursuit of code quality: Programmatic testing with Selenium and...
An App Engine application defines its indexes in a configuration file named index.yaml. The development web server automatically adds suggestions to this file as it encounters queries that do not...
A key has several components:
a path describing a parent-child relationship between the entity and another entity
the kind of the entity
and either a name assigned to the entity by the application...
http://code.google.com/appengine/docs/datastore/transactions.html
http://code.google.com/appengine/articles/transaction_isolation.html
Start gdb:
gdb program_name
Set the screen width for gdb:
(gdb) set width 70
Set a breakpoint:
(gdb) break m4_changequote
Using the run command, we start running the program under gdb...
Accessible at http://appengine.google.com/. Sign into App Engine using your Google account. To create a new application, click "Create an Application" button. Follow the instruction to register an...
The Python runtime environment caches imported modules between requests. In addition to imported modules, you can tell App Engine to cache the handler script itself. If the handler script defines a...
http://code.google.com/appengine/docs/configuringanapp.html
An application creates a new entity of a given kind by calling the constructor of the model class:
from google.appengine.ext import db
class Pet(db.Model):
name =...
An application creates a new entity of a given kind by calling the constructor of the model class:
from google.appengine.ext import db
class Pet(db.Model):
name =...
Python code can access environment variables using the os.environ dictionary:
import os
for name in os.environ.keys():
v = os.environ[name]
APPLICATION_ID: The ID of the currently running...
Fulltext search is experimental. Limitations:
There is no ranking.
There is no exact phrase match, substring match, boolean operators, stemming, or other fulltext search features.
Support for stop...
Features:
You can add developers, and they have all admin rights.
Support version control and roll back
500MB storage
200 Million Megacycle CPU per day
10GB bandwidth per day
approximately 5...
Log levels: ("debug", "info", "warning", "error", "critical").
import logging
logging.debug("creating dummy UserPrefs for anonymous user")
logging.error("Hey")
Unlike traditional web hosting environment, Google App Engine does not serve files directly out of your application source directory unless configured to do so. We name our template file...
import os
from google.appengine.ext.webapp import template
import cgi
import wsgiref.handlers
from google.appengine.api import users
from google.appengine.ext import webapp
class...
Create a directory that hold your application (application directory):
mkdir helloworld
Create the handler script:
vim helloworld/helloworld.py
print 'Content-Type: text/plain'
print...
-i # case insensative match
-v # inverted match (print all lines that do not match)
-c # count the number of match for each file
-l # (letter l) print only the name of the file that match
-L #...
This should update the MBR correctly:
root (hd0,0)
setup (hd0)
Booting from the grub prompt:
root (hd0,4)
kernel /boot/vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/sda5 rhgb quiet
initrd...
Do Only What Matters. Break big problem into small manageable chunks. Prioritize. Attack high priority chunks in parallel using multiple teams. Do only tasks that are absolutely needed. Keep in...
If you are allowed to edit pages in this Site, simply click on edit button at the bottom of the page. This will open an editor.
To create a link to a new page, use syntax: [[[new page name]]] or...
Information about the running OS can be found:
uname -a
cat /etc/issue
cat /etc/fedora-release
mkdir -p ~/perl5lib
perl Makefile.PL PREFIX=~/perl5lib
make
make install
export PERL5LIB=$PERL5LIB:~/perl5lib
1. mkdir -p ~/lib/perl
2. perl Makefile.PL LIB=~/lib/perl
3. make install
To...
CSS Sprite Generator / Image Sprite Generator
High Performance Web Sites: Essential Knowledge for Frontend Engineers
YSlow
CSS Sprites from A List A Part
YUI Blog
IE6, CSS Sprites and Alpha...
svnadmin create /usr/local/svn/newrepos
svn import mytree file:/usr/local/svn/newrepos/some/project
svn list file:/usr/local/svn/newrepos/some/project
Note that after the import is finished, the...
If your website is not getting any traffic, focus on that first (unless your web site is really terrible).
Make it easy for your visitors to contact you. Is your phone number visible at the top of...
Install Linux as normal. Some distribution allow you to create a boot floppy, so look for it. If you machine does not have a floppy drive, you maybe able to use your installation CD as rescue disc,...
Install an PECL extension
pecl install perl
Uninstall an PECL extension:
pecl uninstall perl
Correctly install handler (in a loop)
selObj.onchange = function (i) {
return function () {
dynamicOptionListObjects[i].change(this);
};
}(dol.index);
JavaScript does not have...
django
appengine
TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use.
DbUnit DbUnit is a JUnit extension (also usable...
Frontend Performance Tuning / Efficient JavaScript / Best Practices
How to suppress errors:
function blockError(msg,url,line_number)
{
return true;
}
if...
Accessing the document inside an iframe:
frameElement.contentDocument
frameElement.contentWindow
Accessing the parent of an element:
element.parentNode
object.innerHTML = "<iframe...
When a javascript function is called, it enters an execution context. If another function is called (or the same function recursively) a new execution context is created, and execution enters that...
Efficient JavaScript from Dev.Opera
Optimizing JavaScript for Execution Speed by Andrew B King
Optimizing Page Load Time
Five Javascript Compressors Compared
Lazy Function Definition
Efficient...
function makeAdder(a) {
return function(b) {
return a + b;
}
}
x = makeAdder(5);
y = makeAdder(20);
x(6);
y(7);
The name of the makeAdder() function should give it away: it...
Firebug
TamperData
Venkman
http://developer.mozilla.org/en/docs/JavaScript_Shells
http://kodfabrik.com/app/pi.debugger/
Microsoft Script Debugger
Command line shell for JavaScript
MSIE Developer...
event.clientX,
event.clientY,
event.currentTarget,
event.detail,
event.eventPhase,
event.explicitOriginalTarget,...
Avoid:
var name = "some value";
Although the word name is not a reserved word. Browsers (both Firefox 1.5 and Explorer 5) confuse this variable with window.name. The above code was inside a...
New variables in JavaScript are declared using the var keyword:
var xyz;
var xyz = "hello";
If you declare a variable without assigning it any value, its value is undefined.
Adding an empty...
jQuery
Visual jQuery
ExtJS
Prototype
Scriptaculous
Qooxdoo
MooTools
Dojo Toolkit
YUI
Yahoo Developer Network
MochiKit
ByteFx
JSTweener is a javascript library for working with...
http://dojotoolkit.org/docs/compressor_system.html
http://domapi.com/jscruncherpro/
JSMin from http://javascript.crockford.com
Custom Objects:
function Person(first,last) {
this.first = first;
this.last = last;
this.fullName = function() {
return this.first + " " + this.last;
};...
When passing in a primitive type variable like a string or a number, the value is passed in by value. Passing in an object, however, is passed by reference. In this case, any property of that...
Document and build instruction is here. Once you have it compiled, you can use it to do syntax check:
js -C -f filename.js
What does 'this' refer to in the function doSomething()?:
function doSomething() {
this.style.color = '#cc0000';
}
In javascript, 'this' always referer to the owner of the function (the...
1. What can I do with window.external? Which browser support window.external?
2. How can I do type casting in javascript? the call/apply method?
3. This alert will fire event if you have...
...
Ctrl+Z // suspend
Ctrl+D // end of input
Ctrl+S // stop terminal output
Ctrl+Q // start terminal output
jobs // list job number
bg n // run job number n in...
Understanding Relational Tables
Relational tables are designed so information is split into multiple tables, one for each data type. The tables are then related to each other through common values...
Please change this page according to your policy (configure first using Site Manager) and remove this note.
Who can join?
You can write here who can become a member of this site.
Join!
So you...
Select an element:
$('#blah'); // select an element by ID
$('.inactive') // select an element by CSS class
$('a'); // select all anchor tags
$(DOM-Node); //...
http://blogs.byte-force.com/xor/archive/2008/03/26/1731.aspx
http://code.google.com/p/jqunit/
http://thinkpond.org/index.html
Unit tests in JsUnit are called Test Functions.
Test Functions live in an HTML page called Test Page.
A Test Page is any HTML page that include jsUnitCore.js
jsUnitCore.js provides the assertion...
Send signal to a given PID
Send signal to processes matching name. If no signal is specified, SIGTERM is sent.
killall httpd
killall -s 9 httpd
KVM (Keyboard, Video, Mouse) switch is a hardware device that allows a user to control multiple computers from a single keyboard, video monitor and mouse.
Perl's slogan:
There is more than one way to do it. TIMTOWTDI
Easy things should be easy, and hard things should be possible.
And don't tell me there isn't one bit of difference between null and...
Remove every files in current directory:
ls -1 | xargs rm
apropos - find possible manual page entries
ps
find
top - Prints a display of system processes that's continually updated until the user...
Two NIC cards per server machine
At least one server with complete local IP (no valid IP) to act as a log server. Each other server will be running a log client which report to the log server....
CTRL + - // decrease the font
CTRL + SHIFT + + // increase the font
Display only selected PIDs:
top -c -p 1234,5678
Edit /etc/updatedb.conf, and change "DAILY_UPDATE=no" to "DAILY_UPDATE=yes". This enable running updatedb as a nightly cron job.
Manually run updatedb without arguments from command line
Use...
List all files (including hidden files)
ls -a
List almost all files (except . and ..):
ls -A
List files using long listing format:
ls -l
List directory but not its content:
ls -ld
List...
-b // avoid blocking operation
Show files in /mnt that are opened:
lsof /mnt
Show files opened by particular process:
lsof -p 1234,1235,1236
Show listened ports:
lsof -i -nP
lsof...
Determine resources that we be used for LVM. Typically, these are standard partitions but can also be Linux software RAID volumes. In LVM terminology, these resources are called 'physical...
Perl: nntp.perl.org
PHP: news.php.net
Mozilla / Javascript: news.mozilla.org
Flash: forums.macromedia.com
Anything Microsoft (IE, JScript, etc): msnews.microsoft.com
ecnews.netscape.com
Mailing...
To create a copy of a CD and store it as a single file on hard disk:
Download and install ISO Recorder by Alex Feinman. Insert your CD into the CDROM drive. Click on Start -> My Computer. Right...
Search the man page for keyword:
man -k keyword
To obtain a list of users:
USE mysql; SELECT user FROM user;
CREATE USER ben IDENTIFIED BY 'plaintext';
CREATE USER ben IDENTIFIED BY PASSWORD 'hashed';
RENAME USER ben TO bforta;
DROP USER...
GDB
Valgrind
KDbg
jswat
memwatch
YAMD
Can it attach to a running process?
How can I snap the core of the running process without it dumping core?
This is available for download. To be able to use Microsoft Script Debugger, you must launch IE, go to Tools -> Internet Options -> Advance, and uncheck 'Disable Script Debugging (Internet...
Tools
Useful sites
Books
Popular web hosting providers
How to teach a child to read
Cool social apps
Job boards
Video distribution sites
The Project
Internationalization (i18n)
Editors
Memory...
Connecting to a database server using mysql client:
mysql -u username -p -h host_name dbname
Find out what database is the current database:
SELECT DATABASE();
Find out the version of...
j2me
BREW
Symbian
BBOS
iPhone
Android
PalmOS
Blackberry
class sgContactEvent_DispatcherMock extends sgContactEvent_Dispatcher
{
/**
* Clears out all registered observers for all channels. This should ONLY be
* used for testing.
*/...
http://www.coe.tamu.edu/cs/apache/mod_perl/all.html
http://perl.apache.org/docs/1.0/guide/debug.html
http://www.perlmonks.org/?node_id=412121
What are best practices specific to mod_perl?
Research...
To temporarily allow executable scripts in /tmp to do their works:
mount -o remount,exec /tmp
To disable executable scripts in /tmp:
mount -o remount,noexec /tmp
Mounting an image:
mount -o...
Message Passing Interface
Available for download at http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en
Successful use of MVC isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the...
Log and status files
Loading time zone tables
Securing MySQL installation
Upgrading
MySQL Administrator
mysql
mysqladmin
SQL modes
User variables
Prepared statement
Full Text Search
Multi-table...
Client/Server Concepts
General MySQL Architecture
Invoking Client Programs
General Command Option Syntax
Connection Parameter Options
Using Option Files
Selecting a Default Database
Establishing...
Query Analyzer
The Output of DESCRIBE.
An empty Key value indicates that the column in question either isn't indexed or is indexed only as a secondary column in a multiple-column, non-unique index....
ALTER DATABASE mydb CHARACTER SET latin1 COLLATE latin1_swedish_ci
Changing the default character set or collation affects only creation of new tables. It does not affect existing tables. The...
Backups can be made by copying database file directly, or by using programs designed for that purpose: mysqldump, mysqlhotcopy, MySQL Administrator, and InnoDB Hot Backup.
A binary backup is a copy...
MyISAM table-level locking works best if the table is read-intensive (few updates).
Use InnoDB if the table must involve many updates. InnoDB's use of row-level locking and multi-versioning...
You can connect to mysql database from the command line:
mysql -u username -p -h IP -P port
and then issue you queries.
The mysql program is a general purpose client that sends SQL statements to...
MySQL supports three form of comments.
Single-line comment. '#' character begins a comment that extends to the end of the line
Multi-line comments. /* … */
A — (double dash) sequence followed...
CREATE DATABASE [IF NOT EXISTS] mydb CHARACTER SET utf8 COLLATE utf8_danish_ci
The IF NOT EXISTS clause can be useful in applications that needs to ensure that a given database is available,...
CREATE UNIQUE INDEX IDIndex ON HeadOfState (ID);
CREATE INDEX NameIndex ON HeadOfState (LastName, FirstName);
With CREATE INDEX, it's necesary to provide a name for the index. With ALTER TABLE,...
delete from access_log where requestTime <= NOW() - interval 2 day
How to figure out the timezone offset of the server?
select unix_timestamp(utc_timestamp()) - unix_timestamp(now());
SHOW WARNINGS;
SHOW ERRORS;
Messages typically have three components: a MySQL-specific error code, a SQLSTATE error code (defined by standard SQL and ODBC), a text message that describes the...
DELETE FROM customer WHERE id=1005;
TRUNCATE TABLE table_name
The word TABLE in TRUNCATE TABLE is optional. To remove only specific records in a table, TRUNCATE TABLE cannot be used. You must...
Binary Distributions:
On Windows, you can choose from these types of distributions:
An Essentials distribution contains the minimum set of files needed to install MySQL, as well as the...
DROP DATABASE IF EXISTS mydb;
DROP DATABASE does not require the database to be empty. Before dropping the database, MySQL removes any objects that it contains, such as tables, stored routines,...
DROP INDEX index_name ON table_name;
DROP INDEX `PRIMARY` ON table_name;
To drop a PRIMARY KEY with DROP INDEX, refer to the index name (PRIMARY), but use a quoted identifier because this name...
DROP TABLE table_name;
In MySQL, a single DROP TABLE statement can be used to drop multiple tables:
DROP TABLE t1, t2, t3;
DROP TABLE [IF EXISTS] t1;
mysqldump --password --user=root world > world.sql
mysql -u root -p < /home/dev-mg-dump.sql
When you invoke a function, there must be no space between the function name and the opening parenthesis. It is possible to change this default behavior by enabling the IGNORE_SPACE SQL mode to...
The server is multi-threaded. For each client that connects, the server allocates a thread to handle the connection. The server maintains a small cache of thread handlers. If the cache is not full...
LOAD DATA INFILE file_name INTO TABLE table_name IGNORE 1 LINES
SELECT ... INTO OUTFILE
Each client program (mysqldump and mysqlimport) examines its arguments to determine what you want it to...
INSERT INTO customer ( name, address, city, state, country, zip, contact, email ) VALUES
('name', 'address', 'city', 'state', 'country', 'zip', 'contact', 'email'),
('name', 'address', 'city',...
Using a sub-select with an UPDATE statement:
update emailActivity_team ea,
(select activityID, group_concat(contactID) as contactIDs
from emailContactStatus ecs
where ecs.status = 'draft'
group...
The MySQL installation procedure creates a set of time zone tables in the mysql database. On Windows, the tables are part of the preinitialized mysql database. On Unix, the tables are created when...
Locking is a mechanism that prevents problems from occuring with simultaneous data access by multiple clients.
Locks are managed by the server: It places a lock on data on behalf of one client to...
The server creates several status files. Some of these are located in the data directory by default, but not all.
The default PID filename is host_name.pid in the data directory. The name and...
MySQL allows the use of join syntax in UPDATE and DELETE statements to enable updates or deletes that involve multiple tables. Such statements can be used to perform the following...
mysqladmin capabilities:
Ping the server to see whether it's running and accepting connections.
Shut down the server.
Create and drop databases.
Display server configuration and version...
MySQL Administrator is a graphical client designed specifically for administrative operations. The tasks that MySQL Administrator enables you to perform:
Monitor server performance, load, and...
mysqlshow is a command-line front end for a few SHOW statements. When invoked, it examines its arguments to determine what information to display, issues the appropriate SHOW statement, and...
A PRIMARY KEY is a unique-valued index. That is, every key value is required to be different from all others, and every key value must be not NULL.
A UNIQUE index is unique-valued index, like...
mysql> PREPARE my_stmt FROM 'SELECT COUNT(*) FROM CountryLanguage WHERE CountryCode = ?';
mysql> SET @code = 'ESP'; EXECUTE my_stmt USING @code;
mysql> SET @code = 'RUS'; EXECUTE my_stmt...
RENAME TABLE customer to customer2;
RENAME TABLE backup_customer TO customer, backup_vendor TO vendor, backup_products TO product;
RENAME TABLE has an advantage over ALTER TABLE in that it can...
REPLACE is like INSERT except that it deletes old record as necessary when a duplicate unique key value is present in the new record.
With REPLACE, the new record overwrite the old record...
An author has a first name, a last name and an email address.
A publisher has a name, a street address, a city, a state/province, a country, and a Web site.
A book has a title and a publication...
If all clients are local clients, you can disable connections from remote clients by starting the server with —skip-networking option to disable TCP/IP connections. The server must be able to...
If you are inside a shell script you can:
mysql -u username -p -h IP -P port -D mon -e "select ip,environment from machines where environment='production'" -s -s
Many operational characteristics of MySQL server can be configured by setting SQL mode. SQL mode is controlled by means of the sql_mode system variable. To assign a value to this variable, use a...
InnoDB is a transaction-safe engine. It also support row level locking. It does not support full-text search.
MyISAM is a high-performance engine. It supports full-text searching, but does not...
The ARCHIVE storage engine provides an efficient way to store large amount of data when you don't need indexes and need to minimize the amount of disk space used.
ARCHIVE supports only SELECT and...
The BDB storage engine provides transactional tables.
Each BDB table is represented on disk by an .frm format file and a .db file that stores data and index information.
BDB supports transactions...
The BLACKHOLE storage engine creates tables that act as "black holes". That is, what goes in does not come out. Data stored in a BLACKHOLE table disappears because the engine simply discards...
The CSV storage engine stores records as text in the well-known comma-separated values format.
The CSV engine does not support indexing.
Each CSV table is represented on disk by a .frm format file,...
The EXAMPLE storage engine does nothing except creates tables. You can't even store any rows. The purpose of this engine is to provide simple example code that demonstrates how to get started...
The FEDERATED storage engine is new in MySQL 5. It allows a MySQL server to use tables from other MySQL servers and to make them available to its clients as though the tables were its own.
One...
The InnoDB Engine:
Each InnoDB table is represented on disk by an .frm format file in the database directory, as well as data and index storage in the InnoDB tablespace. The InnoDB tablespace is a...
Each MEMORY table is represented on disk by an .frm format file in the database directory. Table data and indexes are stored in memory.
In-memory storage results in very fast performance.
MEMORY...
The MERGE Engine:
A MERGE table is a collection of identically structured MyISAM tables. Each MERGE table is represented on disk by an .frm format file and an .MRG file that lists the names of the...
The MyISAM Engine:
On disk, MySQL represents each MyISAM table using three files: a format file (.frm, definition of table structure), a data file (.MYD, contents of table rows), and an index file...
NDB Cluster (or just NDB) refers to the cluster technology and is thus specific to the storage engine itself.
MySQL Cluster refers to a group of one or more MySQL servers that works as a front-end...
Stored procedures are simply collections of one or more SQL statements saved for future use.
MySQL provides capabilities for defining and executing stored procedures and functions. A client sends...
MySQL allows you to perform several types of maintenance operations:
TABLE CHECK perform an integrity check to make sure that the table's structure and content have no problems. This operation can...
A trigger is a database object that is associated with a table and that is defined to activate (or "trigger") when a particular kind of event occurs for that table. The events for which triggers...
TRUNCATE TABLE table_name;
UPDATE customer SET name='Alex', email='alex@fudd.com' WHERE id=1005;
When the new value equals to existing value, MySQL ignores the assignment.
UPDATE reports a row-affected count to indicate...
You must check the implication and possible difficulties before upgrading.
Check the MySQL Reference Manual:
Always consult the section on upgrading to see whether there are any notes pertaining...
SET @var1 = 'USA';
SET @var2 := 'USA';
SELECT @var3 := 'USA';
SET @var1 = 'USA', @var2 = 'GBR', @var3 = 'CAN';
In context, such as in a SELECT statement (other than SET statements), you must use...
TUN/TAP
TUN and TAP are virtual network kernel drivers. They implement network devices that are entirely supported in software. TAP simulates an Ethernet device and it operates with layer 2 packets...
JavaScript is an optional technology. Your application should not rely on optional technology. However, if you must absolutely have javascript, it may be best to ask the user to enable javascript...
benefits of object oriented...
OLTP (On Line Transaction Processing):
Current data
Short database transactions
Online update/insert/delete
Normalization is promoted
High volume transactions
Transaction recovery is necessary
OLAP...
Yelp.com
http://www.zvents.com/
Facebook Pages
http://www.downtowngrid.com
SocialMedia helps create ads for social-networking...
<?php
class SimpleClass
{
// valid member declarations:
public $var6 = myConstant;
public $var7 = self::classConstant;
public $var8 = array(true, false);
}
?>
The default...
Build a social application once, and have it run on any social network sites.
iGoogle
orkut
Facebook
MySpace
Friendster
Ning
LinkedIn
hi5
Yahoo
To create a self-signed certificate for testing (without encrypting the private key file):
openssl req -new -x509 -nodes -out server.crt -keyout server.key
To encrypt the private key...
Parse::RecDescent
Almost all parser generators belong to one of two families-top-down or bottom-up-whose names describe how they go about comparing text to grammar.
Bottom-up parser — better...
To log into host A from host B via SSH without a password:
On host B:
ssh-keygen (hit enter to accept default, and do not specify a pass-phrase. This create /home/tunnel/.ssh/id_rsa and...
Premature optimization is the root of all evil.
Frontend
Backend
Faster processors won’t improve performance all that much; most Web servers spend up to 90% of their time waiting on disk I/O. As soon as you start swapping, performance will just die. Faster...
If you have multiple servers, the first place to put your RAM is in the database server. If you can afford it, get enough RAM to get fit your entire database into memory. This shouldn’t be too...
One-liners
Basics
Variables
Optimization
Design Pattern
perlcheat
Log::Log4perl
GetOpt
How to install a module into a custom location
perlUnit, Test::Unit,...
h2xs -X -n MG::Proxy
use stricts;
@MG::Proxy::ISA = ("MG::Utils");
sub new {
my $this = shift;
my $class = ref($this) || $this;
my $self = $class->SUPER::new();
bless...
#!/usr/bin/perl -w
# Using tail -f to monitor log file while you are debugging is not quite efficient.
# For example, PuTTY can only scrollback certain number of lines, and when there is
# more...
Perl comes with its own debugger:
perl -D test.pl
valgrind --leak-check=yes --trace-children=yes perl whatever.pl
Debugging and Profiling mod_perl Applications
DTrace and Perl (DTrace...
Private Method
Static Variables
Static Methods
Value Object
Proxy...
package Something;
my $varname;
sub new {
my $type = shift;
my $self = {};
bless $self, type;
}
Note the file scoped my variable.
Using gethostbyname to obtain IP address:
use Socket qw(inet_ntoa);
$name = 'www.example.com';
my ($name,$aliases,$addrtype,$length,@addrs) = gethostbyname($name);
$ip = inet_ntoa($addrs[0]);
Getopt::Long supports boolean switches, incremental switches, options with single value, options with multiple values, and even options with hash values.
name // Presence of --name will...
Perl garbage collector frees programmer from memory management … until the programmer creates circular references
Perl's garbage collector counts references. When the count reaches zero (which...
Log Levels: error, warn, info, debug, trace
As listed, the severity decreases from left to right, and verbosity increases. When we talk about increasing the log level, we mean to crank up the...
Makes Easy Things Easy & Hard Things Possible
There Is More Than One Way To Do It (TIMTOWDI)
To use a module from command line:
perl -MLWP::Simple -e 'print head "http://www.example.com"'
The -M switch is the same as 'use module'. If the module has default import that you don't want...
How can I make my perl program run faster?
Benchmark and profile to make sure that you are optimizing the right part.
Look for better algorithm instead of microtuning your code, and when all else...
http://svn.pugscode.org/pugs/docs/01Overview.html
Insert a forward slash every 2 characters
$str =~ s/([^\/]{2})/$1\//g;
Short Hand Instance Variables
Synopsis
Typing $me->{'foo'} to get to your "foo" instance variable is verbose and unnatural. Factor out the extra syntax for accessing instance variables over...
Take a look at Sys::SigAction
Mason
HTML::Mason
Embperl
Apache::ASP
Template::Toolkit
http://search.cpan.org/~samtregar/HTML-Template-2.8/Template.pm
AxKit
$CHILD_ERROR $?
$OS_ERROR $!
$EXTENDED_OS_ERROR $^E
$EVAL_ERROR $@
** Global symbols, my(), and local()**
There is one symbol table for each package (which is why global symbols are really...
How to be a successful leader, manager or entrepreneur
Fake DNS works for a lot of testing.
Debugging email system (talk SMTP manually)
Debugging HTTP server (talk HTTP manually)
Dealing with bad...
List or send signal to processes based on names and other attributes
List processes called sshd and owned by root:
pgrep -u root sshd
List all processes owned by root or daemon (special...
Design Patterns
OOP
phpunit
try-catch
Socket Programming
Debuggers
phpunit
phpdoc
Install or Uninstall PECL extensions
Compile...
Things mentioned on this page are to be reviewed.
I am not a big fan of PHP. Here are my reasons:
1. What is easy in Perl might not be easy in PHP. For example, in Perl, your script can close...
Testing protected methods using a proxy object:
$proxy = getProxy('sgEmail_Sender');
$result = $proxy->PROTECTED_createTestEmailBody($to, $from, $subject, $emailBody);
Click on Setting -> Configure Protoeditor
Click on Language -> PHP
PHP Command: php
Default debugger: Xdebug
Click on Xdebug tab
Listen on port: 9000
Check the check box "Break on...
WebFaction (does host Rails application)
DreamHost
RailsMachine
http://www.kionic.com
www.awardspace.com
http://www.engineyard.com/ Rails deployment
Tera = 10 ^ 12
Giga = 10 ^ 9
Mega = 10 ^ 6
Kilo = 10 ^ 3
Milli = 10 ^ -3
Micro = 10 ^ -6
Nano = 10 ^ -9
Pico = 10 ^ -12
Femto = 10 ^ -15
1 second = 1000 millisecond
1 second = 1000000...
Class C: 192.168.0.0 - 192.168.255.255 (single class A, or 256 continuous class B blocks) 10.0.0.0/8 (255.0.0.0)
Class B: 172.16.0.0 - 172.31.255.255 (16 continuous class B blocks) 172.16.0.0/12...
sub _do_something {
die("This method is private.") if (caller ne __PACKAGE__);
my $self = shift;
my $arg = shift;
}
1. Laziness
2. Impatience
3. Hubris.
php|architect's Guide to PHP Design Patterns - A Practical Approach to Design Patterns for the PHP 4 and PHP 5 Developers - Jason E. Sweat.
With good testing comes great freedom. At first, that...
Original: Prototypal Inheritance in JavaScript by Douglas Crockford
In a prototypal system, objects inherit from objects. JavaScript, however, lacks an operator that performs that operation....
ps -C /usr/sbin/httpd -o pid,%mem,%cpu,vsz,cmd --sort=vsz
http://www.linuxjournal.com/article/6100
Intrinsic value: what you think a stock is really worth as opposed to the value at which it is being traded in the marketplace.
Although there are many different methods of finding the intrinsic...
Original: Private Members in JavaScript by Douglas Crockford
Public
function Constructor(...) {
this.membername = value;
}
Constructor.prototype.membername = value;
Private
function...
PURGE BINARY LOGS TO 'mysql-bin.010';
PURGE BINARY LOGS BEFORE '2008-04-02 22:46:26';
BINARY and MASTER are synonyms. This statement is safe to run while slaves are replicating. If you have an...
Parallel Virtual Machine
Data Structure - List (Array), Dictionary (Hash)
Flow Control
Doc String
Coding Style
Functional Programming
PEP8 has emerged as the style guide that most projects. it promotes a very readable and eye-pleasing coding style.
Use 4-space indentation, and no tabs.
Wrap lines so that they don’t exceed 79...
List (Array):
a = ['spam', 'eggs', 100, 1234]
a[0:2] = [1, 12] // replace the first 2 items
a[0:2] = [] // remove the first 2 items
a[1:1] = ['bletch', 'xyzzy'] // insert two...
The doc string line should begin with a capital letter and end with a period. If there are more lines in the documentation string, the second line should be blank, visually separating the summary...
The if statement:
if x < 0:
print "Negative"
elif x == 0:
print "Zero"
elif x == 1:
print "Single"
else:
print "More"
The for statement:
It is not safe to modify the sequence...
filter(function, sequence) returns a sequence consisting of those items from the sequence for which function(item) is true. If sequence is a string or tuple, the result will be of the same type;...
When one door closes, another opens; but we often look so long and so regretfully upon the closed door that we do not see the one which has opened for us. Alexander Graham Bell.
To be certain,...
rdate -s time-a.nist.gov
For this to work, the remote windows machine must allow remote desktop connection:
Go to "Control Panel"
Click on "System"
Click on "Remote" tab
Check the "Allow users to connect remotely to this...
These are sites / services that other people recommended.
KickApps Social & Media Applications on Demand.
MediaFire Free File Hosting Made Simple.
BuddyPoke
UI / Site...
arguments.callee allows anonymous functions to refer to themselves, which is necessary for recursive anonymous functions.
A recursive function must be able to refer to itself. Typically, a function...
The old / waterfall way:
A branch is made when a release is cut (or a release candidate is cut). If a critical bug is found, then we fix it in the branch, and merge the change into the trunk.
New...
Selenium / CruiseControl Integration - As a developer or tester, I want CruiseControl to automatically run Selenium test suites for a branch and be able to see the results integrated with phpUnit...
Resources:
Application state and functionality are abstracted into resources. Every resource is uniquely addressable via a global identifier (URI in HTTP). All resources share a uniform interface...
RRDtool stores data; that makes it a back-end tool. The RRDtool command set allows the creation of graphs; that makes it a front-end tool as well.
The size of an RRDtool database is determined at...
rsync -auv --progress --exclude-from=/home/khai/rsyncExclude 192.168.20.22::everything /
Ruby is a dynamic, reflective, general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby supports multiple programming paradigms,...
Linux has 7 different run levels (or operating modes):
0 - System Halted
1 - Single User Mode
2 - Single User Mode with Networking
3 - Multi-User Mode - boot up in text mode
4 - Not yet Defined
5...
Download and extract QEMU from http://www1.interq.or.jp/~t-takeda/qemu/qemu-0.9.1-windows.zip to c:\qemu
Create an image
c:
cd qemu
qemu-img.exe create -f qcow2 myimage.img 20G
Download and...
This procedure was produced in the following environment:
The computer came with Windows pre-installed, without Windows installation CD.
My goal was: whatever I do, I must still be able to boot...
#!/usr/bin/perl -w
use strict;
use DBI();
my $database = "";
my $hostname = "";
my $port = 3306;
my $user = '';
my $password = '';
my $dsn =...
Copy a file from local machine to remote machine
scp check_version.pl khai@sjc-app-gc2.genops.net:/home/khai/check_version.pl
scp from to
scp -r
A blog with a javascript snippet or java applet that would check with YIM (and other) to see if I am online, and let people that are viewing my blog chat with me, see my profiles. Whatever client I...
To launch screen (if you currently do not have any open session):
screen
To reconnect to existing session:
screen -r
To detach from current session:
CTRL+a d
CTRL+a c...
SELECT name FROM products LIMIT num_rows_return;
SELECT name FROM products LIMIT start_row, num_rows_return;
SELECT name FROM products WHERE price BETWEEN 5 AND 10;
SELECT name FROM products...
Selenium is a framework to automate functional ( UI ) testing of web application. Selenium is maintained by openqa.org, and I also maintain a separate branch at...
Describe what happens from the time TestRunner.html or TestRunner.hta is fetched to the time the suite finish assuming auto=true.
TestRunner.html and TestRunner.hta has 3 frames (testSuiteFrame,...
Selenium Remote Control provides a Selenium Server, which can automatically start/stop/control any supported browser. It works by using Selenium Core, a pure-HTML+JS library that performs automated...
mysqladmin -u root password 'new password'
mysqladmin -u root -h host.domain.com password 'new password'
SHOW COLUMNS
SHOW COLUMNS FROM City;
SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE 'pattern' | WHERE expr]
SHOW COLUMNS displays information about the columns in a given table. It also...
Linux
Apache
MySQL
Perl
PHP
Python
Java
Javascript
CSS
HTML
Ruby
Syntax Check
Vim
Performance Tuning
Programming Practices
Agile Development
OOP
Design...
Go to http://appengine.google.com
Sign in using your gmail account.
Click on "Create An Application"
To create applications with Google App Engine, you need a verification code. The verification...
class Simple
{
private static $cachedInstance = NULL;
static function getInstance()
{
if (! self :: $cachedInstance)
{
self :: $cachedInstance = new...
Members:
Moderators
Admins
Send a signal to processes that match selection criterias.
skill [signal to send] [options] process selection criteria
-t The next string is a terminal (tty or pty)
-u The next string is a...
smbmount //192.168.10.17/davincibkp /mnt/backup -o username=prog
Renice processes
snice [new priority] [options] process selection criteria
Slow down seti and crack:
snice seti crack +7
SOAP (Simple Object Access Protocol) is a protocol for exchanging XML-based messages over networks, normally using HTTP/HTTPS. SOAP forms the foundation layer of the web services protocol stack...
...
Sample client
#!/usr/bin/perl -w
use strict;
use Socket;
my ($remote,$port, $iaddr, $paddr, $proto, $line);
$remote = 'localhost';
$port = 2345;
$iaddr = inet_aton($remote) || die...
Open a socket, print a message, close one pipe, and read the response.
$socket = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
socket_connect($socket,$host,$port);...
sort -n
source filename
Splits a file into several smaller files. The command has many arguments; see the online documentation.
On your local machine (your laptop), execute:
ssh -L 8080:intranet_webserver:80 -L 110:mailhost:110 username@ssh_server
This opens a ssh connection to the ssh_server, and set up port 8080 on...
Increase Conversions - Ways to Skyrocket Your Online...
Organized by category
Education:
http://www.hotchalk.com
http://www.education.com
Online Publishing:
Lulu.com - social publishing
Scribd.com - social publishing
Social...
To see the various timestamp on a file:
stat filename
What is the difference between modification time and inode change time? When a file is modified, both the modification time and inode change...
Static methods aren't called from an instance of an object, but instead directly from the package name:
my $dbh = DBI->connect($dsn, $login, $pass);
See what a running process is doing:
strace -p 1234 -s 80
strace -f -n trace=network -s 80 -o /home/khai/out -c -p 1234
A subquery is a SELECT statement that is placed within parentheses inside another SQL statement.
Using subqueries in a WHERE clause enable you to write extremely powerful and flexible SQL...
Branching and Tagging
Release Management
Features
FAQs
Global Revision Numbers and Mixed Revisions Working Coy
Importing a directory into subversion
Getting help:
svn help command
Checking out a...
To create a branch from existing branch:
svn copy $REPOS/branches/existingBranch $REPOS/branches/newBranch
To create a branch from the trunk:
svn copy $REPOS/trunk...
When should we use lock-modify-unlock model?
Binary files. The copy-modify-merge model is based on the assumption that files are contextually mergeable: that is, that the majority of the files in...
In Subversion, both files and directories are versioned.
In CVS, you can not replace a versioned file with some new thing of the same name without the new item inheriting the history of the old -...
Subversion's revision numbers apply to entire trees, not individual files. Each revision number selects an entire tree, a particular state of the repository after some committed change. Another way...
Ashley Qualls - Teen Millionaire.
Completes all pending input/output operations (requires root privileges).
perl -c filename.pl
php -l filename.pl
bash -n filename.sh
For javascript, you need to follow instruction from...
SystemImager allows you to retrieve an entire system image from a golden client to an image server.
SystemImager use SystemConfigurator to custom configure autoinstall clients. SystemConfigurator...
tac is the opposite of cat. tac display the file content backward from the end of file.
Give your child a little reward (a feeling of accomplishment) for finishing each page:
Let him put a sticker in the corner.
Let him color the pictures or lesson number at the top of each page.
Let...
top-down or bottom-up learner
Necessity is the mother of invention.
All I Want Is Everything.
Brain-dead mouth-breather.
Doing good while doing well.
All work and no play makes Jack a dull boy.
Good things happen to those who...
Test Categorization is a big term, but what it really means is breaking up your suite of tests into categories (unit tests, component tests, and system tests) so that each category can be run at...
Test Categorization
Model Base Testing
Behavioral Driven Development
Cargo
DbUnit
TestNG
jUnit
function handleError(message, url, line)
{
return true; // browser does not display the standard error message
return false; // browser display the standard error message...
Parrot is a virtual machine designed to efficiently compile and execute bytecode for dynamic languages. Parrot currently hosts a variety of language implementations in various stages of completion,...
What I want to learn
Domain List
TODO
Philoshophies
Amdahl's law
Moore law
Murphy law
The reason for doing this project is to learn various technologies
People learn differently. For me, when I have to learn something new (and relatively long), I have to read the material several...
When people click on "Edit" in "List View", we should change the "Edit" button to "Save" button, and load the editor into the cell that display the question and answer, allowing user to update the...
Work-related tools
lighttpd
nginx
nginx
MogileFS an open source distributed filesystem.
CouchDB is a distributed, fault-tolerant and schema-free document-oriented database.
Puppet automating system...
scrumy.com
A top-down learner prefers to read or skim documentation, getting a large overview of how the system works; only then does she actually start using the software. A bottom-learner is a “learn by...
START TRANSACTION;
SAVEPOINT save1;
ROLLBACK TO save1;
ROLLBACK;
COMMIT;
You cannot roll back CREATE or DROP operations.
After a COMMIT or ROLLBACK statement has been executed, the transaction...
function doSomething() {
throw new Exception('blah');
}
try {
doSomething();
} catch (Exception $e) {
echo $e->getMessage();
}
http://www.microsoft.com/downloads/details.aspx?FamilyID=5e86ec97-40a7-453f-b0ee-6583171b4530&DisplayLang=en
Intelligible / clarity
Convert to MP3 and to video
Sound quality (natural sounding...
If you have a switch statement, place the most common cases at the top.
Use single-quotes instead of double-quotes. With double-quotes, PHP engine has to slow down to check for variable...
The twelve principles
Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.
Welcome changing requirements, even late in development. Agile...
http://lesseverything.com/
http://www.sitepoint.com/
Lazy unmount:
umount -l // the letter
Lazy unmount unmount the mount point from the OS and the filesystem, wait for the resource to be free.
SELECT ... UNION SELECT ... UNION SELECT ...
There are basically 2 scenarios in which you would use combined queries:
To return similarly structured data from different tables in a single...
JsUnit
jsTest
CrossCheck
jqUnit
511.org
Earthquake
Yub shopping
http://www.masterplans.com
http://econnect.entrepreneur.com
YouNoodle a place to discover and support the hottest early-stage companies and university innovation. We...
To add a user to the system with the home directory to be /code/htdocs, and default group is marketing:
useradd -d /code/htdocs -g marketing username
Online Color Calculator
Changing the mouse pointer
Resizable Rounded Corner Sliding DIVS
Prototype Window
Resizing CSS Divs using slider
Overriding Scriptaculous Dragging
Selenium is a framework that makes it easy to run functional / acceptance tests on your web applications.
One advantage of using Selenium programmatically with a framework like TestNG is that it...
You can configure all security and other settings using the Site Manager (/admin:manage). When you invite other people to help build this site, they don't have access to the Site Manager unless you...
valgrind --leak-check=yes myprog arg1 arg2
The concept
If you assign the same object to two different variables and then change one of the variables, the other variable should remain unaffected.
Respect.
Constantly seek out quality in other people.
Honesty and integrity: We are honest with each other, vendors, customers, and honest with ourselves. We acknowledge things as they are, not...
Venkman is a javascript debugger for Mozilla browsers. It is a firefox extension and can be installed Tools -> Add-on.
Way to launch the debugger:
launch firefox, go to Tools -> JavaScript...
YouTube
Vimeo
http://www.brightcove.com/en/
http://www.viddler.com/
A view is a database object that is defined in term of a SELECT statement that retrieve the data you want to produce. Views are virtual tables. Unlike tables that contain data, view simply contain...
http://vim.sourceforge.net/tips/tip.php?tip_id=589
http://vim.sourceforge.net/scripts/script.php?script_id=1908
Wish to know
Delete matching parans without deleting the text in between
highlight...
Move all lines starting with https to the end of file:
:g/^https/m$
Move all lines starting with https to the start of file:
:g/^https/m0
Command Mode:
i // switch to insert mode
a...
http://www.vim.org/scripts/script.php?script_id=1929
http://tech.blog.box.net/2007/06/20/how-to-debug-php-with-vim-and-xdebug-on-linux/
Given that your php.ini contains appropriate...
sudoers allows root to give other users on the system ability to gain root access.
Sample configuration file
# sudoers file
# This file MUST be edited with the 'visudo' command as root.
# Host...
TinyMCE
WYMeditor
Xinha
FCKeditor
ERROR 126 (HY000) at line 1: Incorrect key file for table '/tmp/#sql_129b_0.MYI'; try to repair it
How to figure out which table was corrupted? The error log file was...
According to Wikipedia, the world largest wiki site:
A Wiki ([ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>) is a type of website that allows users to add, remove, or otherwise edit...
Internationalization
Google App Engine
Python
jQuery
CSS (with emphasis on print media)
Google AJAX Libraries API
Mobile access
checkout the code from the repository, make a backup copy, in the directory that you are going to do refactor, feed the code through perltidy, look at the code, move bad docs or anything that...
What We Did Right
Adopt Agile Development. We use Scrum. We brought in an agile coach.
Unit Tests using phpunit and CruiseControl
Functional Tests using Selenium
We installed writable walls (we...
Adopt Agile Development. We use Scrum. We brought in an agile coach.
Unit Tests using phpunit and CruiseControl
Functional Tests using Selenium
We installed writable walls (we never waste much time...
In addition to being able to group data using GROUP BY, MySQL also allows you to filter which groups to include and which groups to exclude. For example, you might want to list all customers who...
Business folks:
Claude Hopkins is a marketing and advertising pioneer.
Technical folks:
Sam Stephenson is the original creator of Prototype javascript library. The list of contributor is available...
Using xcopy to copy files between drives:
xcopy d:\ e:\ /R /F /C /V /E /H
If you see startups on the resume, you know you're dealing with somebody who will work hard. The smaller the company when they joined it, and the larger the company got, the more likely they have...
XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.
The philosophy behind XAMPP is to...
XDebug is a debugger for PHP. It's features:
debug your script interactively
profiling
code coverage analysis
Vim plugin
Protoeditor
Path is a non-XML language used to identify any particular element of an XML / XHTML document.
XPath indicates nodes by position, relative position, type, content, and several other criteria. XSLT...
Principles
Keep Test Logic out of Production Code
Tests should be easy to run.
Tests should be easy to write and maintain.
Tests should be repeatable / consistent.
Terminologies
Patterns
Benefits...
Mock Object How do we implement Behavior Verification for indirect outputs of the SUT? How can we verify logic independently when it depends on indirect inputs from other software components?...
CUT: Class Under Test
OUT: Object Under Test
MUT: Method Under Test
SUT: System Under Test
AUT: Application Under Test
DOC: Depended-on Component
indirect output: also known as "outgoing...
In order to run application on applicationHost and have its displayed on displayHost, on applicationHost:
setenv DISPLAY displayHost:0.0
and on the displayHost you must grant permission for...





