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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#include <QCoreApplication> | |
#include <qdatetime.h> | |
#include <windows.h> | |
// QT 5.4 - Console Application | |
// (RUN AS ADMINISTRATOR) | |
// | |
int main(int argc, char *argv[]) | |
{ |
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
// | |
// Delete Registry (64bit machine - 64bit Registry) | |
// | |
HKEY hKey = NULL; | |
long lReturn = RegOpenKeyEx( HKEY_LOCAL_MACHINE,(L"SOFTWARE\\coderbox\\Boost"),0L,KEY_WRITE| KEY_WOW64_64KEY,&hKey ); | |
if (lReturn == ERROR_SUCCESS) | |
{ | |
lReturn = RegDeleteValueW(hKey, (L"OpenGL")); | |
RegCloseKey(hKey); |
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
// Main Widget | |
QWidget *mainAppWindow = new QWidget; | |
mainAppWindow->setWindowTitle("Runtime GUI"); | |
mainAppWindow->setFixedSize(200, 300); | |
// Parent layout | |
QVBoxLayout *layoutParent= new QVBoxLayout(); | |
// List of items |
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
// | |
// Removes as many pages as possible from the working set of the current process. | |
// Library: Psapi.h | |
// | |
if(EmptyWorkingSet(GetCurrentProcess())) | |
{ | |
// Cleared up some working set | |
} | |
else |
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
#include "tinyxml2.h" | |
using namespace tinyxml2; | |
using namespace std; | |
//<EMAIL> | |
// <HEADER> | |
// <TO> | |
// </TO> |
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
// MP 2: Due Sunday, Dec 16, 2012 at 11:59 p.m. PST | |
#include <wb.h> | |
#define wbCheck(stmt) do { \ | |
cudaError_t err = stmt; \ | |
if (err != cudaSuccess) { \ | |
wbLog(ERROR, "Failed to run stmt ", #stmt); \ | |
return -1; \ | |
} \ | |
} while(0) |
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; | |
using System.Diagnostics; | |
using System.Threading; | |
namespace RemoveTrayPin |
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
// http://www.spoj.pl/problems/NHAY/ | |
#include <vector> | |
#include <iostream> | |
#include <string> | |
#include <cstdio> | |
using namespace std; | |
void kmp(const string &needle, const string &haystack) { | |
int m = needle.size(); | |
vector<int> border(m + 1); |
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
#include <windows.h> | |
#include <sddl.h> | |
#include <stdio.h> | |
#include <winevt.h> | |
#pragma comment(lib, "wevtapi.lib") | |
const int SIZE_DATA = 4096; | |
TCHAR XMLDataCurrent[SIZE_DATA]; |
OlderNewer