SAP ABAP 报表程序实现下载文件及上传 Excel 并解析

news2024/11/26 14:27:38

步骤1:

事务代码 SMW0

选择二进制数据选项点击上方按钮。

在这里插入图片描述

点击新建按钮输入名称和描述,上传模版文件。

在这里插入图片描述

案例传入 EXCEL 如下:
在这里插入图片描述

创建好资源库对象结果如下。

在这里插入图片描述

步骤2:报表效果展示

点击按钮选择上传的文件。
在这里插入图片描述
解析 Excel 文件结果到 alv 内表展示。

在这里插入图片描述
选择需要更新的数据,点击保存,修改成功后结果回写到alv表。
在这里插入图片描述

步骤3:源码

报表源码如下:

*&---------------------------------------------------------------------*
*& Report Z_EXCEL_TEST
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT Z_EXCEL_TEST.
INCLUDE zbcn_excel.
*----------------------------------------------------------------------*
* Type-pools/定义类型池
*----------------------------------------------------------------------*
TYPE-POOLS: slis.
*----------------------------------------------------------------------*
* Initialization/初始事件
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Variable/定义变量
*----------------------------------------------------------------------*
DATA:gv_filter  TYPE string,
     gs_functxt TYPE smp_dyntxt.
*----------------------------------------------------------------------*
* 声明ALV对象
*----------------------------------------------------------------------*
DATA:gs_layout_lvc TYPE lvc_s_layo,
     gt_fcat_lvc   TYPE lvc_t_fcat,
     gs_fcat_lvc   TYPE lvc_s_fcat.
types:
BEGIN OF ts_data,
        sel type char1,  "是否被选择
        index    TYPE sy-index,
        msgtyp   TYPE icon_d,
        message  TYPE bapi_msg.
        INCLUDE type zmmtest.
   TYPES:zdate TYPE DATS,

      END OF ts_data.
TYPES:tt_data TYPE STANDARD TABLE OF ts_data WITH DEFAULT KEY INITIAL SIZE 0.
DATA: gt_data TYPE tt_data,
      gs_data TYPE ts_data.

*----------------------------------------------------------------------*
* Selection  screen/定义屏幕
*----------------------------------------------------------------------*
SELECTION-SCREEN FUNCTION KEY: 1 .
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE TEXT-t01.
PARAMETERS:p_path LIKE rlgrap-filename MODIF ID m1.
SELECTION-SCREEN END OF BLOCK block1.
INITIALIZATION.
  gs_functxt-icon_id = icon_export.
  gs_functxt-quickinfo  = '模板下载'.
  gs_functxt-icon_text  = '模板下载'.
  sscrfields-functxt_01 = gs_functxt.

*----------------------------------------------------------------------*
* At selection-screen/屏幕事件
*----------------------------------------------------------------------*
AT SELECTION-SCREEN.
  IF sscrfields-ucomm = 'FC01' .
    CLEAR: gv_filter.
    gv_filter = '|EXCEL-Files (*.XLS)|*.XLS|All Files(*.*)|*.*|'.
    PERFORM frm_download_tmp USING gv_filter 'ZTEST'.
  ENDIF.


*----------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT.
*----------------------------------------------------------------------*
*AT SELECTION-SCREEN ON VALUE-REQUEST.
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
  gv_filter = 'EXCEL-Files (*.XLS)|*.XLS|EXCEL-Files (*.XLSX)|*.XLSX|All Files(*.*)|*.*|'.
  PERFORM frm_select_file USING gv_filter p_path.

*----------------------------------------------------------------------*
* Start-of-selection/开始选择事件
*----------------------------------------------------------------------*
START-OF-SELECTION.

*取数据
  PERFORM frm_get_data.

*----------------------------------------------------------------------*
* End-of-selection/结束选择事件
*----------------------------------------------------------------------*
END-OF-SELECTION.

* 确定ALV输出列的属性
  PERFORM frm_fill_fieldcat.
* 确定ALV输出格式的属性
  PERFORM frm_fill_layout .
* ALV报表输出
  PERFORM frm_alv_display.

FORM frm_get_data .
  DATA:lv_row      TYPE n LENGTH 5,
        lv_message  TYPE bapi_msg.

  IF p_path IS INITIAL.
    MESSAGE '请输入上传文件的路径!' TYPE 'S' DISPLAY LIKE 'E'.
    LEAVE LIST-PROCESSING.
  ENDIF.

  DATA: lt_load TYPE TABLE OF zalsmex_tabline,
        ls_load TYPE zalsmex_tabline.
  CALL FUNCTION 'ZALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = p_path
      i_begin_col             = '1'"开始列
      i_begin_row             = '2'"开始行
      i_end_col               = '5'"结束列
      i_end_row               = '10000'"结束行
    TABLES
      intern                  = lt_load
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.

  SORT lt_load BY row col.
  LOOP AT lt_load INTO ls_load.
    lv_row = ls_load-row + 4.
    CASE ls_load-col.
      WHEN 1.
        gs_data-id = ls_load-value.
      WHEN 2.
        gs_data-name = ls_load-value.
      WHEN 3.
        CATCH SYSTEM-EXCEPTIONS convt_no_number = 1.
          gs_data-age = ls_load-value.
        ENDCATCH.
        IF sy-subrc <> 0.
          lv_message = '第' && lv_row && '行“年龄”列存在非数字的输入'.
          MESSAGE lv_message TYPE 'S' DISPLAY LIKE 'E'.
          LEAVE LIST-PROCESSING.
        ENDIF.
      WHEN 4.
        gs_data-hobby = ls_load-value.
      WHEN 5.
        PERFORM frm_convert_date USING ls_load-value
                              CHANGING gs_data-zdate.
    ENDCASE.

    AT END OF row.
      APPEND gs_data TO gt_data.
      CLEAR:gs_data.
    ENDAT.
  ENDLOOP.

ENDFORM.

FORM frm_fill_fieldcat .
  REFRESH: gt_fcat_lvc .
  PERFORM frm_add_field USING 'X' 'MSGTYP'       '状态' '' '' '' '' ''.
  PERFORM frm_add_field USING 'X' 'MESSAGE'       '消息' '' '' '' '' ''.
  PERFORM frm_add_field USING ''  'ID'        '学号' '' '' '' '' ''.
  PERFORM frm_add_field USING ''  'NAME'        '姓名' '' '' '' '' ''.
  PERFORM frm_add_field USING ''  'AGE'        '年龄' '' '' '' '' ''.
  PERFORM frm_add_field USING ''  'HOBBY'        '兴趣' '' '' '' '' ''.
  PERFORM frm_add_field USING ''  'ZDATE'        '日期' '' '' '' '' ''.
ENDFORM.

*&---------------------------------------------------------------------*
*&      Form  FRM_FILL_LAYOUT
*&---------------------------------------------------------------------*

*----------------------------------------------------------------------*
FORM frm_fill_layout .
  CLEAR:gs_layout_lvc.
  gs_layout_lvc-zebra     = 'X'.
  gs_layout_lvc-cwidth_opt   = 'X'.
  gs_layout_lvc-box_fname   = 'SEL'.   "选择框
ENDFORM.

*&---------------------------------------------------------------------*
*&      Form  FRM_ALV_DISPLAY
*&---------------------------------------------------------------------*
FORM frm_alv_display .
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
      i_callback_program       = sy-repid
      i_callback_pf_status_set = 'FRM_PF_STATUS'
      i_callback_user_command  = 'FRM_USER_COMMAND'
      is_layout_lvc            = gs_layout_lvc
      it_fieldcat_lvc          = gt_fcat_lvc
      i_save                   = 'A'
    TABLES
      t_outtab                 = gt_data
    EXCEPTIONS
      program_error            = 1
      OTHERS                   = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.

*&---------------------------------------------------------------------*
*&      Form  FRM_PF_STATUS
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM frm_pf_status USING pt_extab TYPE slis_t_extab .
  SET PF-STATUS 'STATUS01' .

ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  FRM_USER_COMMAND
*&---------------------------------------------------------------------*
*       自定义的用户命令处理
*----------------------------------------------------------------------*
*      -->PV_UCOMM      用户命令类型
*      -->PS_SELFIELD  用户命令信息
*----------------------------------------------------------------------*
FORM frm_user_command USING pv_ucomm TYPE sy-ucomm
      ps_selfield TYPE slis_selfield.
  DATA: lr_grid TYPE REF TO cl_gui_alv_grid.
  ps_selfield-refresh    = 'X'.
  ps_selfield-col_stable = 'X'.
  ps_selfield-row_stable = 'X'.

  CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
      e_grid = lr_grid.
  CALL METHOD lr_grid->check_changed_data.


  CASE pv_ucomm.
    WHEN '&SAVE'.
      PERFORM frm_save.

    WHEN OTHERS.
  ENDCASE.
ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  FRM_ADD_FIELD
*&---------------------------------------------------------------------*
*       设置屏幕显示的字段
*----------------------------------------------------------------------*
*      -->P_U_FIELDNAME  text
*      -->P_U_SELTEXT  text
*----------------------------------------------------------------------*
FORM frm_add_field USING pv_key
      pv_fieldname
      pv_seltext
      pv_nozero
      pv_sum
      pv_ref_field
      pv_ref_table
      pv_edit.

  CLEAR:gs_fcat_lvc.
  gs_fcat_lvc-key       = pv_key.
  gs_fcat_lvc-fieldname = pv_fieldname.
  gs_fcat_lvc-coltext   = pv_seltext.
  gs_fcat_lvc-no_zero   = pv_nozero.
  gs_fcat_lvc-do_sum    = pv_sum.
  gs_fcat_lvc-ref_field = pv_ref_field.
  gs_fcat_lvc-ref_table = pv_ref_table.
  gs_fcat_lvc-edit      = pv_edit.
  IF pv_fieldname = 'MSGTYP'.
    gs_fcat_lvc-icon = 'X'.
  ENDIF.
  APPEND gs_fcat_lvc TO gt_fcat_lvc.
ENDFORM. " FRM_ADD_FIELD

*&---------------------------------------------------------------------*
*&      Form  FRM_SAVE
*&---------------------------------------------------------------------*
FORM frm_save.
  DATA:gs_test TYPE zmmtest.
  LOOP AT gt_data into gs_data WHERE sel = 'X'.
    CLEAR:gs_test.
    gs_test = CORRESPONDING #( gs_data ).
    MODIFY  zmmtest from gs_test.
    gs_data-msgtyp = icon_led_green.
    gs_data-message = '新建成功'.
    modify gt_data from gs_data.

  ENDLOOP.


ENDFORM.

*&---------------------------------------------------------------------*
*& Form FRM_CONVERT_DATE
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*
*&---------------------------------------------------------------------*
FORM frm_convert_date  USING    pv_value
CHANGING pv_date TYPE d.
  TRY.

      CALL METHOD cl_abap_datfm=>conv_date_ext_to_int
        EXPORTING
          im_datext = pv_value
*         IM_DATFMDES  =
        IMPORTING
          ex_datint = pv_date
*         EX_DATFMUSED =
        .
    CATCH cx_abap_datfm_no_date .
*            MESSAGE 'No Date' TYPE 'S' DISPLAY LIKE 'E'.
      MESSAGE '日期格式错误' TYPE 'S' DISPLAY LIKE 'E'.
      LEAVE LIST-PROCESSING.
    CATCH cx_abap_datfm_invalid_date .
*            MESSAGE 'Invlid Date' TYPE 'S' DISPLAY LIKE 'E'.
      MESSAGE '日期格式错误' TYPE 'S' DISPLAY LIKE 'E'.
      LEAVE LIST-PROCESSING.
    CATCH cx_abap_datfm_format_unknown .
*            MESSAGE 'Unknown Date format' TYPE 'S' DISPLAY LIKE 'E'.
      MESSAGE '日期格式错误' TYPE 'S' DISPLAY LIKE 'E'.
      LEAVE LIST-PROCESSING.
    CATCH cx_abap_datfm_ambiguous .
*            MESSAGE 'Ambiguous Date' TYPE 'S' DISPLAY LIKE 'E'.
      MESSAGE '日期格式错误' TYPE 'S' DISPLAY LIKE 'E'.
      LEAVE LIST-PROCESSING.
  ENDTRY.


ENDFORM.

2.包含文件源码如下:

*&---------------------------------------------------------------------*
*& Include ZBCN_EXCEL
*&---------------------------------------------------------------------*
TABLES: sscrfields.

DATA: gs_key           LIKE wwwdatatab,
      gv_stripped_name TYPE rlgrap-filename,
      gv_file_path     TYPE rlgrap-filename.

DATA:gt_iexcel TYPE STANDARD TABLE OF alsmex_tabline,
     gs_iexcel TYPE alsmex_tabline.


*       Batchinputdata of single transaction
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
*       messages of call transaction
DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.

DATA: ctumode LIKE ctu_params-dismode VALUE 'N'.
"A: show all dynpros
"E: show dynpro on error only
"N: do not display dynpro

DATA: cupdate LIKE ctu_params-updmode VALUE 'L'.
"S: synchronously
"A: asynchronously
"L: local

*&---------------------------------------------------------------------*
*&      Form  FRM_SELECT_FILE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM frm_select_file USING pv_title pv_filename.
  CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
      mask             = ',Excel Files xls,*.xls,Excel Files xlsx,*.xlsx,TXT Files,*.txt,ALL Files,*.*'
      mode             = '0'
      title            = pv_title
    IMPORTING
      filename         = pv_filename
    EXCEPTIONS
      inv_winsys       = 1
      no_batch         = 2
      selection_cancel = 3
      selection_error  = 4
      OTHERS           = 5.
ENDFORM. " FRM_SELECT_FILE
*&---------------------------------------------------------------------*
*&      Form  FRM_GET_EXCEL_DATA
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM frm_get_excel_data USING pv_file
      pv_beg_col
      pv_beg_row
      pv_end_col
      pv_end_row
      pv_del_row.
  REFRESH: gt_iexcel.
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = pv_file
      i_begin_col             = pv_beg_col
      i_begin_row             = pv_beg_row
      i_end_col               = pv_end_col
      i_end_row               = pv_end_row
    TABLES
      intern                  = gt_iexcel
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
  IF sy-subrc <> 0.
    if sy-langu = '1' .
    MESSAGE '导入数据文件失败!' TYPE 'S'.

      else.
    MESSAGE 'Failed to import data file!' TYPE 'S'.

        endif.
    LEAVE LIST-PROCESSING.
  ENDIF.

ENDFORM. " FRM_GET_EXCEL_DATA
*&---------------------------------------------------------------------*
*&      Form  FRM_DOWNLOAD_TMP
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->pv_filter   text
*      -->pv_objid    text
*----------------------------------------------------------------------*
FORM frm_download_tmp USING pv_filter
      pv_objid.

  DATA: pv_fd LIKE rlgrap-filename.

    if sy-langu = '1' .
  CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
      mask             = pv_filter
      mode             = '0'
      title            = '模板下载'
    IMPORTING
      filename         = pv_fd
    EXCEPTIONS
      inv_winsys       = 1
      no_batch         = 2
      selection_cancel = 3
      selection_error  = 4
      OTHERS           = 5.

      else.
  CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
      mask             = pv_filter
      mode             = '0'
      title            = 'Template download'
    IMPORTING
      filename         = pv_fd
    EXCEPTIONS
      inv_winsys       = 1
      no_batch         = 2
      selection_cancel = 3
      selection_error  = 4
      OTHERS           = 5.

        endif.

  IF pv_fd IS NOT INITIAL.
    CLEAR: gs_key.

    gs_key-relid = 'MI'.
    gs_key-objid = pv_objid.

    CALL FUNCTION 'DOWNLOAD_WEB_OBJECT'
      EXPORTING
        key         = gs_key
        destination = pv_fd.

    CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
      EXPORTING
        full_name     = pv_fd
      IMPORTING
        stripped_name = gv_stripped_name
        file_path     = gv_file_path.


  ENDIF.
ENDFORM. " FRM_DOWNLOAD_TMP
*&---------------------------------------------------------------------*
*&      Form  BDC_DYNPRO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->PROGRAM    text
*      -->DYNPRO     text
*----------------------------------------------------------------------*
FORM bdc_dynpro USING program dynpro.
  CLEAR bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = 'X'.
  APPEND bdcdata.
ENDFORM. "BDC_DYNPRO

*----------------------------------------------------------------------*
*        Insert field                                                  *
*----------------------------------------------------------------------*
FORM bdc_field USING fnam fval.
  DATA: lv_fval TYPE string.
  lv_fval = fval.
  CONDENSE lv_fval.
  CLEAR bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = lv_fval.
  APPEND bdcdata.
ENDFORM. "BDC_FIELD

需要的结构类型定义:
在这里插入图片描述

3.ZALSM_EXCEL_TO_INTERNAL_TABLE 接口代码

FUNCTION zalsm_excel_to_internal_table .
*"----------------------------------------------------------------------
*"*"本地接口:
*"  IMPORTING
*"     VALUE(FILENAME) LIKE  RLGRAP-FILENAME
*"     VALUE(SHEET_NAME) TYPE  CHAR50 OPTIONAL
*"     VALUE(I_BEGIN_COL) TYPE  I
*"     VALUE(I_BEGIN_ROW) TYPE  I
*"     VALUE(I_END_COL) TYPE  I
*"     VALUE(I_END_ROW) TYPE  I
*"  TABLES
*"      INTERN STRUCTURE  ZALSMEX_TABLINE
*"  EXCEPTIONS
*"      INCONSISTENT_PARAMETERS
*"      UPLOAD_OLE
*"----------------------------------------------------------------------

  DATA: excel_tab     TYPE  ty_t_sender.
  DATA: ld_separator  TYPE  c.
  DATA: application TYPE  ole2_object,
        workbook    TYPE  ole2_object,
        range       TYPE  ole2_object,
        worksheet   TYPE  ole2_object.
  DATA: h_cell  TYPE  ole2_object,
        h_cell1 TYPE  ole2_object.
  DATA:
    ld_rc             TYPE i.
*   Rückgabewert der Methode "clipboard_export     "

* Makro für Fehlerbehandlung der Methods
  DEFINE m_message.
    CASE sy-subrc.
      WHEN 0.
      WHEN 1.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      WHEN OTHERS. RAISE upload_ole.
    ENDCASE.
  END-OF-DEFINITION.


* check parameters
  IF i_begin_row > i_end_row. RAISE inconsistent_parameters. ENDIF.
  IF i_begin_col > i_end_col. RAISE inconsistent_parameters. ENDIF.

* Get TAB-sign for separation of fields
  CLASS cl_abap_char_utilities DEFINITION LOAD.
  ld_separator = cl_abap_char_utilities=>horizontal_tab.

* open file in Excel
  IF application-header = space OR application-handle = -1.
    CREATE OBJECT application 'Excel.Application'.
    m_message.
  ENDIF.
  CALL METHOD OF application 'Workbooks' = workbook.
  m_message.
  CALL METHOD OF workbook 'Open' EXPORTING #1 = filename.
*  m_message.
*add by hubert begin---------
  sy-subrc = 0. "强制
*  set property of application 'Visible' = 1.
*  m_message.

  IF sheet_name = space."用默认模式
    GET PROPERTY OF application 'ACTIVESHEET' = worksheet.
    m_message.
  ELSE.
*   -->读取指定SHEET
    CALL METHOD OF application 'WORKSHEETS' = worksheet
    EXPORTING
    #1 = sheet_name.
*    #2 = 0              "UpdateLinks
*    #3 = 0              "ReadOnly
*    #4 = 1.              "Format
    CALL METHOD OF worksheet 'Activate'.
    m_message.
  ENDIF.
*add by hubert end--------
*
*  GET PROPERTY OF  application 'ACTIVESHEET' = worksheet.
*  m_message.

* mark whole spread sheet
  CALL METHOD OF worksheet 'Cells' = h_cell
      EXPORTING #1 = i_begin_row #2 = i_begin_col.
  m_message.
  CALL METHOD OF worksheet 'Cells' = h_cell1
      EXPORTING #1 = i_end_row #2 = i_end_col.
  m_message.

  CALL METHOD  OF worksheet 'RANGE' = range
                 EXPORTING #1 = h_cell #2 = h_cell1.
  m_message.
  CALL METHOD OF range 'SELECT'.
  m_message.

* copy marked area (whole spread sheet) into Clippboard
  CALL METHOD OF range 'COPY'.
  m_message.

* read clipboard into ABAP
  CALL METHOD cl_gui_frontend_services=>clipboard_import
    IMPORTING
      data       = excel_tab
    EXCEPTIONS
      cntl_error = 1
*     ERROR_NO_GUI         = 2
*     NOT_SUPPORTED_BY_GUI = 3
      OTHERS     = 4.
  IF sy-subrc <> 0.
    MESSAGE a037(alsmex).
  ENDIF.

  PERFORM separated_to_intern_convert TABLES excel_tab intern
                                      USING  ld_separator.

* clear clipboard
  REFRESH excel_tab.
  CALL METHOD cl_gui_frontend_services=>clipboard_export
    IMPORTING
      data       = excel_tab
    CHANGING
      rc         = ld_rc
    EXCEPTIONS
      cntl_error = 1
*     ERROR_NO_GUI         = 2
*     NOT_SUPPORTED_BY_GUI = 3
      OTHERS     = 4.

* quit Excel and free ABAP Object - unfortunately, this does not kill
* the Excel process
  CALL METHOD OF application 'QUIT'.
  m_message.

* >>>>> Begin of change note 575877
* to kill the Excel process it's necessary to free all used objects
  FREE OBJECT h_cell.       m_message.
  FREE OBJECT h_cell1.      m_message.
  FREE OBJECT range.        m_message.
  FREE OBJECT worksheet.    m_message.
  FREE OBJECT workbook.     m_message.
  FREE OBJECT application.  m_message.
* <<<<< End of change note 575877
ENDFUNCTION.

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

酷开科技大屏营销,撬动营销新增量

5G、人工智能、元宇宙等技术的发展促使数字营销的内容、渠道、传播方式发生了一系列变化&#xff1b;存量竞争下&#xff0c;增长成为企业更加迫切、更具挑战的课题&#xff0c;品牌营销活动越来越围绕“生意增长”和“提效转化”的目标展开。 如今的市场环境下&#xff0c;产…

计算机毕业论文选题推荐|软件工程|信息管理|数据分析|系列一

文章目录 导文题目导文 计算机毕业论文选题推荐|软件工程|信息管理 (***语言)==使用其他任何编程语言 例如:基于(***语言)门窗账务管理系统的设计与实现 得到:基于JAVA门窗账务管理系统的设计与实现 基于vue门窗账务管理系统的设计与实现 等等 题目 基于requests多线程…

BERT系列算法解读:(RoBERTa/ALBERT/DistilBERT/Transformer/Hugging Face/NLP/预训练模型/模型蒸馏)

BERT&#xff08;Bidirectional Encoder Representations from Transformers&#xff0c;基于Transformers的双向编码器表示&#xff09;系列算法在自然语言处理任务中是必不可少的经典模型&#xff0c;当初第一代GPT模型发布的时候&#xff0c;坐了冷板凳&#xff0c;罪魁祸首…

【C++】-list的具体使用

&#x1f496;作者&#xff1a;小树苗渴望变成参天大树&#x1f388; &#x1f389;作者宣言&#xff1a;认真写好每一篇博客&#x1f4a4; &#x1f38a;作者gitee:gitee✨ &#x1f49e;作者专栏&#xff1a;C语言,数据结构初阶,Linux,C 动态规划算法&#x1f384; 如 果 你 …

漏洞复现畅捷通CRM SQL注入

免责声明 术文章仅供参考,任何个人和组织使用网络应当遵守宪法法律,遵守公共秩序,尊重社会公德,不得利用网络从事危害国家安全、荣誉和利益,未经授权请勿利用文章中的技术资料对任何计算机系统进行入侵操作。利用此文所提供的信息而造成的直接或间接后果和损失,均由使用…

.NET SqlSuger初次使用

文章目录 前言SqlSuger测试DB Fisrt和CodeFirst 前言 我之前在B站上面发视频说如何使用EF框架去生成实体类。我当时做了Mysql,Sql server,Sqlite的适配。但是下面评论区说SqlSuger很好用&#xff0c;而且很多公司都用SqlSuger。 B站视频&#xff1a;C#如何快速开发数据库业务…

VsCode连不上Server,但SSH可以

造成的原因可能是因为Client处Vscode更新与Server端"~/.vscode-server"文件夹内的版本不匹配&#xff0c;通常来说直接删除该文件夹即可。 但是有时该文夹内有几个问价被占用&#xff1a;“resource busy”,且该文件处于内核态&#xff0c; 通过&#xff1a;“lsof…

Nginx学习之一撸到底

一、Nginx环境搭建 ❶首先创建Nginx的目录并进入&#xff1a; [rootlocalhost]# mkdir /soft && mkdir /soft/nginx/ [rootlocalhost]# cd /soft/nginx/ ❷下载Nginx的安装包&#xff0c;可以通过FTP工具上传离线环境包&#xff0c;也可通过wget命令在线获取安装包…

Python与matlab 实现图像加密--扩散加密

1、图像加密 使用扩散加密 图像加密中,扩散处理是在不改变像素点位置的条件下,将任一明文像素点的信息隐藏在尽可能多的密文像素点中。 基于异或运算的扩散处理 正向(i从1到MN)的算法与其逆算法: 逆向(i从MN到1)的算法与其逆算法: C和S是密码向量,P是明文图像 Python…

本地拉取github上的项目失败,解决办法?

1.Step1&#xff1a;可以复制github上的仓库地址&#xff1b; 比如&#xff1a; https://github.com/FISCO-BCOS/fisco-package-build-tool.git2.Step2&#xff1a;打开自己的码云&#xff0c;并登录进去&#xff0c;没有的可以注册一个&#xff0c;按照下面步骤操作&#xff…

二分模板简单记忆

时间复杂度 O ( l o g n ) O(logn) O(logn) 三个模板 整数二分&#xff08;两个&#xff09; int 答案右区间(int l, int r) {while (l < r){int mid l r >> 1;if (在答案区间(mid)) r mid;else l mid 1;}return l; }// ####################################…

Unity游戏源码分享-射击游戏Low Poly FPS Pack 3.2

Unity游戏源码分享-射击游戏Low Poly FPS Pack 3.2 项目地址&#xff1a;https://download.csdn.net/download/Highning0007/88057717

ES系列--打分机制

一、文档打分机制 当你通过关键字搜索相关文档时&#xff0c;可能会出现多个文档&#xff0c;这些文档的顺序是通过一个max_score属性的大小从高到低顺序展现出来的&#xff0c;max_score属性就是我们所说的评分。而这个评分是通过一个文档打分机制计算出来的。 二、打分原理 …

和鲸社区数据分析每周挑战【第九十八期:企业贷款审批分析】

和鲸社区数据分析每周挑战【第九十八期&#xff1a;企业贷款审批分析】 文章目录 和鲸社区数据分析每周挑战【第九十八期&#xff1a;企业贷款审批分析】一、背景描述二、数据说明三、问题描述四、数据加载五、数据清洗和预处理六、数据探索与分析1、贷款金额分布2、各州的贷款…

Vue渲染系统模块

我们想要实现一个简洁版的Mini-Vue框架&#xff0c;应该包含三个模块&#xff1a;分别是&#xff1a;渲染系统模块、可响应式系统模块、应用程序入库模块。 这篇就来写一下渲染系统模块。剩下两个模块后面有时间再更新。 vue渲染系统实现&#xff0c;应该包含三个功能&#x…

linux之Ubuntu系列(二)远程管理指令

shutdown shutdown 选项 时间 关机或重启 选项&#xff1a; -r 重新启动 提示 不指定选项和参数&#xff0c;默认表示1分钟之后 关闭电脑用SSH远程维护服务器时&#xff0c;最好不要关闭系统&#xff0c;而应该重新启动系统 -r shutdown常用示例 # 1分钟后关机 shutdown …

【C语言初阶(17)】初阶指针

文章目录 Ⅰ指针的概念Ⅱ 指针和指针类型⒈指针 - 整数⒉指针的解引用 Ⅲ 野指针⒈野指针成因⒉规避野指针 Ⅳ 指针运算⒈指针 - 整数⒉指针 - 指针⒊指针的关系运算 Ⅴ 指针和数组Ⅵ 二级指针Ⅶ 指针数组 Ⅰ指针的概念 指针的两个要点 指针是内存中一个最小单元的编号&#…

使用 torch.stft 进行短时傅里叶变换

python 常规的 stft 都是在 cpu 上进行计算&#xff0c;如果网络训练是在 GPU 上进行&#xff0c;那么就涉及到数据传输的问题&#xff0c;降低计算效率&#xff1b;而 torch 自带的 stft 可以直接在 GPU 上进行计算&#xff0c;因此可以节省计算时间。 import torch import t…

简单版本视频播放服务器V3-前端优化-播放器在左,列表在右侧【推荐】【完成】

做个家用版本的家庭影院&#xff0c;通过这个服务器可以给电脑&#xff0c;平板&#xff0c;手机等设备提供直接播放电影的作用&#xff0c;通过离线下载电影放入目录里就是就可以给全家提供电影播放了&#xff0c;通过浏览器就是可以访问电脑里面的视频&#xff0c;实现简单的…