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

12
LINES

< > BotCompany Repo | #1014166 // indexedSimpleWikipedia_fast - returns "magic" map; makes/uses .index file

JavaX fragment (include)

1  
static Map<S, WikiPage> indexedSimpleWikipedia_fast() {
2  
  File f = unpackSimpleWikipedia();
3  
  File cacheFile = getProgramFile(#1008009, "simplewiki-" + fileSize(f) + ".index.gz");
4  
  
5  
  if (fileSize(cacheFile) == 0)
6  
    saveGZStructureToFile(cacheFile, asList(indexSimpleWikipedia()));
7  
8  
  Map<S, IndexedWikiPage> map = ciMap();    
9  
  for (IndexedWikiPage ip : (L<IndexedWikiPage>) unstructureGZFile(cacheFile))
10  
    map.put(ip.title, ip);
11  
  ret indexedSimpleWikipedia_magicMap(map);
12  
}

Author comment

Began life as a copy of #1014162

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1014166
Snippet name: indexedSimpleWikipedia_fast - returns "magic" map; makes/uses .index file
Eternal ID of this version: #1014166/12
Text MD5: 8d2d63062e29b8edb54c003e35fb92ab
Author: stefan
Category: javax / a.i. / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-03 19:03:46
Source code size: 493 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 323 / 350
Version history: 11 change(s)
Referenced in: [show references]