highlight

在Java项目中使用Elasticsearch 6.x (一)对索引的增删改查

ぃ、小莉子 提交于 2020-08-07 04:08:01
一.项目包含的功能 1.高亮搜索; 2.词语自动补全; 3.分页查询; 4.复合查询; 5.对索引的增、删、改、查; 6.对文档的增、删、改; 7.搜索结果排序; 8.其他功能:文件读取(word、txt、pdf) 二.依赖环境版本 1.Elasticsearch 6.6.1; 2.jdk 1.8 3.前端分页插件:网上找的 4.elasticsearch-rest-high-level-client 6.6.1 5.spring boot 2.1.3 6.kibana 6.6.0 三.访问路径 1.项目路径:http://localhost:8080/searchTest.html 2.kibana路径:http://localhost:5601 3.Elasticsearch启动检测路径:http://localhost:9200/ 四.页面效果 五.代码 1.bean实体类 package com.demo.elasticsearch.bean; import java.util.Date; /** * @Author: ln * @Date: 2019/2/26 08:59 * @Description: */ public class FileBean { // text支持分词搜索的字段有:name,author,content,filePath //

[整合] 解决 Dell T640 安装显卡后风扇转速不降低

女生的网名这么多〃 提交于 2020-08-07 02:59:07
最近实验室的dell T640服务器安装了新的GPU。但是安装后发现,风扇太吵了,于是开始着手解决风扇转速过高的问题。 试过ipmi,但是不好用。 最后发现使用racadm可以让服务器重新安静下来。 解决方案来自: https://www.dell.com/community/PowerEdge-Hardware-General/PowerEdge-T640-fan-full-speed-after-installing-graphic-card/td-p/5849479 和 https://www.dell.com/community/Systems-Management-General/iDRAC9-impossible-to-modify-Fan-Response-for-3rd-Party-PCI-cards/m-p/6021679/highlight/true#M25681 针对ubuntu,需要用这个网站的方法安装racadm。 https://www.claudiokuenzler.com/blog/747/install-dell-openmanage-9.x-racadm-ubuntu-16.04 安装完racadm,使用 sudo racadm get System.PCIESlotLFM 查看有几个PCIE的东西。 一般来说是最后一个。 之后,使用 sudo

第32天:Python logging 模块详解

夙愿已清 提交于 2020-08-05 18:24:57
by 潮汐 This module defines functions and classes which implement a flexible event logging system for applications and libraries. Python logging 模块定义了为应用程序和库实现灵活的事件日志记录的函数和类。 程序开发过程中,很多程序都有记录日志的需求,并且日志包含的信息有正常的程序访问日志还可能有错误、警告等信息输出,Python 的 logging 模块提供了标准的日志接口,可以通过它存储各种格式的日志,日志记录提供了一组便利功能,用于简单的日志记录用法。 使用 Python Logging 模块的主要好处是所有 Python 模块都可以参与日志记录 Logging 模块提供了大量具有灵活性的功能 日志记录函数以它们用来跟踪的事件的级别或严重性命名。下面描述了标准级别及其适用性(从高到低的顺序): 日志等级(level) 描述 DEBUG 最详细的日志信息,典型应用场景是 问题诊断 INFO 信息详细程度仅次于DEBUG,通常只记录关键节点信息,用于确认一切都是按照我们预期的那样进行工作 WARNING 当某些不期望的事情发生时记录的信息(如,磁盘可用空间较低),但是此时应用程序还是正常运行的 ERROR

GitBook + Typora 部署我的markdown文档

梦想与她 提交于 2020-07-29 05:59:14
Typora: 跨平台的markdown编辑器 GitBook: 基于 Node.js,所以我们首先需要安装 Node.js,然后安装gitbook-cli 部署环境 nodeenv envnode # 创建环境 . envnode/bin/activate # 切换到当前虚拟环境 npm config set registry=http://registry.npm.taobao.org -g npm install -g gitbook-cli # 更换国内源,并安装gitbook gitbook serve # 查看 http://localhost:4000 创建文档工作区 mkdir ~/Desktop/mybook gitbook init # 初始化 gitbook serve --port 12345 # 指定端口运行服务 gitbook serve 命令,然后在浏览器地址栏中输入 http://localhost:4000 便可预览书籍。 Typora编辑文档 安装插件 book.json { "title": "Mybook", "author": "LJ", "description": "markdown笔记", "language": "zh-hans", "plugins": [ "-lunr", "-search", "search-pro", "

AI+数据科学:六种方式改变体育行业

狂风中的少年 提交于 2020-07-27 23:19:32
云栖号资讯:【 点击查看更多行业资讯 】 在这里您可以找到不同行业的第一手的上云资讯,还在等什么,快来! 随着科技的发展,人工智能与数据科学已经在体育领域发挥越来越重要的作用。世界上鲜有事物无法量化,而能够量化的一切,都可以使用数据分析加人工智能的组合进行精确预测。拿体育领域来说,其中的可量化元素就非常丰富,正合适人工智能在其中大显身手。另外需要澄清的一点是,人工智能在体育领域的应用绝不仅限于提高运动员的赛场表现。毕竟现代体育运动的涵盖范围已经非常广泛,绝不仅仅体现在运动员群体身上。 下面,我们具体聊聊AI与数据科学影响体育世界的六种具体方式。 1.发现人才、招募人才 无论是棒球、橄榄球还是其他体育项目,运动队伍都在越来越多地使用运动员个人表现数据来衡量他们是否拥有良好的身体条件与发展潜力。但在筛选下一位体育巨星的过程中,单凭公开的统计数据(例如奔跑速度、射门精度或者传球水平)是远远不够的,我们需要考虑更为复杂的多因素指标。 在这方面,人类天然的局限性导致我们无法准确记录并评估这些指标。随着大数据与人工智能全面入驻体育领域,对此类成功指标的管理、记录与衡量过程也变得愈发便捷且可靠。计算机视觉、机器学习以及其他形式的AI方案利用算法分析玩家的统计数据、比赛视频以及来自各类传感器的收集信息,借此发现那些可能被教练或球探忽略掉的宝贵人才。 具体来说,AI可以使用历史数据

vim 命令记录

依然范特西╮ 提交于 2020-07-27 14:33:01
注释块:转自: https://unix.stackexchange.com/questions/120615/how-to-comment-multiple-lines-at-once To comment out blocks in vim: press Esc (to leave editing or other mode) hit ctrl + v ( visual block mode) use the ↑ / ↓ arrow keys to select lines you want (it won't highlight everything - it's OK!) Shift + i (capital I) insert the text you want, e.g. % press Esc Esc. Ranges: You can do it with the following commands: for commenting: :66,70s/^/# for uncommenting: :66,70s/^#/ Obviously, here we're commenting lines from 66 to 70 (inclusive). 显示行数: esc :set number 转跳到某一行(第n 行): esc :n 撤销: esc u 来源:

x01.chess: 国际象棋

余生长醉 提交于 2020-07-27 04:23:52
忽略王车易位,国际象棋实现起来还是比较简单的,按照行棋路线不断进行即可,遇到边界或棋子则停,兵,王,马只走一步,兵有方向,如此而已。 1.效果图 2.代码 import sys, copy, os, configparser import tkinter as tk from tkinter import messagebox import utils from game.chess.core import Board, R sys.path.append(utils.R.CurrentDir) class MainWindow(tk.Tk): def __init__ (self): super(). __init__ () self.title( " x01.chess " ) size = (R.CellNumber+0.5)* R.CellSize utils.R.win_center(self, w =size, h= size) self.background = ' lightgrey ' self.foreground = ' black ' self.menu = tk.Menu(self, bg=self.background, fg= self.foreground) utils.R.generate_menus(self, [ ' file ' , '

Comparing words in two richtextbox to find difference?

怎甘沉沦 提交于 2020-06-23 04:37:22
问题 I have three RichTextBoxes . I want to compare all the words of RichTextbox1 with Richtextbox2 one by one with space or comma as the delimiter. If they are same do nothing, if not highlight the text to some color and save it in RichTextBox3 . I am having some trouble with the loop. 回答1: Explanation First we will declare some variables to shorten our writing work. We'll then use the For Each command. Here we will take two rounds to scan the differences, first of Richtextbox1 which is not in

Comparing words in two richtextbox to find difference?

匆匆过客 提交于 2020-06-23 04:37:06
问题 I have three RichTextBoxes . I want to compare all the words of RichTextbox1 with Richtextbox2 one by one with space or comma as the delimiter. If they are same do nothing, if not highlight the text to some color and save it in RichTextBox3 . I am having some trouble with the loop. 回答1: Explanation First we will declare some variables to shorten our writing work. We'll then use the For Each command. Here we will take two rounds to scan the differences, first of Richtextbox1 which is not in

What exactly is the `#:~:text=` location hash in an URL?

坚强是说给别人听的谎言 提交于 2020-06-22 11:39:25
问题 Today I noticed that some searches on Google gave me links to results with apparent instructions to highlight text. Google brought me to What is the maximum size of a zip file on Windows 10 Pro 64...: I experimented a little bit further and this seems to be a feature of Google Chrome. I highlights text on the page if you append #:~:text=something . https://example.com/#:~:text=domain seems to work fine, but only on Chrome (Chrome Beta on the left, Firefox on the right). The word text together