Link | c5_shortunique |
Author | Jason Huck |
Category | Utility |
Version | 7.x |
License | http://opensource.org/licenses/artistic-license.php |
Posted | 16 Jan 2006 |
Updated | 16 Jan 2006 |
More by this author... |
Generates a 14-character string based on the current datetime that should be unique in all but the most extreme cases. Useful in cases where you need to, for instance, create a unique, non-linear filename and [lasso_uniqueid] is just a few characters too long (with a dot-three extension) to guarantee safe file transfer via FTP.
[c5_shortunique]
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag: 'c5_shortunique'; local: 'chars' = (map: 0 = 'AaZz', 1 = 'BbYy', 2 = 'CcXx', 3 = 'DdWw', 4 = 'EeVv', 5 = 'FfUu', 6 = 'GgTt', 7 = 'HhSs', 8 = 'IiRr', 9 = 'JjQq' ); local: 'time' = (string: date->(format: '%Y%m%d%H%M%S')); local: 'out' = string; iterate: #time, local: 'thisDigit'; local: 'rnd' = (math_random: -min=1, -max=5); #out = #chars->(find: (integer: #thisDigit))->(get: #rnd) + #out; /iterate; return: #out; /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft