随笔分类 -  C++程序设计

记录下学习的点滴
摘要:#!/usr/bin/expect set ip [lindex $argv 0] set password [lindex $argv 1] spawn ssh -o ConnectTimeout=15 -l root ${ip} "hostname" expect { "(yes/no)? " 阅读全文
posted @ 2018-08-16 15:56 东宫得臣 阅读(218) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <valarray> template<class T> class Slice_iter { std::valarray<T>* v; std::slice s; size_t curr; T& ref(size_t i) const { r 阅读全文
posted @ 2018-08-05 14:22 东宫得臣 阅读(423) 评论(0) 推荐(0) 编辑
摘要://f(x;W,c,w,b)=w*max{0, W*x+c}+b #include <iostream>#include <vector>#include <algorithm> template <class T>double tanh(T& z) { double ret; ret = (exp 阅读全文
posted @ 2018-06-23 13:31 东宫得臣 阅读(161) 评论(0) 推荐(0) 编辑
摘要:调用函数时候,传入脚本路径名称或者具体命令。 int shell_call(std::string &cmdstr) { enum { maxline=100 }; char line[maxline]; FILE *fpin; int ret; if((fpin = popen(cmdstr.c_ 阅读全文
posted @ 2018-04-26 09:09 东宫得臣 阅读(4684) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <cstdlib> template<class T>void changeLength1D(T*& a, int oldLength, int newLength) { if(newLength<0) { std::cout<<"new le 阅读全文
posted @ 2018-04-16 22:11 东宫得臣 阅读(250) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <sstream>#include <fstream>#include <cmath>#include <iterator>#include <algorithm> template<class T>class linearList { pub 阅读全文
posted @ 2018-04-16 21:02 东宫得臣 阅读(219) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <vector>#include <cmath>#include <numeric> template <class T>double VectorCosine(const std::vector<T> &In1, const std::vec 阅读全文
posted @ 2017-11-01 21:52 东宫得臣 阅读(181) 评论(0) 推荐(0) 编辑
摘要:We can estimate the weight values for our training data using stochastic gradient descent. Stochastic gradient descent requires two parameters: Learni 阅读全文
posted @ 2017-11-01 21:47 东宫得臣 阅读(347) 评论(0) 推荐(0) 编辑
摘要:第一篇博客:Hello World #include <iostream> int main() { std::cout<<"Hello world!"<<std::endl; return 0; } Know what you want to say. Practice. Imitate good 阅读全文
posted @ 2017-06-22 13:39 东宫得臣 阅读(202) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示