Wednesday, December 21, 2011

Tuesday, December 20, 2011

Detaching a shell with "screen"

If you want to protect yourself against connectivity lost with Unix / Linux, screen is the perfect command for you.

In a shell, type the command screen.

It will create a new shell.

Launch the command that you want and close your shell window.

We your are back, type screen -ls to show the list of active screen session.

You will get something like this:

[06:19:36]$ screen -ls
There are screens on:
    11944.pts-0.myserver    (Detached)
    4859.pts-3.myserver    (Detached)
    12190.pts-4.myserver    (Attached)
3 Sockets in /var/run/screen/S-user.

Attached => The shell window is still active.
Detached => No open shell window.

To join the screen session, type screen -r 11944.pts-0.myserver where the parameter is the session name.

To logout, simple type exit

Complex find exec zgrep example

Suppose that we have a filesystem containing EDI transactions. Here's an example for the filesystem content:


We need to copy in the current directory all the EDI transactions (text file starting with ISA) from each folders (toto, tata, foo, bar) but the folder must start with a T. In our example we need to copy files from "toto" and "tata". The good transactions are in the folder "good". We must not copy transactions that are not contained in other folder than "good".

Also, the EDI files may be compressed. So we need to verify in compressed files... "toto.gz" contains an EDI file and "tata.xml" is a xml file.

The command is:
find /home/myhome/myfolder/mysubfolder/ -type f -iwholename *good* -iwholename *mysubfolder\/t* -exec zgrep -l '^ISA' {}  \; -exec cp -rf {} . \;

Will copy only "toto.gz"

find => Searching for something
-type f => Looking for files
-iwholename => The path should contains a specific word
-exec zgrep -l '^ISA' {} => Look for file including compressed one. File must start with ISA
-exec cp -rf {} .  => Copy the data to the current directory

Monday, December 19, 2011

Remove a specific directory from hierarchy

To remove a directory named DIRECTORY_NAME from a directory hierarchy

find . -type d -iname DIRECTORY_NAME -exec rm -rf {} \;

Moving EDI files

Moving all EDI files where the name contains -- to a folder named EDI.

find . -type f -iname *--*  -exec grep -Rl '^ISA' {} \; -exec cp -rf {} EDI/ \;

GUnzip all found files

GUnzip all the files from a directory hierarchy

find . -type f -iname '*.gz' -exec gunzip {} \;

Want to have a verbose output?

find . -type f -iname '*.gz' -exec gunzip --verbose {} \;

Tuesday, December 6, 2011

Ruby on Rails -=- Formatting Rails text_field_tag


If you want to format a Rails text_field tag, simply do the following:

   <%= f.text_field :my_var, :value=> my_function(f.object.my_var) %> 

Where my_var is my variable and where my_function is a function where I can apply a format. You can apply directly the format that you want in :value instead of using a function

Ruby on Rails -=- Removing trailing zero

Hi! With RoR I'm always getting trailing zero for numeric fields. Example, 23 will be 23.0 In order to round theses values, simply do the following
"%g" % my_value
Where my_value is my variable

IE9 -=- Border on link images

With IE9, when we have anchor on images, Internet Explorer adds a border to this image. To remove it, simply use this CSS

a img {
     text-decoration: none;
     border: 0;

Sunday, December 4, 2011

Tuesday, November 29, 2011

Virtualbox Guest Additions on CentOS & RedHat Linux

Check this URL if you want to configure the VirtualBox Guest additions on a Linux box.

Configuring Pidgin with Google Talk for Google Apps

Here are the steps the configure Pidgin:

  • Open Pidgin.
  • Select Account.
  • Select Manage Account
  • Click Add
  • Enter the following information in the Add Account window:

  • Protocol: XMPP
  • Username: your Google Talk username (without any @ symbol or domain).
  • Domain: Your domain name (after the @)
  • Resource: Leave empty
  • Password: Your password
  • Remember password: Check the box
  • Local Alias: leave this field blank
  • New mail notifications: check the box if you'd like Pidgin to notify you of unread email in your inbox.
  • Click on 'Advanced' tab and enter '' in the Connect Server box.
  • Click Save.

Tuesday, October 18, 2011

Cisco AnyConnect Client Download


You can find at this URL all the Cisco AnyConnect clients

EBI -=- Context Point possible variables

Here is the list of context points available in EXTOL EBI 2.5.

You can get the value of the variable by lauching the task Context Point - Get Value
  • env.var.Acknowledgement_Id

  • env.var.Address_for_Reverse_Routing

  • env.var.Application_Password

  • env.var.Application_Receiver_Id

  • env.var.Application_Receiver_Id_Qualifier

  • env.var.Application_Reference

  • env.var.Application_Sender_Id

  • env.var.Application_Sender_Id_Qualifier

  • env.var.Authorization_Information

  • env.var.Authorization_Qualifier

  • env.var.Code_List_Dir_Version

  • env.var.Collaboration_Profile_Id

  • env.var.Communications_Agreement

  • env.var.Decimal_Notation

  • env.var.Function_Group_Message_Count

  • env.var.Functional_Group_Code

  • env.var.Functional_Group_Control_Number

  • env.var.Functional_Group_Date

  • env.var.Functional_Group_Responsible_Agency_Code

  • env.var.Functional_Group_Time

  • env.var.Functional_Group_Version_Release_Industry_Code

  • env.var.Industry_Group

  • env.var.Industry_Id_Code

  • env.var.Interchange_Acknowedgement_Requested

  • env.var.Interchange_Control_Number

  • env.var.Interchange_Date

  • env.var.Interchange_Syntax_Id

  • env.var.Interchange_Time

  • env.var.Interchange_Version

  • env.var.Is_Reprocess

  • env.var.Log_of_Application_Batch_Id

  • env.var.Log_of_Collaboration_Id

  • env.var.Log_of_Connection_Id

  • env.var.Log_of_Envelope_Assembly_Id

  • env.var.Log_of_Group_Id

  • env.var.Log_of_Interchange_Id

  • env.var.Log_of_Message_Id

  • env.var.Log_of_Work_Id

  • env.var.Message_Control_Number

  • env.var.Message_Id

  • env.var.Message_Segment_Count

  • env.var.Message_Type_Sub_Id

  • env.var.Priority_Code

  • env.var.Process_Id

  • env.var.Receiver_Id

  • env.var.Receiver_Id_Qualifier

  • env.var.Release_Indicator_Character

  • env.var.Repetition_Seperator

  • env.var.Routing_Address

  • env.var.Security_Information

  • env.var.Security_Qualifier

  • env.var.Sender_Id

  • env.var.Sender_Id_Qualifier

  • env.var.Source_Data_Id

  • env.var.Source_Element_Delimiter

  • env.var.Source_Segment_Delimiter

  • env.var.Source_Sub-element_Delimiter

  • env.var.Standards_Class

  • env.var.Target_Element_Delimiter

  • env.var.Target_Segment_Delimiter

  • env.var.Target_Sub-element_Delimiter

  • env.var.Test_Production

  • env.var.User_Reference_1

  • env.var.User_Reference_2

  • env.var.User_Reference_3

  • env.var.User_Reference_4

  • env.var.User_Reference_5

  • env.var.Version_Release





  • glb.con.hh:MM:ss

  • glb.var.Conditional_Expression_Result_2

  • glb.var.Instance_Counter_1

  • glb.var.Instance_Counter_2

  • glb.var.String_Result_1

  • glb.var.String_Result_2

EBI -=- Sending an EDI file (ISA) by email


Sending the whole interchange (ISA) of a transaction by email with EBI 2.5


To receive the entire interchange in an email message, you must pass the Source_Input_Data_Fragment script parameter as the attachment for the send email task in your Collaboration Business Process. This would allow you to receive the entire document as an email attachment rather than as the message content. We would like to inform you that this current solution may be altered to work differently in a future version release of EBI, but you can currently do this in EBI 2.5.

Friday, October 7, 2011

EXTOL & Oracle Express -=- Strange Database Error ORA-12519


Today I had a mysterious error when using EXTOL Business Integrator 2.5 I have a business process in which I have some objects that do a lookup into an Oracle Express 11g database. I'm facing to a strange behaviour. Some times, my business processe is successful and some times not.

When I go into the Log Auditor, Application and the Process tab, I'm getting this following error:

[ERROR] Transformation ended in error, please refer to the information on the Translation Message Tab.
When I look on the Translation Messages tab, Step #2: Execute Transformation - Single Output, I'm getting this error:

Message ID: 273
Primary: SQL Access error: XREF_TradingPartner_Location: The connection to DriverID: a8ece772aeaf4130be919d5e9698ebca DatabaseURL: jdbc:oracle:thin:@localhost:1521:XE is null.
Category: General
Type: Hard_Error
Process ID: 859
Issued by: class com.extol.transformationrules.SQLAction
Msg file: messages.emf
Issued on: Friday October 7, 2011 10:45:00.746 AM EDT

In order to have more information on the issue, I've looked into the server log file at

I've found the following stacktrace

2011-10-07 10:22:52,402 INFO [STDOUT] Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:

According to Oracle, here's the definition of the error (


TNS:no appropriate service handler found
Cause: The listener could not find any available service handlers that are appropriate for the client connection.
Action: Run "lsnrctl services" to ensure that the instance(s) have registered with the listener, and are accepting connections.

At this point, it looks like Oracle Express is not accepting enough connexions. When EBI try to do some lookups in the database some times, Oracle Express ran out of available connexions.

We will verify this assumption

Step #1 - Verifying the configuration of Oracle Express

- Open Windows Command Manager and type sqlplus

SQL*Plus: Release Production on Ven. Oct. 7 11:47:30 2011

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter user-name: SYSTEM
Enter password:

Connected to:
Oracle Database 11g Express Edition Release - Production

SQL> show parameter processes

------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
global_txn_processes integer 1
job_queue_processes integer 4
log_archive_max_processes integer 4
processes integer 40

We see that the limit of concurrent processes in 40

Verify how many concurrent processes the system has actually
SQL> select count(*) from v$process;


The hypothesis is valid.

Step #2 - Increase the value up to 200 processes

In SQLPlus,

SQL> ALTER SYSTEM SET processes=200 scope=spfile;

System altered.

Step #3 - Restart the server

You can verify that setting has been applied by doing a "show parameter processs" (see step #1)

Step #4 - Relaunch EBI's Business Processes

You can now relaunch the business processes many times in EBI to verify that the problem is solved.

Thursday, September 29, 2011

Oracle Express -=- Change default HTTP / FTP ports


If you want to change the default HTTP and FTP ports for the Oracle Administration Web Interface (APEX) you can do the following steps. You must type this in the Windows Command Manager:

C:\WINDOWS\system32>sqlplus system@xe

SQL*Plus: Release - Production on Mi Jan 25 11:44:33 2006

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Express Edition Release - Beta

SQL> -- get current status
SQL> select dbms_xdb.gethttpport as "HTTP-Port"
, dbms_xdb.getftpport as "FTP-Port" from dual;

HTTP-Port FTP-Port
---------- ----------
8080 0

To change the ports, type the following command:

SQL> begin

2 dbms_xdb.sethttpport('8888');
3 dbms_xdb.setftpport('2121');
4 end;
5 /

PL/SQL procedure successfully completed.

SQL> select dbms_xdb.gethttpport as "HTTP-Port"
, dbms_xdb.getftpport as "FTP-Port" from dual;

HTTP-Port FTP-Port
---------- ----------
8888 2121

You can now access the web interface by typing http://localhost:8888 in the your browser.

Friday, September 23, 2011

Thursday, September 22, 2011

EDI -=- Sample query to select and move transactions


If you have a bunch of EDI files, you may want to extract only specific transactions and move them to a folder. Here's a sample query. It moves all the PO (850) and the invoices (810) to the folder "MYFOLDER" in my home directory. The dot (.) in the grep represents any characters so this query will works will all delimiters.

find . -type f -exec grep -Rl 'ST.8[15]0' {} \; -exec cp -rf {} ~/MYFOLDER/ \;

Linux -=- Good reference for Regular Expression with GREP


I've found a good reference that helps to understand regular expression with GREP.


Monday, September 19, 2011

Linux -=- Gunzip all the files recursively


If you have need to gunzip all the gzipped files that were under a directory hierarchy, you can type the following command. It will return all the files to delete and gunzip them. You must go in the root directory and type this command:

find . -iname '*.gz' -exec gunzip {} \;

Monday, September 5, 2011

Mazda 3 2007 -=- Cabin Air Filter Replacement

Here's a good tutorial that explain how to change the cabin air filter on the Mazda 3.

Thursday, August 18, 2011

Mac -=- Removing dot underscore "._" files...

In some cases involving the Apple Double format, moving a file to a different file system will cause the prefix "._" to appear on a file name. The files "._" are invisible when you're trying to list the file even with "ls -al" but you can see them when you compress a file. 

To remove them, you can go on the root of the directory and type
find . -name '._*' -delete

In order to PERMANENTLY resolve this issue, you can however, add one of the following 2 lines of code to your .bash_profile file in your home directory:
# for Tiger OS 10.4 or earlier

# for Leopard OS 10.5 and later

Tuesday, August 16, 2011

Linux -=- Find files and copy to a folder


Here's how to copy the files found in the result of a search to a specified folder.

find /path/to -iname 'whatever' -exec cp '{}' /path/to/destination/ \;

Tuesday, August 9, 2011

Java -=- Regex find example

Here's a simple example that shows how to find the value of different groups in a string with a regular expression.

Pattern pattern = Pattern.compile("^([a-zA-Z0-9]*)_(\\d*)?_?(.*)-\\d*_.*$");
Matcher m = pattern.matcher(resourceFile.getName());

if (m.find()) {
    String destinationNickname =;
    String jobnumber =;
    String originalFileName =;

Test your regex with this site:

Thursday, July 21, 2011

The Best PHP Frameworks of 2011

I've found a good article concerning the best PHP frameworks of 2011. It worth the time of reading it!


Wednesday, July 20, 2011

Mac -=- Recursively delete .DS_Store files


Mac OS X writes .DS_Store in every folders. If you want to delete theses files, you could use this command:

rm -rf `find . -type f -name .DS_Store`

Tuesday, July 19, 2011

Friday, July 1, 2011

ExtJS -=- Error: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)


If you are developing an application using the technologies mentioned in the title and have come across the operation aborted error in internet explorer ( then continue reading

Unlike Firefox and Safari - Internet explorer requires the DOM to be fully loaded before it can provide a peaceful execution of ExtJS code - you will face operation aborted errors otherwise.

Consider the following scenario

I declare a DIV container for an ExtJS based tab panel and immediately afterwards provide the required code.

..... ..... .....

Assuming more HTML markup follows after , this code will produce random operation aborted errors in internet explorer 6 and up. Sometimes it will load just fine while other times it will err out while you being able to see your page rendered - you will be unable to interact with the page and will be redirected to the default error page once you will click the ok button on the popup dialog box.

This error is not specific to ExtJS - this is a general bug with internet explorer and will occur whenever a DOM node is tried to be manipulated before the whole DOM structure has been read in by the browser. For example you will also face this issue with google-web-toolkit.

You can fix this issue by using the following approach

Leave all your containers where they are

Move all your javascript/ExtJs/GWT code just before then end of BODY tag.

Ideally you should consider moving all your code into JS files to speed up page loads due to caches.

Wednesday, June 29, 2011

PostreSQL -=- Find all row count for every tables

In order to find all row count for every tables in a database, you can type the following SELECT

SELECT schemaname,relname,n_live_tup 
  FROM pg_stat_user_tables 
  ORDER BY n_live_tup DESC;

Tuesday, June 21, 2011

Subversion -=- Can't find a temporary directory

When trying to checkout or update my code, I'm getting this error:

Cannot checkout from svn: Can't find a temporary directory: Error string not specified yet

We got this error because the is no remaining space on the drive. After freeing some space on the drive, everything goes well.

Tuesday, June 14, 2011

EDI & EDIFACT Document Mapping


Here's a mapping between commons EDI & EDIFACT transactions.

Price Sales Catalog 832 PRICAT
Price Authorization Acknowledgement/Status 845 ATHSTS
Specification/Technical Information 841 PRDSPE
Request For Quotation 840 REQOTE
Response To Request For Quotation 843 QUOTES
Electronic Bid Form 833 --
Purchase Order 850 ORDERS
Purchase Order Acknowledgement 855 ORDRSP
Purchase Order Change 860 ORDCHG
Purchase Order Change Acknowledgement 865 ORDRSP
Order Status Inquiry 869 ORSSTA
Order Status Report 870 ORDREP
Contract Award 836 --
Planning Schedule/Material Release 830 DELFOR
Shipping Schedule 862 DELJIT
Production Sequence 866 --
Ship Notice/manifest (ASN) 856 DESADV
Report of Test Results 863 QALITY
Material Safety Data Sheet 848 --
Contract Award 836 --
Shipment Information (Bill of Lading) 858 IFTMCS
Receiving Advice 861 RECADV
Non-conformance Information-Disposition Transaction, Cause/Correction 842 NONCON
Inventory Inquiry/Advice 846 INVRPT
Product Transfer and Resale Report 867 SLSRPT
Product Transfer Account Adjustment 844 --
Response To Product Transfer Account Adjustment 849 --
Invoice 810 INVOIC
Freight Invoice 859 IFTMCS
Payment order/Remittance Advice (EFT) 820 REMADV
Lockbox 823 --
Financial Information Reporting 821 --
Functional Acknowledgement 997 CONTRL
Application Advice 824 BANSTA
Trading Partner Profile 838 PARTIN

EDIFACT -=- List of Documents

Hi here's a list of all EDIFACT documents.

  • 270-A1 Eligibility, Coverage or Benefit Inquiry
  • 271-A1 Eligibility, Coverage or Benefit Information
  • 276-A1 Health Care Claim Status Request
  • 277-A1 Health Care Claim Status Notification
  • 278-A1 Health Care Services Review -- Request for Review
  • 278-A3 Health Care Services Review -- Response to Request for Review
  • 820-A1 Payment Order/Remittance Advice
  • 834-A1 Benefit Enrollment and Maintenance
  • 835-W1 Health Care Claim Payment/Advice
  • 837-Q1 Health Care Claim Professional
  • 837-Q2 Health Care Claim Dental
  • 837-Q3 Health Care Claim Institutional
  • APERAK Application error and acknowledgement message
  • AUTHOR Authorization message
  • AVLREQ Availability request - interactive message
  • AVLRSP Availability response - interactive message
  • BALANC Balance message
  • BANSTA Banking status message
  • BAPLIE Bayplan/stowage plan occupied and empty locations message
  • BAPLTE Bayplan/stowage plan total numbers message
  • BERMAN Berth management message
  • BMISRM Bulk marine inspection summary report message
  • BOPBNK Bank transactions and portfolio transactions report message
  • BOPCUS Balance of payment customer transaction report message
  • BOPDIR Direct balance of payment declaration message
  • BOPINF Balance of payment information from customer message
  • BUSCRD Business credit report message
  • CALINF Vessel call information message
  • CASINT Request for legal administration action in civil proceedings message
  • CASRES Legal administration response in civil proceedings message
  • CHACCO Chart of accounts message
  • CLASET Classification information set message
  • CNTCND Contractual conditions message
  • COACSU Commercial account summary message
  • COARRI Container discharge/loading report message
  • CODECO Container gate-in/gate-out report message
  • CODENO Permit expiration/clearance ready notice message
  • COEDOR Container stock report message
  • COHAOR Container special handling order message
  • COLREQ Request for a documentary collection message
  • COMDIS Commercial dispute message
  • CONAPW Advice on pending works message
  • CONDPV Direct payment valuation message
  • CONDRA Drawing administration message
  • CONDRO Drawing organisation message
  • CONEST Establishment of contract message
  • CONITT Invitation to tender message
  • CONPVA Payment valuation message
  • CONQVA Quantity valuation message
  • CONRPW Response of pending works message
  • CONTEN Tender message
  • CONWQD Work item q uantity determination messa e
  • COPARN Container announcement message
  • COPAYM Contributions for payment
  • COPINO Container pre-notification message
  • COPRAR Container discharge/loading order message
  • COREOR Container release order message
  • COSTCO Container stuffing/stripping confirmation message
  • COSTOR Container stuffing/stripping order message
  • CREADV Credit advice message
  • CREEXT Extended credit advice message
  • CREMUL Multiple credit advice message
  • CUSCAR Customs cargo report message
  • CUSDEC Customs declaration message
  • CUSEXP Customs express consignment declaration message
  • CUSPED Periodic customs declaration message
  • CUSREP Customs conveyance report message
  • CUSRES Customs response message
  • DEBADV Debit advice message
  • DEBMUL Multiple debit advice message
  • DEBREC Debts recovery message
  • DELFOR Delivery schedule message
  • DELJIT Delivery just in time message
  • DESADV Despatch advice message
  • DESTIM Equipment damage and repair estimate message
  • DGRECA Dangerous goods recapitulation message
  • DIRDEB Direct debit message
  • DIRDEF Directory definition message
  • DMRDEF Data maintenance request definition message
  • DMSTAT Data maintenance status report/query message
  • DOCADV Documentary credit advice message
  • DOCAMA Advice of an amendment of a documentary credit message
  • DOCAMI Documentary credit amendment information message
  • DOCAMR Request for an amendment of a documentary credit message
  • DOCAPP Documentary credit application message
  • DOCARE Response to an amendment of a documentary credit message
  • DOCINF Documentary credit issuance information message
  • ENTREC Accounting entries message
  • FINCAN Financial cancellation message
  • FINPAY Multiple interbank funds transfer message
  • FINSTA Financial statement of an account message
  • GENRAL General purpose message
  • GESMES Generic statistical message
  • HANMOV Cargo/goods handling and movement message
  • ICASRP Insurance claim assessment and reporting message
  • ICSOLI Insurance claim solicitor's instruction message
  • IFCSUM Forwarding and consolidation summary message
  • IFTCCA Forwarding and transport shipment charge calculation message
  • IFTDGN Dangerous goods notification message
  • IFTFCC International transport freight costs and other charges message
  • IFTIAG Dangerous cargo list message
  • IFTICL Cargo insurance claims message
  • IFTMAN Arrival notice message
  • IFTMBC Booking confirmation message
  • IFTMBF Firm booking message
  • IFTMBP Provisional booking message
  • IFTMCA Consignment advice message
  • IFTMCS Instruction contract status message
  • IFTMFR International Forwarding And Transport
  • IFTMIN Instruction message
  • IFTRIN Forwarding and transport rate information message
  • IFTSAI Forwarding and transport schedule and availability information me
  • IFTSTA International multimodal status report message
  • IFTSTQ International multimodal status request message
  • IHCEBI Interactive health insurance eligibility and benefits inquiry and
  • IHCLME Health care claim or encounter request and response - interactive
  • IMPDEF EDI implementation guide definition message
  • INFCON Infrastructure condition message
  • INFENT Enterprise accounting information message
  • INSDES Instruction to despatch message
  • INSPRE Insurance premium message
  • INSREQ Inspection request message
  • INSRPT Inspection report message
  • INTCHG Interchange Control Structures
  • INVOIC Invoice message
  • INVRPT Inventory report message
  • IPPOAD Insurance policy administration message
  • IPPOMO Motor insurance policy message
  • ISENDS Intermediary system enablement or disablement message
  • ITRRPT In transit report detail message
  • JAPRES Job application result message
  • JINFDE Job information demand message
  • JOBAPP Job application proposal message
  • JOBCON Job order confirmation message
  • JOBMOD Job order modification message
  • JOBOFF Job order message
  • JUPREQ Justified payment request message
  • LEDGER Ledger message
  • LREACT Life reinsurance activity message
  • LRECLM Life reinsurance claims message
  • MEDPID Person identification message
  • MEDPRE Medical prescription message
  • MEDREQ Medical service request message
  • MEDRPT Medical service report message
  • MEDRUC Medical resource usage and cost message
  • MEQPOS Means of transport and equipment position message
  • MOVINS Stowage instruction message
  • MSCONS Metered services consumption report message
  • ORDCHG Purchase order change request message
  • ORDERS Purchase order message
  • ORDRSP Purchase order response message
  • OSTENQ Order status enquiry message
  • OSTRPT Order status report message
  • PARTIN Party information message
  • PASREQ Travel tourism and leisure product application status request - i
  • PASRSP Travel tourism and leisure product application status response -
  • PAXLST Passenger list message
  • PAYDUC Payroll deductions advice message
  • PAYEXT Extended payment order message
  • PAYMUL Multiple payment order message
  • PAYORD Payment order message
  • PRICAT Price/sales catalogue message
  • PRIHIS Pricing history message
  • PROCST Project cost reporting message
  • PRODAT Product data message
  • PRODEX Product exchange reconciliation message
  • PROINQ Product inquiry message
  • PROSRV Product service message
  • PROTAP Project tasks planning message
  • PRPAID Insurance premium payment message
  • QALITY Quality data message
  • QUOTES Quote message
  • RDRMES Raw data reporting message
  • REBORD Reinsurance bordereau message
  • RECADV Receiving advice message
  • RECALC Reinsurance calculation message
  • RECECO Credit risk cover message
  • RECLAM Reinsurance claims message
  • RECORD Reinsurance core data message
  • REGENT Registration of enterprise message
  • RELIST Reinsured objects list message
  • REMADV Remittance advice message
  • REPREM Reinsurance premium message
  • REQDOC Request for document message
  • REQOTE Request for quote message
  • RESETT Reinsurance settlement message
  • RESMSG Reservation message
  • RESREQ Reservation request - interactive message
  • RESRSP Reservation response - interactive message
  • RETACC Reinsurance technical account message
  • RETANN Announcement for returns message
  • RETINS Instruction for returns message
  • RPCALL Repair call message
  • SAFHAZ Safety and hazard data message
  • SANCRT International movement of goods governmental regulatory message
  • SKDREQ Schedule request - interactive message
  • SKDUPD Schedule update - interactive message
  • SLSFCT Sales forecast message
  • SLSRPT Sales data report message
  • SOCADE Social administration message
  • SSIMOD Modification of identity details message
  • SSRECH Worker's insurance history message
  • SSREGW Notification of registration of a worker message
  • STATAC Statement of account message
  • STLRPT Settlement transaction reporting message
  • SUPCOT Superannuation contributions advice message
  • SUPMAN Superannuation maintenance message
  • SUPRES Supplier response message
  • TANSTA Tank status report message
  • TAXCON Tax control message
  • TIQREQ Travel tourism and leisure information inquiry request - interactive
  • TIQRSP Travel tourism and leisure information inquiry response - interactive
  • TPFREP Terminal performance message
  • TSDUPD Timetable static data update - interactive message
  • TUPREQ Travel, tourism and leisure data update request - interactive message
  • TUPRSP Travel, tourism and leisure data update response - interactive message
  • UTILMD Utilities master data message
  • UTILTS Utilities time series message
  • VATDEC Value added tax message
  • VESDEP Vessel departure message
  • WASDIS Waste disposal information message
  • WKGRDC Work grant decision message
  • WKGRRE Work grant request message

Monday, June 13, 2011

Java -=- Listing directories


If you want to list only the directories in Java, you can use the following code:

File dir = new File("/My/Directory/Path");
File[] directories = dir.listFiles((FilenameFilter) DirectoryFileFilter.INSTANCE);
for (int i = 0; i < directories.length; i++) {
    // Each file is a directory

Saturday, June 11, 2011

Math -=- Good Right-angled Triangles Calculator


I found this site really interesting. It calculates the angles and width for us. No need to do sin, cos, tan...

Friday, June 10, 2011

Java -=- Renaming a file

To rename a file, simply do the following:

// File (or directory) with old name
File file = new File("oldname");

// File (or directory) with new name
File file2 = new File("newname");

// Rename file (or directory)
boolean success = file.renameTo(file2);
if (!success) {
    // File was not successfully renamed

Java -=- Moving a file

To move a file from a directory to another, simply do the following:

// File (or directory) to be moved
File file = new File("filename");

// Destination directory
File dir = new File("directoryname");

// Move file to new directory
boolean success = file.renameTo(new File(dir, file.getName()));
if (!success) {
// File was not successfully moved

UNIX -=- GREP with OR operand

To find HR or FS in a file named myfile, type the following command in a terminal:

egrep 'HR|FS' myfile

Tuesday, June 7, 2011

JDEdwards -=- How to search JDE EnterpriseOne Data Dictionary from SQL

The Issue

The JD Edwards EnterpriseOne database does not contain any table or field name aliases with meaningful English descriptions. This lack of descriptions creates an issue for application and software developers in accessing the Table File Definitions and Field Descriptions contained in the JDE Data Dictionary. Without access to the table descriptions and the field descriptions, developers are not able to easily navigate the data needed for developing applications or reports.
Normally there are only two ways to get this information; both native methods of accessing table and field description information are inside the JD Edwards application. This requires that developers be trained in JDE to access the information they need. The first native method of access is to log into the JDE Fat Client and search through the Data Dictionary for the specific field aliases and/or table names. The second method is to pull up the Table Browser inside the EnterpriseOne Web Application, or Fat Client, and browse the data table, toggling between the field names and the field descriptions.
Most developers prefer to stay inside of SQL, or their chosen Integrated Development Environment (IDE), while maintaining access to all the information necessary to identify JDE fields and tables.  Additionally, the ability to see field lengths and data, to search for specific field aliases throughout JDE, and to to perform wild card searches for field descriptions, aliases, data types, and other information in the Data Dictionary, from the development environment, is a huge time saver.

The Solution

I have developed a simple table function, called TFD (Table File Descriptions), which allows developers to search and display table file descriptions and JDE Data Dictionary information with a SQL command inside of a query window of your chosen IDE. How it works is simple. You just type a select statement and use the TFD() function in the “From Clause”. The TFD() function will return a table result based on the table name passed in, and any additional “Where Clause” constraints.


A basic query using the TFD() function will result in a standard Table File Description result set as follows:
The statement:
select * from tfd('F4211')
Produce the following results:

A more complex SQL Statement such as this:
distinct [JDE Table], [Table Name], [JDE Field], [Item Description] 
from TFD('%')
where alias = 'UOM4'
order by [JDE Table]

Will yield the following results:
Notice that I used the wildcard character ‘%’ (percent) to show all tables where the Pricing Unit of Measure (UOM4) is used.
You can use any combination of wild cards and select statements with the TFD() function. You can also search on any field in the result set. If, for example you wanted to find all the fields in the JDE EDI tables (‘F47%’) containing the word ‘%Partner%’ in it, you could write a query as follows:
select [JDE Table], [Table Name], [JDE Field], [Item Description] 
from tfd('F47%')
where [Item Description] like '%Partner%'
The result would be:

As you can see from these few examples, the TFD() function can save time in development by making JDE object names and descriptions visible to the SQL, VB, C#, or Java integrated development environments. Developers can save time finding which fields or tables contain the data they need, and begin making sense of the cryptic JDE alias names.

The code

Simply copy the following code and execute it in the IDE of your choice. I used SQL Management Studio to develop and create the function. Once the function has been created in the JDE database, it’ll be ready to use.
Note: you’ll have to change the schema names and database names to match your JDE EnterpriseOne environment.
GOCREATE FUNCTION [dbo].[tfd] (@tbl varchar(99))
-- =============================================
-- Written by Bryant Avey, InterNuntius, Inc.
-- Provided free "As Is" with no warranties or guarantees
-- I just ask that you keep these comments in the function, if you use it.
-- The complete article describing this function can be found at: 

-- Description: Retrieve Table and Field Descriptions for any JD Edwards Table
-- Use: execute this function by passing in the table name as a parameter:
-- select * from tfd('F47012')
-- you can also use it to find where fields are used:
-- select * from tfd('%') where alias = 'UOM4'
-- =============================================
RETURN (       
-- Get the table field definition data
        select "JDE Schema", "JDE Table", simd "Table Name",
        colorder "Field Sequence", "JDE Field",
        f9210.frdtai Alias,
        frclas "Data Class",
        frdtat "Data Type",
        frdtas Size,
        frdtad "Decimals Stored",
        frcdec "Decimals Displayed",
        frowdi "Item Description",
      --frdsca "Dictionary Description",
        length SQLlength,
        prec SQLprecision,
        isnullable SQLnull
        from sysobjects
        join syscolumns on =
        join jde812.dd812.f9210 on substring(,3,99)
                                 = f9210.frdtai
        join jde812.ol812.f9860 on = siobnm
        join sys.schemas on sysobjects.uid = sys.schemas.schema_id
        where like @tbl and sysobjects.xtype = 'U'

Please see original article at :

Monday, June 6, 2011

Subversion -=- Resolve Tree Conflicts

To resolve all tree conflicts in a project with Subversion, do the following steps:

  1. Open a Terminal
  2. Go in your project's root
  3. Type svn resolve --accept working -R .
  4. All conflicts will be resolved
  5. Commit changes

Mac OS X -=- Disabling Dashboard Function From The Middle Mouse Button

For Dashboard - change the mouse section to either Nothing (-) or add modifier keys to the mouse click (eg. hold any combination of CommandOption, and or Shift when choosing what mouse button to use).
Screenshot of Exposé and Spaces

Excel -=- Remove duplicates in list

Method 1: Use the Unique Option in Advanced Filter

  1. To the right of your data, copy the heading from the column where you want to find unique values.
  2. Select a cell in your data set.
  3. In Excel 97-2003, choose Data - Filter - Advanced Filter. In Excel 2007, choose the Advanced icon from the Sort & Filter group of the Data ribbon.
  4. Choose Copy to another Location
  5. In the Copy To box, specify the copy of your heading. In the Figure, this is cell D1
  6. Click the box for Unique Records Only
  7. Click OK
Excel will provide you a unique list of customers in column D. 
Method 2: Use a Formula to Determine if This Record is Unique
The COUNTIF function can count how many records above the current record match the current record. The trick to making this work is to use a single dollar sign in the reference. If you are entering a formula in C2 and you reference A$1:A1, this is saying, "Start from the absolute reference of A1 and go down to the record above the current record". When you copy this formula down, the first A$1 will stay the same. The second A1 will change. In Row 17, the formula in C2 will read: =COUNTIF(A$1:A16,A17)=0.

Once you have entered the formula in C2 and copied it down to all rows, you should copy C2:C15 and then use Edit - Paste Special Values to convert the formulas to values. You can now sort descending by column C and the unique values will be at the top of the list.
Method 3: Use a Pivot Table to get Unique Customers
A pivot table is great at finding unique values. This is the fastest way in Excel 2000-2003.
  1. Select a cell in your data set.
  2. Choose Data - Pivot Table and Pivot Chart Report.
  3. Click Finish.
  4. In the Pivot Table Field List, click on the Customer Field. Click the Add To button.
Excel will show you a unique list of customers. 
Method 4: New in Excel 2007 - Use Conditional Formatting to Mark Duplicates
Excel 2007 offers new methods for finding duplicates. Select the range of customers. From the Home ribbon, choose Conditional Formatting - Highlight Cells Rules - Duplicate Values and click OK. 
If a name is found twice, Excel will highlight both occurences of the name. You would then want to sort all of the highlighted cells to the top.
  1. Click any field in the customer column. Click the AZ button in the Data ribbon.
  2. Find a cell that has the red highlighting. Right click the cell. Choose Sort - Put Selected Cell Color on Top.
Method 5: New in Excel 2007 - Use Remove Duplicates icon
This method is highly destructive! Make a copy of your dataset before you do this!
  1. Copy your range of data to a blank section of the worksheet
  2. Select a cell in your data set.
  3. From the Data ribbon, choose Remove Duplicates.
  4. The Remove Duplicates dialog will give you a list of columns. Choose the columns which should be considered. For example, if you needed to remove records where both the customer and invoice were identical, check the box for both fields. In this case, you are trying to get a unique list of customers, so choose only the Customer field.
  5. Click OK.
Excel will delete records from your dataset. It will report that n duplicates were removed and nn records remain. 
As you can see, there are many methods for dealing with duplicates. Excel 2007 adds two new tools to your arsenal.


Friday, June 3, 2011

Firefox -=- Could not initialize the browser security component

For an unknown reason, this morning Firefox can't load SSL web site.

I've reinstalled Firefox but the problem was still there.

Here's the solution:

Start the profile manager, delete my user and create another one
/Applications/ -profilemanager


Wednesday, May 25, 2011

Talend -=- Warning: Property storage name for 5 is empty - setting to Root Entry


I'm getting this warning while reading an Excel file (xls)
Warning:  Property storage name for 5 is empty - setting to Root Entry

I can't figure out why Talend give me this error but if open my Excel file, save it in xlsx format, and check the checkbox "Read excel2007 file format (xlsx)" in Talend, I don't have this error anymore...


Wednesday, May 18, 2011

Windows XP -=- Enabling Remote Desktop

To enable Remote Desktop Connections in Windows XP:
  1. Click on the Start button.
  2. Right-click on "My Computer" and select Properties.
  3. Click on the "Remote" tab.
  4. Under "Remote Desktop" (the bottom section), check the box labeled "Allow users to connect remotely to this computer".

If you are running Windows XP Service Pack 2, you will also need to make sure Remote Desktop isn't being blocked by the Windows Firewall:
  1. Go to the Start button, to "Control Panel".
  2. Open the "Windows Firewall" control panel. If you don't see Windows Firewall listed, make sure that you're looking at the control panels in "Classic View".
  3. On the "Exceptions" tab, make sure "Remote Desktop" is checked.
  4. On the "Advanced" tab, select "Local Area Connection" and press the Settings button.
  5. In the new window that opens ("Advanced Settings"), make sure that Remote Desktop is checked.

Monday, May 9, 2011

EDI -=- List of Valid Interchange Qualifiers in EDI


The interchange qualifier is used to describe the interchange identifier. For example, if we have a qualifier 12, it says that the interchange identifier is a phone number. Here's the list of all the valid identifiers in EDI (X12 - V004010)

  • 01 - Duns (Dun & Bradstreet)
  • 02 - SCAC (Standard Carrier Alpha Code)
  • 03 - FMC (Federal Maritime Commission)
  • 04 - IATA (International Air Transport Association)
  • 08 - UCC EDI Communications ID (Comm ID)
  • 09 - X.121 (CCITT)
  • 10 - Department of Defense (DoD) Activity Address Code
  • 11 - DEA (Drug Enforcement Administration)
  • 12 - Phone (Telephone Companies)
  • 13 - UCS Code (The UCS Code is a Code Used for UCS Transmissions; it includes the Area Code and Telephone Number of a Modem; it Does Not Include Punctuation, Blanks or Access Code)
  • 14 - Duns Plus Suffix
  • 15 - Petroleum Accountants Society of Canada Company Code
  • 16 - Duns Number With 4-Character Suffix
  • 17 - American Bankers Association (ABA) Transit Routing Number (Including Check Digit, 9 Digit)
  • 18 - Association of American Railroads (AAR) Standard Distribution Code
  • 19 - EDI Council of Australia (EDICA) Communications ID Number (COMM ID)
  • 20 - Health Industry Number (HIN)
  • 21 - Integrated Postsecondary Education Data System, or (IPEDS)
  • 22 - Federal Interagency Commission on Education, or FICE
  • 23 - National Center for Education Statistics Common Core of Data 12-Digit Number for Pre-K-Grade 12 Institutes, or NCES
  • 24 - The College Board's Admission Testing Program 4- Digit Code of Postsecondary Institutes, or ATP
  • 25 - American College Testing Program 4-Digit Code of Postsecondary Institutions, or ACT
  • 26 - Statistics of Canada List of Postsecondary Institutions
  • 27 - Carrier Identification Number as assigned by Health Care Financing Administration (HCFA)
  • 28 - Fiscal Intermediary Identification Number as assigned by Health Care Financing Administration (HCFA)
  • 29 - Medicare Provider and Supplier Identification Number as assigned by Health Care Financing Administration (HCFA)
  • 30 - U.S. Federal Tax Identification Number 31 Jurisdiction Identification Number Plus 4 as assigned by the International Association of Industrial Accident Boards and Commissions (IAIABC)
  • 32 - U.S. Federal Employer Identification Number (FEIN) 33 National Association of Insurance Commissioners Company Code (NAIC)
  • 34 - Medicaid Provider and Supplier Identification Number as assigned by individual State Medicaid Agencies in conjunction with Health Care Financing Administration (HCFA)
  • 35 - Statistics Canada Canadian College Student Information System Institution Codes
  • 36 - Statistics Canada University Student Information System Institution Codes
  • 37 - Society of Property Information Compilers and Analysts
  • AM - Association Mexicana del Codigo de Producto (AMECOP) Communication ID
  • NR - National Retail Merchants Association (NRMA) - Assigned
  • SN - Standard Address Number
  • ZZ - Mutually Defined

SQL -=- Records to CSV SQL function


If you want to convert an SQL resultset to a CSV string, your can use the following function.

CREATE OR REPLACE FUNCTION myschema.to_csv(query_to_convert character varying, separator character varying)
    r RECORD;
    t character varying;
    t := '';
    FOR r IN EXECUTE query_to_convert LOOP
        t := t || || separator;

    -- We removes the trailing comma
    RETURN substring(t, 0, char_length(t)-1) ;
  COST 100;

Function Call

SELECT myschema.to_csv('SELECT mycol as data  FROM myschema.mytable;',','); 

This will return a varchar containing all the records reparated with the specified delimiter, in our example a comma.

Friday, May 6, 2011

Car Fuel Efficiency -=- Good reference site


I've found a good reference site for fuel efficiency. All make / model of cars a referenced and there a compilation of most / worst efficient cars. The URL is


Thursday, May 5, 2011

ExtJS -=- Mandatory fields in red


If you want to show mandatory fields in red to visually distinguish mandatory fields and optional fields, you can do this override.

In your CSS stylesheet
.error {
    background-color: #ffeeee !important;
    border-color: #ff7870 !important;

.custom-form-item {
    display: block;
    margin-bottom: 0px;
    zoom: 1;

.custom-form-text {
    border: 1px solid #B5B8C8;
    padding: 1px 3px;
    height: 22px !important;

In your javascript
 * We overrides the Ext's FormPanel because there's a but using IE7-8, FormPanel and textfields (and derivatives).
 * IE try to render the field but the bottom and top border and invisible. We need to override the border width...
Ext.override(Ext.form.FormPanel, {
    initFields : function() {
        var f = this.form;
        var formPanel = this;
        var fn = function(c) {
            if (c.isFormField) {
            } else if (c.doLayout && c != formPanel) {

                Ext.applyIf(c, {
                    labelAlign: c.ownerCt.labelAlign,
                    labelWidth: c.ownerCt.labelWidth,
                    itemCls: c.ownerCt.itemCls
                if (c.items) {

 * Override the Ext.form.Field to add some functionalities like max lenght...
 * @author Yann Laviolette
Ext.override(Ext.form.Field, {
    onRender : function(ct, position) {
            * If we specify a maxLenght for a field, the field doesn't accept more than X characters...
        if (this.maxLength !== Number.MAX_VALUE && (this.getXType() === 'textfield' || this.getXType() === 'numberfield')) {
            this.autoCreate = {
                tag: 'input',
                type: 'text',
                size: '20',
                autocomplete: 'off',
                maxlength: this.maxLength

        if (this.maxLength !== Number.MAX_VALUE && (this.getXType() === 'textarea')) {
            this.autoCreate = {
                tag: 'textarea',
                type: 'text',
                size: '20',
                autocomplete: 'off',
                maxlength: this.maxLength,
                onkeyup: "if (this.value.length > " + this.maxLength + ") { this.value = this.value.slice(0, " + this.maxLength + ") }",
                onchange: "if (this.value.length > " + this.maxLength + ") { this.value = this.value.slice(0, " + this.maxLength + ") }"
        }, ct, position);

        if (!this.el) {
            var cfg = this.getAutoCreate();
            if (! {
       = ||;
            if (this.inputType) {
                cfg.type = this.inputType;
            this.el = ct.createChild(cfg, position);
        var type = this.el.dom.type;
        if (type) {
            if (type == 'password') {
                type = 'text';

            if (type == 'text') {
                this.el.addClass('custom-form-' + type);
            } else {
                this.el.addClass('x-form-' + type);


        this.invalidClass = "error";

            this.cls = "error";

        if (this.readOnly) {
            this.el.dom.readOnly = true;
        if (this.tabIndex !== undefined) {
            this.el.dom.setAttribute('tabIndex', this.tabIndex);

        this.el.addClass([this.fieldClass, this.cls]);

        * Show the container including the label
    showContainer: function() {

        if (!Ext.isEmpty(this.getEl())) {
            this.getEl().up('.x-form-item').setDisplayed(true); // show entire container and children (including label if applicable)


        * Hide the container including the label
    hideContainer: function() {
        this.disable(); // for validation

        if (!Ext.isEmpty(this.getEl())) {
            this.getEl().up('.x-form-item').setDisplayed(false); // hide container and children (including label if applicable)

        * Hide / Show the container including the label
        * @param visible
    setContainerVisible: function(visible) {
        if (this.rendered) {
            if (visible) {
            } else {

        return this;