Recently in geek Category
I've cribbed this sample iptables config from the one at IPTablesRocks - basically restricting the incoming ports down to SSH (port 22) and HTTP (port 80). Be sure to follow their precautions before trying to change your iptables - get it wrong and it could cost you a fair price to get your web hosts to flush your iptables.
Problem: trying to add a new option to a select drop-down menu doesn't display the text in IE7.
Solution:
var thisValue = 12;
var thisText = 'December';
var thisOpt = document.createElement('option');
thisOpt.value = theValue;
thisOpt.appendChild(document.createTextNode(thisText));
$(".months_menu").append(thisOpt);
Scenario: you want to select all records that have a non-unique value in a column. Use a subquery:
SELECT ... FROM ... WHERE ... IN ( SELECT ... FROM ... GROUP BY ... HAVING COUNT(*) > 1 );
So, to give an example, you want to select all rows from the table "books" that have a non-unique title:
SELECT * FROM books WHERE title IN ( SELECT title FROM books GROUP BY books HAVING COUNT(*) > 1 );
