自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 收藏
  • 关注

原创 qt5播放mp3文件遇到问题及解决方法

问题: Warning: “No decoder available for type ‘audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2,parsed=(boolean)true’.” Error: “Your GStreamer

2016-08-25 17:02:18 4251

原创 ubuntu下opera浏览器安装Flash插件

ubuntu下opera浏览器安装Flash插件sudo apt-get install pepperflashplugin-nonfree sudo update-pepperflashplugin-nonfree --install sudo update-pepperflashplugin-nonfree --status

2016-05-25 19:16:20 1210

原创 ubuntu14.04下Matlab2014视频读取问题

ubuntu14.04下使用 Matlab2014读取视频用到函数VideoReader(),出现报错 “Could not read file due to an unexpected error. Reason: Unable to initialize the video obtain properties”解决方法:1. 安装gstreamer0.1 sudo apt-get in

2016-04-27 22:12:16 1796

原创 Caffe下学习速率调整策略摘抄

以下内容摘抄自caffe.proto The learning rate decay policy. The currently implemented learning rate policies are as follows: - fixed: always return base_lr. - step: return base_lr * gam

2016-04-13 10:44:12 2451 1

原创 测试某一段程序运行时间的方法

缘由:前两天我为了将 casia 数据集进行水平镜像,所以自己写了了个简单的程序来用。方法很简单,就是借助 opencv 逐像素进行操作。因为是逐像素进行操作,所以我也料想到会很慢。为了测试一下速度,我就在网上查了查别人用的方法。找到的方法:网上有很多方法,我找了了简单的。用到的头文件是<ctime>/<time.h>,里面有个函数clock()。网上一般都是这么用的:clock_t t_begin

2016-04-02 10:38:28 1135

原创 protobuf 简单使用

//student.protopackage test;message Student{ required string name = 1; required int32 age = 2; optional float gard = 3;}comand:protoc --cpp_out=<directory> student.proto//student.pb.h

2016-03-06 22:17:17 467

原创 explicit关键字的使用

#include<iostream>#include<string>using namespace std;class Student{public: Student(int age){ this->age = age; cout<<this->age<<endl; }private: int age;};class Teacher{

2016-03-06 15:16:02 355

原创 caffe使用小细节

caffe使用小细节convert_imagset小工具,–resize_height=100,需要注意的是这里一定要用等号,不能用空格代替。

2016-03-06 10:21:48 376

原创 c++中string的用法积累

c++中string的用法积累replacestring name("shuilian");name.replace(2,2,"UI");result:shUIlian

2016-03-01 20:02:26 378

原创 Elementary OS下使用Unetbootin

今天因为想要试一下几个Linux系统所以下了Unetbootin来用,使用的过程中遇到了一下几个小问题,记下来:开始运行程序的时候需要输入密码,注意这里要输入的密码指的是root密码,而不是开机登陆时的用户密码。由于安装好系统后并没有设置root密码,而需要root权限时一般都是用sudo命令,所以在安装软件的过程中并没有遇到什么麻烦。而在使用Unetbootin时就会遇到问题。解决方法就是设置r

2015-12-27 18:32:32 633

原创 LT29i刷机方法

LT29i刷机方法由于自己用的手机越来越卡,实在是受不了,今天就又刷机了。刷机的方法虽然之前就会,但是很久没用了,就忘了。导致今天多折腾了几分钟,现记录如下:所需材料:flashtool刷机工具系统包刷机步骤选择模式选择系统包手机关机前提下,按住音量下键开始

2015-12-26 21:55:43 931

原创 Linux下安装gcc编译器简要步骤

当然是下载软件包,鉴于linux下没有迅雷,用wget命令行下载比较快;解压;下载依赖项,contrib文件夹下有详细说明;编译,需要注意一些选项;安装。如果执行的是默认安装,值得注意的是库都被安装在/usr/local/lib下,而编译器默认找的是/usr/lib。解决的方法有两种:改链接;改环境变量

2015-12-07 10:40:57 1172

原创 关于类模板特化的小知识

Src://test.cpp#include<iostream>#include<string>using namespace std;template<typename T1,typename T2>class A{ public: A(){cout<<"T1,T2"<<endl;}};template<typename T3>class A<T3,int>{

2015-12-03 14:55:30 621

转载 关于linux环境变量的一些小知识

1.Linux的变量种类  按变量的生存周期来划分,Linux变量可分为两类:  1.1 永久的:需要修改配置文件,变量永久生效。  1.2 临时的:使用export命令声明即可,变量在关闭shell时失效。  2.设置变量的三种方法  2.1 在/etc/profile文件中添加变量【对所有用户生效(永久的)】  用VI在文件/etc/profile文件中增加变量,该变量将会对Linux下所有用

2015-10-20 21:41:35 413

原创 linux下实现指定目录的简单遍历输出

//main.cppincludeincludeincludeincludeusing namespace std;void out_flags(int level,char c){ for(int i=0;i<=level;i++) cout<

2015-10-12 19:28:17 589

原创 hannuo tower

hanuota.cpp#include<iostream>using namespace std;void hanuota(int n,char source,char destination,char depend){ if(n==1) cout<<n<<" "<<source<<"-------->>"<<destination<<endl; else{

2015-09-07 11:08:51 566

原创 Nqueen2.0

说明:与1.0相比,算法实质并无改变,主要是用面向对象的思想把它们封装起来了。但是个人感觉,这个问题并不是太适合。但是,面向对象的程序设计方法让程序看起来很有条理。以下是详细的代码,如果大家有任何疑问,欢迎探讨。不过现在好像还没有资格这么说。Nqueen.h#include<vector>using namespace std;class Nqueen{ public:

2015-09-04 21:08:27 455

原创 Nqueen1.0

Nqueen.h#include<vector>using namespace std;extern int solutionNum;void solveNqueen(int row,vector<int> &v,int N);bool checkPosition(int row,int col,vector<int> &v);void printSolution(vector<int>

2015-09-04 10:24:13 323

原创 冒泡排序2.0

bubbleSort2.0.h#include<iostream>#include<vector>using namespace std;template<typename T>void bubbleSort(vector<T> &v){ int lend=0;//左端截至位置 int rend=v.size()-1;//右端截止位置 int i;//游标 w

2015-09-03 21:36:27 370

原创 eightQueen1.0

eightQueen.hextern int rows[8];extern int solutionNum;void solveEightQueen(int n);bool checkPosition(int row,int col);void printSolution();eightQueen.cpp#include"eightQueen.h"#include<iostream>us

2015-08-31 21:38:27 374

原创 堆排序2.0

#include#include#includeusing namespace std;templatevoid swap1(T &a,T &b){ auto temp=a; a=b; b=temp;} templatevoid duiSort(vector &v){ int m=v.size();//m,容器大小 for(m;m>1;m--)

2015-08-25 19:00:01 311

原创 堆排序1.0

//duiSort.h#include#include#includeusing namespace std;templatevoid swap1(T &a,T &b){ auto temp=a; a=b; b=temp;} templatevoid duiSort(vector &v){ int m=v.size();//m,容器大小 f

2015-08-24 15:00:09 363

原创 快速排序1.0

//quickSort.h#include#include using namespace std;templatevoid quickSort(vector &v,int begin,int end){ int i=begin; int j=end; if(i<j){ for(;i!=j;){ if(v[i]>v[j]){ swap1(v[i],v[j]);

2015-08-15 19:07:55 398

原创 归并排序1.0

//mergeSort.h#include#includeusing namespace std;templatevoid merge_Sort(vector &v,int begin,int middle,int end){ vector v2; int j=begin;int k=middle+1; while(j<=middle&&k<=end){ if(v[j]<v[

2015-08-15 12:53:22 350

原创 直接选择排序1.0

//selectSort.h#include#includeusing namespace std;templatevoid selectSort(vector &v){ for(auto i=v.begin();i!=v.end()-1;i++){ for(auto n=i+1;n!=v.end();n++){ if(*n<*i) swap1(*n,*i);

2015-08-13 14:16:59 320

原创 希尔排序1.0

//shellSort.h#include#includeusing namespace std;templatevoid shellSort(vector &v){ int gap;//步长 int n=v.size();//大小 for(gap=n/2;gap>0;gap=gap/2){ for(int j=0;j<gap;j++){ for(int k=gap+j

2015-08-13 13:05:52 324

原创 插入排序1.0

//insertSort.h#include#includeusing namespace std;templatevoid insertSort(vector &v){ for(auto i=v.begin()+1;i<v.end();i++){ for(auto n=i;n>v.begin();n--){ if(*n<*(n-1)){ auto temp=*(n

2015-08-12 08:57:01 368

原创 冒泡排序1.0

冒泡排序1.0//bubbleSort.h#include#includeusing namespace std;templatevoid bubbleSort(vector &L){ int m=2; for(auto i=L.begin();i!=(L.end()-1);i++){ for(auto n=L.begin();n<=(L.end()-m);n++){ i

2015-08-11 16:45:43 318

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除