鴻蒙NEXT項目實戰-百得知識庫03

代碼倉地址,大家記得點個star

IbestKnowTeach: 百得知識庫基于鴻蒙NEXT穩定版實現的一款企業級開發項目案例。 本案例涉及到多個鴻蒙相關技術知識點: 1、布局 2、配置文件 3、組件的封裝和使用 4、路由的使用 5、請求響應攔截器的封裝 6、位置服務 7、三方庫的使用和封裝 8、頭像上傳 9、應用軟件更新等https://gitee.com/xt1314520/IbestKnowTeach

Home頁面開發

設計圖

需求分析

Home頁面一共可以分為三塊部分

1、頭部-最新、熱門

2、搜索框

3、內容主體

搭建Home頁面布局

1、頭部-最新、熱門

最新、熱門可以用Text文本組件,下面下劃線用Divider組件

// 標題欄
Row({ space: 10 }) {Column() {Text($r('app.string.article_best_new')).textStyles()// 選中標題會出現下劃線if (this.newDividerShow) {Divider().dividerStyles()}}.onClick(() => {// 展示下劃線this.hotDividerShow = falsethis.newDividerShow = true// 查詢最新文章數據this.isShow = falsethis.page = 1this.getArticleNewDataList(true, true)})Column() {Text($r('app.string.article_best_hot')).textStyles()// 選中標題會出現下劃線if (this.hotDividerShow) {Divider().dividerStyles()}}.onClick(() => {this.newDividerShow = falsethis.hotDividerShow = true// 查詢最熱門文章數據this.isShow = falsethis.page = 1this.getArticleHotDataList(true, true)})}.justifyContent(FlexAlign.Start).margin({ top: 10, bottom: 20 }).width(CommonConstant.WIDTH_FULL)

2、搜索框

搜索框可以使用鴻蒙原生組件Search

// 搜索
Search({ placeholder: '請輸入關鍵字', value: $$this.keyword }).placeholderFont({ size: 14 }).textFont({ size: 14 }).onSubmit(() => {// 處理標題this.title = encodeURIComponent(this.keyword)// 分頁查詢文章內容this.isShow = falsethis.page = 1this.getArticleDataList(true)}).width(CommonConstant.WIDTH_FULL).height(30)
3、內容主體

內容主體相當于我們把文章單條內容封裝成一個組件,然后使用List組件進行布局嵌套使用Foreach進行循環遍歷文章數組對象數據

整體大家看一條文章數據,分為三行,行使用的是Row布局,整體三行布局從上到下是列所以組件整體用Column進行包裹

封裝單條文章組件(在ets下面創建component目錄然后創建ArticleComponent.ets文件)

import { ArticleContentData } from '../api/ArticleContentApi.type'
import { CommonConstant } from '../contants/CommonConstant'@Componentexport struct ArticleComponent {// 文章數據@Prop articleContentData: ArticleContentDatabuild() {Column() {Row({ space: 10 }) {// 頭像Image(this.articleContentData.avatarUri).width($r('app.float.common_width_tiny')).aspectRatio(1).borderRadius(10)// 姓名Text(this.articleContentData.nickname).fontSize($r('app.float.common_font_size_medium')).fontColor($r('app.color.common_gray')).width('70%').maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })}.width(CommonConstant.WIDTH_FULL)Row() {// 內容標題Text(this.articleContentData.title).fontSize($r('app.float.common_font_size_small')).width('80%').maxLines(3).textOverflow({ overflow: TextOverflow.Ellipsis })Image(this.articleContentData.coverUrl).width($r('app.float.common_width_medium')).aspectRatio(1).objectFit(ImageFit.Contain).borderRadius(5)}.width(CommonConstant.WIDTH_FULL).justifyContent(FlexAlign.SpaceBetween)// 展示閱讀、點贊、收藏Row({ space: 3 }) {Text(this.articleContentData.readCount + '閱讀').textStyles()Text('|').textStyles()Text(this.articleContentData.time).textStyles()Text('|').textStyles()// 文章內容標簽if (this.articleContentData.contentCategory === '1') {Text('鴻蒙').textLabelStyles()} else if (this.articleContentData.contentCategory === '2') {Text('Java').textLabelStyles()} else if (this.articleContentData.contentCategory === '3') {Text('Web前端').textLabelStyles()} else if (this.articleContentData.contentCategory === '4') {Text('運維').textLabelStyles()} else {Text('未知級別').textLabelStyles()}Text('|').textStyles()// 文章難度分類標簽if (this.articleContentData.difficultyCategory === '1') {Text(this.articleContentData.platformCategory === '1' ? '基礎知識' : '簡單面試題').textLabelStyles()} else if (this.articleContentData.difficultyCategory === '2') {Text(this.articleContentData.platformCategory === '1' ? '進階知識' : '中等面試題').textLabelStyles()} else if (this.articleContentData.difficultyCategory === '3') {Text(this.articleContentData.platformCategory === '1' ? '高級知識' : '困難面試題').textLabelStyles()} else {Text('未知級別').textLabelStyles()}}.width(CommonConstant.WIDTH_FULL)}.padding(10).width(CommonConstant.WIDTH_FULL).height(110).margin({ top: 13 }).backgroundColor($r('app.color.common_white')).justifyContent(FlexAlign.SpaceBetween).borderRadius(10)}
}@Extend(Text)
function textStyles() {.fontColor($r('app.color.common_gray')).fontSize($r('app.float.common_font_size_tiny'))
}@Extend(Text)
function textLabelStyles() {.fontSize($r('app.float.common_font_size_tiny')).fontColor(Color.Black)
}

然后我們整體在Home頁面里面展示我們的文章內容數組數據

if (this.isShow) {Refresh({ refreshing: $$this.isRefreshing }) {// 內容組件List() {ForEach(this.articleContentList, (item: ArticleContentData) => {ListItem() {ArticleComponent({ articleContentData: item }).onClick(() => {// 路由到內容詳情頁router.pushUrl({url: RouterConstant.VIEWS_HOME_ARTICLE_INFO, params: {"articleId": item.id}})})}})if (this.textShow) {ListItem() {Text($r('app.string.no_have_article')).fontColor($r('app.color.common_gray')).fontSize($r('app.float.common_font_size_small')).width(CommonConstant.WIDTH_FULL).textAlign(TextAlign.Center).margin({ top: 80 })}}}.width(CommonConstant.WIDTH_FULL).height(CommonConstant.HEIGHT_FULL).scrollBar(BarState.Off).onReachEnd(() => {if (!this.isLoad) {if (this.total > this.page * this.pageSize) {this.isLoad = truethis.page++if (this.newDividerShow) {// 分頁查詢最新文章數據this.getArticleNewDataList(false, false)}if (this.hotDividerShow) {// 分頁查詢最熱門文章數據this.getArticleHotDataList(false, false)}} else {this.textShow = true}}})}.onRefreshing(() => {if (!this.isLoad) {this.isLoad = truethis.textShow = false// 頁面恢復到1this.page = 1if (this.newDividerShow) {// 分頁查詢最新文章數據this.getArticleNewDataList(true, true)}if (this.hotDividerShow) {// 分頁查詢最熱門文章數據this.getArticleHotDataList(true, true)}}})
} else {// 加載組件LoadingComponent()
}

加載組件 LoadingComponent()是我們自己進行封裝的,因為我們的數據可能因為網絡原因還沒在服務端查詢出來,界面為了不要展示長時間空白讓用戶誤會,所以展示我們數據正在加載中

import { CommonConstant } from '../contants/CommonConstant'@Componentexport struct LoadingComponent {@State message: string = '數據正在加載中'build() {Row() {LoadingProgress().width(30).height(30).color(Color.Gray)Text(this.message).fontSize((14)).fontColor(Color.Gray)}.height("80%").width(CommonConstant.WIDTH_FULL).justifyContent(FlexAlign.Center)}}
4、整體Home頁面代碼

import { router } from '@kit.ArkUI'
import { RouterConstant } from '../../contants/RouterConstant'
import { CommonConstant } from '../../contants/CommonConstant'
import { ArticleComponent } from '../../components/ArticleComponent'
import articleContentApi from '../../api/ArticleContentApi'
import { LoadingComponent } from '../../components/LoadingComponent'
import { ArticleContentData } from '../../api/ArticleContentApi.type'
import { showToast } from '../../utils/Toast'@Entry@Componentexport struct Home {// 是否展示最新標題的下劃線@State newDividerShow: boolean = true// 是否展示熱門標題的下劃線@State hotDividerShow: boolean = false// 搜索詞@State keyword: string = ''// 標題@State title: string = ''// 文章數據數組@State articleContentList: ArticleContentData[] = []// 學習打卡總記錄數@State total: number = 0// 當前頁@State page: number = 1// 每一頁大小@State pageSize: number = 7// 控制當前頁面展示@State isShow: boolean = false// 定義一個狀態屬性,用來和Refresh組件進行雙向數據綁定@State isRefreshing: boolean = false// 節流, false表示未請求, true表示正在請求isLoad: boolean = false// 是否展示文本,列表到底@State textShow: boolean = false/*** 生命周期函數*/async aboutToAppear() {// 默認獲取首頁最新文章內容this.getArticleNewDataList(true, false)}/*** 分頁查詢最新文章數據*/async getArticleNewDataList(isFlushed: boolean, isUpdate: boolean) {// 分頁查詢最新文章數據const articleDataList =await articleContentApi.getNewArticle({ page: this.page, pageSize: this.pageSize, title: this.title })isFlushed ? this.articleContentList = articleDataList.records :this.articleContentList.push(...articleDataList.records)this.total = articleDataList.total// 判斷總數據if (this.total > this.page * this.pageSize) {this.textShow = false} else {this.textShow = true}// 頁面展示this.isShow = true// 節流,防止用戶重復下拉this.isLoad = falsethis.isRefreshing = false// 是否刷新if (isUpdate) {showToast("已更新")}}/*** 分頁查詢最熱門文章數據*/async getArticleHotDataList(isFlushed: boolean, isUpdate: boolean) {// 分頁查詢最熱門文章數據const articleDataList =await articleContentApi.getHotArticle({ page: this.page, pageSize: this.pageSize, title: this.title })isFlushed ? this.articleContentList = articleDataList.records :this.articleContentList.push(...articleDataList.records)this.total = articleDataList.total// 判斷總數據if (this.total > this.page * this.pageSize) {this.textShow = false} else {this.textShow = true}// 頁面展示this.isShow = true// 節流,防止用戶重復下拉this.isLoad = falsethis.isRefreshing = false// 是否刷新if (isUpdate) {showToast("已更新")}}/*** 分頁查詢文章數據*/async getArticleDataList(isFlushed: boolean) {// 分頁查詢文章數據if (this.newDividerShow) {this.getArticleNewDataList(isFlushed, true)}if (this.hotDividerShow) {this.getArticleHotDataList(isFlushed, true)}}build() {Column() {// 標題欄Row({ space: 10 }) {Column() {Text($r('app.string.article_best_new')).textStyles()// 選中標題會出現下劃線if (this.newDividerShow) {Divider().dividerStyles()}}.onClick(() => {// 展示下劃線this.hotDividerShow = falsethis.newDividerShow = true// 查詢最新文章數據this.isShow = falsethis.page = 1this.getArticleNewDataList(true, true)})Column() {Text($r('app.string.article_best_hot')).textStyles()// 選中標題會出現下劃線if (this.hotDividerShow) {Divider().dividerStyles()}}.onClick(() => {this.newDividerShow = falsethis.hotDividerShow = true// 查詢最熱門文章數據this.isShow = falsethis.page = 1this.getArticleHotDataList(true, true)})}.justifyContent(FlexAlign.Start).margin({ top: 10, bottom: 20 }).width(CommonConstant.WIDTH_FULL)// 搜索Search({ placeholder: '請輸入關鍵字', value: $$this.keyword }).placeholderFont({ size: 14 }).textFont({ size: 14 }).onSubmit(() => {// 處理標題this.title = encodeURIComponent(this.keyword)// 分頁查詢文章內容this.isShow = falsethis.page = 1this.getArticleDataList(true)}).width(CommonConstant.WIDTH_FULL).height(30)if (this.isShow) {Refresh({ refreshing: $$this.isRefreshing }) {// 內容組件List() {ForEach(this.articleContentList, (item: ArticleContentData) => {ListItem() {ArticleComponent({ articleContentData: item }).onClick(() => {// 路由到內容詳情頁router.pushUrl({url: RouterConstant.VIEWS_HOME_ARTICLE_INFO, params: {"articleId": item.id}})})}})if (this.textShow) {ListItem() {Text($r('app.string.no_have_article')).fontColor($r('app.color.common_gray')).fontSize($r('app.float.common_font_size_small')).width(CommonConstant.WIDTH_FULL).textAlign(TextAlign.Center).margin({ top: 80 })}}}.width(CommonConstant.WIDTH_FULL).height(CommonConstant.HEIGHT_FULL).scrollBar(BarState.Off).onReachEnd(() => {if (!this.isLoad) {if (this.total > this.page * this.pageSize) {this.isLoad = truethis.page++if (this.newDividerShow) {// 分頁查詢最新文章數據this.getArticleNewDataList(false, false)}if (this.hotDividerShow) {// 分頁查詢最熱門文章數據this.getArticleHotDataList(false, false)}} else {this.textShow = true}}})}.onRefreshing(() => {if (!this.isLoad) {this.isLoad = truethis.textShow = false// 頁面恢復到1this.page = 1if (this.newDividerShow) {// 分頁查詢最新文章數據this.getArticleNewDataList(true, true)}if (this.hotDividerShow) {// 分頁查詢最熱門文章數據this.getArticleHotDataList(true, true)}}})} else {// 加載組件LoadingComponent()}}.padding($r('app.float.common_padding')).height(CommonConstant.HEIGHT_FULL).width(CommonConstant.WIDTH_FULL)}
}@Extend(Text)
function textStyles() {.fontSize($r('app.float.common_font_size_huge')).fontWeight(FontWeight.Medium)
}@Extend(Divider)
function dividerStyles() {.color(Color.Black).width($r('app.float.common_width_tiny')).strokeWidth(3)
}

5、數據渲染,接口封裝

查詢最新文章數據,這個函數里面有個 articleContentApi.getNewArticle方法,這個方法是作者封裝的接口

/*** 分頁查詢最新文章數據*/
async getArticleNewDataList(isFlushed: boolean, isUpdate: boolean) {// 分頁查詢最新文章數據const articleDataList =await articleContentApi.getNewArticle({ page: this.page, pageSize: this.pageSize, title: this.title })isFlushed ? this.articleContentList = articleDataList.records :this.articleContentList.push(...articleDataList.records)this.total = articleDataList.total// 判斷總數據if (this.total > this.page * this.pageSize) {this.textShow = false} else {this.textShow = true}// 頁面展示this.isShow = true// 節流,防止用戶重復下拉this.isLoad = falsethis.isRefreshing = false// 是否刷新if (isUpdate) {showToast("已更新")}
}

大家可以根據東林提供的接口文檔,將我們的調用接口封裝成方法

這是涉及到文章的所有接口

import http from '../request/Request'
import {ArticleContentData,ArticleContentHotPageParam,ArticleContentNewPageParam,ArticleContentPageParam,PageVo
} from './ArticleContentApi.type'/*** 文章接口*/
class ArticleContentApi {/*** 分頁查詢文章內容*/pageListArticleContent = (data: ArticleContentPageParam): Promise<PageVo<ArticleContentData>> => {return http.get('/v1/article/page?page=' + data.page + '&&pageSize=' + data.pageSize + '&&title=' + data.title +'&&contentCategory=' + data.contentCategory + '&&platformCategory=' + data.platformCategory +'&&difficultyCategory=' + data.difficultyCategory)}/*** 根據文章id查詢文章詳情*/getArticleContentInfo = (data: number): Promise<ArticleContentData> => {return http.get('/v1/article/info?id=' + data)}/***  用戶點贊/取消點贊文章*/likeArticleContent = (data: number) => {return http.put('/v1/article/like?id=' + data)}/***  用戶收藏/取消收藏文章*/collectArticleContent = (data: number) => {return http.put('/v1/article/collect?id=' + data)}/*** 查看我的點贊,最近100條*/getUserLike = (): Promise<Array<ArticleContentData>> => {return http.get('/v1/article/myLike')}/***查看我的收藏,最近100條*/getUserCollect = (): Promise<Array<ArticleContentData>> => {return http.get('/v1/article/myCollect')}/***分頁查看最新文章*/getNewArticle = (data: ArticleContentNewPageParam): Promise<PageVo<ArticleContentData>> => {return http.get('/v1/article/new?page=' + data.page + '&&pageSize=' + data.pageSize + '&&title=' + data.title)}/***分頁查看最熱文章*/getHotArticle = (data: ArticleContentHotPageParam): Promise<PageVo<ArticleContentData>> => {return http.get('/v1/article/hot?page=' + data.page + '&&pageSize=' + data.pageSize + '&&title=' + data.title)}
}const articleContentApi = new ArticleContentApi();export default articleContentApi as ArticleContentApi;
/*** 時間*/
export interface BaseTime {/*** 創建時間*/createTime?: Date/*** 更新時間*/updateTime?: Date
}/*** 分頁參數*/
export interface PageParam {/*** 當前頁*/page?: number/*** 每一頁展示的數據條數*/pageSize?: number
}/*** 分頁響應參數*/
export interface PageVo<T> {current: number,size: number,total: number,records: Array<T>
}/*** 分頁查詢文章內容*/
export interface ArticleContentPageParam extends PageParam {/*** 標題*/title?: string/*** 內容分類:1鴻蒙 2 Java 3 web 4 運維*/contentCategory?: string/*** 平臺分類:1學習平臺 2面試題*/platformCategory?: string/*** 難度分類:1 簡單 2 中等 3 困難*/difficultyCategory?: string
}/*** 分頁查詢最新文章內容入參*/
export interface ArticleContentNewPageParam extends PageParam {/*** 標題*/title: string}/*** 分頁查詢最熱文章內容入參*/
export interface ArticleContentHotPageParam extends PageParam {/*** 標題*/title: string}/*** 文章內容數據*/
export interface ArticleContentData extends BaseTime {/*** 文章id*/id: number/*** 用戶頭像*/avatarUri: string/*** 用戶昵稱*/nickname: string/*** 文章標題*/title: string/*** 文章內容*/content: string/*** 閱讀數*/readCount: number/*** 點贊數*/likeCount: number/*** 收藏數*/collectCount: number/*** 封面url*/coverUrl: string/*** 內容分類:1鴻蒙 2 Java 3 web 4 運維*/contentCategory: string/*** 平臺分類:1學習平臺 2面試題*/platformCategory: string/*** 難度分類:1 簡單 2 中等 3 困難*/difficultyCategory: string/*** 用戶是否點贊*/isLike: boolean/*** 用戶是否收藏*/isCollect: boolean/*** 創建時間字符串格式*/time: string
}

文章詳情界面布局

當我們點擊文章的話會跳轉到文章詳情頁面,攜帶當前點擊的文章id

這邊路由我們使用的是router.push()

1、新建文章詳情頁面

在ets/views/Home下面新建ArticleInfo.ets文件

2、設計圖

3、需求分析

整個文章詳情頁面呈現的是使用Column布局的,里面分為多行,其他最上面標題我們可以使用Navigation組件做,鴻蒙官方推薦的,下面的文章內容按理說是渲染的html格式(富文本)的,所以我們使用RichText組件,還有點贊和收藏按理說有兩種狀態(未點贊、點贊,未收藏、收藏),整體文章數據也是根據路由跳轉傳過來的文章id進行查詢的文章數據。

4、封裝富文本組件

在components目錄下面新建LearnRichText.ets文件

@Componentexport struct LearnRichText {// 富文本@Prop richTextContent: string = ""build() {Scroll() {RichText(`<html><body><div style="font-size:54px">${this.richTextContent}</div><body></html>`)}.layoutWeight(1)}}

5、整體代碼
import { ArticleContentData } from '../../api/ArticleContentApi.type';
import { ArticleExtraInfoComponent } from '../../components/ArticleExtraInfoComponent'
import { LearnRichText } from '../../components/LearnRichText';
import { LoadingComponent } from '../../components/LoadingComponent';
import { CommonConstant } from '../../contants/CommonConstant'
import { router } from '@kit.ArkUI';
import articleContentApi from '../../api/ArticleContentApi';
import { showToast } from '../../utils/Toast';@Entry@Componentstruct ArticleInfo {// 文章數據數組@Prop articleInfo: ArticleContentData// 控制當前頁面展示@State isShow: boolean = false// 文章id@State articleId: number = 1// 節流,防止用戶重復點擊isLoad: boolean = false/*** 生命周期函數*/async aboutToAppear() {// 獲取路由傳遞的文章idconst param = router.getParams() as objectif (param) {this.articleId = param["articleId"] as number// 根據文章id查詢文章數據this.articleInfo = await articleContentApi.getArticleContentInfo(this.articleId)// 展示數據this.isShow = true}}/*** 點贊* @param id*/async likeArticle(id: number) {// 點贊或者取消點贊if (this.articleInfo.isLike) {// 取消點贊await articleContentApi.likeArticleContent(id)this.articleInfo.isLike = falsethis.articleInfo.likeCount--this.isLoad = falseshowToast('取消點贊成功')} else {// 點贊await articleContentApi.likeArticleContent(id)this.articleInfo.isLike = truethis.articleInfo.likeCount++this.isLoad = falseshowToast('點贊成功')}}/*** 收藏* @param id*/async collectArticle(id: number) {// 收藏或者取消收藏if (this.articleInfo.isCollect) {// 取消收藏await articleContentApi.collectArticleContent(id)this.articleInfo.isCollect = falsethis.articleInfo.collectCount--this.isLoad = falseshowToast('取消收藏成功')} else {// 收藏await articleContentApi.collectArticleContent(id)this.articleInfo.isCollect = truethis.articleInfo.collectCount++this.isLoad = falseshowToast('收藏成功')}}build() {Navigation() {if (this.isShow) {Column({ space: 15 }) {Flex() {Text(this.articleInfo.title).fontSize($r('app.float.common_font_size_medium')).maxLines(3).textOverflow({ overflow: TextOverflow.Ellipsis }).fontColor(Color.Black).fontWeight(FontWeight.Medium)}Row({ space: 10 }) {// 頭像Image(this.articleInfo.avatarUri).width(30).aspectRatio(1).borderRadius(20)// 昵稱Text(this.articleInfo.nickname).fontSize($r('app.float.common_font_size_medium')).width('80%').maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })}.width(CommonConstant.WIDTH_FULL)// 展示閱讀、點贊、收藏數Row() {// 文章額外信息組件ArticleExtraInfoComponent({ articleInfo: this.articleInfo })Row({ space: 15 }) {// 點贊Image(this.articleInfo.isLike ? $r('app.media.icon_like_selected') : $r('app.media.icon_like_default')).width(15).onClick(() => {// 點贊if (!this.isLoad) {this.isLoad = truethis.likeArticle(this.articleInfo.id)}})// 收藏Image(this.articleInfo.isCollect ? $r('app.media.icon_collect_selected') :$r('app.media.icon_collect_default')).width(15).onClick(() => {// 收藏if (!this.isLoad) {this.isLoad = truethis.collectArticle(this.articleInfo.id)}})}}.width(CommonConstant.WIDTH_FULL).justifyContent(FlexAlign.SpaceBetween)}.padding($r('app.float.common_padding'))// 分割線Divider().strokeWidth((4)).color('#e6f2fe')// 內容正文LearnRichText({ richTextContent: this.articleInfo.content }).padding($r('app.float.common_padding'))} else {// 加載組件LoadingComponent()}}.height(CommonConstant.HEIGHT_FULL).width(CommonConstant.WIDTH_FULL).title($r('app.string.article_info_title')).titleMode(NavigationTitleMode.Mini).mode(NavigationMode.Stack).expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])}
}
6、注意事項

當前系統除了登錄、分頁查詢文章等部分接口,其他接口功能都是需要登錄之后才可以使用的,這就是系統的權限控制,當前查詢文章詳情、收藏、點贊功能是需要登錄得,未登錄狀態下使用是報錯的。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/74002.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/74002.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/74002.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Adobe PR和AE2025到啟動頁面一會自動退出

Adobe PR和AE2025到啟動頁面一會自動退出 1查找程序啟動錯誤日志2解決方法3思考共勉 1查找程序啟動錯誤日志 查找程序啟動錯誤日志&#xff1a;事件查看器>Windows日志>應用程序 錯誤應用程序名稱: Adobe Premiere Pro.exe&#xff0c;版本: 25.1.0.73&#xff0c;時間…

Python Pyecharts面試題及參考答案

目錄 使用隨機數據繪制對比某品牌各季度銷量與庫存的柱狀圖,添加副標題和自定義顏色 繪制雙 Y 軸柱狀圖,展示城市人均收入和支出數據,并設置軸標簽旋轉 45 度 實現水平柱狀圖,展示不同編程語言的受歡迎指數,添加數據標簽 繪制動態溫度變化折線圖,包含平滑曲線和標記點…

【css酷炫效果】純CSS實現進度條加載動畫

【css酷炫效果】純CSS實現進度條加載動畫 緣創作背景html結構css樣式完整代碼基礎版進階版 效果圖 通過CSS漸變與背景位移動畫&#xff0c;無需JavaScript即可創建流體動態進度條。 想直接拿走的老板&#xff0c;鏈接放在這里&#xff1a;https://download.csdn.net/download/u…

安全地自動重新啟動 Windows 資源管理器Bat腳本

安全地自動重新啟動 Windows 資源管理器腳本 可以直接運行的 Windows 批處理腳本&#xff0c;用于安全地自動重新啟動 Windows 資源管理器。該腳本會在殺死資源管理器之前檢查是否有其他進程正在使用資源管理器相關的文件。 Bat腳本 echo off title 資源管理器安全重啟工具 co…

【NeurIPS-2022】CodeFormer: 將人臉復原轉化為碼本預測以減少LQ-HQ映射的不確定性

寫在前面&#xff1a;本博客僅作記錄學習之用&#xff0c;部分圖片來自網絡&#xff0c;如需引用請注明出處&#xff0c;同時如有侵犯您的權益&#xff0c;請聯系刪除&#xff01; 文章目錄 前言論文動機方法實驗 總結互動致謝參考往期回顧 前言 盲人臉恢復是一個高度不適定的…

k8s1.30 部署calio網絡

一、介紹 網路組件有很多種&#xff0c;只需要部署其中一個&#xff0c;推薦calio。 calio是一個純三成的數據中心網絡方案&#xff0c;calico支持廣泛的平臺。如k8s&#xff0c;openstack等。 calio在每一個計算節點利用linux內核&#xff0c;實現了一個高效的虛擬路由器來…

提升AI性能的秘密武器:量化、蒸餾與剪枝全面解析

通過高效的模型壓縮技術推進 NLP 在快速發展的自然語言處理 (NLP) 領域,模型的大小和復雜性顯著增加,從而顯著提高了性能。然而,這些龐大模型的部署和維護也帶來了挑戰,特別是在計算成本、功耗和資源受限用戶的可訪問性方面。本博客深入探討了量化、剪枝和蒸餾等尖端模型壓…

數據結構(python)-------棧和隊列2

目錄 二、隊列 &#xff08;一&#xff09;、定義 1. 定義 2. 邏輯結構 3. 存儲結構 4. 運算規則 5. 實現方式 &#xff08;二&#xff09;、隊列與一般線性表的區別 一般線性表 隊列 &#xff08;三&#xff09;、分類 …

基于SpringBoot的“校園招聘網站”的設計與實現(源碼+數據庫+文檔+PPT)

基于SpringBoot的“校園招聘網站”的設計與實現&#xff08;源碼數據庫文檔PPT) 開發語言&#xff1a;Java 數據庫&#xff1a;MySQL 技術&#xff1a;SpringBoot 工具&#xff1a;IDEA/Ecilpse、Navicat、Maven 系統展示 系統整體功能圖 局部E-R圖 系統首頁界面 系統注冊…

投資日記_道氏理論技術分析

主要用于我自己參考&#xff0c;我感覺我做事情的時候容易上頭&#xff0c;忘掉很多事情。 技術分析有很多方法&#xff0c;但是我個人相信并實踐的還是以道氏理論為根本的方法。方法千千萬萬只有適合自己價值觀&#xff0c;習慣&#xff0c;情緒&#xff0c;性格的方法才是好的…

ceph運維硬件規劃技巧

在規劃Ceph集群的硬件配置時&#xff0c;需要綜合考慮性能、成本、冗余、可擴展性以及特殊場景需求等因素。以下是關于Ceph硬件規劃的關鍵技巧和建議&#xff0c;涵蓋存儲設備、網絡、服務器配置、容量規劃、冗余策略等多個方面&#xff1a; 1. 硬件選型建議 存儲設備 存儲節點…

Windows主機、虛擬機Ubuntu、開發板,三者之間文件互傳

以下內容源于日常學習的整理&#xff0c;歡迎交流。 下圖是Windows主機、虛擬機Ubuntu、開發者三者之間文件互傳的方式示意圖&#xff1a; 注意&#xff0c;下面談及的所有方式&#xff0c;都要求兩者的IP地址處于同一網段&#xff0c;涉及到的軟件資源見felm。 一、Windows主…

Softmax溫度調節與注意力縮放:深度神經網絡中的平滑藝術

Softmax溫度調節與注意力縮放&#xff1a;深度神經網絡中的平滑藝術 在深度學習的精密機械中&#xff0c;有些細微的調整機制往往被視為理所當然&#xff0c;卻實際上蘊含著深刻的數學洞察和巧妙的工程智慧。今天&#xff0c;我們將探討兩個看似獨立卻本質相通的機制&#xff…

RIP路由欺騙攻擊與防御實驗詳解

一、基礎網絡配置 1. 路由器R1配置 interface GigabitEthernet0/0/0ip address 192.1.2.254 255.255.255.0 ! interface GigabitEthernet0/0/1ip address 192.1.3.254 255.255.255.0 ! router rip 1version 2network 192.1.2.0network 192.1.3.0 2. 路由器R2配置 interface…

阿里云平臺Vue項目打包發布

目錄&#xff1a; 1、vue項目打包2、通過ngixn發布vue的打包文件 1、vue項目打包 在你的vue項目下執行npm run build命令進行打包。 2、通過ngixn發布vue的打包文件 直接將打包的dist文件拷貝到nginx目錄下即可。 修改nginx.conf的配置文件的相關配置&#xff0c;如端口或者ro…

《基于Spring Boot+Vue的智慧養老系統的設計與實現》開題報告

個人主頁:@大數據蟒行探索者 一、研究背景及國內外研究現狀 1.研究背景 根據1982年老齡問題世界大會聯合國制定的標準,如果一個國家中超過65歲的老人占全國總人口的7%以上,或者超過60歲的老人占全國總人口的10%以上,那么這個國家將被定義為“老齡化社會”[1]。 隨著國…

SpringCache @Cacheable 在同一個類中調用方法,導致緩存不生效的問題及解決辦法

由于項目需要使用SpringCache來做一點緩存&#xff0c;但自己之前沒有使用過&#xff08;其實是沒有聽過&#xff09;SpringCache&#xff0c;于是&#xff0c;必須先學習之。 顯然&#xff0c;就是在同一個類中&#xff0c;MethodA 調用了 MethodB&#xff0c;那么 MethodB 上…

2025-03-20(DS復習):詳細介紹一下Databricks 的Delta Lake

Delta Lake 是 Databricks 推出的一種開源存儲層&#xff0c;它構建在現有數據湖&#xff08;如 Amazon S3、Azure Data Lake Storage、Google Cloud Storage&#xff09;之上&#xff0c;為數據湖提供了數據倉庫級別的可靠性、性能和管理功能。Delta Lake 解決了傳統數據湖的許…

在VMware上部署【Ubuntu】

鏡像下載 國內各鏡像站點均可下載Ubuntu鏡像&#xff0c;下面例舉清華網站 清華鏡像站點&#xff1a;清華大學開源軟件鏡像站 | Tsinghua Open Source Mirror 具體下載步驟如下&#xff1a; 創建虛擬機 準備&#xff1a;在其他空間大的盤中創建存儲虛擬機的目錄&#xff0c…

初入ARM,點燈,按鍵與中斷相結合

與MCU不同&#xff0c;ARM屬于功能更復雜&#xff0c;更強大的SOC&#xff0c;是可以移植操作系統的&#xff0c;但是在最開始學習arm&#xff0c;需要了解arm的運行方式&#xff0c;所以現在使用的是裸機開發。arm系統有多種工作模式&#xff0c;分別是User&#xff0c;IRQ&am…