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
#ifndef SHORT_ALLOC_H | |
#define SHORT_ALLOC_H | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2015 Howard Hinnant | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
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
#pragma once | |
#include <exception> | |
#include <type_traits> | |
#include <utility> | |
namespace folly { | |
namespace detail { |
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
bool SetProcessSEPrivilege(HANDLE process, PrivilegeOption option) | |
{ | |
DWORD flags = TOKEN_ADJUST_PRIVILEGES; | |
base::win::ScopedHandle token; | |
if (!OpenProcessToken(process, flags, token.Receive())) | |
{ | |
return false; | |
} | |
LUID uid; |
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/python3 | |
# -*- coding: utf-8 -*- | |
# 0xCCCCCCCC | |
import argparse | |
import os | |
import shlex | |
import shutil | |
import subprocess |
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
#!python3 | |
# -*- coding: utf-8 -*- | |
# 0xCCCCCCCC | |
import re | |
import shlex | |
import subprocess | |
import sys | |
FIRST_REV = '' |
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 <tchar.h> | |
#include <algorithm> | |
#include <cstdlib> | |
#include <iostream> | |
#include <queue> | |
#include <string> | |
#include <process.h> | |
#include <Windows.h> |
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
/****************************************************************************** | |
Module: Singleton.cpp | |
Notices: Copyright (c) 2008 Jeffrey Richter & Christophe Nasarre | |
******************************************************************************/ | |
#include "resource.h" | |
#include "..\CommonFiles\CmnHdr.h" /* See Appendix A. */ | |
#include <windowsx.h> |
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 std::string Record; | |
class GTAClient { | |
public: | |
virtual ~GTAClient() {} | |
virtual bool Filter(const Record&) | |
{ | |
return true; | |
} |
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
def GetMatePrefList(pref_list, person): | |
for i in range(len(pref_list)): | |
if person == pref_list[i][0]: | |
return pref_list[i][1] | |
def Match(men_pref_list, women_pref_list): | |
free_man = [] | |
free_woman = [] | |
for man in men_pref_list: | |
free_man.append(man[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
void CALLBACK OverlappedCompletionRoutine(PTP_CALLBACK_INSTANCE instance, | |
PVOID context, | |
PVOID overlapped, | |
ULONG io_result, | |
ULONG_PTR bytes_transferred, | |
PTP_IO io) | |
{ | |
auto ov = static_cast<OVERLAPPED*>(overlapped); | |
std::cout << "read " << bytes_transferred << std::endl; | |
std::cout << static_cast<char*>(context); |
NewerOlder