Quick Sort algorithm with Java and R
Written by Mottola Michele - Italy - Reggio Emilia   
Wednesday, 04 July 2018 06:45
AddThis Social Bookmark Button

Algorithm description

Quick description

Quick sort is an algorithm to sort elements (we will use a vector)

In short, the procedure for sorting is done in this way: i take a vector's element (the pivot) (for example the first element of the vector) and then i move the pivot and all the elements, with value less than the value of pivot, at left of the pivot and all the elements, with value more hight, to the right of the pivot.

Last Updated on Wednesday, 04 July 2018 07:08
SAX xml parser and Java
Written by Mottola Michele - Italy - Reggio Emilia   
Monday, 22 August 2016 07:37
AddThis Social Bookmark Button


In this article i want to show
- an introduction to sax
- a simple use case that dimostrate the basic functionality of SAX
- how to validate an xml document with SAX
- how to use the filters

Last Updated on Tuesday, 23 August 2016 10:16
JAXB: binding java with xml
Written by Mottola Michele - Italy - Reggio Emilia   
Thursday, 21 July 2016 11:44
AddThis Social Bookmark Button

JAXB allow binding between java objects and xml instance.
Basically with JAXB you can do 'marshall' and 'unmarshall' operations.

Marshall means the process of conversion from java objects to xml instance. With unmarshall means the opposite.

Marshall example

To start with marshalling we need at least our domain class. Suppose we have a city with many person and i want to have an xml file with a root element city wich contains more element of kind people. To do that we need one object of type city wich contains a collection of person objects

Last Updated on Saturday, 30 July 2016 14:48
Architectural pattern: publisher-subscriber
Written by Mottola Michele - Italy - Reggio Emilia   
Tuesday, 15 September 2015 13:54
AddThis Social Bookmark Button


This pattern is also know as ’Observer’ (GoF). The mainly difference is that in architectural patterns there is a distinction for what is a components and what is a connectors. Here i want show just a basic working without this distinction. Besides i want show how implement it using the API of java, utility class that simplify the java implementation.

What is the problem

I have one or more objects (observer or listner or subscriber) that are interested to know when there are some events from another object (subject or publisher) and they want be informed when it happen. When that event happen the subscriber can perform their action that can be different from subscriber to subscriber.

Last Updated on Tuesday, 15 September 2015 14:10
<< Start < Prev 1 2 3 4 Next > End >>

Page 1 of 4