Algo work
How do I make an algo work?
WIP utils for generating unique constants. Also, a spec for a wrapper library for Filenames.. What is a algo work? How do you make a algo work? This script and codes were developed by Tom on 16 September 2022, Friday.
Algo work - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Algo work</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Algo work - Script Codes CSS Codes
body { background: black; color: #fff;
}
Algo work - Script Codes JS Codes
function out(s) { $('body').append( $('<pre></pre>').text(s) );
}
/** * generates an object with a unique identity * tracks own data internally * * returns an object that is unique * returns an object with a toString() method that will be unique */
function Constant() { Constant._memory || (Constant._memory = []); Constant._memory.push(myNum); var myNum = Constant._memory.length; Constant.prototype.toString = function() { return JSON.stringify({ 'type': 'SessionConstant', 'value': 'Constant[value=' + myNum + ']' }); }; Constant.prototype.toJSON = Constant.prototype.toString; return this;
}
Filename = { 'Mutation': { 'Origin': { 'Set': new Constant(), 'Unset': new Constant() }, 'Scene': { 'Set': new Constant(), 'Unset': new Constant() }, 'Performer': { 'Add': new Constant(), 'Remove': new Constant(), 'Unset': new Constant() }, 'Tag': { 'Add': new Constant(), 'Remove': new Constant(), 'Unset': new Constant() }, 'Rating': { 'Set': new Constant(), 'Unset': new Constant() } }
};
// out(JSON.stringify(Filename, null, 4));
/* * Filename.toString() // an alias for .getName * Filename.getName() // returns the filename with all mutations applied * Filename.getOriginalName() // returns the filename without any mutations applied * Filename.reset() // erases all mutations * Filename.getOrigin() // returns the origin * Filename.getOriginalOrigin() // returns the origin without any mutations applied * Filename.setOrigin() // modifies the origin * Filename.unsetOrigin() // wipes the origin (use this instead of .setOrigin('')) * Filename.getScene() // returns the scene name * Filename.getOriginalScene() // returns the scene name without any mutations applied * Filename.setScene() // modifies the scene * Filename.unsetScene() // wipes the scene (use this instead of .setScene('')) * Filename.getPerformers() // returns a list of performers * Filename.getOriginalPerformers() // returns a list of performers without any mutations applied * Filename.addPerformers() // adds one or more performers * Filename.removePerformers() // removes one or more performers * Filename.unsetPerformers() // clears the list of performers * Filename.getTags() // returns an array of tags * Filename.getOriginalTags() // returns an array of tags without any mutations applied * Filename.addTags() // adds one or more tags * Filename.removeTags() // removes one or more tags * Filename.unsetTags() // clears the list of tags * Filename.getRating() // returns the rating, 0 to 1 * Filename.getOriginalRating() // returns the rating, 0 to 1 without any mutations applied * Filename.setRating() // sets the rating, 0 to 1 * Filename.unsetRating() // wipes the rating (use this instead of .setRating(0)) */
Developer | Tom |
Username | tomprogers |
Uploaded | September 16, 2022 |
Rating | 3 |
Size | 2,486 Kb |
Views | 18,216 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Charts | 2,497 Kb |
Crawford - layout | 4,049 Kb |
Encoding | 3,245 Kb |
Static doc search | 5,255 Kb |
Algo work | 2,486 Kb |
Demo of some course-list filtering | 9,852 Kb |
Flipcard mixin | 2,477 Kb |
Web component sandbox | 1,936 Kb |
Table styling | 3,298 Kb |
JQueryUI widemeter widget | 2,648 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
React Vote Component | Souporserious | 5,465 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
Angular Route | Arun_v606 | 1,837 Kb |
A Pen by Shidhin | Shidhincr | 5,015 Kb |
A Pen by Mike Otis | Mikeotis | 3,185 Kb |
See Through | Larrygeams | 77,410 Kb |
Simple checkbox style | Vncnz | 2,628 Kb |
Wavy Road with Dashes | Jonobr1 | 2,679 Kb |
Boxes | H3l1um | 2,563 Kb |
Glitchy Text Effect | Kescoe | 2,208 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!