WanAndroid(鸿蒙版)开发的第三篇

news2024/10/5 22:24:37

前言

DevEco Studio版本:4.0.0.600

WanAndroid的API链接:玩Android 开放API-玩Android - wanandroid.com

其他篇文章参考:

1、WanAndroid(鸿蒙版)开发的第一篇

2、WanAndroid(鸿蒙版)开发的第二篇

3、WanAndroid(鸿蒙版)开发的第三篇

4、WanAndroid(鸿蒙版)开发的第四篇

5、WanAndroid(鸿蒙版)开发的第五篇

效果

   

搜索页面实现

从效果图上可以知道整体是竖直方向(Column),包括:搜索框、热搜、搜索历史三个模块

1、搜索框

代码实现:

 RelativeContainer() {
            Image($r('app.media.ic_back'))
               .width(32)
               .height(32)
               .id('imageBack')
               .margin({ left: 10, right: 10 })
               .alignRules({
                  center: { anchor: '__container__', align: VerticalAlign.Center },
                  left: { anchor: '__container__', align: HorizontalAlign.Start }
               })
               .onClick(() => {
                  router.back()
               })

            Button('搜索')
               .height(35)
               .fontColor(Color.White)
               .id('buttonSearch')
               .margin({ left: 10, right: 10 })
               .alignRules({
                  center: { anchor: '__container__', align: VerticalAlign.Center },
                  right: { anchor: '__container__', align: HorizontalAlign.End }
               })
               .linearGradient({
                  angle: 0,
                  colors: [['#E4572F', 0], ['#D64025', 1]]
               })
               .onClick(() => {
                  if (this.searchContent.trim().length > 0) {
                     this.insertData(new SearchContentBean(this.searchContent.trim()))
                     this.jumpToSearchDetails(this.searchContent)
                  } else {
                     promptAction.showToast({ message: '搜索内容为空' })
                  }
               })

            Row() {
               Image($r('app.media.ic_search_8a8a8a'))
                  .width(20)
                  .height(20)
               TextInput({ placeholder: '发现更多干货', text: '鸿洋' })
                  .fontSize(16)
                  .backgroundColor('#00000000')
                  .enterKeyType(EnterKeyType.Search)
                  .width('100%')
                  .height(45)
                  .flexShrink(1)
                  .onChange((value: string) => {
                     this.searchContent = value
                  })
            }
            .height(45)
            .padding(5)
            .borderWidth(1)
            .borderColor('#ED7C12')
            .borderRadius(10)
            .id('rowSearch')
            .alignRules({
               center: { anchor: '__container__', align: VerticalAlign.Center },
               left: { anchor: 'imageBack', align: HorizontalAlign.End },
               right: { anchor: 'buttonSearch', align: HorizontalAlign.Start }
            })
         }
         .width('100%')
         .height(70)

2、热搜

从UI效果上可以看出热搜内容是个流式布局,要实现流式布局可以通过

Flex({ justifyContent: FlexAlign.Start, wrap: FlexWrap.Wrap }) 来实现

参考:OpenHarmony Flex

代码实现:

@Component
export struct FlowlayoutView {
   @Link flowlayoutArr: string[]
   private onItemClick: (item: string, index: number) => void = () => {
   }

   build() {
      // Flex布局, wrap为FlexWrap.Wrap为流式布局
      Flex({ justifyContent: FlexAlign.Start, wrap: FlexWrap.Wrap }) {
         if (this.flowlayoutArr.length > 0) {
            ForEach(this.flowlayoutArr,
               (item: string, index: number) => {
                  Text(`${item}`)
                     .fontSize(18)
                     .fontColor(Color.White)
                     .borderStyle(BorderStyle.Solid)
                     .padding({ left: 10, right: 10, top: 6, bottom: 6 })
                     .backgroundColor(Color.Pink)
                     .borderRadius(5)
                     .margin({ top: 10, right: 10 })
                     .textOverflow({ overflow: TextOverflow.Ellipsis })
                     .maxLines(2)
                     .onClick(() => {
                        this.onItemClick(item, index)
                     })
               },
               (item: string) => item.toString()
            )
         }
      }
   }
}

3、搜索历史

每次点击搜索或点击热搜中的关键词时,将点击的内容保存到数据库中,在搜索页面显示时(onPageShow)去查询数据库。UI上通过List去加载查询的数据

数据库实现:

参考BaseLibrary 中database里面的代码

代码实现:

List() {
   ForEach(this.searchHistoryList, (item, index) => {
      ListItem() {
         Row() {
            Image($r('app.media.searchHistory'))
               .width(24)
               .height(24)
               .margin({ left: 20 })
            Text(item)
               .fontColor(this.getTextColor(index))
               .fontSize(20)
               .margin({ right: 20 })
         }.width('100%')
         .padding({ top: 15, bottom: 15 })
         .justifyContent(FlexAlign.SpaceBetween)
      }.swipeAction({ end: this.itemEnd(index) })
      .onClick(() => {
         this.jumpToSearchDetails(item)
      })
   })
}
.flexShrink(1)
.width('100%')
.height('100%')

4、详细代码

import router from '@ohos.router'
import promptAction from '@ohos.promptAction'
import { FlowlayoutView, HttpManager, RequestMethod, SearchContentBean, SQLManager } from '@app/BaseLibrary'
import LogUtils from '@app/BaseLibrary/src/main/ets/utils/LogUtils'
import { SearchHotKey } from '../../bean/search/SearchHotKeyBean'

const TAG = 'SearchPage--- ';

@Entry
@Component
struct SearchPage {
  private sqlManager = new SQLManager();
  @State searchContent: string = ''
  @State searchHotKeyArr: string[] = []
  @State searchHistoryList: string[] = []
  @State searchContentBeanList: SearchContentBean[] = []

  aboutToAppear() {
    this.getSearchHotKeyData()
  }

  onPageShow() {
    this.queryAllData()
  }

  private getSearchHotKeyData() {
    HttpManager.getInstance()
      .request<SearchHotKey>({
        method: RequestMethod.GET,
        url: `https://www.wanandroid.com/hotkey/json`, //wanAndroid的API:搜索热词
      })
      .then((result: SearchHotKey) => {
        LogUtils.info(TAG, "result: " + JSON.stringify(result))
        if (result.errorCode == 0) {
          for (let i = 0; i < result.data.length; i++) {
            this.searchHotKeyArr = this.searchHotKeyArr.concat(result.data[i].name)
          }
        }
        LogUtils.info(TAG, "添加后的searchHotKeyArr: " + JSON.stringify(this.searchHotKeyArr))
      })
      .catch((error) => {
        LogUtils.info(TAG, "error: " + JSON.stringify(error))
      })
  }

  build() {
    Column() {
      RelativeContainer() {
        Image($r('app.media.ic_back'))
          .width(32)
          .height(32)
          .id('imageBack')
          .margin({ left: 10, right: 10 })
          .alignRules({
            center: { anchor: '__container__', align: VerticalAlign.Center },
            left: { anchor: '__container__', align: HorizontalAlign.Start }
          })
          .onClick(() => {
            router.back()
          })

        Button('搜索')
          .height(35)
          .fontColor(Color.White)
          .id('buttonSearch')
          .margin({ left: 10, right: 10 })
          .alignRules({
            center: { anchor: '__container__', align: VerticalAlign.Center },
            right: { anchor: '__container__', align: HorizontalAlign.End }
          })
          .linearGradient({
            angle: 0,
            colors: [['#E4572F', 0], ['#D64025', 1]]
          })
          .onClick(() => {
            if (this.searchContent.trim().length > 0) {
              this.insertData(new SearchContentBean(this.searchContent.trim()))
              this.jumpToSearchDetails(this.searchContent)
            } else {
              promptAction.showToast({ message: '搜索内容为空' })
            }
          })

        Row() {
          Image($r('app.media.ic_search_8a8a8a'))
            .width(20)
            .height(20)
          TextInput({ placeholder: '发现更多干货', text: '鸿洋' })
            .fontSize(16)
            .backgroundColor('#00000000')
            .enterKeyType(EnterKeyType.Search)
            .width('100%')
            .height(45)
            .flexShrink(1)
            .onChange((value: string) => {
              this.searchContent = value
            })
        }
        .height(45)
        .padding(5)
        .borderWidth(1)
        .borderColor('#ED7C12')
        .borderRadius(10)
        .id('rowSearch')
        .alignRules({
          center: { anchor: '__container__', align: VerticalAlign.Center },
          left: { anchor: 'imageBack', align: HorizontalAlign.End },
          right: { anchor: 'buttonSearch', align: HorizontalAlign.Start }
        })
      }
      .width('100%')
      .height(70)

      Divider().strokeWidth(1).color('#F1F3F5')

      Text('热搜')
        .fontSize(20)
        .fontColor('#D64025')
        .margin({ left: 15, right: 15, top: 10 })
        .alignSelf(ItemAlign.Start)

      //自定义流式布局
      FlowlayoutView({
        flowlayoutArr: this.searchHotKeyArr,
        onItemClick: (item, index) => {
          LogUtils.info(TAG, "Index------   点击了:index: " + index + " item: " + item)
          this.insertData(new SearchContentBean(item))
          this.jumpToSearchDetails(item)
        }
      }).margin({ left: 20, right: 20 })

      Row() {
        Text('搜索历史')
          .fontSize(20)
          .fontColor('#1296db')
          .margin({ left: 15, right: 15, top: 15, bottom: 15 })
          .alignSelf(ItemAlign.Start)

        Row() {
          Image($r('app.media.deleteAll'))
            .width(22)
            .height(22)
          Text('清空')
            .fontColor(Color.Black)
            .margin({ left: 5 })
            .fontSize(20)
        }.margin({ left: 15, right: 15, top: 15, bottom: 15 })
        .onClick(() => {
          this.deleteAllData()
        })
      }
      .width('100%')
      .justifyContent(FlexAlign.SpaceBetween)

      List() {
        ForEach(this.searchHistoryList, (item, index) => {
          ListItem() {
            Row() {
              Image($r('app.media.searchHistory'))
                .width(24)
                .height(24)
                .margin({ left: 20 })
              Text(item)
                .fontColor(this.getTextColor(index))
                .fontSize(20)
                .margin({ right: 20 })
            }.width('100%')
            .padding({ top: 15, bottom: 15 })
            .justifyContent(FlexAlign.SpaceBetween)
          }.swipeAction({ end: this.itemEnd(index) })
          .onClick(() => {
            this.jumpToSearchDetails(item)
          })
        })
      }
      .flexShrink(1)
      .width('100%')
      .height('100%')
    }
    .width('100%')
    .height('100%')
    .backgroundColor(Color.White)
  }

  @Builder
  itemEnd(index: number) { // 侧滑后尾端出现的组件
    Image($r('app.media.deleteAll'))
      .width(30)
      .height(30)
      .margin(10)
      .onClick(() => {
        this.deleteData(this.searchContentBeanList[index])
        this.searchHistoryList.splice(index, 1);
        this.searchContentBeanList.splice(index, 1);
      })
  }

  /**
   * 跳转到搜索详情页
   */
  private jumpToSearchDetails(content: string) {
    router.pushUrl({
      url: 'pages/search/SearchDetailsPage',
      params: {
        searchContent: content
      }
    }, router.RouterMode.Single)
  }

  private deleteData(searchContentBean: SearchContentBean) {
    LogUtils.info("Rdb-----   deleteData result: " + searchContentBean.id + "   searchContent: " + searchContentBean.searchContent)
    this.sqlManager.deleteData(searchContentBean, (result) => {
      LogUtils.info("Rdb-----   删除 result: " + result)
    })
  }

  /**
   * 删除所有数据
   */
  private deleteAllData() {
    if (this.searchHistoryList.length <= 0) {
      promptAction.showToast({ message: '没有可清除的数据' })
      return
    }
    this.sqlManager.deleteDataAll((result) => {
      LogUtils.info(TAG, "Rdb-----   删除所有 result: " + result)
      if (result) {
        promptAction.showToast({ message: '清除完成' })
        this.searchHistoryList = []
      }
    })
  }

  /**
   * 查询所有数据
   */
  private queryAllData() {
    this.sqlManager.getRdbStore(() => {
      this.sqlManager.query((result: Array<SearchContentBean>) => {
        LogUtils.info(TAG, "Rdb-----   查询 result: " + JSON.stringify(result))
        this.searchContentBeanList = result
        this.searchHistoryList = []
        for (let i = 0; i < result.length; i++) {
          this.searchHistoryList.push(result[i].searchContent)
        }
      })
    })
  }

  /**
   * 插入数据
   */
  private insertData(searchContentBean: SearchContentBean) {
    this.sqlManager.insertData(searchContentBean, (id: number) => {
      LogUtils.info(TAG, "Rdb-----  result  插入 id: " + id)
      searchContentBean.id = id
      if (id >= 0) { //id < 0 表示插入数据失败
      }
    })
  }

  private getTextColor(index: number): ResourceColor {
    if (index % 3 == 0) {
      return Color.Orange
    } else if (index % 3 == 1) {
      return Color.Blue
    } else if (index % 3 == 2) {
      return Color.Pink
    }
    return Color.Black
  }
}

搜索详情页面实现

1、代码实现:

import router from '@ohos.router';
import {
   Constants,
   HtmlUtils,
   HttpManager,
   LoadingDialog,
   RefreshController,
   RefreshListView,
   RequestMethod
} from '@app/BaseLibrary';
import LogUtils from '@app/BaseLibrary/src/main/ets/utils/LogUtils';
import { SearchDetailsItemBean } from '../../bean/search/SearchDetailsItemBean';
import { SearchDetailsBean } from '../../bean/search/SearchDetailsBean';
import promptAction from '@ohos.promptAction';
import { AppTitleBar } from '../../widget/AppTitleBar';

const TAG = 'SearchDetailsPage--- ';

@Entry
@Component
struct SearchDetailsPage {
   @State searchContent: string = router.getParams()?.['searchContent'];
   @State controller: RefreshController = new RefreshController()
   @State searchDetailsListData: Array<SearchDetailsItemBean> = [];
   @State pageNum: number = 0
   @State isRefresh: boolean = true
   @State userName: string = ''
   @State token_pass: string = ''

   aboutToAppear() {
      LogUtils.info(TAG, " aboutToAppear: " + this.searchContent)
      if (AppStorage.Has(Constants.APPSTORAGE_USERNAME)) {
         this.userName = AppStorage.Get(Constants.APPSTORAGE_USERNAME) as string
      }
      if (AppStorage.Has(Constants.APPSTORAGE_TOKEN_PASS)) {
         this.token_pass = AppStorage.Get(Constants.APPSTORAGE_TOKEN_PASS) as string
      }
      this.dialogController.open()
      this.getSearchDetailsData()
   }

   private getSearchDetailsData() {
      HttpManager.getInstance()
         .request<SearchDetailsBean>({
            method: RequestMethod.POST,
            header: {
               "Content-Type": "application/json",
               "Cookie": `loginUserName=${this.userName}; token_pass=${this.token_pass}`
            },
            url: `https://www.wanandroid.com/article/query/${this.pageNum}/json/?k=${encodeURIComponent(this.searchContent)}`, //wanAndroid的API:搜索  ?k=${this.searchContent}
         })
         .then((result: SearchDetailsBean) => {
            LogUtils.info(TAG, "result: " + JSON.stringify(result))
            if (this.isRefresh) {
               this.controller.finishRefresh()
            } else {
               this.controller.finishLoadMore()
            }
            if (result.errorCode == 0) {
               if (this.isRefresh) {
                  this.searchDetailsListData = result.data.datas
               } else {
                  if (result.data.datas.length > 0) {
                     this.searchDetailsListData = this.searchDetailsListData.concat(result.data.datas)
                  } else {
                     promptAction.showToast({ message: '没有更多数据啦!' })
                  }
               }
            }
            this.dialogController.close()
         })
         .catch((error) => {
            LogUtils.info(TAG, "error: " + JSON.stringify(error))
            if (this.isRefresh) {
               this.controller.finishRefresh()
            } else {
               this.controller.finishLoadMore()
            }
            this.dialogController.close()
         })
   }

   build() {
      Column() {
         AppTitleBar({ title: this.searchContent })

         RefreshListView({
            list: this.searchDetailsListData,
            controller: this.controller,
            isEnableLog: true,
            paddingRefresh: { left: 10, right: 10, top: 5, bottom: 5 },
            refreshLayout: (item: SearchDetailsItemBean, index: number): void => this.itemLayout(item, index),
            onItemClick: (item: SearchDetailsItemBean, index: number) => {
               LogUtils.info(TAG, "点击了:index: " + index + " item: " + item)
               router.pushUrl({
                  url: 'pages/WebPage',
                  params: {
                     title: item.title,
                     uriLink: item.link
                  }
               }, router.RouterMode.Single)
            },
            onRefresh: () => {
               //下拉刷新
               this.isRefresh = true
               this.pageNum = 0
               this.getSearchDetailsData()
            },
            onLoadMore: () => {
               //上拉加载
               this.isRefresh = false
               this.pageNum++
               this.getSearchDetailsData()
            }
         }).flexShrink(1)

      }
      .width('100%')
      .height('100%')
      .backgroundColor('#F1F3F5')
   }

   @Builder
   itemLayout(item: SearchDetailsItemBean, index: number) {
      RelativeContainer() {
         //作者或分享人
         Text(item.author.length > 0 ? "作者:" + item.author : "分享人:" + item.shareUser)
            .fontColor('#666666')
            .fontSize(14)
            .id("textAuthor")
            .alignRules({
               top: { anchor: '__container__', align: VerticalAlign.Top },
               left: { anchor: '__container__', align: HorizontalAlign.Start }
            })

         Text(item.superChapterName + '/' + item.chapterName)
            .fontColor('#1296db')
            .fontSize(14)
            .id("textChapterName")
            .alignRules({
               top: { anchor: '__container__', align: VerticalAlign.Top },
               right: { anchor: '__container__', align: HorizontalAlign.End }
            })

         //标题
         Text(HtmlUtils.formatStr(item.title))
            .fontColor('#333333')
            .fontWeight(FontWeight.Bold)
            .maxLines(2)
            .textOverflow({
               overflow: TextOverflow.Ellipsis
            })
            .fontSize(20)
            .margin({ top: 10 })
            .id("textTitle")
            .alignRules({
               top: { anchor: 'textAuthor', align: VerticalAlign.Bottom },
               left: { anchor: '__container__', align: HorizontalAlign.Start }
            })

         //更新时间
         Text("时间:" + item.niceDate)
            .fontColor('#666666')
            .fontSize(14)
            .id("textNiceDate")
            .alignRules({
               bottom: { anchor: '__container__', align: VerticalAlign.Bottom },
               left: { anchor: '__container__', align: HorizontalAlign.Start }
            })
      }
      .width('100%')
      .height(120)
      .padding(10)
      .borderRadius(10)
      .backgroundColor(Color.White)
   }

   private dialogController = new CustomDialogController({
      builder: LoadingDialog(),
      customStyle: true,
      alignment: DialogAlignment.Center, // 可设置dialog的对齐方式,设定显示在底部或中间等,默认为底部显示
   })
}

2、根据传入的搜索词获取数据

aboutToAppear() {
   this.getSearchDetailsData()
}

源代码地址:WanAndroid_Harmony: WanAndroid的鸿蒙版本

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

三级等保技术建议书

1信息系统详细设计方案 1.1安全建设需求分析 1.1.1网络结构安全 1.1.2边界安全风险与需求分析 1.1.3运维风险需求分析 1.1.4关键服务器管理风险分析 1.1.5关键服务器用户操作管理风险分析 1.1.6数据库敏感数据运维风险分析 1.1.7“人机”运维操作行为风险综合分析 1.2…

EPICS和Arduino Uno之间基于串行文本协议的控制开发

Arduino Uno的串口服务程序设置如文本的串口通信协议设计以及在Arduino上的应用-CSDN博客中所示。通过在串口上发送约定的文本协议&#xff0c;它实现的功能如下&#xff1a; 实现功能&#xff1a; 读取三路0.0V~5.0V模拟量输入&#xff0c;读取端口A0~A2设置三路0.0V~5.0V的模…

Github 2024-03-16 开源项目日报Top10

根据Github Trendings的统计,今日(2024-03-16统计)共有10个项目上榜。根据开发语言中项目的数量,汇总情况如下: 开发语言项目数量Python项目5非开发语言项目2TypeScript项目1C++项目1Lua项目1Swift项目1《Hello 算法》:动画图解、一键运行的数据结构与算法教程 创建周期:4…

spring boot3登录开发-微信小程序用户登录设计与实现

⛰️个人主页: 蒾酒 &#x1f525;系列专栏&#xff1a;《spring boot实战》 &#x1f30a;山高路远&#xff0c;行路漫漫&#xff0c;终有归途 目录 写在前面 登录流程 流程解析 具体实现 相关代码 说明 服务端 小程序端 写在最后 写在前面 本文介绍了springb…

BigDL-LLM 安装指南——在iGPU集成显卡下使用BigDL-LLM大模型库加速LLM

文章目录 iGPU是什么&#xff1f;一、环境准备1.1 Visual Studio 2022 Community 安装1.2 安装或更新最新版本的GPU驱动程序1.3 安装英特尔oneAPI工具包2024.0版本1.4 安装Anaconda 二、BigDL -LLM 安装2.1 创建虚拟环境2.2 激活虚拟环境2.3 安装bigdl-llm[xpu] 三、运行环境配…

Etcd 介绍与使用(入门篇)

etcd 介绍 etcd 简介 etc &#xff08;基于 Go 语言实现&#xff0c;&#xff09;在 Linux 系统中是配置文件目录名&#xff1b;etcd 就是配置服务&#xff1b; etcd 诞生于 CoreOS 公司&#xff0c;最初用于解决集群管理系统中 os 升级时的分布式并发控制、配置文件的存储与分…

哔哩哔哩后端Java一面

前言 作者&#xff1a;晓宜 个人简介&#xff1a;互联网大厂Java准入职&#xff0c;阿里云专家博主&#xff0c;csdn后端优质创作者&#xff0c;算法爱好者 最近各大公司的春招和实习招聘都开始了&#xff0c;这里分享下去年面试B站的的一些问题&#xff0c;希望对大家有所帮助…

PLC_博图系列☞基本指令“RESET_BF”复位位域

PLC_博图系列☞基本指令“RESET_BF”复位位域 文章目录 PLC_博图系列☞基本指令“RESET_BF”复位位域背景介绍RESET_BF&#xff1a;复位位域说明类型为 PLC 数据类型、STRUCT 或 ARRAY 的位域参数示例 关键字&#xff1a; PLC、 西门子、 博图、 Siemens 、 RESET_BF 背景…

java 开发工具

新建项目 打开idea选择 New Project 新建一个项目 左边选择 Java项目&#xff0c;右边选择Java版本 接着next 修改项目名称和保存路径&#xff0c;然后点击下面的 Finish 最终页面; 在 src 目录右键&#xff0c;新建一个包 在 src 目录右键&#xff0c;新建java 文件 有时候会需…

Git全套教程一套精通git.跟学黑马笔记

Git全套教程一套精通git.跟学黑马笔记 文章目录 Git全套教程一套精通git.跟学黑马笔记1.版本管理工具概念2. 版本管理工具介绍2.1版本管理发展简史(维基百科)2.1.1 SVN(SubVersion)2.1.2 Git 3. Git 发展简史4. Git 的安装4.1 git 的下载4.2 安装4.3 基本配置4.4 为常用指令配置…

智能工具柜-RFID智能工具柜管理系统

RFID工具柜管理系统是一种便捷化的工具管理系统&#xff0c;它采用RFID技术实现信息化&#xff0c;可以大大提高工具管理的效率和准确性。 日常的工具管理也确实存在一定的管理问题&#xff0c;如工具管理效率低、管理不准确等。因此&#xff0c;采用RFID技术实现信息化已经成…

【深度学习】深度估计,Depth Anything Unleashing the Power of Large-Scale Unlabeled Data

论文标题&#xff1a;Depth Anything Unleashing the Power of Large-Scale Unlabeled Data 论文地址&#xff1a;https://arxiv.org/pdf/2401.10891.pdf 项目主页&#xff1a;https://depth-anything.github.io/ 演示地址&#xff1a;https://huggingface.co/spaces/LiheYoung…

【Elasticsearch】windows安装elasticsearch教程及遇到的坑

一、安装参考 1、安装参考&#xff1a;ES的安装使用(windows版) elasticsearch的下载地址&#xff1a;https://www.elastic.co/cn/downloads/elasticsearch ik分词器的下载地址&#xff1a;https://github.com/medcl/elasticsearch-analysis-ik/releases kibana可视化工具下载…

火车订票管理系统|基于springboot框架+ Mysql+Java+B/S结构的火车订票管理系统设计与实现(可运行源码+数据库+设计文档)

推荐阅读100套最新项目 最新ssmjava项目文档视频演示可运行源码分享 最新jspjava项目文档视频演示可运行源码分享 最新Spring Boot项目文档视频演示可运行源码分享 目录 前台功能效果图 管理员功能登录前台功能效果图 用户功能模块 系统功能设计 数据库E-R图设计 lunwen…

【深度学习目标检测】二十三、基于深度学习的行人检测计数系统-含数据集、GUI和源码(python,yolov8)

行人检测计数系统是一种重要的智能交通监控系统&#xff0c;它能够通过图像处理技术对行人进行实时检测、跟踪和计数&#xff0c;为城市交通规划、人流控制和安全管理提供重要数据支持。本系统基于先进的YOLOv8目标检测算法和PyQt5图形界面框架开发&#xff0c;具有高效、准确、…

[WUSTCTF2020]颜值成绩查询 --不会编程的崽

这题也是一个很简单的盲注题目&#xff0c;这几天sql与模板注入做麻了&#xff0c;也是轻松拿捏。 它已经提示&#xff0c;enter number&#xff0c;所有猜测这里后台代码并没有使用 " 闭合。没有明显的waf提示&#xff0c; 但是or&#xff0c;and都没反应。再去fuzz一…

C++17之std::variant

1. std::variant操作 如下列出了为std:: variable <>提供的所有操作。

Spring Boot整合STOMP实现实时通信

目录 引言 代码实现 配置类WebSocketMessageBrokerConfig DTO 工具类 Controller common.html stomp-broadcast.html 运行效果 完整代码地址 引言 STOMP&#xff08;Simple Text Oriented Messaging Protocol&#xff09;作为一种简单文本导向的消息传递协议&#xf…

基础---nginx 启动不了,跟 Apache2 服务冲突

文章目录 查看 nginx 服务状态nginx 启动后 访问页面 127.0.0.1停止 nginx 服务&#xff0c;访问不了页面停止/启动 Apache2 服务&#xff0c;启动 Apache2 页面访问显示正确nginx 莫名启动不了卸载 Apache2 服务器 启动 nginx &#xff0c;但是总是不能实现反向代理&#xff0…

Java手写简易数据库--持续更新中

MYDB 0. 项目结构0.1 引用计数缓存框架为什么不使用LRU引用计数缓存缓存框架实现 0.2 共享内存数组 1. 事务管理器--TM1.1 XID 文件XID 规则XID 文件结构读取方式事务状态 1.2 代码实现 2. 数据管理器--DM2.1 页面缓存页面结构页面缓存数据页管理第一页普通页 2.2 日志文件 3. …