Présentation de Omaha

6 12 2014

Salut mes amis,
aujourd’hui c’est mon premier post pour ce blog et je voudrais envoyer
mes remerciments aux administrateurs du blog par cet invitation.

Je ne travaille pas dans le monde de la technologie, je suis simplement un amateur
de logiciel et hardware libre.

Read the rest of this entry »

Advertisements




At Friday night I love to read a good story – Part IV

15 11 2012

May the journalists to become hackers? Or simply for professional reasons they need to learn some hacking practices?

Anyway this is a subject that emerged along the last year with some thoughts and opinions, anyway it promises some interesting developments and discussions.
So I suggest reading the following article:

“….
Gleefully, these two told me they had more than 90,000 of Andy’s Tweets from the Arab Spring, and they were hoping to find something to do with them at this Hacks/Hackers event.

“Mind if I tag along and watch?” I asked. I was astounded that they had acquired an xml file of Tweets from Twitter.
…”

Read all story

db24all,
“There is always a better alternative”





Raspberry PI – Return to the early days of linux

7 11 2012
Linux old distro

Linux old distro

Is with great enthusiasm that I am living this emerging period of miniboard computers and also with some miss of the early days of Linux. This period of discovery provided by this type of processor is at all similar to the feeling of freedom in the early days of Linux: the adventure that was the installation of a linux distribution can be compared to the process of buying and assembling all componentsin order to Raspberry works properly as well as the preparation of SO.

But let’s take a look at Raspberry PI!

RaspberryPI

Raspberry PI logo

The Raspberry PI is a minimal sized card computer developed by the “Raspberry PI Foundation”, a charity foundation founded  in May 2009 supported by the University of Cambridge Computer Laboratory and the technology firm Broadcom.

This mini PC has a cost of $35(the model B which is described below), has a 700 MHz ARM CPU with a GPU and 256MB of RAM, it can plugs to a TV(through a HDMI device), keyboard and mouse(both through USB ports) and can be connected to internet by an ethernet device. The RCA Video and Audio devices are also available on this board. The Pi has powered by a 5V(at 1000mA) micro USB adapter(or four AA batteries) and thus presents an extremely low power consumption.
Read the rest of this entry »





Looping through an array and a numeric or no data found error

13 10 2012

These are a very usual errors when the associative arrays(also as kown as index-by tables) are used : “ORA-06502:PL/SQL:numeric or value error” or “ORA-06502:PL/SQL:no data found“, and sometimes this type of error is not easy to understand at a glance for the developers.

The associative arrays are one of three types of collections which PL/SQL offers.

Typically these errors can be got in one of the following scenarios:

  1. whenever the collection is empty and is used the “FOR l_idx array.FIRST.. array.LAST” to looping through the collection
  2. whenever the index number are not sequential and is used the “FOR l_idx array.FIRST.. array.LAST” to looping through the collection

To illustrate these two scenarios will be considered the following data types:

  TYPE TYP_REC_ETL IS RECORD
      (
        file_id       NUMBER,
        file_name     VARCHAR2(1024),
        nbr_rows      NUMBER,
        nbr_rows_rejc NUMBER,
        nbr_rows_load NUMBER
      );

 TYPE TYP_TAB_ETL IS TABLE OF TYP_REC_ETL INDEX BY PLS_INTEGER ;
 lt_etl  TYP_TAB_ETL;

Read the rest of this entry »





“isNumeric” function

25 06 2012
isNumeric

isNumeric

This post is a way to save my used functions in order to convert a string into numeric value, thus I will use this blog as my notepad.
For all of them when there isn’t possible convert the string to number it will return a null value otherwise the own value.

Although I have used some alternatives do this convertion I still prefer my first one development(the below “isNumeric_v0” function).

Somehow sometimes is useful to have a function such that as around!

In this post I’ll start at the end, presented the script to test the various developments :

  • The unit tests script
DECLARE
ls_string VARCHAR2(32):='1.87';
BEGIN
 dbms_output.put_line('isNumeric_v0='||isNumeric_v0(ls_string));
 dbms_output.put_line('isNumeric_v1='||isNumeric_v1(ls_string));
 dbms_output.put_line('isNumeric_v2='||isNumeric_v2(ls_string));
END;

Below is shown the mine three versions of “isNumeric”:

  • First version
CREATE OR REPLACE FUNCTION isNumeric_v0 (ps_string VARCHAR2) RETURN FLOAT AS
ln_number FLOAT;
BEGIN

ln_number := TO_NUMBER(ps_string);

RETURN ln_number;

EXCEPTION
WHEN OTHERS THEN
 RETURN NULL;
END isNumeric_v0;

Read the rest of this entry »





Comparing the source code of two Oracle reports 6i

16 05 2012

Maybe today is no longer very usual to use anymore the Oracle Report Builder 6i, however for me it became a reality and I believe also for some of you. For whose already were habituated to the version 10g this version presents some obstacles and difficulties.

However I want to show a simply way, so far the only which I found, to compare the source code of two Oracle reports developed through the version 6i. In order to do it you need to execute the following tasks:

  1. Converting the two reports source code to rex files
  2. Comparing the differences between the rex files

 

Before to describe each of these two steps I will do a brief description about rep and rex files:

rep
This a binary file which presents the source code associated to all actions performed in the Oracle Report Builder

rex
Similar o the previous one but its contents is in text(ASCII or EBCDIC).

 

  1. Converting the two reports source code to rex files
  2. This task can be done directly in the Oracle Report Builder, in menu “File” select the option “Administration” and then click o “Convert”:

    Convert Oracle reports 6i to rex.PNG

    Convert Oracle reports 6i to rex.PNG

     

    Then only is required to specify the location of source report(and its type) and the destination report location as its type.
    Unfortunately as my Oracle Report Builder installation was not done correctly I decided to develop a simply shell script which I called convert2REX.ksh. This script receives as input parameter a repfile and then generate its rex file. To use this shell correctly you need put the properly login data: username, password and database sid. Below you can find the code of this new script:

    #!/usr/bin/ksh
    
    [ $# -ne 1 ] && { echo "Usage: It's mandatory to define the report name as input parameter" ; exit 1 ; }
    
    SOURCE_CODE=$(basename $1)
    REX_FILE=$(echo ${SOURCE_CODE} | cut -d '.' -f1).rex
    
    echo Converting ${SOURCE_CODE} to ${REX_FILE}
    sh -x rwconverter.sh <<user>>/<<password>>@<<SID>> batch=yes stype=rdffile source=${SOURCE_CODE} dtype=rexfile file dest=${REX_FILE} compile_all=yes
    

    Merely out of curiosity here is the contents of the script rwconverter.sh(which call the binary rwconverter) that belongs to the Oracle installation:

    #!/bin/sh
    #
    . $ORACLE_HOME/bin/reports.sh
    ##   Linux specific settings
    
    if [ '/bin/uname -s' = 'Linux' ]
    then
       if echo $LANG | /bin/grep -i '\.utf.*8' > /dev/null
       then
         export LANG=`echo $LANG | /bin/sed 's#\.[u|U][t|T][f|F].*8.*##'`
       fi
    fi
    exec $ORACLE_HOME/bin/rwconverter "$@"
    
    

    The next step is to generate the rex files for two simple Oracle reports which only had a query with a slight difference:

    Report name Query
    report_sysdate.rdf SELECT TO_CHAR(SYSDATE,’dd-mm-yyyy hh24:mi.ss’) FROM DUAL
    report_date.rdf SELECT TO_CHAR(SYSDATE,’dd-mm-yyyy’) FROM DUAL

    The used syntax to generate the rex file by the convert2REX.ksh script was the following

    linux-bjqu:/dev $ convert2REX.ksh report_sysdate.rdf
    

    and the second one:

    linux-bjqu:/dev $ convert2REX.ksh report_date.rdf
    

     

  3. Comparing the differences between the rex files
  4. As last step will be necessary compare these two file through an appropriate tool for that. For example: Winmerge or KDiff3.

    Comparing two rex files

    Comparing two rex files

 

Segment,
“Sometimes a few words at the right time can inspire you, pick you up and point you toward a future worth living.”





At Friday night I love to read a good story – Part III

26 04 2012
Drones by  "Aeryins Labs Inc"

Drones by "Aeryins Labs Inc"

Currently the drones can be used for multiple purposes such as: police, scientists, rescue, vigilance and media tasks also for wildlife research and not strictly for military actions.

 

As a photography enthusiast like me these machines are fantastic to get a nice picture and a very funny toy to begin a new hobby. Today there is a wide variety of similar equipments(some of these use a Android operation system) with a accessible price.

 

Segment,
“Sometimes a few words at the right time can inspire you, pick you up and point you toward a future worth living.”