Wednesday, February 28, 2007

know yourself "Funny Test"

look up your BirthDay and see what you are ..


*** BirthDay ***

January :
01 - 09 ~ Dog
10 - 24 ~ Mouse
25 - 31 ~ Lion
February:
01 - 05 ~ Cat
06 - 14 ~ Dove
15 - 21 ~ Turtle
22 - 28 ~ Panther
March:
01 - 12 ~ Monkey
13 - 15 ~ Lion
16 - 23 ~ Mouse
24 - 31 ~ Cat
April:
01 - 03 ~ Dog
04 - 14 ~ Panther
15 - 26 ~ Mouse
27 - 30 ~ Turtle
May:
01 - 13 ~ Monkey
14 - 21 ~ Dove
22 - 31 ~ Lion
June :
01 - 03 ~ Mouse
04 - 14 ~ Turtle
15 - 20 ~ Dog
21 - 24 ~ Monkey
25 - 30 ~ Cat
July:
01 - 09 ~ Mouse
10 - 15 ~ Dog
16 - 26 ~ Dove
27 - 31 ~ Cat
August:
01 - 15 ~ Monkey
16 - 25 ~ Mouse
26 - 31 ~ Turtle
September :
01 - 14 ~ Dove
15 - 27 ~ Cat
28 - 30 ~ Dog
October :
01 - 15 ~ Monkey
16 - 27 ~ Turtle
28 - 31 ~ Panther
November:
01 - 16 ~ Lion
17 - 30 ~ Cat
December:
01 - 16 ~ Dog
17 - 25 ~ Monkey
26 - 31 ~ Dove

*** charactersistic ***

a Dog : A very loyal and sweet person.Your loyalty can never be doubted. You are quite honest and sincere when it comes to your attitude towards working. You are a very simple person, indeed. Absolutely hassle free, humble and down-to-earth!! That explains the reason why your friends cling on to you! You have a good taste for clothes. If your wardrobe is not updated with what is trendy, you sure are depressed. Popular and easy-going. You have a little group of dignified friends, all of them being quality-personified.

a Mouse : Always up to some sort of a mischief! The mischievous gleam in your eyes is what makes you so cute and attractive to everyone. You are an extremely fun-to-be-with kind of person. No wonder people seek for your company and look forward to include you for all get-together's. However, you are sensitive which is a drawback. People need to select their words while talking to you. If someone tries to fiddle around and play with words while dealing with you, it is enough to invite your wrath. God bless the person then!

a Lion: Quite contradictory to your name, you are a peace loving person. You best try to avoid a situation wherein you are required to fight. An outdoor person, you dislike sitting at one place for a long duration. You are a born leader, and have it in you how to tactfully derive work from people. You love being loved, and when you receive your share of limelight from someone, you are all theirs!!!! Well, well... hence some people could even take an advantage, flatter you to the maximum and get their work done. So be careful.....

a Cat : An extremely lovable, adorable person, sometimes shy, with a passion for quick wit. At times, you prefer quietness. You love exploring various things and going into depth of each thing. Under normal circumstances you're cool but when given a reason to, you are like a volcano waiting to erupt. You're a fashion bird. People look forward to you as an icon associated with fashion. Basically, you mingle along freely but don't like talking much to strangers. People feel very easy in your company. You observe care in choosing your friends.

a Turtle : You are near to perfect and nice at heart.The examples of your kindness are always circulated in groups of people.You, too, love peace. You wouldn't like to retaliate even to a person who is in the wrong. You are loved due to this. You do not wish to talk behind one's back. People love the way you always treat them. You can give, give and give love, and the best part is that you do not expect it back in return. You are generous enough. Seeing things in a practical light is what remains the best trait of you guys.

a Dove : You symbolize a very happy-go-lucky approach in life. Whatever the surroundings may be, grim or cheerful, you remain unaffected.In fact, you spread cheer wherever you go. You are the leader of your group of friends and good at consoling people in their times of need. You dislike hypocrisy and tend to shirk away from hypocrites. They can never be in your good books, no matter what. You are very methodical and organized in your work. No amount of mess, hence, can ever encompass you. Beware, it is easy for you to fall in love....

a Panther : You are mysterious. You are someone who can handle pressure with ease, and can handle any atmosphere without going berserk. You can be mean at times, and love to gossip with your selected group. Very prim and proper. You like all situations and things to be in the way you desire, which, sometimes is not possible. As a result, you may lose out in some relationships. But otherwise, you love to help people out from difficult and tight spots when they really need you.

a Monkey : Very impatient and hyper!!! You want things to be done as quick as possible. At heart, you are quite simple and love if you are the center of attraction. That way, you people are unique. You would like to keep yourself safe from all the angles. Shall your name be dragged or featured in any sort of a controversy, you then go all panicky. Therefore, you take your >>precautions from the very beginning. When you foresee anything wrong, your sixth sense is what saves you from falling in traps. Quite a money minded bunch you people are!!

Note :
please try to write your comment ,if this probabilistic is equivalent your real characteristic or not (the writing of your characteristic is not important ) that of course if you want .

Monday, February 19, 2007

JasperReports

JasperReport API:

It is a popular open source Java engine which is used for reporting output from many data sources in web and desktop applications .

JasperReports' reports are defined in XML files with an “jrxml” extension which contains of jasperReport , title , pageHeader , detail , pageFooter, band tag element , all of the elements are optional, except for the root jasperReport element.

A jrxml file needs to be compiled , this can be achieved by calling the compileReport() method on the net.sf.jasperreports.engine.JasperCompileManager class .

it needs to be filled with data, this is achieved by calling the fillReport() method on the net.sf.jasperreports.engine.JasperFillManager class which has three parameters an instance of net.sf.jasperreports.engine.JasperReport, a java.util.HashMap containing any parameters passed to the report, and an instance of a java.sql.Connection class .

finally it can be exported to a pdf/Html/xml file , this is achieved by Using :

net.sf.jasperreports.engine.JasperExportManager class and calling exportReportToPdfStream method which create and view the report in output stream 'view in browser' “used with web application” or calling exportReportToPdf method which create the file on the machine without viewing it .
OR
net.sf.jasperreports.view.JasperViewer class and calling viewReport method which create and open the Pdf file .

IReport :


It is used for building Jrxml file better than building it manually .This tool allows users to visually edit complex reports with charts, images, and subreports. iReport is integrated with leading open source chart libraries for java.

Sample code


After creating the jrxml file by Ireport or manually .

// 1- put parameter “examId”
Map parameters = new HashMap();
long examId ;
parameters.put("examId", String.valueOf(examId));

// 2- load and compile report
String jasperJRXMLFileName = “D:/jasperReport.jrxml” ;
JasperDesign jasperDesign = JRXmlLoader.load(jasperJRXMLFileName);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);

// 3- DB connection
Connection conn = ResourceManager.getConnection();

// 4- fill report
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,conn);

// 5- create/viewing PDF file .
JasperExportManager.exportReportToPdfStream(jasperPrint,servletResponse.getOutputStream());
servletResponse.getOutputStream().flush();
servletResponse.flushBuffer();
OR
JasperExportManager.exportReportToPdfFile(jasperPrint, "reports/simple_report.pdf");
OR
JasperViewer.viewReport(jasperPrint);

JasperReport Requirements :
http://www.jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/Requirements

you can visit
http://jasperforge.org/ , http://jasperreports.sourceforge.net/api/overview-summary.html for more details or download





Thursday, February 15, 2007

Security Chit Chat -2-

Before going and talk about the security fields by more details ,We should first view the Types of attacks .

The Attack is any action that compromises the security of information owned by an organization ,One may have two classifications of attacks, according to the form of attack and the effect of this attack.

The Forms of Attack :

A- Interruption:-
An asset of the system is destroyed or becomes unavailable. This is an attack on availability. Examples include destruction of a piece of hardware, cutting communication line.

B- Interception:-
An unauthorized party gains access to an asset. This is an attack on confidentiality.

C- Modification:-
An unauthorized party not only gains access but also change the data. This is an attack on Integrity.

D- Fabrication:-
An unauthorized party inserts false object into the system. This is attack on authenticity.

The Effects of Attack :

Another useful categorization according to the effect of these attacks: passive attacks and active attack.

A-Passive Attacks:-
These attacks are in the nature of eavesdropping on, or monitoring of, transmissions. The goal of the opponent is to obtain information that is being transmitted.

B-Active Attacks:-
Attacks which refer to deliberate modifications made to the message stream . also it can be for the purpose of injecting false message or deleting message.

Wednesday, February 7, 2007

Security Chit Chat - 1 -

Security

It is well known that the world now has been involved in a war. Knowledge is the power. Information value enforces owner to protect it from enemies, the enemy who does not sleep, follows modern and effective techniques, and develops his self too to gain the information :-( .

Usually we define the cryptography science as the way of data protection , it handles from being misused, modified, or even seen but It has not been enough . The increasing value of knowledge and the race between cryptography and cryptanalysis has forced to create a way to remove the suspicion of the data existence “Steganography Science”.

Cryptography is the art or science encompassing the principles and methods of transforming an intelligible message into one that is unintelligible and then retransforming that message back to its original form. It can provide protection against eavesdropping, and also protects against message modification and against injection of false message by making it infeasible for an opponent to create cipher text that will be deciphered into accept meaningful plaintext.

Steganography is the art and science of writing hidden messages in such a way that no one apart from the intended recipient knows of the existence of the message; this is in contrast to cryptography, where the existence of the message itself is not disguised, but the content is obscured.

So, for those two important science, how to combine them together in a powerful system to protect your data using fast and easy technology for data communication?


So the Security is very interesting , useful and worthy field ;-).

Tuesday, February 6, 2007

Jsf and Struts

JSF and Struts

I wanted to put simple summary of different between Jsf and Struts depend only on my little experience .

* Struts :

it is a very popular framework for building web applications , application framework ,representation of the classic Model-View-Controller (MVC) design pattern principles .

Has Actions – Management capabilities, such as Action and DispatchAction which represents all the application requests and dispatches requests to appropriate application components as needed for Controller tier.

Has Form-management capabilities, such as the ActionForm JavaBean that represents the server side state of the input fields on a form, and a validation framework externaliz the configuration of the set of correctness checks to be applied to input field values, plus implement those checks on both the client side and the server side for Model tier.

Has a set of JSP custom tags that can simplify the process of creating the application's HTML markup for the view tier .

Has Tiles framework for layout management, which supports creation of layout templates that can be reused across multiple pages, and thus allows easy modifications to the overall look and feel of an application.

Has Standard configuration "struts-config"file for defining behavior:

- Mapping Action URLs to Action Classes .
- Configuring Action behavior (form bean creation,
validation, return-to-input destination, etc.).
- Mapping Forwards (logical resources) to physical
Pages .
- Defining form beans.

* JSF :

it is a user interface component framework, focuses on the view tier of a Model-View-Controller architecture.

It help to develop the application backend without worrying about HTTP details .

Has Fundamental APIs for user interface components.

Has Event- and listener-model for handling server side events.

Has Value-binding and method-binding-expressions let you bind component properties to objects in your data model and or event handling methods to your business logic, without requiring the components to have any detailed knowledge of the Java classes involved.

Has Converter which is Plug-in for conversion object to string and Validator which is Plug-in for correctness checks on input components

Has Standard configuration "faces-config" file for defining behavior:
- Mapping to Java Bean .
- Configured navigation rules to select the next page(current displayed page , action was invoked, outcome was returned ).



The navigation of Jsf is more clear , easier than struts . JSF provides just the basics for component level validation, while Struts offers a more sophisticated validation mechanism. The important points, though, is that you can code custom validation in JSF if the defaults aren't good enough for your application And all Jsf validation (standard ,Custom or backing beans ) has it’s own phases which stop the Jsf lifecycle competence during failure and also stop your application following . so code and handle all the validation in your business logic if this is not suitable to your application logic .

Which Technology Should I Use?

it may be a good idea to do the Struts-JSF integration library if the application is big and complex. If it's small, it's pretty straight forward to migrate all of it to JSF in one shot J , For a complex user interface the Jsf migration will be better (at least if you're still making user interface changes now and then). For an application with a simple user interface (e.g., mostly simple dynamic output rather than a lot of complex input), or an application that's rarely changed is not important to migrate it to Jsf .