B
B
beduin012020-04-19 16:04:24
Data Structures
beduin01, 2020-04-19 16:04:24

How to organize the concept of a column?

I am making an interface. Columns I implement by transfer of text fields.

поле_1 поле_2 поле_3 поле_4  поле_5 поле_6 <перенос строки>
поле_7 поле_8 поле_9 поле_10  поле_11 поле_12 <перенос строки>
поле_13 поле_14 поле_15 поле_16  поле_17 поле_18 <перенос строки>

How do I understand that 1 7 13 is one column, 2 8 14 is the second, and so on?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2020-04-19
@res2001

In addition to the "line break", there must also be a "column separator". Then everything is simple - after the first column separator comes the second column, and so on.

P
Pavel Shvedov, 2020-04-19
@mmmaaak

How can I fucking understand that 1 7 13 is one column, 2 8 14 is the second, and so on?

Column width: 6 elements, take the remainder of dividing the element number by the width:
1 % 6 == 1
7 % 6 == 1
13 % 6 == 1

2 % 6 == 2
8 % 6 == 2
14 % 6 == 2

the only thing you need to provide for the last column, since there the remainder will be 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question