CN109635263B - Column width fixed display method and device based on WEB ultra-wide table and electronic equipment - Google Patents
Column width fixed display method and device based on WEB ultra-wide table and electronic equipment Download PDFInfo
- Publication number
- CN109635263B CN109635263B CN201811394542.6A CN201811394542A CN109635263B CN 109635263 B CN109635263 B CN 109635263B CN 201811394542 A CN201811394542 A CN 201811394542A CN 109635263 B CN109635263 B CN 109635263B
- Authority
- CN
- China
- Prior art keywords
- width
- columns
- column
- fixed
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/183—Tabulation, i.e. one-dimensional positioning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a column width fixed display method and device based on a WEB ultra-wide table and electronic equipment, belonging to the technical field of data processing, wherein the method comprises the following steps: determining a width sum L3 dynamically allocated to a non-fixed width column based on the obtained maximum width L1 of the table to be displayed and the width sum L2 of the fixed width column in the table to be displayed; traversing all columns of the table to be displayed, and putting columns which do not have the fixed width attribute in all columns into an array; sorting the columns with the smallest width attribute in the array according to the order from big to small; and comparing the size of each column in the array with the length of N after sequencing with the size of L3/N, and setting the width assignment of each column according to the comparison result. Through the processing scheme, the column width can be dynamically calculated, and the usability of the webpage table is improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a column width fixed display method and apparatus based on a WEB ultra-wide table, and an electronic device.
Background
In recent years, with the widespread use of internet technology, there has been an increasing demand for users to browse contents described by a markup language such as HTML on a computer device such as a computer, a smart device, or the like. Content on the internet needs to meet the needs of different computing devices for large and small screens simultaneously. Generally, the screen size of a personal computer is larger than that of a portable smart device. In some cases, the table contents targeted for personal computers are not generally problematic to display on large screen size computer devices, while for relatively small screen portable devices, internet contents are sometimes not properly displayed on their screens.
In HTML, the table contents are generally defined by a tag < table >, and the table displays the contents to be displayed in the table, typically in the form of a two-dimensional matrix. The content displayed in each table unit may be text content or picture content, and in order to enable the content in the table to be displayed in a certain style, the layout style of the table is generally set, for example, the minimum width of each column in the table is set.
In the prior art, a table in an html of a browser generally does not support a scene for small-width calculation, which results in that an ultra-wide table based on WEB exceeds the maximum display width of a screen when being displayed, and the display content of the table cannot be normally viewed.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method, an apparatus, and an electronic device for displaying a column width based on a super-wide WEB table, which at least partially solve the problems in the prior art.
In a first aspect, an embodiment of the present invention provides a column width fixed display method based on a WEB ultra-wide table, including:
determining a width sum L3 dynamically allocated to a non-fixed width column based on the obtained maximum width L1 of the table to be displayed and the width sum L2 of the fixed width column in the table to be displayed;
traversing all columns of the table to be displayed, and putting columns which do not have the fixed width attribute in all columns into an array;
sorting the columns with the smallest width attribute in the array according to the order from big to small;
and comparing the size of each column in the array with the length of N after sequencing with the size of L3/N, and setting the width assignment of each column according to the comparison result.
According to a specific implementation manner of the embodiment of the present invention, the determining, based on the obtained maximum width L1 of the table to be displayed and the width sum L2 of the fixed width columns in the table to be displayed, the width sum L3 dynamically allocated to the non-fixed width columns includes:
and calculating the difference value between the maximum width L1 of the table to be displayed and the sum L2 of the widths of the fixed width columns in the table to be displayed, and dynamically distributing the difference value to the sum L3 of the widths of the non-fixed width columns.
According to a specific implementation manner of the embodiment of the present invention, traversing all columns of the table to be displayed, and placing columns in an array, where the columns do not have a fixed width attribute, includes:
judging whether columns with fixed width values exist in all columns, and if so, not processing the columns.
According to a specific implementation manner of the embodiment of the present invention, traversing all columns of the table to be displayed, and placing columns in an array, where the columns do not have a fixed width attribute, further includes:
judging whether columns with the minimum width value exist in all columns, if so, putting the columns into the array, and recording the minimum width value of the columns.
According to a specific implementation manner of the embodiment of the present invention, traversing all columns of the table to be displayed, and placing columns in an array, where the columns do not have a fixed width attribute, further includes:
attributes of columns that have no fixed width value and minimum width value at the same time are defined as auto and put into the array.
According to a specific implementation manner of the embodiment of the present invention, the determining the width assignment of each column according to the comparison result includes:
no processing is performed for columns that do not have a minimum width value.
According to a specific implementation manner of the embodiment of the present invention, the determining the width assignment of each column according to the comparison result further includes:
for columns whose minimum width value is less than L3/N, its width value is assigned auto.
According to a specific implementation manner of the embodiment of the present invention, the determining the width assignment of each column according to the comparison result further includes:
for a column having a minimum width value greater than or equal to L3/N, the width value is assigned as the minimum width value, while the value of L3 is reduced by the same value as the width value of the column.
In a second aspect, an embodiment of the present invention provides a column width fixed display device based on a WEB ultra-wide table, including:
the determining module is used for determining a width sum L3 dynamically allocated to the non-fixed width column based on the obtained maximum width L1 of the table to be displayed and the width sum L2 of the fixed width column in the table to be displayed;
the traversing module is used for traversing all columns of the table to be displayed and putting columns which do not have the attribute of fixed width in the columns into an array;
the sorting module is used for sorting the columns with the smallest width attribute in the array according to the sequence from big to small;
the setting module is used for comparing each column in the ordered array with the length of N with the L3/N, and setting the width assignment of each column according to the comparison result.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of column width fixed presentation based on a WEB ultra-wide table in any one of the implementations of the foregoing Ren Di aspect or the first aspect.
In a fourth aspect, embodiments of the present invention further provide a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method for column width fixed presentation based on a WEB ultra-wide table in the foregoing first aspect or any implementation manner of the first aspect.
In a fifth aspect, embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of column width fixed presentation based on a WEB ultra-wide table in any one of the implementations of the first aspect or the first aspect.
The column width fixed display scheme based on the WEB ultra-wide table comprises the steps of determining a width sum L3 dynamically allocated to a non-fixed width column based on the acquired maximum width L1 of the table to be displayed and the width sum L2 of the fixed width column in the table to be displayed; traversing all columns of the table to be displayed, and putting columns which do not have the fixed width attribute in all columns into an array; sorting the columns with the smallest width attribute in the array according to the order from big to small; and comparing the size of each column in the array with the length of N after sequencing with the size of L3/N, and setting the width assignment of each column according to the comparison result. Through the processing scheme, the column width can be dynamically calculated, and the usability of the webpage table is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a column width fixing display flow based on a WEB ultra-wide table according to an embodiment of the present invention;
fig. 2 is a schematic diagram of another column width fixing display flow based on a WEB ultra-wide table according to an embodiment of the present invention;
fig. 3 is a schematic diagram of another column width fixing display flow based on a WEB ultra-wide table according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a column width fixing display device based on a WEB ultra-wide table according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should also be noted that the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a column width fixed display method based on a WEB ultra-wide table. The column width fixed display method based on the WEB super-wide table provided in the embodiment may be executed by a computing device, where the computing device may be implemented as software or as a combination of software and hardware, and the computing device may be integrally provided in a server, a terminal device, or the like.
Referring to fig. 1, the method for displaying column width fixation based on a WEB ultra-wide table provided by the embodiment of the invention includes the following steps:
s101, determining a width sum L3 dynamically allocated to a non-fixed width column based on the obtained maximum width L1 of the table to be displayed and the width sum L2 of the fixed width column in the table to be displayed.
Before the WEB form content is displayed, the maximum width of the form and the content in the form are usually stored in a corresponding server, and the attribute content related to the form can be obtained or obtained through inquiring the server, so that the maximum width L1 of the form to be displayed and the width sum L2 of the fixed width columns in the form to be displayed are obtained. The difference value between the maximum width L1 of the table to be displayed and the sum L2 of the widths of the fixed width columns in the table to be displayed can be calculated to be dynamically allocated to the sum L3 of the widths of the non-fixed width columns.
The maximum width L1 of the form to be displayed may be a predefined width value, or may be a matching value determined according to different devices of the display form. The fixed width column in the form to be displayed is a fixed value set to ensure that the contents in the form can be effectively displayed.
S102, traversing all columns of the table to be displayed, and putting columns which do not have the fixed width attribute in all columns into an array.
The to-be-displayed table is usually provided with default display attributes, the width of each column of the display table also has different width value settings, in order to be able to know the width values of all columns in the table, an ad hoc vertical array is used, and if a column has a fixed column width through traversal query, no processing is performed on the column. If the width value of a column is set to have the minimum width by traversing the query, the column is put into an array minArray, and the minimum width value is recorded in the array. If a column of the traversal query has neither a width value nor a minimum width value, the width value of the column is temporarily defined as auto, and the column is placed in the minArray array, and the minimum width value of the column is recorded as auto.
S103, sorting the columns with the smallest width attribute in the array according to the order from big to small.
The minimum width value of each column in the table may be the same or different, and for the case where the minimum width values of the columns in the table are different, a second carding may be performed to facilitate modification of columns that can readjust the column width within the effective L3 width range. For convenience of modification, the columns with the smallest width attribute in the array are ordered in order from large to small. In this way, columns with larger minimum width values can be preferentially processed. When the columns with the largest minimum width values meet the preset minimum width value requirement, other columns with the smallest width values can be not processed.
S104, comparing the size of each column in the array with the length of N after sequencing with the size of L3/N, and setting the width assignment of each column according to the comparison result.
After the arrays are ordered in the order from big to small, the column width of the table can be subjected to secondary assignment according to the column width values in the arrays. Specifically, the ordered minArray array can be traversed, and the length of the array is N. If a certain traversed column does not have the minimum width value, the column is determined to be a column with non-fixed width, and no processing is carried out on the column; if the minimum width value of a column traversed is < L3/N, the width of the column is assigned auto. If the minimum width value of a column traversed > =l3/N, the width of the column is assigned a minimum width value, while the value of L3 becomes [ L3-the width of the column ].
Through the above operation, it is possible to ensure that the width of all the fixed columns is defined width, the width of the non-fixed columns is auto, the width of the columns with the smallest width value is its predefined smallest width value or auto which is subjected to secondary assignment modification according to the total length requirement. So that the width of the table is more reasonable.
The total length L3 of the non-fixed width columns that can be assigned to the table may be different, i.e., L3 may be implemented using a variety of algorithms, depending on the application scenario. For example, the setting may be performed in a manner specified by the user. According to a specific implementation manner of the embodiment of the present invention, the determining, based on the obtained maximum width L1 of the table to be displayed and the width sum L2 of the fixed width columns in the table to be displayed, the width sum L3 dynamically allocated to the non-fixed width columns includes: and calculating the difference value between the maximum width L1 of the table to be displayed and the sum L2 of the widths of the fixed width columns in the table to be displayed, and dynamically distributing the difference value to the sum L3 of the widths of the non-fixed width columns.
Referring to fig. 2, according to a specific implementation manner of the embodiment of the present invention, traversing all columns of the table to be displayed, and placing columns in an array, where the columns do not have a fixed width attribute, includes:
s201, judging whether all columns have columns with fixed width values, if so, not processing the columns.
For columns with a fixed width value, the width value is usually required to show specific content, for example, the width of an image displayed in a certain column in a table is 50px, and at this time, the width value of the column can be set to be 50px to ensure the integrity of image display.
S202, judging whether columns with the minimum width value exist in all columns, if so, putting the columns into the array, and recording the minimum width value of the columns.
By setting the minimum width value in the column in the table, the minimum display content in the column can be ensured to be displayed in time, and when the column with the minimum width value is found in the traversal, the minimum width value of the column can be placed in the array, so that whether the setting of the minimum width value is reasonable or not is further judged.
S203, defining the attribute of the column without the fixed width value and the minimum width value as auto, and putting the attribute into the array.
For certain specific columns, the size of their width values does not have any effect on the presentation of the content in their column, for which their width value properties may be set to auto. Specifically, it can be checked whether the column has a fixed width value or a minimum width value setting, and if a column has neither a fixed width value nor a minimum width value, the attribute of the column is defined as auto.
Through the traversing steps in the steps S201 to S203, the width attribute of each column in the table can be timely obtained, and a guarantee is provided for subsequent resetting of the table width.
Referring to fig. 3, according to a specific implementation manner of the embodiment of the present invention, the determining the width assignment of each column according to the comparison result may include the following steps:
s301, no processing is performed for a column having no minimum width value.
S302, for columns with minimum width values smaller than L3/N, the width value is assigned as auto.
S303, for the columns with the minimum width value being greater than or equal to L3/N, assigning the width value to the minimum width value, and reducing the value of L3 by the same value as the width value of the column.
In the executing process of steps S301-S303, traversing the sequenced minArray, wherein the length of the array is N. If a certain traversed column does not have the minimum width value, the column is determined to be a column with non-fixed width, and no processing is carried out on the column; if the minimum width value of a column traversed is < L3/N, the width of the column is assigned auto. If the minimum width value of a certain column traversed > =l3/N, the width of the column is assigned as the minimum width, while the value of L3 becomes [ L3-the width of the column ].
Through the above operation, it is possible to ensure that the width of all the fixed columns is defined width, the width of the non-fixed columns is auto, the width of the columns with the smallest width value is its predefined smallest width value or auto which is subjected to secondary assignment modification according to the total length requirement. So that the width of the table is more reasonable.
Corresponding to the above method embodiment, referring to fig. 4, the embodiment of the present invention further provides a column width fixing display device 40 based on a WEB ultra-wide table, including:
the determining module 401 is configured to determine a width sum L3 dynamically allocated to a non-fixed width column based on the obtained maximum width L1 of the table to be displayed and a width sum L2 of the fixed width column in the table to be displayed.
Before the WEB form content is displayed, the maximum width of the form and the content in the form are usually stored in a corresponding server, and the attribute content related to the form can be obtained or obtained through inquiring the server, so that the maximum width L1 of the form to be displayed and the width sum L2 of the fixed width columns in the form to be displayed are obtained. The difference value between the maximum width L1 of the table to be displayed and the sum L2 of the widths of the fixed width columns in the table to be displayed can be calculated to be dynamically allocated to the sum L3 of the widths of the non-fixed width columns.
The maximum width L1 of the form to be displayed may be a predefined width value, or may be a matching value determined according to different devices of the display form. The fixed width column in the form to be displayed is a fixed value set to ensure that the contents in the form can be effectively displayed.
And a traversing module 402, configured to traverse all columns of the table to be presented, and put columns that do not have a fixed width attribute in all columns into an array.
The to-be-displayed table is usually provided with default display attributes, the width of each column of the display table also has different width value settings, in order to be able to know the width values of all columns in the table, an ad hoc vertical array is used, and if a column has a fixed column width through traversal query, no processing is performed on the column. If the width value of a column is set to have the minimum width by traversing the query, the column is put into an array minArray, and the minimum width value is recorded in the array. If a column of the traversal query has neither a width value nor a minimum width value, the width value of the column is temporarily defined as auto, and the column is placed in the minArray array, and the minimum width value of the column is recorded as auto.
And the sorting module 403 is configured to sort the columns with the smallest width attribute in the array in order from big to small.
The minimum width value of each column in the table may be the same or different, and for the case where the minimum width values of the columns in the table are different, a second carding may be performed to facilitate modification of columns that can readjust the column width within the effective L3 width range. For convenience of modification, the columns with the smallest width attribute in the array are ordered in order from large to small. In this way, columns with larger minimum width values can be preferentially processed. When the columns with the largest minimum width values meet the preset minimum width value requirement, other columns with the smallest width values can be not processed.
The setting module 404 is configured to compare the size of each column in the ordered array with the length N with the size of L3/N, and set a width assignment for each column according to the comparison result.
After the arrays are ordered in the order from big to small, the column width of the table can be subjected to secondary assignment according to the column width values in the arrays. Specifically, the ordered minArray array can be traversed, and the length of the array is N. If a certain traversed column does not have the minimum width value, the column is determined to be a column with non-fixed width, and no processing is carried out on the column; if the minimum width value of a column traversed is < L3/N, the width of the column is assigned auto. If the minimum width value of a column traversed > =l3/N, the width of the column is assigned a minimum width value, while the value of L3 becomes [ L3-the width of the column ].
Through the above operation, it is possible to ensure that the width of all the fixed columns is defined width, the width of the non-fixed columns is auto, the width of the columns with the smallest width value is its predefined smallest width value or auto which is subjected to secondary assignment modification according to the total length requirement. So that the width of the table is more reasonable.
The apparatus shown in fig. 4 may correspondingly perform the content in the foregoing method embodiment, and the portions not described in detail in this embodiment refer to the content described in the foregoing method embodiment and are not described herein again.
Referring to fig. 5, an embodiment of the present invention further provides an electronic device 50, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the foregoing method embodiment based on a fixed display of a column width of a WEB-based ultra-wide table.
Embodiments of the present invention also provide a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the foregoing method embodiments.
Embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method for column width fixed presentation based on a WEB ultra-wide table in the foregoing method embodiments.
Referring now to fig. 5, a schematic diagram of an electronic device 50 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device 50 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 50 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 50 to communicate with other devices wirelessly or by wire to exchange data. While an electronic device 50 having various means is shown, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects an internet protocol address from the at least two internet protocol addresses and returns the internet protocol address; receiving an Internet protocol address returned by the node evaluation equipment; wherein the acquired internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (9)
1. A column width fixed display method based on a WEB super-wide table is characterized by comprising the following steps:
determining a width sum L3 dynamically allocated to a non-fixed width column based on the obtained maximum width L1 of the table to be displayed and the width sum L2 of the fixed width column in the table to be displayed; the width sum L3 of the non-fixed width columns is obtained after dynamic allocation based on the difference value between the maximum width L1 of the table to be displayed and the width sum L2 of the fixed width columns in the table to be displayed;
traversing all columns of the table to be displayed, and putting columns which do not have the fixed width attribute in all columns into an array; the columns that do not have a fixed width attribute include: columns with minimum width values, and columns without fixed width values and minimum width values;
sorting the columns with the minimum width values in the array according to the order from big to small;
comparing the size of each column in the ordered array with the length of N with the size of L3/N, and setting the width assignment of each column according to the comparison result;
the determining the width assignment of each column according to the comparison result comprises the following steps:
for a column having a minimum width value greater than or equal to L3/N, the width value is assigned as the minimum width value, while the value of L3 is reduced by the same value as the width value of the column.
2. The method of claim 1, wherein traversing all columns of the form to be presented places columns in an array that do not have a fixed width attribute, comprising:
judging whether columns with fixed width values exist in all columns, and if so, not processing the columns.
3. The method of claim 2, wherein traversing all columns of the form to be presented places columns in an array that do not have a fixed width attribute, further comprising:
judging whether columns with the minimum width value exist in all columns, if so, putting the columns into the array, and recording the minimum width value of the columns.
4. The method of claim 3, wherein traversing all columns of the form to be presented places columns in an array that do not have a fixed width attribute, further comprising:
attributes of columns that have no fixed width value and minimum width value at the same time are defined as auto and put into the array.
5. The method of claim 1, wherein determining the width assignment for each column based on the comparison comprises:
no processing is performed for columns that do not have a minimum width value.
6. The method of claim 5, wherein determining the width assignment for each column based on the comparison further comprises:
for columns whose minimum width value is less than L3/N, its width value is assigned auto.
7. Column width fixed display device based on WEB super wide form, characterized by comprising:
the determining module is used for determining a width sum L3 dynamically allocated to the non-fixed width column based on the obtained maximum width L1 of the table to be displayed and the width sum L2 of the fixed width column in the table to be displayed; the width sum L3 of the non-fixed width columns is obtained after dynamic allocation based on the difference value between the maximum width L1 of the table to be displayed and the width sum L2 of the fixed width columns in the table to be displayed;
the traversing module is used for traversing all columns of the table to be displayed and putting columns which do not have the attribute of fixed width in the columns into an array; the columns that do not have a fixed width attribute include: columns with minimum width values, and columns without fixed width values and minimum width values;
the sorting module is used for sorting the columns with the minimum width values in the array according to the sequence from big to small;
the setting module is used for comparing each column in the ordered array with the length of N with the L3/N and setting the width assignment of each column according to the comparison result;
the determining the width assignment of each column according to the comparison result comprises the following steps:
for a column having a minimum width value greater than or equal to L3/N, the width value is assigned as the minimum width value, while the value of L3 is reduced by the same value as the width value of the column.
8. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the WEB super-wide table based column width fixed presentation method of any one of the preceding claims 1-6.
9. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the WEB ultra-wide table based column width fixed presentation method of any one of the preceding claims 1-6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811394542.6A CN109635263B (en) | 2018-11-22 | 2018-11-22 | Column width fixed display method and device based on WEB ultra-wide table and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811394542.6A CN109635263B (en) | 2018-11-22 | 2018-11-22 | Column width fixed display method and device based on WEB ultra-wide table and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN109635263A CN109635263A (en) | 2019-04-16 |
| CN109635263B true CN109635263B (en) | 2023-04-28 |
Family
ID=66068911
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811394542.6A Active CN109635263B (en) | 2018-11-22 | 2018-11-22 | Column width fixed display method and device based on WEB ultra-wide table and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109635263B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111191162B (en) * | 2019-11-05 | 2024-05-17 | 腾讯科技(深圳)有限公司 | Data processing method and device |
| CN113268949B (en) * | 2021-06-23 | 2023-03-07 | 深圳平安智汇企业信息管理有限公司 | Form display method and device based on dynamic fields, computer equipment and medium |
| CN113868266B (en) * | 2021-12-06 | 2022-02-25 | 广州市玄武无线科技股份有限公司 | Method and device for generating star model layout of web front end and electronic equipment |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107656914A (en) * | 2017-10-16 | 2018-02-02 | 厦门海迈科技股份有限公司 | Form generation method, device, terminal device and the storage medium of configurableization |
| CN107943377A (en) * | 2017-11-17 | 2018-04-20 | 深圳乐信软件技术有限公司 | A kind of list is loaded into transition method, device, terminal and the storage medium of displaying |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11461077B2 (en) * | 2004-11-26 | 2022-10-04 | Philip K. Chin | Method of displaying data in a table with fixed header |
| US20070136655A1 (en) * | 2005-12-12 | 2007-06-14 | Peters Johan C | Method and system for linearly resizing columns in a table |
| US8312367B2 (en) * | 2009-10-30 | 2012-11-13 | Synopsys, Inc. | Technique for dynamically sizing columns in a table |
| US10445421B2 (en) * | 2013-02-21 | 2019-10-15 | International Business Machines Corporation | Optimizing rendering of data tables |
| GB201509331D0 (en) * | 2015-05-29 | 2015-07-15 | Cluster Seven Ltd | Visualization method and system |
| US10025466B2 (en) * | 2015-06-11 | 2018-07-17 | International Business Machines Corporation | Dynamically transforming a tabular object based on actions within a graphical user interface |
| CN105094622B (en) * | 2015-09-08 | 2018-05-22 | 上海上讯信息技术股份有限公司 | Adjust the method and apparatus of form col width |
| CN106681972A (en) * | 2015-11-11 | 2017-05-17 | 北京国双科技有限公司 | Method and device for displaying table |
| CN107066439B (en) * | 2017-04-07 | 2024-04-19 | 广州市玄武无线科技股份有限公司 | Method and device for customizing form control and electronic equipment |
| CN107220378A (en) * | 2017-06-26 | 2017-09-29 | 福建中金在线信息科技有限公司 | Form sort method and device, WEB page methods of exhibiting and device |
-
2018
- 2018-11-22 CN CN201811394542.6A patent/CN109635263B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107656914A (en) * | 2017-10-16 | 2018-02-02 | 厦门海迈科技股份有限公司 | Form generation method, device, terminal device and the storage medium of configurableization |
| CN107943377A (en) * | 2017-11-17 | 2018-04-20 | 深圳乐信软件技术有限公司 | A kind of list is loaded into transition method, device, terminal and the storage medium of displaying |
Non-Patent Citations (3)
| Title |
|---|
| 刘平 ; .WEB表格设计攻略.计算机与网络.2017,(15),全文. * |
| 刘钊 ; .基于JavaScript的富客户端表格绘制库开发.铁路计算机应用.2017,(09),全文. * |
| 齐飞 ; 王宁 ; 张丽方 ; 孙伟娟 ; .基于列重合度的网络表格一致性扩展.计算机科学.2017,(09),全文. * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109635263A (en) | 2019-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10135910B2 (en) | Cross-platform document presentation | |
| CN109635263B (en) | Column width fixed display method and device based on WEB ultra-wide table and electronic equipment | |
| CN110865852B (en) | Webpage component loading method and device, electronic equipment and storage medium | |
| CN110188299B (en) | Response type page processing method and device and electronic equipment | |
| CN111291244A (en) | House resource information display method, device, terminal and storage medium | |
| CN109460201A (en) | The methods of exhibiting of information, device, hardware device | |
| CN111177634A (en) | Multi-language supporting file content loading method, device, equipment and medium | |
| CN112416189B (en) | Cross-page focus searching method and device and electronic equipment | |
| CN110427584A (en) | Page generation method, device, electronic equipment and computer readable storage medium | |
| CN110221892B (en) | Method, device, medium and electronic equipment for scrolling window information | |
| CN111338827B (en) | Method and device for pasting form data and electronic equipment | |
| CN111596992A (en) | Navigation bar display method and device and electronic equipment | |
| JP7744078B2 (en) | Electronic table introduction method, device, equipment and medium | |
| CN110809087A (en) | Screen locking information display method and device and electronic equipment | |
| CN113391882B (en) | Virtual machine memory management method and device, storage medium and electronic equipment | |
| CN111581562B (en) | Resource refreshing display method, device, equipment and storage medium | |
| CN112333462A (en) | Page jumping method, returning method, device and electronic device in live broadcast room | |
| CN114510309B (en) | Animation effect setting method, device, equipment and medium | |
| CN112214306B (en) | Content presentation weight value calculation method, device, electronic equipment and computer readable storage medium | |
| CN112199187B (en) | Content display method, device, electronic equipment and computer readable storage medium | |
| CN111783390B (en) | Dimension label adjusting method and device and electronic equipment | |
| CN114997106B (en) | Document information display method, device, terminal and storage medium | |
| CN109542748B (en) | Method, device, equipment and storage medium for determining view browsing times | |
| CN109739595B (en) | WEB interaction-based TIP display content processing method and device and electronic equipment | |
| CN110069570B (en) | Data processing method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |