现整理收集C++世界里那些“牛人”的个人博客。凡三类:一是令人高山仰止的大牛,对C++语言本身产生过深远的影响的人;二是C++运用炉火纯青的高手,有原创性的技术干货;三是中文世界里的C++牛人。
- Bjarne Stroustrup的博客: Bjarne Stroustrup’s Homepage
| kind: ServiceAccount | |
| apiVersion: v1 | |
| metadata: | |
| name: restart-deploy | |
| namespace: testns | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: Role | |
| metadata: |
| """Helper functions for working with audio files in NumPy.""" | |
| """some code borrowed from https://github.com/mgeier/python-audio/blob/master/audio-files/utility.py""" | |
| import numpy as np | |
| import contextlib | |
| import librosa | |
| import struct | |
| import soundfile | |
| def float_to_byte(sig): |
| #include <asio.hpp> | |
| #include <asio/ssl.hpp> | |
| #include <algorithm> | |
| #include <atomic> | |
| #include <cstdlib> | |
| #include <ctime> | |
| #include <iostream> | |
| #include <memory> | |
| #include <thread> |
现整理收集C++世界里那些“牛人”的个人博客。凡三类:一是令人高山仰止的大牛,对C++语言本身产生过深远的影响的人;二是C++运用炉火纯青的高手,有原创性的技术干货;三是中文世界里的C++牛人。
| // generate [0..n-1] | |
| auto seq = [](size_t n) -> std::vector<size_t> { | |
| std::vector<size_t> v(n); | |
| for (size_t i=0; i<n; ++i) v[i] = i; | |
| return v; | |
| }; | |
| auto index = seq(n); | |
| // n * n distance matrix | |
| std::vector<D> dists(n * n); |
| #!/bin/bash | |
| : << '#__REM__' | |
| 指定さたライブラリをAndroid用にフルオートで作成します。ダウンロード、toolchainsの作成、複数のアーキテクチャのビルドも自動的に行います。デフォルトではarmv5te、armv7-a、mips1、i386のアーキテクチャを作成します。 | |
| Create a full-auto for Android the library specified. Creating download, toolchains, build the architecture of multiple automatically. Create architecture, mips1, i386 armv5te, armv7-a by default. | |
| #__REM__ | |
| TARGET_VERSION="1.3.1" |
| all:consumer producer | |
| CPPFLAGS+=-std=c++03 -Wall -pedantic | |
| CPPFLAGS+=-g -O0 | |
| CPPFLAGS+=-isystem ~/custom/boost/ | |
| LDFLAGS+=-L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib | |
| LDFLAGS+=-lboost_system -lrt -lpthread | |
| %:%.cpp |
| package com.opentok.media.avc; | |
| import java.io.IOException; | |
| import java.nio.ByteBuffer; | |
| import android.media.MediaCodec; | |
| import android.media.MediaCodecInfo; | |
| import android.media.MediaFormat; | |
| public class AvcEncoder { |