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
if (navigator.userAgent.toLowerCase().indexOf("firefox") !== -1) { | |
// Firefox/Mozilla automatically adds a "bonus" row to textareas. Through CSS, force the height back to the number of rows specified before | |
// autosize sees it. | |
var height = parseFloat(input.css("line-height")) * opt.rows + parseFloat(input.css("padding-top")) + parseFloat(input.css("padding-bottom")); | |
input.css("height", height + "px"); | |
} | |
_.defer(function() { | |
input.autosize(); | |
}); |
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
var blink = function(element, style, times, duration, done) | |
{ | |
var orig = {}; | |
_.each(_.keys(style), function(k) { | |
orig[k] = element.css(k); | |
}); | |
var blinkOnce = function(count) { | |
console.debug(times); | |
element.animate(style, {duration: duration, complete:function() { | |
element.animate(orig, {duration: duration, complete:function() { |
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
#!/usr/bin/env python | |
# DICEWARE WORD LIST FROM: | |
# http://world.std.com/~reinhold/diceware.html | |
lines = """11111 a | |
11112 a&p | |
11113 a's | |
11114 aa | |
11115 aaa |
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
#!/usr/bin/env python | |
import os | |
import string | |
import sys | |
import random | |
# ===================================================== | |
CMIN=0x20 | |
CMAX=0x7E |
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.Text; | |
using System.Threading.Tasks; | |
using Microsoft.TeamFoundation.Client; | |
using Microsoft.TeamFoundation.TestManagement.Client; | |
using Microsoft.TeamFoundation.WorkItemTracking.Client; | |
using System.Net; |
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.IO; | |
using System.Linq; | |
using System.Net; | |
using System.ServiceModel; | |
using System.ServiceModel.Description; | |
using System.ServiceModel.Web; | |
using System.Text; |
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
#!/usr/bin/env python | |
import os | |
import sys | |
LINE_COUNT =40 | |
def dumpLines(basename, segment, lines): | |
fn ='%s_%02d.png' % (basename, segment) | |
print fn | |
f = os.popen("qrencode -o \"%s\" " % fn,'w') |
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
/* | |
************************************************************************ | |
Blink out a message in morse code | |
************************************************************************ | |
*/ | |
const int led = 13; | |
const char* message = "HELLO WORLD"; | |
const int letter_unit_delay = 500; |
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
samples=[ | |
# ======================================= | |
# input, expected result pairs | |
# ======================================= | |
# empty list | |
([], []), | |
# single digit | |
([1], [(1,1)]), | |
# basic range | |
([1,2,3], [(1,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
static void SetCrystalPath() | |
{ | |
string crpath; | |
if (Environment.Is64BitProcess) | |
{ | |
crpath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + @"\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64"; | |
} | |
else | |
{ | |
crpath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86"; |