- 博客(28)
- 资源 (4)
- 收藏
- 关注
原创 小白的政治复习之路
经过一顿瞎几把复习以及运气,最终政治72,但是个人感觉复习方法不错的。政治复习要有个大致的时间规划,我是9月份开始到10月中旬把精讲精练以及对应1000题的题目全都做完,分配给政治的时间是下午4点到五点半,有时一天计划没有达到,也会早去一会,再从六点半复习到8点,其实多加的时间只是用来看视频。不要先看精讲精练,再做题目,没那么多时间给你看完理解再做题。正确的做题方式应该是一天一章题目,只做选择...
2019-08-05 23:13:56
426
原创 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
1506
原创 pip报错升级办法
当报错pip版本不对需要升级时,试了很多方法都不行,建议采用官方升级指南python -m pip install -U pip成功解决,亲测可用
2019-04-25 19:08:28
247
原创 图论—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
404
原创 图论—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
300
原创 图论—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
326
原创 图论—拓扑序列
#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
459
原创 字符串字符反转
#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
208
原创 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
1629
原创 瓜大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
189
原创 瓜大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
289
原创 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
695
原创 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
336
原创 快排应用—求第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
1455
原创 字符串处理—删除其中数字
题目:将输入的字符串中的数字删除,输出删除完成后的字符串#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
4331
2
原创 瓜大2018机试—字母大小写转换
题目:编程输入一个字符串,将所有大写英文字母改为小写英文字母,所有小写英文字母改为大写英文字母,然后输出。先定义字符串,并输入,然后对字符串进行遍历,并判断是否是大写字母,如果是则其ASCII加32,如果是小写字符则其ASCII减去32,最后输出字符串即可,代码如下:#include<iostream>using namespace std;int main(){ ...
2019-02-18 11:16:55
317
原创 瓜大2018机试—判断回文数
题目:有这样一类数字,顺着看和倒着看是相同的数,例如121,656,2332等,这样的数字就称为回文数字。编程判断某数字是否是回文数字。为了防止空间限制和溢出,因此采用数字位判断法。先比较整数的第1位和最后1位是否相等,如果不等,则直接返回false;若相等,则接下去判断剩下的位置,如同回文字符串判断的过程一样。代码如下:#include<iostream>using ...
2019-02-18 10:34:39
188
原创 Hadoop完全分布式安装(centos下)
Hadoop完全分布式安装(注:本教程简单的使用两个节点作为集群环境: 一个作为 Master 主节点,另一个作为 Slave1 从节点。)一、准备工作useradd -m hadoop -s /bin/bash # 创建新用户hadoop,这条命令创建了可以登陆的 hadoop 用户,并使用 /bin/bash 作为shell。 passwd hadoop #修改密
2017-10-22 20:36:11
475
原创 Linux上Hadoop从部署环境到启动的详解及其遇到的问题集合
一、软件下载Hadoop-2.7.2稳定版 下载地址jdk1.8 下载地址FileZila(传文件到linux虚拟机里面)下载地址SecureCrt(linux模拟终端)下载地址二、环境配置1.解压刚才下载的文件 命令分别为(在/home/app目录下)tar -xvf Hadoop-2.7.2tar -xvf jdk1.82.jdk环境配置su
2017-10-22 20:35:02
474
转载 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
367
转载 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
1095
原创 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
944
转载 树莓派做人脸识别必要环境搭建
环境搭建Ubuntu 16.04 LTSpython 2.7MySQLMySQLdb前面已经介绍了系统的安装和配置1.安装Pythonsudo apt-get install python-pipsudo apt-get install libmysqlclient-devpip install mysql-python2.安装mysqlsudo a
2017-10-13 22:29:25
2513
原创 树莓派扩展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
2137
转载 raspberrypi 3代B 配置摄像头
raspberrypi 3代B配置摄像头硬件环境:树莓派3B 树莓派3夜视摄像头800万像素存储卡 操作系统:ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi 将摄像头插入CAMERA卡槽 首先安装raspi-configsudo apt-get install raspi-conf
2017-10-11 22:51:18
2554
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
638
转载 树莓派系统的安装及配置
树莓派硬件已经搭建完毕,可以进行使用了。但是在此之前,我们需要对树莓派系统进行一系列的配置工作。本章就将对树莓派系统——Ubuntu-Mate的烧写、安装及配置进行详细的介绍。本章中需要的软件和系统都将在附录中予以介绍,请大家在学习本章之前做好准备。2.1系统的安装系统安装需要准备的软硬件有:l Win32DiskImagerl Ubuntu Mate系统映像
2017-10-11 21:42:07
1073
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
375
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人