RSS
 

Archive for the ‘Development’ Category

Scanean: an Android application prototype

20 Oct

1 – Introduction

With this post I want to introduce an Android application prototype that was presented in the 2009′s SeedRocket edition.

SeedRocket (www.seedrocket.com) is an initiative founded by a group of entrepreneurs, experienced business and venture capitalists across Europe.
It gives from € 20,000 to € 100,000 to the winners and assigned a mentor to assist entrepreneurs in the start phase.

2 – Story

The prototype development was started in June 2009 by a group of 3 people:

Josè Diaz
Giovanni Mangani
Javier Rincòn

The proposed application ElMejorPrecio (Scanean, later), based on PHP/MySql + Android/Zxing technologies, reached the 3rd position in the final selection (not bad for a one month development!).

Read the rest of this entry »

 

Pivot table: generic sql query and Oracle Database 11g PIVOT operator

13 Oct
1 – Definition

A pivot table is the result of the action that allows data tables to be rearranged in many ways for different views of the same data.
Technically, if we compare a table with a matrix we can think to the pivot table as a transposed matrix, where the original row can be read as a column in the resulting table.

2 – How to generate a pivot table

Immagine to have the following data set:
select practice, office, count(1)
from organization
group by practice, office
Now you want the office’s numbers to be columns.  We have 4 offices (1,2,3,4) and we want to have the following columns in our resulting pivot table: OFF_1, OFF_2, OFF_3, OFF_4.
The query to generate the desired pivot table will look like the following:
select practice,
max( decode( office, 1, cnt, null ) ) off_1,
max( decode( office, 2, cnt, null ) ) off_2,
max( decode( office, 3, cnt, null ) ) off_3,
max( decode( office, 4, cnt, null ) ) off_4
from (
select practice, office, count(1) cnt
from organization
group by practice, office
)
group by practice

CNT column has been pivoted by OFFICE across PRACTICE.
Remember that this works only if you know the domain of the column you pivote by.
 

Decompile, modify and deploy java libraries by focusing on the Oracle Identity Manager case of study

13 Oct

1 – Introduction

Lately I have been asked to solve the following problem with the ReconciliationEvent91.jar package for Oracle Identity Manager:

trace log

ERROR,06 Oct 2010 15:12:40,362,[XELLERATE.WEBAPP],Class/Method: tcActionBase/execute encounter some problems: java.util.Collections$UnmodifiableMap cannot be cast to java.util.HashMap
java.lang.ClassCastException: java.util.Collections$UnmodifiableMap cannot be cast to java.util.HashMap
        at com.oracle.oim.ocs.reconciliationEvents91.ReconciliationEventsAction.getSelectedValuesToLink(ReconciliationEventsAction.java:438)
        at com.oracle.oim.ocs.reconciliationEvents91.ReconciliationEventsAction.handleStatusButtons(ReconciliationEventsAction.java:333)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)

...

Basing on the steps taken to solve this issue, I want to write down the main guidelines to decompile, modify and repackage existing jar files; I want also to put the focus on Oracle Identity Manager cause by my experience the following steps are more or less the same that should be used whenever you need to add custom backend functionalities to the product.

2 – Prerequisites

You will need the following:

- The last version of the JAVA SDK (You could need the J2EE libraries also)
- A JAVA IDE (Oracle JDeveloper 11g has been used in this case)
-  A JAVA decompiler tool (JAD has been used http://www.varaneckas.com/jad)

Read the rest of this entry »