Australia = developed country
Malaysia = developing country
When it comes to traffic, Australia is backwards.
Malaysia tries to impove traffic flow (ie traffic jams) by removing obstacles.
Australia tries to do the opposite and increase obstacles to reduce traffic flows, supposedly because Australians cannot drive and cannot be trusted around roads so they have to make sure they drive as slow as possible.
Wednesday, January 5, 2011
dvd store
I joined a new dvd rental store. It has more animes (hentais and non hentais) asian dramas, psp games and the usual. Basically it has the stuff nerdy guys without girlfriends 'require'.
Unfortunately just as I get access to PSP games, my son destroyed the UMD reader on the PSP.
I had a frisky twitch one day and thought about Princess from G Force. When I pulled out the box I got Princess up-skirt! Go anime!
Unfortunately just as I get access to PSP games, my son destroyed the UMD reader on the PSP.
I had a frisky twitch one day and thought about Princess from G Force. When I pulled out the box I got Princess up-skirt! Go anime!
Wednesday, December 22, 2010
love and other drugs
whatever that movie was.
Boring piece of crap.
Good = first 30 minutes and last 10 minutes.
Middle was boring fill'in. I think they should just show the actors take a poop in the toilet, so I can get some sleep.
Boring piece of crap.
Good = first 30 minutes and last 10 minutes.
Middle was boring fill'in. I think they should just show the actors take a poop in the toilet, so I can get some sleep.
memories of bali
korean romantic drama (spolier I give the ending away)
Waste of 20x1 hours of your life. Worth = first episode plus last 10 minutes of last episode.
A tortured yoyo of 4 way love -1. The (-1) is the poor girl that nobody loves. 2 guys chases 1 girl, she goes with the (nice) guy but loves the (rich) scoundrel. The 2 guys gets 'some' from the girl though :)
Then the three dies. The loveless girl wins, although empty handed.
Waste of 20x1 hours of your life. Worth = first episode plus last 10 minutes of last episode.
A tortured yoyo of 4 way love -1. The (-1) is the poor girl that nobody loves. 2 guys chases 1 girl, she goes with the (nice) guy but loves the (rich) scoundrel. The 2 guys gets 'some' from the girl though :)
Then the three dies. The loveless girl wins, although empty handed.
Monday, May 3, 2010
nokia n73 is still a piece of crap
recently got 'memory too low'. after removing my pictures, messages, reducing logs, changed to memory card, still nothing.
phone memory used 44Mb, free a few Kb.
eventually had to *#7370#
phone memory used 44Mb, free a few Kb.
eventually had to *#7370#
tail console output with ajax
I finally worked out how to have ajax tail the output from a server side command/script.
First capture the output of the console/command into a database:
#!/usr/local/bin/perl
use DBI;
use FileHandle;
use IPC::Open2;
$pid = open2(*Reader, *Writer, "tail -f /usr/local/logs/access_log" );
#print Writer "stuff\n";
my $dbh = DBI->connect('dbi:mysql:jpscc:localhost:3306','root','password') or die "Connection Error: $DBI::errstr\n";
while ($got = <Reader>)
{
print $got;
$hdl=$dbh->prepare_cached('INSERT INTO test_t (`line`) VALUES (?)');
$hdl->execute($got);
}
Then the server side cgi-script, in this case I used perl. You can use whatever language you want to achieve the same output. The output is a simple XML output:
#!/usr/bin/env perl
print "Content-type:text/xml\r\n\r\n";
use DBI;
my $dbh = DBI->connect('dbi:mysql:jpscc:localhost:3306','root','password') or die "Connection Error: $DBI::errstr\n";
print <<END;
<?xml version="1.0" encoding="ISO-8859-1"?>
END
$query_string = $ENV{'QUERY_STRING'};
print STDERR "query_string=[$query_string]\n";
my %FORM;
@pairs = split(/&/, $query_string);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
#Converting Hex to English.
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$FORM{$name} = $value;
print STDERR "input $name => $value\n";
}
print "<CATALOG>\n";
$hdl=$dbh->prepare_cached('SELECT * from test_t where (idx>'.$FORM{"id"}.')' );
print STDERR 'SELECT * from test_t where (idx>'.$FORM{"id"}.')' ;
$hdl->execute();
my $first=0;
my $last =0;
@age = $hdl->fetchrow_array();
$a = $age[2];
$first = $age[1];
chomp($a);
print "<ID>".$first."</ID>\n";
print "<ARTIST>".$a."</ARTIST>\n";
if ($hdl->rows > 0)
{
while (@age = $hdl->fetchrow_array())
{
#print "$age[0] $age[1] $age[2]\n";
$a = $age[2];
$last=$age[1];
chomp($a);
chomp($last);
print "<ID>".$last."</ID>\n";
print "<ARTIST>".$a."</ARTIST>\n";
}
print "</CATALOG>\n";
# delete if single use, otherwise create a cron cleanup
$hdl=$dbh->prepare_cached('DELETE from test_t where (idx >= '.$first.' and idx <= '.$last.')');
$hdl->execute();
#$dbh->commit;
}
Finally the client script request the lines based on the last line number it got.
Finally the client side. The client requests each line based on the line number:
#!/usr/bin/env perl
print "Content-type:text/html\r\n\r\n";
print <<END;
<html>
<head>
<script type="text/javascript">
var last_idx=0;
var timer_id=0;
b2.disabled = true;
function pause_page()
{
clearTimeout(timer_id);
b1.disabled = false;
b2.disabled = true;
}
function loadXMLDoc()
{
b1.disabled = true;
b2.disabled = false;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
xmlDoc=xmlhttp.responseXML;
var txt="";
x=xmlDoc.getElementsByTagName("ARTIST");
y1=xmlDoc.getElementsByTagName("ID");
for (i=0;i<x.length;i++)
{
last_idx = y1[i].childNodes[0].nodeValue;
txt=txt + last_idx + " "+ i+" ";
txt=txt + x[i].childNodes[0].nodeValue + " "+ i+"<br />";
//txt=txt + x[i].childNodes[0].nodeValue + "\\n";
}
var x = document.getElementById("myDiv").innerHTML;
x = x + txt;
document.getElementById("myDiv").innerHTML=x;
//document.getElementById("myDiv").innerHTML+=txt;
var objDiv = document.getElementById("myDiv");
objDiv.scrollTop = objDiv.scrollHeight;
}
}
xmlhttp.open("GET","get_lines_5.pl?id="+last_idx+"",true);
xmlhttp.send();
timer_id=setTimeout('loadXMLDoc();',5000) ;
}
</script>
</head>
<body>
<div id="myDiv" style="width: 95%; height: 50%; overflow: auto"><h2>Let AJAX change this text</h2></div>
<button type="button" id="b1" onclick="loadXMLDoc()">Change Content</button>
<button type="button" id="b2" onclick="pause_page()">Pause Content</button>
</body>
</html>
END
First capture the output of the console/command into a database:
#!/usr/local/bin/perl
use DBI;
use FileHandle;
use IPC::Open2;
$pid = open2(*Reader, *Writer, "tail -f /usr/local/logs/access_log" );
#print Writer "stuff\n";
my $dbh = DBI->connect('dbi:mysql:jpscc:localhost:3306','root','password') or die "Connection Error: $DBI::errstr\n";
while ($got = <Reader>)
{
print $got;
$hdl=$dbh->prepare_cached('INSERT INTO test_t (`line`) VALUES (?)');
$hdl->execute($got);
}
Then the server side cgi-script, in this case I used perl. You can use whatever language you want to achieve the same output. The output is a simple XML output:
#!/usr/bin/env perl
print "Content-type:text/xml\r\n\r\n";
use DBI;
my $dbh = DBI->connect('dbi:mysql:jpscc:localhost:3306','root','password') or die "Connection Error: $DBI::errstr\n";
print <<END;
<?xml version="1.0" encoding="ISO-8859-1"?>
END
$query_string = $ENV{'QUERY_STRING'};
print STDERR "query_string=[$query_string]\n";
my %FORM;
@pairs = split(/&/, $query_string);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
#Converting Hex to English.
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$FORM{$name} = $value;
print STDERR "input $name => $value\n";
}
print "<CATALOG>\n";
$hdl=$dbh->prepare_cached('SELECT * from test_t where (idx>'.$FORM{"id"}.')' );
print STDERR 'SELECT * from test_t where (idx>'.$FORM{"id"}.')' ;
$hdl->execute();
my $first=0;
my $last =0;
@age = $hdl->fetchrow_array();
$a = $age[2];
$first = $age[1];
chomp($a);
print "<ID>".$first."</ID>\n";
print "<ARTIST>".$a."</ARTIST>\n";
if ($hdl->rows > 0)
{
while (@age = $hdl->fetchrow_array())
{
#print "$age[0] $age[1] $age[2]\n";
$a = $age[2];
$last=$age[1];
chomp($a);
chomp($last);
print "<ID>".$last."</ID>\n";
print "<ARTIST>".$a."</ARTIST>\n";
}
print "</CATALOG>\n";
# delete if single use, otherwise create a cron cleanup
$hdl=$dbh->prepare_cached('DELETE from test_t where (idx >= '.$first.' and idx <= '.$last.')');
$hdl->execute();
#$dbh->commit;
}
Finally the client script request the lines based on the last line number it got.
Finally the client side. The client requests each line based on the line number:
#!/usr/bin/env perl
print "Content-type:text/html\r\n\r\n";
print <<END;
<html>
<head>
<script type="text/javascript">
var last_idx=0;
var timer_id=0;
b2.disabled = true;
function pause_page()
{
clearTimeout(timer_id);
b1.disabled = false;
b2.disabled = true;
}
function loadXMLDoc()
{
b1.disabled = true;
b2.disabled = false;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
xmlDoc=xmlhttp.responseXML;
var txt="";
x=xmlDoc.getElementsByTagName("ARTIST");
y1=xmlDoc.getElementsByTagName("ID");
for (i=0;i<x.length;i++)
{
last_idx = y1[i].childNodes[0].nodeValue;
txt=txt + last_idx + " "+ i+" ";
txt=txt + x[i].childNodes[0].nodeValue + " "+ i+"<br />";
//txt=txt + x[i].childNodes[0].nodeValue + "\\n";
}
var x = document.getElementById("myDiv").innerHTML;
x = x + txt;
document.getElementById("myDiv").innerHTML=x;
//document.getElementById("myDiv").innerHTML+=txt;
var objDiv = document.getElementById("myDiv");
objDiv.scrollTop = objDiv.scrollHeight;
}
}
xmlhttp.open("GET","get_lines_5.pl?id="+last_idx+"",true);
xmlhttp.send();
timer_id=setTimeout('loadXMLDoc();',5000) ;
}
</script>
</head>
<body>
<div id="myDiv" style="width: 95%; height: 50%; overflow: auto"><h2>Let AJAX change this text</h2></div>
<button type="button" id="b1" onclick="loadXMLDoc()">Change Content</button>
<button type="button" id="b2" onclick="pause_page()">Pause Content</button>
</body>
</html>
END
Thursday, April 22, 2010
lost in arcgis
yes arcgis is a huge package. For the beginner its just overwhelming. Fortunately the tutorial from PASDA helps.
Try to publish a GIS resource on the other hand. Sucks. When you edit a map from ArcMap then save it, the location of the shape data (.shp) is stored in the .mxd file. Thus you have to make sure that same location exists and has the file otherwise a "The database was not found" error will appear in the logs and no layers.
The only way is to recreate the same directory structure as the server ie the default c:\arcgisserver directory and subdirs.
Try to publish a GIS resource on the other hand. Sucks. When you edit a map from ArcMap then save it, the location of the shape data (.shp) is stored in the .mxd file. Thus you have to make sure that same location exists and has the file otherwise a "The database was not found" error will appear in the logs and no layers.
The only way is to recreate the same directory structure as the server ie the default c:\arcgisserver directory and subdirs.
Thursday, April 15, 2010
psp component av connections
I recently managed to try my component av cable on an lcd 32 inch tv. Nice. My 2 year old son then grabbed the PSP from his sister. I knew he was rough and I could see him pulling at the cables. Until I found that it broke. Cheap shite. The connector broke away from the cable!
So I cut the stub to see how the cables were connected to the connecter. There 8 cables within the main cable, red, green, white, blue, brown, yellow, orange and black.
They are connected so:

Sorry but I didn't buzzer the colours to the av connectors. [Remind myself to do this.]
So I cut the stub to see how the cables were connected to the connecter. There 8 cables within the main cable, red, green, white, blue, brown, yellow, orange and black.
They are connected so:

Sorry but I didn't buzzer the colours to the av connectors. [Remind myself to do this.]
Tuesday, March 23, 2010
tiger woods rubbish
just saw the interview, what rubbish. He looks as fake as his smile.
Can't help but remember what one of the mistress had said that he was a sex animal.
Once a womaniser, always a womaniser.
Can't help but remember what one of the mistress had said that he was a sex animal.
Once a womaniser, always a womaniser.
Friday, March 5, 2010
israel gets away with murder ... again
In an all too familiar story Israel gets away with murder (again and again and again). No one gives a damn. Such is the value of Palestinian life. Hate runs deep and societies have long memories, the atrocities of today becomes the excuse of tomorrow. It is seen today and yet no one wants to face it, thanks to the US (protection).
Rest in peace Mabhouh, may god forgive your soul.
Rest in peace Mabhouh, may god forgive your soul.
Monday, February 8, 2010
CEO the new dream job
They say win or lose you still have to pay the lawyer but the CEO is now the new dream job. You don't need to be educated or be in a 'bar council' you just have to be a good 'bullshit artist'.
When the company does well the CEO gets a (proportional) bonus. When the company goes bust, the CEO gets a golden handshake. When the company does not do well they still get a bonus.
Go figure.
I personally think they deserve a golden shower.
Now, where's a vacant CEO job.
When the company does well the CEO gets a (proportional) bonus. When the company goes bust, the CEO gets a golden handshake. When the company does not do well they still get a bonus.
Go figure.
I personally think they deserve a golden shower.
Now, where's a vacant CEO job.
Friday, January 15, 2010
what's worst than smelly shoes, pakistanis trying to catch
Been watching the cricket, was hoping the Pakistanis do well and may get to see some competition. Alas I was very let down.
The Pakistanis CANNOT CATCH THE BALL. They had dropped so many chances it was unbelievable. They could have won. They should go home. So frustrating to see even simple catches dropped. Imagine dropping someone at <10 then they go on to make 200+, waste (like ricky ponting).
I can't bat, bowl, field or catch a ball but I think I would be a star in the Pakistani team.
Bring Imran back at least he could have kicked some butts.
The Pakistanis CANNOT CATCH THE BALL. They had dropped so many chances it was unbelievable. They could have won. They should go home. So frustrating to see even simple catches dropped. Imagine dropping someone at <10 then they go on to make 200+, waste (like ricky ponting).
I can't bat, bowl, field or catch a ball but I think I would be a star in the Pakistani team.
Bring Imran back at least he could have kicked some butts.
Wednesday, January 13, 2010
climate change the new Noah's ark
When Noah built the ark, everybody laughed. They could not believe it. But when it started raining, they demanded to be let in. Selfish and ignorant they were.
Now the case for climate change is the same. The skeptics and greedy only think of their pockets until of course the world will change. Unfortunately there is no ark in this case, the fate of all will be the same.
Now the case for climate change is the same. The skeptics and greedy only think of their pockets until of course the world will change. Unfortunately there is no ark in this case, the fate of all will be the same.
end of actors
just saw avatar 3d. The 3d become so transparent that I didn't even notice it during the movie I also contemplated that it would've looked the same in 2d.
The animation is a testimony as to the advances in computer imagery. The give away has always been clothing. It seems that this has been perfected. AMAZING. Sigourney also looked good, really good, as good as she looked in Aliens. Quite amazing really. This gives rise to one thing, actor resurrection. Funny, she starred in a movie regarding alien resurrection. I predict it will not be long before we see a or a number of dead actors rise from the dead and acting in digital form. Imagine if the part of sigourney was played by Marilyn Monroe. Not impossible.
There is however 2 new technologies that is required. Sounds like an opportunity. Facial emotional transposition ie copy a captured emotion and transfer it onto another 'face'. And extrapolating 3d out of 2d movies ie from movies of Marilyn extrapolate a 3d image.
Actors will be making movies long after they are dead. I think they tried it in terminator 4 with Arnold. Arnold could be making terminators movies forever!
Of course there is the moral hurdle to overcome.
The animation is a testimony as to the advances in computer imagery. The give away has always been clothing. It seems that this has been perfected. AMAZING. Sigourney also looked good, really good, as good as she looked in Aliens. Quite amazing really. This gives rise to one thing, actor resurrection. Funny, she starred in a movie regarding alien resurrection. I predict it will not be long before we see a or a number of dead actors rise from the dead and acting in digital form. Imagine if the part of sigourney was played by Marilyn Monroe. Not impossible.
There is however 2 new technologies that is required. Sounds like an opportunity. Facial emotional transposition ie copy a captured emotion and transfer it onto another 'face'. And extrapolating 3d out of 2d movies ie from movies of Marilyn extrapolate a 3d image.
Actors will be making movies long after they are dead. I think they tried it in terminator 4 with Arnold. Arnold could be making terminators movies forever!
Of course there is the moral hurdle to overcome.
Friday, December 11, 2009
new wave swiss racism
As more examples of european islamophobia, no masjid minarets. The swiss should hold a referendum to outlaw crosses on churches, that would be fair.
Seems Hitler has finally gained a foothold on the swiss. But nothing against muslims are illegal in europe.
Seems Hitler has finally gained a foothold on the swiss. But nothing against muslims are illegal in europe.
enough berak obama and the nobel
Never ending news on this just doesn't stop. Nothing is making me more sick to my stomach, see a murderer get a peace prize. Just goes to show how racist europe has become. What do you get when you kill muslims and invade a country, a nobel prize.
And what is the value of muslims, 0.
And what is the value of muslims, 0.
Tuesday, October 27, 2009
cloverfield is bullshit
just tried to watch this movie. It was crap. The moving camera gives me a headache and the story don't exist. It just follow these assholes and that's it.
Don't waste your time, I paid $2 for it, should have just downloaded it.
Don't waste your time, I paid $2 for it, should have just downloaded it.
Friday, July 31, 2009
winxp sound disappeared
I was trying to install hauppage pvr150mce, a biatch of a device because it may not output sound. I install, uninstal many times, then the sound disappeared.
The solution is here:
http://www.techsupportforum.com/microsoft-support/windows-xp-support/368757-no-sound-drivers-installed-no-conflicts-but-hardware-not-seen-software.html
this was not the site that I used but i think its the same. the part about the swenum.sys was not necessary. Just copy the machine.inf , mod the machine.inf then add new hardware.
I don't know how the hell this guy figured it out but thanks, heaps.
The solution is here:
http://www.techsupportforum.com/microsoft-support/windows-xp-support/368757-no-sound-drivers-installed-no-conflicts-but-hardware-not-seen-software.html
this was not the site that I used but i think its the same. the part about the swenum.sys was not necessary. Just copy the machine.inf , mod the machine.inf then add new hardware.
I don't know how the hell this guy figured it out but thanks, heaps.
trying to buildroot
Boy another pain in the neck. This thing has so many build options, something is bound to go wrong, and it does. I'm still trying to build it after 3-4 days!
It has to download then all the incomplete dependencies/combo. What a nightmare.
to get past vm86:
It has to download then all the incomplete dependencies/combo. What a nightmare.
to get past vm86:
See https://bugs.gentoo.org/show_bug.cgi?id=235789
2008-09-09 Martin von Gagern
--- xorg-server-1.5.0.orig/hw/kdrive/vesa/vm86.h 2008-09-09 17:24:59.000000000 +0200
+++ xorg-server-1.5.0/hw/kdrive/vesa/vm86.h 2008-09-09 18:01:53.000000000 +0200
@@ -67,6 +67,13 @@
#include "os.h"
#endif
+#ifndef IF_MASK
+#define IF_MASK X86_EFLAGS_IF
+#endif
+#ifndef IOPL_MASK
+#define IOPL_MASK X86_EFLAGS_IOPL
+#endif
+
typedef unsigned char U8;
typedef unsigned short U16;
typedef unsigned int U32;
Don't forget to add wchar (or wide char) support at the top level (and if not propergate to uClibc)
there as well. Also large file support is good too.
APE is crap again
I find that the JSF side is a little unreliable on firefox/linux (haven't tried any other combo). Sometimes (50%) it doesn't join the channel. ???
Why, donno.
Maybe I should reverse engineer anyterm. At least it's a better use of my time than this shite.
Why, donno.
Maybe I should reverse engineer anyterm. At least it's a better use of my time than this shite.
Subscribe to:
Posts (Atom)
