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 <cstdint> | |
#include <cstdlib> | |
#include <ctime> | |
#include <iostream> | |
#include <vector> | |
#include <unordered_set> | |
#include <boost/random.hpp> | |
#include <boost/random/mersenne_twister.hpp> | |
#include <boost/random/uniform_int_distribution.hpp> | |
#include <boost/random/variate_generator.hpp> |
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
/** | |
* smart_pointer_deleter_is_broken.cpp | |
* (c) 2011 Ji Han | |
* the specification of std::unique_ptr/std::shared_ptr is broken-- | |
* default constructed Deleter has no way to pass size_type n to Alloc::deallocate(T*, size_type) | |
*/ | |
#include <cstdlib> | |
#include <algorithm> | |
#include <iostream> |
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
#define WIN32_LEAN_AND_MEAN | |
#include <tchar.h> | |
#include <windows.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#if !defined(__cplusplus) && defined(_MSC_VER) | |
typedef enum { false, true } bool; |
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
#define WIN32_LEAN_AND_MEAN | |
#define NOMINMAX | |
#include <windows.h> | |
#include <io.h> | |
#include <cstdlib> | |
#include <ctime> | |
#include <iostream> | |
#include <limits> | |
#include <tuple> | |
#include <vector> |
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 <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <algorithm> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <unordered_map> | |
int main() |
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 <cstdint> | |
#include <cstdlib> | |
#include <ctime> | |
#include <algorithm> | |
#include <functional> | |
#include <iomanip> | |
#include <iostream> | |
#include <typeinfo> | |
#include <vector> | |
#include <boost/random.hpp> |
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
(function(){ | |
if (WScript.Arguments.Length !== 0){ | |
var app = WScript.Arguments(0); | |
} else { | |
WScript.Echo('sudo <application> [<parameters>]'); | |
WScript.Quit(1); | |
} | |
var sh = new ActiveXObject('Shell.Application'); |
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
@echo off | |
setlocal enableextensions | |
set dest=%userprofile%\downloads | |
pushd %temp% | |
:loop | |
for /f "usebackq delims=;" %%i in (`dir /a /b /s *.msi *.exe ^| findstr /i ^"chrome^"`) do ( | |
if not exist "%dest%\%%~nxi" xcopy "%%i" "%dest%\" >nul 2>&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
;;; init.el --- emacs configuration file | |
;; (C) Copyright 2009-2012 Ji Han | |
;; Last Updated: Mon, 10 Sep 2012 02:00:53 | |
;; custom-set-variables and custom-set-faces | |
;; {{{ | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. |
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
"vim configuration file | |
"(C) Copyright 2009-2012, Ji Han | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set fileencodings=ucs-bom,utf-8,gbk,big5,euc-jp,euc-kr,default | |
set encoding=utf-8 | |
language message en_US.utf-8 | |
set langmenu=en_US.utf-8 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
OlderNewer