When using sprintf you can use the same argument like so:
sprintf(“You want the %1$s? You can’t handle the %1$s!”, “truth”);
The %1$s means it will pull from the first argument.
A Log of Coding Solutions
by Webhead
When using sprintf you can use the same argument like so:
sprintf(“You want the %1$s? You can’t handle the %1$s!”, “truth”);
The %1$s means it will pull from the first argument.
by Webhead
I have a database that needs to accommodate all languages. Currently it is set to the default latin1_swedish_c1. I’m thinking I need to change it to UTF8, but there are so many UTF8 encodings!
“_cs” is for case sensitive collations. So for case insensitive applications you can use utf8_general_ci. utf8_bin is binary so it’s case sensitive.
by Webhead
In SQL Server 2008, to see all available db backups:
select * from msdb.dbo.backupset
by Webhead
by Webhead
I can’t center the Image or there are spaces between my images. If I delete the spacing in the code it goes away. Why is this?
img { display:inline}
If the img has no display attribute defined, the default display is inline. This means that the image can be centered with text-align:center from an outer element. However, if there is a space between images, it may show a space when it is displayed. You can think of inline display as treating the image like text.
img {display:block}
If the img has a display:block attribute defined, the image cannot be centered with the text-align:center from an outer element. The image will take up the full line so that the elements before and after will appear on a different line. Because the image takes up the whole line, centering the image doesn’t have any effects. Spaces between images also do not show because the image fills the whole line.
A nice explanation of inline vs block can be found here: http://www.webdesignfromscratch.com/html-css/css-block-and-inline/
by Webhead
Some great tools for optimizing images so that it downloads faster:
http://www.webdesignbooth.com/12-really-useful-image-optimization-tools-for-web-designers/