What is RadaCode.SwissKnife?
SwissKnife is a RadaCode's collection of C# classes that facilitate the overall development and help with stuff like HTML removal, random name and number generation, etc.
Currently the following features are implemented in SwissKnife:
- KMeans clustering algorithm implementation to cluster instances of System.Drawing.Point.
- HtmlRemoval - a routine to remove HTML markup from a string.
- TimeSpanToReadableString is a basic human-readable time span ToString'er (English and Russian are currently implemented).
- ConvertBytesToMegabytes and ConverKilobytesToMegabytes are two methods in the computer conversions namespace with a self descriptive names.
A Radacode.SwissKnife.Search namespace contains a
Bing Image Search implementation. Whenever you need to get random or "by keyword" images, you can use this call to do it for you. You just need a Bing API key (acquired by registering a developer account and an application account
at Bing Developer Center) and a FileStream for the cache mechanism to save images to for fast delivery. For example want to get 15 cat images? No problem - just create an instance of BingImageRetriver
and call GetImagesByKeyword("Cat", 15); A Binary-encoded and URL image results are currently supported.
A Radacode.SwissKnife.Random namespace contains the following random generators:
- Mersenne Twister random number generator.
- Random name generator is a static class that will generate a random string (strings are positive English words) on it's GetRandomName() call.
- RandomWordSearcher - a class, that will allow you to generate a truly random words. It either takes an RSS feed URL provided in a constructor, or just uses Google News feed to grab a required number of random words
from articles description. Every call to get random words generates nearly unique results. Requires a consuming application to have HTTP access to RSS feed URL.
A Radacode.SwissKnife.Mathematics namespace contains the following mathematical routines implementations:
- Levenshtein distance calculator for two string values
We'd recommend installing it via NuGet