08 March 2016

Logging of class loading and unloading.

There are several useful system properties for JVM that are not very popular.

One of those is:

-verbose:class
Or:
-XX:+TraceClassLoading -XX:+TraceClassUnloading

This helps to printout all the jar files that are being used when running classes.

i.e.:
 [Opened /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.Object from /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.io.Serializable from /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.Comparable from /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.CharSequence from /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.String from /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.reflect.AnnotatedElement from /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
[Loaded java.lang.reflect.GenericDeclaration from /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar]
Another approach is to printout in the code itself using ClassLoader (but this is more intrusive).

  ClassLoader cl = ClassLoader.getSystemClassLoader();

  URL[] urls = ((URLClassLoader)cl).getURLs();

  for(URL url: urls){
     System.out.println(">>>"+url.getFile());
  }
 
example:

>>> /Users/German/development/jars/HikariCP-java7-2.4.13.jar
>>> /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/tools.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic_sp.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/oracle_common/modules/net.sf.antcontrib_1.1.0.0_1-0b3/lib/ant-contrib.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/wlserver/modules/features/oracle.wls.common.nodemanager_2.0.0.0.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/oracle_common/modules/com.oracle.cie.config-wls-online_8.1.0.0.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/
>>> /Users/German/Oracle/Middleware/Oracle_Home/wlserver/common/derby/lib/derbynet.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/wlserver/common/derby/lib/derbyclient.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/wlserver/common/derby/lib/derby.jar
>>> /Users/German/Oracle/Middleware/Oracle_Home/wlserver/server/lib/xqrl.jar
>>> /Users/German/bin/wlsdm.v3.1.1/jar/wlsdm_agent.jar
 
Always we can use the powerful lsof -p <pid>

02 March 2016

Sherlock Holmes Quotes

Interesting quotes from Sherlock Holmes:

From movie Mr. Holmes (2015)

I haven't a clue.
One can't solve everything.

 
From book A Scandal in Bohemia
It is a capital mistake to theorize before one has data

01 March 2016

TeX file to PDF

We have two easy ways to achieve this

1. Go to a longer (but safer) path:

tex --> dvi --> ps --> pdf

By using:
tex example.tex
dvips example.dvi
ps2pdf example.ps

(download: https://ctan.mines-albi.fr/web/cweb/cwebmac.tex
if necessary)

2. or using a straightforward tool:

pdftex example.tex


In both scenarios you'll get a PDF file.

Give it a try with several TeX files at Knuth's

(mac users: brew install --cask mactex )

 

29 February 2016

The Scrum Field Guide

I have won a free book from coderanch. After asking a politic question, I am going to receive it.
Interesting book, and even more interesting was the thread I had with the author (Mitch).

UPDATE1 (30.03.2016) I received the book

http://www.coderanch.com/t/662440/Agile/Scrum-Field-Guide-scope

http://www.coderanch.com/t/662632/Agile/Winners-Scrum-Field-Guide

Image from http://ecx.images-amazon.com

 

27 February 2016

Erase una vez...

Mandarinas y naranjas para las monjas de la granja, pan con queso para el diablo leso, esterines y esterones para los diablos orejones...

25 February 2016

Missing Maven dependencies in Eclipse Project

I have faced a couple of times this issue. There is a workaround that sometimes works, however it is not always true.

modify .classpath xml file, adding the following tag:
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
 <attributes>
 <attribute name="maven.pomderived" value="true"/>
 <attribute name="org.eclipse.jst.component.nondependency" value=""/>
 </attributes>
</classpathentry>

Several tips & tricks appear at: http://stackoverflow.com/questions/4262186/missing-maven-dependencies-in-eclipse-project

UPDATE1: another usual mistake is not to have the maven directory structure:

src/main/java

12 January 2016

JDK8: self-closing element not allowed

JDK8 has issues with HTML tags in javadoc :

<br /> and <p />
[ERROR] Exit code: 1 - /Users/devwebcl/development/workspace-java/ehcache-jcache/ehcache-jcache/src/main/java/org/ehcache/jcache/JCacheCachingProvider.java:39: error: self-closing element not allowed

38:  * A JSR107 adapter for EHCache.
39:  * <br />

More details at:

http://stackoverflow.com/questions/26049329/javadoc-in-jdk-8-invalid-self-closing-element-not-allowed


This workaround can be applied to Maven as well (pom.xml):

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <additionalparam>-Xdoclint:none</additionalparam>
              </configuration>
            </plugin>
        </plugins>
           


       


11 January 2016

Biblioteca Knuth

My collection:

Vol 2 2nd edition
 
Vol 4 Combinatorial Algorithms, Part 1
The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1
1st printing, January 2011

This book contains all the first fascicles :

7.1.1 - 7.1.2
Volume 4 Fascicle 0, Introduction to Combinatorial Algorithms and Boolean Functions (2008), xii+216pp. ISBN 0-321-53496-4
7.1.3 - 7.1.4
Volume 4 Fascicle 1, Bitwise Tricks & Techniques; Binary Decision Diagrams (2009), xiii+261pp. ISBN 0-321-58050-8
7.2.1.1 - 7.2.1.2Volume 4 Fascicle 2, Generating All Tuples and Permutations (2005), v+128pp. ISBN 0-201-85393-0
7.2.1.3 - 7.2.1.5
Volume 4 Fascicle 3, Generating All Combinations and Partitions (2005), vi+150pp. ISBN 0-201-85394-9
7.2.1.6 - 7.2.1.7
Volume 4 Fascicle 4, Generating All Trees; History of Combinatorial Generation (2006), vi+120pp. ISBN 0-321-33570-8
 
 
1993
 
 
Selected Papers on Design of Algorithms
2010
 
Selected Papers on Fun and Games
2011 (741 pages)
 
+la version 2012 tiene 742 paginas (ebook)
 
Companion to the Papers of Donald Knuth
2011
 
Surreal Numbers
15th printing. 2003

Números Surreales
Image result for Números Surreales 1979
1979

Concrete Mathematics, 2nd Ed.
Concrete Mathematics: A Foundation for Computer Science
1994

pre-fascMathematical Preliminaries.
7.2.2.Backtrack programming
7.2.2.1.Dancing links


Selected Papers on Discrete Mathematics
2003
 
1992

 

Art of Computer Programming, Volume 4, Fascicle 7, The: Constraint Satisfaction, 1st Edition











 

 

2025


05 January 2016

Celebration of Mind: Selected Papers on Fun and Games: Martin Gardner

Don Knuth's Selected Papers on Fun and Games

From 2014 Celebration of Mind:


Video:
http://www.msri.org/general_events/20854

here the video can be downloaded in mp4 format.


1.
Martin Gardner tribute, a very

"that's just a coincidence"



2.
Dr. Matrix Names
Numerology of Dr. Matrix by Martin Gardner,


- first print: 1968
Matrix, Irving J.

- second print
Matrix, Irving Joshua

666 in Name of Dr. Matrix

https://en.wikipedia.org/wiki/Irving_Joshua_Matrix





Blog Archive

Disclaimer

Qux