Skip to content

Instantly share code, notes, and snippets.

View ahmadyan's full-sized avatar

Adel Ahmadyan ahmadyan

View GitHub Profile
@ahmadyan
ahmadyan / utility.cpp
Created September 6, 2012 01:07
tick-tock
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <string>
#include "utils.h"
using namespace std;
namespace utils {
@ahmadyan
ahmadyan / utility.cpp
Created September 2, 2012 05:28
Utility
#include "utility.h"
#include <iostream>
#include <ctime>
#include <cstdlib>
namespace utility {
using namespace std;
// Generate a random number between 0 and 1
// return a uniform number in [0,1].
@ahmadyan
ahmadyan / Script-ExtendedMonitor
Created August 29, 2012 17:15
AutoIt Script file for Showing Desktop on (Extended Monitor Setting) & (Monitor 2 only), Only works on windows 7 with AutoIt, Highly system-dependent
Run("C:\WINDOWS\system32\control.exe desk.cpl", "C:\Windows\system32\")
WinWait("Screen Resolution")
ControlCommand("Screen Resolution", "", "ComboBox3", "SetCurrentSelection", "1")
ControlClick("Screen Resolution", "", "Button4")
WinWait("Display Settings")
ControlClick("Display Settings", "", "Button1")