09 February 2014

Kadon Prize

I got another nice prize from Kadon Games !!!

The place where you can find incredible fun challenging puzzle games.


10 January 2014

Regular Expressions Cookbook: Errata

Nuevo errata encontrado, ahora es uno matemático de una fórmula mal escrita... me imagino que el autor sabia que poner, pero se tuvo que traspapelar la fórmula.

http://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=0636920023630

Footnote 2:

If there are n characters between the double quote and the end of the string, the regex engine will try 2 1/n permutations of ‹ (?:[^"\r\n]+|"")* ›

----

it appears: 2^(1/n)
(this trends to 1, when n grows)

however, it must say 2^(n-1)
when n=4 the number of permutations is 8.
(thus, it has an exponential behaviour).

30 December 2013

The method assumeFalse(String, boolean) is undefined for the type Assume

When trying to compile ant project I got the next error message:

The method assumeFalse(String, boolean) is undefined for the type Assume

Well, this is because I was using junit 4.8.2 and that method's signature is available in 4.11
(maybe an earlier version).

Anyway, the good practice is to download the libraries with fetch.xml.

Regular Expressions Cookbook, 2nd Edition by By Jan Goyvaerts, Steven Levithan


Regular Expressions Cookbook, 2nd Edition
Detailed Solutions in Eight Programming Languages
By Jan Goyvaerts, Steven Levithan
http://shop.oreilly.com/product/0636920023630.do
 


It starts with a good analysis of online and offline regexp tools. Most known applications that can be found in the net, but doing a emphasis to his proprietary tool regexbuddy.

As a classical O’reilly cookbook splits knowledge in contextual sections. Question & Answer, without hesitation, several solution sometimes quick and dirty, but afterward a complete background and more elegant explanation of the consequences of using such approach, providing a better (maybe the best) solution.

The focus of this book is to provide several recipes, direct solution and not an introductory lexical compiler learning book. It gives solutions with many constraint for different flavors of regexp engines, such us, .NET, Java, JavaScript, PCRE, Perl, Python, Ruby.

This cookbook provides a basic introductory chapter, then later chapters becomes more explicit for common programmatic expressions (very wide scope), that most coders would need sometime in their projects, for instance, URLs, Comments, Numbers, Dates (arghhh), XML, CSV, among others.

27 December 2013

Knuth Checks Again ?

It seems that Prof. Knuth is sending again reward checks for typo/errors/solutions for his books.

Surprisingly, I have received one on December 2013.

[PICTURE MISSING with blur parts]

* This time was a simple Spanish acute accent


22 November 2013

Pi within Pi

The string 31415926 occurs at position 50,366,472. This string occurs 3 times in the first 200M digits of Pi.
counting from the first digit after the decimal point. The 3. is not counted.

This reports is obtained from http://www.angio.net/pi/ , in interesting page where you can search Strings inside of Pi.

13 November 2013

Java Network Programming by Elliotte Rusty Harold; O'Reilly Media

Java Network Programming, 4th Edition
Developing Networked Applications
By Elliotte Rusty Harold
http://shop.oreilly.com/product/0636920028420.do

Wisely divided in 13 main parts, reviewing transversely all the network API (and more).
Starting from basic network concepts, including information about NIO, Asynchronous Channels, Socket Options (Java 7), until IP Multicasting. Author mentions that Java Network API is stable since version 1.0 and we shouldn't have any issue after Java 8 is released, anyway as we know, always these future assumptions must be taken carefully about any migration.

Being the 4th edition, it is certainly a proved book, with mature information about the network scope.

Very detailed information on its coding examples, regarding the interfaces, constructors, direct/undirected classes, event handlers, exception handling, and their respective methods.
At the end, explain how this complex API can be used in the expected/correct fashion.

Similar to the new (2nd) edition of Java Web Services book, there is an emphasis on the current de-facto REST standard.

Kind of bible, reference and cookbook of network Java, responding all the most common doubts (and some very peculiar).
for the beginner and advanced developer, well redacted.

Although there are a lot of snippet code in the book, the complete examples can be downloaded from author's website.

10 November 2013

Companion to the Papers of Donald Knuth, Errata

I just bought Companion to the Papers of Donald Knuth and it is a nice book, as usual with many information of high quality of Dr Knuth.

This time I have found simple Spanish cute accent typos, I have received another 0x$1.00 and my simple contribution to these fabulous series book.

My current balance is: 0x$3.40
(Plus the checks)

31 October 2013

Knuth Solved Puzzle

A pesar que yo no lo calcule ;P

Knuth habia puesto un puzzle en su segundo libro (mensaje encrptado con esquema RSA) de tal manera que fuese encontrado cuando ya no viviese (por lo caro del calculo), pero fue encontrado con metodos de


Por lo mismo un nuevo mensaje fue hecho:
http://www-cs-faculty.stanford.edu/~knuth/news12.html
Detalles del equipo NFS@Home project y Greg quienes encontraron el mensaje puede ser encontrado en:
http://escatter11.fullerton.edu/nfs/forum_thread.php?id=374
http://escatter11.fullerton.edu/nfs/forum_thread.php?id=373


The composite cofactor of the RSA public key factored into 91-digit and 97-digit prime numbers. With these factors, we are able to decrypt the RSA-encrypted literary quote. What quote did Donald Knuth hide so well?
91-digit prime factor:
4812118250596034474977589134243684231351843343856605196610181688401638676082217744120094291

97-digit prime factor:
1414213562373095048801688724209698078569671875376948073176679737990732478462107038850387534327641

With these and the previously known 25-digit prime factor, 1144729885849400174143427, we are able to decrypt the RSA-encrypted literary quote. The quote is the following:
His remarks (as reported) were as follows:--

"O Rowty-owty tiddly-owty
Tiddly-owty tiddly-owty
Highty-ighty tiddly-ighty
Tiddly-ighty ow."


--G. K. Chesterton (1905)

This is from The Tremendous Adventures of Major Brown, the first in the collection of short stories The Club of Queer Trades.

Todo un logro !!!!
Felicitaciones al equipo.

25 September 2013

Fibonacci BigInteger

Leyendo los typos del Libro de Java Web Services: Up & Running primera edicion, usa de ejemplo a los números de Fibonacci:
"How many ways can this person traverse, say, a 100 meters? The answer is fib(100): 3,314,859,971." The 100th fibonacci number is 354224848179261915075. The is way over what a JAVA primary int can hold though. BigInteger can be used to calculate this bigger integer however.

Cual es muy usado en la enseñanza de programación de primeros cursos de universidad y también en series aritméticas.

El problema que el autor no calculo el crecimiento explosivo de tal serie y uso Integer de 32bit para el cálculo cometiendo un error en el numero de Fib(100).


My Blog List

Search This Blog

Loading...

Blog Archive

There was an error in this gadget
There was an error in this gadget

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
I review for the O'Reilly Reader Review Program Project Euler