原创 C擴展性能測試

amanmodule.c #include <Python.h> static PyObject* aman_nop(PyObject *self, PyObject *args) { PyObject *obj;

原创 C/C++:GCC/G++ -Wl,-soname

mymath.h: #ifndef _MYMATH_H #define _MYMATH_H int add(int, int); int sub(int, int); int mul(int, int); int div(i

原创 C/C++編譯

sample2.cpp #include "sample2.h" #include <string.h> //克隆一個0-terminated C string, 用new分配內存. const char* MyString

原创 autoconf automake

https://www.bbsmax.com/A/x9J2xRYZd6/ https://www.cnblogs.com/ranson7zop/p/8259679.html http://bbs.chinaunix.net/fo

原创 C/C++ 測試

模板測試 test_01.cpp #include <gtest/gtest.h> #include <stdio.h> using testing::Types; template <class T> class TypeTes

原创 C/C++ 異步調用

#include <future> #include <iostream> #include <string> std::string helloFunction(const std::string& s) { retu

原创 tar,zip

tar 壓縮 tar -zvcf aaa.tar.gz abc/ 解壓縮 tar -zxvf aaa.tar.gz zip 壓縮 zip -j abc.zip abc/* 不加-j參數,則壓縮包包含abc文件夾

原创 C/C++ ctime

#include <ctime> #include <string> #include <iostream> std::string get_greet(const std::string& who) { return "H

原创 C/C++模版編程

1 class TestBase { public: virtual ~TestBase() {} virtual void FuncA(int param) = 0; virtual bool Fun

原创 C/C++ operator關鍵字

C++ 矩陣相乘 #include <iostream> using namespace std; class Matrix{ float *data; public: size_t n,m; Matr

原创 FSMN

examp import numpy as np import time import tensorflow as tf tf.set_random_seed(0) class FSMN(object): def _

原创 Linux網絡管理命令

route 添加一條路由記錄 sudo route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.3.254 route -n 內核 IP 路由表 目標 網關

原创 perl

exp01 main.pl use warnings; use strict; use lib "."; use Pk01 #qw(munge frobnicate); print Pk011::munge(20,30

原创 shell命令退出狀態

set實驗 #!/bin/bash echo 'disable exit on non-zero return status and pipefail track' set +e set +o pipefail a=$[1/0

原创 C語言項目分析(一)

#include <sys/stat.h> #include <dirent.h> #include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct