Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
private static string convertWildcardToRegex(string pattern) | |
{ | |
// http://stackoverflow.com/a/6907849/107625 | |
// http://www.codeproject.com/Articles/11556/Converting-Wildcards-to-Regexes | |
return "^" + Regex.Escape(pattern). | |
Replace("\\*", ".*"). | |
Replace("\\?", ".") + "$"; | |
} |
// MIT license, copyright 2015 Joseph N. Musser II | |
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
namespace jnm2 | |
{ | |
public struct WeakDelegate<TDelegate> : IEquatable<WeakDelegate<TDelegate>> where TDelegate : class |
// MIT license, copyright 2015 Joseph N. Musser II | |
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using System.Runtime.CompilerServices; | |
namespace jnm2 | |
{ |
using System; | |
using System.Threading; | |
static class Program { | |
static void Main() { | |
Console.Write("Performing some task... "); | |
using (var progress = new ProgressBar()) { | |
for (int i = 0; i <= 100; i++) { | |
progress.Report((double) i / 100); |
/* | |
* Created by C.J. Kimberlin | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2019 | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
/* | |
* Created by C.J. Kimberlin (http://cjkimberlin.com) | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2014 | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
/// <summary> | |
/// Wrapper for GDI text rendering functions<br/> | |
/// This class is not thread-safe as GDI function should be called from the UI thread. | |
/// </summary> | |
/// <remarks> | |
/// http://theartofdev.com/2013/08/12/using-native-gdi-for-text-rendering-in-c/<br/> | |
/// The MIT License (MIT) Copyright (c) 2014 Arthur Teplitzki. | |
/// </remarks> | |
public sealed class NativeTextRenderer : IDisposable | |
{ |
// MIT License - Copyright (c) 2016 Can Güney Aksakalli | |
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net.Sockets; | |
using System.Net; | |
using System.IO; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
using System; | |
using System.Drawing; | |
using System.Drawing.Drawing2D; | |
using System.Drawing.Text; | |
using System.Linq; | |
using System.Windows.Forms; | |
public class TransparentLabel : Label { | |
public TransparentLabel() { |