Turning off doclint within gradles javadoc task

With JDK 8, you are unable to get Javadoc unless your tool meets the standards of doclint. Some of its rules are: no self-closed HTML tags, such as <br /> or <a id="x" /> no unclosed HTML tags, such as <ul> without matching </ul> no invalid HTML end tags, such as </br> no invalid HTML…

Read More

Selenium Example which takes screenshot as well the source code

  Below is a piece of code which 1. navigates thru some craigslist pages 2. Takes a image screenshot and save it to a file 3. Saves the source code into a file 4. Pauses briefly for user to review the page   import org.openqa.selenium.By; import org.openqa.selenium.OutputType; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.ExpectedCondition;…

Read More

Geb simple browser example

This is how to work with a chrombrowser instance:    package org.ragin.test import spock.lang.* import geb.Browser import org.openqa.selenium.chrome.* import org.openqa.selenium.firefox.FirefoxDriver class GebSpec extends spock.lang.Specification { // run before the first feature method def setupSpec() { println "These are browser tests" System.setProperty("webdriver.chrome.driver", "E:\\Dev\\chromedriver\\chromedriver.exe"); } // run after the last feature method def cleanupSpec() { } //…

Read More

MapDB example

Simple MapDB example program   package org.ragin.mapdb; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import org.mapdb.*; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; import java.util.concurrent.ConcurrentMap; /** * Hello world! * */ public class MapDBInformant {     public static final String MAPDBINFORMANT = "MapDBInformant";     public static final String CFG_LOG4J_PROPERTIES…

Read More

The Node Beginner Book

  Great book for node.js newcomers. Minor bugs in the example sources, find working examples attached. Source Code for the Node Beginner Book from M. Kiessling 

Read More

Log4J Logging with categories

Procedure Create the following directories: c:\demo c:\demo\com c:\demo\com\mobilefish c:\demo\com\mobilefish\bean Create the file c:\demo\com\mobilefish\bean\Message.java. package com.mobilefish.bean; import org.apache.log4j.Logger; public class Message { Logger log = Logger.getLogger("com.mobilefish.bean.Message"); private String msg; public void setMessage(String msg) { this.msg = msg; log.debug("This is my debug message."); log.info("This is my info message."); log.warn("This is my warn message."); log.error("This is my error…

Read More

JSDoc Intro

1. Quick start For the steps described below, you need to have Java installed. JSDoc includes the shell script jsrun.sh that requires Unix (including OS X and Linux) to run. But it should be easy to translate that script to a Windows batch file. Download the latest jsdoc_toolkit. Unpack the archive into, say, $HOME/jsdoc-toolkit. Make the script $HOME/jsdoc-toolkit/jsrun.sh executable and tell…

Read More

Create Java Classes from WSDL

Using Axis: echo on set CP=e:\dev\axis\lib\ set CLASSPATH=%CP%axis.jar;%CP%log4j-1.2.8.jar;%CP%commons-logging-1.0.4.jar;%CP%commons-discovery-0.2.jar;%CP%jaxrpc.jar;%CP%wsdl4j-1.5.1.jar echo CLASSPATH is %CLASSPATH% java org.apache.axis.wsdl.WSDL2Java -o ../src/java ISpaix4Pumps.xml REM java org.apache.axis.wsdl.WSDL2Java -o fromURL http://prevservice.wilo-select.com/service/s4pumps.dll/wsdl/ISpaix4Pumps java org.apache.axis.wsdl.WSDL2Java -o ../src/java/copy http://prevservice.wilo-select.com/service/s4pumps.dll/wsdl/ISpaix4Pumps   Using Eclipse: In Eclipse Kepler it is very easy to generate Web Service Client classes,You can achieve this by following steps . RightClick on any Project->Create…

Read More