ElasticSearch安装中文分词器IK
1、安装IK分词器,下载对应版本的插件,elasticsearch-analysis-ik中文分词器的开发者一直进行维护的,对应着elasticsearch的版本,所以选择好自己的版本即可。IKAnalyzer中文分词器原作者已经不进行维护了,但是Lucece在不断更新,所以使用Lucece和IKAnalyzer中文分词器集成,需要你进行修改IKAnalyzer中文分词器。
下载地址:https://github.com/medcl/elasticsearch-analysis-ik/releases
将下载好的中文分词器上传到你的服务器,或者使用wget命令联网下载,萝卜白菜各有所爱吧。我的IK中文分词器版本对应了ElasticSearch的版本。下载好开始安装,由于我是伪分布集群,就一台集群,就安装一次即可,但是如果是分布式的话,每一台机器都要安装中文分词器的。
2、开始解压缩操作,将elasticsearch-analysis-ik-5.4.3.zip拷贝到一个目录里面进行解压缩操作,安装IK中文分词器。
[root@slaver4 package]# mkdir elasticsearch-analysis-ik
[root@slaver4 package]# cp elasticsearch-analysis-ik-5.4..zip elasticsearch-analysis-ik
[root@slaver4 elasticsearch-analysis-ik]# unzip elasticsearch-analysis-ik-5.4..zip
Archive: elasticsearch-analysis-ik-5.4..zip
inflating: elasticsearch-analysis-ik-5.4..jar
inflating: httpclient-4.5..jar
inflating: httpcore-4.4..jar
inflating: commons-logging-1.2.jar
inflating: commons-codec-1.9.jar
creating: config/
creating: config/custom/
inflating: config/surname.dic
inflating: config/preposition.dic
inflating: config/custom/mydict.dic
inflating: config/custom/single_word_full.dic
inflating: config/custom/sougou.dic
inflating: config/custom/ext_stopword.dic
inflating: config/custom/single_word.dic
inflating: config/custom/single_word_low_freq.dic
inflating: config/main.dic
inflating: config/IKAnalyzer.cfg.xml
inflating: config/quantifier.dic
inflating: config/stopword.dic
inflating: config/suffix.dic
inflating: plugin-descriptor.properties
[root@slaver4 elasticsearch-analysis-ik]# ls
commons-codec-1.9.jar commons-logging-1.2.jar config elasticsearch-analysis-ik-5.4..jar elasticsearch-analysis-ik-5.4..zip httpclient-4.5..jar httpcore-4.4..jar plugin-descriptor.properties
[root@slaver4 elasticsearch-analysis-ik]#
由于unzip的默认解压缩到当前目录,这里可以将elasticsearch-analysis-ik-5.4.3.zip包删除掉。
[root@slaver4 elasticsearch-analysis-ik]# ls
commons-codec-1.9.jar commons-logging-1.2.jar config elasticsearch-analysis-ik-5.4..jar elasticsearch-analysis-ik-5.4..zip httpclient-4.5..jar httpcore-4.4..jar plugin-descriptor.properties
[root@slaver4 elasticsearch-analysis-ik]# rm -rf elasticsearch-analysis-ik-5.4..zip
[root@slaver4 elasticsearch-analysis-ik]# ls
commons-codec-1.9.jar commons-logging-1.2.jar config elasticsearch-analysis-ik-5.4..jar httpclient-4.5..jar httpcore-4.4..jar plugin-descriptor.properties
[root@slaver4 elasticsearch-analysis-ik]#
然后将解压缩好的IK移动到ElasticSearch的plugins目录下面。记得三个节点plugins目录里面都需要放的哦。如下所示:
注意:放到plugins目录里面的IK中文分词器插件,必须放到一个目录里面,再放到plugins目录里面。如我的elasticsearch-analysis-ik里面存的就是IK中文分词器解压缩后的文件。
[root@slaver4 package]# mv elasticsearch-analysis-ik/ /home/hadoop/soft/elasticsearch-5.4./plugins
[root@slaver4 package]# cd /home/hadoop/soft/elasticsearch-5.4./plugins
[root@slaver4 plugins]# ls
elasticsearch-analysis-ik
[root@slaver4 plugins]#
由于Elasticsearch没有提供关闭的命令,使用kill -9 进程号,在生产环境也是大忌的,生产环境如果使用kill命令的话,建议使用kill 进程号,让系统把任务处理完,再关闭进程。如果你的es是启动的,使用如下命令进行重启,如果es没有启动,直接启动即可。
-- 如果是集群式的,每个节点在每个机器上面,执行如下命令就可以停止es
[root@slaver4 elasticsearch-analysis-ik]# kill `ps -ef | grep Elasticsearch | grep -v grep | awk '{print $2}'`
我的es伪集群未启动,这里直接启动即可,伪集群,你启动最好同时启动,不然会出现一些报错,因为他们要感应到集群中的节点,但是没有很大影响的。
在启动head插件的时候,报这种错误,总感觉心里不爽,Local Npm module "grunt-contrib-jasmine" not found. Is it installed?。
[elsearch@slaver4 soft]$ cd elasticsearch-head-master/
[elsearch@slaver4 elasticsearch-head-master]$ ls
crx Dockerfile-alpine Gruntfile.js index.html node_modules package-lock.json proxy _site test
Dockerfile elasticsearch-head.sublime-project grunt_fileSets.js LICENCE package.json plugin-descriptor.properties README.textile src
[elsearch@slaver4 elasticsearch-head-master]$ cd node_modules/grunt
[elsearch@slaver4 grunt]$ ls
bin CHANGELOG lib LICENSE node_modules package.json README.md
[elsearch@slaver4 grunt]$ cd bin/
[elsearch@slaver4 bin]$ ls
grunt
[elsearch@slaver4 bin]$ ./grunt -server &
[]
[elsearch@slaver4 bin]$ >> Local Npm module "grunt-contrib-jasmine" not found. Is it installed?
Warning: Task "jasmine" not found. Use --force to continue. Aborted due to warnings. []+ Exit ./grunt -server
[elsearch@slaver4 bin]$ jps
Elasticsearch
Elasticsearch
Elasticsearch
Jps
[elsearch@slaver4 bin]$ ls
grunt
[elsearch@slaver4 bin]$ ./grunt server &
[]
[elsearch@slaver4 bin]$ >> Local Npm module "grunt-contrib-jasmine" not found. Is it installed? Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://192.168.110.133:9100
如何解决上面的错误呢,如下所示,安装错误的缺失包即可。切记,进入到head的目录,执行命令即可npm install grunt-contrib-jasmine。
如果缺少下面的包,执行如是命令即可。
[elsearch@slaver4 elasticsearch-head-master]$ npm install grunt-contrib-clean grunt-contrib-concat grunt-contrib-watch grunt-contrib-connect grunt-contrib-copy grunt-contrib-jasmine
或者,使用淘宝的源,下载比较快些。
[elsearch@slaver4 elasticsearch-head-master]$ npm install grunt-contrib-clean grunt-contrib-concat grunt-contrib-watch grunt-contrib-connect grunt-contrib-copy grunt-contrib-jasmine --registry=https://registry.npm.taobao.org
[elsearch@slaver4 elasticsearch-head-master]$ ls
crx Dockerfile-alpine Gruntfile.js index.html node_modules package-lock.json proxy _site test
Dockerfile elasticsearch-head.sublime-project grunt_fileSets.js LICENCE package.json plugin-descriptor.properties README.textile src
[elsearch@slaver4 elasticsearch-head-master]$ npm install grunt-contrib-jasmine
npm WARN elasticsearch-head@0.0. license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2. (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) + grunt-contrib-jasmine@1.0.
added packages from contributors in .811s
[elsearch@slaver4 elasticsearch-head-master]$
搞了一下,把head插件搞的起不来了,也是郁闷。启动错误如下所示。
[elsearch@slaver4 bin]$ >> No "clean" targets found.
Warning: Task "clean" failed. Use --force to continue. Aborted due to warnings. []+ Exit ./grunt -server
起不来了,估计是依赖包,出现了问题,我这里直接就将所有的依赖包都更新到最新了。
注意:我使用命令./grunt -server &,这个命令是使用错误了,所以下面更新到最新的依赖包可以不进行操作,浪费时间。
[elsearch@slaver4 bin]$ npm install grunt@latest
stall grunt-contrib-connect@latest
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "grunt" under a package
npm ERR! also called "grunt". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm> npm ERR! A complete log of this run can be found in:
npm ERR! /home/elsearch/.npm/_logs/--20T09_08_08_039Z-debug.log
[elsearch@slaver4 bin]$ npm install grunt-cli@latest
npm notice created a lockfile as package-lock.json. You should commit this file.
+ grunt-cli@1.3.
added packages from contributors, updated packages and audited packages in .566s
found vulnerabilities [elsearch@slaver4 bin]$ npm install grunt-contrib-copy@latest
+ grunt-contrib-copy@1.0.
added packages from contributors and audited packages in .523s
found vulnerabilities [elsearch@slaver4 bin]$ npm install grunt-contrib-concat@latest
npm WARN grunt-contrib-concat@1.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself. + grunt-contrib-concat@1.0.
added package from contributor and audited packages in .282s
found vulnerabilities [elsearch@slaver4 bin]$ npm install grunt-contrib-uglify@latest
npm WARN grunt-contrib-concat@1.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself. + grunt-contrib-uglify@4.0.
added packages from contributors and audited packages in .271s
found vulnerabilities [elsearch@slaver4 bin]$ npm install grunt-contrib-clean@latest
npm WARN grunt-contrib-concat@1.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself.
npm WARN grunt-contrib-clean@2.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself. + grunt-contrib-clean@2.0.
added packages from contributors and audited packages in .732s
found vulnerabilities [elsearch@slaver4 bin]$ npm install grunt-contrib-watch@latest
npm WARN grunt-contrib-clean@2.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself.
npm WARN grunt-contrib-concat@1.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself. + grunt-contrib-watch@1.1.
added packages from contributors in .459s
[elsearch@slaver4 bin]$ npm install grunt-contrib-connect@latest
npm WARN grunt-contrib-clean@2.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself.
npm WARN grunt-contrib-concat@1.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself.
npm WARN grunt-contrib-connect@2.1. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself. + grunt-contrib-connect@2.1.
added packages from contributors and audited packages in .331s
found vulnerabilities [elsearch@slaver4 bin]$ npm install grunt-contrib-jasmine@latest > puppeteer@1.20. install /home/hadoop/soft/elasticsearch-head-master/node_modules/grunt/node_modules/puppeteer
> node install.js Downloading Chromium r686378 - Mb [====================] % .0s
Chromium downloaded to /home/hadoop/soft/elasticsearch-head-master/node_modules/grunt/node_modules/puppeteer/.local-chromium/linux-
npm WARN grunt-contrib-clean@2.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself.
npm WARN grunt-contrib-concat@1.0. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself.
npm WARN grunt-contrib-connect@2.1. requires a peer of grunt@>=0.4. but none is installed. You must install peer dependencies yourself.
npm WARN grunt-eslint@22.0. requires a peer of grunt@>= but none is installed. You must install peer dependencies yourself. + grunt-contrib-jasmine@2.1.
added packages from contributors and audited packages in .187s
found high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
[elsearch@slaver4 bin]$ ls
grunt
[elsearch@slaver4 bin]$ ./grunt server &
[]
[elsearch@slaver4 bin]$ Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://192.168.110.133:9100 [elsearch@slaver4 bin]$
3、回归正题,由于安装好了IK中文分词器,现在需要测试一下,是否安装成功了。
首先创建索引名字叫news,创建完毕以后可以在head插件看到你创建的index索引名称news,如下所示:
[elsearch@slaver4 soft]$ ls
elasticsearch-5.4. elasticsearch-head-master el_slave node-v8.16.2-linux-x64 nohup.out
[elsearch@slaver4 soft]$ curl -XPUT http://192.168.110.133:9200/news
{"acknowledged":true,"shards_acknowledged":true}[elsearch@slaver4 soft]$
[elsearch@slaver4 soft]$
创建好索引以后,创建mapping映射(相当于数据中的schema信息,表名和字段名以及字段的类型),指定那些字段使用什么分词器。切记,三个节点的plugins目录都要放IK中文分词器。
注意:text是分词,存储,建索引。analyzer指定创建索引的时候使用的分词器是IK中文分词器。search_analyzer搜索的时候使用IK中文分词器。
[elsearch@slaver4 soft]$ curl -XPOST http://192.168.110.133:9200/news/fulltext/_mapping -d'
{
"properties": {
"content": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
}
} }'
{"acknowledged":true}[elsearch@slaver4 soft]$
然后开始测试,是否能将中文进行分词。指定中文分词器ik_max_word,-d后面是传参的。
[elsearch@slaver4 soft]$ curl -XGET 'http://192.168.110.133:9200/_analyze?pretty&analyzer=ik_max_word' -d '我要成为java高级工程师'
{
"tokens" : [
{
"token" : "我",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_CHAR",
"position" :
},
{
"token" : "要",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_CHAR",
"position" :
},
{
"token" : "成为",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_WORD",
"position" :
},
{
"token" : "java",
"start_offset" : ,
"end_offset" : ,
"type" : "ENGLISH",
"position" :
},
{
"token" : "高级工程师",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_WORD",
"position" :
},
{
"token" : "高级工",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_WORD",
"position" :
},
{
"token" : "高级",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_WORD",
"position" :
},
{
"token" : "工程师",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_WORD",
"position" :
},
{
"token" : "工程",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_WORD",
"position" :
},
{
"token" : "师",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_CHAR",
"position" :
}
]
}
[elsearch@slaver4 soft]$
ik_smart是更加智能的分词器,推荐使用的,效果如下所示:
[elsearch@slaver4 soft]$ curl -XGET 'http://192.168.110.133:9200/_analyze?pretty&analyzer=ik_smart' -d '我要成为Java高级工程师'
{
"tokens" : [
{
"token" : "我",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_CHAR",
"position" :
},
{
"token" : "要",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_CHAR",
"position" :
},
{
"token" : "成为",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_WORD",
"position" :
},
{
"token" : "java",
"start_offset" : ,
"end_offset" : ,
"type" : "ENGLISH",
"position" :
},
{
"token" : "高级工程师",
"start_offset" : ,
"end_offset" : ,
"type" : "CN_WORD",
"position" :
}
]
}
[elsearch@slaver4 soft]$
至此,IK中文分词器就创建完毕了。
如何向索引Index中类型Type中添加数据,数据插入成功可以在head插件进行浏览,如下所示。
[elsearch@slaver4 soft]$ curl -XPOST http://192.168.110.133:9200/news/fulltext/1 -d'
> {"content":"美国留给伊拉克的是个烂摊子吗"}'
{"_index":"news","_type":"fulltext","_id":"","_version":,"result":"created","_shards":{"total":,"successful":,"failed":},"created":true}[elsearch@slaver4 soft]$
[elsearch@slaver4 soft]$ curl -XPOST http://192.168.110.133:9200/news/fulltext/2 -d'
> {"content":"公安部:各地校车将享最高路权"}'
{"_index":"news","_type":"fulltext","_id":"","_version":,"result":"created","_shards":{"total":,"successful":,"failed":},"created":true}[elsearch@slaver4 soft]$
[elsearch@slaver4 soft]$ curl -XPOST http://192.168.110.133:9200/news/fulltext/3 -d'
> {"content":"中韩渔警冲突调查:韩警平均每天扣1艘中国渔船"}'
{"_index":"news","_type":"fulltext","_id":"","_version":,"result":"created","_shards":{"total":,"successful":,"failed":},"created":true}[elsearch@slaver4 soft]$
[elsearch@slaver4 soft]$ curl -XPOST http://192.168.110.133:9200/news/fulltext/4 -d'
> {"content":"中国驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首"}'
{"_index":"news","_type":"fulltext","_id":"","_version":,"result":"created","_shards":{"total":,"successful":,"failed":},"created":true}[elsearch@slaver4 soft]$ x":"news","_type":"fulltext","_id":"","_version":,"result":"created","_shards":{"total":,"successful":,"failed":},"created":true}[elsearch@slaver4 soft]$
数据插入成功以后,可以进行查询高亮显示,如下所示:
[elsearch@slaver4 soft]$ curl -XPOST http://192.168.110.133:9200/news/fulltext/_search -d'
> {
> "query" : { "match" : { "content" : "中国" }},
> "highlight" : {
> "pre_tags" : ["<font color='red'>", "<tag2>"],
> "post_tags" : ["</font>", "</tag2>"],
> "fields" : {
> "content" : {}
> }
> }
> }'
{"took":,"timed_out":false,"_shards":{"total":,"successful":,"failed":},"hits":{"total":,"max_score":0.5347766,"hits":[{"_index":"news","_type":"fulltext","_id":"","_score":0.5347766,"_source":
{"content":"中国驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首"},"highlight":{"content":["<font color=red>中国</font>驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首"]}},{"_index":"news","_type":"fulltext","_id":"","_score":0.27638745,"_source":
{"content":"中韩渔警冲突调查:韩警平均每天扣1艘中国渔船"},"highlight":{"content":["中韩渔警冲突调查:韩警平均每天扣1艘<font color=red>中国</font>渔船"]}}]}}[elsearch@sl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/qm601gc1/K2evSgBK/qnPev5WK/qnPegD+Vg9aKD1ooAAMmv6pwc0EEgjNIBtNACkgdaAcimtye9fytnr0oA/qnr+Vfriv6p81/K1jFADcUEYNf1SnPX9K/lbI56flQB/VPRRRQAUUUUAFFFFACd6/lYr+qfvX8rFAH9U55oAxX8rFFAH9U+PYUY9hX8rFFAH9U5JAzjNfyskYwfekBwaMkmgD+qcdKWkHSloA/lXzS7iaSigAzRmiigAzSjmko6UAf1S5I96/lbIHrSZr+qfpQB/KwOT1p2Mc579KaDiv6pwBQA0mnL0HGKMDp2r+VgnJoAUAetf1ShiT0petfysGgD+qZjzjFKBx0r+VgGv6pwMUAfysAZNf1S7uSMV/K0Dg0ZyaAHbe+aaRg1/VNjOK/lZJzQB/VPQc4r+ViigB+OO2K/qjHI6fnX8rOT60E5NACjr1r+qQHnvTiMijAAoATGetKBjtX8rB60UAf1UUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf//Z" alt="" />
作者:别先生
博客园:https://www.cnblogs.com/biehongli/
如果您想及时得到个人撰写文章以及著作的消息推送,可以扫描上方二维码,关注个人公众号哦。
ElasticSearch安装中文分词器IK的更多相关文章
- 如何给Elasticsearch安装中文分词器IK
安装Elasticsearch安装中文分词器IK的步骤: 1. 停止elasticsearch 2.2的服务 2. 在以下地址下载对应的elasticsearch-analysis-ik插件安装包(版 ...
- 如何在Elasticsearch中安装中文分词器(IK)和拼音分词器?
声明:我使用的Elasticsearch的版本是5.4.0,安装分词器前请先安装maven 一:安装maven https://github.com/apache/maven 说明: 安装maven需 ...
- 沉淀再出发:ElasticSearch的中文分词器ik
沉淀再出发:ElasticSearch的中文分词器ik 一.前言 为什么要在elasticsearch中要使用ik这样的中文分词呢,那是因为es提供的分词是英文分词,对于中文的分词就做的非常不好了 ...
- ElasticSearch 安装中文分词器
1.安装中文分词器IK 下载地址:https://github.com/medcl/elasticsearch-analysis-ik 在线下载安装: elasticsearch-plugin.bat ...
- elasticsearch安装中文分词器插件smartcn
原文:http://blog.java1234.com/blog/articles/373.html elasticsearch安装中文分词器插件smartcn elasticsearch默认分词器比 ...
- ElasticSearch安装中文分词器IKAnalyzer
# ElasticSearch安装中文分词器IKAnalyzer 本篇主要讲解如何在ElasticSearch中安装中文分词器IKAnalyzer,拆分的每个词都是我们熟知的词语,从而建立词汇与文档 ...
- 如何在Elasticsearch中安装中文分词器(IK+pinyin)
如果直接使用Elasticsearch的朋友在处理中文内容的搜索时,肯定会遇到很尴尬的问题--中文词语被分成了一个一个的汉字,当用Kibana作图的时候,按照term来分组,结果一个汉字被分成了一组. ...
- Elasticsearch安装中文分词插件ik
Elasticsearch默认提供的分词器,会把每一个汉字分开,而不是我们想要的依据关键词来分词.比如: curl -XPOST "http://localhost:9200/userinf ...
- ElasticSearch的中文分词器ik
一.前言 为什么要在elasticsearch中要使用ik这样的中文分词呢,那是因为es提供的分词是英文分词,对于中文的分词就做的非常不好了,因此我们需要一个中文分词器来用于搜索和使用. 二.IK ...
随机推荐
- 【使用篇二】SpringBoot的日志体系及如何开启logback日志(15)
抄自:https://blog.csdn.net/liujun03/article/details/82684209 Java应用中,日志一般分为以下5个级别(从高到低): ERROR 错误信息 WA ...
- VUE中 $on, $emit, v-on三者关系
VUE中 $on, $emit, v-on三者关系 每个vue实例都实现了事件借口 使用$on(eventName)监听事件 使用$emit(eventName)触发事件 若把vue看成家庭(相当于一 ...
- c++.net学习笔记
Notes for c++ learning 程序根据什么特征来区分调用哪个重载函数? 只能靠参数而不能靠返回值类型的不同来区分重载函数. 编译器根据参数为每个重载函数产生不同的内部标识符 在Visu ...
- apt-get原理
apt-get 而这个步骤全要用户亲力亲为可能又有些麻烦,懒是科技发展的重要推动力.所以软件厂商自己编译好了很多二进制文件,只要系统和环境对应,下载之后就能直接安装. 但是如果下载了很多软件我想要管理 ...
- GO-结构体(类似python中的类)
一.结构体有名属性 package main import "fmt" func main(){ type Sb struct { name string //属性名,数据类型 a ...
- Customize the Application UI and Behavior 自定义应用程序UI和行为
In XAF, the business model defines the database structure and UI appearance. Changes to your persist ...
- 关于如何获取项目所部署的本机IP和端口的问题
关于如何获取项目所部署的本机IP和端口的问题 今天在写一个需求的时候碰到一个不常见的问题,在没有继承或者实现服务器提供的接口或者实现类的时候,比如说部署在tomacat上,某个类不去继承servelt ...
- JavaScript中的this绑定丢失及解决方法
经常犯的错误:混淆了this绑定规则. 代码如下: var obj = { id: 'vexekefo', cool() { console.log(this.id); } }; var id = ' ...
- Linux下使用 github+hexo 搭建个人博客07-next主题接入搜索和站点管理
这是搭建个人博客系统系列文章的最后一篇,如果你是从第一篇一路跟下来的,那么恭喜你,即将完成整个博客网站的搭建.OK,话不多说,开始我们的收官之战. 不知你想过没有,如果我们的文章少,一眼看完整个目录, ...
- 迁移文件是报错 django.db.utils.InternalError: (1054, "Unknown column 'name' in 'django_content_type'")
相信大家在做django迁移时有可能会遇到这样的错误- django.db.utils.InternalError: (1054, “Unknown column ‘name’ in ‘django_ ...