Tuesday, February 28, 2012

Blog: How to professionally highlight your blog code using (Syntax Highlighting)

Hello everyone

Recently I have searched for a way to automatically keep my code snippets formatted and colorized with proper highlighting & syntax, without painful self-highlighting way, and then Blogger/Wordpress doesn't have the immediate solution out here!

I found an excellent open source tool called Syntax Highlighter is available.
This is ready to use out of box 100% Javascript based SyntaxHighlighter with extensive features & multiple other options.

SyntaxHighlighter can be either downloaded & used on your own webserver or if you have a blog on Blogger, this can be directly used as well.

To downloaded SyntaxHighlighter for your own personal Webserver/Hosted
site: http://alexgorbatchev.com/wiki/SyntaxHighlighter:Download
Configuration Steps: http://alexgorbatchev.com/wiki/SyntaxHighlighter:Configuration
Brush Aliases: http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes


Friday, February 24, 2012

Barcode: Professional java barcode API (reader & writer)

Originally Barcodes were 1D representation of data using width and spacing of bars. Common bar code types are UPC barcodes (as shown) which are seen on product packages. 

There are 2D barcodes as well (they are still called Barcodes even though they don’t use bars). A common example of 2D bar code is PDF417, QR Code (as shown) which is commonly used by mobile phone apps. You can read history and more info about Barcodes on Wikipedia..
QR Code
UPC-A
PDF417 code
There is an open source Java library called ‘zxing’ (Zebra Crossing) which can read and write many differently types of bar codes formats.
I tested zxing and it was able to read a pure barcode and embedded in the middle of a 100 dpi grayscale busy text document!
This article demonstrates how to use zxing to read and write bar codes from a Java program.

Sunday, February 12, 2012

Glassfish: How to create lookups resources (simple & JavaBean Object)

It is a good idea to make your code modular and maintainable (less code modifications) when depending on resources.

To create a resource in application server so that all deployed applications can look them up, and make your application is loosely coupled on the resource it lookups, and be more dynamic.

The resource types can be object, string, boolean, number, or any custom java bean types.

In Glassfish 3+ CLI (Command Line Interface), they are created and managed with a set of generic commands:

asadmin create-custom-resource ...
asadmin list-custom-resources ...
asadmin delete-custom-resource ...
asadmin get 'resources.custom-resource.*'
asadmin set ...


GlassFish admin console provides GUI (Graphical User Interface) way of doing things but I found using CLI (Command line Interface) is a lot faster.

Saturday, February 11, 2012

JEE7: Looking ahead to a new era

Get educated about Java EE 7 JSRs.
With the release of Java EE 7 scheduled for the second half of 2012, projected JSRs are all up and running. The Java EE 7 release, which will reflect the evolving needs of the industry as it moves into the cloud, is date driven: anything not ready will be deferred to Java EE 8.

Here is an update and summary of the key features of different specifications in the Java EE 7 platform.

Illustrator: adobe illustrator CS5.5 training notes

Illustrator is vector graphics drawing tool while Photoshop is pixel graphic drawing tool.

Resolution measurements:
DPI = Dot Per Inch
PPI = Pixel Per Inch

Resolution types:
When you create a picture 1" X 1" with PPI = 1000px then this is called high resolution document, but if the same image size created with PPI = 10px then this called low resolution image.

What is vector Graphics?

Vector Graphics is the use of geometrical primitives such as points, lines, curves, and shapes or polygon(s), which are all based on mathematical equations, to represent image in computer graphics.

Illustrator uses anchor points and connects these anchors with lines called paths, which is re-calculated each time image is sized.

when drawing in illustrator the path connecting anchor points doesn't appears on final appearance of drown shape, it just a skeleton for the graphic shape while appearance is the glow of the shape.