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 <stdio.h> | |
#include <string.h> | |
#define BUF_NUM 32 | |
#define BUF_LEN 16 | |
static char *format(int val) | |
{ | |
static char buf[BUF_NUM][BUF_LEN]; | |
static int buf_i; |
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
// g++ evhttp-multh-thread-httpd.cpp -levent | |
#include <event.h> | |
#include <evhttp.h> | |
#include <pthread.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <sys/socket.h> | |
#include <sys/types.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
% usage: | |
% $ swipl -o party-accounting -c party-accounting.pl | |
% $ ./party-accounting | |
% ?- main. | |
:- use_module(library('clp/bounds')). | |
party_accounting(Nr_manager, Manager_yen, Nr_principle, Principle_yen, Nr_director, Director_yen, Nr_hira, Hira_yen, Total_yen) :- | |
Manager_yen in 0..Total_yen, |
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/env python | |
import sys, re | |
def conf_file(path): | |
f = open(path, 'r') | |
res = [] | |
for line in f.readlines(): | |
line = line.replace('vprintf', 'sd_printf') | |
line = line.replace('eprintf', 'sd_eprintf') |
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
cmake_minimum_required(VERSION 2.8) | |
SET(DynamoRIO_DIR "/home/mitake/dynamorio/exports/cmake") | |
find_package(DynamoRIO) | |
add_library(sample SHARED sample.c) | |
configure_DynamoRIO_client(sample) |
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
[2015/08/20-16:10:36.847511] xio_tcp_datapath.c:1753 [ERROR] - partial completion of request due to missing, response buffer | |
[2015/08/20-16:10:36.847559] xio_tcp_datapath.c:1812 [ERROR] - xio_tcp_send_msg failed | |
[2015/08/20-16:10:36.847580] xio_nexus.c:2200 [ERROR] - transport send failed err:1247689306 |
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
#!/bin/sh | |
# check for where the latest version of IDEA is installed | |
IDEA=/opt/intellij-idea-ce/bin/idea.sh | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |
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
diff --git a/include/linux/sched.h b/include/linux/sched.h | |
index 4a1f493..ef258ef 100644 | |
--- a/include/linux/sched.h | |
+++ b/include/linux/sched.h | |
@@ -1179,6 +1179,10 @@ struct sched_entity { | |
u64 exec_start; | |
u64 sum_exec_runtime; | |
u64 vruntime; | |
+#ifdef CONFIG_CFS_BVT | |
+ u64 effective_vruntime; |
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
#! /bin/bash | |
export ETCDCTL_API=3 | |
ETCDCTL=bin/etcdctl | |
echo p | $ETCDCTL user add root --interactive=false | |
echo p | $ETCDCTL user add u1 --interactive=false | |
$ETCDCTL role add root | |
$ETCDCTL role add r1 |
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
(pprof) top 295 | |
1.54s of 1.54s total ( 100%) | |
flat flat% sum% cum cum% | |
0.18s 11.69% 11.69% 0.19s 12.34% syscall.Syscall | |
0.13s 8.44% 20.13% 0.13s 8.44% github.com/coreos/etcd/cmd/vendor/golang.org/x/crypto/blowfish.encryptBlock | |
0.05s 3.25% 23.38% 0.05s 3.25% math/big.addMulVVW | |
0.05s 3.25% 26.62% 0.05s 3.25% math/big.divWW | |
0.05s 3.25% 29.87% 0.05s 3.25% math/big.mulAddVWW | |
0.05s 3.25% 33.12% 0.05s 3.25% runtime.futex | |
0.05s 3.25% 36.36% 0.05s 3.25% runtime.heapBitsSetType |
OlderNewer