上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页
摘要: 设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 于光远 阅读(738) 评论(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)
摘要: popen可以是系统命令,也可以是自己写的程序a.out。 假如a.out就是打印 “hello world“ 在代码中,想获取什么,都可以通过popen获取。 比如获取ls的信息, 比如获取自己写的程序的内容:“hello world” 。 https://www.cnblogs.com/syla 阅读全文
posted @ 2018-08-07 20:19 于光远 阅读(16664) 评论(0) 推荐(0)
摘要: void split(const string &s, char delim, vector &elems) { stringstream ss(s); string item; while (getline(ss, item, delim)) { elems.push_back(item); } // return elems; } ... 阅读全文
posted @ 2018-08-06 18:31 于光远 阅读(1626) 评论(0) 推荐(1)
摘要: 输入: 输出: 阅读全文
posted @ 2018-07-29 19:19 于光远 阅读(621) 评论(0) 推荐(0)
摘要: string & trim(string &s){ if(s.empty()){ return s; } s.erase(0,s.find_first_not_of(" ")); s.erase(s.find_last_not_of(" ")+1); return s; } 阅读全文
posted @ 2018-07-29 15:02 于光远 阅读(176) 评论(0) 推荐(0)
摘要: aux_source_directory 查找在某个路径下的所有源文件。 aux_source_directory(< dir > < variable >) 搜集所有在指定路径下的源文件的文件名,将输出结果列表储存在指定的变量中。该命令主要用在那些使用显式模板实例化的工程上。模板实例化文件可以存储 阅读全文
posted @ 2018-07-20 12:21 于光远 阅读(2763) 评论(0) 推荐(0)
摘要: 在execute函数中最先调用fork()函数,那fork()函数做了些什么呢?其实fork()函数创建了和当前进程基本一模一样的一个子进程。当控制转到内核中的fork代码之后,内核先分配新的内存块和内核数据结构,然后将原来的进程复制到新的进程中去。最后向运行进程中添加新的进程并且控制重新返回到进程 阅读全文
posted @ 2018-07-08 08:52 于光远 阅读(994) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页