Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #284 - adaptColMarkings

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 8 computer(s): aoiabmzegqzx, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 519 [visualize]

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: 467 / 114
Referenced in: [show references]

Formerly at http://tinybrain.de/284 & http://284.tinybrain.de