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
internal class HtmlTextWriter : XmlWriter | |
{ | |
private readonly TextWriter _writer; | |
private readonly HtmlWriterSettings _settings; | |
private readonly StringBuilder _attrValue = new StringBuilder(); | |
private string _lastTagName; | |
private int _line = 1; | |
private readonly Stack<TagInfo> _openTags = new Stack<TagInfo>(); | |
private string _prefixForXmlNs = null; |
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
declare namespace Backbone { | |
class Model<T> { | |
constructor(attr?:T, opt?:any) | |
attributes : T | |
collection: Collection<this> | |
cid: string | |
get<K extends keyof T>(prop:K) : T[K] | |
set<K extends keyof T>(prop:K , val:T[K]) : void | |
defaults() : T | |
on(eventName: string, callback: (...args: any[]) => void) |
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.Diagnostics; | |
using System.IO; | |
using System.Threading; | |
using System.Threading.Channels; | |
using System.Threading.Tasks; | |
namespace Namespace | |
{ | |
internal class AsyncProcess |
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
/* | |
* Derived from https://github.com/google/google-authenticator-android/blob/master/AuthenticatorApp/src/main/java/com/google/android/apps/authenticator/Base32String.java | |
* | |
* Copyright (C) 2016 BravoTango86 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
public static class Utils | |
{ | |
[Flags] | |
public enum MergeStatus | |
{ | |
LeftOnly = 1, | |
RightOnly = 2, | |
Both = 3, | |
} |
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
string myAml; | |
using (var writer = new System.IO.StringWriter()) | |
using (var xml = System.Xml.XmlWriter.Create(writer, new System.Xml.XmlWriterSettings() | |
{ | |
OmitXmlDeclaration = true | |
})) | |
{ | |
xml.WriteStartElement("AML"); | |
for (var i = 0; i < 10; i++) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
namespace QS | |
{ | |
public class QueryString : IDictionary<string, QueryValue> | |
{ | |
private string _root; | |
private Dictionary<string, QueryValue> _dict; | |
public ICollection<string> Keys { get { return _dict.Keys; } } | |
public ICollection<QueryValue> Values { get { return _dict.Values; } } | |
public int Count { get { return _dict.Count; } } |
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
public interface ILink<T> where T : ILink<T> | |
{ | |
string Term { get; } | |
T Next { get; set; } | |
} | |
static class LinkedListOps | |
{ | |
public static void Add<T>(ref T lastLink, T newLink) where T : class, ILink<T> | |
{ |
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.Collections; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Special dictionary for aggregating values | |
/// </summary> | |
public class Aggregator<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> | |
{ | |
private Dictionary<TKey, TValue> _values = new Dictionary<TKey, TValue>(); |
NewerOlder