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 <cstdint> | |
#include <iostream> | |
template <typename T> | |
class DInputRange | |
{ | |
public: | |
struct iterator | |
{ | |
const T* r; |
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 <type_traits> | |
//! range spanned by 2 iterators | |
template <typename Iterator> | |
struct IteratorRange | |
{ | |
IteratorRange(Iterator begin, Iterator end) | |
: _begin(std::move(begin)), | |
_end(std::move(end)) | |
{ |
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 <boost/iterator/zip_iterator.hpp> | |
#include <boost/range.hpp> | |
template <typename... T> | |
auto zip(T&&... containers) -> boost::iterator_range < boost::zip_iterator<decltype(boost::make_tuple(std::begin(containers)...))> > | |
{ | |
auto&& zip_begin = boost::make_zip_iterator(boost::make_tuple(std::begin(containers)...)); | |
auto&& zip_end = boost::make_zip_iterator(boost::make_tuple(std::end(containers)...)); | |
return boost::make_iterator_range(zip_begin, zip_end); | |
} |
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
cat build.log | fgrep suggest-final | sed -r 's/.+Declaring (.+) final [^0-9]+([0-9]+) calls?.+/\2 \1/g' | sort -k1,1 -nr | head -n25 |
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
template <typename T> | |
struct CUDAMem | |
{ | |
T* ptr; | |
CUDAMem() | |
: ptr(0) | |
{ | |
cudaError_t err = cudaMallocArray(&ptr, sizeof(T)); | |
if (err != cudaSuccess) |
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 decrypt(short* src, short* dest, int size) | |
{ | |
int x=0xA2C2A, y=0; | |
for (int i = 0; i < size; ++i) | |
{ | |
x = x*0x343FD + 0x269EC3; | |
y = x >> 0x10 & 0x7FFF; | |
dest[i] = src[i] ^ LOWORD(y); | |
} | |
} |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\General] | |
"U2DCheckVerbosity"=dword:00000001 |
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
using System; | |
using System.IO; | |
using System.Xml.Linq; | |
static class Program | |
{ | |
static void check(string fileName) | |
{ | |
XDocument project = XDocument.Load(fileName); | |
XNamespace msbuild = XNamespace.Get("http://schemas.microsoft.com/developer/msbuild/2003"); |
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 comment(lib, "D:\\Visual Leak Detector\\lib\\Win64\\vld.lib") | |
#include <D:\Visual Leak Detector\include\vld.h> | |
static int dummy = (VLDSetReportOptions(VLD_OPT_REPORT_TO_FILE | VLD_OPT_UNICODE_REPORT, nullptr), 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
import requests | |
from urllib.request import * | |
import sys | |
import os.path | |
def getDetails(type, id): | |
url = 'http://geoportal.geoportal-th.de/gaialight-th/_apps/dladownload/_ajax/details.php' | |
params = dict( | |
type = type, | |
id = id |
OlderNewer