The java neural network Neuroph was making news recently about its integration with Hadoop. Neural networks can solve some interesting problems once they are trained. This article aims to provide the baby steps necessary to writing your first java program that loads a trained neural network.
Before you even begin to read anything that follows, a basic understanding of neural network terminology and the concept behind the same is necessary. The following articles are great starting points to understanding neural networks
Neuroph and neural networks – Part 1
Neuroph and neural networks – Part 2
Neuroph and neural networks – Part 3
Intro to neural networks
Cars and Signals:
We will simulate the scenario where cars wait at a signal and move only when the lights are green. This simple example should help get you started. Our aim is to define a neural network with the easyNeurons swing application; train it; import it into java and use it in an application.
I had the opportunity to work with the ATOM protocol in detail recently. One of the products related to ATOM that I stumbled across is the AtomServer. If you dont already know it, ATOM is accompanied by a publishing protocol. Its called ATOMPub in short. Unlike RSS this protocol allows you to perform CRUD operations on the entries that you define under a feed.
What does that mean ? For example, you could have an entry in a feed which you wish to edit. You can edit / remove this entry using PUT / DELETE HTTP requests to an appropriate URL hosted by a server. So this protocol allows a user to interact with the feed (among other things. The ATOM XML format can be extended).

I was testing an application today and came across a bug. A screen had some CRUD operations on a resource. The problem was, whatever I did, the system would perform the operation and tell me that the resource already existed. This left me scratching my head for quite a while. I add a resource and it says it already exists and then adds it. Delete and update also do the same.
So the debugging process started and I sat down with eclipse to get to the root of the problem. I verified that indeed the CRUD operations were reflecting in the persistence store. Then I came across these magical lines of code
1
2
3
4
| public static final String S_SOMETHING_EXISTS = "something.already.exists";
public static final String S_SOMETHING_ADD_SUCCESS = "something.already.exists";
public static final String S_SOMETHING_DELETE_FAIL = "something.already.exists";
public static final String S_SOMETHING_DELETE_SUCCESS = "something.already.exists"; |
This left me smacking my head. It should have been
1
2
3
4
| public static final String S_SOMETHING_EXISTS = "something.already.exists";
public static final String S_SOMETHING_ADD_SUCCESS = "something.add.success";
public static final String S_SOMETHING_DELETE_FAIL = "something.delete.failed";
public static final String S_SOMETHING_DELETE_SUCCESS = "something.delete.success"; |
One of the things I hear often from someone wanting to try linux and leave windows is that they are afraid that they will no longer be able perform some of the things they used to do. That is so wrong. Be it from the perspective of a developer or a casual user linux offers a wide range of apps to suit your needs. Here is a table of things I used to do in windows that I can still do in linux
| Application |
Windows |
Suse Linux – KDE desktop |
| Chat |
Gtalk, Skype |
Kopete / pidgin for gtalk
Skype is supported |
| Development |
Eclipse / myeclipse / Netbeans |
All of them have linux flavours |
| Screenshot |
Gadwin printscreen |
Ksnapshot |
| Browsing |
Chrome / Firefox / Opera |
They are all supported. Chrome support is getting better |
| SQL Client |
Squirrel SQL |
Supported. Java runs anywhere |

I use remote linux services often and exposing them as local services can be performed securely using SSH. For example you can access a tomcat server or email server hosted at IP 1.2.3.4 by opening a secure SSH tunnel between your local machine and the target address – 1.2.3.4.
The OpenSSH tool can be used to perform SSH related activities on your machine. Simply install it with yum, apt-get or Yast, if it is not already available. Once you have it use the following command to open multiple SSH tunnels to your services
Open tunnel and execute commands:
1
| ssh 1.2.3.4 -lmyUser -L 3098:1.2.3.4:21 -L 3099:1.2.3.4:80 -L 3100:1.2.3.4:443 |
The command is explained below
1.2.3.4 – Your target IP
l – The user to login as
L – A local tunnel to a remote port
3098 – The local port to use when establishing this tunnel