How to add a browser tab icon (favicon) for a website?

There are actually two ways to add a favicon to a website. <link rel=”icon”> Simply add the following code to the <head> element: PNG favicons are supported by most browsers, except IE <= 10. For backwards compatibility, you can use ICO favicons. Note that you don’t have to precede icon in rel attribute with shortcut … Read more

Convert HTML to PDF in .NET

I want to generate a PDF by passing HTML contents to a function. I have made use of iTextSharp for this but it does not perform well when it encounters tables and the layout just gets messy.

What does “javascript:void(0)” mean?

The void operator evaluates the given expression and then returns undefined. The void operator is often used merely to obtain the undefined primitive value, usually using “void(0)” (which is equivalent to “void 0”). In these cases, the global variable undefined can be used instead (assuming it has not been assigned to a non-default value). An … Read more

Searching the student-t distribution table for values using python

For a meaningful interpolation, you would first need to define a 2D inperpolation function (bilinear, bicubic). For better resutls directly use the scipy implementations of the percent point function (i.e. the inverse cumulative distribution function). Result is v: 2.57058 so the result is the same as the 2.571 from your table. This code reproduces your … Read more

What does enumerate() mean?

The enumerate() function adds a counter to an iterable. So for each element in cursor, a tuple is produced with (counter, element); the for loop binds that to row_number and row, respectively. Demo: By default, enumerate() starts counting at 0 but if you give it a second integer argument, it’ll start from that number instead: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)