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
CoordMode, Mouse, Screen | |
MouseGetPos, CurrentX, CurrentY | |
Loop { | |
Sleep, 60000 | |
LastX := CurrentX | |
LastY := CurrentY | |
MouseGetPos, CurrentX, CurrentY | |
If (CurrentX = LastX and CurrentY = LastY) { |
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
Option Explicit | |
Const SOUND_FILE_LOCATION As String = "C:\Users\Demuyt\Documents\REMINDER.WAV" | |
Const ACTION_CUTOFF_IN_SECONDS As Integer = 1600 | |
Sub setMeetingReminderSounds() | |
Dim reminder As reminder | |
Dim appointment As AppointmentItem | |
Dim secondsLeft As Long |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>test_cycle #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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 merge(object, boltOn) { | |
//Simply merge the properties of boltOn into object | |
for(var property in boltOn) | |
if(boltOn.hasOwnProperty(property)) | |
object[property] = boltOn[property]; | |
return object; | |
} | |
function compose( /*Constructor1, Constructor2, ..*/ ) { | |
//Keep a closure reference for later |
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 Hmm = (function() | |
{ //A snippet/library to find records in table-like JS arrays | |
function getNamedValue( o , name ) | |
{ //Name can have dots, 'car.tire.brand.name' should get the expected | |
var parts = name.split("."); | |
while( parts.length && o ){ | |
o = o[parts.shift()]; | |
} | |
return o; |
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
//Good | |
function lambdafy( f ) | |
{ | |
return function lambdafier() { | |
var args = Array.prototype.slice.call(arguments); | |
return function lambda(){ | |
f.apply( this , 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
function fillTemplate( s ) | |
{ //Replace ~ with further provided arguments | |
for( var i = 1, a = s.split('~'), s = '' ; i < arguments.length ; i++ ) | |
s = s + a.shift() + arguments[i]; | |
return s + a.join(""); | |
} |
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 powerSet( list ){ | |
var set = [], | |
listSize = list.length, | |
combinationsCount = (1 << listSize); | |
for (var i = 1; i < combinationsCount ; i++ , set.push(combination) ) | |
for (var j=0, combination = [];j<listSize;j++) | |
if ((i & (1 << j))) | |
combination.push(list[j]); | |
return 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="ISEE Math Challenge Generator" /> | |
<meta charset=utf-8 /> | |
<title></title> | |
</head> | |
<body> | |
</body> |
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 sortfunction(a, b) | |
{ | |
return (a - b) //causes an array to be sorted numerically and ascending | |
} | |
function canWeDoIt( target , a ) | |
{ | |
if( a.length == 1 ) | |
return (a[0] == target); | |
if( a[0] == target ) |