自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 vue使用引用库中的方法

monaco-editor-vue的官方源码如下Index.jsimport * as monaco from 'monaco-editor/esm/vs/editor/editor.api';function noop() { }export { monaco };export default { name: 'MonacoEditor', props: { diffEditor: { type: Boolean, default: false }, //是否使用

2021-07-22 20:08:01 244 1

原创 vue使用monaco-editor的demo

npm install monaco-editor@0.26.0npm install monaco-editor-webpack-plugin@4.0.0 //这个必须安装,不然起不来vue使用monaco-editor的demotest.vue<template> <div id="container" style="height: 1000px"></div></template><script>import * as m

2021-07-21 16:10:56 425

原创 python 装饰器

def dec1(func): print("1111") def one(): print("2222") func() print("3333") return onedef dec2(func): print("aaaa") def two(): print("bbbb") func() print("cccc") return two@dec1@d

2021-06-22 18:07:57 108

原创 Cannot find module ‘vs/editor/contrib/inlineHints/inlineHintsController‘

报错原因:monaco-editor-webpack-plugin和monaco-editor的版本对应出现了问题排查思路:查看本地包对应的依赖npm list --depth 0按照提示安装正确的monaco-editorhttps://www.npmjs.com/package/monaco-editor-webpack-plugin...

2021-06-18 17:42:23 1972 2

原创 Mac安装brew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

2021-03-31 14:15:36 59

原创 卸载未知安装目录的python3

找到当前默认python3的安装位置#!/usr/bin/env bashpython3import syssys.executable'/Library/Frameworks/Python.framework/Versions/3.6/bin/python3'去/Library/Frameworks/Python.framework/Versions/3.6/bin/目录下把python3相关的全部卸载即可...

2021-03-29 15:59:09 115

原创 ssh配置

ssh 公钥认证是ssh认证的方式之一,通过公钥认证可实现ssh免密码登陆,git的ssh方式也是通过公钥进行认证的。在用户目录的home目录下,有一个.ssh的目录,和当前用户ssh配置认证相关的文件,几乎都在这个目录下。配置公钥私钥cd ./.ssh默认:ssh-keygen -f test -C "test key"自定义:ssh-keygen -t rsa -f 文件名 -C "xxxx@qq.com"eg: ssh-keygen -t rsa -f github

2021-03-21 22:35:38 84

原创 iTerm2 + on my zsh 配置和美化

安装iTerm2https://iterm2.com/调整Status BarPreferences-Appearance-General-Theme/Status bar location 以达到顶栏沉浸式的效果Preferences - Profiles - Session - Status bar enabled 开启并调节

2020-12-27 17:46:38 637

原创 python的yield

yield可以理解为一个return生成器def foo(): print("starting...") print('外1循环') while True: print('内1循环') res = yield 4 print("res:",res) print('内2循环') print('外2循环')g = foo()print('step1')print(next(g))print('step2')

2020-10-13 23:11:54 69

原创 __init__,self

name = "whole global name";class Person: # 在开始初始化新的类Class的示例Instance的时候,给对应的、不同的Instance,设置不同的人名(Person name) def __init__(self, newPersionName): # 此处正确的,通过访问self.name的形式,实现了: # 1.给实例中,增加了name变量 # 2.并且给name赋了初值,为newPersio

2020-06-23 10:13:58 118

原创 SpringBoot以jar包部署需要注意的thymeleaf页面映射问题

SpringBoot以jar包部署需要注意的thymeleaf页面映射问题本地测试通过,部署到服务器就无法打开:是由于不同环境对路径的读取不同本地为ModelAndView modelAndView = new ModelAndView("/admin/admin/index.html");服务器部署:ModelAndView modelAndView = new ModelAndV...

2020-02-01 11:58:42 212

原创 使用spring-boot-maven-plugin插件打包SpringBoot应用pom.xml文件

<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugi...

2020-01-29 14:06:31 714

原创 运行spark程序,抛出异常:ERROR Shell: Failed to locate the winutils binary in the hadoop binary path

windows运行spark程序,抛出异常:ERROR Shell: Failed to locate the winutils binary in the hadoop binary path问题原因:在windows环境下没有配置hadoop环境的原因解决方法:1.下载winutils的windows版本GitHub上,有人提供了winutils的windows的版本,项目地址是:ht...

2020-01-27 19:35:06 405

原创 IK中文分词器

IK分词器是目前用的最广泛的中文分词器elasticsearch安装ik plugin bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.3.0/elasticsearch-analysis-ik-7.3.0.zip检查plugin...

2020-01-07 18:51:02 117

原创 Elasticearch查询语法+评分调整

Query DSL语法match查询# 按照字段上定义的分词分析后去索引内查询GET /movie/_search{ "query":{ "match":{"title":"steve"} }}term查询# 不进行词的分析,直接去索引查询,及搜索关键词和索引内词的精确匹配GET /movie/_search{ "query":{ "term":{"...

2020-01-06 16:55:03 717

原创 Elasticsearch在Linux的配置及常见问题

1、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]描述:Elasticsearch用户拥有的内存权限太小,至少需要262144解决办法:vim /etc/sysctl.conf最后一行添加:vm.max_map_count=2621442、root用...

2020-01-03 11:03:58 200

原创 Linux下安装jdk

操作系统:CentOS下载jdk8可以使用Windows下载,然后传到虚拟机进入jdk下载页面https://www.oracle.com/technetwork/java/javase/downloads/index.html下拉找到JavaSE8,点击右侧jdk下的download按钮点击同意协议 ○Accept License Agreement选择Linux的jdk,这里选择...

2020-01-02 19:39:01 99

原创 maven使用阿里云镜像

<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf e...

2019-11-16 20:14:27 143

原创 SpringBoot报错:Content type 'text/plain;charset=UTF-8' not supported

控制台输出:Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported]访问的接口:@PostMapping("/book") public ResponseEntity<List<B...

2019-11-11 15:57:38 59007 12

原创 python生成随机数

python生成随机数、随机字符串import random#多个字符中生成指定数量的随机字符:random.sample("ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz0123456789", 22)# 随机选取字符串:print random.choice(['剪刀', '石头', '布']# 打乱排序items ...

2019-10-22 19:52:34 175

原创 Python with 关键字

待定

2019-10-11 11:07:41 104 1

原创 Idea使用Mybatis Generator 自动生成映射类

1.创建一个maven工程2.配置pom文件<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.41</version> &l...

2019-07-19 15:32:23 510

原创 求平均值溢出

int a = 2147483645;int b = 2147483647;求取平均值System.out.println((a + b) / 2);System.out.println(a + (b - a) / 2);System.out.println((a + b) >> 1);System.out.println((a + b) >>> 1);...

2019-07-10 22:35:13 246

空空如也

空空如也

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

TA关注的人

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