Reading Joystick with JInput on Linux

Reading Joystick with JInput on Linux
In this blog we try to read JoyStick input with the help of Jinput api. First we need to dwonload the jinput-linux.jar file. Also we need to download the lwjgl-2.9.1.zip i.e. light weight java gaming library. Jinout makes use of lwjgl for recognizing controllers. Now lets check the code from which we will recognize our ...

Dealing With Multiple Data Sources in EJB3 2

There are some situations in which we need to take a connection from other data sources different from that which our EJB is using.  like: Check is the method defined in an EJB, so it is in transactional scope and in this we are trying to get a connection from another data source. Now this ...

Implementing hash function and using it into Own implemented HashMap

First what is a hash function? A hash function is a function which maps keys to indices of an array. So if k is the key and we have an array of size 10, then h(k) will be some integer value ranging between 0 to 9. So this means the hash function h maps the ...

Circular Queue implementation in Java using array. 3

Queue is an abstract data type which support below operation. new() – > for making new Queue. enqueue() – > insert element at rear. dequeue() – > remove an element from front. Supporting methods will be : size() isEmpty() isFull() Let’s start implementation of Queue via circular array. Below is the circular array: In queue ...

Making a cluster with Infinispan and JGroups 5

Recently i did a POC on infinispan and JGroups and submitted this POC in my company. I think it is worth to share on blog. First a little about infinispan. Infinispan is an open source data grid platform. It exposes a JSR-107 compatible Cache interface (which in turn extends java.util.Map) in which you can store ...