Do you think it’s safe to generate ticket numbers with such tools? I'm currently this PHP lib to do it: https://github.com/icomefromthenet/ReverseRegex and since we do not sell thousands of tickets a day I think it should be okay to use it for this purpose. What do you think?
It's practical, if you check the new one is not a duplicate - the lib info does not state how distinct the values would be, or how does it uses the RNG.
Depending on what you really need (output string format, amount of numbers, non-additive links), you should find a hash function for your fit. You can always start by looking for youtube url hash.
Has anyone actually managed to loop animations on the web without putting the CPU on fire?
It was my task recently to optimize some animations (done with Web Animations polyfill) and even though all the profilers showed that CPU is doing almost nothing (GPU animated all the stuff) Chrome was using ~25% of CPU all the time which resulted in a noisy fan after a minute or two.
I feel like I’m missing something here, I believe there must be a way to do it…
The only satisfactory way to do web animation I've found is to do it 100% in css by toggling classes. As soon as the JS interpreter gets involved in any way, things go south.
Even when they're controlled/computed/whatever purely through css as above? Maybe I've just been lucky in my limited experience with looping them infinitely like this.
Same here on Firefox 31 on Windows 8.1. 25% used on my dual-core i5 with HT. This just sucks.
Years ago I added a 'snow' animation JS libary to a custom website which let little snow flakes drop during winter time. All just for fun.
It turned out to be fun only for a few days until I got the first complaints about users not being able to use their computers anymore and mobile devices being barely able to scroll anything.
I also believe that there must be a better way for simple animations.
Yeah, true, I don’t create any objects in that animation actually. I just do opacity animations (from 0 to 1 and vice versa) and some transforms sometimes (which are supposed to be 'cheap' according to some resources on the internet).