07 2022 档案
摘要:修改配置文件 sudo gedit /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(`8) auto lo iface lo inet loopback auto ens33 #iface ens33 i
阅读全文
摘要:sudo service network-manager stop sudo rm /var/lib/NetworkManager/NetworkManager.state sudo service network-manager start sudo gedit /etc/NetworkManag
阅读全文
摘要:环境:Ubuntu 16.04 版本:compex openwrt18.04 sudo apt-get updatesudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5
阅读全文
摘要:函数功能: 将数据格式化输出到字符串 函数原型: int sprintf( char *buffer, const char *format [,argument] ... ) 注意这里的buffer指针 指向的是格式化字符后写入的首地址。 意思就是:格式化数据,并写入字符串,这些方法已经不用,因为
阅读全文
摘要:Qt Creator写C++程序时,头文件中有个 #include <Windows.h> 总提示我标题上的warning,上网查了以后,发现改成小写就没有warning了。 #include <windows.h>
阅读全文
摘要:问题描述 git clone时出现错误:、 CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none 解决方法 a.参考回答2: export GIT_SSL_NO_VERIFY=1 b.检查虚拟机网络设置,若虚拟机为桥接模式更改为NAT模式,
阅读全文
摘要:Linux shell if [ -n ] 正确使用方法 if [ str1 = str2 ] 当两个串有相同内容、长度时为真 if [ str1 != str2 ] 当串str1和str2不等时为真 if [ -n str1 ] 当串的长度大于0时为真(串非空) if [ -z str1 ] 当串
阅读全文
摘要:介绍下Shell中的${}、##和%%使用范例,本文给出了不同情况下得到的结果。 假设定义了一个变量为:代码如下: file=/dir1/dir2/dir3/my.file.txt 可以用${ }分别替换得到不同的值:${file#*/}:删掉第一个 / 及其左边的字符串:dir1/dir2/dir
阅读全文
摘要:直奔主题,具体步骤如下: 1. 运行终端 2. cd /etc/init.d # 进入init.d目录 3. vim test 4. 在打开的test文件中加入以下内容: #!bin/sh /etc/rc.common #/init.d/my-test START=75 start(){ insmo
阅读全文
摘要:Qt :libpng warning: iCCP: known incorrect sRGB profile警告信息之解决方法 Qt 1、从ImageMagick的官网下载压缩包,地址: http://www.imagemagick.org/script/binary-releases.php 根据
阅读全文
摘要:#include<iostream>#include<string>#include<algorithm>#include<ctime>using namespace std; string Random_Result() { char temp[] = "1234567890"; random_s
阅读全文
摘要:1 main函数 中的内容不宜过多。 2 当想在main函数中使用while时候,可以这样做: int main() {while(function1) //此处的while的循环体是一个空语句。 } function1() { 。。。 return 1; } // example #include
阅读全文
摘要:#include<iostream>using namespace std; /* * * * * * * * * * ** * * * ** * * * * * * * * * * * * * **/ void starup(int n) { for (int i = 1; i <= n; i++
阅读全文
摘要:#include<iostream>using namespace std; /*引用双向传值 /* */ void func(int num) { num++;}void func2(int &pint) { pint++;} int main() { int value = 4; func(va
阅读全文
摘要:#include<iostream>using namespace std; /* type *p p = new type[num] ... delete []p */ /* 分配100个整数空间,将1到100存储在这100个连续的空间里*/int main() { int *p; p = new
阅读全文
摘要:#include<iostream>using namespace std;int main() { int *p; p = new int(100); if (p == NULL) { cout << "allocation failure" << endl; } else { cout << "
阅读全文
摘要:#include<iostream>using namespace std;int main() { int *p; p = new int; if (p == NULL) { cout << "allocation failure" << endl; } else { *p = 15; cout
阅读全文
摘要:本人感觉自己强迫症和懒癌晚期,我习惯打开电脑磁盘的时候文件夹的视图是按详细信息选项进行布局的,因为可以看到该文件最多的信息,不然每次都得点击一下太麻烦了,于是百度了一下,这里记录一下,如下: 1.打开一个文件夹,默认是图标显示的,我们把视图更改为"详细信息",然后我们点击"组织"以及"文件夹和搜索选
阅读全文
摘要:#include <iostream>#include<cstdio>#include<cstdlib>#include<cstring>#include<time.h>#include<windows.h> using namespace std; /* 字符串翻转*/ #pragma warni
阅读全文
摘要:#include <iostream>#include<cstdio>#include<cstdlib>#include<cstring>#include<time.h>#include<windows.h> using namespace std;//"拿球"/* 3个红球,5个白球,6个黑球。从
阅读全文