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
int main(int argv, char **args) { | |
EnumWindows(MyEnumProc, 0); | |
WunderlistWebCtrl = GetWindow(Wunderlist, GW_CHILD); | |
SetForegroundWindow(Wunderlist); | |
SetActiveWindow(Wunderlist); | |
SetFocus(WunderlistWebCtrl); | |
//Simulate a Ctrl+N keyboard shortcut | |
SendKey(VK_CONTROL, FALSE, KeyDown); |
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
#include <Windows.h> | |
HWND Wunderlist; | |
HWND WunderlistWebCtrl; |
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
int main(int argv, char **args) { | |
EnumWindows(MyEnumProc, 0); | |
SetForegroundWindow(Wunderlist); | |
SetActiveWindow(Wunderlist); | |
SetFocus(Wunderlist); | |
//Simulate a Ctrl+N keyboard shortcut | |
SendKey(VK_CONTROL, FALSE, KeyDown); | |
SendKey(0x4E, FALSE, KeyDown); | |
SendKey(0x4E, FALSE, KeyUp); |
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 SendKey(int vk, BOOL bExtended, bool KeyUp) { | |
KEYBDINPUT Keyboard; | |
INPUT Input; | |
ZeroMemory(&Keyboard, sizeof(KEYBDINPUT)); | |
ZeroMemory(&Input, sizeof(INPUT)); | |
if (bExtended) { | |
Keyboard.dwFlags |= KEYEVENTF_EXTENDEDKEY; | |
} | |
if (KeyUp){ |
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
#include <Windows.h> | |
HWND Wunderlist; | |
BOOL CALLBACK MyEnumProc(HWND hWnd, LPARAM lParam) { | |
char title[14]; | |
ZeroMemory(title, sizeof(title)); | |
GetWindowTextA(hWnd, title, sizeof(title)); | |
if (strncmp(title, "Wunderlist - ", 13) == 0) { |
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 FizzBuzz() { | |
this.TestCases = new Array(); | |
this.AddCase = function(Name, DivisibleBy) { | |
this.TestCases.push( | |
function (x) { | |
return x % DivisibleBy === 0 ? Name : ''; | |
} | |
); | |
}; | |
this.Run = function(x) { |
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
enum ByteOrder { | |
BIG_ENDIAN, | |
LITTLE_ENDIAN | |
}; | |
enum BTIException { | |
INTEGER_WIDTH_OUT_OF_BOUNDS | |
}; | |
template <typename IntType> |
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
typedef unsigned int DBObjectID; | |
class DBObject { | |
private: | |
static DBObjectID IDCounter; | |
static std::list<DBObjectID> RecycledIDs; | |
protected: | |
const DBObjectID ID; | |
public: | |
DBObject() : ID(GetNewID()) { | |
} |
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 mycollections; | |
public class AVLTree<T extends Comparable<T>> extends BinarySearchTree<T> { | |
public AVLTree() {super();} | |
public void add(T data) { | |
System.out.println("Insertion of :" + data.toString()); | |
AVLTreeNode parent = (AVLTreeNode) root; | |
Stack<Boolean> leftMoves; | |
Stack<AVLTreeNode> parents; | |
boolean placeNotFound = true; | |
if(root == null) { |
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
#include <iostream> | |
#include <limits> | |
#include <cmath> //Has our Absolute value function: abs() | |
namespace BTH { //Brent Taylor Helper namespace. ;) | |
template<typename T> | |
bool InputFromStream(std::istream &InputStream, T &Result) { | |
InputStream >> Result; | |
if (!InputStream.good()) { |