HALCON例程:2d_data_codes_data_access.hdev

2023-10-12 18:40

本文主要是介绍HALCON例程:2d_data_codes_data_access.hdev,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

一、程序解读

* 程序描述:

        这个程序展示了如何在搜索数据代码时访问中间结果。这使我们可以获得有关如何增强搜索过程的运行时间的提示,或者为什么没有找到或解码符号。

        该程序首先创建一个2d数据代码模型,并查询可用参数的名称。在下一步中,在每个图像中搜索和解码数据代码符号。然后查询有关搜索过程和符号(候选)的进一步信息和一些更具体的信息,以获得关于运行时如何增强搜索过程的提示,或者为什么没有找到或解码符号。左侧显示可用参数列表,右侧显示参数值。

* ***************************************************************

总结:

        1.正常二维码图像:获得搜索的基础参数;分割为前景及背景模块,获得有关符号参数结果;获得解码字符串及其ASCII码值。

        2.找到但未解码符号,查询状态,decoding_error错误解码,显示模块的二进制符号数据。

        3.未搜索到二维码,查询状态,aborted Search 搜索失败,显示前3个无效候选并查询其信息;如果超过3个候选项,则显示所有候选项。

        4.显示设置:陈列所有参数,高亮显示获得的参数、图像信息、及参数信息。

搜索的基础参数:
'min_search_level'
'max_search_level'
'pass_num'
'result_num'  结果数
'candidate_num'  候选数
'undecoded_num'  解码符号数
'aborted_num'    中止搜索数

        5.程序的大量代码为显示设置。

二、代码详解

* Initialize image path.初始化图片路径。dev_update_off ()
dev_close_window ()
ImagePath := 'datacode/ecc200/'
ImageFiles := ImagePath +
['ecc200_distorted_001','ecc200_distorted_002','ecc200_to_preprocess_002','ecc200_to_preprocess_004','ecc200_to_preprocess_003']* 打开参数列表窗口。dev_open_window (0, 0, 550, 600, 'black', ParamWindow)
set_display_font (ParamWindow, 14, 'mono', 'true', 'false')* 简短描述
Message := 'This program shows how to access intermediate'
Message[1] := 'results while searching for ECC 200 data codes.'
Message[2] := ' '
Message[3] := 'This enables to obtain hints how the search process'
Message[4] := 'can be enhanced with respect to runtime or why a'
Message[5] := 'symbol is not found or decoded.'
disp_message (ParamWindow, Message, 'window', 12, 12, 'black', 'true')
disp_continue_message (ParamWindow, 'black', 'true')
stop ()Step 1: Create a 2d data code model
* -------------------------------------------------------
*创建2d数据代码模型,并将模型设置为中间结果的持久存储。create_data_code_2d_model ('Data Matrix ECC 200', 'default_parameters','enhanced_recognition', DataCodeHandle)
set_data_code_2d_param (DataCodeHandle, 'persistence', 1)
*
* Query the parameter names
*获取可用于查询搜索的字母数字结果和图标对象的参数列表
query_data_code_2d_params (DataCodeHandle, 'get_result_params', GenParamName)
query_data_code_2d_params (DataCodeHandle, 'get_result_objects', GenObjectNames)
*
*设置参数名称的颜色
*gen_tuple_const:生成特定长度的元组并初始化元素ColorAlph := gen_tuple_const(|GenParamName|,'#808080')
ColorIcon := gen_tuple_const(|GenObjectNames|,'#808080')* Open new windows
* ------------------------------
* Open window for iconic objects. 打开图标对象窗口
WWidth := 600
WHeight := 300
WRatio := real(WWidth) / WHeight
dev_open_window (0, 560, WWidth, WHeight, 'white', ImageWindow)
set_display_font (ImageWindow, 14, 'mono', 'true', 'false')
dev_set_line_width (3)
dev_set_color ('green')
*
* Open window for alphanumeric results. 打开窗口以查看字母数字结果
dev_open_window (360, 560, 600, 240, 'white', ResultWindow)
set_display_font (ResultWindow, 14, 'mono', 'true', 'false')

* Step 2: Read the data codes 读取二维码
*搜索每个图像中的数据代码,并尝试解码符号。然后查询字母数字结果和图标对象的搜索和解码过程。for Index := 0 to |ImageFiles| - 1 by 1dev_set_window (ImageWindow)dev_clear_window ()read_image (Image, ImageFiles[Index])* 在候选搜索或解码过程中,一些图像被修改以显示不同的问题。if (Index == 2)zoom_image_size (Image, Image, 230, 230, 'constant')endifif (Index == 4)gray_erosion_rect (Image, Image, 3, 3)gauss_filter (Image, Image, 3)endif*determine_part (Image, WRatio, WWidth, WHeight, Row1, Col1, Row2, Col2)dev_set_part (Row1, Col1, Row2, Col2)dev_display (Image)disp_message (ImageWindow, 'Example ' + (Index + 1) + ' of ' + |ImageFiles|, 'window', 12, 12, 'black', 'true')* Set parameters* 为特定图像设置模块的最小像素,以减少候选图像的数量。if (Index == 3)set_data_code_2d_param (DataCodeHandle, 'module_size_min', 24)endifif (Index == 4)set_data_code_2d_param (DataCodeHandle, 'module_size_min', 10)endif*将Index == 2 的‘small_modules_robustness’设置为'high',因为模块太小了(~ 2像素)。if (Index == 2)set_data_code_2d_param (DataCodeHandle, 'small_modules_robustness', 'high')elseset_data_code_2d_param (DataCodeHandle, 'small_modules_robustness', 'low')endif
    * Find and decode the data codes. 寻找并解码find_data_code_2d (Image, SymbolXLDs, DataCodeHandle, [], [], ResultHandles, DecodedDataStrings)* Alphanumeric results:  various results about search*字母数字结果:关于搜索的各种结果*获得一些关于搜索过程的字母数字结果。GenResultNames :=['min_search_level','max_search_level','pass_num','result_num','candidate_num','undecoded_num','aborted_num']GenResultValues := []get_data_code_2d_results (DataCodeHandle, 'general', GenResultNames,GenResultValues)GenResult := (GenResultNames + ': ')$'-20' + GenResultValues$'2'** 展示结果disp_message (ResultWindow, 'General alphanumeric results about the search:', 'window', 12, 12, 'black', 'false')disp_message (ResultWindow, GenResult, 'window', 40, 12, 'black', 'false')* 更新参数名称的高亮显示* 清除窗口dev_set_window (ParamWindow)dev_clear_window ()disp_message (ParamWindow, 'Highlighted parameters are shown on the right', 'window', 12, 12, 'black', 'true')** 图标对象参数:disp_message (ParamWindow, 'Parameters for iconic objects:', 'window', 50, 12,'black', 'true')disp_message (ParamWindow, GenObjectNames, 'window', 80, 12, ColorIcon, 'false')** 字母数字结果参数:ColorAlph[0,1,2,3,4,5,6] := 'white'disp_message (ParamWindow, 'Parameters for alphanumeric results:', 'window', 190, 12, 'black', 'true')disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')ColorAlph[0,1,2,3,4,5,6] := '#808080'disp_message (ParamWindow, GenParamName[19:37], 'window', 220, 260, ColorAlph, 'false')disp_continue_message (ResultWindow, 'black', 'true')stop ()

    dev_set_window (ResultWindow)dev_clear_window ()*初始化候选数、解码符号数和中止搜索数的变量。CandidateNum := GenResultValues[4]UndecodedNum := GenResultValues[5]AbortedNum := GenResultValues[6]*查询所有候选的图标对象*对于所有2d数据编码候选,查询并显示搜索图像和处理图像。if (CandidateNum > 0)dev_set_window (ImageWindow)dev_clear_window ()

  * Search image  搜索图像

  * Search image搜索图像* 获取找到候选项的搜索图像get_data_code_2d_objects (SearchImage, DataCodeHandle, 0, 'search_image')determine_part (SearchImage, WRatio, WWidth, WHeight, SearchRow1, SearchCol1, SearchRow2, SearchCol2)dev_set_part (SearchRow1, SearchCol1, SearchRow2, SearchCol2)dev_display (SearchImage)Message := 'Example ' + (Index + 1) + ' of ' + |ImageFiles| + '  Search image'disp_message (ImageWindow, Message, 'window', 12, 12, 'black', 'true')*更新参数名称的高亮显示dev_set_window (ParamWindow)dev_clear_window ()disp_message (ParamWindow, 'Highlighted parameters are shown on the right', 'window', 12, 12, 'black', 'true')* Parameters for iconic objects:ColorIcon[3] := 'white'disp_message (ParamWindow, 'Parameters for iconic objects:', 'window', 50, 12, 'black', 'true')disp_message (ParamWindow, GenObjectNames, 'window', 80, 12, ColorIcon, 'false')ColorIcon[3] := '#808080'* Parameters for alphanumeric results:disp_message (ParamWindow, 'Parameters for alphanumeric results:', 'window', 190, 12, 'black', 'true')disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')disp_message (ParamWindow, GenParamName[19:37], 'window', 220, 260, ColorAlph, 'false')disp_continue_message (ResultWindow, 'black', 'true')stop ()

* Process image 处理图像

* Process image* 获得调查候选项的过程图像get_data_code_2d_objects (ProcessImage, DataCodeHandle, 0, 'process_image')determine_part (ProcessImage, WRatio, WWidth, WHeight, ProcessRow1, ProcessCol1, ProcessRow2, ProcessCol2)dev_set_part (ProcessRow1, ProcessCol1, ProcessRow2, ProcessCol2)dev_display (ProcessImage)Message := 'Example ' + (Index + 1) + ' of ' + |ImageFiles| + '  Process image'disp_message (ImageWindow, Message, 'window', 12, 12, 'black', 'true')* 更新参数* Parameters for iconic objects:ColorIcon[4] := 'white'disp_message (ParamWindow, GenObjectNames, 'window', 80, 12, ColorIcon, 'false')ColorIcon[4] := '#808080'stop ()endif

* Successfully decoded symbols   成功解码的符号

* 获取有关已解码符号的当前参数值的信息,以便提高运行时间。if (|ResultHandles| > 0*查询每个已解码数据字符串的信息for J := 0 to |ResultHandles| - 1 by 1* 显示图像和XLD轮廓dev_clear_window ()dev_set_part (Row1, Col1, Row2, Col2)dev_display (Image)dev_display (SymbolXLDs)disp_message (ImageWindow, 'Example ' + (Index + 1) + ' of ' + |ImageFiles|, 'window', 12, 12, 'black', 'true')*(1) Query alphanumeric results: various results* 获取并显示符号和搜索的一些参数值。ResultVariousNames :=['polarity','module_gap','pass','status','mirrored','module_height','module_width','slant','contrast','decoded_string']ResultVariousValues := []get_data_code_2d_results (DataCodeHandle, ResultHandles[J], ResultVariousNames, ResultVariousValues)* 确定过大的解码数据字符串的长度。get_string_extents (ImageWindow, ResultVariousValues[9], Ascent, Descent, TWidth, THeight)if (TWidth >= WWidth)ResultVariousValues[9] := ResultVariousValues[9]{0:20} + ' ...'endifVariousResults := (ResultVariousNames + ':')$'-18' + ResultVariousValues* 在ResultWindow窗口展示结果disp_message (ResultWindow, 'Alphanumeric results about the symbol:', 'window', 12, 12, 'black', 'false')disp_message (ResultWindow, VariousResults, 'window', 30, 12, 'black','false')*(2) Query iconic objects: Regions of the modules  * 获取并显示模块,检查模块分类的质量。dev_set_window (ImageWindow)* 前景模块:get_data_code_2d_objects (Foreground, DataCodeHandle, ResultHandles[J], 'module_1_rois')dev_set_line_width (1)dev_set_draw ('margin')dev_set_color ('blue')dev_display (Foreground)*背景模块 :get_data_code_2d_objects (Background, DataCodeHandle, ResultHandles[J], 'module_0_rois')dev_set_color ('yellow')dev_display (Background)disp_message (ImageWindow, 'Foreground and Background', 'window', 40, 12, 'black', 'true')dev_set_line_width (3)dev_set_color ('green')*更新高亮参数dev_set_window (ParamWindow)dev_clear_window ()disp_message (ParamWindow, 'Highlighted parameters are shown on the right', 'window', 12, 12, 'black', 'true')* Parameters of iconic objects:ColorIcon[1,2] := ['blue','yellow']disp_message (ParamWindow, 'Parameters for iconic objects:', 'window', 50, 12, 'black', 'true')disp_message (ParamWindow, GenObjectNames, 'window', 80, 12, ColorIcon, 'false')* Parameters of alphanumeric results:ColorAlph[8,11,16,17,18] := 'white'disp_message (ParamWindow, 'Parameters for alphanumeric results:', 'window', 190, 12, 'black', 'true')disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')ColorAlph[8,11,16,17,18] := '#808080'ColorAlph[2,3,4,5,6] := 'white'disp_message (ParamWindow, GenParamName[19:37], 'window', 220, 260, ColorAlph, 'false')ColorAlph[2,3,4,5,6] := '#808080'stop ()


​​​​​​​

*(3) Query alphanumeric result: ASCII Code ('decoded_data')* 查询字母数字结果:ASCII码('decoded_data')*获取并显示解码字符串的ASCII码。get_data_code_2d_results (DataCodeHandle, ResultHandles[J], 'decoded_data', ResultASCIICode)format_text (3, ResultASCIICode, 10, FormattedString)* 在ResultWindow中显示码dev_set_window (ResultWindow)dev_clear_window ()disp_message (ResultWindow, 'ASCII Code of the symbol:', 'window', 12, 12, 'black', 'false')disp_message (ResultWindow, FormattedString, 'window', 40, 12, 'black', 'false')*更新高亮参数dev_set_window (ParamWindow)dev_clear_window ()disp_message (ParamWindow, 'Highlighted parameters are shown on the right', 'window', 12, 12, 'black', 'true')* Parameters of iconic objects:disp_message (ParamWindow, 'Parameters for iconic objects:', 'window', 50, 12, 'black', 'true')disp_message (ParamWindow, GenObjectNames, 'window', 80, 12, ColorIcon, 'false')ColorIcon[1,2] := '#808080'* Parameters of alphanumeric results:disp_message (ParamWindow, 'Parameters for alphanumeric results:', 'window', 190, 12, 'black', 'true')disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')ColorAlph[12] := 'white'disp_message (ParamWindow, GenParamName[19:37], 'window', 220, 260, ColorAlph, 'false')ColorAlph[12] := '#808080'disp_continue_message (ResultWindow, 'black', 'true')stop ()endforelse

Undecoded symbols 未解码符号

 * 获取有关已找到但无法解码的符号的当前参数值的信息。if (UndecodedNum > 0)*  获取所有未解码符号的句柄。get_data_code_2d_results (DataCodeHandle, 'all_undecoded', 'handle', HandlesUndecoded)* 探究符号不能被解码的原因。for J := 0 to |HandlesUndecoded| - 1 by 1dev_set_window (ImageWindow)dev_clear_window ()dev_set_part (Row1, Col1, Row2, Col2)dev_display (Image)Message := 'Example ' + (Index + 1) + ' of ' + |ImageFiles| + ' Undecoded symbol ' + (J + 1) + ' of ' + |HandlesUndecoded|disp_message (ImageWindow, Message, 'window', 12, 12, 'black', 'true')*(1)Query and display the status of the search.*查询和显示搜索的状态。get_data_code_2d_results (DataCodeHandle, HandlesUndecoded[J], 'status', StatusValue)disp_message (ResultWindow, 'Alphanumeric results about the symbol:', 'window', 12, 12, 'black', 'false')disp_message (ResultWindow, 'Status: ' + StatusValue, 'window', 40, 12, 'black', 'false')*(2) Query iconic objects: XLD contour and regions of modules*查询图标对象:模块的XLD轮廓和区域* --------------------------------------------------------* 获取未解码符号的XLD轮廓和模块,以获取候选符号未解码的原因。* XLD contour of the candidate.get_data_code_2d_objects (DataCodeObject, DataCodeHandle, HandlesUndecoded[J], 'candidate_xld')dev_set_color ('red')dev_display (DataCodeObject)* Foreground modules:get_data_code_2d_objects (Foreground, DataCodeHandle, HandlesUndecoded[J], 'module_1_rois')dev_set_line_width (1)dev_set_draw ('margin')dev_set_color ('blue')dev_display (Foreground)* Background modules:get_data_code_2d_objects (Background, DataCodeHandle, HandlesUndecoded[J], 'module_0_rois')dev_set_color ('yellow')dev_display (Background)disp_message (ImageWindow, 'Foreground and Background', 'window', 40, 12, 'black', 'true')dev_set_line_width (3)dev_set_color ('green')* 更新高亮参数* Parameters for iconic objects:ColorIcon[0,1,2] := ['red','blue','yellow']disp_message (ParamWindow, GenObjectNames, 'window', 80, 12, ColorIcon, 'false')ColorIcon[0,1,2] := '#808080'* Parameters for alphanumeric results:ColorAlph[17] := 'white'disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')ColorAlph[17] := '#808080'disp_message (ParamWindow, GenParamName[19:37], 'window', 220, 260, ColorAlph, 'false')stop ()

*(3)Query alphanumeric results: Binary symbol data*查询字母数字结果:二进制符号数据*获取各个模块的二进制信息,以评估模块分类。get_data_code_2d_results (DataCodeHandle, HandlesUndecoded[J], 'bin_module_data', ResultBinModules)format_text (3, ResultBinModules, 10, FormattedBinModules)*显示二进制结果dev_set_window (ResultWindow)dev_clear_window ()disp_message (ResultWindow, 'Binary symbol data of the modules:', 'window', 12, 12, 'black', 'false')disp_message (ResultWindow, FormattedBinModules, 'window', 30, 12, 'black', 'false')*更新高亮参数* Parameters for alphanumeric results:disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')ColorAlph[9] := 'white'disp_message (ParamWindow, GenParamName[19:37], 'window', 220, 260, ColorAlph, 'false')ColorAlph[9] := '#808080'disp_continue_message (ResultWindow, 'black', 'true')stop ()* Clear the ResultWindow.dev_set_window (ResultWindow)dev_clear_window ()endforelse

* No canditates found没有找到候选对象

    *如果没有找到2d数据编码符号的候选:if (CandidateNum == 0)dev_set_window (ParamWindow)dev_clear_window ()disp_message (ParamWindow, 'No candidate found', 'window', 12, 12, 'black', 'true')disp_continue_message (ResultWindow, 'black', 'true')stop ()endif

 * Aborted Search 搜索失败

    * 获取有关搜索的当前参数值的信息,以调查为什么搜索被中止。if (AbortedNum > 0)dev_set_window (ImageWindow)dev_clear_window ()dev_set_part (Row1, Col1, Row2, Col2)dev_display (Image)Message := 'Example ' + (Index + 1) + ' of ' + |ImageFiles|Message[1] := 'Search aborted: Invalid candidates'disp_message (ImageWindow, Message, 'window', 12, 12, 'black', 'true')* 获得所有无效候选的句柄get_data_code_2d_results (DataCodeHandle, 'all_aborted', 'handle', HandlesAborted)* 在超过3个候选的情况下显示“前3个无效候选是...”if (|HandlesAborted| > 3)disp_message (ImageWindow, 'The first 3 invalid candidates are ...', 'window', 60, 12, 'black', 'true')endif*更新高亮参数dev_set_window (ParamWindow)dev_clear_window ()disp_message (ParamWindow, 'Highlighted parameters are shown on the right', 'window', 12, 12, 'black', 'true')* Iconic parameter names:disp_message (ParamWindow, 'Parameters for iconic objects:', 'window', 50, 12, 'black', 'true')disp_message (ParamWindow, GenObjectNames, 'window', 80, 12, ColorIcon, 'false')* Alphanumeric parameter names: disp_message (ParamWindow, 'Parameters for alphanumeric results:', 'window', 190, 12, 'black', 'true')ColorAlph[6] := 'white'disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')ColorAlph[6] := '#808080'
disp_message (ParamWindow, GenParamName[19:37], 'window', 220, 260, ColorAlph, 'false')stop ()

 

    * Query information for each invalid candidate. *查询每个无效候选的信息。for J := 0 to |HandlesAborted| - 1 by 1* Stepwise only for the first candidates.if (J < 3)dev_set_window (ImageWindow)dev_clear_window ()dev_set_part (Row1, Col1, Row2, Col2)dev_display (Image)Message := 'Example ' + (Index + 1) + ' of ' + |ImageFiles| + '    Invalid candidate: ' + (J + 1) + ' of ' + |HandlesAborted|disp_message (ImageWindow, Message, 'window', 12, 12, 'black', 'true')* 获取并显示候选对象的XLD轮廓线。get_data_code_2d_objects (DataCodeObject, DataCodeHandle, HandlesAborted[J], 'candidate_xld')dev_set_color ('yellow')dev_display (DataCodeObject)dev_set_color ('green')*获取并显示搜索的状态。get_data_code_2d_results (DataCodeHandle, HandlesAborted[J], 'status', StatusValue)Substrings := regexp_replace(StatusValue,'(: )',':\n')disp_message (ResultWindow, 'Alphanumeric results about the symbol:', 'window', 12, 12, 'black', 'false')disp_message (ResultWindow, 'status:\n\'' + Substrings + '\'', 'window', 40, 12, 'black', 'false')* 更新高亮参数* Alphanumeric parameter names:ColorIcon[0] := 'yellow'ColorAlph[17] := 'white'disp_message (ParamWindow, GenObjectNames, 'window', 80, 12, ColorIcon, 'false')disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')ColorIcon[0] := '#808080'ColorAlph[17] := '#808080'disp_continue_message (ResultWindow, 'black', 'true')stop ()* Clear the ResultWindow.dev_set_window (ResultWindow)dev_clear_window ()endifendfor

* In case of more than 3 candidates display all of them.
* 如果超过3个候选项,则显示所有候选项。if (|HandlesAborted| > 3)* Display all invalid candidates.显示所有无效候选项。dev_set_window (ImageWindow)dev_clear_window ()dev_set_colored (12)dev_display (Image)get_data_code_2d_objects (DataCodeObjects, DataCodeHandle, 'all_aborted','candidate_xld')dev_display (DataCodeObjects)disp_message (ImageWindow, 'Example ' + (Index + 1) + ' of ' + |ImageFiles|, 'window', 12, 12, 'black', 'true')disp_message (ImageWindow, 'All ' + |HandlesAborted| + ' invalid candidates', 'window', 40, 12, 'black', 'true')*更新最后一个参数的高亮显示。disp_message (ParamWindow, GenParamName[0:18], 'window', 220, 12, ColorAlph, 'false')if (Index < 4)disp_continue_message (ResultWindow, 'black', 'true')stop ()endifendif

 

这篇关于HALCON例程:2d_data_codes_data_access.hdev的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/197725

相关文章

论文翻译:arxiv-2024 Benchmark Data Contamination of Large Language Models: A Survey

Benchmark Data Contamination of Large Language Models: A Survey https://arxiv.org/abs/2406.04244 大规模语言模型的基准数据污染:一项综述 文章目录 大规模语言模型的基准数据污染:一项综述摘要1 引言 摘要 大规模语言模型(LLMs),如GPT-4、Claude-3和Gemini的快

CentOS下mysql数据库data目录迁移

https://my.oschina.net/u/873762/blog/180388        公司新上线一个资讯网站,独立主机,raid5,lamp架构。由于资讯网是面向小行业,初步估计一两年内访问量压力不大,故,在做服务器系统搭建的时候,只是简单分出一个独立的data区作为数据库和网站程序的专区,其他按照linux的默认分区。apache,mysql,php均使用yum安装(也尝试

使用Spring Boot集成Spring Data JPA和单例模式构建库存管理系统

引言 在企业级应用开发中,数据库操作是非常重要的一环。Spring Data JPA提供了一种简化的方式来进行数据库交互,它使得开发者无需编写复杂的JPA代码就可以完成常见的CRUD操作。此外,设计模式如单例模式可以帮助我们更好地管理和控制对象的创建过程,从而提高系统的性能和可维护性。本文将展示如何结合Spring Boot、Spring Data JPA以及单例模式来构建一个基本的库存管理系统

15 组件的切换和对组件的data的使用

划重点 a 标签的使用事件修饰符组件的定义组件的切换:登录 / 注册 泡椒鱼头 :微辣 <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-

12C 新特性,MOVE DATAFILE 在线移动 包括system, 附带改名 NID ,cdb_data_files视图坏了

ALTER DATABASE MOVE DATAFILE  可以改名 可以move file,全部一个命令。 resue 可以重用,keep好像不生效!!! system照移动不误-------- SQL> select file_name, status, online_status from dba_data_files where tablespace_name='SYSTEM'

Matter.js:Web开发者的2D物理引擎

Matter.js:Web开发者的2D物理引擎 前言 在现代网页开发中,交互性和动态效果是提升用户体验的关键因素。 Matter.js,一个专为网页设计的2D物理引擎,为开发者提供了一种简单而强大的方式,来实现复杂的物理交互效果。 无论是模拟重力、碰撞还是复杂的物体运动,Matter.js 都能轻松应对。 本文将带你深入了解 Matter.js ,并提供实际的代码示例,让你一窥其强大功能

Java的ArrayDeque使用例程

题目要求为: 卡拉兹(Callatz)猜想: 对任何一个自然数n,如果它是偶数,那么把它砍掉一半;如果它是奇数,那么把(3n+1)砍掉一半。这样一直反复砍下去,最后一定在某一步得到n=1。当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对n=3进行验证的时候,我们需要计算3、5、8、4、2、1,则当我们对n=5、8、4、2进行验证的时候,就可以直接

SIGMOD-24概览Part7: Industry Session (Graph Data Management)

👇BG3: A Cost Effective and I/O Efficient Graph Database in ByteDance 🏛机构:字节 ➡️领域: Information systems → Data management systemsStorage management 📚摘要:介绍了字节新提出的ByteGraph 3.0(BG3)模型,用来处理大规模图结构数据 背景

java.sql.SQLException: No data found

Java代码如下: package com.accord.utils;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.ResultSetMetaData;import

gcc make cmake例程

main.cpp文件: #include <iostream>#include "utils.h"int main(void) {int a = 1;int b = 2;int c = AddFunc(a, b);std::cout<< c <<std::endl;return 0;} utils.h文件: #pragma onceint AddFunc(int a, int b);