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.Data; | |
using System.Data.SqlClient; | |
using Dapper; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace isolationmode_demo |
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
/// <summary> | |
/// Enumerates constants on a type. | |
/// </summary> | |
public static IEnumerable<FieldInfo> GetConstantsOnType(Type TypeToReflect) | |
{ | |
return TypeToReflect.GetFields().Where(f => f.IsStatic && f.IsLiteral); | |
} | |
/// <summary> | |
/// Enumerates constants on a type of a type. |
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
# This script will uninstall anything like *Java* from Add/Remove Programs, Unblock and Install a new JDK, | |
# and set the JAVA_HOME environment variable for the new version. | |
# | |
# You have to set the $jdkInstallerPath first to the location where you got the JDK. Such as: | |
# $jdkInstallerPath = "C:\Users\MyAccount\Downloads\jdk-7u60-windows-x64.exe" | |
# | |
# WARNING: This will uninstall ANYTHING that says Java anywhere in the name!!! Use with caution!!! | |
# | |
# Note: This assumes that you are using the x64 JDK on 64-bit Windows. Not tested in other scenarios. |
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
module.exports = function (grunt) { | |
grunt.initConfig({ | |
qunit: { | |
default: { | |
options: { | |
urls: ["http://localhost:8000/tests/tests.html"] | |
} | |
} | |
}, | |
connect: { |
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
// demo of web server and client request. Lines 17 or 18 can be used and it works. | |
import http = require('http'); | |
class Test { | |
request: http.ClientRequest; | |
private Connect() { | |
console.log("connecting"); | |
this.request = http.request({ | |
hostname: "localhost", |
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
import {Promise as Promise} from 'es6-promise'; | |
module exec { | |
function doExec(shouldSucceed: boolean) : Promise<number> { | |
return new Promise((resolve, reject) => { | |
doSubExec(shouldSucceed) | |
.then((result) => { | |
resolve(result); | |
},(error) => { |
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.IO; | |
using System.Net; | |
namespace getReleaseInfo | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
// INTERFACES | |
public interface ITicker | |
{ | |
event Action<ITicker,ITimeOfTick> Tick; | |
} | |
public interface ITimeOfTick | |
{ | |
DateTime Time { get; set; } |
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
'=============================================================================== | |
' This macro originally written by Sam Saffron, adapted for Visual Studio 2013 | |
' by Steve Ognibene. Run in Visual Studio with a macro launcher such as the | |
' Visual Commander extension. | |
' Latest version will be here: https://gist.github.com/nycdotnet/947025d922fa2af87d03 | |
' Original Stack Overflow thread: http://stackoverflow.com/questions/3783648/is-there-a-setting-in-vs-2010-that-will-allow-it-to-recover-open-files-after-a-p/28130299#28130299 | |
' Also, thanks to Jeremy Jameson for code to write to VS Output window in a macro: | |
' http://blogs.msdn.com/b/jjameson/archive/2009/03/11/tracing-and-logging-from-visual-studio-macros.aspx | |
'=============================================================================== | |
Option Explicit On |
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
Testing 0 | |
0-0-0-0-0-0-0-0- | |
After rehydrate: 0 | |
Testing 1 | |
0-0-0-0-0-0-240-63- | |
After rehydrate: 1 | |
Testing -1 | |
0-0-0-0-0-0-240-191- | |
After rehydrate: -1 | |
Testing NaN |