Perl keeps impressing me (negatively) with weird stuff such as implicit context and so on....
but that one is really out of the ordinary...
prompt~/ perl
print "-------\n\n";
my $x = 'hostname1.foo.net';
$x->{'datacenter'} ||= '__';
use Data::Dumper;
print Dumper $x;
print "x".$x->{'datacenter'}."x\n";
my $y = 'hostname1.foo.neT';
print "y".$y->{'datacenter'}."y\n";
my $z = 'hostname1.foo.net';
print "z".$z->{'datacenter'}."z\n";
-------
$VAR1 = 'hostname1.foo.net';
x__x
yy
z__z
prompt~/
first, I thought calling ->{} on a scalar/string would crash. to my surprise, my program passed.
so I wrote this test only to learning something even crazier about perl.
couldn't this be a security issue?
After several server "hick ups" my blog is now back online ! Well, it never got offline, but dreamhost is not so generous on RAM and my blog was asking for more and more, thus I had to move it. I still think dreamhost is a nice place for hosting your stuff but I am sure you know that, at some point, you might need something more dedicated to your business... So my blog is now running on my own server, I also upgraded it to the latest typo (from 4.0.3 to 5.4.1) and it feels good to be able to type here again without fearing crashes....
After several server "hick ups" my blog is now back online ! Well, it never got offline, but dreamhost is not so generous on RAM and my blog was asking for more and more, thus I had to move it. I still think dreamhost is a nice place for hosting your stuff but I am sure you know that, at some point, you might need something more dedicated to your business... So my blog is now running on my own server, I also upgraded it to the latest typo (from 4.0.3 to 5.4.1) and it feels good to be able to type here again without fearing crashes....
I simply fell on that blog post and wanted to reply to the comment asking how to find out which version to copy....
but I could not reply... unfortunately so I am posting it here for my own selfish joy....
Q: Steve Wick said 24 days later:
How do you know what revision number to restore?
A: Mathieu Jobin
a sapient process is required to decide which version. a good guess is the one just before the delete. if the svn removal was committed on -r1235, then -r1234 is the one to restore. in some circumstance you might want an even earlier version. physics laws on file removal and temporal continuum states you might not be able to restore at a later revision due to nonexistence of matter.
Some people perfer InnoDB, other MyISAM. This post ain't about a MySQL-Engine flame war but about letting people choice.
Fact is, the excellent Migration system shipped with rubyonrails and ActiveRecord is defaulting to InnoDB. The doc shows how you can specify the engine on each create_table statement. but then your migration are mysql-only because these engine options will not be supported by sqlite or MSSQL. and I dont want to copy/paste these options to all of my create table. I want to change the default.
unfortunately Rails supply no options for it
fortunately Rails is built on Ruby.
so you can simply overwrite the proper method by adding it to your config/environment.rb
module ActiveRecord
module ConnectionAdapters
class MysqlAdapter < AbstractAdapter
def create_table(table_name, options = {}) #:nodoc:
super(table_name, options.reverse_merge(:options => "ENGINE=MyISAM"))
end
end
end
end
well, I must admit, it rarely pass 150MB in normal circumstance... I just thought it would be fun to push it further up. I could have waited more but I was tired. As funny as it may sound, my 2GB ram WinXP system did not suffer too much from it. Eventually I should try to max up the ram entirely see what would happen.
and a copy paste from a Facebook update from the Green Party of Canada.
Breaking News: Greens are Canada's new third party!
2:58am Wednesday, Nov 14, 2007
Dear Friends,
Today is a historic first for the Green Party of Canada.
Today, for the first time in our 24-year history, we are polling as one of Canada's top three parties in a national survey of voter intentions.
The Green Party is nationally in third place. We can win seats. You can help us do it.
The latest Strategic Counsel survey for the Globe and Mail/CTV News shows that the Green Party with 13% has overtaken both the NDP (12%) and the Bloc Quebecois (11%) for the first time ever. Also, Green support in the west now stands at a strong 18%, ahead of the fourth-place NDP (16%).
We must ask for Canadians' help to ensure that Elizabeth May is in the nationally televised leaders' debates. If Elizabeth is in the debates, there is no doubt in my mind that we will elect Green MPs.
[The Green Party has never won any seats in Canada (federally or provincially), nor has the Green Party been included in any televised debates... yet]
I was at my friends place tonight. and we had sort of a geek night. we both work in <insert computer related fields here> and ... well anyway... we've got some trouble making his inboard sata raid controller working and I ended up on that website relating to a similar problem.
"Via VT8237 Serial ATA BIOS Setting Utility V 2.10
Scan Devices Please Wait!
Press <Tab> key into user window!
(Tab doesn't work BTW)
Hardware Initiate Failed Please Check the Device!!!
The BIOS does not be installed. Press <g> to continue"
the original question of the thread was that pressing TAB when the raid controller was asking us to would simply do nothing. and tonight. my friend figured out that the bios simply had PS2 support disabled. Microsoft Windows (the OS I respect very much hahahaha) is later on adding his own PS2 support so the BIOS did not need to support the keyboard device ... Until you really need it. mouhahaha.
I just found a great application on facebook which display pretty much everything there is to show about my ipod usage.
last played, last added, most played, artists, songs, etc. everything.
unfortunately, because it is a great application and well done, it will hardly become popular. why? because it is so good. There is no ads and it does not let you spread it like a facebook virus.
and its the one application I wish would spread over facebook like a virus.