multiple timer with end result text - timer

I need to show three timers, something like this:
'https://codepen.io/kaicarver/pen/pyaKVR' or 'https://jsfiddle.net/7bk5mw9y' of whatever as long as it shows three timers, (preferably with a start all button)
the three contesters need to stop their time, so far all possible with both scripts.
After the last one presses stop the page should show a message below the scores.
I am searching and coding for days now without luck.
I am way to beginner to achieve this. Is there anyone here who knows an existing script that does this of maybe have a simple solution?

Related

How to sync audio files using tone.js on react

I want to make a looper similar to this website https://learningmusic.ableton.com/
users will be able to upload their own audio files to each pad, so long as all the loops are in the same bpm it should sound concise.
I'm having a problem figuring out how to sync the audio files together.
For example, if one loop is playing and I click on another loop, there should be a delay for when the new loop starts playing, similar to this example https://tonejs.github.io/examples/daw
I think what I need tone.js might have, but I'm having a hard time implementing it in code.
Should I take the longest loop and have the length of that be the baseline for the track? And then turn the length into bars so I can have a reference of when to start the next loop played?
any resources or help would be amazing!!! thanks

LabVIEW: Count how long a button has been pressed

I'm trying to create a LabVIEW VI with an "ok button", a numeric indicator "Number of click" and an array of cluster, in which every cluster contain a TimeStamp indicator and a numeric indicator.
When the VI is running I want to keep track of:
When the button is released (timestamp)
How long the button has been pressed (in millisecond or second).
Then, when i click on STOP, i want to visualize these information about ALL the button pression in the array of cluster.
That's what I've done. I've tried to change the manner in which I create the array, and also the "Tunnel mode" in the While loop, but it doesn't work..
Can you help me? Thank you all!
please check my attached code and compare it with yours.
It's the simplest method, but you may also read about Event Structure, which would help to do that in much smarter way. Additionally you may want to change my code a bit to have indicators being updated in real-time instead after the exit. It's worth also reading about "Feedback node" and "Conditional" type of output tunnels. They would help to simplify the code, but I didn't use them to keep it as simple as possible!

Trying to create a Dice HUD on Second Life that pulls information for different rolls from a notecard

So I'm working on something that's going to be a rather large undertaking. I've figured out how to do a "bare-bones" kind of dice hud that just rolls a basic 2-20. However now I need to go to the next step.
I want to make a roleplaying system dice hud for my sim. For this I want it so that when you click the HUD you get a menu, that lists all the skills in my system. When you click the skill it refrences a notecard in the Hud to do some minor math before displaying the result: IE.
There's a normal 2d6, 2d8, 2d10, 2d12, 2d16, 2d20 ((Whatever basic configuration that always rolls a standard die))
Though I want it to look into a note card to add in a character's "STATS" and "SKILL LEVEL"
So say they want to hit someone with a sword?
I want the Hud to generate a random value between 2 and 12, then add in the character's Strength, speed, perception stats as well as their sword skill level.
If I could see the basics of HOW to start this I can then move forward from there.
You cannot write into a note card using a LSL (or other) script.
If you want to roll a dice, simply use llRound( llFrand ); or integer x = (integer)llFrand(19)+1;
You could use a webserver to save information like that. Just google free web space, you're gonna find a lot. SL's HTTP communication is, let's say, ok.
This is kind of a big project. If you don't know where/how to start you should hire a professional. Just look for groups in-world. You're going to find a lot of people willing to help you :)
In LSL you cannot write in a notecard, however if you try OpenSim you can use that function:
osMakeNotecard(string notecardName, list contents);
But that is only available in OpenSim, see osMakeNotecard.

Fastest way to capture what's on the screen in C

My goal is to write a program that would capture the screen in an efficient way.
Little twist, the screen will not be saved. My program will do various check on it (pixel's colors in some area.. etc).
The program will run in windows, and will need to take(and analyze) as many screenshot as possible per second, and will not be used in games. (That imply that I need the whole screen, like pressing prntscreen. It's not a problem if that fail in fullscreen game.)
All propositions are welcome, and I'd be glad to share any missing details.
Edit
As I wrote in the comment, capturing the screen for storing purpose is really common and easy to find.
I asked to be sure to not miss any method of capturing the screen without storing it at all.
The program will look the screen, take some decision then will quickly go to the next frame.
Perhaps look into SDL
A guick google returned this screenshot code for SDL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/2000-August/011387.html

C# Algorithm to generate image (2048x2048) from some images

What I would like to do is create an image (2048x2048 in my case)
The algorithm should work in this way:
-User select some images from a folder and tells my program "generate image"
-The program check if can put all images inside a single image (size problem), otherwise returns an error message
-The program find the correct way to put all images inside the image and then prompt the user to choose a savepath (obviusly old images shouldn't be resized/cut)
The problem is obviusly the last step, I don't have actually idea how to do it, also there is another thing the program should check, if an image filename is myimage_1 and there is a "myimage_2" those images should be put near eachother (obiusly same for 3,4 and so on)
Can someone help me with this?
it looks like a multi-dimensional knapsack problem to me.
More info here.
There may be of course simple solutions as I'm no expert on the domain and my algorithms classes are far behind me! It will perhaps help anyway to launch the thread :)
You could perhaps also solve this by adapting an easy greedy algorithm but it will of course not give the optimal solution and will then surely lead to some false negatives for your 2nd step.

Resources