16
LINES
Pseudo code
1 | (adapts to differing widths in a table. assumes spaces are used as field
|
2 | separator. looks only at one row.)
|
3 |
|
4 | function adaptColMarkings(text1, text2, rowMarking, colMarkings)
|
5 | row1 = text1.getRow(rowMarking)
|
6 | row2 = text2.getRow(rowMarking)
|
7 | cols1 = findColumns(row1)
|
8 | cols2 = findColumns(row2)
|
9 | newColMarkings = []
|
10 | for colMarking in colMarkings:
|
11 | idx = cols1.indexOf(colMarking)
|
12 | col2 = cols2.get(idx)
|
13 | add col2 to newColMarkings with label of colMarking
|
14 | end
|
15 | return newColMarkings
|
16 | end |
download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Image recognition results
Snippet ID: |
#284 |
Snippet name: |
adaptColMarkings |
Eternal ID of this version: |
#284/1 |
Text MD5: |
ad1c2dc7de2e982530ff02a3bfc67b21 |
Author: |
stefan |
Category: |
|
Type: |
Pseudo code |
Public (visible to everyone): |
Yes |
Archived (hidden from active list): |
No |
Created/modified: |
2014-11-08 21:55:46 |
Source code size: |
519 bytes / 16 lines |
Pitched / IR pitched: |
No / Yes |
Views / Downloads: |
790 / 228 |
Referenced in: |
[show references] |