seymores / gfycatid_ex Goto Github PK
View Code? Open in Web Editor NEWGfycat style URL ID -- AdjectiveAdjectiveAnimal
Gfycat style URL ID -- AdjectiveAdjectiveAnimal
Thought about offering a non-random version? Cause at the moment it's not quite usable for a use case such as gfycat, where you require them to be unique. Since overtime, it's likely to generate more and more of the same (especially if you use a lower number to generate) and you'll have to test against past results. At the moment the user could try and assist it to avoid definite repeats (rand being at the same state as what was generated another time), by exporting rand's state so you can jump to some new state, but that can still have collisions.
Would be nice if there was a variant where you could in addition provide a seed and an index in the permutation. So the seed would control the order of the permutation, and the index will be the unique result at that index. If index exceeds the permutated list return an error (the user can then know they've used up every possible combination of that length and will need to increase the length to retrieve more).
That way if the user increments the index, they're guaranteed a unique result. Which gives them a couple options for how they might want to interact with it. Such as storing the current index and incrementing it. Or mapping some other identifier of theirs to an index. etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.