Archives

Evernote API Sandbox Config using Java Scribe

I had some difficulty in the beginning to setup Evernote using the Scribe library as by default the Scribe uses the Public API and not the Sandbox API that Evernote first gives you. You can then register you app with Evernote to get it Publicly available and then swap to the Public API class in […]

Rate this:

Read More

Java Code: Export Salesforce Attachements to Dropbox

I wrote a class the exports Salesforce Attachements to be exported to your local Machine. I put the exported attachement files in a dropbox folder which is automatically the shared with others in the organization. Note: make sure the export directory is shared on Dropbox. package com.thys.michels.sfdc.doc; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.net.URISyntaxException; […]

Rate this:

Read More

Two ways to Check Unique Char using Java

/** * */ package com.thys.michels; import java.util.HashSet; /** * @author tmichels * */ public class Question1_1 { /** * Use a hash map to count the amount of same values and see if all are 1. Using an HashMap */ public static void main(String[] args) { // TODO Auto-generated method stub String[] words = {“abcde”, […]

Rate this:

Read More

Web Services from Stateless Session EJB3 with Websphere Integration Developer

How to create a bottoms-up Websphere with Websphere Integration Developer that is deployed to Websphere Application Server V7. Below is the steps to create an simple Web Service using Websphere Integration Developer: 1. Open up Websphere Integration Developer and create an new EJB Project Step 2: Click on the ‘New’ button to create a new […]

Rate this:

Read More

Java Binary-to-Decimal Converter

import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class BinaryConverter { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub System.out.println(“Please select one of the following options: “); System.out.println(“1. Decimal to Binary: “); System.out.println(“2. Binary to Decimal:”); BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); Integer input = Integer.parseInt(bf.readLine()); System.out.println(“———————————————“); if (input == 1) […]

Rate this:

Read More

Raptor – Java fighter pilot game!

import java.applet.Applet; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Image; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; import java.awt.event.MouseListener; import java.util.Random; import static java.lang.Thread.sleep; public class SetApplet extends Applet implements Runnable { private static final long serialVersionUID = 1L; private boolean shoot; int startX, startY, endX, endY; Color color; Image img; Thread newplane = null; Integer counter = […]

Rate this:

Read More

Developing Web applications with the Java Persistence API and JavaServer Faces

The Java™ Persistence API (JPA) provides an easy mechanism to use with relational databases when you need applications to persist data. Although it is traditionally used with Enterprise Java™Beans (EJBs), JPA works quite well directly with Web applications. This article describes the simplified programming model and tools that IBM® Rational® Application Developer for WebSphere® Software […]

Rate this:

Read More