Thursday, October 28, 2010

Java lang String Calculate MD5

The java.lang.String class does not provide a faster way to code the MD5 algorithm, surely for security reasons.

Here a quick way to do implement is a a static class

1.import java.security.MessageDigest;
2.import java.security.NoSuchAlgorithmException;
3.
4.public class LMD5Gen {
5.
6. public static String md5(String input){
7. String res = "";
8. try {
9. MessageDigest algorithm = MessageDigest.getInstance("MD5");
10. algorithm.reset();
11. algorithm.update(input.getBytes());
12. byte[] md5 = algorithm.digest();
13. String tmp = "";
14. for (int i = 0; i < md5.length; i++) {
15. tmp = (Integer.toHexString(0xFF & md5[i]));
16. if (tmp.length() == 1) {
17. res += "0" + tmp;
18. } else {
19. res += tmp;
20. }
21. }
22. } catch (NoSuchAlgorithmException ex) {}
23. return res;
24. }
25.
26.}

Sunday, October 17, 2010

Middleware : Service-Oriented Architectures (SOA) using BPEL components

Future is the next generation of Business Integration through Service-Oriented Architecture (SOA). Legacy integration technologies are too complex and require proprietary skills to develop, support, and maintain. Standards have cleared the path to develop truly composite applications that leverage existing technology investments, promote mainstream developer adoption, and adapt to future technological advances.



Tuesday, September 28, 2010

Sistine Chapel on-line || Vatican City state

Check it out the online version of the Sistine Chapel (Italian: Cappella Sistina) at the Vatican City state (Italian: Stato della Città del Vaticano) by Michelangelo, the Italian Renaissance painter that paint it on the XV century.
Last week I had the privilege to be able to visit it.

http://www.vatican.va/various/cappelle/sistina_vr/index.html



Tuesday, August 24, 2010

The ultimate Wedding Query... (SQL Style)

I am running the following SQL query among the databases instances I managed in different MS SQL servers for fun....

At that point, I should say that the desired "tuple" has not yet been found :-( . . . .




Details of the SQL query follow:

--
-- Funny query
-- Date: 25 August 2010
--
-- The ultimate Wedding Query................ (SQL Style)

-- HUSBANDS QUERY

CREATE PROCEDURE MyMarriage(BrideGroom Male (25),Bride Female(20) )
AS BEGIN
SELECT Bride FROM Beautiful_ Brides
WHERE FatherInLaw = 'Millionaire'
AND Count(Car) > 20 AND HouseStatus ='ThreeStoreyed'
AND BrideEduStatus IN (B.TECH ,BE ,Degree ,MCA ,MiBA, PHD) AND Having Brothers= Null
AND Sisters =Null


SELECT Gold, Shares, Cash, Car, BankBalance
FROM FatherInLaw
UPDATE MyBankAccout
SETMyBal = MyBal + FatherInLawBal
UPDATE MyLocker
SET MyLockerContents = MyLockerContents + FatherInLawGold
INSERT INTOMyCarShed VALUES('Porsche')
END
GO

-- Then the wife writes the below query:
DROP HUSBAND;
Commit;

-- (-:

Tuesday, August 17, 2010

My Super Server - version 2010

The server that is presented is as worth as the car below (second hand)! Next, see some snapshots I took from the Operating System (Windows Server 2008 RC2 64 bits).





The monster: HP Proliant ML570R G4 server



RAM: 16 x 4 GB = 64 GIGABYTES !!!!! I may tell you with this you will not have problems with multi threading.




STORAGE of 12 x 1000 Gigabytes (1.0 TB) = 12 Terrabytes !!!! = > 12.0 TB
Additional storage of 1.0 TB for C and D drives. See snapshot below.



Happy surfing!

Thursday, July 29, 2010

Tuesday, July 27, 2010

Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object

PROBLEM:

Server reports this error on a 64-bit Windows Server 2008 RC2 when running a COM object (dll ) under ASP page for a given web site when accessing the database.

DISPLAYED ERROR IS:

Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object: 'XYXX.YYYY'

SOLUTION:

The issue is solved by going to the Application Pool tied to the web application, Advanced Properties... and setting "Enable 32-bit Applications" to True. I spent some minutes with this pain and finally had some relief :-)

Server is: IIS 7.5 under Windows Server 2008 RC 2 64 bit