Archive for the ‘Informática’ Category

short form or complete form

Monday, October 27th, 2008

Due to some work requirements I needed to install LAMP (Linux Apache Mysql y Php) over Windows (some new headache).

I downloaded, installed and configured the last version of every service without problems ( no comparison with sudo apt-get install mysql-server php5-mysql ).

When I try to test if the configuration is working I write a “phpinfo.php” file with the content:
< ? phpinfo() ? >

But when I open the page http://localhost/phpinfo.php I find that it’s completely empty.

So, I started looking into the log and restarting services/os until I think about changing the test code for:

< ? php phpinfo() ? >

which happened to work properly.

The problem was that one of the configuration options of php.ini, short_open_tag (that states if the short form of the opening tag “< ?” can be used instead of the complete form “< ? php” . Until now, this value was true by default, but it has been changed to false, so that the short tag was not recognized by the php module.

The reason for this is to allow the use of other tags starting with “< ?” like ‘< ?xml’ (in fact it’s still possible to use them by < ? echo ‘< ?xml’; ? >).

The general recommendation is to use always the complete form if it is necessary to have a portable code, because it is quite probable that otherwise, in a future, trying to run the code will not work.

Problems with the server again

Monday, October 27th, 2008

I’m having problems with Dreamhost again, this time is a 503 server error when trying to publish a post.

grep -r fuck linux-source-2.6.24 : /* Am I fucking pedantic or what? */

Sunday, October 19th, 2008

Some months ago I wrote a post, which happened to be quite populated, explaining how to compile the linux kernel in Ubuntu. I forgot then to add another step that is not mandatory but it can be interesting anyways. Just after:

sudo apt-get install linux-source
cd /usr/src
tar xjf linux-source-2.6.xx.tar.bz2
#sustituir xx por la version de tu kernel (que hay que decirlo todo (dios mio))

You have to type:

grep -r fuck linux-source-2.6.xx

And have a nice time with the reading. It can be also interesting to try with other swearing words. Here you have an example of the output:

linux-source-2.6.24/net/ipv4/netfilter/nf_nat_snmp_basic.c: * (And this is the fucking ‘basic’ method).
linux-source-2.6.24/net/netfilter/nf_queue.c:        /* James M doesn’t say fuck enough. */
linux-source-2.6.24/Documentation/DocBook/kernel-locking.tmpl:       If you don’t see why, please stay the fuck away from my code.
linux-source-2.6.24/arch/mips/sgi-ip22/ip22-setup.c:     * fucking with the memory controller because it needs to know the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t even give the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t even give the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t try to access
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t even give the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t even give the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t try to access
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t even give the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t even give the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t try to access
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t even give the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t even give the
linux-source-2.6.24/arch/mips/pci/ops-bridge.c:     * IOC3 is fucked fucked beyond believe …  Don’t try to access
linux-source-2.6.24/arch/mips/kernel/irixioctl.c: * irixioctl.c: A fucking mess…
linux-source-2.6.24/arch/mips/kernel/irixelf.c:#if 0 /* XXX No fucking way dude… */
linux-source-2.6.24/arch/x86/kernel/cpu/cpufreq/powernow-k7.c: * Some Athlon laptops have really fucked PST tables.
linux-source-2.6.24/arch/x86/kernel/cpu/mtrr/generic.c:/*  Some BIOS’s are fucked and don’t set all MTRRs the same!  */
linux-source-2.6.24/arch/sparc/kernel/process.c:    /* fuck me plenty */
linux-source-2.6.24/arch/sparc/kernel/sunos_ioctl.c:    /* Binary compatibility is good American knowhow fuckin’ up. */
linux-source-2.6.24/arch/ppc/syslib/ppc405_pci.c:     * the kernel try to remap our BAR #1 and fuck up bus
linux-source-2.6.24/lib/vsprintf.c: * Wirzenius wrote this portably, Torvalds fucked it up :-)
linux-source-2.6.24/sound/oss/opl3.c:     * What the fuck is going on here?  We leave junk in the beginning
linux-source-2.6.24/include/asm-m68k/sun3ints.h:/* master list of VME vectors — don’t fuck with this */
linux-source-2.6.24/include/linux/netfilter/xt_limit.h:    /* Ugly, ugly fucker. */
linux-source-2.6.24/include/asm-cris/arch-v32/spinlock.h: * writers) in interrupt handlers someone fucked up and we’d dead-lock
linux-source-2.6.24/include/asm-sparc64/system.h:    /* If you fuck with this, update ret_from_syscall code too. */    \
linux-source-2.6.24/drivers/ide/pci/cmd640.c: *  These chips are basically fucked by design, and getting this driver
linux-source-2.6.24/drivers/net/sunhme.c:/* Only Sun can take such nice parts and fuck up the programming interface
linux-source-2.6.24/drivers/net/sunhme.c:        /* This card is _fucking_ hot… */
linux-source-2.6.24/drivers/media/video/bt819.c:                       BUG? Why does turning the chroma comb on fuck up color?
linux-source-2.6.24/drivers/mtd/mtd_blkdevs.c:       registered, to prevent the link/init ordering from fucking
linux-source-2.6.24/drivers/scsi/NCR53C9x.c: * how bad the target and/or ESP fucks things up.
linux-source-2.6.24/drivers/scsi/NCR53C9x.c:        /* Be careful, we could really get fucked during synchronous
linux-source-2.6.24/drivers/scsi/qlogicpti.h:/* Am I fucking pedantic or what? */
linux-source-2.6.24/drivers/watchdog/shwdt.c:     * brain-damage, it’s managed to fuck things up one step further..

Chrome beats Opera

Tuesday, September 23rd, 2008

Chrome was released less than one month ago and it has already past Opera in the number of accesses to this blog.

Brainf*ck Interpreter

Wednesday, June 18th, 2008

Google’s favicon changed for a lowercase g

Sunday, June 1st, 2008

It seems that since a couple of days ago, Google has changed the logo that appears in the address bar (favicon) of the main page
Google's favicon

Conjectures are comming from everywhere and I have already heard many different versions saying that it’s an error, an attack a new Marketing strategy, or even that it’s because of the 5th commandment of Google:

5) Don’t take success for granted

  • Think and act like an underdog
  • Be humble with success; don’t be arrogant
  • Be scrappy and resourceful

Dreamhost is down again

Tuesday, May 27th, 2008

Let’s see how long is going to take this time.

Tireless

Thursday, May 22nd, 2008

On May 19th, 2000, the nuclear submarine HMS Tireless had to stay in Gibraltar in order to be repaired. At that time I was studying at high school, and due to the repercussion of the new I decided to use this subject for my first videogame “Tireless”, a kind of pong, quite simple but funny. I hope I will show it soon.

Visión por computador II

Monday, May 12th, 2008

 It seems I was right, using chrominance was a better way to detect a hand instead of just intensity.

Visión por computador

Sunday, May 11th, 2008

Right now I’m a little bit busy with a small project for computer vision. It’s about a program that recognizes different things through the web cam, things like circles or my hand.

For example, here, the program is successfully recognizing a circle sketched in the blackboard and the rounded shape of the camera objective. However, only some times it recognizes correctly the two small circles.

Circles recognition

And here, the program is bounding the shape of my hand. This is the first version and is not working so smoothly, but I’m sure that it will work better with a color difference than with intensity.

Computer vision