Assume you have these classes:
public class Base
{
}
public class Derived : Base
{
}
using System; | |
using System.Collections.Concurrent; | |
namespace XY | |
{ | |
public interface IPool<T> | |
{ | |
T Take(); | |
void Return(T t); | |
} |
Assume you have these classes:
public class Base
{
}
public class Derived : Base
{
}
C# port of a simple skin color detection algorithm. Python original by SpliFF here. See also this Stack Overflow question.
Produces a lot of false positives but is great for quickly filtering a large set of unknown images.
This gist includes a class model in C# and XML of the ImmobilienScout24 CSV import file format. The files were generated from the tables contained in the official documentation (CSV_Import_IS24.doc, version 1.4.1.3).
The C# class model tries to provide as much static type information as can be gleaned from the documentation, in particular:
static Regex HtmlRegex = new Regex(@"</?([a-z]+[1-6]?)", RegexOptions.IgnoreCase); | |
static HashSet<string> HtmlTags = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "datalist", "dd", "del", "details", "dfn", "dir", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "map", "mark", "menu", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strike", "strong", "style", "sub", "summary", "sup" |
#! "net6.0" | |
using System.Net.Http; | |
using System.Xml; | |
using System.Xml.Linq; | |
var opts = Args.Where(a => a.StartsWith("-")); | |
if (Args.Except(opts).Count() < 1) | |
{ |