Get a Double Random Number | Quick Tip

This is useful since the Random() object can only export a double number between 0.0 and 1.0
class Program
    static void Main(string[] args)
        double dr = GenRand(1.0, 20.0);

    static double GenRand(double one, double two)
        Random rand = new Random();
        return one + rand.NextDouble() * (two - one);
Resources: here

CSS | Hide Overflow Vertical Scrollbar

When you set a div style like this:

width: 600px;
overflow: auto;

it will show both the horizontal and vertical scrollbars if the content is large enough to require them.

However in IE due to a bug, you can still see them.

The solution would be to use the following css styling to hide the vertical scrollbar: Read the rest of this entry »

Convert degrees to minutes for Google Maps in Excel

Normal Formula

=”N” & INT(H2) & ” ” & ROUND(((H2 – INT(H2)) * 60), 6)

Advanced Excel Formula:

= IF(INT(F41) < 0, “”, “E” & INT(F41) & ” ” & IF((F41 – INT(F41)) * 60 < 10, “0”, “”) & ┬áROUND(((F41 – INT(F41)) * 60), 6))

If less than zero, show nothing and also adds a 0 if less than 10

Mime Types

Was searching for the flash content mime type and found this list of all the mime types available.

They are listed first by content type and then by file extension. Check it out here on w3 schools website

The mime types I needed where for:

  • flash (swf) which is application/x-shockwave-flash
  • and jpegs which is image/jpeg