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
// ==UserScript== | |
// @name HipChat append fix | |
// @namespace http://joeyrobichaud.com/ | |
// @version 0.1 | |
// @description Sending multiple messages in a row will create multiple chat blocks even though you are the sender of each of them. this fixes that. | |
// @match https://*.hipchat.com/chat | |
// @copyright 2014+, Joey Robichaud | |
// ==/UserScript== | |
window.addEventListener("load", function(e) { |
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 class Func | |
{ | |
//Two Params | |
public static Func<T2, TR> Apply<T1, T2, TR>(Func<T1, T2, TR> func, T1 arg1) | |
{ | |
return (arg2) => func(arg1, arg2); | |
} | |
//Three Params | |
public static Func<T2, T3, TR> Apply<T1, T2, T3, TR>(Func<T1, T2, T3, TR> func, T1 arg1) |
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.Tasks; | |
using Windows.ApplicationModel.Core; | |
using Windows.UI.Core; | |
namespace TheDevStop.Mobile.Framework | |
{ | |
public class UITask | |
{ | |
static readonly CoreDispatcher _dispatcher; |
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.Generic; | |
namespace TheDevStop.CsGuard | |
{ | |
public class Contracts | |
{ | |
public enum Kind | |
{ | |
PreCondition, |
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 function isNullOrEmpty(object:Object):Boolean | |
{ | |
if (!object) | |
return true; | |
if (object is Array || | |
object is IList) | |
return !object.length; | |
for (var key:String in object) |
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
package com.thedevstop | |
{ | |
import flash.events.ErrorEvent; | |
import flash.events.Event; | |
import flash.events.EventDispatcher; | |
import flash.utils.setTimeout; | |
[Event(name="complete", type="flash.events.Event")] | |
[Event(name="error", type="flash.events.ErrorEvent")] | |
public class CSVReader extends EventDispatcher |
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.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace TestNullCheckingExpressions | |
{ | |
class Program |
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 class ConfidenceStore<T> where T : class | |
{ | |
public event EventHandler<EventArgs<T>> Changed; | |
private Queue<T> queue; | |
private int length; | |
private int threshold; | |
private T confidentItem; | |
public ConfidenceStore(int length, int threshold) |
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
{ | |
function createObject(kvps) { | |
var object = {}; | |
for (var index = 0; index < kvps.length; index++) { | |
var value = kvps[index].value; | |
value = value == undefined ? null : value; | |
object[kvps[index].key] = value; | |
} | |
return object; | |
} |
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
void Main() | |
{ | |
var unsortedNames = GetNames(); | |
var sortedNames = SortNames(unsortedNames); | |
PrintArray(sortedNames); | |
} | |
// Formats and sorts an array of name strings. | |
// Input: An unordered array of strings in the format '{LastName}, {FirstName}' | |
// Output: An ordered array of strings in the format '{FirstName} {LastName}' |