How to add gadgets to a Windows 7 desktop

August 31st, 2009 by payam

What good will a home Windows

7 installation will be without useful toys on your desktop?  In Windows 7, these toys are called desktop gadgets and by default 7 comes with a handful of desktop toys that we can readily use.  The most useful widgets, err gadgets, are here.

The dependable calendar, clock, CPU meter, curreny converter, feed reader, maps and others are here to use.  Unlike Vista, they don’t open automatically after a fresh install, so you have to open them manually.  To access the gadgets,   type “desktop gadgets” on the search bar then click “Desktop Gadget Gallery” under the programs list:

Read the rest of this entry »

Posted in Solution | No Comments »

Query Visualize Plugin: Accessible Charts & Graphs from Table Elements using HTML 5 Canvas

August 31st, 2009 by payam

Accessible data visualization in HTML has always been tricky to achieve, particularly because elements such as images allow only the most basic features for providing textual information to non-visual users. A while back, we wrote an article describing a technique we came up with to use JavaScript to scrape data from an HTML table and generate charts using the HTML 5 Canvas element. The technique is particularly useful because the data for the visualization already exists in the page in structured tabular format, making it accessible to people who browse the web with a screen reader or other assistive technology.

We’ve now rewritten and extended the code behind this technique and packaged it up as a new jQuery plugin called “visualize”, which you can download below. The plugin provides a simple method for generating bar, line, area, and pie charts from an HTML table, and allows you to configure them in a variety of ways.
Query Visualize Plugin: Accessible Charts & Graphs from Table Elements using HTML 5 Canvas

First, a quick demo

In the example below, we have an HTML table populated with sample data of a number of employees and their sales by store department. We’ve generated 4 charts from this table, which are shown below.

View this example in a new window

So how does it work?

First, you’ll need to create the table markup:



		...repetitive rows removed for brevity.
	
2009 Individual Sales by Category
food auto household furniture kitchen bath
Mary 150 160 40 120 30 70
Tom 3 40 30 45 35 49

Note that we’ve used a caption element to summarize the table data. This will be used by the visualize plugin to create a title on your graph. We’ve also defined our table headings using th elements, letting the script know which cells it should use as the titles for a data set.

Now that we have our HTML table, we can generate a chart. Just attach jQuery and our visualize plugin’s JavaScript and CSS files to your page, and call the visualize() method on the table, like this:

$('table').visualize();

That’s it! By default, the visualize plugin will generate the first bar chart shown above and append it to your page directly after the table.

Working with a generated chart

Finding the generated chart on the page

Once you call the visualize() method on a table, the new chart element will be returned to the method, allowing you to continue your jQuery chain acting upon the chart instead of the table. Charts generated by this plugin are contained within a div element with a class of “visualize” as well as a class of the chart type, such as “visualize-pie”. These classes make it easy to find your chart after it’s generated, for additional presentation and behavioral modifications. Another nice way to do this is to store your generated chart in a variable, like this: var myChart = $('table').visualize();. Then you can simply reference myChart later on in your script to make any modifications to it, or to remove it from the page.

Updating a chart

Every chart generated by the visualize plugin has a custom event that can be used to refresh itself using its original settings, including which table it should pull data from. This is handy for dynamic pages with charts that can update frequently. In fact, we made use of this event when creating the editable table example above. To refresh an existing chart, simple trigger the visualizeRefresh event on the generated chart element, like this:

$('.visualize').trigger('visualizeRefresh');

Appending the chart to other areas of the page

Since calling the visualize() method returns the new chart element, it’s easy to immediately append the chart to another area of the page using jQuery’s appendTo method. However, once you move the chart to another area in the DOM, you must trigger the visualizeRefresh method on it in order for it to display properly in Internet Explorer 6 and 7. The following code demonstrates appending the chart to the end of the page, and then triggering the visualizeRefresh method on it:

$('table')
   .visualize()
   .appendTo('body')
   .trigger('visualizeRefresh');

Use CSS to Configure the Text

The CSS file that accompanies the visualize plugin handles much of the presentation for the key, title, grid lines, and axis labels. So for instance, if you need to change the placement of the key, simply edit the CSS rules that apply to it (we customized the key in the pie chart example above using this same approach).

Configuring Visualize with options

The following options are available in this plugin:

  • type: string. Accepts ‘bar’, ‘area’, ‘pie’, ‘line’. Default: ‘bar’.
  • width: number. Width of chart. Defaults to table width
  • height: number. Height of chart. Defaults to table height
  • appendTitle: boolean. Add title to chart. Default: true.
  • title: string. Title for chart. Defaults to text of table’s Caption element.
  • appendKey: boolean. Add the color key to the chart. Default: true.
  • colors: array. Array items are hex values, used in order of appearance. Default: ['#be1e2d','#666699','#92d5ea','#ee8310','#8d10ee','#5a3b16','#26a4ed','#f45a90','#e9e744']
  • textColors: array. Array items are hex values. Each item corresponds with colors array. null/undefined items will fall back to CSS text color. Default: [].
  • parseDirection: string. Direction to parse the table data. Accepts ‘x’ and ‘y’. Default: ‘x’.
  • pieMargin: number. Space around outer circle of Pie chart. Default: 20.
  • pieLabelPos: string. Position of text labels in Pie chart. Accepts ‘inside’ and ‘outside’. Default: ‘inside’.
  • lineWeight: number. Stroke weight for lines in line and area charts. Default: 4.
  • barGroupMargin: number. Space around each group of bars in a bar chart. Default: 10.
  • barMargin: number. Creates space around bars in bar chart (added to both sides of each bar). Default: 1

To use the options, simply pass them as an argument to the visualize() method using object literal notation, just like most other jQuery plugins you’re used to ( for example: visualize({ optionA: valueA, optionB: valueB});).

Live Options Configuration Demo

To experiment with these options, try out the following configuration demo:

View this example in a new window

Download the Code!

You can download the scripts and a demo page in the following zip file: visualize.filamentgroup.zip. The plugin itself is licensed for free distribution with MIT and GPL licenses, just like jQuery itself.

Browser Support

We have tested this plugin in the following browsers: IE6, IE7, IE8, Firefox 2, Firefox 3.5, Safari 3 and 4, Opera 9.

Note for Internet Explorer support

This plugin uses the HTML 5 canvas element, which is not supported in an version of Internet Explorer at this time. Fortunately, Google maintains a library that translates canvas scripting into VML, allowing it to work in all versions of internet explorer. The script is included in the zip. To use it, just be sure to include the script in your page using a conditional comment, like this:


Still to-do

While this plugin is fairly feature-complete and works well across the major browsers, we would like to consider implementing the following features:

  • Key text formatting: The ability to configure the text in the keys to show member title, total percentage, total amount, and more
  • Interactivity: We may experiment with adding datapoint tooltips, and other ways to interact with the visualization.
  • Support for data subsets: The ability to specify a subset of the table rows and columns for visualizing.

source :: filamentgroup

Posted in Scripts | No Comments »

PHP Tutorial : Get Browser Name & It’s Capabilities

August 31st, 2009 by payam

To get browser name just use next thing :
Read the rest of this entry »

Posted in Scripts | No Comments »

A jQuery inline form validation, because validation is a mess

August 30th, 2009 by payam

When it comes to form validation, it’s hard to have a versatile solution that works with every form. Figuring out how to display errors is not a simple task. This is something I tried to remedy with this script. When an error needs to be displayed, the script creates a div and positions it in the top right corner of the input. This way you don’t have to worry about your HTML form structure. The rounded corner and shadow are done with CSS3 and degrade well in non compliant browsers. There is no images needed.

When you submit a form, it will look for inputs with predefined class selectors, and validate them accordingly to their type. It also does on the fly validation when you click outside of the input. When validating on submit , every errors will appear in absolute position above the input in question, and slide the scroll bar to this first error (diminish your browser window if you don’t see the effect).
Read the rest of this entry »

Posted in Scripts | No Comments »

Default Programs Editor for Windows 7 & Vista

August 30th, 2009 by payam

Default Programs Editor is a powerful but simple file association utility for Windows. It is a context menu editor, an autoplay editor, and default programs association editor.

Read the rest of this entry »

Posted in Solution | No Comments »

High-Detailed Plastic Navigation Bar

August 30th, 2009 by payam

There is a plenty of websites in the internet. All of them have got some common features though. One of those features which is a characteristic for almost all the websites is the presence of a navigation menu on the page. Navigation menus can vary from ordinary text links to the most complicated dropdown menus. This tutorial is describing detailed process of creation of “plastic” navigation bar.

Read the rest of this entry »

Posted in Graphic | No Comments »

PHP Tutorial : Validate email address – simple way with filter_var() function

August 30th, 2009 by payam

While browsing php.net without any scope I discovered a very cute & nice way to replace the usual regular expression email checking thing.

That way is via filter_var() php function which does the things 10 times faster :
Read the rest of this entry »

Posted in Scripts | No Comments »

100+ Free Photoshop Brushes: Abstract Paint Smudges

August 30th, 2009 by payam

We know that Photoshop has a smudge tool that you can conveniently use anytime. But most often it’s hard to create the kind of smudge paint effect we really want with the smudge tool. It’s a lot easier if we have a wide variety of ready-made smudge brushes to choose from that we can use to produce the kind of smudge effect we want.
Read the rest of this entry »

Posted in Graphic | No Comments »

22 Photoshop Web Design Interface Tutorial Sites

August 28th, 2009 by payam

title-22-photoshop-web-tutorial-sitesI wanted to showcase very good tutorial sites here also, since there are several great websites delivering beautiful and high quality tutorials constantly! If you love and search for more Photoshop tutorials, you really should visit sites below!

Also great way to keep up if you just subscribe to these blogs, create own tutorial section for example in Google Reader, and when mood is for learning from quality tutorials, go and check out what’s fresh in these sites! At least I am doing so, and well – practice makes perfect!

I am sorry this article turned out to be so short, but I really didn’t want to put here old sites or ones I didn’t enjoy myself!

Read the rest of this entry »

Posted in Graphic | No Comments »

X-Plane 9.v9.20 iPhone ipod touch games download

August 28th, 2009 by payam

619945 X Plane 9.v9.20 iPhone ipod touch games download

X-Plane is here now, the EIGHTH free update! This free update contains new frame-rate increases, scenery improvements, physics improvements, and multiplayer!
(Note for multiplayers: Go to the MAP screen and place your aircraft on a runway after selecting who you want to play with so you both start in the right place).

Read the rest of this entry »

Posted in Mobile | No Comments »

« Previous Entries