Wednesday, March 26, 2008

Object Dock

Hi... I just find cool ... desktop tool... they called object dock. http://www.stardock.com/products/objectdock/

image

Sunday, March 23, 2008

getYear() Javascript function in Firefox, IE, Safari

Today, I just fix very common bug which only happened in Firefox and Safari.
The problem is very simple, when javascript called getYear() - it returns 108 in Firefox instead of 2008 in IE.

To resolve this , I just change getYear() into getFullYear() - it will return 2008 for all.
So.. Never use getYear() anymore... -)

Thursday, March 20, 2008

Safari Runs Under Windows

Today, I just get an Apple's update and It downloads Safari which is runs under my windows. 
If you don't have Apple's - Click this Link http://www.apple.com/safari/download/

and It past ACID 2





Monday, March 17, 2008

Manage CSS in VS 2008

VS 2008 supports a new tool window inside the IDE called "Manage Styles".  This shows all of the CSS stylesheets, and their corresponding rules, for the page you are currently editing.  It can be used both when you are in design-view, as well as when you are in source view on a page.

Click View > Manage Styles

clip_image001[5]

A circle around a CSS rule in the manage styles window indicates that particular rule is in use within the current document.  Using the mouse to hover over the rule allows you to quickly see the CSS rule values:

clip_image002

The tool window provides top level nodes for style block(s) in the current page and external style sheet in cascading order.  Inline styles will not be displayed in this window, since inline styles are not “manageable”. Tool window will also list the @import directives.

The icons are used to differentiate the various types of styles as shown below.

clip_image003Elements

clip_image004Classes

clip_image005IDs

clip_image006Style in use (color applies as above)

You can then either right-click on a CSS rule and select "Modify Style" to bring up a graphical CSS rules editor, or you can double click on the rule in the manage styles window to automatically open the stylesheet file and jump immediately to the CSS source definition to edit (with full intellisense):

clip_image007

Click View > CSS Properties

One of the other cool new CSS features that is also supported in both design and source view is the new CSS Properties Window:

clip_image008

You can click on the individual values to see where in the CSS precedence hierarchy this value was inherited from or overridden.  In the example below you can see that the final color for the current element that my cursor is on is a dark brown color.  If I select this final color value, the CSS properties window will draw a blue box in the applied-rules list above indicating that this setting is set in the "singlecontent h3" rule:

clip_image009

If you click on the lighter brown color setting that this rule overrode (and which has the red strike-thru), you can see that it originated with the page's HTML body CSS rule (notice how the body rule below is selected in the applied rules list when you select the overridden value below):

clip_image010

Friday, March 14, 2008

Shelving your code in TFS

 

TFS allows you to set aside pending changes in your TFS workspace if you want to work on something else for awhile, or if you want another coder to review your changes before you commit them, or if you want to pass off files you've been working on to another team member. When you create a shelveset TFS saves the items along with any associated Work Items or Check-in Notes to a separate repository, though not the source control repository itself.

Shelving a set of pending changes

  1. In the Pending Changes view, click the down arrow icon and select Shelve.

  2. In the Shelve - Source Files dialog box, type a name for your shelveset, any comments to help you remember the set, and, if necessary, deselect any file(s) you do not want to include in the shelveset. You can also associate a Work Item with your shelveset. For more information, see Associating Work Items with Changesets and Shelvesets.

Finding and Unshelving a set of pending changes

  1. In the Pending Changes view, select the down arrow icon and click Unshelve.

  2. In the Unshelve dialog type the name of any team member with a TFS workspace and click Find to retrieve a list of that team member's shelvesets. In the example below we are retrieving one of our own shelvesets, and selecting the one we created above. Click Unshelve.

     

Viewing Shelveset Details

To view details of a saved shelveset:

  1. In the Unshelve dialog, after you have completed your search (Steps 1 -2 above), right-click a shelveset from the list and select Details.

  2. In the Shelveset Details dialog, right-click a file and select from the popup menu. By selecting View, the shelved file opens in your Eclipse editor window where you can examine it before unshelving it. You also have the option to use the compare editor. For more information on this option, see Comparing versions .