User Tools

Site Tools


sample_code:listroots

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sample_code:listroots [2018/03/14 00:18]
67.58.20.111 try3
sample_code:listroots [2018/03/14 08:18]
Line 1: Line 1:
-<code JavaScript listRoots.js> 
-    // Demonstrate calling external programs, by Warren E. Downs (2018) 
-    // Based on examples by Steve Garman 
-    // Version that works without busybox installed 
-    // This program also demonstrates using Asynchronous Callbacks 
-    // to continue processing once the result of the external program 
-    // is received. 
-    ////////////////////////////////////////////////////////// 
  
-    function parseKb(item) { 
-        //alert('item='+item); 
-        var mult=1; 
-        if(item.indexOf('G') > -1) { mult=1024*1024; } 
-        if(item.indexOf('M') > -1) { mult=1024; } 
-        if(item.indexOf('K') > -1) { mult=1; } 
-        return parseFloat(item)*mult; 
-    } 
-      
-    ////////////////////////////////////////////////////////// 
- 
-</code> 
sample_code/listroots.txt ยท Last modified: 2018/03/14 08:18 (external edit)