export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
export CXXFLAGS="-I/usr/local/include"
export CFLAGS="-I/usr/local/include"
Option --libdir
let it install to lib
directory rather then lib64
(MySQL can't recognize it)
内容协商 (Content Negotiation) 是 HTTP 协议重要的组成部分,它允许客户端与服务端协商内容的媒体类型 (MIME) 等信息,但不能拿来协商内容结构。日常开发当中,这个其实是刚需的功能:或许你还能记得客户端需要什么字段的时候,服务端就对应地修改返回的数据。反反复复的日子😂。为了解决这个问题,计划在 Accept 请求头当中 schema
参数用于协商数据结构
POST /sessions
Accept: application/json; charset=utf-8; schema={id,user{name,id}}
这个例子里,客户端协商数据结构为 {id,user{name,id}}
,因此服务端自动地响应需要的自动为 JSON 格式
{
function* getopt(argv) { | |
let cache = null | |
// ignore execution program & script filename by call to .slice() function. | |
for (let node of argv.slice(2)) { | |
const match = /^--([a-z][0-9a-z-]*)(?:=(.*))?$/i.exec(node) | |
// hanlde cache first... |
{ | |
"compilerOptions": { | |
"jsx": "react", | |
"moduleResolution": "node", | |
"module": "commonjs", | |
"experimentalDecorators": true, | |
"target": "es5", | |
"lib": [ | |
"es5", | |
"scripthost", |
; [warnning] select your disk first | |
clean | |
convert gpt | |
create partition efi size=100 offset=20 ; start at LBA-40 for 4K aligned (the first sector that is divisible by 8 (after LBA-33)) | |
format quick fs=fat32 | |
create partition msr size=16 ; required by windows | |
create partition primary size=81920 ; seperate system to a partiton (make reinstall system earier) | |
format quick fs=ntfs label=Windows | |
assign letter=C | |
create partition primary ; remaining spaces |
// http://arxiv.org/ftp/arxiv/papers/1406/1406.2294.pdf | |
int32_t JumpConsistentHash(uint64_t key, int32_t num_buckets) { | |
int64_t b = -1, j = 0; | |
while (j < num_buckets) { | |
b = j; | |
key = key * 2862933555777941757ULL + 1; | |
j = (b + 1) * (double(1LL << 31) / double((key >> 33) + 1)); | |
} | |
return b; | |
} |
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm | |
rpm -Uhv epel-release-latest-6.noarch.rpm | |
yum clean |
#!/bin/env bash | |
# deploy project script. | |
# make sure /usr/local/etc/deployment.key permissions is 600. | |
# this is required to open it. | |
set -e | |
build= | |
revision=HEAD |
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.ComponentModel; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Runtime.Serialization; | |
using System.Security; | |
using System.Text.RegularExpressions; | |
using System.Linq; |
// Stephen Toub | |
// [email protected] | |
// | |
// ManagedThreadPool.cs | |
// ThreadPool written in 100% managed code. Mimics the core functionality of | |
// the System.Threading.ThreadPool class. | |
// | |
// HISTORY: | |
// v1.0.1 - Disposes of items remaining in queue when the queue is emptied | |
// - Catches errors thrown during execution of delegates |