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

24
LINES

< > BotCompany Repo | #1014378 // Make theories for similar lines

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (7584L/51K).

!7

p {
  //mechPlay();
  
  for (S listName : mechListsPlusNumber("heise.de 2018/04/20 (raw) | Similar lines")) {
    L<S> items = mechList(listName);
    S prefix = commonPrefixCI(items);
    if (nempty(prefix))
      mechListAppend(listName + " | Theories", "All lines start with " + quote(prefix));
      
    S suffix = commonSuffixCI(items);
    if (nempty(suffix))
      mechListAppend(listName + " | Theories", "All lines end with " + quote(suffix));
      
    S chars = joinChars(sorted(commonCharactersInStrings(allToUpper(items))));
    if (nempty(chars))
      mechListAppend(listName + " | Theories", "All lines contain the characters " + quote(chars) + " (possibly not in order)");
      
    chars = sortedString(joinChars(charactersAppearingExactlyOnceInEachString(allToUpper(items))));
    if (nempty(chars))
      mechListAppend(listName + " | Theories", "All lines contain the characters " + quote(chars) + " exactly once (possibly not in order)");
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014378
Snippet name: Make theories for similar lines
Eternal ID of this version: #1014378/12
Text MD5: b2e13a1f8128ae08fe1b34ac8d1cb6fc
Transpilation MD5: 4bb01092cd3946b864167ed13a540288
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-21 13:46:02
Source code size: 997 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 408 / 1088
Version history: 11 change(s)
Referenced in: [show references]