自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

天天向上

其实成功很简单,就是坚持下去。在程序猿的道路上,匍匐前进!每天前进一小步!

  • 博客(31)
  • 资源 (3)
  • 收藏
  • 关注

原创 MAC解压缩zip文件

Mac系统解压缩zip文件直接双击解压缩打开终端,通过如下命令进行解压缩$:unzip 文件名注:当使用unzip命令解压缩可能会出现如下错误$:unzip EasyConnectVPN.zipArchive: EasyConnectVPN.zip inflating: EasyConnectInstaller.exeerror: cannot create ��+��...

2020-03-09 14:27:05 3339 1

原创 MAC修改印象笔记背景色

一、目的将mac的印象笔记背景色设置为护眼色。二、方法打开 Finder,找到 应用程序 -> Evernote,对着 Evernote 右键,从菜单里点选 显示包内容;依次打开 Contents -> Resources -> common-editor-mac 文件夹,找到以下文件;6.10版本以上为ce.css6.10版本以下为en-mac-min.css...

2019-12-04 16:59:33 1984

原创 树苺派4B存储空间扩容SD卡

1.问题描述树苺派4B,配置32GB的SD卡。系统安装完毕,拷贝程序时,因为空间有限而中断。通过输入df或df -h命令查询树莓派SD 卡空间使用情况pi@raspberrypi:/ $ df -hFilesystem Size Used Avail Use% Mounted on/dev/root 6.8G 6.5G 51M 100% /devtmpf...

2019-09-06 08:49:51 3066

原创 ssh树苺派问题:-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN)

1 问题描述MAC、Ubuntu16.04通过ssh方式连接树苺派4B时,均出现如下问题提示,并且在编辑时出现乱码。-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN)其中,树苺派locale如下locale: Cannot set LC_CTYPE to default locale: No such file ...

2019-09-05 10:56:51 12886 1

原创 解决pip3的ImportError: cannot import name 'main'

1.问题环境:ubuntu 16.04升级pip3之后,报错如下:Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> from pip import mainImportError: cannot import name 'main'2.解决方法修正方法:$...

2019-08-26 15:26:21 2647

原创 ubuntu16.04 terminal无法正常运行-解决方法

在MAC下通过ssh链接ubuntu系统时,无法通过tab键进行自动补全名称。通过网络搜索,尝试了几种方法,都暂时没有搞定。不但这个问题没有搞定,甚至还导致了现在遇到的ubuntu系统无法正常打开terminal。点击转圈后,归于平静,没有任何响应。同样,在...

2019-07-10 14:46:30 6821

原创 Ubuntu中vscode使用 Python 的virtualenv虚拟环境

在实际使用 Python 的时候,通过 anaconda或者virtualenv 来进行创建独立运行环境,方便调试。在使用VScode进行代码调试时,可自动识别anaconda创建的虚拟环境,但是无法自动识别virtualenv创建的虚拟环境。下面介绍如何进行配置vscode,解决该问题。1. VScode中安装Python插件2. 配置 Python 解释器(1)打开VScode软件,...

2019-06-06 15:37:51 1890

原创 Anaconda 换国内源、删源命令

1.背景Ubuntu16.04,安装了Anaconda便于环境管理,但是国外源下载安装太慢,所以计划更换为国内源。可但是,现在才知道清华和中科大的源,已经被停止维护了。暂且,将命令记录在此吧。2.命令(1)添加清华源conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/#...

2019-06-01 11:44:26 33777 3

原创 Ubuntu16.04修改apt安装包的源

Ubuntu16.04修改apt安装包的源1.背景2.问题现象3.解决方法感谢1.背景新装Ubuntu16.04系统,修改apt安装包的源地址,加快访问。2.问题现象输入sudo apt-get install vim显示如下报错信息:Reading package lists… DoneBuilding dependency treeReading state informati...

2019-06-01 10:55:54 3157

原创 LeetCode9. Palindrome Number

一、题目描述Determine whether an integer is a palindrome. Do this without extra space.Some hints: Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to stri...

2018-03-16 15:21:35 138

原创 LeetCode8. String to Integer (atoi)

一、题目描述Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible in...

2018-03-16 12:41:48 151

原创 LeetCode7. Reverse Integer

一、问题描述Given a 32-bit signed integer, reverse digits of an integer.Example 1: Input: 123 Output: 321Example 2: Input: -123 Output: -321Example 3: Input: 120 Output: 21Note: Assume we ...

2018-03-15 17:55:45 227

原创 LeetCode6. ZigZag Conversion

一、问题描述The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) And then read li...

2018-03-14 21:39:34 106

原创 LeetCode5. Longest Palindromic Substring(中心扩散法)

一、问题描述Given a string s, find the longest palindromic substring(最长回文字符串) in s. You may assume that the maximum length of s is 1000.Example:Input: “babad”Output: “bab”Note: “aba” is also a val...

2018-03-14 10:39:19 653 1

原创 LeetCode5. Longest Palindromic Substring(动态规划)

一、问题描述Given a string s, find the longest palindromic substring(最长回文字符串) in s. You may assume that the maximum length of s is 1000.Example:Input: “babad”Output: “bab”Note: “aba” is also a val...

2018-03-13 17:59:03 770

原创 LeetCode5. Longest Palindromic Substring(马拉车算法 Manacher Algorithm)

一、问题描述Given a string s, find the longest palindromic substring *(最长回文字符串)*in s. You may assume that the maximum length of s is 1000.Example:Input: “babad”Output: “bab”Note: “aba” is also a v...

2018-03-13 11:26:26 743 1

原创 LeetCode4. Median of Two Sorted Arrays

一、题目描述There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1: nums1 ...

2018-03-11 19:57:56 126

原创 LeetCode3. Longest Substring Without Repeating Characters

一、题目说明:Given a string, find the length of the longest substring without repeating characters.Examples:Given “abcabcbb”, the answer is “abc”, which the length is 3.Given “bbbbb”, the answer is ...

2018-03-11 12:45:13 108

原创 MAC上PyCharm调试Tensorflow的环境安装与配置

MAC上PyCharm调试Tensorflow的环境安装与配置,本文涉及软件版本说明: (1)MAC OS (2)PyCharm Professional 2017.2.4 (3)Anaconda 1.6.9 (4)Python 2.7.4 (5)Tensorflow

2017-12-10 23:02:43 5975 2

原创 C++中的istringstream、ostringstream、stringstream

C++引入了ostringstream、istringstream、stringstream这三个类,要使用他们创建对象就必须包含sstream.h头文件。 (1) istringstream类用于执行C++风格的串流的输入操作。 (2) ostringstream类用于执行C++风格的串流的输出操作。 (3) stringstream类同时可以支持C++风格的串流的输入输出操作。

2016-04-30 15:58:05 405

转载 C++中的friend关键字

采用类的机制后实现了数据的隐藏与封装,类的数据成员一般定义为私有成员,成员函数一般定义为公有的,依此提供类与外界间的通信接口。但是,有时需要定义一些函数,这些函数不是类的一部分(注意友元函数不是类的一部分),但又需要频繁地访问类的数据成员,这时可以将这些函数定义为该函数的友元函数。除了友元函数外,还有友元类,两者统称为友元。

2016-04-30 14:38:05 518

原创 C++中的inline关键字

在c/c++中,为了解决一些频繁调用的小函数大量消耗栈空间(栈内存)的问题,特别的引入了inline修饰符,表示为内联函数。内联函数的引入有利有弊,使用时应当注意。

2016-04-29 11:12:18 9330 3

原创 int main(int argc,char* argv[])参数简介

(1)int argc是命令行总的参数个数;(2)char *argv[]是一个字符数组,其大小是int argc,主要用于命令行参数,数组里每个元素代表一个参数,其中第0个参数是程序的全名,以后的参数是命令行后面跟的用户输入的参数。

2016-04-26 22:10:42 324

转载 vector的reserve和resize区别

reserve增加了vector的capacity,但是它的size没有改变! resize改变了vector的capacity同时,也增加了它的size!

2016-04-26 13:29:09 557 1

转载 C++ using关键字作用

1.在当前文件中引入命名空间2.在子类中使用 using 声明引入基类成员名称(参见C++ primer)3. 当子类中的成员函数和基类同名时,子类中重定义的成员函数将隐藏基类中的版本,即使函数原型不同也是如此(隐藏条件见下面),使用using声明,解除函数隐藏

2016-04-25 10:07:54 460

原创 Huffman编码实现

Huffman概述 (1) 是一种无损压缩编码方式 (2) 根据字符出现的概率编码,对概率高的字符使用较短的编码,对概率低的字符使用较长的编码,从而使得编码后的字符串的长度的期望最小 (3) 是一种贪心算法:每次总选择两个概率最小的字符结点进行合并 (4) 选择用频数代替频率,方便计算 (5) Huffman编码不唯一

2016-03-26 10:08:06 500

原创 求数组的最大值、第二大值

注意:数组的最大值同时存在多个的情况! (1) 对比FindMax2和FindMax22两个函数的处理,细微差别导致结果不同! (2) 当数组作为函数形参时,如果是常量数组,则最好添加const (3) sizeof(arr)/sizeof(int) (4) 随机数生成:

2016-03-22 01:14:44 2238

原创 Caesar加密算法

Caesar加密算法

2016-03-21 22:41:37 941

原创 去除字符串中的空格

去除字符串中的空格,并返回修改后的字符串。 要求时间复杂度O(N),空间复杂度O(1)。

2016-03-21 22:28:26 314

原创 C/C++语言基础

工作后开始应用的C#,长时间不用C/C++都忘的差不多了,有些知识是不能忘记的,所以简单回顾一下。 主要包括以下内容: (1)字符、字符串数组、字符串数组指针 (2)sizeof()、strlen() (3)字符串拷贝strcpy_s()、memcpy() (4)指针数组、数组指针、二维数组

2016-03-20 21:56:48 675

原创 declspec(dllexport)和declspec(dllimport) 的使用说明

通过实例介绍如何创建及调用dll,并对declspec(dllexport)和declspec(dllimport)进行了解释说明。

2016-03-02 22:47:45 2539

C语言基础测试用例

请见博文介绍 http://blog.csdn.net/kaige2111/article/details/50939163

2016-03-20

dll动态库创建与调用实例

通过简单实例,介绍如何创建dll及工程调用。其中包括declspec(dllexport);declspec(dllimport)的使用和说明。

2016-03-02

基于opencv读取一个文件夹下所有图像并显示

基于opencv读取一个文件夹下所有图像并显示

2012-12-16

空空如也

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

TA关注的人

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