Monday, November 24, 2008

Solution Problem 4 Project Euler

I have solved problem 4 of Project Euler. I created a google code hosted project here where you can check out the solutions to the problems I have solved. In particular the solution to problem 4 is here [more]

Thursday, November 6, 2008

Solution to Problem 3 Project Euler

I have solved problem 3 of the Project Euler using java. I created a google code hosted project here where you can check out the solutions to the problems I have solved [...]

Please see the full post here

Tuesday, September 9, 2008

facebook-java-webapp release 0.2

I am doing another release of the facebook java webapp which now includes the following features:

  • Facebook Java API Integration
  • Add users - when the user authorizes your application, they are stored in the database using Hibernate
  • Spring integration
    • Usage of Spring MVC as the web layer
  • Hibernate integration as the ORM tool, includes the managing of the session within a request response lifecycle
  • Maven, including the creation of the Database Schema
  • Extensionless URLs
  • Tiles as part of the View layer of the Spring MVC
  • Json-lib is used for rendering jason objects

You can see an example of what the app does, here

http://apps.new.facebook.com/java-webapp/

Please feel free to ask any questions or if you would like me to add features, I'm adding features as they occur to me or as I need them at work, but feedback would be awesome. I really hope it is of use to somebody.

Monday, August 11, 2008

En maven como instalar las jar de Sun para jmxtools, jmxri, jta y jms

Debido a que Sun prohibe el uso de binarios que sean distribuidos por terceros. Los repositorios de maven no pueden tener sus binarios. Es por eso que nos vemos forzados a tener que instalar los jars manualmente en nuestros repositorios locales.

Por favor de leer el articulo original en ingles aqui. Please see the original post here.

Wednesday, June 18, 2008

¿Que hice esta semana?

En muchas ocasiones al estar tan metido en el trabajo olvido que fue lo que hice en un cierto periodo de tiempo, en esas situaciones agradezco tener activado los logs en mi pidgin, de esa manera solo necesito usar algunos comandos para encontrar mis conversaciones de esos días y así tener una idea de que hice.


larin@xubuntu:~$ cd .gaim/logs/meanwhile/usuario
larin@xubuntu:~/.gaim/logs/meanwhile/usuario$ find . -regex '.*2008-06-\(09\)?\(1[0-3]\).*'
./usuario1/2008-06-10.075502-0500CDT.txt
./usuario2/2008-06-09.075918-0500CDT.txt
./usuario1/2008-06-10.075918-0500CDT.txt
./usuario5/2008-06-13.075918-0500CDT.txt

Básicamente es buscar mediante una expresión regular todos los los de una cierta fecha por en el ejemplo son del 9 de Junio del 2008 al 13 de Junio del 2008.
Se pueden hacer mas cosas, con ese mismo find, por ejemplo:


  • Abrir una tab en vim por cada archivo encontrado:

    find . -regex '.*2008-06-\(09\)?\(1[0-3]\).*' | awk 'BEGIN{files=""}{files=files $0 " "}END{system("vim -p " files)}'



  • Concatenar cada archivo y guardarlos en un archivo de texto:

    find . -regex '.*2008-06-\(09\)?\(1[0-3]\).*' | awk 'BEGIN{files=""}{files=files $0 " "}END{system("cat " files)}' > /home/larin/Desktop/logs.txt