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);
        Console.WriteLine(dr);
        Console.ReadLine();
    }

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

CSS | Hide Overflow Vertical Scrollbar

When you set a div style like this:

div#tbl-container
{
width: 600px;
overflow: auto;
scrollbar-base-color:#ffeaff
}

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: Continue reading