HarmonyNext当自定义Dialog有TextInput输入框组件时,弹出软键盘时,dialog布局与软键盘之间有16vp间隙,如何解决,正宗方案

网上的解决方案都是在Dialog组件的根容器中设置偏移量.offset({x:0,y:16}) 大概这种的,这种垃圾解决方式最不可靠,倘若dialog输入框时根据状态变量动态显示的话,即使设置了也没有用

正宗解决方案

首先自定义dialog 三个地方需要注意

1、customStyle 设置为true 2、offset重置为0
3、不启用默认键盘 keyboardAvoidMode: KeyboardAvoidMode.NONE,
private dialogController: CustomDialogController = new CustomDialogController({
    builder: CustomBottomDialog({
      keywords: this.keywords,
      searchType: this.searchType,
    }),
    alignment: DialogAlignment.Bottom,
    offset: { dx: 0, dy: 0 },
    customStyle: true,
    maskColor: 'rgba(0, 0, 0, 0.5)',
    keyboardAvoidMode: KeyboardAvoidMode.NONE,
    onWillDismiss: () => {
      return false
    }
  })
然后在@CustomDialog装饰器装饰的组件 aboutToAppear中监听键盘显示与隐藏变化,获取键盘高度

在这里插入图片描述

 async aboutToAppear() {
    this.fetchDistributeCommentData();

    window.getLastWindow(getContext(this)).then(currentWindow => {
      // 设置窗口的布局为沉浸式布局
      currentWindow.setWindowLayoutFullScreen(true);
      let property = currentWindow.getWindowProperties();
      // 初始化窗口高度
      let avoidArea = currentWindow.getWindowAvoidArea(window.AvoidAreaType.TYPE_KEYBOARD);
      this.scrollHeight = px2vp(property.windowRect.height - avoidArea.bottomRect.height);
      // 监听软键盘的隐藏和显示
      currentWindow.on('avoidAreaChange', data => {
        if (data.type == window.AvoidAreaType.TYPE_KEYBOARD) {
          this.keyHeight = px2vp(data.area.bottomRect.height);
          this.scrollHeight =
            px2vp(currentWindow.getWindowProperties().windowRect.height - data.area.bottomRect.height);
          this.autoHeight = 250;
          // this.scroller.scrollEdge(Edge.Bottom)
          this.scroller.scrollTo({
            xOffset: 0,
            yOffset: 250
          })
          return;
        }
        this.autoHeight = 'auto';
      })
    })
  }
紧接着设置根容器Colum(){}. margin({ bottom:this.keyHeight})
 build() {
    Column() {
      Flex({
        direction: FlexDirection.Row,
        alignItems: ItemAlign.Center,
        justifyContent: FlexAlign.SpaceBetween
      }) {
        Row()
        Text(this.moduleName)
          .fontSize(18)
          .fontWeight(FontWeight.Bold)
          .fontColor($r('app.color.color_1B1E2E'))
        Image($r('app.media.gtui_nav_icon_close'))
          .width(24)
          .height(24)
          .onClick(() => {
            this.dialogController?.close();
          })
      }.padding({
        left: 16,
        right: 16
      })
      .margin({
        bottom: 30
      })

      Column() {
        Scroll(this.scroller) {

          Column() {
            Text(this.title)
              .font({
                size: 16,
                weight: FontWeight.Bold,
              })
              .fontColor($r('app.color.color_1B1E2E'))
              .alignSelf(ItemAlign.Start)
              .margin({
                left: 16
              })
            Flex({
              alignItems: ItemAlign.Center,
              justifyContent: FlexAlign.SpaceBetween,
            }) {
              ForEach(this.commentScoreEmojiVOList, (item: IDistributeCommentDataCommentScoreEmojiVOList) => {
                Column() {
                  Image(this.getEmojiIcon(item.isActive ?? false, item.score))
                    .width(40)
                    .height(40)
                  Text(item.text)
                    .fontSize(12)
                    .margin({
                      top: 16
                    })
                }.onClick(() => {
                  this.score = item.score;
                  this.showAdviseInput = true;
                  let commentScoreEmojiVOList =
                    this.commentScoreEmojiVOList.map((el: IDistributeCommentDataCommentScoreEmojiVOList) => {
                      el.isActive = false;
                      if (item.score === el.score) {
                        el.isActive = true;
                      }
                      return el;
                    })
                  this.commentScoreEmojiVOList = [...commentScoreEmojiVOList];
                  if (Array.isArray(item.labelList) && item.labelList.length > 0) {
                    this.labelList = item.labelList.map(label => {
                      return { label, isActive: false } as IDistributeCommentDataLabel
                    });
                    this.isDisabled = true;
                  } else {
                    this.labelList = [];
                    this.isDisabled = false;
                  }
                })
              })
            }.padding({
              left: 16,
              right: 16
            })
            .margin({
              top: 30
            })

            Flex({
              alignItems: ItemAlign.Center,
              justifyContent: FlexAlign.SpaceBetween,
              wrap: FlexWrap.Wrap,
            }) {
              ForEach(this.labelList, (item: IDistributeCommentDataLabel) => {
                Button(item.label)
                  .fontSize(12)
                  .fontColor(item.isActive ? $r('app.color.brand_500') : $r('app.color.color_1B1E2E'))
                  .type(ButtonType.Normal)
                  .borderRadius(3)
                  .height(28)
                  .width('31.5%')
                  .backgroundColor(item.isActive ? $r('app.color.brand_50') : $r('app.color.gray1'))
                  .onClick(() => {
                    let labelList = this.labelList.map(el => {
                      if (el.label.trim().includes(item.label.trim())) {
                        el.isActive = !item.isActive;
                      }
                      return el;
                    })
                    this.labelList = [...labelList];
                    this.isDisabled = false;
                    this.evaluateName = item.label;
                    this.selectLabelList = (labelList.filter(item => item.isActive)).map(item => item.label);
                  })
              })
            }.visibility(this.labelList.length > 0 ? Visibility.Visible : Visibility.None)
            .margin({
              top: 24
            })
            .padding({
              left: 16,
              right: 16
            })

            Row() {
              TextArea({
                placeholder: this.commentTextBoxVO?.tip ?? '',
                controller: this.textAreaController,
              })
                .onChange((text) => {
                  this.content = text;
                })
                .onSubmit(() => {
                })
                .borderRadius(6)
                .height(150)
                .padding(16)
                .enterKeyType(EnterKeyType.NEW_LINE)
                .lineHeight(18)
                .placeholderColor($r('app.color.fontGy3'))
                .placeholderFont({
                  size: 12
                })
                .caretColor($r('app.color.brand_500'))
                .backgroundColor($r('app.color.gray1'))
                .fontSize(12)
                .fontColor($r('app.color.fontGy1'))
                .layoutWeight(1)
            }.margin({
              top: 24,
            }).padding({
              left: 16,
              right: 16
            })
            .visibility(this.showAdviseInput ? Visibility.Visible : Visibility.None)
          }
        }.scrollBar(BarState.Off)
      }.height(this.autoHeight)

      Button('确认提交')
        .fontSize(16)
        .fontWeight(FontWeight.Normal)
        .backgroundColor(this.isDisabled ? $r('app.color.brand_200') : $r('app.color.brand_500'))
        .width('72%')
        .height(44)
        .stateEffect(false)

        .onClick(() => {
          if (this.isDisabled) {
            return;
          }
          this.submitEvaluate();
        })
        .margin({ top: 44 })
    }
    .backgroundColor(Color.White)
    .borderRadius({
      topLeft: 10,
      topRight: 10
    })
    .padding({
      top: 24,
      bottom: getNaviIndicatorHeightVP()
    })
    .margin({
      bottom: this.keyHeight,
    })
  }

这样就完美实现当键盘输入时,键盘就会自动定起来弹窗,并且也不会遮盖住底部提交按钮。

并且你也可以基于键盘显示与隐藏监听逻辑判断,使其在键盘弹出时,弹窗部分内容在有限高度里滚动显示,默认可以设置当键盘弹出时,内容直接滚动到底部显示。

在这里插入图片描述

在这里插入图片描述

完整代码片段
import { showToast, showToastCenter } from '@gaotu/library_ui/src/main/ets/utils/ToastUtils';
import { ApiConstants } from '../constants/ApiConstants';
import {
  IDistributeCommentData,
  IDistributeCommentDataCommentScoreEmojiVOList,
  IDistributeCommentDataCommentTextBoxVO,
  IDistributeCommentDataLabel
} from '../interfaces/IDistributeComment';
import { requestDistributeCommentApi } from '../services/SyncRequest';
import { BusinessError } from '@kit.BasicServicesKit';
import { SearchTypeEnum } from '../pages/SearchCoursePage';
import { ISubmitCommentResultData } from '../interfaces/ISubmitCommentResult';
import dayjs from 'dayjs';
import { getNaviIndicatorHeightVP } from '@gaotu/library_ui';
import { window } from '@kit.ArkUI';

@CustomDialog
@Component
export struct CustomBottomDialog {
  @Prop searchType: SearchTypeEnum;
  @Prop keywords: string;
  dialogController?: CustomDialogController
  @State moduleName: string = '';
  @State title: string = '';
  @State commentId: string = '';
  @State commentScoreEmojiVOList: IDistributeCommentDataCommentScoreEmojiVOList[] = [];
  @State commentTextBoxVO: IDistributeCommentDataCommentTextBoxVO | undefined = undefined;
  @State labelList: IDistributeCommentDataLabel[] = []
  @State selectLabelList: string[] = [];
  @State showAdviseInput: boolean = false;
  @State moduleId: string = '';
  @State isDisabled: boolean = true;
  @State score: number = 0;
  @State content: string = '';
  @State evaluateName: string = '';
  @State currentMillSeconds: number = dayjs().valueOf();
  @State scrollHeight: number = 0;
  @State isRebuild: boolean = false;
  @State keyHeight: number = 0;
  @State autoHeight: number | string = 'auto';
  submitEvaluate = async () => {
    let answerTimes = dayjs().valueOf() - this.currentMillSeconds;
    try {
      const res = await requestDistributeCommentApi<ISubmitCommentResultData>({
        url: ApiConstants.SUBMIT_COMMENT_API,
        useAndroidOS: true,
        param: {
          "answerTimes": answerTimes,
          "clazzNumber": "",
          "commentId": this.commentId,
          "commentType": 5,
          "customParams": {
            "pageTab": this.searchType === -1 ? "normal" : this.searchType === 1 ? "clazz_open" : 'clazz_system',
            "searchWords": this.keywords
          } as Record<string, string>,
          "evaluateId": this.moduleId,
          "evaluateName": this.moduleName,
          "evaluateType": 5,
          "labelList": this.selectLabelList,
          "lessonNumber": "",
          "markNumber": "",
          "pageSource": 5,
          "score": this.score,
          "scoreEmojiDTOList": this.commentScoreEmojiVOList,
          "textBoxAddCoinsFlag": false,
          "textBoxContent": this.content,
          "title": this.title,
        }
      })
      if (res && Object.keys(res).length > 0) {
        showToastCenter('提交成功')
        getContext().eventHub.emit('submitSuccess');
        this.dialogController?.close();
      }
    } catch (e) {
      showToast(e.message);
    } finally {
      this.currentMillSeconds = dayjs().valueOf();
    }
  }
  private scroller: Scroller = new Scroller();
  private textAreaController: TextAreaController = new TextAreaController();

  async aboutToAppear() {
    this.fetchDistributeCommentData();

    window.getLastWindow(getContext(this)).then(currentWindow => {
      // 设置窗口的布局为沉浸式布局
      currentWindow.setWindowLayoutFullScreen(true);
      let property = currentWindow.getWindowProperties();
      // 初始化窗口高度
      let avoidArea = currentWindow.getWindowAvoidArea(window.AvoidAreaType.TYPE_KEYBOARD);
      this.scrollHeight = px2vp(property.windowRect.height - avoidArea.bottomRect.height);
      // 监听软键盘的隐藏和显示
      currentWindow.on('avoidAreaChange', data => {
        if (data.type == window.AvoidAreaType.TYPE_KEYBOARD) {
          this.keyHeight = px2vp(data.area.bottomRect.height);
          this.scrollHeight =
            px2vp(currentWindow.getWindowProperties().windowRect.height - data.area.bottomRect.height);
          this.autoHeight = 250;
          // this.scroller.scrollEdge(Edge.Bottom)
          this.scroller.scrollTo({
            xOffset: 0,
            yOffset: 250
          })
          return;
        }
        this.autoHeight = 'auto';
      })
    })
  }

  fetchDistributeCommentData() {
    requestDistributeCommentApi<IDistributeCommentData>({
      url: ApiConstants.DISTRIBUTE_COMMENT_API,
      param: {
        "commentType": 5,
        "autoAction": false,
        "customParams": {
          "pageTab": this.searchType === -1 ? 'NORMAL' : this.searchType === 1 ? 'CLAZZ_OPEN' : 'CLAZZ_SYSTEM',
          "searchWords": ''
        } as Record<string, string>,
      }
    }).then(res => {
      this.title = res.title ?? '';
      this.moduleName = res.moduleName ?? '';
      this.commentId = res.commentId ?? '';
      this.moduleId = res.moduleId ?? '';
      if (Array.isArray(res.commentScoreEmojiVOList) && res.commentScoreEmojiVOList.length > 0) {
        res.commentScoreEmojiVOList.map(item => {
          return item;
        })
        this.commentScoreEmojiVOList = res.commentScoreEmojiVOList;
      } else {
        this.commentScoreEmojiVOList = [];
      }
      res.commentTextBoxVO && Object.keys(res.commentTextBoxVO).length > 0 && (this.commentTextBoxVO =
        res.commentTextBoxVO);
    }).catch((error: BusinessError) => {
      showToast(error.message);
    })
  }

  getEmojiIcon(isActive: boolean, score: number) {
    switch (score) {
      case 1:
        return isActive ? $r('app.media.selected_score_first') : $r('app.media.normal_score_first');
      case 2:
        return isActive ? $r('app.media.selected_score_second') : $r('app.media.normal_score_second');
      case 3:
        return isActive ? $r('app.media.selected_score_third') : $r('app.media.normal_score_third');
      case 4:
        return isActive ? $r('app.media.selected_score_four') : $r('app.media.normal_score_four');
      case 5:
        return isActive ? $r('app.media.selected_score_five') : $r('app.media.normal_score_five');
      default:
        return '';

    }
  }

  build() {
    Column() {
      Flex({
        direction: FlexDirection.Row,
        alignItems: ItemAlign.Center,
        justifyContent: FlexAlign.SpaceBetween
      }) {
        Row()
        Text(this.moduleName)
          .fontSize(18)
          .fontWeight(FontWeight.Bold)
          .fontColor($r('app.color.color_1B1E2E'))
        Image($r('app.media.gtui_nav_icon_close'))
          .width(24)
          .height(24)
          .onClick(() => {
            this.dialogController?.close();
          })
      }.padding({
        left: 16,
        right: 16
      })
      .margin({
        bottom: 30
      })

      Column() {
        Scroll(this.scroller) {

          Column() {
            Text(this.title)
              .font({
                size: 16,
                weight: FontWeight.Bold,
              })
              .fontColor($r('app.color.color_1B1E2E'))
              .alignSelf(ItemAlign.Start)
              .margin({
                left: 16
              })
            Flex({
              alignItems: ItemAlign.Center,
              justifyContent: FlexAlign.SpaceBetween,
            }) {
              ForEach(this.commentScoreEmojiVOList, (item: IDistributeCommentDataCommentScoreEmojiVOList) => {
                Column() {
                  Image(this.getEmojiIcon(item.isActive ?? false, item.score))
                    .width(40)
                    .height(40)
                  Text(item.text)
                    .fontSize(12)
                    .margin({
                      top: 16
                    })
                }.onClick(() => {
                  this.score = item.score;
                  this.showAdviseInput = true;
                  let commentScoreEmojiVOList =
                    this.commentScoreEmojiVOList.map((el: IDistributeCommentDataCommentScoreEmojiVOList) => {
                      el.isActive = false;
                      if (item.score === el.score) {
                        el.isActive = true;
                      }
                      return el;
                    })
                  this.commentScoreEmojiVOList = [...commentScoreEmojiVOList];
                  if (Array.isArray(item.labelList) && item.labelList.length > 0) {
                    this.labelList = item.labelList.map(label => {
                      return { label, isActive: false } as IDistributeCommentDataLabel
                    });
                    this.isDisabled = true;
                  } else {
                    this.labelList = [];
                    this.isDisabled = false;
                  }
                })
              })
            }.padding({
              left: 16,
              right: 16
            })
            .margin({
              top: 30
            })

            Flex({
              alignItems: ItemAlign.Center,
              justifyContent: FlexAlign.SpaceBetween,
              wrap: FlexWrap.Wrap,
            }) {
              ForEach(this.labelList, (item: IDistributeCommentDataLabel) => {
                Button(item.label)
                  .fontSize(12)
                  .fontColor(item.isActive ? $r('app.color.brand_500') : $r('app.color.color_1B1E2E'))
                  .type(ButtonType.Normal)
                  .borderRadius(3)
                  .height(28)
                  .width('31.5%')
                  .backgroundColor(item.isActive ? $r('app.color.brand_50') : $r('app.color.gray1'))
                  .onClick(() => {
                    let labelList = this.labelList.map(el => {
                      if (el.label.trim().includes(item.label.trim())) {
                        el.isActive = !item.isActive;
                      }
                      return el;
                    })
                    this.labelList = [...labelList];
                    this.isDisabled = false;
                    this.evaluateName = item.label;
                    this.selectLabelList = (labelList.filter(item => item.isActive)).map(item => item.label);
                  })
              })
            }.visibility(this.labelList.length > 0 ? Visibility.Visible : Visibility.None)
            .margin({
              top: 24
            })
            .padding({
              left: 16,
              right: 16
            })

            Row() {
              TextArea({
                placeholder: this.commentTextBoxVO?.tip ?? '',
                controller: this.textAreaController,
              })
                .onChange((text) => {
                  this.content = text;
                })
                .onSubmit(() => {
                })
                .borderRadius(6)
                .height(150)
                .padding(16)
                .enterKeyType(EnterKeyType.NEW_LINE)
                .lineHeight(18)
                .placeholderColor($r('app.color.fontGy3'))
                .placeholderFont({
                  size: 12
                })
                .caretColor($r('app.color.brand_500'))
                .backgroundColor($r('app.color.gray1'))
                .fontSize(12)
                .fontColor($r('app.color.fontGy1'))
                .layoutWeight(1)
            }.margin({
              top: 24,
            }).padding({
              left: 16,
              right: 16
            })
            .visibility(this.showAdviseInput ? Visibility.Visible : Visibility.None)
          }
        }.scrollBar(BarState.Off)
      }.height(this.autoHeight)

      Button('确认提交')
        .fontSize(16)
        .fontWeight(FontWeight.Normal)
        .backgroundColor(this.isDisabled ? $r('app.color.brand_200') : $r('app.color.brand_500'))
        .width('72%')
        .height(44)
        .stateEffect(false)

        .onClick(() => {
          if (this.isDisabled) {
            return;
          }
          this.submitEvaluate();
        })
        .margin({ top: 44 })
    }
    .backgroundColor(Color.White)
    .borderRadius({
      topLeft: 10,
      topRight: 10
    })
    .padding({
      top: 24,
      bottom: getNaviIndicatorHeightVP()
    })
    .margin({
      bottom: this.keyHeight,
    })
  }
}

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

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

相关文章

idea 如何使用deepseek 保姆级教程

1.安装idea插件codegpt 2.注册deepseek并生成apikey deepseek 开发平台&#xff1a; DeepSeek​​​​​​​ 3.在idea进行codegpt配置 打开idea的File->Settings->Tools->CodeGPT->Providers->Custom OpenAI Chat Completions的URL填写 https://api.deepseek…

响应式编程库(三) -r2dbc

r2dbc整合 什么是r2dbc版本选择简单试用整合springbootDatabaseClient 进行查询使用Repository接口(对应mapper)实体类复杂查询&#xff08;一对一&#xff09;实体类转换器测试代码一对多关系 什么是r2dbc 反应式关系数据库连接&#xff08;R2DBC&#xff09;项目为关系数据库…

第26场蓝桥入门赛

5.扑克较量【算法赛】 - 蓝桥云课 C&#xff1a; #include <iostream> #include <algorithm> using namespace std;int a[100005];int main() {int n,k;cin>>n>>k;for (int i1; i<n; i)cin>>a[i], a[i] % k;sort(a1, a1n);int mx a[1]k-a…

封装descriptions组件,描述,灵活

效果 1、组件1&#xff0c;dade-descriptions.vue <template><table><tbody><slot></slot></tbody> </table> </template><script> </script><style scoped>table {width: 100%;border-collapse: coll…

【专题】2025年我国机器人产业发展形势展望:人形机器人量产及商业化关键挑战报告汇总PDF洞察(附原数据表)

原文链接&#xff1a;https://tecdat.cn/?p39668 机器人已广泛融入我们生活的方方面面。在工业领域&#xff0c;它们宛如不知疲倦的工匠&#xff0c;精准地完成打磨、焊接等精细工作&#xff0c;极大提升了生产效率和产品质量&#xff1b;在日常生活里&#xff0c;它们是贴心…

能够从优秀工控app中学到什么?

美的工控类APP设计在多个方面都有值得学习的地方&#xff0c;包括用户体验、视觉设计、功能布局等&#xff0c;以下是具体内容&#xff1a; 用户体验方面 精准的用户需求洞察&#xff1a;工控类APP的目标用户通常是专业的工程师、技术人员等&#xff0c;其设计会深入了解这些…

334递增的三元子序列贪心算法(思路解析+源码)

文章目录 题目思路解析源码总结题目 思路解析 有两种解法:解法一:动态规划(利用dp找到数组最长递增序列长度,判断是否大于3即可)本题不适用,因为时间复杂度为O(n^2),超时。 解法二:贪心算法:解法如上图,题目要求长度为三,设置第一个元素为长度1的值,是指长度二的…

深入探究 C++17 std::is_invocable

文章目录 一、引言二、std::is_invocable 概述代码示例输出结果 三、std::is_invocable 的工作原理简化实现示例 四、std::is_invocable 的相关变体1. std::is_invocable_r2. std::is_nothrow_invocable 和 std::is_nothrow_invocable_r 五、使用场景1. 模板元编程2. 泛型算法 …

P1049 装箱问题(dp)

#include<bits/stdc.h> using namespace std;int main() {int v,n;cin>>v>>n;int a[30];int dp[20005];for(int i0;i<n;i){cin>>a[i];}memset(dp,0,sizeof(dp));// 设置所有元素为0&#xff0c;表示最大体积为0for(int i0;i<n;i){for(int jv;j&…

Groovy基础

引言&#xff1a; Groovy 是一种基于 Java 平台的动态编程语言&#xff08;指在运行时进行类型检查的语言。在使用动态语言编写程序时&#xff0c;变量的类型不需要在声明时明确指定&#xff0c;而是在运行时根据赋给变量的值来确定类型。动态语言在代码执行过程中会进行类型检…

Flink CDC YAML:面向数据集成的 API 设计

摘要&#xff1a;本文整理自阿里云智能集团 、Flink PMC Member & Committer 徐榜江&#xff08;雪尽&#xff09;老师在 Flink Forward Asia 2024 数据集成&#xff08;一&#xff09;专场中的分享。主要分为以下四个方面&#xff1a; Flink CDC YAML API Transform A…

OpenCV:视频背景减除

目录 简述 1. MOG &#x1f537;1.1 主要特点 &#x1f537;1.2 代码示例 &#x1f537;1.3 运行效果 2. MOG2 &#x1f537;2.1 主要特点 &#x1f537;2.2 代码示例 &#x1f537;2.3 运行效果 3. KNN 4. GMG 5. CNT 6. LSBP 7. 如何选择适合的接口&#xff…

PAT乙级( 1009 说反话 1010 一元多项式求导)C语言版本超详细解析

1009 说反话 给定一句英语&#xff0c;要求你编写程序&#xff0c;将句中所有单词的顺序颠倒输出。 输入格式&#xff1a; 测试输入包含一个测试用例&#xff0c;在一行内给出总长度不超过 80的字符串。字符串由若干单词和若干空格组成&#xff0c;其中单词是由英文字母&#x…

OpenCV2D 特征框架 (19)目标检测类cv::CascadeClassifier的使用

操作系统&#xff1a;ubuntu22.04 OpenCV版本&#xff1a;OpenCV4.9 IDE:Visual Studio Code 编程语言&#xff1a;C11 算法描述 cv::CascadeClassifier 是 OpenCV 中用于对象检测的一个核心类&#xff0c;特别适用于基于 Haar 特征和 LBP&#xff08;局部二进制模式&#xf…

大数据学习之SparkSql

95.SPARKSQL_简介 网址&#xff1a; https://spark.apache.org/sql/ Spark SQL 是 Spark 的一个模块&#xff0c;用于处理 结构化的数据 。 SparkSQL 特点 1 易整合 无缝的整合了 SQL 查询和 Spark 编程&#xff0c;随时用 SQL 或 DataFrame API 处理结构化数据。并且支…

RabbitMQ 从入门到精通:从工作模式到集群部署实战(四)

#作者&#xff1a;闫乾苓 系列前几篇&#xff1a; 《RabbitMQ 从入门到精通&#xff1a;从工作模式到集群部署实战&#xff08;一&#xff09;》&#xff1a;link 《RabbitMQ 从入门到精通&#xff1a;从工作模式到集群部署实战&#xff08;二&#xff09;》&#xff1a; lin…

ip地址是手机号地址还是手机地址

在数字化生活的浪潮中&#xff0c;IP地址、手机号和手机地址这三个概念如影随形&#xff0c;它们各自承载着网络世界的独特功能&#xff0c;却又因名称和功能的相似性而时常被混淆。尤其是“IP地址”这一术语&#xff0c;经常被错误地与手机号地址或手机地址划上等号。本文旨在…

Django开发入门 – 0.Django基本介绍

Django开发入门 – 0.Django基本介绍 A Brief Introduction to django By JacksonML 1. Django简介 1) 什么是Django? 依据其官网的一段解释&#xff1a; Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. …

深度解析DeepSeek模型系列:从轻量级到超大规模(附DeepSeek硬件配置清单)

在人工智能领域&#xff0c;深度学习模型的选择对于任务的执行效率和精度至关重要。DeepSeek模型系列提供了多种不同参数量的版本&#xff0c;以满足不同场景下的需求。本文将详细解析DeepSeek模型系列的特点、适用场景以及硬件需求。 DeepSeek模型系列概览 DeepSeek模型系列…

树和二叉树_7

树和二叉树_7 一、leetcode-102二、题解1.引库2.代码 一、leetcode-102 二叉树的层序遍历 给你二叉树的根节点 root &#xff0c;返回其节点值的 层序遍历 。 &#xff08;即逐层地&#xff0c;从左到右访问所有节点&#xff09;。 样例输入&#xff1a;root [3,9,20,null,nu…