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

22
LINES

< > BotCompany Repo | #1016183 // Visitors on Home Page [Dyn Module]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (4112L/21K).

1  
!7
2  
3  
cmodule HomePageVisitors > DynBigNumber {
4  
  start {
5  
    setDescription("HOME PAGE VISITORS");
6  
    ownTimer(doEveryAndNow(60000, r actualUpdate));
7  
  }
8  
  
9  
  void actualUpdate {
10  
    int oldInt = parseIntOpt(str(value));
11  
    S value = or(firstIntAsString(ai1_cookiesToday()), "?");
12  
    setValue(value);
13  
    int newInt = parseIntOpt(str(value));
14  
    S s = n2_generic(value, " Visitor");
15  
    setModuleName(s + " on Home Page");
16  
    if (oldInt != 0 && newInt > oldInt) {
17  
      vmBus_send('newHomePageVisitors, newInt);
18  
      if (newInt/10 > oldInt/10)
19  
        vmBus_send sayToUser(s + " on the home page!");
20  
    }
21  
  }
22  
}

Author comment

Began life as a copy of #1016136

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016183
Snippet name: Visitors on Home Page [Dyn Module]
Eternal ID of this version: #1016183/16
Text MD5: 0365cb8efda22fa560d8754d1f8afbb5
Transpilation MD5: c7cb092ac802e6edee84082a52384798
Author: stefan
Category: javax / modules
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-14 23:50:34
Source code size: 637 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 631 / 93041
Version history: 15 change(s)
Referenced in: [show references]