Int random = (int) (Math.random()*names.length) Static class Action implements ActionListener JButton button = new JButton("Click me") import javax.swing.* įtDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) Now, I'm fairly new to java and I've only watched a couple of tutorials, but it's gotten me this far and hopefully I can learn a thing or two from one of you guys. Also, as a bonus I'm hoping to add a bit of music to it that can play in the background once you open the app. Now when i click the button, it generates a name, but it shows up in the Eclipse console and not in the same window as the button, which is what I want it to do.Įventually I would like to be able to have a specific picture for for the button and for the background (window/frame). It is the reason that you can gain more credibility using our 3-step randomness process certification.I'm trying to create a name generator that generates names by random. With the firmly secure SHA512 Hash, It is almost inconceivable that any modified file can pass step 3 verification. The SHA512 hash code should be the same if the file did not be changed.Ī person can use a fake screenshot or video to change the winner name from local computers, but can not change the information stored on our server. You can let him go to step 3, use our SHA512 Hash Generator to check the downloaded file. Here is Demo of The Client-side Certification File link.įinally, what if another John Doe doubt you have modified the file? In this case, you can go to step 2 to download your client-side certification file to prove that your data source has no error. However, what if somebody doesn't like the winner, and want to check whether there are many duplicate John Doe No. When you give this link and the full winner name to your attendees, most people will trust that your raffle is random. Our server will store a part of the information, including the winner's name (asterisked), total names, timestamp, and a SHA512 hash code. 090, here is Demo of The Server-side Certification Link. If you use Random Name Picker for raffles, contests, drawings, giveaways, and promotions, etc., you are encouraged to enable 3-step Randomness Process Certification function to improve your credibility.įor example, you use the name picker to raffle off a prize to 99 people from John Doe No. For this situation, you can use our 3-step Randomness Process Certification to prove that the whole process is clean and "random." We don't want that somebody use our tool to raffle off a prize, but bypass the random process, and record a video to say, "Hey, we picked a random winner by a tool from ." So we choose a server-side solution.īy using server-side random function, the only thing that the malicious code or a person can change is the data source. It is something which the developers can not control. It can happen in the background process, which other people can not see on the screen. If using random function from Javascript, as the full source codes are stored on users' local computers, it is impossible to prevent a malicious code or any person from doing something to bypass the random function and set a value to the "winner" directly. However, it is a different story on actual real-world operations: Both are the same from the technical part - the random function from Python and Javascript both generate pseudo-random numbers.
0 Comments
Leave a Reply. |