Month: March 2015

Using Apache Jena With Netbeans


Roving Reverie

So it is GSoC time and I came across an interesting project which deals with linked data. In order to apply for it, I had to get Jena, a Java library for handling RDF graphs. The documentation provides info on how to configure Eclipse to use it. But Eclipse is not really my choice for an IDE. I prefer Netbeans. So I wanted to configure Jena to be used in Netbeans. Most of the resources I looked up suggested using Maven. But I wasn’t interested in that. After a bit of tinkering around, I managed to get it configured as a library in Netbeans. It is quite easy actually.

Go to Tools -> Libraries and create a new library called Jena. In the classpath tab, go to ‘Add Jar/Folder’ and navigate to the path where you extracted Jena and go to the ‘lib’ folder. Select all the jar files…

View original post 52 more words

Advertisements

Max Histogram area


Internal workings of process controllers I.


Industrial Circuits

This time the internal workings of a process controller will be shown.

I’ll show it through a Siemens SIPART DR24 process controller.

Its user manual can be found on the Siemens’ website:

Siemens SIPART DR24 manual

Although it is almost obsolete, the operational principles can easily be demonstrated with it.

View original post 622 more words

Iterative Implementation for Tree Traversal


Zhao Wang

Tree traversal is a very crucial concept in data structure and algorithm, and it is also a hot point in interview. According to the order the tree nodes to be visited, it can be categorized as PreOrder, InOrder and PostOrder. These different order traversals can be easily implemented in recursion, but for iterative implementation, something is different. A stack is always needed as an auxiliary tool to store tree nodes.

Preorder Traversal

The order is: root->left->right. It is the easiest one among these three iterative implementations because we don’t need any other variables to track something. For every node popped from stack, put their non-NULL children into stack(first right then left), until the stack is empty.

Inorder Traversal

The order is: left -> root -> right. Similar to the preorder traversal, but don’t pop node out from stack first. Keep putting the left children of stack’s top node into, until there’s no…

View original post 92 more words

Internal workings of process controllers II.


Industrial Circuits

Continued from the previous post

In practice, all these process controllers incorporate a microcontroller.

But microcontrollers are programmed in assembly or in C language, so to create a function block programmable process controller from a C programmable microcontroller, an intermediate firmware must be written.

View original post 638 more words