This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
AngularJs initialize scope from pre-existing html form values by Florian Kollmann <floko84@gmail.com> | |
*/ | |
; angular.module('formInit', []) | |
.directive('formInit', ['$parse', function ($parse) { | |
return { | |
restrict: 'A', | |
link: function (scope, element, attrs) { | |
var value = element.val(); | |
if (value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web; | |
using System.Web.Hosting; | |
public static class VirtualPathHelper | |
{ | |
/// <summary> | |
/// Returns the virtual path that corresponds to the specified physical file path. | |
/// </summary> | |
/// <param name="path"></param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using System.Windows.Forms; | |
public static class ScreenCapture | |
{ | |
/// <summary> | |
/// Creates an <see cref="Image"/> object containing a screen shot of the entire desktop. | |
/// </summary> | |
/// <returns></returns> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
namespace FreeImageAPI | |
{ | |
public static partial class FreeImage | |
{ | |
private static readonly bool is64BitProcess = (IntPtr.Size == 8); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
/// <summary> | |
/// Thread safe disposable exclusive lock, uses <see cref="Mutex"/>. | |
/// </summary> | |
public class MutexLock : IDisposable | |
{ | |
private volatile ManualResetEventSlim releaseMutexEvent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
/// <summary> | |
/// Structure of an Microsoft Office disabled item entry. | |
/// </summary> | |
public readonly struct DisabledItem | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Security.Cryptography; | |
public class PasswordCryptoServiceProvider : IDisposable | |
{ | |
protected const string Base58Chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; | |
private readonly SymmetricAlgorithm algorithm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
jQuery Prevent Double Submit Plugin by Florian Kollmann <floko84@gmail.com> | |
*/ | |
; (function ($) { | |
"use strict"; | |
var pluginName = "preventDoubleSubmit", | |
defaults = { | |
valid: function () { | |
// run jQuery validate if available | |
return !$.isFunction($.fn.valid) || $(this).valid(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.Caching; | |
public class SlidingTimer | |
{ | |
public EventHandler TimeoutElapsed; | |
private readonly ObjectCache cache; | |
private readonly CacheItemPolicy cacheItemPolicy; | |
private readonly string cacheKey; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Configuration; | |
public abstract class ConfigurationElementCollection<T> : ConfigurationElementCollection, IList<T> where T : ConfigurationElement | |
{ | |
public new bool IsReadOnly | |
{ | |
get { return base.IsReadOnly(); } | |
} |