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

16
LINES

< > BotCompany Repo | #284 // adaptColMarkings

Pseudo code

(adapts to differing widths in a table. assumes spaces are used as field
separator. looks only at one row.)

function adaptColMarkings(text1, text2, rowMarking, colMarkings)
  row1 = text1.getRow(rowMarking)
  row2 = text2.getRow(rowMarking)
  cols1 = findColumns(row1)
  cols2 = findColumns(row2)
  newColMarkings = []
  for colMarking in colMarkings:
    idx = cols1.indexOf(colMarking)
    col2 = cols2.get(idx)
    add col2 to newColMarkings with label of colMarking
  end
  return newColMarkings
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

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