上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页
摘要: 1、数组转vectorfloat arrHeight[] = { 1.68,1.72,1.83,2.05,2.35,1.78,2.1,1.96 }; vector<float> vecHeight(arrHeight, arrHeight+sizeof(arrHeight)/sizeof(float 阅读全文
posted @ 2019-01-15 18:47 于光远 阅读(8766) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> #include <windows.h> #include <algorithm> using namespace std; int main() { vector<int> vec = {-7, 1, 10, 7, 2, 阅读全文
posted @ 2019-01-15 18:24 于光远 阅读(8154) 评论(0) 推荐(1)
摘要: for(std::vector::iterator it = m_ConnectId.begin();it!=m_ConnectId.end();){ if(send(*it,&*_msg.begin(), _msg.size(),0) < 0){ m_ConnectId.erase(it); }el... 阅读全文
posted @ 2019-01-15 17:14 于光远 阅读(2453) 评论(1) 推荐(0)
摘要: svp.version.sh.in 使用了configure_file 把cmakelist里面的变量,用它的值代替。 configure_file(<input> <output> [COPYONLY] [ESCAPE_QUOTES] [@ONLY] [NEWLINE_STYLE [UNIX|DO 阅读全文
posted @ 2018-12-25 15:44 于光远 阅读(2127) 评论(0) 推荐(0)
摘要: 汉诺塔是印度一个古老传说的益智玩具。汉诺塔的移动也可以看做是递归函数。 我们对柱子编号为a, b, c,将所有圆盘从a移到c可以描述为: 如果a只有一个圆盘,可以直接移动到c; 如果a有N个圆盘,可以看成a有1个圆盘(底盘) + (N-1)个圆盘,首先需要把 (N-1) 个圆盘移动到 b,然后,将 阅读全文
posted @ 2018-12-20 21:02 于光远 阅读(281) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/sunbobosun56801/article/details/80513382 性质1,如果Dn= |A|中某行的元素全为0,那么Dn = 0 性质2,如果Dn= |A|中某两行元素对应成比例,那么Dn = 0 性质3,如果Dn= |A|中某两行元素互换 阅读全文
posted @ 2018-12-07 19:23 于光远 阅读(800) 评论(0) 推荐(0)
摘要: 设A为 的矩阵,B为 的矩阵,那么称 的矩阵C为矩阵A与B的乘积,记作 ,其中矩阵C中的第 行第 列元素可以表示为: 如下所示: 例子: #include<iostream> using namespace std; typedef long long ll; const int N = 2; st 阅读全文
posted @ 2018-11-23 17:18 于光远 阅读(233) 评论(0) 推荐(0)
摘要: 假设文档内容如下: 要求:在1111之前添加AAA,方法如下: sed -i 's/指定的字符/要插入的字符&/' 文件 要求:在1111之后添加BBB,方法如下: sed -i 's/指定的字符/&要插入的字符/' 文件 要求:(1) 删除所有空行;(2) 一行中,如果包含"1111",则在"11 阅读全文
posted @ 2018-10-29 20:33 于光远 阅读(729) 评论(0) 推荐(0)
摘要: static char char_flag;// 1111 ,figure ,lowercase ,uppercase,special char std::string generateString(){ std::string result = ""; srand((unsigned)time(NULL)); char_flag = 0; for(int i=... 阅读全文
posted @ 2018-10-25 14:25 于光远 阅读(170) 评论(0) 推荐(0)
摘要: #include "Poco/Thread.h" #include "Poco/RunnableAdapter.h" #include class Greeter { public: void greet() { std::cout runnable(gr... 阅读全文
posted @ 2018-08-24 11:16 于光远 阅读(752) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页