Algo work

Developer
Size
2,486 Kb
Views
18,216

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 Previews

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)) */
Algo work - Script Codes
Algo work - Script Codes
Home Page Home
Developer Tom
Username tomprogers
Uploaded September 16, 2022
Rating 3
Size 2,486 Kb
Views 18,216
Do you need developer help for Algo work?

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!

Tom (tomprogers) Script Codes
Create amazing web content with AI!

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!