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

18
LINES

< > BotCompany Repo | #1004752 // Clean Up Statements DB

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

Libraryless. Click here for Pure Java version (2711L/18K/61K).

!752

p {
  Map map = cast rpc("Statements DB", "getIDsAndNames");
  MultiMap mm = reverseMapAsMultiMap(map);
  mm = keysWithMultipleValuesOnly(mm);
  print("Duplicates:");
  psl(mm.asMap());
  print("Delete?");
  if (isYes(readLine())) {
    L<Long> toDelete = map("first", values(mm.asMap()));
    print("Deleting: " + struct(toDelete));
    rpc("Statements DB", "deleteConcepts", toDelete);
    print("Done?!");
  }
}

please include function first.

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004752
Snippet name: Clean Up Statements DB
Eternal ID of this version: #1004752/1
Text MD5: 62f6c355bb465cc298e3a73e5c79d88f
Transpilation MD5: b6595b75ab4f2013cdb4c513a59b2374
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-28 22:44:36
Source code size: 469 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 517 / 583
Referenced in: [show references]