Mysql: How to drop a Unique Constraint? 
ALTER TABLE `test_table` DROP INDEX `subject`
where test_table is the table name and subject is the column name

[ add comment ]   |  permalink  |   ( 2.8 / 53 )
How to find world writable directories by "find" command? 
find . -type d -perm -a+w -exec ls -lah {} \; > ww.txt

[ add comment ]   |  permalink  |  related link  |   ( 2.9 / 55 )
perl - handling sigint 
Write a small Perl program that waits for 30 seconds and exits with printing “Bye”. If interrupted by any key before 30 second then print “Hello” before exiting.

perl -e "$SIG{INT}= sub {print 'Hello';exit;};for ($i=0;$i<30;$i++){sleep 1;}; print 'bye';"

[ add comment ]   |  permalink  |   ( 2.7 / 44 )
Perl Important links 
Remove repeated characters from a string - http://www.perlmonks.org/?node_id=353072

How to find and remove duplicate elements from an array? - http://www.perlmonks.org/?node_id=90493

perlfaqs - http://perldoc.perl.org/perlfaq4.html

perl references - http://www.sdsc.edu/~moreland/courses/I ... rlref.html

perl tuts - http://perldoc.perl.org/index-tutorials.html

[ add comment ]   |  permalink  |   ( 2.9 / 19 )
Perl - Difference Between my local our 
The variables declared with my() are visible only within the scope of the block which names them. They are not visible outside of this block, not even in routines or blocks that it calls.

local() variables, on the other hand, are visible to routines that are called from the block where they are declared.

Neither is visible after the end (the final closing curly brace) of the block at all.


Whereas our() has Package scope.

[ add comment ]   |  permalink  |  related link  |   ( 3 / 15 )
Windows 7: I want WinXP Style back 
http://www.howtogeek.com/howto/windows- ... -or-vista/

[ add comment ]   |  permalink  |  related link  |   ( 3 / 20 )
Windows7 How to add the Quicklaunch Toolbar 
Right-click on an open area of the taskbar, and choose Toolbars \ New Toolbar from the menu.
You should probably also unlock the taskbar at this point.
paste the following path into the location bar:

%appdata%\Microsoft\Internet Explorer\Quick Launch

The normal Quick Launch that we’re used to doesn’t have text, so right-click on the dotted lines and uncheck “Show Text” as well as “Show Title” from the menu.

[ add comment ]   |  permalink  |  related link  |   ( 3 / 20 )
opensubtitles.org oscar not working - resolved 
http://trac.opensubtitles.org/projects/ ... iki/XMLRPC

change www.opensubtitles.org to api.subtitles.org in OSCAR's Preferences tab

[ add comment ]   |  permalink  |   ( 3 / 42 )
Find Joomla Module Positions 
In Joomla there is a hidden core function which once activated displays a layer on a Joomla website which shows you exactly the template positions currently used.


To activate this function you just need to add ?tp=1 to the end of your current Joomla address. As an example take a look at the following link: http://www.dart-creations.com?tp=1 As you can see, you can know see all the positions which are template makes use of. You can use this on any Joomla version, on any Joomla site and on any Joomla page (though you might need to use &tp=1). The following parameters can be used:
?tp=1 (for horizontal view)
?tp=-1 (for no wrapper niew)
?tp=0 (for normal view - no view of positions)

[ add comment ]   |  permalink  |  related link  |   ( 3 / 45 )
Duplicate a Table using Javascript 
function addLocationRow() {

var nonpTbl = document.getElementById('tblLoc1');
var newRow = nonpTbl.cloneNode(true);
var tds = newRow.getElementsByTagName('td');
var currLen = parseInt(document.getElementById('totalLocs').value);
currLen++;
alert('currlen = ' + currLen);
for (var i=0; i < tds.length; i++) {
var td = tds;
var input = (td.getElementsByTagName('input'))[0];
var currName;
if (input) {
currName = input.name;
var new_name = currName.replace(/AOLF_\d_(.*)/, "AOLF_" + currLen + "_$1");
input.name = new_name;
input.value = "";
}
var sel = (td.getElementsByTagName('select'))[0];
if (sel) {
currName = sel.name;
var new_name = currName.replace(/AOLF_\d_(.*)/, "AOLF_" + currLen + "_$1");
sel.name = new_name;
sel.options[0].selected = true;
}

}
var ntr = document.createElement('tr');
var ntd = document.createElement('td');
ntd.appendChild(newRow);
ntr.appendChild(ntd);
nonpTbl.parentNode.parentNode.appendChild(ntr);
var val = parseInt(document.getElementById('totalLocs').value);
val++;
document.getElementById('totalLocs').value = val;
//alert('val = ' + val + ' - ' + document.getElementById('totalNonPhysician').value);
return false;
}

[ add comment ]   |  permalink  |   ( 2.9 / 43 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next> Last>>