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 |
Flipcard mixin | 2,477 Kb |
Progress bar | 1,974 Kb |
Static doc search | 5,255 Kb |
Layout for crafting assistant | 3,522 Kb |
API documentation | 3,622 Kb |
Crawford - layout | 4,049 Kb |
Demo of some course-list filtering | 9,852 Kb |
Layout for wordsearch tutorial | 2,726 Kb |
Dark theme search box | 2,187 Kb |
RGB as resource value | 2,203 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 |
Mondrian | Chrisarmstrong | 2,787 Kb |
Infractions - Attitude | Kylie_Joseph | 7,672 Kb |
Countdown Timer | Massiebn | 3,001 Kb |
Twitch.tv API | Ryzokuken | 2,618 Kb |
Simple Login Form | JoshBlackwood | 4,418 Kb |
IbrahimJabbari-Effect21 | Ibrahimjabbari | 1,882 Kb |
Mobile first social buttons with no iframe | Alistairtweedie | 3,158 Kb |
CSS3 Form | Tusharbandal | 1,836 Kb |
Nice responsive team page | Infomiho | 3,139 Kb |
Canvas Orbital Trails v2 | Jackrugile | 3,421 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!