AppleScript名:NSCountedSetでヒストグラムを計算2 |
— Created 2017-08-01 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "ArrayRandomize" –https://github.com/masakihirokawa/objc-classes-dc-randomize set theList to (current application’s DCRandomize’s shuffle:1 max:9999) set theTime to current application’s NSDate’s |date|() set theCountedSet to current application’s NSCountedSet’s alloc()’s initWithArray:theList set newArray to current application’s NSMutableArray’s new() repeat with i from 1 to 10000 (newArray’s addObject:{theKey:i, theCount:(theCountedSet’s countForObject:i)}) end repeat theTime’s timeIntervalSinceNow() return newArray as list of string or string |
More from my site
(Visited 15 times, 1 visits today)