This file contains hidden or 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
private static bool CheckWellFormed(string input) | |
{ | |
var stack = new Stack<char>(); | |
// dictionary of matching starting and ending pairs | |
var allowedChars = new Dictionary<char, char>() { { '(', ')' }, { '[', ']' }, { '{', '}' } }; | |
var wellFormated = true; | |
foreach (var chr in input) | |
{ | |
if (allowedChars.ContainsKey(chr)) |
This file contains hidden or 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
// set an identifier for the console div | |
var consoleId = 'debug_console'; | |
// initialize the debug console, dock to bottom of page | |
var debugConsole = function () { | |
var body = document.getElementsByTagName('body')[0]; | |
// since this function also gets called on clear(), | |
// we'll remove the div if it exists so we can re-add it |
This file contains hidden or 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
// Reference https://gist.github.com/trailmax/553ea84d4d0e2e20fcd7 | |
function VerifyHashedPassword(password, hashedPwd) { | |
// NodeJS implementation of crypto | |
var crypto = require('crypto'); | |
var hexChar = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; | |
var hashedPasswordBytes = new Buffer(hashedPwd, 'base64'); | |
var saltString = ""; |
This file contains hidden or 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
SET check_function_bodies = false; | |
-- ddl-end -- | |
-- object: stealthis | type: SCHEMA -- | |
-- DROP SCHEMA stealthis CASCADE; | |
CREATE SCHEMA stealthis; | |
-- ddl-end -- | |
SET search_path TO pg_catalog,public,stealthis; | |
-- ddl-end -- |
This file contains hidden or 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.Text; | |
using System.Runtime.InteropServices; | |
namespace HID | |
{ | |
public static class Constants | |
{ |