8

Convert url in text to hyperlink with option to add nofollow attribute

Super Human 3/8/2015 2:12 PM

Find all Urls in plain text and replace them with HTML hyper links. This should allow adding a nofollow attribute, and an option of link opening in a new window.

2

Mean Angle

Andy 3/1/2015 5:01 PM

Arithmetic mean may not always be suited for circular quantities like angles, day times, fractional quantities. e.g Mean angle of 0 degrees & 360 degrees arithmetically is 180. However, 0 degrees & 360 degrees are the same value and the mean should be zero.

An IEnumerable<double> expecting angle values in radians

The mean angle in radians

3

Hamming Weight (Bit Count)

Eden 2/26/2015 3:50 AM

Hamming Weight is the number of 1's in the binary representation of a number.

Examples:

Number |
Binary Representation |
Hamming Weight |

9 | 1001 | 2 |

9741 |
10011000001101 |
6 |

0 | 0 | 0 |