Daniel Guerrero Thoughts

Wednesday, June 29, 2005

On the road


On the road
Originally uploaded by danguer.
another deviation: [link]

Tuesday, June 28, 2005

Oh blogger, blogger =P
I have just found that you can upload your images directly to blogger; I supposed it when a friend send me a lot of 'funny' pics and have the http://photos1.blogger.com and the dude of the blog wasn't associate with blogger/google =).

Browsing: (maybe due this a google query) I found this book: The Practice of Programming, from Kernighan and Pike. It's a small, and easily book to learn some basics about coding =).

Last night I was having troubles with implementing a Trie Tree (and I don't know why I always remember as Triec =S) in Java, I have to relax a little, I found a trouble with the suffix (really needs a '$' character to indicate the end of the tree, otherwise bug and buggy will rely over the same leaf ... and buggy will 'eat' to bug =D).

Sonny will come this weekend!!!

Damn I'm addict to pop-tarts =S

Listening: You are beautiful - James Blunt

Horizon


Horizon
Originally uploaded by danguer.
Deviation: [link]

Monday, June 27, 2005

Joyness


Hapinness
Originally uploaded by danguer.
Deviation: [link]

Wednesday, June 22, 2005

Sunset on the hills 3


Sunset on the hills
Originally uploaded by danguer.
Deviation: [link]

Playing Spin Top IV


Playing Spin Top 2
Originally uploaded by danguer.
Another Deviation [link]

Tuesday, June 21, 2005

Playing Spin Top 5


Playin Spin Top 5
Originally uploaded by danguer.
Another deviation: [link]

Playing Spin Top 3


Playing Spin Top 3
Originally uploaded by danguer.
Another Deviation: [link]

Monday, June 20, 2005

Playing Spin Top


Playing Spin Top
Originally uploaded by danguer.
Another Deviation [link]

Nowhere Sunset


Nowhere Sunset
Originally uploaded by danguer.
New photo in DA

[link]

Thursday, June 16, 2005

Deviantart - Spin Top


Spin Top
Originally uploaded by danguer.
About childhood =)

[link]

Deviantart - Those Days


Those Days
Originally uploaded by danguer.
This photo was taken in march, but edited to colorize to a sepia tone


[link]

Sunday, June 05, 2005

Those days..

Today was the birthday of Ragnarok, it was really funny and we joke and talk for about six hours =S.

I was testing colorize in the gimp and I will release some manipulated images in deviantart.com, the images I have released are:


I also found a new radio station, really cool, except it repeats much of his music =( Virgin Radio UK, yesterday I was listening 'Late Show with Leona' which started about 10 pm... in England, 3 pm in Mexico =P.

Checking my mail I found a Top Coder problem about 'masive numbers', which was really simple, my solution (trying to be more legible than the original answer, which I found later) is:

------
MassiveNumbers.java
------

public class MassiveNumbers
{
public static String getLargest(String numberA, String numberB)
{
String m, n;
double a, b;
double c, d;
double result;

int index_m, index_n;

m = numberA.trim();
n = numberB.trim();

index_m = m.indexOf("^");
index_n = n.indexOf("^");

if (index_m == -1 || index_n == -1)
return null;

try
{
a = (new Double(m.substring(0, index_m))).doubleValue();
c = (new Double(n.substring(0, index_n))).doubleValue();

b = (new Double(m.substring(index_m + 1))).doubleValue();
d = (new Double(n.substring(index_n + 1))).doubleValue();
}
catch(Exception e)
{
return null;
}

result = (d * Math.log(c)) - (b * Math.log(a));

if (result > 0) //c^d > a^b ie n > m
return numberB;
else
return numberA;
}
}



---------
test.java
---------

public class test
{
public static void main(String[] args)
{
String greatest;

if (args.length != 2)
{
System.out.println("Uso: test numeroA numberB");
System.exit(1);
}

greatest = MassiveNumbers.getLargest(args[0], args[1]);

System.out.println("El numero mayor es: " + greatest);
}
}


Listening: R.E.M. - Losing My Religion