Skip to content

Instantly share code, notes, and snippets.

View uttesh's full-sized avatar
👨‍💻

uttesh uttesh

👨‍💻
View GitHub Profile
@uttesh
uttesh / Album
Created February 16, 2015 11:42
Reading multiple xml documents objects from xml file by using JAXB
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author Rivet Systems
*/
@uttesh
uttesh / RobotSample
Created February 17, 2015 10:46
Screen capture by Java robot class
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
/**
*
@uttesh
uttesh / FindDST
Created February 17, 2015 11:58
Find the given date and timezone is DST or NOT
import java.util.Calendar;
import java.util.Date;
import java.util.SimpleTimeZone;
import java.util.TimeZone;
/**
*
* @author Rivet Systems
*/
public class FindDST {
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>lib</outputDirectory>
import java.util.ArrayList;
import java.util.Arrays;
/**
*
* @author uttesh.blogspot.com
*/
public class HelloLambda {
public static void main(String[] args) {
/**
*
* @author Uttesh Kumar T.H.
*/
import com.sun.pdfview.PDFFile;
import com.sun.pdfview.PDFPage;
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
@uttesh
uttesh / FindSize
Last active February 14, 2018 08:59
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
/**
* @author Uttesh Kumar T.H.
@uttesh
uttesh / JMeterAPISampleTest.java
Created April 14, 2015 17:41
JMeterAPISampleTest class for the jmeter api implementation class
import java.io.File;
import java.io.FileOutputStream;
import org.apache.jmeter.config.Arguments;
import org.apache.jmeter.config.gui.ArgumentsPanel;
import org.apache.jmeter.control.LoopController;
import org.apache.jmeter.control.gui.LoopControlPanel;
import org.apache.jmeter.control.gui.TestPlanGui;
import org.apache.jmeter.engine.StandardJMeterEngine;
import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui;
import org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy;
@uttesh
uttesh / POM.xaml
Last active August 28, 2019 22:50
Maven for generating the web service client stub classes.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.uttesh</groupId>
<artifactId>wsclient</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
@uttesh
uttesh / analyze-code.xml
Created April 28, 2015 12:20
sonar build.xml file
<?xml version="1.0" encoding="UTF-8"?>
<project name="Simple Java Project analyzed with the Sonar Ant Task" default="all" basedir="." xmlns:sonar="antlib:org.sonar.ant">
<!-- ========= Define the main properties of this project ========= -->
<property name="src.dir" value="src" />
<property name="build.dir" value="target" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="extlib.dir" value="ext-lib"/>
<!-- Define the Sonar properties -->