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 );
Scenario: you want to convert "2008-08-02 12:45:01" to the unix epoch time:
use Time::Local qw/timegm/; my $dt = "2008-08-02 12:45:01"; my @datetime = split /\-|:|\s/, $dt; $datetime[1]--; # months need decrementing my $epoch_time = timegm(reverse @datetime);
The demise of Scrabulous on Facebook this evening has raised in me the issue of intellectual property rights. In my opinion the debate has centred too much on what the authors deserve, not the purpose of this construct. This is wrong-headed. The debate ought to start with what is the purpose of copy rights, and then move onto how that purpose can be best met.
We agree to copy rights to create resources for the benefit of mankind (or, ourselves) by invention. It is a reward system. It takes time and other resources to create a medicine, a song, a piece of software. Without substantial reward many substantial inventions would not happen. We do not agree to copy rights to reward inventors any more than our employers agree to pay us to make sure we have a good living. Just like our employers pay us to induce us to work, we agree to IP to induce authors to create.
Unlike our employers, we have let the debate on how much reward be centred on what's right. That was how employers operated in the 1970s, and the unions took advantage of that; to our cost. What should determine how much reward we give should be how little we can offer to induce invention.
So back to Scrabulous: Hasbro would have invented and sold Scrabble boards all those years ago if they only had 20 years copy right. Paul McCartney would have been a member of the Beetles and writting his songs if he only had 20 years copy right. Hasbro are making use of the overly generous terms of employment that we give them. McCartney pleaded for longer copy rights for artists, and was taken seriously in some quarters. He's part of the delusion that copy right is about the author. It's not: it's about the us, the consumer, and should be as little as possible to get him, Hasbro, Glaxo, to make us stuff that we like, and as little as possible is certainly less than the current copy right and patent rights give. We need to fine tune these instruments of ours to increase our yield.
