自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

自学it的攻城狮

计算机/生活/理财

  • 博客(75)
  • 资源 (5)
  • 收藏
  • 关注

原创 [粉丝福利] HUAWEI云服务免费使用90天

一:华为云200元无门槛代金券+免费领取一台服务器一个月(代金券可以用来续费免费的服务器还能单独购买三个月免费服务器。代金券三个工作日内到账,到账会有短信提醒)一共可以免费使用服务器三个月二:有些小伙伴可能需要更多的时长,更高的配置!!!参与最新活动!华为云服务器1核2G1M带宽服务器281元一年起,可购买三年!!!2核4G2M服务器,499元一年,可购买三年!!!注意:优惠产品仅限华为云新用户,如要购买,一定不要提前使用代金券,用了代金券就失去了新用户资格!!!而且上面福利都是100%获得的.

2020-07-13 12:14:14 570

原创 #前端# 小程序云开发

目录结构:index.html<view> username: <input bindinput="addName"></input> password: <input type="password" bindinput="addPwd"></input> <button class="btn" bindtap="add" type="primary">添加数据</button> <button

2020-06-07 23:53:45 899

原创 #前端# webpack4基础到进阶

初始化一个webpack项目npm initnpm install --save-dev webpack webpack-cliwebpack目录结构![在这里插入图片描述](https://img-blog.csdnimg.cn/20200528233211187.png)配置入口和输出- 创建 webpack.config.js- 入口文件为 src/index.js- 输出打包文件为 dist/bundle.jsconst path = require('path')modu

2020-05-29 16:36:31 203

原创 #javascript# 数组扁平化

let arr = [{ a:1, children: [ {b: 2}, {c: 3} ]}, { d:4, children: [ {e: 5}, {f: 6} ]}]// 数组扁平化function flatten(arr) { return [].concat(...arr.map(item => { if (item.children &&

2020-05-24 23:49:04 202

原创 #前端# 记录安装scss依赖的一些问题

- 遇到的问题 - node-sass版本太低的导致编译失败 - sass-loader版本过高导致编译失败- 执行两条安装命令- cnpm install node-sass@latest -S- cnpm install sass-loader@7.3.1 -S- 安装完之后完美解决了问题...

2020-05-01 23:28:16 312

原创 #小程序# mpvue引入vant的注意事项

- 安装vant - npm install vant-weapp -S --production- 引用 - /app.json "usingComponents": { "van-button": "vant-weapp/dist/button/index" }- 使用 <template> <div id="hello"> ...

2020-04-30 23:13:20 448

原创 #vue# 组件间通讯

父子组件间通讯1. 父组件通过向子组件传递一个函数供子组件调用2. this.$emit && @3. this.$parent.$emit && @ - 这种方式只可以与直接父组件进行通讯...

2020-04-20 23:22:58 106

原创 #Vue# bus组件间通讯

原理: 其实就是在Vue的原型上添加一个bus属性, 给这个bus属性赋值一个新的vue实例,作用:vue具有数据劫持功能, 数据发生改变会影响视图的更新app/utils/bus.jsexport default { install(vue) { vue.prototype.$bus = new vue({ data: { ...

2020-04-20 23:06:08 131

原创 #前端# Vue+webpack手动搭建开发环境

需要安装的依赖- vue-loader- vue-template-compilernpm install vue-loader vue-template-compiler --save-devwebpack.config.js 配置const path = require('path')const VueLoaderPlugin = require('vue-loader/lib/...

2020-04-20 22:49:48 125

原创 [javascript]练习题整理(持续更新)

去重const arr = [1,1,1,1,1,1,3,3,3,3,32,2,2,2,2,3,3,4,-1,-10,-10,-1,4,4,5,5,9]// set方式去重// 不改变源数组的数据console.log([...new Set(arr)])// includes方式去重, 时间复杂度 O(n)function uniq(arr) { let _result...

2020-04-12 23:31:51 1453

原创 [javascript] js深拷贝

// 定义一个对象var obj = { a: 1, b: { name: 'mystic', say: function() { console.log('my name is ' + this.name) }, child: { name: 'subObj', ...

2020-04-12 00:23:50 98

原创 #nodejs# express统一异常处理

文件路径: /router/index.js使用到的npm包: boomconst express = require('express')const boom = require('boom')const userRouter = require('./user/user')const {ERR_CODE} = require('../utils/constant')const ...

2020-03-17 14:22:38 1114 1

原创 #nodejs# 统一返回结果处理类

/utils/constant.jsmodule.exports = { ERR_CODE: -1, SUCC_CODE: 0}/models/Result.jsconst {ERR_CODE, SUCC_CODE} = require('../utils/constant')class Result { constructor(data, msg='操作成功...

2020-03-17 14:19:53 2559 3

原创 #开发# 用户路由权限校验流程图

2020-03-15 18:44:42 330

原创 #开发流程# 用户登录模块开发流程图

2020-03-15 17:29:13 2235

原创 #nginx# windows下快速搭建一个简易的nginx服务器

下载地址: http://nginx.org/en/download.html我的nginx下载默认路径: C:\Users\Administrator\Downloads\nginx-1.17.9私有静服务路径:C:\Users\Administrator\Downloads\nginx-1.17.9\conf\upload修改nginx.conf文件注意加上最后两行#user ...

2020-03-15 16:55:57 397

原创 #SpringBoot# 搜索框架ElasticSearch介绍和整合SpringBoot

搜索知识和搜索框架elasticsearch介绍开源搜索框架ElasticSearch6.x新特性前言:介绍ES的主要特点和使用场景,新特性讲解mysql:like 模糊,性能问题,solr:针对企业,Luceneelasticsearch:针对数据量特别大,PB,TB纯java开发,springboot使用,5.6版本es升级4->5版本,改动大,但是5版本后,改动不大el...

2020-02-16 19:13:26 237

原创 #SpringBoot# Logback日志框架介绍和SpringBoot整合

新日志框架LogBack介绍日志介绍和新日志框架Logback1.常用处理java的日志组件 slf4j,log4j,logback,common-logging 等2、logback介绍:基于Log4j基础上大量改良,不能单独使用,推荐配合日志框架SLF4J来使用 logback当前分成三个模块:logback-core,logback-classic和logback-access;...

2020-02-16 19:09:38 138

原创 #SpringBoot# SpringBoot整合定时任务和异步任务处理

SpringBoot定时任务schedule什么是定时任务和常见定时任务区别1、常见定时任务 Java自带的java.util.Timer类 timer:配置比较麻烦,时间延后问题 timertask:不推荐2、Quartz框架 配置更简单 xml或者注解3、SpringBoot使用注解方式开启定时任务 1)启动类里面 @EnableScheduling开启定时任务,自动扫描 ...

2020-02-16 19:06:24 146

原创 #java# 并发下的接口限流

- 谷歌guava框架介绍, 网关限流使用 - example: guava每一秒产生100个令牌, 每一个进来的请求只要拿到了令牌就能够继续往下执行, 如果限定的期间内令牌被消费完了, 那么后续更多的请求都会被拒绝掉- nginx限流 - nginx + keeplive + lvs- 网关限流- 示例代码 /* * 限流连接数 qps * */ priva...

2020-02-16 18:39:05 134

原创 #SpringBoot# SpringBoot2.x整合Redis

分布式缓存Redis为什么要用缓存和介绍什么是Redis,新手练习工具 ​1、redis官网 https://redis.io/download2、新手入门redis在线测试工具:http://try.redis.io/源码编译安装Redis4.x使用源码安装Redis4.x和配置外网访问1、快速安装 https://redis.io/download#installation...

2020-02-16 18:36:40 153

原创 #SpringBoot# 数据库操作之整合Mybaties和事务

SpringBoot2.x持久化数据方式近几年常用的访问数据库的方式和优缺点1、原始java访问数据库 开发流程麻烦 1、注册驱动/加载驱动 Class.forName("com.mysql.jdbc.Driver") 2、建立连接 Connection con = DriverManager.getConnection("jdbc:mysql://localhost:...

2020-02-16 18:33:34 161

原创 #SpringBoot# SpringBoot常用Starter介绍和整合模板引擎Freemaker、thymeleaf

SpringBoot Starter介绍什么是SpringBoot Starter和主要作用1、官网地址:https://docs.spring.io/spring-boot/docs/2.1.0.BUILD-SNAPSHOT/reference/htmlsingle/#using-boot-starter2、starter主要简化依赖用的 spring-boot-starter-web...

2020-02-16 18:30:09 134

原创 #SpringBoot# SpringBoot拦截器实战和 Servlet3.0自定义Filter、Listener

深入SpringBoot过滤器和Servlet3.0配置过滤器SpringBoot里面Filter讲解和使用Servlet3.0配置自定义Filterfilter简单理解:人--->检票员(filter)---> 景点 1、SpringBoot启动默认加载的Filter characterEncodingFilter hiddenHttpMethodFilter ...

2020-02-16 16:39:50 261

原创 #SpringBoot# SpringBoot部署war项目到tomcat9

SpringBoot启动方式讲解和部署war项目到tomcat9SpringBoot常见启动方式讲解和部署war项目Tomcat1、ide启动2、jar包方式启动 maven插件: <build> <plugins> <plugin> <groupId>org.springframework.boot<...

2020-02-16 16:36:43 661

原创 #SpringBoot# Springboot2.0单元测试和自定义异常处理

SpringBootTest单元测试//1、引入相关依赖 <!--springboot程序测试依赖,如果是自动创建项目默认添加--> <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</ar...

2020-02-16 16:34:50 293

原创 #SpringBoot# SpringBoot热部署devtool和配置文件自动注入实战

SpringBoot2.x使用Dev-tool热部署什么是热部署,使用springboot结合dev-tool工具,快速加载启动应用官方地址:https://docs.spring.io/spring-boot/docs/2.1.0.BUILD-SNAPSHOT/reference/htmlsingle/#using-boot-devtools核心依赖包: <dependenc...

2020-02-16 15:33:32 188

原创 #SpringBoot# SpringBoot接口Http协议开发

SpringBoot2.xHTTP请求配置SpringBoot2.xHTTP请求注解讲解和简化注解配置@RestController and @RequestMapping是springMVC的注解,不是springboot特有的@RestController = @Controller+@ResponseBody@SpringBootApplication = @Configurati...

2020-02-16 15:22:54 1493

原创 #SpringBoot# springboot2.x上手基本环境搭建

springboot开发需要的基本环境java基础jdk环境maven基础SpringBoot2.x依赖环境和版本新特性说明1、依赖版本jdk8以上, Springboot2.x用JDK8, 因为底层是 Spring framework52、安装maven最新版本,maven3.2以上版本,下载地址 :https://maven.apache.org/download.cgi3...

2020-02-16 14:58:51 151

原创 #NodeJS# MongoDB常用数据库操作之创建集合、文档

mongodb不需要显示创建数据库,如果数据库不存在,它会自动创建。创建集合const Schema = new mongoose.Schema(options) //创建集合结构(规则) options集合的结构(规则)const Model = mongoose.model(modelName, schema) //modalName集合名称schema集合结构//案例例代码...

2020-02-14 20:54:29 722

原创 #NodeJS# MySQL的介绍安装使用以及使用NodeJS链接MySQL实现增删改查

mysql介绍什么是mysql?mysql是⼀一个数据库管理理系统。数据库是存储、管理理数据的仓库。mysql环境安装配置请自行百度安装过程出现错误总结:执行mysqld出现以下错误,可能是电脑缺少VC++ 2015运行库,安装一下就可以了了VC++2015下载地址:https://www.microsoft.com/zhCN/download/details.aspx?i...

2020-02-14 17:55:42 380

原创 #NodeJS# NodeJS中跨域问题解决方案

什么是跨域?浏览器器同源策略略:协议+域名+端口三者相同就是同源。http://www.baidu.com/a.js http://www.baidu.com/b.jshttps://www.baidu.com/a.js http://www.baidu.com/a.js 协议不不同https://www.baidu.com:8080/a.js https://www.baidu.c...

2020-02-14 17:35:20 218

原创 #NodeJS# NodeJs核心模块api路由与接口

如何处理理客户端get/post请求url.parse(urlString[, parseQueryString[, slashesDenoteHost]])urlString url字符串串parseQueryString 是否解析slashesDenoteHost默认为false,//foo/bar 形式的字符串串将被解释成 { pathname: ‘//foo/bar’ }...

2020-02-14 17:31:31 547 1

原创 #NodeJS# 核心模块util常用工具

util模块里常用的工具util.callbackify(original) 将 async 异步函数(或者一个返回值为 Promise 的函数)转换成遵循异常优先的回调⻛风格的函数const util = require('util');async function hello(){return 'hello world'}let helloCb = util.callbac...

2020-02-14 16:11:05 206

原创 #NodeJS# 使用NodeJS实现一个简易爬虫

如何使用http模块做一个简单的爬虫简单爬虫实现const https = require('https');const fs = require('fs');https.get('https://xdclass.net/#/index',(res)=>{res.setEncoding('utf8');let html = '';res.on('data',chunk =&...

2020-02-14 16:10:13 161

原创 #HTTP# http全面解析

http的发展历史http是什什么? http://www.xxx.comhttp协议(HyperText Transfer Protocol,超文本传输协议)是一种应用广泛的网络传输协议。http是一个基于TCP/IP通讯协议来传递数据(HTML文件,图片文件,查询结果等)。http工作原理理http协议工作在客户端-服务端之间主流的三个web服务器器:Apache、 Ng...

2020-02-14 16:01:56 604

原创 #NodeJS# node.js事件触发器

事件触发器events的使用方法eventEmitter.on(eventName, listener)注册监听器器eventName | 事件名称listener 回调函数。eventEmitter.emit(eventName[, …args]) 触发事件eventName | 事件名称…args 参数eventEmitter.once(eventName, lis...

2020-02-14 15:33:08 173

原创 #NodeJS# 基础模块path常用api

path.basename(path[,ext]) 返回path的最后一部分path.dirname(path) 返回path的目录名path.extname(path) 返回path的扩展名path.join([…paths]) 路路径拼接path.normalize(path) 规范化路路径path.resolve([…paths]) 将路路径解析为绝对路路径path.forma...

2020-02-14 14:42:31 176 1

原创 #NodeJS# 文件流相关操作

如何创建读取文件流和创建写入文件流Node.js 中有四种基本的流类型:Writable - 可写入数据的流(例例如 fs.createWriteStream() )。Readable - 可读取数据的流(例例如 fs.createReadStream() )。Duplex - 可读又可写的流(例例如 net.Socket )。Transform - 在读写过程中可以修改或转换...

2020-02-14 14:35:45 262

原创 #NodeJS# 文件操作模块API使用

文件操作相关API引入文件系统模块fs···const fs = require(‘fs’)···fs.readFile(path[, options], callback) 读取文件path | | 文件路路径callback 回调函数errdata | 读取的数据···fs.readFile(’./hello.txt’,‘utf8’,(err,data) =>...

2020-02-14 14:15:20 229

数据结构习题

数据结构习题

2018-11-21

PHP基础教程(第四版)[pdf]

PHP基础教程(第四版)[pdf]

2018-11-21

Angular权威教程[pdf]

Angular权威教程[pdf]

2018-11-21

Node.js实战(第2版)[pdf]

Node.js实战(第2版)

2018-11-21

数据结构与算法之美

数据结构与算法之美

2018-11-21

空空如也

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

TA关注的人

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