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

22
LINES

< > BotCompany Repo | #1000778 // Print latest runnables

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

Libraryless. Click here for Pure Java version (98L/2K/4K).

1  
!636 (modern)
2  
3  
main {
4  
  psvm {
5  
    S s = "% type:34 type:40";
6  
    S page = loadPage("http://tinybrain.de:8080/tb/search.php?q=" + urlencode(s));
7  
    
8  
    // example string matched: ">#1000689</a> - processSilent function (hotwire and call for processing)<br>"
9  
    //Matcher m = Pattern.compile(">#(\\d+ - .*?)</").matcher(page);
10  
    Matcher m = Pattern.compile(">(#\\d+)</a> - (.*?)<br>").matcher(page);
11  
    
12  
    print("\n== Latest runnables! ==\n");
13  
14  
    new L<S> results;
15  
    while (m.find()) {
16  
      results.add(m.group(1) + " - " + m.group(2));
17  
      if (results.size() > 10) break;
18  
    }
19  
    for (int i = results.size()-1; i >= 0; i--)
20  
      print(results.get(i));
21  
  }
22  
}

Author comment

Began life as a copy of #1000758

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1000778
Snippet name: Print latest runnables
Eternal ID of this version: #1000778/1
Text MD5: 2b13159bb0d2ef16791f549d4811bd2e
Transpilation MD5: 96f469c127785b5f5e56543d9da1ba29
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-29 15:09:14
Source code size: 696 bytes / 22 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 609 / 1035
Referenced in: [show references]