...
We'll now show the KRL code to put together this array, taking a top-down approach. The complete ruleset is on GitHub.
Code Block | ||
---|---|---|
| ||
ruleset net.sanbachs.counters { meta { shares __testing, number } global { ... // /sky/cloud/<ECI>/<RID>/number.gif?n=999&color=[R,G,B]&bgcolor=[R,G,B] number = function(n,color,bgcolor) { num = n.as("String").extract(re#(\d)#g).join(""); num_len = num.length() <= 25 => num.length() | 25; h(num_len,val(color),val(bgcolor)) .append(num.substr(0,num_len).split(re##).map(dgt).reduce(flt,[])) .append(T) } } } |
...