GIT – Reference

Git Cheat Sheet Creator: Brad Vincent | Original: Git Cheat Sheet via scotch.io Contribute: GitHub Repo | Learn: try.github.io | Read : Pro Git Terminologymore terminology repo A place where the history of your work/code is stored clone Copy a git repository so you can add to it fork (GitHub) Create your own server side…

Read More

Sort JSON Object Array Based On A Key Attribute In JavaScript

var array = [{       "EmployeeName": "John",       "Experience": "12",       "Technology": "SharePoint"   }, {       "EmployeeName": "Charles",       "Experience": "9",       "Technology": "ASP.NET"   }, {       "EmployeeName": "Jo",       "Experience": "3",       "Technology": "JAVA"   }, {       "EmployeeName": "Daine",       "Experience": "7",       "Technology": "Sql Server"   }, {       "EmployeeName": "Zain",       "Experience": "6",       "Technology": "C#"   }];       //Comparer Function   function GetSortOrder(prop) {       return function(a, b) {           if (a[prop] > b[prop]) {               return 1;           } else if (a[prop] 

Read More

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

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

Delete Mac files on windows drives

If you use a Mac and Windows together, you’re likely to end up with a bunch of hidden .DS_STORE files all over your Windows drives. You can easily search and destroy them all using this command: del /s /q /f /a ._*

Read More