- 博客(28)
- 资源 (4)
- 收藏
- 关注
原创 小白的政治复习之路
经过一顿瞎几把复习以及运气,最终政治72,但是个人感觉复习方法不错的。 政治复习要有个大致的时间规划,我是9月份开始到10月中旬把精讲精练以及对应1000题的题目全都做完,分配给政治的时间是下午4点到五点半,有时一天计划没有达到,也会早去一会,再从六点半复习到8点,其实多加的时间只是用来看视频。不要先看精讲精练,再做题目,没那么多时间给你看完理解再做题。正确的做题方式应该是一天一章题目,只做选择...
2019-08-05 23:13:56
435
原创 tensorflow高版本由于cpu版本低的错误
使用Ubuntu 16.04或18.04,python3和tensorflow 1.12(与pip3一起安装) UP squared 2 安装openvino后转换tensorflow模型报错 2018--12 11:28:20.086891: F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library...
2019-04-26 20:42:24
1534
原创 pip报错升级办法
当报错pip版本不对需要升级时,试了很多方法都不行,建议采用官方升级指南 python -m pip install -U pip 成功解决,亲测可用
2019-04-25 19:08:28
263
原创 图论—BFS
#include<iostream> #include<queue> #include<vector> using namespace std; const int MAXV=1000;//最大顶点数 int n,m;//顶点数,边数 vector<int> G[MAXV];//邻接表 bool vis[MAXV]={false};//访问...
2019-03-09 17:46:01
417
原创 图论—DFS
#include<iostream> using namespace std; const int MAXV=1000;//最大顶点数 int n,m,G[MAXV][MAXV]={0};//邻接矩阵 bool vis[MAXV]={false};//标记数组 void DFS(int u,int depth) { vis[u]=true;//标记u已访问 cout&...
2019-03-09 17:22:20
322
原创 图论—Dijkstra
#include<iostream> using namespace std; const int MAXV=1000;//最大顶点数 const int INF=100000000;//设INF是一个很大的数 int n,m,s,G[MAXV][MAXV]; int d[MAXV];//起点到各点的路径长度 bool vis[MAXV]={false}; //访问标记数组...
2019-03-09 16:44:36
339
原创 图论—拓扑序列
#include<iostream> #include<cstdio> #include<queue> #include<vector> using namespace std; const int maxv=1000; vector<int> G[maxv];//邻接表 int n,m,inDegree[maxv]={0};//...
2019-03-09 16:39:30
469
原创 字符串字符反转
#include<iostream> #include<cstring> using namespace std; int main() { char str[20]; gets(str); int len=strlen(str),top=0; char st[len]; for(int i=0;i<len;i++) { st[top++]=...
2019-02-26 21:46:08
219
原创 C(n,m),排列组合
#include<iostream> using namespace std; long long C(long long n,long long m) { long long ans=1; for(int i=1;i<=m;i++) { ans=ans*(n-m+i)/i; } return ans; } int main() { long long n,...
2019-02-26 21:28:32
1642
原创 瓜大2017机试—字符串重组
题目:从键盘输入一个字符串(不多于80个字符),将其中的数字字符按原顺序组成一个新字符串,并输出。 #include<iostream> #include<cstring> using namespace std; int main() { char str[80],strs[80]; int j=0; gets(str); int len=strlen(st...
2019-02-21 15:13:50
199
原创 瓜大2017机试—字符串倒序
题目:请编写程序,将用户输入的一个字符串(不多于100个字符),其中单词按照逆序,重新输出。例如输入字符串"this is a dog",输出为"dog a is this"。 第一种方法:采用字符数组进行单词的倒序。 #include<iostream> #include<cstring> using namespace std; int main() { ch...
2019-02-20 21:20:28
301
原创 DP—最长不下降子序列
#include<iostream> #include<algorithm> using namespace std; const int N=100; int A[N],dp[N]; int main() { int n; cin>>n; for(int i=1;i<=n;i++) { cin>>A[i]; } int...
2019-02-20 09:33:06
705
原创 DP—最长连续子序列和
#include<iostream> #include<algorithm> using namespace std; const int maxn=10010; int main() { int n,A[maxn],dp[maxn]; cin>>n; //元素个数 //读入序列 for(int i=0;i<n;i++) { cin&...
2019-02-20 09:04:48
348
原创 快排应用—求第k大的数
利用快速排序来查找无序数组中第K大的数,通过判断下标,只计算有k的那一半,时间复杂度为 O(n). #include<iostream> using namespace std; const int maxn=256; int Partition(int A[],int left,int right) { int temp=A[left]; while(left<rig...
2019-02-19 21:11:08
1472
原创 字符串处理—删除其中数字
题目:将输入的字符串中的数字删除,输出删除完成后的字符串 #include<iostream> using namespace std; void Delete(char str[]) { int i=0,j=0; while(str[i]!='\0')//扫描字符 { //将字符中的数字跳过 while(str[i]>='0'&&str[...
2019-02-19 20:23:52
4347
2
原创 瓜大2018机试—字母大小写转换
题目:编程输入一个字符串,将所有大写英文字母改为小写英文字母,所有小写英文字母改为大写英文字母,然后输出。 先定义字符串,并输入,然后对字符串进行遍历,并判断是否是大写字母,如果是则其ASCII加32,如果是小写字符则其ASCII减去32,最后输出字符串即可,代码如下: #include<iostream> using namespace std; int main() { ...
2019-02-18 11:16:55
332
原创 瓜大2018机试—判断回文数
题目:有这样一类数字,顺着看和倒着看是相同的数,例如121,656,2332等,这样的数字就称为回文数字。编程判断某数字是否是回文数字。 为了防止空间限制和溢出,因此采用数字位判断法。 先比较整数的第1位和最后1位是否相等,如果不等,则直接返回false;若相等,则接下去判断剩下的位置,如同回文字符串判断的过程一样。代码如下: #include<iostream> using ...
2019-02-18 10:34:39
197
原创 Hadoop完全分布式安装(centos下)
Hadoop完全分布式安装 (注:本教程简单的使用两个节点作为集群环境: 一个作为 Master 主节点,另一个作为 Slave1 从节点。) 一、准备工作 useradd -m hadoop -s /bin/bash # 创建新用户hadoop,这条命令创建了可以登陆的 hadoop 用户,并使用 /bin/bash 作为shell。 passwd hadoop #修改密
2017-10-22 20:36:11
490
原创 Linux上Hadoop从部署环境到启动的详解及其遇到的问题集合
一、软件下载 Hadoop-2.7.2稳定版 下载地址 jdk1.8 下载地址 FileZila(传文件到linux虚拟机里面) 下载地址 SecureCrt(linux模拟终端) 下载地址 二、环境配置 1.解压刚才下载的文件 命令分别为(在/home/app目录下) tar -xvf Hadoop-2.7.2 tar -xvf jdk1.8 2.jdk环境配置 su
2017-10-22 20:35:02
484
转载 centos安装mysql最新教程
一、系统环境 yum update升级以后的系统版本为 [root@yl-web yl]# cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) 二、mysql安装 一般网上给出的资料都是 #yum install mysql#yum install mysql-server#yum install mysql-deve...
2017-10-22 20:33:29
381
转载 linux报"xxx is not in the sudoers file.This incident will be reported"错误
Linux系统下普通用户用sudo执行命令时报"xxx is not in the sudoers file.This incident will be reported"错误,解决方法就是在/etc/sudoers文件里给该用户添加权限。如下: 1.切换到root用户下(su root) 2./etc/sudoers文件默认是只读的,对root来说也是,因此需先添加sudoers文件的写权限
2017-10-22 20:31:56
1110
原创 ssh-keygen参数说明
ssh-keygen - 生成、管理和转换认证密钥 ssh-keygen [-q] [-bbits] -ttype [-Nnew_passphrase] [-Ccomment] [-foutput_keyfile] ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile] ssh-keygen -i [-f inpu
2017-10-22 20:30:36
952
转载 树莓派做人脸识别必要环境搭建
环境搭建 Ubuntu 16.04 LTS python 2.7 MySQL MySQLdb 前面已经介绍了系统的安装和配置 1.安装Python sudo apt-get install python-pip sudo apt-get install libmysqlclient-dev pip install mysql-python 2.安装mysql sudo a
2017-10-13 22:29:25
2528
原创 树莓派扩展swap分区以及安装htop
1.由于树莓派3的运行内存在运行一些程序(如编译opencv时)时会造成卡死的现象,所以需要增加swap分区来进行扩充树莓派运行内存 swap分区增加方法: 操作要在root用户下进行,进入root用户 $ su - 首先建立一个分区,扩充512M #dd if=dev/zero of=/home/swap bs=1024 count=512000 接着把分区变成swap分区
2017-10-12 20:29:52
2173
转载 raspberrypi 3代B 配置摄像头
raspberrypi 3代B 配置摄像头 硬件环境: 树莓派3B 树莓派3夜视摄像头800万像素 存储卡 操作系统: ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi 将摄像头插入CAMERA卡槽 首先安装raspi-config sudo apt-get install raspi-conf
2017-10-11 22:51:18
2582
1
原创 安装配置时遇到的基本问题及解决方案
1.树莓派 ubuntu mater系统下安装软件命令 $sudo apt-get install 包或软件名 2.在安装扩容软件时, 执行$sudo apt-get install gparted 发生以下错误:E:Could not get lock /var/lib/apt/lists/lock... E:Unable to lock the list directory
2017-10-11 21:52:34
676
转载 树莓派系统的安装及配置
树莓派硬件已经搭建完毕,可以进行使用了。但是在此之前,我们需要对树莓派系统进行一系列的配置工作。本章就将对树莓派系统——Ubuntu-Mate的烧写、安装及配置进行详细的介绍。本章中需要的软件和系统都将在附录中予以介绍,请大家在学习本章之前做好准备。 2.1系统的安装 系统安装需要准备的软硬件有: l Win32DiskImager l Ubuntu Mate系统映像
2017-10-11 21:42:07
1091
2
转载 scala安装
刚刚开始学习spark,需要用到scala,所以打算开始自学scala。前提是已经安装好jdk。 (1)安装scala 在官网上下载scala,本人下载scala-10.04 http://www.scala-lang.org/dow... 其中windows下有两个版本。msi和exe,具体区别可百度查看。这边随便找了一个说明http://zhidao.baidu.com/link?
2017-10-03 10:58:12
387
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人