Friday, December 31, 2010

Happy New Year-2011


Hi

Wishing you & your family members a very joyful & prosperous New Year.

Have a great year a head

"We will open the book. Its pages are blank. We are going to put words on them ourselves. The book is called “Opportunity” and its first chapter is New Year’s Day. "
-Edith L. Pierce


By the year end the buzz will be Coming New year & its resolutions

These are the some of my new year resolutions. (2011)

--Read one technical book per every quarter.

--Learn one new language (programming language) per year.

--Want to post regularly in my blog.

--Invest Regularly.
(An investment in knowledge always pays the best interest --Benjamin Franklin)

--Manage Risk
(The greatest risk is the risk of risk less living --Stephen Covey)

Logging Tool (Log4net)

LOGGING
It is an important component of the development cycle. It is the process of recording information with automated program. It is used to understand the activity of the application & to diagnose problems.

Features
- It provides precise context about the execution of the application.
- Once inserted into the code, the generation of logging output requires no human intervention.
- Log output can be saved in persistent medium to be studied at a later time.

Log4net

Its an open source library that allows .NET applications to output log statements to a variety of output targets such as to a file,the console, the database or even e.mail.
It allows the developer to control which log statements are output with arbitrary granularity. It is fully configurable at run time using external configuration files.

Features:

- log4net is optimized for speed.
- log4net is based on a named logger hierarchy.
- log4net is fail-stop but not reliable.
- log4net is thread-safe.
- log4net is not restricted to a predefined set of facilities.
- Logging behavior can be set at run time using a configuration file. Configuration files are in XML format.
- log4net is designed to handle exceptions from the start.
- log4net categorizes logging into levels: DEBUG, INFO, WARN, ERROR and FATAL.
- The format of the log output can be easily changed by implementing a new layout class.
- The target of the log output as well as the writing strategy can be altered by writing a new appender class.
- log4net supports multiple output appenders per logger.

Log4net can be downloaded from here. Log4net Download


Log4net is from the The Apache Software Foundation
Note:It can slow down the application.

Other Logging frameworks are
- log4j for Java
- log4cxx for C++
- log4php for PHP

XML Creation

Creation of XML file is very much easy with the existing class library in the .Net framework with the C#. Although we can create many complex XML files , here i have presented a simple application which is easy to understand, it creates & stores the XML file in Text File. It retrieves the XML file & displays the data.
OUTPUT
Created XML File:

Retrieved XML data:

Thursday, December 30, 2010

FIREBUG (Development Tool)

FIREBUG

Firebug, an open source extension for the Mozilla Firefox Browser, provides tools to monitor, edit, and debug any website's CSS, HTML, DOM, and JavaScript.

It also has a JavaScript console for logging errors and watching values, as well as a "Net" feature which monitors the amount of time in milliseconds it takes to execute scripts and load images on the page.

CSS, HTML: In live we can edit the CSS & HTML of any web page & can view the result.

JavaScript : using firebug we can debug the JavaScript code by putting breakpoints & we can log the errors.

Network Monitor :
This Feature lets you monitor how much time is spent when loading a web page. Use the Net tab to see the bar that shows when a file started and stopped loading relative to all other files. Network Monitor breaks up the traffic on a file-by-file basis so we can see how much time is spent loading image, JavaScript, HTML, and so forth.



Steps:

1) Download Firebug from http://getfirebug.com/downloads.

2) Install into the Web browser. Restart the browser.

3) By going to any web page press f12 then you can see the window at the bottom of the page.

Note:
-The edited HTML or CSS or JavaScript wont effect the existing code.
-There is also a Firebug Lite version for Internet Explorer, Opera and Safari.

(Courtesy by my  colleague Victor)

Wednesday, December 15, 2010

CSS Color Tips

Hi to all,
This is my first post in this blog. Pretty much excited.
Like all techies, i too spend most of the time with computers, so i just want to share few things (related to technology), which i learn or come across in my daily technical life.

Now comes to our topic,
Now a days web designing is very much important for each websites. In designing the web pages color plays a vital role.
four ways in which we can specify the colors are:
          -Using color name (eg: black, white, red, yellow etc..)
          -Using Hex Code of a color (eg: ##000000,#ffffff etc..)
          -Using RGB pecentage (eg: rgb(0%,10%,60%))
          -Using RGBdecimal value (eg: rgb(255,0,0)

In all the above options, Hexcode is very much used because of its coverage of wide range colors..

But its always difficult to know all the combinations of colors. & also sometimes if we come across any different color combination & we want to use the same in our designing.
Then the problem is how to identify the name or hexcode of the same to usse it in our design.
The better way to identify hexcode or RGB value of any particular color is to use ColorCop (a free multi-purpose color picker)






 Using the ColorCop, we can place the cursor on any object, then it gives the the hexcode & RGB of that particular object's color.For demo please click on this link: ColorCop demo
                                                                                                  
                                                                               (Courtesy by my  colleague Victor)