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.
 
* 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 encriptado 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).


16 September 2013

Java Web Services: Up and Running by Scott Berkun; O'Reilly Media


Java Web Services: Up and Running by Scott Berkun; O'Reilly Media
http://shop.oreilly.com/product/0636920029571.do

2nd edition: RESTful context and more:
 
It has been recently released The second edition of Java Web Services: Up & Running, this means full new content (almost a trend in O'reilly Java titles), and not only an update of bugs and reader's comments.

This new edition focuses in the (not new, but fashion) RESTful services. Today, it is clear the current trend is to use less restrictive REST services and lightweight JSON. Keeping most chapters under this context, it get along with examples and info about WADL, Security JSON, etc.

Also, mentions different implementation Jersey, CXF, among others, so it reach a wider crowd for any doubts and details on these implementations. While in the client side has references to JAXB, Amazon, XStream, Axis.

SOAP Handler, using JAX-WS handlers, shows examples in how an incoming/outcoming SOAP message can be handled to implement business logic in the middle of the conversation; very useful for some security constraint inside of a typical workflow.

Last, but not Least, Security, another important tier on WS, it is covered with simple JAAS and SSL (or better said HTTPS), WS-Security.

Interesting is to mention several (perhaps most important) Java Application Servers, because most examples are using Tomcat, however take time and space to describe tips on
Source code, which is available to be downloaded from Git directly.

At the end, similar to the first edition, a not-so deep introduction the current de facto spec for webservices, giving a compass a quick answer about it.

Small and easy to read, not a cookbook, although several examples could be considered recipes.

10 September 2013

WebLogic Server Default Encoding

A good question was asked at JavaRanch, regarding to parameter webapp.encoding.default

In the specification of JSP/Servelts set default to ISO-8859-1

There is a good summary in Japanese WebLogic Server documenttion, that for their context is a concurrent doubt.

http://otndnld.oracle.co.jp/document/products/wls/docs90/en/relnotes_ja.html#1110412

Component Name Default Encoding
Servlet ISO-8859-1
JSP ISO-8859-1
XML format JSP Document UTF-8
Tag File ISO-8859-1
XML format Tag File UTF-8

Since ISO-8859-1 encoding is extensively used as default encoding except for XML components, encoding setting is essential for the use of multibyte characters. The details of settings for each Web component are shown below. The meaning of each column in the table is as follows:
  • Setting Location: Location where encoding is set.
  • Effective Area: Area where the setting is effective.
  • Setting Value: Character string used for setting.
  • J2EE Compliant: YES for J2EE compliant, NO for WebLogic Server proprietary specification.
  • Priority: The priority with which set value is used (the smaller the value, the higher priority). The lower priority will be overwritten by higher priority. In general, the one with smaller effective area will have higher priority, and vice versa.
  • Setting Example: Examples of encoding setting.

29 August 2013

Oracle WebLogic Server Schema home

A not very known, but useful page:

A list of WLS schemas, from 10.3.1 till 12.1.3 :

http://www.oracle.com/webfolder/technetwork/weblogic/index.html

http://xmlns.oracle.com/weblogic/weblogic-ejb-jar
http://xmlns.oracle.com/weblogic/weblogic-web-app

Among others...

Different info can be retrieved from these schema URLs, and check their version progression, i.e.:

weblogic-application.xml

List of schema versions for http://xmlns.oracle.com/weblogic/weblogic-application

1.0 : Released with WLS v10.3.1.0
1.1 : Released with WLS v10.3.3.0
1.2 : Released with WLS v10.3.4.0
1.3 : Released with WLS v10.3.6.0
1.4 : Released with WLS v12.1.1.0
1.5 : Released with WLS v12.1.2.0
1.6 : Released with WLS v12.1.3.0


30 July 2013

Oracle WebLogic Server 12c Advanced Administration Cookbook

The last book of WLS 12.1.1, Packt brings us a 285 pages product, a comfortable size, not very big neither a flyer, so, easy to read and search as a reference, kind of cookbook with high availability and clustering point of view.


First pages are very detailed in how to install and run a vanilla WLS domain (including Node Manager, Machines, etc.). Including WLST and Admin Console. Some aesthetic tips, but not sure if this ha Administrator flavor.

Later comes deployments in different approaches (tools actually:) ). Next Chapter about High Availability and Clustering fine grained; address listen, Broadcasting, Unicast, Multicast, etc.


Then JDBC, again with HA/Clustering thru WLST/Admin Console... here it is more verbose about algorithms, Parameters of Data Sources, Gridlink, Multidatasource, a must for any Admin.


JMS, focused to HA again, using all typical resources of it: Bridges, Persistent Stores, etc.


A good, perhaps more useful , about monitoring, tips & tricks on this which is not very documented, and this time is very admin focused. Then recipes for WLS 12.1.1 troubleshooting for OutOfMemory (a very common scenario).


Finishing with security & SSL, concurrent questions and answer on this topic (X.509 certificates, keystore, etc.)

I can say that has some known areas, but improves in another that many times are left for the user, and it doesn't appear in the official documentation.  




10 May 2013

Eclipse Juno GUI (Theme)

1.
To change to older theme:

General --> Appearance --> Theme: Classic.

2.
Also, I found in this blog that it can be changed at lower level:


plugins\org.eclipse.platform_4.2.0.v201206081400\css

to something like,
plugins\org.eclipse.platform_4.2.0.v201206081400\css.old





Eclipse & Proxy Config

Necessary config when being behind a Firewall/Proxy:

use MANUAL Active-provider under General->Network Connections.

Clean the SOCKS option and only set HTTP & HTTPS with proxy values.


Probably related to bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=281472

10 April 2013

Dudeney's Star Puzzle

Tomado textual de mathpuzzle.com Alex Ravsky encontro una solucion mejor para un puzzle de Dudeney.

Similar como el caso de Klondike de Sam Loyd en los 70s.


The task of the star puzzle, ((X36 = AM329) according to the list [Knu] by Donald E.
Knuth) published a century ago in The Strand Magazine [Dud2], is to construct a path,
consisting of 14 straight strokes, on the following field of stars from one light star to the
other such that all the stars lay on the path.


Paper original puede ser obtenido en http://arxiv.org/abs/1205.0747


Four on a Match

Kadon has many fun puzzles and some contests.

by solving one of them, I received Four on a Match two years ago:


I think it was good time to publish it :P

Combinatorial Explosion

I think the discussion should have more emphasis in the best practice of using this kind of tool; Just like it is mentioned and used in the MatrixGame & TheLuckyString problems, we need to generate certain rules/filters to optimize the search. To look for all n! possibilities probably never will be a feasible solution. This is also called Combinatorial Explosion which verbatim refers to a growth almost impossible to sustain for the time of this type of TC problems.

So more important than the implementation ( which is assumed know -next_permutation()- that this is called Algorithm L in Knuth's TAOCP 4: 7.2.1.2) it is the good use some criteria for pruning combinations (permutations) and at the end we obtain a reasonable running time.

Many problems use this kind of booby-trap to let the programmer to try to solve with a plenty quick solution which runs over all permutations (or combinations) that finish with a timeout or an unnecessary overhead as resources used (such us memory).

01 April 2013

Kadon Contests

Ademas de tener varios productos de muy buena calidad e ingenio ;)
Kadon tiene unos pequennos concursos, interesantes como desafio mental, a ver si se animan:

http://www.gamepuzzles.com/contests.htm

07 March 2013

Oracle Certified Expert, Java EE 6 Web Component Developer

Despues de pasar el ex-SCWCD y ahora OCPWCD es el momento de ver lo nuevo de EE 6 y sobre todo acerca de Servlet 3.0: OCEJWCD

Lo interesante de este examen es que requiere un porcentaje mas bajo para poder pasarlo: 64%

http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=458&get_params=p_track_id:JEE6WCD

23 January 2013

WLS 12c: Distinctive Recipes: Repository of Solutions


A wonderful book with a collection of straightforward information and solutions. Interesting recipes, direct to provide clear solutions and examples.

It explains several topics -traversal to middleware tier including last Cloud technology- that are not 100% covered in the official Oracle documentation.

It gives suggestions of different tools to work with WLS 12c one popular, but another hidden open source gems, such us, NeatBeans, j4psh, Grinder, BadBoy, JMeter, Jolokia, among others.

Supported by webcasts and useful samples for EJB Timer, JSP stress test case, Web Services, that can be downloaded from author's site.

At the end, a great easy to use all-in-one cookbook to save hours of researching in different resources.


15 January 2013

Grandes Números

A medida que la civilizacion avanza se usa numeros mayores, por diferentes motivos.
Uno de ellos es lamentablemente la inflación de ciertos paises por

Un caso historico es Alemania justo antes de la Segunda Guerra Mundial y hoy en dia es Zimbawe:





https://en.wikipedia.org/wiki/File:Zimbabwe_Hyperinflation_2008_notes.jpg





Blog Archive

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.