WEBDYNPRO FPM 框架

框架搭建

1、FPM_OVP_COMPONENT

 1 METHOD change_toolbar_btn .2 * enabled     "ABAP_TRUE可用 ABAP_FALSE不可用3 * visibility  "01不可见 02可见4   DATA: ls_btn TYPE if_fpm_ovp=>ty_s_toolbar_button.5   CHECK wd_this->mo_cnr IS BOUND.6 7   TRY .8       CLEAR:ls_btn.9       wd_this->mo_cnr->get_toolbar_button(
10         EXPORTING
11           iv_toolbar_element_id = id
12         IMPORTING
13           es_toolbar_button     = ls_btn
14       ).
15       CHECK ls_btn IS NOT INITIAL.
16 
17 *      IF text IS SUPPLIED.
18       ls_btn-text = text.
19 *      ENDIF.
20       IF enabled IS SUPPLIED.
21         ls_btn-enabled = enabled.
22       ENDIF.
23       IF visibility IS SUPPLIED.
24         ls_btn-visibility = visibility.
25       ENDIF.
26 
27       wd_this->mo_cnr->change_toolbar_button(
28         iv_content_area   = \'PAGE_1\'
29         is_toolbar_button = ls_btn ).
30     CATCH cx_root INTO DATA(lo_err).
31       DATA(lv_txt) = lo_err->get_text( ).
32   ENDTRY.
33 
34 ENDMETHOD.
1 METHOD fire_view_action .
2 
3   DATA: lo_action TYPE REF TO cl_wdr_action.
4   lo_action ?= wd_this->z_curr_view->get_action( action_name ).
5   CHECK lo_action IS BOUND.
6   lo_action->fire( ).
7 
8 ENDMETHOD.
 1 METHOD init_toolbar .2 3   DATA: lt_elm     TYPE if_fpm_ovp=>ty_t_toolbar_element,4         lv_txt     TYPE fpm_text,5         lv_enable  TYPE fpm_enabled,6         lv_visible TYPE fpm_visibility.7 8   wd_this->mo_fpm = cl_fpm_factory=>get_instance( ).9   wd_this->mo_cnr ?= wd_this->mo_fpm->get_service( `CNR_OVP` ).
10 
11   TRY.
12       wd_this->mo_cnr->get_toolbar_elements( IMPORTING et_toolbar_element = lt_elm ).
13     CATCH cx_root INTO DATA(lo_err).
14       DATA(lv_err_txt) = lo_err->get_text( ).
15   ENDTRY.
16 
17   LOOP AT lt_elm INTO DATA(ls_elm).
18     CLEAR:lv_txt.
19     CASE ls_elm-element_id.
20       WHEN \'FPM_SAVE_1\'.
21         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/SAVE\' ).
22         lv_enable = abap_true.
23         lv_visible = 2.
24 
25       WHEN \'FPM_CANCEL_1\'.
26         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/ZCX\' ).
27         lv_enable = abap_true.
28         lv_visible = 2.
29 
30       WHEN \'ZMDG_COMMIT\'.
31         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/COMMIT\' ).
32         lv_enable = abap_true.
33         lv_visible = 2.
34 
35       WHEN \'ZMDG_COMMITSP\'.
36         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/SP\' ).
37         lv_enable = abap_true.
38         lv_visible = 1.
39 
40       WHEN \'ZMDG_COMMITSPJJ\'.
41         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/SPJJ\' ).
42         lv_enable = abap_true.
43         lv_visible = 1.
44 
45       WHEN OTHERS.
46     ENDCASE.
47 
48     CHECK lv_txt IS NOT INITIAL.
49     change_toolbar_btn(
50       id         = ls_elm-element_id
51       text       = lv_txt
52       enabled    = lv_enable
53       visibility = lv_visible
54     ).
55   ENDLOOP.
56 
57 ENDMETHOD.
  1 METHOD modify_toolbar .2 3 *  get view context4   DATA lo_view_context TYPE REF TO if_wd_context_node.5   lo_view_context ?= wd_this->z_curr_view->get_context( )->root_node.6 7   DATA: lo_nd_read_only    TYPE REF TO if_wd_context_node,8         lo_nd_dispaly_only TYPE REF TO if_wd_context_node,9         lo_el_read_only    TYPE REF TO if_wd_context_element,10         lo_el_dispaly_only TYPE REF TO if_wd_context_element.11 12   DATA: lv_commitoa       TYPE wdy_boolean,13         lv_read_commit    TYPE wdy_boolean,14         lv_dispaly_commit TYPE wdy_boolean.15 16 *   get node17   lo_nd_read_only = lo_view_context->get_child_node( name = wd_this->wdctx_read_only ).18   lo_nd_dispaly_only = lo_view_context->get_child_node( name = wd_this->wdctx_dispaly_only ).19 20 *   get element21   lo_el_read_only = lo_nd_read_only->get_element( ).22   lo_el_dispaly_only = lo_nd_dispaly_only->get_element( ).23   CHECK lo_el_read_only IS NOT INITIAL.24   CHECK lo_el_dispaly_only IS NOT INITIAL.25 26 *   get single attribute27   lo_el_read_only->get_attribute(28     EXPORTING29       name  = `COMMITOA`30     IMPORTING31       value = lv_commitoa ).32   lo_el_read_only->get_attribute(33     EXPORTING34       name  = `COMMIT`35     IMPORTING36       value = lv_read_commit ).37   lo_el_dispaly_only->get_attribute(38     EXPORTING39       name  = `COMMIT`40     IMPORTING41       value = lv_dispaly_commit ).42 43 44 45 *  change toolbar buttons attr.46   DATA: lt_elm     TYPE if_fpm_ovp=>ty_t_toolbar_element,47         lv_txt     TYPE fpm_text,48         lv_enable  TYPE fpm_enabled,49         lv_visible TYPE fpm_visibility.50   TRY.51       wd_this->mo_cnr->get_toolbar_elements( IMPORTING et_toolbar_element = lt_elm ).52     CATCH cx_root INTO DATA(lo_err).53       DATA(lv_err_txt) = lo_err->get_text( ).54   ENDTRY.55 56   LOOP AT lt_elm INTO DATA(ls_elm).57     CASE ls_elm-element_id.58       WHEN \'FPM_SAVE_1\'.59         lv_enable = lv_commitoa.60         IF lv_read_commit = abap_true.61           lv_visible = 2. "Visible62         ELSE.63           lv_visible = 1. "Invisible64         ENDIF.65         IF lv_visible = 1.66           lv_enable = abap_false.67         ENDIF.68         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/SAVE\' ).69 70       WHEN \'FPM_CANCEL_1\'.71         lv_enable = abap_true.72         IF lv_read_commit = abap_true.73           lv_visible = 2. "Visible74         ELSE.75           lv_visible = 1. "Invisible76         ENDIF.77         IF lv_visible = 1.78           lv_enable = abap_false.79         ENDIF.80         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/ZCX\' ).81 82       WHEN \'ZMDG_COMMIT\'.83         lv_enable = lv_commitoa.84         IF lv_read_commit = abap_true.85           lv_visible = 2. "Visible86         ELSE.87           lv_visible = 1. "Invisible88         ENDIF.89         IF lv_visible = 1.90           lv_enable = abap_false.91         ENDIF.92         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/COMMIT\' ).93 94       WHEN \'ZMDG_COMMITSP\'.95         lv_enable = abap_true.96         IF lv_dispaly_commit = abap_true.97           lv_visible = 2. "Visible98         ELSE.99           lv_visible = 1. "Invisible
100         ENDIF.
101         IF lv_visible = 1.
102           lv_enable = abap_false.
103         ENDIF.
104         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/SP\' ).
105 
106       WHEN \'ZMDG_COMMITSPJJ\'.
107         lv_enable = abap_true.
108         IF lv_dispaly_commit = abap_true.
109           lv_visible = 2. "Visible
110         ELSE.
111           lv_visible = 1. "Invisible
112         ENDIF.
113         IF lv_visible = 1.
114           lv_enable = abap_false.
115         ENDIF.
116         lv_txt = cl_wd_utilities=>get_otr_text_by_alias( alias = \'ZMDG01/SPJJ\' ).
117 
118       WHEN OTHERS.
119     ENDCASE.
120 
121     change_toolbar_btn(
122       id         = ls_elm-element_id
123       text       = lv_txt
124       enabled    = lv_enable
125       visibility = lv_visible
126     ).
127 
128   ENDLOOP.
129 
130 ENDMETHOD.
 1 METHOD needs_confirmation .2 3   CASE io_event->mv_event_id.4     WHEN \'FPM_CLOSE\'.5       DATA(lo_win_mngr) = wd_this->wd_get_api( )->get_window_manager( ).6       DATA: lt_text TYPE string_table.7       lt_text = VALUE #( ( `未保存的数据将会丢失,是否继续?` ) ).8       CALL METHOD lo_win_mngr->create_popup_to_confirm9         EXPORTING
10           text         = lt_text
11           button_kind  = 5    "Yes,No,Cancel
12           message_type = if_wd_message_manager=>co_type_warning
13 *         close_button = ABAP_TRUE
14 *         window_title =
15 *         window_left_position =
16 *         window_top_position  =
17 *         window_position      =
18 *         window_width =
19 *         window_height        =
20 *         default_button       =
21         RECEIVING
22           result       = DATA(lo_popup_window).
23 *      IF lO_POPUP_WINDOW NE 1.
24 *        wd_this->wd_get_api( )->cancel_navigation( ).
25 *      ENDIF.
26 
27     WHEN OTHERS.
28   ENDCASE.
29 
30 ENDMETHOD.
 1 METHOD popup_confirm .2 3   DATA(lo_win_mngr) = wd_this->wd_get_api( )->get_window_manager( ).4   DATA: lt_text TYPE string_table.5   lt_text = VALUE #( ( `未保存的数据将会丢失,是否继续?` ) ).6   CALL METHOD lo_win_mngr->create_popup_to_confirm7     EXPORTING8       text         = lt_text9       button_kind  = 4    "Yes,No
10       message_type = if_wd_message_manager=>co_type_warning
11       close_button = abap_false
12 *     window_title =
13 *     window_left_position =
14 *     window_top_position  =
15 *     window_position      =
16 *     window_width =
17 *     window_height        =
18 *     default_button       =
19     RECEIVING
20       result       = DATA(lo_popup_window).
21 
22   lo_popup_window->subscribe_to_button_event(
23     button      = if_wd_window=>co_button_yes
24 *   BUTTON_TEXT = \'\'
25 *   TOOLTIP     =
26     action_name = \'ZYES\'
27     action_view = wd_this->z_curr_view
28   ).
29 
30   lo_popup_window->subscribe_to_button_event(
31     button      = if_wd_window=>co_button_no
32 *   BUTTON_TEXT = \'\'
33 *   TOOLTIP     =
34     action_name = \'ZNO\'
35     action_view = wd_this->z_curr_view
36   ).
37 
38   lo_popup_window->open( ).
39 
40 
41 
42 
43 ENDMETHOD.
 1 METHOD process_event .2 3   CASE io_event->mv_event_id.4     WHEN \'FPM_SAVE\'.5       fire_view_action( \'SAVE_DATA\' ).6 7     WHEN \'FPM_CANCEL\'.8 *      fire_view_action( \'ZCX\' ).9       wd_this->zf_close = abap_true.
10       wd_this->mo_fpm->raise_event_by_id( \'FPM_CLOSE\' ).
11 
12     WHEN \'FPM_CLOSE\'.
13       popup_confirm( ).
14 
15     WHEN \'ZMDG_COMMIT\'.
16       fire_view_action( \'COMMITOA\' ).
17 
18     WHEN \'ZMDG_COMMITSP\'.
19       fire_view_action( \'COMMIT_APPROVE\' ).
20 
21     WHEN \'ZMDG_COMMITSPJJ\'.
22       fire_view_action( \'COMMIT_SPJJ\' ).
23 
24     WHEN OTHERS.
25   ENDCASE.
26 
27   modify_toolbar( ).
28 
29 ENDMETHOD.
 1 METHOD report_msg .2 3 *   get message manager4   DATA lo_api_controller     TYPE REF TO if_wd_controller.5   DATA lo_message_manager    TYPE REF TO if_wd_message_manager.6 7   lo_api_controller ?= wd_This->Wd_Get_Api( ).8 9   CALL METHOD lo_api_controller->get_message_manager
10     RECEIVING
11       message_manager = lo_message_manager.
12 
13 *   report message
14   CALL METHOD lo_message_manager->report_message
15     EXPORTING
16       message_text = text
17       message_type = type.
18 
19 ENDMETHOD.
1 METHOD wddobeforenavigation .
2 
3   IF wd_this->z_inited = abap_true.
4     DATA(lo_navi_to) = wd_this->mo_fpm->get_navigate_to( ).
5     popup_confirm( ).
6   ENDIF.
7 
8 ENDMETHOD.
  1 METHOD wddoinit .2 3   DATA lo_nd_header_data TYPE REF TO if_wd_context_node.4   DATA lo_nd_header_data_info TYPE REF TO if_wd_context_node_info.5   DATA ls_header_data TYPE wd_this->element_header_data.6 7   DATA lt_value_set TYPE wdr_context_attr_value_list.8   DATA ls_value_set TYPE wdr_context_attr_value.9   lo_nd_header_data = wd_context->get_child_node( name = wd_this->wdctx_header_data ).10   lo_nd_header_data_info = lo_nd_header_data->get_node_info( ).11 * define list of raddiobuttons by changing type infos of attribute bound to property selectedKey12 13   SELECT * INTO TABLE @DATA(lt_tvtwt) FROM tvtwt WHERE spras = @sy-langu AND vtweg >= \'10\' AND vtweg <= \'50\'.14   LOOP AT lt_tvtwt INTO DATA(ls_tvtwt).15     ls_value_set-text  = ls_tvtwt-vtext.16     ls_value_set-value = ls_tvtwt-vtweg.17     APPEND ls_value_set TO lt_value_set.18   ENDLOOP.19   lo_nd_header_data_info->set_attribute_value_set( name = \'VTWEG\' value_set = lt_value_set ).20 21   REFRESH lt_value_set.22   SELECT * INTO TABLE @DATA(lt_t077x) FROM t077x WHERE spras = @sy-langu AND ( ktokd = \'Z001\' OR ktokd = \'Z002\') .23   LOOP AT lt_t077x INTO DATA(ls_t077x).24     ls_value_set-text  = ls_t077x-txt30.25     ls_value_set-value = ls_t077x-ktokd.26     APPEND ls_value_set TO lt_value_set.27   ENDLOOP.28   lo_nd_header_data_info->set_attribute_value_set( name = \'KTOKD\' value_set = lt_value_set ).29   REFRESH lt_value_set.30 31   SELECT * INTO TABLE @DATA(lt_T005T) FROM t005t WHERE spras = @sy-langu  .32   LOOP AT lt_T005T INTO DATA(ls_T005T).33     ls_value_set-text  = ls_T005T-landx.34     ls_value_set-value = ls_T005T-land1.35     APPEND ls_value_set TO lt_value_set.36   ENDLOOP.37   lo_nd_header_data_info->set_attribute_value_set( name = \'LAND1\' value_set = lt_value_set ).38   REFRESH lt_value_set.39 40   DATA: i_input  TYPE dd07v,o_output TYPE dd07v.41   i_input-domname = \'ZDCJLXS\'.42 43   i_input-domvalue_l = \'A1\'.44   CALL FUNCTION \'ZMDG_GET_DD07V\'45     EXPORTING46       i_input  = i_input47     IMPORTING48       o_output = o_output.49   ls_value_set-text  = o_output-ddtext ."\'新增客户代码\'.50   ls_value_set-value = \'A1\'.51   APPEND ls_value_set TO lt_value_set.52   i_input-domvalue_l = \'A2\'.53   CALL FUNCTION \'ZMDG_GET_DD07V\'54     EXPORTING55       i_input  = i_input56     IMPORTING57       o_output = o_output.58   ls_value_set-text  = o_output-ddtext ."\'客户抬头变更\'.59   ls_value_set-value = \'A2\'.60   APPEND ls_value_set TO lt_value_set.61   i_input-domvalue_l = \'A3\'.62   CALL FUNCTION \'ZMDG_GET_DD07V\'63     EXPORTING64       i_input  = i_input65     IMPORTING66       o_output = o_output.67   ls_value_set-text  = o_output-ddtext ."\'送达方变售达方\'.68   ls_value_set-value = \'A3\'.69   APPEND ls_value_set TO lt_value_set.70   i_input-domvalue_l = \'A4\'.71   CALL FUNCTION \'ZMDG_GET_DD07V\'72     EXPORTING73       i_input  = i_input74     IMPORTING75       o_output = o_output.76   ls_value_set-text  = o_output-ddtext ."\'与关联企业共用编码\'.77   ls_value_set-value = \'A4\'.78   APPEND ls_value_set TO lt_value_set.79 80   lo_nd_header_data_info->set_attribute_value_set( name = \'ZCJLX\' value_set = lt_value_set ).81   REFRESH lt_value_set.82 83   DATA lo_el_header_data TYPE REF TO if_wd_context_element.84 85 * navigate from <CONTEXT> to <HEADER_DATA> via lead selection86   lo_nd_header_data = wd_context->get_child_node( name = wd_this->wdctx_header_data ).87 88 * get element via lead selection89   lo_el_header_data = lo_nd_header_data->get_element( ).90 91   SELECT SINGLE bname name_text zssbm zssgs zcqb92    INTO (ls_header_data-bname,ls_header_data-bnametext,ls_header_data-zssbm,ls_header_data-zssgs,ls_header_data-zcqb)93    FROM v_username94   INNER JOIN ztoasapuser ON ztoasapuser~zsapuname = v_username~bname95   WHERE bname = sy-uname .96 97 *   set all declared attributes98   lo_el_header_data->set_static_attributes(99      static_attributes = ls_header_data ).
100 
101 
102 
103   init_toolbar( ).
104 
105 ENDMETHOD.

PFCG配置

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

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

相关文章

2011-2022年北大数字普惠金融指数“第五期”(包括省市县)

2011-2022年北大数字普惠金融指数“第五期”&#xff08;包括省市县&#xff09; 1、时间&#xff1a;2011-2022年 其中县级的时间为2014-2022年 2、来源&#xff1a;北大数字普惠金融指数 3、范围&#xff1a;全国31省&#xff0c;337个地级市以及2800个县 4、指标&#x…

API调试?试试Apipost

你是否经常遇到接口开发过程中的各种问题&#xff1f;或许你曾为接口测试与调试的繁琐流程而烦恼。不要担心&#xff01;今天我将向大家介绍一款功能强大、易于上手的接口测试工具——Apipost&#xff0c;并带你深入了解如何玩转它&#xff0c;轻松实现接口测试与调试。 什么是…

linux更新内核

内核介绍 官网链接:https://kernel.org 内核下载库: https://mirrors.edge.kernel.org/pub/linux/kernel/ 更新软件源 rootcary:~# apt-get update rootcary:~# sudo apt-get install libncurses5-dev build-essential kernel-package flex bison libelf-dev libssl-dev 下…

机器学习实验报告——Bayes算法

目录 一、算法介绍 1.1算法背景 1.2算法假设 1.3 贝叶斯与朴素贝叶斯 1.4算法原理 二、算法推导 2.1朴素贝叶斯介绍 2.2朴素贝叶斯算法推导 2.2.1先验后验概率 2.2.2条件概率公式 2.3 独立性假设 2.4 朴素贝叶斯推导 三、算法实现 3.1数据集描述 3.2代码实现 四…

SpringBoot:Bean生命周期自定义初始化和销毁

&#x1f3e1;浩泽学编程&#xff1a;个人主页 &#x1f525; 推荐专栏&#xff1a;《深入浅出SpringBoot》《java项目分享》 《RabbitMQ》《Spring》《SpringMVC》 &#x1f6f8;学无止境&#xff0c;不骄不躁&#xff0c;知行合一 文章目录 前言一、Bean注解指…

如何做好一个信息系统项目经理,一个项目经理的个人体会和经验总结(三)

前言 今天我们继续聊聊在 项目开发阶段&#xff0c;项目经理需要做好的事情 &#x1f603; 二、项目开发阶段&#xff08;续&#xff09; 4. 控制好项目开发质量 要控制好项目开发质量&#xff0c;主要是依赖测试&#xff0c;好的产品都是靠不断地测试&#xff0c;不断地试…

《WebKit 技术内幕》学习之四(3): 资源加载和网络栈

3. 网络栈 3.1 WebKit的网络设施 WebKit的资源加载其实是交由各个移植来实现的&#xff0c;所以WebCore其实并没有什么特别的基础设施&#xff0c;每个移植的网络实现是非常不一样的。 从WebKit的代码结构中可以看出&#xff0c;网络部分代码的确比较少的&#xff0c;它们都在…

西方企业在与中国的竞争中,无可避免地“效仿中国”

长期以来&#xff0c;在西方观察家的视野里&#xff0c;中国科技领域的成功突破主要归结于三大支柱&#xff1a;一是中国建立了完备的基础设施网络&#xff1b;二是大量创新型企业如雨后春笋般涌现&#xff0c;以惊人的速度追赶乃至超越美国硅谷的企业&#xff1b;三是这些创新…

wps word 文档里的空白空间太大了

wps word 文档里的空白空间太大了&#xff0c;如下图1 点击【页面】--->【页边距】&#xff0c;把左边、右边的页边距调为0厘米。如下图2 点击【视图】--->【显示比例】从75%改为页宽&#xff0c;页宽的意思是使页面的宽度与窗口的宽度一致。如下图3 图1

浪花 - 用户加入队伍

一、接口设计 1. 请求参数&#xff1a;TeamJoinRequest package com.example.usercenter.model.request;import lombok.Data; import java.io.Serializable;/*** 加入队伍请求参数封装类*/ Data public class TeamJoinRequest implements Serializable {private static final…

用Axure RP 9制作弹出框

制作流程 1.准备文本框 下拉列表 按钮 动态面板 如图 2.先把下拉列表放好 再放动态面板覆盖 3.点动态面板 进入界面 如图 4.给按钮添加交互 3个按钮一样的 如图 5.提交按钮添加交互 如图

linux安装python3.11

yum -y gcc install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel下载地址 https://www.python.org/ftp/python/3.11.7/Python-3.11.7.tar.xz 上传python文件&#x…

Kafka(二)【文件存储机制 生产者】

目录 一、Kafka 文件存储机制 二、Kafka 生产者 1、生产者消息发送流程 1.1、发送原理 2、异步发送 API 2.1、普通异步发送 案例演示 2.2、带回调函数的异步发送 2.3、同步发送 API 3、生产者分区 3.1、分区的好处 3.2、生产者发送消息的分区策略 &#xff08;1&am…

基于springboot+vue的学科竞赛管理系统(前后端分离)

博主主页&#xff1a;猫头鹰源码 博主简介&#xff1a;Java领域优质创作者、CSDN博客专家、公司架构师、全网粉丝5万、专注Java技术领域和毕业设计项目实战 主要内容&#xff1a;毕业设计(Javaweb项目|小程序等)、简历模板、学习资料、面试题库、技术咨询 文末联系获取 研究背景…

12.常用统计分析方法——聚类分析

目录 基础知识 实操 层次聚类 划分聚类 方法一&#xff1a;K均值聚类&#xff08;最常见&#xff09; 方法二&#xff1a;基于中心点的划分&#xff08;PAM&#xff09; 避免不存在的类 基础知识 概念&#xff1a; 聚类分析是一种数据归约技术&#xff0c;旨在揭露一个…

Python基础之数据库操作

一、安装第三方库PyMySQL 1、在PyCharm中通过 【File】-【setting】-【Python Interpreter】搜索 PyMySQL进行安装 2、通过PyCharm中的 Terminal 命令行 输入: pip install PyMySQL 注&#xff1a;通过pip安装&#xff0c;可能会提示需要更新pip&#xff0c;这时可执行&#…

discuz论坛附件上传限制大小2MB

我遇到了这个问题&#xff0c;去修改了配置PHP.ini文件没有解决. 我把他变成2000M依旧没有用&#xff0c;然后我选择了用户组&#xff0c;附件部分。如图所示&#xff1a; 然后这个时候我还是没有好&#xff0c;我同事的却不限制大小了&#xff0c;我去清理缓存&#xff…

中文电码在历史关键时刻的作用

1. 中文电码&#xff1a;一段被遗忘的历史 中文电码是一种将汉字转换为电信号编码的方式&#xff0c;它的历史可以追溯到19世纪末。在当时&#xff0c;电报技术传入中国&#xff0c;为了实现汉字的电子传输&#xff0c;我国学者研究了一种将汉字转换为电码的方法。这种方法通过…

go语言(十七)----json

1、结构体转json package mainimport ("encoding/json""fmt" )type Movie struct{Title string json:"title"Year int json:"year"Price int json:"rmb"Actors []string json:"actors" }func main() {movie : Mo…

2024.1.23栈与队列总结篇

2024.1.23栈与队列总结篇 栈经典题目 栈在系统中的应用 如果还记得编译原理的话&#xff0c;编译器在词法分析的过程中处理括号、花括号等这个符号的逻辑&#xff0c;就是使用了栈这种数据结构。 再举个例子&#xff0c;linux系统中&#xff0c;cd这个进入目录的命令我们应该…