自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

繁城落叶

干云蔽日之木,起于葱青。

  • 博客(201)
  • 资源 (8)
  • 问答 (2)
  • 收藏
  • 关注

原创 CURL 报错:curl_easy_perform() failed:URL using bad/illegal format or missing URL

在使用C++中的curl进行网络调用的时候,出现了这个错误:curl_easy_perform() failed:URL using bad/illegal format or missing URL错误信息很明显,就是URL不太对,此时我是这样调用的:先使用了 std::string 保存对应的url,然后传入到curl的设置里面,看起来没有什么问题,该URL也是绝对能用的,但是运行...

2019-06-11 09:54:31 15682

原创 Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

1.问题由来。使用AndroidStudio在genymotion模拟器上安装一个app的时候出现了这个错误报告:刚开始没有仔细看前面的error提示,还以为是之前的数据没有清理干净,于是直接点了OK并且见到了一个之前遇到过的错误提示,下意识的按照之前的错误进行处理排查。但是没有成效,在把模拟器删除重新创建之后还是出现这个问题,意识到这是一个全新的问题。使用本人的Android真机运行无...

2019-01-28 13:26:31 31272 3

原创 ID3决策树中连续值的处理。

在之前的基于信息增益的ID3决策树介绍。介绍了ID决策树的一些内容,但是其中所使用的特征值都是离散的,但有些特征值可能不是离散而是连续属性,比如在周志华老师的西瓜书中西瓜数据集3.0就包含了密度和含糖率这两个特征值。本文以西瓜书中的知识点为基础来大致讲解一下如何处理计算这种连续属性。连续属性的介绍。在西瓜数据集3.0中出现了密度和含糖率这两种连续属性。在之前介绍过决策树的划分条件,是选取一个最合适的

2018-04-28 21:01:02 16284 13

原创 西瓜书中ID3决策树的实现。

在上一篇文章基于信息增益的ID3决策树介绍。中介绍了基本的决策树概念和基于信息增益的ID3决策树的计算。这篇文章中介绍一下如何使用Python实现一个ID3决策树,其中主要的代码来自于机器学习实战一书中,本人对其做了一些改动,增加了一些内容。决策树的伪代码。决策树的生成可以使用一个递归来实现,在西瓜书中给出了决策树的伪代码: 输入:训练集D=(x1,y1),(x2,y2),...,(xm,ym)

2018-03-20 20:42:32 9820 14

原创 使用ZooKeeper实现数据发布/订阅。

发布订阅模式简述使用ZooKeeper实现发布/订阅模式简述。这是属于一种设计模式,在此不做过多的介绍,只是给出大概的概念。 发布订阅模式定义了一种一对多的依赖关系,让多个订阅者对象同时监听某一个主题对象。这个主题对象在自身状态变化时,会通知所有订阅者对象,使它们能够自动更新自己的状态。订阅/发布模式也分为两种,分别是推模式和拉模式。 在推模式中,服务器主动将数据更新发送给所有订阅的客户

2017-12-10 21:38:03 5231

原创 Curator的三种缓存。

Curator分类NodeCachePathChildrenCacheTreeCache示例在使用原生的ZooKeeper的时候,是可以使用Watcher对节点进行监听的,但是唯一不方便的是一个Watcher只能生效一次,也就是说每次进行监听回调之后我们需要自己重新的设置监听才能达到永久监听的效果。Curator在这方面做了优化,Curator引入了Cache的概念用来实现对ZooKeepe

2017-12-07 16:49:57 8330

原创 利用Volume在主机和Docker容器文件传输。

之前写过一篇关于Docker容器和本机之间的文件传输。的文章,但是此方法相对比较繁琐一些,在查看了官方关于数据管理的文档之后发现利用volume来实现主机和容器的文件传输效率更高一点,其实也就是将本地的目录进行挂载到容器上,官方一共有三种方法:Manage data in Docker, 这里只介绍使用volume的操作:Use volumes1.使用Volume在主机和容器之间传输文件。在官方

2017-11-19 16:57:45 8119

原创 C语言中socket使用讲解。

1.socket定义。在Linux中的网络编程是通过socket接口来进行的。其实socket接口也是一种特殊的I/O(在《深入理解计算机系统》这本书中的IO部分也有提到网络也是一种特殊的IO),它也是一种文件描述符。socket也有一个类似于打开文件的函数调用,该函数返回一个整型的socket描述符,随后的建立连接、数据传输等操作都是通过socket来实现的。2.socket的类型。1 .流式so

2017-11-06 20:52:51 23775 5

原创 Docker容器和本机之间的文件传输。

主机和容器之间传输文件的话需要用到容器的ID全称。获取方法如下:1.先拿到容器的短ID或者指定的name。2.然后根据这两项的任意一项拿到ID全称。有了这个长长的ID的话,本机和容器之间的文件传输就简单了。docker cp 本地文件路径 ID全称:容器路径进入容器之后就能够看到刚才上传进来的文件了。如果是容器传输文件到本地的话,反过来就好了:docker cp ID全称:容器文件路径 本地路径

2017-05-14 21:35:20 92760 10

原创 1051. Height Checker。

Students are asked to stand in non-decreasing order of heights for an annual photo.Return the minimum number of students not standing in the right positions. (This is the number of students that mus...

2019-06-12 14:21:46 452

原创 709. To Lower Case。

Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase.原文链接:https://leetcode.com/problems/to-lower-case/水。。。class Solution {public: string ...

2019-06-12 11:17:39 323

原创 977. Squares of a Sorted Array。

Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.Example 1:Input: [-4,-1,0,3,10]Output: [0,1,9,16,1...

2019-06-07 11:35:47 207

原创 发现生活,改变自己。

以前没有出来生活过,初到北京,感到生活的一丝不易,才知道自己欠缺的远远不止技术方面的东西,还有许多有关生活的方面的,希望经历一些磨练能够很好的锤炼自己,保持时刻学习的心态继续努力。...

2019-06-04 23:43:16 337 1

原创 66. Plus One。

Given a non-empty array of digits representing a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of the list, and each element...

2019-01-10 21:00:43 291

原创 846. Hand of Straights。

Alice has a hand of cards, given as an array of integers.Now she wants to rearrange the cards into groups so that each group is size W, and consists of W consecutive cards.Return true if and only i...

2019-01-06 23:59:30 298

原创 830. Positions of Large Groups。

In a string S of lowercase letters, these letters form consecutive groups of the same character.For example, a string like S = “abbxxxxzyy” has the groups “a”, “bb”, “xxxx”, “z” and “yy”.Call a gro...

2019-01-05 16:31:41 301

原创 888. Fair Candy Swap。

Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Alice has, and B[j] is the size of the j-th bar of candy that Bob has.Since they are friends, they wo...

2019-01-04 22:33:48 315

原创 896. Monotonic Array。

An array is monotonic if it is either monotone increasing or monotone decreasing.An array A is monotone increasing if for all i <= j, A[i] <= A[j]. An array A is monotone decreasing if for al...

2019-01-03 21:21:17 272

原创 876. Middle of the Linked List。

Given a non-empty, singly linked list with head node head, return a middle node of linked list.If there are two middle nodes, return the second middle node.Example 1:Input: [1,2,3,4,5]Output: N...

2019-01-03 20:29:12 282

原创 867. Transpose Matrix。

Given a matrix A, return the transpose of A.The transpose of a matrix is the matrix flipped over it’s main diagonal, switching the row and column indices of the matrix.Example 1:Input: [[1,2,3],...

2019-01-03 19:14:21 211

原创 922. Sort Array By Parity II。

Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even.Sort the array so that whenever A[i] is odd, i is odd; and whenever A[i] is even, i is...

2019-01-02 20:32:25 309

原创 832. Flipping an Image。

Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.To flip an image horizontally means that each row of the image is reversed. For examp...

2019-01-01 17:57:38 258

原创 905. Sort Array By Parity。

Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.You may return any answer array that satisfies this conditio...

2018-12-30 21:42:43 244

原创 728. Self Dividing Numbers。

A self-dividing number is a number that is divisible by every digit it contains.For example, 128 is a self-dividing number because 128 % 1 == 0, 128 % 2 == 0, and 128 % 8 == 0.Also, a self-dividin...

2018-06-30 17:23:19 363

原创 Windows 10 错误1920,未能启动服务:office software protection platform。

机器上的Office2010突然间不能用了,需要安装什么配置文件,但是在安装的过程中出现了该错误,大致查了查应该是权限的问题,其中这篇文章中介绍了Win7的解决办法:https://answers.microsoft.com/zh-hans/office/forum/office_2010-office_install/answers-%E5%88%86%E4%BA%AB/a2c57085-b3c...

2018-05-28 18:02:41 21646 7

原创 804. Unique Morse Code Words。

International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: “a” maps to “.-“, “b” maps to “-…”, “c” maps to “-.-.”, and so on.For con...

2018-04-30 14:45:35 505

原创 使用信号量机制解决家庭吃水果问题。

桌上有一个可以容纳3个水果的盘子,每次只能放或取一个水果,爸爸负责削苹果,妈妈负责剥桔子,儿子只吃苹果,女儿只吃橘子。使用信号量机制来解决。设置一个empty变量表示盘中还有几个空位置,然后设置apple和orange记录盘中苹果和橘子的数量。运行结果:源代码:#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <p

2018-03-28 13:56:25 7175 6

原创 Python:使用pypdf2合并、分割、加密pdf文件。

朋友需要对一个pdf文件进行分割,在网上查了查发现这个pypdf2可以完成这些操作,所以就研究了下这个库,并做一些记录。首先pypdf2是python3版本的,在之前的2版本有一个对应pypdf库。可以使用pip直接安装:pip install pypdf2官方文档:https://pythonhosted.org/PyPDF2/里面主要有这几个类:PdfFileReader 。该类主要提供了对pd

2018-03-28 00:20:03 13431 3

原创 基于信息增益的ID3决策树介绍。

这篇文章介绍一下一种常见的机器学习算法:决策树。这篇文章的主要是根据《机器学习》中的知识点汇总的,其中使用了《机器学习实战》的代码。关于决策树中基本信息以及公式更加推荐看一看《机器学习》这本书,书中不仅仅介绍了ID3决策树,而且还包含了C4.5以及CART决策树的介绍。所以本篇文章将使用西瓜书(也就是《机器学习》,以后都用西瓜书代替)中的数据集来进行测试。决策树的介绍。顾名思义,决策树这个名字可以分

2018-03-17 18:48:56 5749

原创 西瓜数据集介绍以及获取。

西瓜数据集介绍。这里介绍一下《机器学习》中的西瓜数据。数据集也不少,放在别的文章中介绍就会略占篇幅,还是单独的介绍一下并且给出数据样本。在西瓜书中,主要使用到的数据样本共有2.0、3.0、4.0这三个版本,但是还有一些用到的数据集。西瓜数据集2.0在西瓜数据集2.0中的特征主要有以下几种:色泽、根蒂、敲声、纹理、脐部、触感。这几个数值都是离散数值,每个特征共有三个离散值。...

2018-03-14 21:35:35 29118 4

原创 347. Top K Frequent Elements。

Given a non-empty array of integers, return the k most frequent elements.For example, Given [1,1,1,2,2,3] and k = 2, return [1,2].原文:https://leetcode.com/problems/top-k-frequent-elements/description/题

2018-03-11 23:09:13 266

原创 389. Find the Difference。

Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was added in

2018-02-25 19:45:27 289

原创 451. Sort Characters By Frequency。

Given a string, sort it in decreasing order based on the frequency of characters.Example 1: Input: “tree” Output: “eert” Explanation: ‘e’ appears twice while ‘r’ and ‘t’ both appea

2018-02-25 19:18:56 276

原创 nginx和vsftpd搭建图片服务器。

前面已经安装了vsftpd服务:Vsftpd的安装和配置。现在再安装一个nginx服务器,配合起来就能够完成一个简易的图片服务器。nginx服务器之前也研究过,但是没有做什么笔记也都全忘了,事实证明不能太相信自己的记忆,好记性不如烂笔头。nginx的安装。本人使用的ubuntu系统,安装nginx比较简单,但是nginx需要依赖几个额外的库,首先因为nginx编译2环境需要依赖gc...

2018-02-24 19:16:40 674

原创 Vsftpd的安装和配置。

需要使用ftp来做图片服务器,就选用了vsftpd来实现。安装起来比较简单,但是在过程中出现了几个问题,为了防止以后使用,就记录一下整个过程。安装首先本人使用的是ubuntu系统,安装vsftpd直接使用命令即可:sudo apt-get install vsftpd安装完成之后需要查看对应的端口是否开放了,ftp使用的是21端口:netstat -npltu | grep 21登陆。等待安装完成之

2018-02-23 20:38:10 629

原创 748. Shortest Completing Word。

Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete the given string licensePlateHere, for letters we ign

2018-02-23 00:02:41 650

原创 739. Daily Temperatures。

Given a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this i

2018-02-22 23:16:08 863

原创 PageHelper版本差异造成的Interceptor和dialect问题。

问题描述。在学习网上流传的电商项目,项目也比较老了,在对mybatis分页的时候使用的是pagehelper。在最初搭建项目的时候,我没有使用教程中给的本地maven,而是直接从网上拉取包。教程中pagehelper使用的版本号是:&lt; pagehelper.version &gt;3.4.2fix&lt; /pagehelper.version &gt;,当时一直下载不下来(后来才知道f...

2018-02-22 20:15:23 6210 2

原创 136. Single Number。

Given an array of integers, every element appears twice except for one. Find that single one.原文:https://leetcode.com/problems/single-number/description/在一写数字中,有一个数字只出现了一次,其余的都出现了两次,找出出现一次的数字。首先可以利用额外的辅

2018-02-21 20:33:48 318

原创 463. Island Perimeter。

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely s

2018-02-21 13:02:51 276

系统分析与设计-小云铺上商城系统

系统分析与设计课程设计、小云铺商城系统、采用startUML建模、vision绘制部分图。包括用例图、类图、活动图、协作图、部署图、流程图等等,文档齐全。

2017-12-26

hadoop安装指南

hadoop安装指南

2017-05-22

Oracle11g安装卸载详细图解

oracle11g安装过程图解

2017-05-14

Android无限轮播源码

Android基于ViewPager实现的无限轮播源码

2017-04-06

ChromeDriver驱动(win32)

下载后解压,如果是使用python,则将解压后的文件放到python安装的目录下面。

2017-02-11

c++文件加密课程设计

采用cpp实现文件加密,加密算法包括凯撒加密、异或加密、四方加密、栅栏加密、base64加密。

2017-01-19

JavaScript注册登录

JavaScript注册登录界面

2016-12-16

C++贪吃蛇源代码

C++贪吃蛇源代码。

2016-12-11

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

TA关注的人

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