Tuesday, June 29, 2010

Spring Framework AspectJ Annotations

For defining aspects, Spring leverages the set of annotations
provided by AspectJ.


Annotation
Use
Description

@Aspect Type Declares a class to be an aspect.

@After Method Declares a method to be called after a
pointcut completes.


@AfterReturning
Method Declares a method to be called after a
pointcut returns successfully.


@AfterThrowing
Method Declares a method to be called after a
pointcut throws an exception.



@Around Method Declares a method that will wrap the
pointcut.



@Before
Method Declares a method to be called before
proceeding to the pointcut.

@DeclareParents Static Field Declares that matching types should be
given new parents—that is, it introduces new
functionality into matching types.


@Pointcut Method Declares an empty method as a pointcut
placeholder method.

Sunday, June 27, 2010

Installing MySQL on a Mac

You can download the the latest version of mysql on following site :
http://dev.mysql.com/downloads/

Download the "mysql-standard-ver­sion-osxversion-platform.dmg".

Double-click the disk image to mount it, double-click the installer,
and get installing!

After the installation done, we need to start the mysql server mannually.
For that open the terminal window and enter following command :

$ sudo /usr/local/bin/mysqld_safe5

Once MySQL is running, you can tell it to run in the background by hitting Ctrl-
Z, then entering this command:

$ bg


Now you can close the terminal window, if you want to check whether mysql server
is up and running please have following command :

$ ps -ax | grep mysql

This command should return a few processes that relate to MySQL.

Finally we need to connect MySQL database, please have following command :

$ mysql5

Hiding Files In an Image

 

Step 1

Create a folder on your hard drive, eg. C:\Test and put in all of the files that you want to hide into that folder. Also, place the image that you will be using to hide the files in.

Step1PNG

Step 2

Now select all of the files that you want to hide, right-click on them, and choose the option to add them to a compressed ZIP or RAR file. Only select the files you want to hide, not the picture. Name it whatever you want, eg. “nexus.rar”.

Step2

Now you should have a folder that looks something like this with files, a JPG image, and a compressed archive:

After Step2PNG

Step 3

Now here’s the fun part! Click on Start, and then click on Run. Type in “CMD” without the quotes and press Enter. You should now see the command prompt window open. Type in “CD \” to get to the root directory. Then type CD and the directory name that you created, i.e. “CD Test“.

Now type in the following line: copy /b <image file name> + <archive file name> <image file name>” and press Enter. You should get a response like below:

Step3

And that’s it! The picture file will have been updated with the compressed archive inside! You can actually check the file size of the picture and see that it has increased by the same amount as the size of the archive.

After Step3

Extracting

You can access your hidden file in two ways. Firstly, simply change the extension to .RAR and open the file using WinRAR. Secondly, you can just right-click on the JPG image and choose Open With and then scroll down to WinRAR. Either way, you’ll see your hidden files show up that you can then extract out.

Step4

AfterExtractingPNG

That’s it! That is all it takes to hide files inside JPG picture files! It’s a great way simply because not many people know it’s possible and no one even thinks about a picture as having to the ability to “hide” files. Cheers!

Wednesday, June 23, 2010

What is WAP?

What is WAP?
WAP is a standard to show internet contents on wireless clients, like mobile phones.
WAP is for handheld devices such as mobile phones
WAP is a protocol designed for micro browsers
WAP enables the creating of web applications for mobile devices.
WAP uses the mark-up language WML (not HTML)
WML is defined as an XML 1.0 application


WAP Micro Browsers

To fit into a small wireless terminal, WAP uses a Micro Browser.

A Micro Browser is a small piece of software that makes minimal demands on hardware, memory and CPU. It can display information written in a restricted mark-up language called WML.

What is WML?

WML stands for Wireless Markup Language. It is a mark-up language inherited from HTML, but WML is based on XML, so it is much stricter than HTML.

WML is used to create pages that can be displayed in a WAP browser. Pages in WML are called DECKS. Decks are constructed as a set of CARDS.

Example WML document:

"http://www.wapforum.org/DTD/wml_1.1.xml">



Our HTML Tutorial is an award winning
tutorial from W3Schools.





In a WAP browser screen only one card is displayed at a time.

WMLScript can apply for client side scripting like JavaScript for HTML and for styling WCSS is used.

Monday, June 21, 2010

Google Chrome 5 Vs Apple Safari 5

Testbed

-Intel Core2Duo T5800 2.00Ghz

-4GB DDR2 Ram 800mhz

-Intel Graphic Accelerator 4500MHD

-Windows 7 Ultimate 64bit

-RAM Usage 1.37 GB before test

SunSpider JavaScript Test

image

V8 Benchmark Suite - version 5

  • Richards
    OS kernel simulation benchmark, originally written in BCPL by Martin Richards (539 lines).
  • DeltaBlue
    One-way constraint solver, originally written in Smalltalk by John Maloney and Mario Wolczko (880 lines).
  • Crypto
    Encryption and decryption benchmark based on code by Tom Wu (1698 lines).
  • RayTrace
    Ray tracer benchmark based on code by Adam Burmister (935 lines).
  • EarleyBoyer
    Classic Scheme benchmarks, translated to JavaScript by Florian Loitsch's Scheme2Js compiler (4685 lines).
  • RegExp
    Regular expression benchmark generated by extracting regular expression operations from 50 of the most popular web pages (1614 lines).
  • Splay
    Data manipulation benchmark that deals with splay trees and exercises the automatic memory management subsystem (378 lines).
  image image

PeaceKeeper Browser Benchmark

image

 

image