09 July 2018

Klondike Returns

Since 90s from college I read the old article of Martin Gardner from Scientific American.
This problem probably has been one of the most famous I have seen through the years, it appears with its own frequency.

With the original problem there are hundreds of solutions, some of them are

1. W W W E SW E NW SW NE NE NE SW SW SW NW
2. NW SE W SE SE W NW SW NE NE NE SW SW SW NW
3. N W E SW S E NW SW NE NE NE SW SW SW SE
4. NE W S SW S E NW SW NE NE NE SW SW SW SE
5. E W S SE S NW NW SW NE NE NE SW SW SW NW
6. SE W NW SE W W NW SW NE NE NE SW SW SW NW
7. S W E SW W NW SW NE NE NE SW SW SW NW



And with the troublesome fixed there are only two solutions:

SW SW NE NE NE SW SW SW NW
SW SW NE NE NE SW SW SW SE



I made Yet Another Search Program for it. where the troublesome 2 from Gardner article is verified, but I found a if we change (besides of the 2 mentioned) number 4 at (x,y) then there will be only one solution.

But there is a new probable modification I found to make the puzzle with an unique solution, which would be

Turing secret number

The secret Turing number: 885205232

As century of Turing ... birth ? there are several events and commemorations...

This was revealed by Professor Knuth in the lecture in UK .... twitter.

https://www-cs-faculty.stanford.edu/~knuth/news12.html


localstrings

WLS & classloading again...

Caused By: java.lang.IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings

Goog Analysis : http://azagozdzinski.wordpress.com/2011/02/15/saaj-problem/

06 July 2018

Eclipse Memory Analyzer

Eclipse MAT new version, and as usual I need to change "eclipse" .ini configuration:

./Contents/Eclipse/MemoryAnalyzer.ini

-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.700.v20180518-1200
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin
-data
/Users/German/tmp/workspace_mat
-vmargs
-Xmx5g
 

-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread


27 June 2018

APM list

Based on Java Awesome, this is a simple list of Open Source APM:



Hadoop EDW 101

  • Framework para trabajar con aplicaciones distribuidas en un ambiente de varios nodos para maneja de gran volumen de data
  • Distribuido con gran tolerancia a la falla, escalable (HDFS)
  • Usa modelo de programación MapReduce (procesamiento de big data, paralelo, distribuido, permite diferentes lenguajes)
  • Bajo costo en los nodos por poder usar “commodity hardware”. Pudiendo guardar información por un periodo mas largo de tiempo con gran almacenamiento
  • Buen rendimiento al evitar uso excesivo de networking
  • Gran almacenamiento de data “cruda”, para ser procesado por Hadoop MapReduce o proyectos afines (Hive, Spark, Sqoop, etc.)
  • Tiene perfil de ETL (sin ser uno con un gran performance), en donde puede tener procesamiento paralelo
  • Convivencia con EDW, a través de Sqoop (xfr bulk data)
  • Se puede ejecutar queries similares con el uso de Apache Hive que es un data-warehouse sobre Hadoop que sirve para hacer queries y análisis. (HiveQL, abstracción de SQL)
  • Puede parsear diferentes tipos de inputs (web logs, IoT, etc.)
  • No es un reemplazo directo de EDW, pero si en ciertas tareas pueden ser reemplazadas, así mejora el rendimiento
  • Se puede explorar la data antes de llegar a EDW.
  • Existe varios proyectos relacionados a Hadoop para diferentes tareas, cuales son open sources o propietarios tal como IBM BigInsights/Hortonworks HDP
  • Genera un Time-to-Value menor
EDW = enterprise data warehouse


21 June 2018

Java Proxy

A pesar que es trivial muchas veves preguntan lo mismo:

http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

//System.getProperties().put("proxySet", "false");
  System.getProperties().put("http.proxyHost", captchaProxy);  // con o sin http. funciona :P
  System.getProperties().put("http.proxyPort", captchaPort);

buscar los diferentes metodos...

mirar mi proyecto web-proxy

http://www.coderanch.com/t/384957/java/java/set-proxy-options-command-prompt

http://stackoverflow.com/questions/3957599/how-to-test-proxy-internet-connection-using-java

Proxy class ?

y otros...

con el FTP tb.

---

Sample code shipped:

public static void main(String[] args) throws ServiceException, RemoteException {
String proxyHost = "proxy.oracle.com";
String proxyPort = "8888";
String proxyUsername = "username";
String proxyPassword = "password";

Proxy p = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, Integer.parseInt(proxyPort)));
HttpTransportInfo info = new HttpTransportInfo();
info.setProxy(p);
info.setProxyUsername(proxyUsername.getBytes());
info.setProxyPassword(proxyPassword.getBytes());

GlobalWeather service = new GlobalWeather_Impl("http://www.webservicex.net/globalweather.asmx?wsdl", info);

GlobalWeatherSoap soap = service.getGlobalWeatherSoap();
System.out.println(soap.getCitiesByCountry("Singapore"));

y otros ???



18 June 2018

Modelio 3.6

Second (maybe third) time I hit a bug about Eclipse RCP impl.

TL;DR :

The screen hangs and nothing it is shown/updated

Solution:

-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin
-vmargs


Note:

-vm before -vmargs

- jdk update 131 (and not 160+)

./Contents/Eclipse/modelio.ini

My Blog List

Blog Archive

Disclaimer

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