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:		// ConstructionCControlBar();public:			// Attributesint GetCount() const;CWnd *m_pInPlaceOwner;void SetInPlaceOwner(CWnd *pWnd);// for styles specific to CControlBarDWORD GetBarStyle();void SetBarStyle(DWORD dwStyle);
	BOOL m_bAutoDelete;// getting and setting border spacevoid 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);// Operationsvoid 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.pswp.cn/news/41020.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/41020.shtml
英文地址,請注明出處:http://en.pswp.cn/news/41020.shtml

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

相關文章

OC調用Swift編寫的framework

一、前言 隨著swift趨向穩定&#xff0c;越來越多的公司都開始用swift來編寫蘋果相關的業務了&#xff0c;關于swift的利弊這里就不多說了。這里詳細介紹OC調用swift編寫的framework庫的步驟 二、制作framework 1、新建項目&#xff0c;選擇framework 2、填寫framework的名稱…

AutoHotkey:定時刪除目錄下指定分鐘以前的文件,帶UI界面

刪除指定目錄下&#xff0c;所有在某個指定分鐘以前的文件&#xff0c;可以用來清理經常生成很多文件的目錄&#xff0c;但又需要保留最新的一部分文件 支持拖放目錄到界面 能夠記憶設置&#xff0c;下次啟動后不用重新設置&#xff0c;可以直接開始 應用場景比如&#xff1a…

WinForm內嵌Unity3D

Unity3D可以C#腳本進行開&#xff0c;使用vstu2013.msi插件&#xff0c;可以實現在VS2013中的調試。在開發完成后&#xff0c;由于項目需要&#xff0c;需要將Unity3D嵌入到WinForm中。WinForm中的UnityWebPlayer Control可以載入Unity3D。先看效果圖。 一、為了能夠動態設置ax…

【boost網絡庫從青銅到王者】第五篇:asio網絡編程中的同步讀寫的客戶端和服務器示例

文章目錄 1、簡介2、客戶端設計3、服務器設計3.1、session函數3.2、StartListen函數3、總體設計 4、效果測試5、遇到的問題5.1、服務器遇到的問題5.1.1、不用顯示調用bind綁定和listen監聽函數5.1.2、出現 Error occured!Error code : 10009 .Message: 提供的文件句柄無效。 [s…

Failed to execute goal org.apache.maven.plugins

原因&#xff1a; 這個文件D:\java\maven\com\ruoyi\pg-student\maven-metadata-local.xml出了問題 解決&#xff1a; 最簡單的直接刪除D:\java\maven\com\ruoyi\pg-student\maven-metadata-local.xml重新打包 或者把D:\java\maven\com\ruoyi\pg-student這個目錄下所有文件…

性能測試場景設計

性能測試場景設計&#xff0c;是性能測試中的重要概念&#xff0c;性能測試場景設計&#xff0c;目的是要描述如何執行性能測試。 通常來講&#xff0c;性能測試場景設計主要會涉及以下部分&#xff1a; 并發用戶數是多少&#xff1f; 測試剛開始時&#xff0c;以什么樣的速率…

Spring WebFlux 的詳細介紹

Spring WebFlux 是基于響應式編程的框架&#xff0c;用于構建異步、非阻塞的 Web 應用程序。它是Spring框架的一部分&#xff0c;專注于支持響應式編程范式&#xff0c;使應用程序能夠高效地處理大量的并發請求和事件。 以下是關于 Spring WebFlux 的詳細介紹&#xff1a; 1. *…

go入門實踐五-實現一個https服務

文章目錄 前言生成證書申請免費的證書使用Go語言生成自簽CA證書 https的客戶端和服務端服務端代碼客戶端代碼 tls的客戶端和服務端服務端客戶端 前言 在公網中&#xff0c;我想加密傳輸的數據。(1)很自然&#xff0c;我想到了把數據放到http的請求中&#xff0c;然后通過tls確…

2023年京東寵物食品行業數據分析(京東大數據)

寵物食品市場需求主要來自于養寵規模&#xff0c;近年來由于我國寵物數量及養寵人群的規模均在不斷擴大&#xff0c;寵物相關產業和市場規模也在蓬勃發展&#xff0c;寵物食品市場也同樣保持正向增長。 根據鯨參謀電商數據分析平臺的相關數據顯示&#xff0c;2023年1月-7月&am…

vue5種模糊查詢方式

在Vue中&#xff0c;有多種方式可以實現模糊查詢。以下是五種常見的模糊查詢方式&#xff1a; 使用JavaScript的filter()方法&#xff1a;使用filter()方法可以對數組進行篩選&#xff0c;根據指定的條件進行模糊查詢。例如&#xff1a; data() {return {items: [{ name: App…

接口自動化測試(添加課程接口調試,調試合同上傳接口,合同列表查詢接口,批量執行)

1、我們把信息截取一下 1.1 添加一個新的請求 1.2 對整個請求進行保存&#xff0c;Ctrl S 2、這一次我們添加的是課程添加接口&#xff0c;以后一個接口完成&#xff0c;之后Ctrl S 就能夠保存 2.1 選擇方法 2.2 設置請求頭&#xff0c;參數數據后期我們通過配置設置就行 3、…

收銀一體化-億發2023智慧門店新零售營銷策略,實現全渠道運營

伴隨著互聯網電商行業的興起&#xff0c;以及用戶理念的改變&#xff0c;大量用戶從線下涌入線上&#xff0c;傳統的線下門店人流量急劇收縮&#xff0c;門店升級幾乎成為了每一個零售企業的發展之路。智慧門店新零售收銀解決方案是針對傳統零售企業面臨的諸多挑戰和問題&#…

Mathematica 與 Matlab 常見復雜指令集匯編

Mathematica 常見指令匯編 Mathematica 常見指令 NDSolve 求解結果的保存 sol NDSolve[{y[x] x^2, y[0] 0, g[x] -y[x]^2, g[0] 1}, {y, g}, {x, 0, 1}]; numericSoly sol[[1, 1, 2]]; numericSolg sol[[1, 2, 2]]; data Table[{x, numericSoly[x], numericSolg[x]},…

JVM——類加載器

回顧一下類加載過程 類加載過程&#xff1a;加載->連接->初始化。連接過程又可分為三步:驗證->準備->解析。 一個非數組類的加載階段&#xff08;加載階段獲取類的二進制字節流的動作&#xff09;是可控性最強的階段&#xff0c;這一步我們可以去完成還可以自定義…

【計算機網絡篇】UDP協議

?作者簡介&#xff1a;大家好&#xff0c;我是小楊 &#x1f4c3;個人主頁&#xff1a;「小楊」的csdn博客 &#x1f433;希望大家多多支持&#x1f970;一起進步呀&#xff01; UDP協議 1&#xff0c;UDP 簡介 UDP&#xff08;User Datagram Protocol&#xff09;是一種無連…

Flink學習筆記(一)

流處理 批處理應用于有界數據流的處理&#xff0c;流處理則應用于無界數據流的處理。 有界數據流&#xff1a;輸入數據有明確的開始和結束。 無界數據流&#xff1a;輸入數據沒有明確的開始和結束&#xff0c;或者說數據是無限的&#xff0c;數據通常會隨著時間變化而更新。 在…

Kaptcha的基本應用

Kaptcha Kaptcha 是一個用于生成和驗證驗證碼的 Java 庫&#xff0c;提供了豐富的生成和驗證功能&#xff0c;并支持自定義配置。它可以用于增加應用程序的安全性&#xff0c;防止機器人和惡意攻擊。 Kaptcha 可以生成各種類型的驗證碼&#xff0c;包括數字、字母、數字字母組…

KDD 2023 獲獎論文公布,港中文、港科大等獲最佳論文獎

ACM SIGKDD&#xff08;國際數據挖掘與知識發現大會&#xff0c;KDD&#xff09;是數據挖掘領域歷史最悠久、規模最大的國際頂級學術會議&#xff0c;也是首個引入大數據、數據科學、預測分析、眾包等概念的會議。 今年&#xff0c;第29屆 KDD 大會于上周在美國加州長灘圓滿結…

HTTP--Request詳解

請求消息數據格式 請求行 請求方式 請求url 請求協議/版本 GET /login.html HTTP/1.1 請求頭 客戶端瀏覽器告訴服務器一些信息 請求頭名稱: 請求頭值 常見的請求頭&#xff1a; User-Agent&#xff1a;瀏覽器告訴服務器&#xff0c;我訪問你使用的瀏覽器版本信息 可…

藍橋杯每日N題 (消滅老鼠)

大家好 我是寸鐵 希望這篇題解對你有用&#xff0c;麻煩動動手指點個贊或關注&#xff0c;感謝您的關注 不清楚藍橋杯考什么的點點下方&#x1f447; 考點秘籍 想背純享模版的伙伴們點點下方&#x1f447; 藍橋杯省一你一定不能錯過的模板大全(第一期) 藍橋杯省一你一定不…