File size distribution: Difference between revisions
Content added Content deleted
m (Update Lang example: Fix spelling of Lang) |
(Update Lang example: Use new set item operator in assignment) |
||
Line 1,136: | Line 1,136: | ||
# Replace "<pathToIO.lm>" with the location where the io.lm Lang module was installed to without "<" and ">" |
# Replace "<pathToIO.lm>" with the location where the io.lm Lang module was installed to without "<" and ">" |
||
ln.loadModule(<pathToIO.lm>) |
ln.loadModule(<pathToIO.lm>) |
||
fp.fileSizeDistribution = (&sizes, $[totalSize], $file) -> { |
fp.fileSizeDistribution = (&sizes, $[totalSize], $file) -> { |
||
Line 1,164: | Line 1,165: | ||
if($len == 0) { |
if($len == 0) { |
||
&sizes[0] += 1 |
|||
}else { |
}else { |
||
$index = fn.int(fn.log10($len)) |
$index = fn.int(fn.log10($len)) |
||
&sizes[$index] += 1 |
|||
} |
} |
||
} |
} |