Dive into the archives.
I thought it would be helpful to share this piece of simple code
In VB.NET, it is pretty easy to convert a decimal number (say, 12345.6789) to currency format ($12,345.679)
Just convert the number using the lines of code as shown below:
Dim value_int As Integer = 12345.6789 ' original decimal number
Dim digit As Integer = 3 ' to format it to 3 decimal places
Dim value_str As String = value_int.ToString("C" & digit, Globalization.CultureInfo.CreateSpecificCulture("en-US"))
Also check out other cultures available here.
One of the most important element in SEO (Search Engine Optimisation) is to have your site indexed properly (and regularly) by popular search engines.
As of today, Google has a significantly huge market share of 84.96% (resource) and is definitely hard for website owners to ignore.
I’m going to walk you through on how I generated XML Sitemaps for adorr.net (powered by WordPress) and submit the sitemap to Google for in-depth crawling.
I was doing some SEO for my site the other day when I came across some inconsistencies in my website URL. Some appears to be adorr.net while the rest are www.adorr.net.
Do note that this only applies to Linux hosting accounts.
This can be annoying for search engines listings, and even cause mismatching paths when using Google Webmaster Tools to submit sitemap.
This issue however can be easily fixed by modifying .htaccess, and I decided to go with shorter version of adorr.net without www
Below is how the first part of my .htaccess
* Remember to replace adorr.net with your own domain!
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.adorr.net$ [NC]
RewriteRule ^(.*)$ http://adorr.net/$1 [L,R=301]
Do note that the code above is to rewrite all requests of www.adorr.net to adorr.net.
If you want it to be the other way round, use the following .htaccess instead
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^adorr.net$ [NC]
RewriteRule ^(.*)$ http://www.adorr.net/$1 [L,R=301]
Cheers!
People have been asking me about how to make a footer stick to the bottom of the screen regardless of which vertical position the browser screen is at. In other words, how to create a footer just like how Facebook does it.
First of all, there are two different types of footer which I’d like to classify them as Floating Header Footer and Sticky Header Footer.
With Apple’s iPhone and iPod Touch, Google’s Android smartphones and other portable devices gradually dominating the market, it is getting more important to optimize websites to look better in these relatively-smaller-screen portable devices.
If you have been in CSS game for quite a while, you may think that defining media=handheld will do the trick
@media handheld {
.navigation {
display: none;
}
}
Unfortunately Apple defined it in such that iPhones will look for “screen” media type instead of the limited “handheld” media which deem to be outdated.
The solution to this is to specify CSS rule that looks at the device screen resolution.
There are some sayings that Internet Explorer has issues ignoring the CSS rule, but that can be easily fixed with Internet Explorer’s “conditional comments” feature.
Conceptually, you can define a separate set of CSS for iPhone (or devices with width less than 480px) as follow:
<!--[if !IE]>-->
<link media="only screen and (max-device-width: 480px)" rel="stylesheet" type="text/css" href="iphone.css"/>
<!--<![endif]-->
And the iphone.css can be any CSS definitions that will overwrites the original CSS definitions.
Hopefully this basic and simple trick can help you to kick start your website revamp to cater for different sizes of portable devices.



