- heap-alloc.cpp: allocate memory from env's heap.
- create-thread-deprecated.cpp: create deprecated thread.
- transfer-mem.cpp: transfer memory between two entrypoint.
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
[gui] | |
fontui = -family 微软雅黑Monaco -size 8 -weight normal -slant roman -underline 0 -overstrike 0 | |
fontdiff = -family \"YaHei Consolas Hybrid\" -size 8 -weight normal -slant roman -underline 0 -overstrike 0 | |
encoding = utf-8 | |
warndetachedcommit = true | |
tabsize = 4 | |
recentrepo = D:/Open/foundationdb-haskell | |
[user] | |
email = [email protected] | |
name = HE, Tao |
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
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
set number | |
set confirm | |
set autoread | |
set spell | |
set clipboard+=unnamed | |
set mouse+=a |
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
# If not running interactively, don't do anything | |
[[ "$-" != *i* ]] && return | |
# Completion options | |
# | |
# These completion tuning parameters change the default behavior of bash_completion: | |
# | |
# Define to access remotely checked-out files over passwordless ssh for CVS | |
COMP_CVS_REMOTE=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
# To the extent possible under law, the author(s) have dedicated all | |
# copyright and related and neighboring rights to this software to the | |
# public domain worldwide. This software is distributed without any warranty. | |
# You should have received a copy of the CC0 Public Domain Dedication along | |
# with this software. | |
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
# base-files version 4.2-3 | |
# ~/.inputrc: readline initialization file. |
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
# Detect operating system in Makefile. | |
# Author: He Tao | |
# Date: 2015-05-30 | |
OSFLAG := | |
ifeq ($(OS),Windows_NT) | |
OSFLAG += -D WIN32 | |
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) | |
OSFLAG += -D AMD64 | |
endif |
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 <assert.h> | |
#include <libcgroup.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#define _GNU_SOURCE | |
#include <unistd.h> |
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
------------------------------------------------------------- | |
-- | | |
-- Copyright: (c) Tao He 2016 | |
-- License: MIT | |
-- Maintainer: [email protected] | |
-- | |
-- Signal-slot mechanism in Haskell. | |
-- | |
import Control.Monad |
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
/** | |
* author: Tao He, [email protected] | |
*/ | |
uint64_t rdtsc() { | |
uint32_t lo, hi; | |
__asm__ __volatile__("rdtsc" : "=a"(lo), "=d"(hi)); | |
return (uint64_t)hi << 32 | lo; | |
} |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from time import time | |
import math | |
def prime_sum_impl(n): | |
r = int(math.sqrt(n)) | |
v = [n//i for i in range(1, r+1)] | |
v += list(range(v[-1]-1, 0, -1)) |
OlderNewer