MFC第三十天 通过CToolBar类开发文字工具栏和工具箱、GDI+边框填充以及基本图形的绘制方法、图形绘制过程的反色线模型和实色模型

文章目录

  • CControlBar
  • 通过CToolBar类开发文字工具栏和工具箱
    • CMainFrame.h
    • CApp
    • CMainFrm.cpp
    • CMainView.h
    • CMainView.cpp
    • CEllipse.h
    • CEllipse.cpp
    • CLine.h
    • CLine.cpp
    • CRRect .h
    • CRRect .cpp

CControlBar

class AFX_NOVTABLE CControlBar : public CWnd{
	DECLARE_DYNAMIC(CControlBar)

protected:		// Construction
	CControlBar();

public:			// Attributes
	int GetCount() const;
	CWnd *m_pInPlaceOwner;
	void SetInPlaceOwner(CWnd *pWnd);

	// for styles specific to CControlBar
	DWORD GetBarStyle();
	void SetBarStyle(DWORD dwStyle);
	BOOL m_bAutoDelete;
	// getting and setting border space
	void SetBorders(LPCRECT lpRect);
	void SetBorders(int cxLeft = 0, int cyTop = 0, int cxRight = 0, int cyBottom = 0);
	CRect GetBorders() const;

	CFrameWnd* GetDockingFrame() const;
	BOOL IsFloating() const;
	virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
	virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);

// Operations
	void EnableDocking(DWORD dwDockStyle);

CBRS_控制条属性

// ControlBar styles(理论上包括状态栏、工具栏等)
#define CBRS_ALIGN_LEFT     0x1000L
#define CBRS_ALIGN_TOP      0x2000L
#define CBRS_ALIGN_RIGHT    0x4000L
#define CBRS_ALIGN_BOTTOM   0x8000L
#define CBRS_ALIGN_ANY      0xF000L

#define CBRS_BORDER_LEFT    0x0100L
#define CBRS_BORDER_TOP     0x0200L
#define CBRS_BORDER_RIGHT   0x0400L
#define CBRS_BORDER_BOTTOM  0x0800L
#define CBRS_BORDER_ANY     0x0F00L
#define CBRS_TOOLTIPS       0x0010L 小字条提示(\n后半)
#define CBRS_FLYBY          0x0020L  状态栏提示的另一半文字
#define CBRS_FLOAT_MULTI    0x0040L
#define CBRS_BORDER_3D      0x0080L
#define CBRS_HIDE_INPLACE   0x0008L
#define CBRS_SIZE_DYNAMIC   0x0004L 可以拉扯工具栏变形
#define CBRS_SIZE_FIXED     0x0002L 固定形状(不可拉扯)
#define CBRS_FLOATING       0x0001L  

#define CBRS_GRIPPER        0x00400000L 掐子(去掉之后就是锁定工具栏的属性)
#define CBRS_ORIENT_HORZ    (CBRS_ALIGN_TOP|CBRS_ALIGN_BOTTOM)
#define CBRS_ORIENT_VERT    (CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT)
#define CBRS_ORIENT_ANY     (CBRS_ORIENT_HORZ|CBRS_ORIENT_VERT)
#define CBRS_ALL            0x0040FFFFL

// the CBRS_ style is made up of an alignment style and a draw border style
//  the alignment styles are mutually exclusive
//  the draw border styles may be combined
#define CBRS_NOALIGN        0x00000000L
#define CBRS_LEFT           (CBRS_ALIGN_LEFT|CBRS_BORDER_RIGHT)
#define CBRS_TOP            (CBRS_ALIGN_TOP|CBRS_BORDER_BOTTOM)
#define CBRS_RIGHT          (CBRS_ALIGN_RIGHT|CBRS_BORDER_LEFT)
#define CBRS_BOTTOM         (CBRS_ALIGN_BOTTOM|CBRS_BORDER_TOP)

通过CToolBar类开发文字工具栏和工具箱

高级工具栏的开发
a)文字工具栏开发:调用CToolBar::SetButtonText和CBoolBar::SetSizes方法;
b)工具箱创建时要指定:CBRS_SIZE_FIXED
调用CToolBar::SetButtonStyle方法,为n个按钮一行做分行属性。

#ifndef PCH_H
#define PCH_H
#include "framework.h"
#include <gdiplus.h>
//图形软件开发的关键架构  公共的基类  虚函数架构  没有实际意义 自己也不能画 也不可以自己建立对象(抽象类)无法实例化 只能由派生类来构造 也必须实现所有的抽象接口 
struct SLayer {  
	enum STAT {
		ST_DRAW = 0, //绘制状态
		ST_NORMAL, //正常状态
		ST_SELECT,	//选中状态	};
	STAT m_stat{ ST_DRAW };
	static CPoint m_last;
	virtual	void OnLButtonDown(UINT nFlags, CPoint point)=0; //形成多态
	virtual	void OnLButtonUp(UINT nFlags, CPoint point)=0;
	virtual	void OnMouseMove(UINT nFlags, CPoint point,CDC * pDC=NULL)=0;
	virtual	void OnDraw(CDC* pDC)=0;  // 重写以绘制该视图
};
#endif //PCH_H

CMainFrame.h

class CMainFrame : public CMDIFrameWnd{
	DECLARE_DYNAMIC(CMainFrame)
	void InitTools();
public:		CMainFrame() noexcept;
public:		virtual BOOL PreCreateWindow(CREATESTRUCT& cs); //重写
public:		virtual ~CMainFrame();//实现
protected:  		// 控件条嵌入成员
	CToolBar	m_toolBox;
	CToolBar    m_wndToolBar;
	CStatusBar  m_wndStatusBar;
	
protected:			// 生成的消息映射函数
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	DECLARE_MESSAGE_MAP()
};	
// pch.cpp: 与预编译标头对应的源文件
#include "pch.h"
CPoint SLayer::m_last{ MAXWORD,MAXWORD };  //鼠标移动最终的点 MAXWORD 65535超大值

CApp

在CApp初始化要对GDI+进行初始化 加载 头文件 命名空间
EnableTaskbarInteraction(FALSE);

	GdiplusStartupInput gdiplusStartupInput;
	ULONG_PTR gdiplusToken;

	GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

CMainFrm.cpp

#include "pch.h"
#include "framework.h"
#include "DrawLx.h"
#include "MainFrm.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
	ON_WM_CREATE()
END_MESSAGE_MAP()
static UINT indicators[] =
{
	ID_SEPARATOR,           // 状态行指示器
	ID_INDICATOR_CAPS,
	ID_INDICATOR_NUM,
	ID_INDICATOR_SCRL,
};

// CMainFrame 构造/析构
CMainFrame::CMainFrame() noexcept
{
}
CMainFrame::~CMainFrame()
{
}
void CMainFrame::InitTools(){
	int i = -1,nCount = m_wndToolBar.GetCount();
	LPCTSTR ts[] ={_T("新建"),_T("打开"),_T("保存"),_T(""),_T("剪切"),_T("拷贝"),_T("粘贴"),_T(""),_T("打印"),_T("帮助")	};
	while(++i<nCount)
		m_wndToolBar.SetButtonText(i,ts[i]);
	CRect rect;
	m_wndToolBar.GetItemRect(0,rect);
	m_wndToolBar.SetSizes(rect.Size(), { 16,15 });
	GetWindowRect(rect);
	//auto b = m_toolBox.IsFloating();  //b = m_toolBox.IsFloating();
	m_toolBox.SetButtonStyle(1, TBBS_BUTTON | TBBS_WRAPPED);
	m_toolBox.SetButtonStyle(3, TBBS_BUTTON | TBBS_WRAPPED);
	m_toolBox.SetButtonStyle(5, TBBS_BUTTON | TBBS_WRAPPED);
	FloatControlBar(&m_toolBox, { rect.right - 60,rect.top + 100 });		}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct){
	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
		!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))	{
		TRACE0("未能创建工具栏\n");
		return -1;      // 未能创建
	}
	if (!m_toolBox.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER
		| CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_FIXED) ||
		!m_toolBox.LoadToolBar(IDR_TOOLBOX)){
		TRACE0("未能创建工具栏\n");
		return -1;      // 未能创建
	}
	if (!m_wndStatusBar.Create(this))	{
		TRACE0("未能创建状态栏\n");
		return -1;      // 未能创建
	}
	m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT));
	//int nCount = m_wndStatusBar.GetCount();
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);    // 如果不需要可停靠工具栏,则删除这三行
	m_toolBox.EnableDocking(CBRS_ALIGN_ANY);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_wndToolBar);
	m_toolBox.SetWindowTextW(_T("工具箱"));
	m_wndToolBar.SetWindowText(_T("标准"));
	InitTools();
	return 0;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
	if( !CMDIFrameWnd::PreCreateWindow(cs) )
		return FALSE;
	// TODO: 在此处通过修改
	//  CREATESTRUCT cs 来修改窗口类或样式
	return TRUE;
}

CMainView.h

class CMainView : public CScrollView{
	int m_nIndex{ID_DRAW_DRAG}; //工具编号
	CArray<SLayer*>m_ls;  //类似于蝴蝶的架构
protected: // 仅从序列化创建
	CMainView() noexcept;
	DECLARE_DYNCREATE(CMainView)

// 特性
public:
	CMainDoc* GetDocument() const;

// 重写
public:
	virtual void OnDraw(CDC* pDC);  // 重写以绘制该视图
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual void OnInitialUpdate(); // 构造后第一次调用
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnDrawTools(UINT);
	afx_msg void OnUpdateDrawTools(CCmdUI* pCmdUI);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
};

CMainView.cpp

#include "pch.h"
#include "framework.h"
#include "CLine.h"
#include "CPencil.h"
#include "CRecta.h"
#include "CEllipse.h"
#include "CRRect.h"
#include "DrawXq.h"
#endif
#include "CMainDoc.h"
#include "CMainView.h"
CMainView::CMainView() noexcept{     // CMainView 构造/析构
}
CMainView::~CMainView(){
}
BOOL CMainView::PreCreateWindow(CREATESTRUCT& cs)
{
	//  CREATESTRUCT cs 来修改窗口类或样式
	return CScrollView::PreCreateWindow(cs);
}
// CMainView 绘图
void CMainView::OnDraw(CDC* pDC) //传来paintDc 因为基类中已经做了这个,你再做是无效的
{
	auto nCount = m_ls.GetCount();
	int i = -1;
	while (++i<nCount)
	{
		m_ls[i]->OnDraw(pDC);
	}
}
void CMainView::OnInitialUpdate()
{
	CScrollView::OnInitialUpdate();

	CSize sizeTotal;
	// TODO: 计算此视图的合计大小
	sizeTotal.cx = sizeTotal.cy = 100;
	SetScrollSizes(MM_TEXT, sizeTotal);
}
 void CMainView::OnDrawTools(UINT nID)
{
	m_nIndex = nID;
}

 void CMainView::OnUpdateDrawTools(CCmdUI* pCmdUI)
 {
	 //pCmdUI->SetCheck(); //这个TRUE的话7个都会亮起来
	 pCmdUI->SetCheck(pCmdUI->m_nID == m_nIndex);
 }
void CMainView::OnLButtonDown(UINT nFlags, CPoint point){
	SLayer* pLayer = nullptr;
	switch (m_nIndex)
	{
	case ID_DRAW_LINE:
		pLayer = new CLine;
		break;
	case ID_DRAW_RECT:
		pLayer = new CRecta;
		break;
	case ID_DRAW_PENCIL:
		pLayer = new CPencil;
		break;
	case ID_DRAW_ELLIPSE:
		pLayer = new CEllipse;
		break;
	case ID_DRAW_RRECT:
		pLayer = new CRRect;
		break;
	}
	if (pLayer)
	{
		pLayer->OnLButtonDown(nFlags, point);
		m_ls.Add(pLayer);
	}
	CScrollView::OnLButtonDown(nFlags, point);
}
void CMainView::OnLButtonUp(UINT nFlags, CPoint point)
{
	CScrollView::OnLButtonUp(nFlags, point);
	SLayer::m_last ={ MAXWORD,MAXWORD }; //恢复到未开始的状态
	auto nCount = m_ls.GetCount();
	if (nCount < 1)
		return;
	m_ls[nCount - 1]->OnLButtonUp(nFlags, point);
	Invalidate();
}
void CMainView::OnMouseMove(UINT nFlags, CPoint point)
{
	CScrollView::OnMouseMove(nFlags, point);
	auto nCount = m_ls.GetCount();
	if (nCount < 1)
		return;

	CClientDC dc(this);// this是窗口类  做的是反差色
	dc.SetROP2(R2_NOT);

	m_ls[nCount - 1]->OnMouseMove(nFlags, point, &dc);
}

CEllipse.h

#pragma once
#include "pch.h"
class CEllipse : public SLayer
{
	CRect m_rect;
	void OnLButtonDown(UINT nFlags, CPoint point); //形成多态
	void OnLButtonUp(UINT nFlags, CPoint point);
	void OnMouseMove(UINT nFlags, CPoint point, CDC* pDC);
	void OnDraw(CDC* pDC);  // 重写以绘制该视图
};

CEllipse.cpp

#include "pch.h"
#include "CEllipse.h"
using namespace Gdiplus;
void CEllipse::OnLButtonDown(UINT nFlags, CPoint point) {
	m_rect.TopLeft() = point;
}
void CEllipse::OnLButtonUp(UINT nFlags, CPoint point)
{
	m_rect.BottomRight() = point;
	m_rect.NormalizeRect();
}
void CEllipse::OnMouseMove(UINT nFlags, CPoint point, CDC* pDC)
{
}
#include<gdiplusbrush.h>
void CEllipse::OnDraw(CDC* pDC) {
	Graphics g(pDC->GetSafeHdc());
	Pen pen({ 0xff,0,0,255 }, 3.0); //0xff,0,0,255第一个参数为透明度 第二三四为RGB ,3.0为粗度

	Point startPoint(m_rect.left, m_rect.top);
	Point endPoint(m_rect.right, m_rect.bottom);
	LinearGradientBrush brush(startPoint, endPoint, Color(0x80, 255, 0, 0), Color(0x80, 0, 0, 255));
	g.FillEllipse(&brush, m_rect.left, m_rect.top, m_rect.Width(), m_rect.Height());
	g.DrawEllipse(&pen, m_rect.left, m_rect.top, m_rect.Width(), m_rect.Height());
}
	/*Pen p2({ 0xff,0,0xff,0 }, 3.0f);
	g.DrawLine(&p2, m_rect.left, m_rect.top, m_rect.right, m_rect.bottom);
	g.DrawEllipse(&pen, m_rect.left, m_rect.top, m_rect.Width(), m_rect.Height());
	pDC->Ellipse(m_rect);*/

CLine.h

#pragma once
#include "pch.h"
class CLine : public SLayer
{
	CPoint m_ps,m_pe; //statr-end; 
	void OnLButtonDown(UINT nFlags, CPoint point); //形成多态
	void OnLButtonUp(UINT nFlags, CPoint point);
	void OnMouseMove(UINT nFlags, CPoint point, CDC* pDC);
	void OnDraw(CDC* pDC);  // 重写以绘制该视图
};

CLine.cpp

#include "pch.h"
#include "CLine.h"
void CLine::OnLButtonDown(UINT nFlags, CPoint point)
{
	m_ps = point;
}

void CLine::OnLButtonUp(UINT nFlags, CPoint point)
{	
	if (ST_DRAW == m_stat){	
		m_pe = point;
		m_stat = ST_NORMAL;
	}
}
void CLine::OnMouseMove(UINT nFlags, CPoint point, CDC* pDC){
	if (ST_DRAW ==m_stat &&nFlags &MK_LBUTTON)	{
		if (m_last.x!=MAXWORD)	{
			pDC->MoveTo(m_ps);
			pDC->LineTo(m_last);
		}
		pDC->MoveTo(m_ps);
		pDC->LineTo(point);
		m_last = point;
	}
}
void CLine::OnDraw(CDC* pDC){
	pDC->MoveTo(m_ps);
	pDC->LineTo(m_pe);
}

CRRect .h

#pragma once
#include "pch.h"
class CRRect : public SLayer
{
	CRect m_rect;
	void OnLButtonDown(UINT nFlags, CPoint point); //形成多态
	void OnLButtonUp(UINT nFlags, CPoint point);
	void OnMouseMove(UINT nFlags, CPoint point, CDC* pDC);
	void OnDraw(CDC* pDC);  // 重写以绘制该视图
};

CRRect .cpp

#include "pch.h"
#include "CRRect.h"
void CRRect::OnLButtonDown(UINT nFlags, CPoint point)
{
	m_rect.TopLeft() = point;
}

void CRRect::OnLButtonUp(UINT nFlags, CPoint point)
{
	m_rect.BottomRight() = point;
	m_rect.NormalizeRect();
}
void CRRect::OnMouseMove(UINT nFlags, CPoint point, CDC* pDC)
{
}

void CRRect::OnDraw(CDC* pDC)
{
	int nWidth = m_rect.Width();
	int nHeight = m_rect.Height();
	pDC->RoundRect(m_rect, {nWidth/5,nHeight/5});
}

在这里插入图片描述

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

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

相关文章

Jmeter请求接口返回值乱码解决

乱码示例 解决步骤&#xff1a; 1.打开Jmeter安装目录下的bin目录&#xff0c;找到jmeter.properties 2.使用记事本或其他编译工具打开jmeter.properties文件&#xff0c;然后全局搜索sampleresult.default.encoding 3.在文件中添加sampleresult.default.encodingutf-8,保存…

LeetCode--HOT100题(28)

目录 题目描述&#xff1a;2. 两数相加&#xff08;中等&#xff09;题目接口解题思路代码 PS: 题目描述&#xff1a;2. 两数相加&#xff08;中等&#xff09; 给你两个 非空 的链表&#xff0c;表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的&#xff0c;并且…

c语言每日一练(6)

前言&#xff1a;每日一练系列&#xff0c;每一期都包含5道选择题&#xff0c;2道编程题&#xff0c;博主会尽可能详细地进行讲解&#xff0c;令初学者也能听的清晰。每日一练系列会持续更新&#xff0c;暑假时三天之内必有一更&#xff0c;到了开学之后&#xff0c;将看学业情…

42. range函数—生成器函数-更新

【目录】 文章目录 1. range( )函数是什么&#xff1f;2. 知识回顾-列表的切片3. range( )函数的语法3.1 range( )函数语法3.2 参数说明3.3 列表切片和range函数的区别 4. 实操练习4.1 参数为一个正整数4.2 参数为04.3 参数为一个负整数4.4 有2个参数4.5 有3个参数4.6 步长为负…

vscode extension 怎么区分dev prod

开发模式注入环境变量 使用vsode 提供的api

利用Torchmetrics库快速进行Torch的评价指标计算(推荐)

目录 1、安装 2、基本流程介绍 3、MetricCollection 4、自定义指标 5、我们可以调用多个指标计算不同的任务 6、可以是标签,也可以是one_hot编码 7、常用分类指标计算 8、异常报错 1、安装 官网地址:Welcome to TorchMetrics — PyTorch-Metrics 1.0.1 documenta…

掌握Python的X篇_34_Python朗读文字

各种广告中说python是人工智能的主宰&#xff0c;其实这更多是噱头的成分&#xff0c;但是python确实可以做很多的事情&#xff0c;本篇将会介绍利用pythonAI平台来合成声音。今天将会用到的是百度。 文章目录 1. baiToVoice2. 注册appid3. 合成代码 1. baiToVoice 使用百度A…

创建多图层叠加效果的背景与人物图像

引言&#xff1a; 在现代应用程序开发中&#xff0c;图形资源的使用是非常常见的&#xff0c;特别是在用户界面设计中。通过使用TImageList和TGlyph组件的组合&#xff0c;我们可以实现令人印象深刻的多图层叠加效果。本文将介绍如何使用这两个组件来创建背景和人物的多图层叠加…

Idea创建maven管理的web项目

如果你想在项目中添加一个传统的 src 目录来存放源代码&#xff0c;可以按照以下步骤操作&#xff1a; 1. 在项目视图中&#xff0c;右键单击项目名称&#xff0c;选择 “New” -> “Directory”。 2. 在弹出的对话框中&#xff0c;输入目录名称为 “src”&#xff0c;然后…

Camunda 7.x 系列【3】Camunda 简介

有道无术&#xff0c;术尚可求&#xff0c;有术无道&#xff0c;止于术。 本系列Spring Boot 版本 2.7.9 本系列Camunda 版本 7.19.0 源码地址&#xff1a;https://gitee.com/pearl-organization/camunda-study-demo 文章目录 1. 概述2. 核心组件2.1 流程引擎2.2 模型2.3 Web…

金融反欺诈的应用实践

“根据980起全球重大金融欺诈事件分析&#xff0c;60%的欺诈发生在移动端&#xff0c;同比增长170%。“&#xff0c;在香港近日举办的金融科技沙龙上&#xff0c;顶象金融业务安全专家史博表示&#xff0c;金融业已成为不法分子重要的攻击对象。 本届金融科技沙龙由Databricks…

【Linux 网络】 数据链路层协议

数据链路层协议 数据链路层解决的问题以太网协议认识以太网以太网帧格式 认识MAC地址对比理解MAC地址和IP地址认识MTUMTU对IP协议的影响MTU对UDP协议的影响MTU对于TCP协议的影响ARP协议ARP协议的作用ARP协议的工作流程ARP数据报的格式 总结 数据链路层解决的问题 IP拥有将数据跨…

Springboot04--vue前端部分+element-ui

注意点&#xff1a; 这边v-model和value的区别&#xff1a;v-model是双向绑定的&#xff0c;value是单向绑定 li的key的问题 vue的组件化开发&#xff1a; 1. NPM&#xff08;类似maven&#xff0c;是管理前段代码的工具&#xff09; 安装完之后可以在cmd里面使用以下指令 2.…

智汇云舟入选IDC《中国智慧城市数字孪生技术评估,2023》报告

8月7日&#xff0c;国际数据公司&#xff08;IDC&#xff09;发布了《中国智慧城市数字孪生技术评估&#xff0c;2023》报告。智汇云舟凭借在数字孪生领域的创新技术与产品&#xff0c;入选《2023中国数字孪生城市技术提供商图谱》。 报告通过公开征集的形式进行申报&am…

大数据课程I2——Kafka的架构

文章作者邮箱&#xff1a;yugongshiyesina.cn 地址&#xff1a;广东惠州 ▲ 本章节目的 ⚪ 掌握Kafka的架构&#xff1b; ⚪ 掌握Kafka的Topic与Partition&#xff1b; 一、Kafka核心概念及操作 1. producer生产者&#xff0c;可以是一个测试线程&#xff0c;也…

80. 删除有序数组中的重复项 II

题目链接&#xff1a;力扣&#xff08;LeetCode&#xff09;官网 - 全球极客挚爱的技术成长平台 解题思路&#xff1a;因为数组有序&#xff0c;相等的元素一定相邻&#xff0c;所以可以使用一个变量num统计相等元素的个数&#xff0c;如果当前元素和前一个元素相等&#xff0c…

Java解决四大查找(一)

Java解决四大查找 一.线性查找1.1 题目1.2 思路分析1.3 代码演示 二.二分查找(双指针法)2.1 题目2.2 思路分析(图解加文字)2.3 代码演示 一.线性查找 1.1 题目 在数组{1&#xff0c;8&#xff0c;1024&#xff0c;521&#xff0c;1889}中查找数字8&#xff0c;如果有&#xff…

31 | 独角兽企业数据分析

独角兽企业:是投资行业尤其是风险投资业的术语,一般指成立时间不超过10年、估值超过10亿美元的未上市创业公司。 项目目的: 1.通过对独角兽企业进行全面地分析(地域,投资方,年份,行业等),便于做商业上的战略决策 项目数据源介绍 1.数据源:本项目采用的数据源是近…

智能质检技术的核心环节:语音识别和自然语言处理

随着呼叫中心行业的快速发展和客户服务需求的不断提高&#xff0c;越来越多的企业开始采用智能质检技术&#xff0c;以提高呼叫中心的质量和效率。而在智能质检技术中&#xff0c;语音识别和自然语言处理是其核心环节&#xff0c;对于提高质检的准确性和效率具有重要作用。 语音…

uniapp使用阿里矢量库

然后解压复制全部到你的项目文件 最后只要这几个 然后引入 最后在你需要的页面使用
最新文章