基于文本来推荐相似酒店

基于文本来推荐相似酒店

查看数据集基本信息

import pandas as pd
import numpy as np
from nltk.corpus import stopwords
from sklearn.metrics.pairwise import linear_kernel
from sklearn.feature_extraction.text import CountVectorizer 
from sklearn.feature_extraction.text import TfidfVectorizer
import re
import random
import cufflinks
import cufflinks
from plotly.offline import iplot
df=pd.read_csv("Seattle_Hotels.csv",encoding="latin-1")
df.head()
nameaddressdesc
0Hilton Garden Seattle Downtown1821 Boren Avenue, Seattle Washington 98101 USALocated on the southern tip of Lake Union, the...
1Sheraton Grand Seattle1400 6th Avenue, Seattle, Washington 98101 USALocated in the city's vibrant core, the Sherat...
2Crowne Plaza Seattle Downtown1113 6th Ave, Seattle, WA 98101Located in the heart of downtown Seattle, the ...
3Kimpton Hotel Monaco Seattle1101 4th Ave, Seattle, WA98101What?s near our hotel downtown Seattle locatio...
4The Westin Seattle1900 5th Avenue, Seattle, Washington 98101 USASituated amid incredible shopping and iconic a...
df.shape
(152, 3)
df['desc'][0]
"Located on the southern tip of Lake Union, the Hilton Garden Inn Seattle Downtown hotel is perfectly located for business and leisure. \nThe neighborhood is home to numerous major international companies including Amazon, Google and the Bill & Melinda Gates Foundation. A wealth of eclectic restaurants and bars make this area of Seattle one of the most sought out by locals and visitors. Our proximity to Lake Union allows visitors to take in some of the Pacific Northwest's majestic scenery and enjoy outdoor activities like kayaking and sailing. over 2,000 sq. ft. of versatile space and a complimentary business center. State-of-the-art A/V technology and our helpful staff will guarantee your conference, cocktail reception or wedding is a success. Refresh in the sparkling saltwater pool, or energize with the latest equipment in the 24-hour fitness center. Tastefully decorated and flooded with natural light, our guest rooms and suites offer everything you need to relax and stay productive. Unwind in the bar, and enjoy American cuisine for breakfast, lunch and dinner in our restaurant. The 24-hour Pavilion Pantry? stocks a variety of snacks, drinks and sundries."

查看酒店描述中主要介绍信息

vec=CountVectorizer().fit(df['desc'])
vec=CountVectorizer().fit(df['desc'])
bag_of_words=vec.transform(df['desc'])
sum_words=bag_of_words.sum(axis=0)
words_freq=[(word,sum_words[0,idx]) for word,idx in vec.vocabulary_.items()]
sum_words=sorted(words_freq,key= lambda x: x[1],reverse=True)
sum_words[1:10]
[('and', 1062),
 ('of', 536),
 ('seattle', 533),
 ('to', 471),
 ('in', 449),
 ('our', 359),
 ('you', 304),
 ('hotel', 295),
 ('with', 280)]
bag_of_words=vec.transform(df['desc'])
bag_of_words.shape
(152, 3200)
bag_of_words.toarray()
array([[0, 1, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       ...,
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 1, 0, 0]], dtype=int64)
sum_words=bag_of_words.sum(axis=0)
sum_words
matrix([[ 1, 11, 11, ...,  2,  6,  2]], dtype=int64)
words_freq=[(word,sum_words[0,idx]) for word,idx in vec.vocabulary_.items()]
sum_words=sorted(words_freq,key= lambda x: x[1],reverse=True)
sum_words[1:10]
[('and', 1062),
 ('of', 536),
 ('seattle', 533),
 ('to', 471),
 ('in', 449),
 ('our', 359),
 ('you', 304),
 ('hotel', 295),
 ('with', 280)]

将以上信息整合成函数

def get_top_n_words(corpus,n=None):
    vec=CountVectorizer().fit(df['desc'])
    bag_of_words=vec.transform(df['desc'])
    sum_words=bag_of_words.sum(axis=0)
    words_freq=[(word,sum_words[0,idx]) for word,idx in vec.vocabulary_.items()]
    sum_words=sorted(words_freq,key= lambda x: x[1],reverse=True)
    return sum_words[:n]
common_words=get_top_n_words(df['desc'],20)
common_words
[('the', 1258),
 ('and', 1062),
 ('of', 536),
 ('seattle', 533),
 ('to', 471),
 ('in', 449),
 ('our', 359),
 ('you', 304),
 ('hotel', 295),
 ('with', 280),
 ('is', 271),
 ('at', 231),
 ('from', 224),
 ('for', 216),
 ('your', 186),
 ('or', 161),
 ('center', 151),
 ('are', 136),
 ('downtown', 133),
 ('on', 129)]
df1=pd.DataFrame(common_words,columns=['desc','count'])
common_words=get_top_n_words(df['desc'],20)
df2=pd.DataFrame(common_words,columns=['desc','count'])
chart_info2=df2.groupby(['desc']).sum().sort_values('count',ascending=False)
chart_info2.plot(kind='barh',figsize=(14,10),title='top 20 before remove stopwords')
<AxesSubplot:title={'center':'top 20 before remove stopwords'}, ylabel='desc'>    

在这里插入图片描述

chart_info1=df1.groupby(['desc']).sum().sort_values('count',ascending=False)
chart_info1.plot(kind='barh',figsize=(14,10),title='top 20 before remove stopwords')
<AxesSubplot:title={'center':'top 20 before remove stopwords'}, ylabel='desc'>

在这里插入图片描述

def get_any1_top_n_words_after_stopwords(corpus,n=None):
    vec=CountVectorizer(stop_words='english',ngram_range=(1,1)).fit(df['desc'])
    bag_of_words=vec.transform(df['desc'])
    sum_words=bag_of_words.sum(axis=0)
    words_freq=[(word,sum_words[0,idx]) for word,idx in vec.vocabulary_.items()]
    sum_words=sorted(words_freq,key= lambda x: x[1],reverse=True)
    return sum_words[:n]
common_words=get_any1_top_n_words_after_stopwords(df['desc'],20)
df2=pd.DataFrame(common_words,columns=['desc','count'])
chart_info2=df2.groupby(['desc']).sum().sort_values('count',ascending=False)
chart_info2.plot(kind='barh',figsize=(14,10),title='top 20 before after stopwords')
<AxesSubplot:title={'center':'top 20 before after stopwords'}, ylabel='desc'>

在这里插入图片描述

def get_any2_top_n_words_after_stopwords(corpus,n=None):
    vec=CountVectorizer(stop_words='english',ngram_range=(2,2)).fit(df['desc'])
    bag_of_words=vec.transform(df['desc'])
    sum_words=bag_of_words.sum(axis=0)
    words_freq=[(word,sum_words[0,idx]) for word,idx in vec.vocabulary_.items()]
    sum_words=sorted(words_freq,key= lambda x: x[1],reverse=True)
    return sum_words[:n]

common_words=get_any2_top_n_words_after_stopwords(df['desc'],20)
df2=pd.DataFrame(common_words,columns=['desc','count'])
chart_info2=df2.groupby(['desc']).sum().sort_values('count',ascending=False)
chart_info2.plot(kind='barh',figsize=(14,10),title='top 20 before after stopwords')
<AxesSubplot:title={'center':'top 20 before after stopwords'}, ylabel='desc'>

在这里插入图片描述

def get_any3_top_n_words_after_stopwords(corpus,n=None):
    vec=CountVectorizer(stop_words='english',ngram_range=(3,3)).fit(df['desc'])
    bag_of_words=vec.transform(df['desc'])
    sum_words=bag_of_words.sum(axis=0)
    words_freq=[(word,sum_words[0,idx]) for word,idx in vec.vocabulary_.items()]
    sum_words=sorted(words_freq,key= lambda x: x[1],reverse=True)
    return sum_words[:n]

common_words=get_any3_top_n_words_after_stopwords(df['desc'],20)
df2=pd.DataFrame(common_words,columns=['desc','count'])
chart_info2=df2.groupby(['desc']).sum().sort_values('count',ascending=False)
chart_info2.plot(kind='barh',figsize=(14,10),title='top 20 before after stopwords')
<AxesSubplot:title={'center':'top 20 before after stopwords'}, ylabel='desc'>

在这里插入图片描述

描述的一些统计信息

df=pd.read_csv("Seattle_Hotels.csv",encoding="latin-1")
df['desc'][0]
"Located on the southern tip of Lake Union, the Hilton Garden Inn Seattle Downtown hotel is perfectly located for business and leisure. \nThe neighborhood is home to numerous major international companies including Amazon, Google and the Bill & Melinda Gates Foundation. A wealth of eclectic restaurants and bars make this area of Seattle one of the most sought out by locals and visitors. Our proximity to Lake Union allows visitors to take in some of the Pacific Northwest's majestic scenery and enjoy outdoor activities like kayaking and sailing. over 2,000 sq. ft. of versatile space and a complimentary business center. State-of-the-art A/V technology and our helpful staff will guarantee your conference, cocktail reception or wedding is a success. Refresh in the sparkling saltwater pool, or energize with the latest equipment in the 24-hour fitness center. Tastefully decorated and flooded with natural light, our guest rooms and suites offer everything you need to relax and stay productive. Unwind in the bar, and enjoy American cuisine for breakfast, lunch and dinner in our restaurant. The 24-hour Pavilion Pantry? stocks a variety of snacks, drinks and sundries."
df['word_count']=df['desc'].apply(   lambda x:len(str(x).split(' '))    )
df.head()                                    
nameaddressdescword_count
0Hilton Garden Seattle Downtown1821 Boren Avenue, Seattle Washington 98101 USALocated on the southern tip of Lake Union, the...184
1Sheraton Grand Seattle1400 6th Avenue, Seattle, Washington 98101 USALocated in the city's vibrant core, the Sherat...152
2Crowne Plaza Seattle Downtown1113 6th Ave, Seattle, WA 98101Located in the heart of downtown Seattle, the ...147
3Kimpton Hotel Monaco Seattle1101 4th Ave, Seattle, WA98101What?s near our hotel downtown Seattle locatio...151
4The Westin Seattle1900 5th Avenue, Seattle, Washington 98101 USASituated amid incredible shopping and iconic a...151
df['word_count'].plot(kind='hist',bins=50)
<AxesSubplot:ylabel='Frequency'>

在这里插入图片描述

文本处理

sub_replace=re.compile('[^0-9a-z#-]')
from nltk.corpus import stopwords
stopwords=set(stopwords.words('english'))
def clean_txt(text):
    text.lower()
    text=sub_replace.sub(' ',text)
    ''.join(    word   for word in text.split(' ')  if word not in stopwords               )
    return  text
df['desc_clean']=df['desc'].apply(clean_txt)
df['desc_clean'][0]
' ocated on the southern tip of  ake  nion  the  ilton  arden  nn  eattle  owntown hotel is perfectly located for business and leisure    he neighborhood is home to numerous major international companies including  mazon   oogle and the  ill    elinda  ates  oundation    wealth of eclectic restaurants and bars make this area of  eattle one of the most sought out by locals and visitors   ur proximity to  ake  nion allows visitors to take in some of the  acific  orthwest s majestic scenery and enjoy outdoor activities like kayaking and sailing  over 2 000 sq  ft  of versatile space and a complimentary business center   tate-of-the-art     technology and our helpful staff will guarantee your conference  cocktail reception or wedding is a success   efresh in the sparkling saltwater pool  or energize with the latest equipment in the 24-hour fitness center   astefully decorated and flooded with natural light  our guest rooms and suites offer everything you need to relax and stay productive   nwind in the bar  and enjoy  merican cuisine for breakfast  lunch and dinner in our restaurant   he 24-hour  avilion  antry  stocks a variety of snacks  drinks and sundries '

相似度计算

df.index
RangeIndex(start=0, stop=152, step=1)
df.head()
nameaddressdescword_countdesc_clean
0Hilton Garden Seattle Downtown1821 Boren Avenue, Seattle Washington 98101 USALocated on the southern tip of Lake Union, the...184ocated on the southern tip of ake nion the...
1Sheraton Grand Seattle1400 6th Avenue, Seattle, Washington 98101 USALocated in the city's vibrant core, the Sherat...152ocated in the city s vibrant core the herat...
2Crowne Plaza Seattle Downtown1113 6th Ave, Seattle, WA 98101Located in the heart of downtown Seattle, the ...147ocated in the heart of downtown eattle the ...
3Kimpton Hotel Monaco Seattle1101 4th Ave, Seattle, WA98101What?s near our hotel downtown Seattle locatio...151hat s near our hotel downtown eattle locatio...
4The Westin Seattle1900 5th Avenue, Seattle, Washington 98101 USASituated amid incredible shopping and iconic a...151ituated amid incredible shopping and iconic a...
df.set_index('name' ,inplace=True)
df.index[:5]
Index(['Hilton Garden Seattle Downtown', 'Sheraton Grand Seattle',
       'Crowne Plaza Seattle Downtown', 'Kimpton Hotel Monaco Seattle ',
       'The Westin Seattle'],
      dtype='object', name='name')
tf=TfidfVectorizer(analyzer='word',ngram_range=(1,3),stop_words='english')#将原始文档集合转换为TF-IDF特性的矩阵。
tf
TfidfVectorizer(ngram_range=(1, 3), stop_words='english')
tfidf_martix=tf.fit_transform(df['desc_clean'])
tfidf_martix.shape
(152, 27694)
cosine_similarity=linear_kernel(tfidf_martix,tfidf_martix)
cosine_similarity.shape
(152, 152)
cosine_similarity[0]
array([1.        , 0.01354605, 0.02855898, 0.00666729, 0.02915865,
       0.01258837, 0.0190937 , 0.0152567 , 0.00689703, 0.01852763,
       0.01241924, 0.00919602, 0.01189826, 0.01234794, 0.01200711,
       0.01596218, 0.00979221, 0.04374643, 0.01138524, 0.02334485,
       0.02358692, 0.00829121, 0.00620275, 0.01700472, 0.0191396 ,
       0.02340334, 0.03193292, 0.00678849, 0.02272962, 0.0176494 ,
       0.0125159 , 0.03702338, 0.01569165, 0.02001584, 0.03656467,
       0.03189017, 0.00644231, 0.01008181, 0.02428547, 0.03327365,
       0.01367507, 0.00827835, 0.01722986, 0.04135263, 0.03315194,
       0.01529834, 0.03568623, 0.01294482, 0.03480617, 0.01447235,
       0.02563783, 0.01650068, 0.03328324, 0.01562323, 0.02703264,
       0.01315504, 0.02248426, 0.02690816, 0.00565479, 0.02899467,
       0.02900863, 0.00971019, 0.0439659 , 0.03020971, 0.02166199,
       0.01487286, 0.03182626, 0.00729518, 0.01764764, 0.01193849,
       0.02405471, 0.01408249, 0.02632335, 0.02027866, 0.01978292,
       0.04879328, 0.00244737, 0.01937539, 0.01388813, 0.02996677,
       0.00756079, 0.01429659, 0.0050572 , 0.00630326, 0.01496956,
       0.04104425, 0.00911942, 0.00259554, 0.00645944, 0.01460694,
       0.00794788, 0.00592598, 0.0090397 , 0.00532289, 0.01445326,
       0.01156657, 0.0098189 , 0.02077998, 0.0116756 , 0.02593775,
       0.01000463, 0.00533785, 0.0026153 , 0.02261775, 0.00680343,
       0.01859473, 0.03802118, 0.02078981, 0.01196228, 0.03744293,
       0.05164375, 0.00760035, 0.02627101, 0.01579335, 0.01852171,
       0.06768183, 0.01619049, 0.03544484, 0.0126264 , 0.01613638,
       0.00662941, 0.01184946, 0.01843151, 0.0012407 , 0.00687414,
       0.00873796, 0.04397665, 0.06798914, 0.00794379, 0.01098165,
       0.01520306, 0.01257289, 0.02087956, 0.01718063, 0.0292332 ,
       0.00489742, 0.03096065, 0.01163736, 0.01382631, 0.01386944,
       0.01888652, 0.02391748, 0.02814364, 0.01467017, 0.00332169,
       0.0023627 , 0.02348599, 0.00762246, 0.00390889, 0.01277579,
       0.00247891, 0.00854051])

求酒店的推荐

indices=pd.Series(df.index)
indices[:5]
0    Hilton Garden Seattle Downtown
1            Sheraton Grand Seattle
2     Crowne Plaza Seattle Downtown
3     Kimpton Hotel Monaco Seattle 
4                The Westin Seattle
Name: name, dtype: object
def recommendation(name,cosine_similarity):
    recommend_hotels=[]
    idx=indices[indices==name].index[0]
    score_series=pd.Series(cosine_similarity[idx]).sort_values(ascending=False)
    top_10_indexes=list(score_series[1:11].index)
    for i in top_10_indexes:
        recommend_hotels.append(list(df.index)[i])
    return recommend_hotels                                
recommendation('Hilton Garden Seattle Downtown',cosine_similarity)
['Staybridge Suites Seattle Downtown - Lake Union',
 'Silver Cloud Inn - Seattle Lake Union',
 'Residence Inn by Marriott Seattle Downtown/Lake Union',
 'MarQueen Hotel',
 'The Charter Hotel Seattle, Curio Collection by Hilton',
 'Embassy Suites by Hilton Seattle Tacoma International Airport',
 'SpringHill Suites Seattle\xa0Downtown',
 'Courtyard by Marriott Seattle Downtown/Pioneer Square',
 'The Loyal Inn',
 'EVEN Hotel Seattle - South Lake Union']

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/660255.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

TPshop商城的保姆教程(windows)

提前准备 phpStudy下载&#xff1a;https://www.xp.cn/download.html 选择适合自己的版本下载 TPshop商城源文件下载链接&#xff1a; https://pan.baidu.com/s/143fLrxbwe9CTMCbyx7mXJQ?pwd6666 开始安装 安装完phpstudy后 以管理员的身份启动phpstudy.exe 选择合适自己…

[猫头虎分享21天微信小程序基础入门教程] 第20天:小程序的多媒体功能与图像处理

[猫头虎分享21天微信小程序基础入门教程] 第20天&#xff1a;小程序的多媒体功能与图像处理 第20天&#xff1a;小程序的多媒体功能与图像处理 &#x1f3a8; 自我介绍 大家好&#xff0c;我是猫头虎&#xff0c;一名全栈软件工程师。今天我们继续微信小程序的学习&#xff…

SRE视角下的DevOps构建之道

引言&#xff1a; 随着数字化时代的飞速发展&#xff0c;软件成为了企业竞争力的核心。为了更高效地交付高质量的软件&#xff0c;DevOps&#xff08;Development和Operations的组合&#xff09;作为一种文化、实践和工具集的集合&#xff0c;逐渐成为了行业内的热门话题。然而…

记录贴 Elasticsearch的RestClient进行DSL查询

must&#xff1a;必须匹配每个子查询&#xff0c;类似“与” should&#xff1a;选择性匹配子查询&#xff0c;类似“或” must_not&#xff1a;必须不匹配&#xff0c;不参与算分&#xff0c;类似“非” filter&#xff1a;必须匹配&#xff0c;不参与算分 package com.h…

java中的工具类

以下是我们到现在学的三个类 在书写工具类的时候我们要遵循以下的规则 类名见面知意是为了知道这个工具类的作用 私有化构造方法的作用是为了不让外界不能创造这个类的对象吗&#xff0c;因为工具类不是描述一个事物的&#xff0c;它是一个工具。 方法定义位静态是为了方便调用…

网页中的音视频裁剪拼接合并

一、需求描述 项目中有一个配音需求&#xff1a; 1&#xff09;首先&#xff0c;前台会拿到一个英语视频&#xff0c;视频的内容是A和B用英语交流&#xff1b; 2&#xff09;然后&#xff0c;用户可以选择为某一个角色配音&#xff0c;假如选择为A配音&#xff0c;那么视频在播…

Linux学习笔记(二)

一、Linux文件目录 1.命令&#xff1a;tree -L 1 2.挂载命令&#xff08;例如U盘&#xff0c;需要挂载之后才能访问&#xff09;&#xff1a; mount /dev/cdrom /mnt ls /mnt 3.查看登录信息&#xff1a; last / lastlog 4.修改/查看网络信息 vi /etc/sysconfig/netw…

kubernetes-PV与PVC

一、PV和PVC详解 当前&#xff0c;存储的方式和种类有很多&#xff0c;并且各种存储的参数也需要非常专业的技术人员才能够了解。在Kubernetes集群中&#xff0c;放了方便我们的使用和管理&#xff0c;Kubernetes提出了PV和PVC的概念&#xff0c;这样Kubernetes集群的管理人员就…

jsRpc js逆向远程调用加密函数

rpc介绍&#xff1a; RPC 全称 Remote Procedure Call——远程过程调用,简单说就是为了解决远程调用服务的一种技术&#xff0c;使得调用者像调用本地服务一样方便透明&#xff1b; 使用RPC服务就可以直接在浏览器中的页面js中注入代码&#xff0c;将其作为一个客户端&#xff…

真实故障分享,H3C ER3208G3-X路由器-双绞线一闪一停

六类非屏蔽双绞线 网线钳 如上图所示&#xff0c;2号线接到h3c路由器出现网线一闪一停&#xff0c;用对线器测试一到8芯能一一对应&#xff0c;无法上网。2号线接到h3c交换机能正常上网&#xff0c;难道是网线对568A 568B有要求&#xff1f; 解决方式&#xff1a;通过两端568…

电脑丢失api-ms-win-crt-runtime-l1-1-0.dll的多种修复方法

在计算机使用过程中&#xff0c;我们经常会遇到一些错误提示&#xff0c;其中之一就是“api-ms-win-crt-runtime-l1-1-0.dll丢失”。这个错误通常发生在Windows操作系统中&#xff0c;它表示一个动态链接库文件丢失或损坏。这个问题可能会导致某些应用程序无法正常运行&#xf…

synchronized 锁的到底是什么?

通过8种情况演示锁运行案例&#xff0c;看看我们到底锁的是什么 1锁相关的8种案例演示code package com.bilibili.juc.lock;import java.util.concurrent.TimeUnit;/*** 题目&#xff1a;谈谈你对多线程锁的理解&#xff0c;8锁案例说明* 口诀&#xff1a;线程 操作 资源类* 8…

代码随想录算法训练营第36期DAY43

DAY43 343整数拆分 注意&#xff1a;当几个数的数值相近&#xff0c;乘积才会尽可能地大&#xff08;好想&#xff1a;数一大一小&#xff0c;最大当然是自己乘以自己&#xff09; 代码随想录官方题解&#xff1a; class Solution {public: int integerBreak(int n) { …

【Tlias智能学习辅助系统】01 准备工作

Tlias智能学习辅助系统 01 创建员工、部门表创建springboot工程&#xff0c;引入对应的起步依赖(web、mybatis、mysql驱动、lombok)准备 Mapper、Service、Controller 等基础结构MapperServiceControllerpojo封装类application.properties 接口开发规范 创建员工、部门表 -- 创…

前端调用exe程序配置

前置条件 访问端安装好需要调用的exe程序 1、新建reg文件 先新建一个txt文件&#xff0c;重命名为xx.reg 点击是&#xff0c;确认更改 2、编写注册表内容 右键点击文件&#xff0c;用记事本打开&#xff0c;输入以下内容 将下面的${exeName}修改为自定义的程序名&#x…

Web开发中,就session和cookie相比,用session比用cookie的优点有哪些?

在Web项目中&#xff0c;session和cookie都是用于存储用户数据的机制&#xff0c;但它们有不同的优缺点。使用session比使用cookie有以下几个主要优点&#xff1a; 1. 安全性更高 敏感数据保护&#xff1a;Session数据存储在服务器端&#xff0c;而不是客户端。这样&#xff…

Nginx教程(持续更新中~)

浏览器优先查看host文件中的映射&#xff0c;如果host中没有就会从网上CDN找该域名对应的ip,但是目前使用的www.123.com是外卖假设的&#xff0c;CDN中并没有&#xff0c;所以就采用host中填写 第二种weight: 第三种 ip_hash: 第四种 fair: ​​​​​​

倩女幽魂手游攻略:新人入坑必看指南!

《倩女幽魂》是一款经典的MMORPG游戏&#xff0c;凭借其丰富的剧情、精美的画面和多样的玩法&#xff0c;吸引了众多玩家。在游戏中&#xff0c;提升角色等级和战斗力是每个玩家的核心目标。本文将详细介绍如何在游戏中快速提升角色等级、增强实力&#xff0c;并提供一些实用的…

MyBatisPlus学习笔记(二)

条件构造器&#xff1a; Wrapper的作用就是来封装我们当前的条件的 删除用的和查询用的一样&#xff1a;QueryWrapper 和 LambdaQueryWrapper MyBatis-Plus分页插件的配置和使用 Ctrl H 查看当前接口或者类的一个继承关系 Ctrl P 分页插件 乐观锁和悲观锁 通用枚举 代码…

leetcode 1270 向公司CEO汇报工作的所有人(postgresql)

需求 员工表&#xff1a;Employees ---------------------- | Column Name | Type | ---------------------- | employee_id | int | | employee_name | varchar | | manager_id | int | ---------------------- employee_id 是这个表的主键。 这个表中每一行中&#xff0c;e…