Javascript random numbers without dupes

  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 15th, 2011, 4:33 am

Hi All

I am just learning about javascript and would appreciate some help.

I have the following code:

Code: [ Select ]
<script>
function mylotto() {
var rlts = document.getElementsByName("result");
for(var i=0 ; i<=5; i++) {
rlts[i].value=""; // clear results
}
var max=eval("document.lot.maxnum.value");
if (max.length<1) {
alert ("You must choose a number for the maximum value!");
document.lot.maxnum.focus();
return false;
}
for(var i=0 ; i<=5; i++) {
rlts[i].value=(Math.floor(Math.random()*max)+1);
}
}
</script>
<form name="lot">
Enter the Maximum Number Value<input type="text" name="maxnum" value="49" size="2" STYLE="font-size:15pt"><br><br>
<input type="button" STYLE="font-size:12pt" value="Generate Lotto 6/49 Numbers" onclick="mylotto()">
<br><br>
<input type="text" size="2" STYLE="font-size:15pt" name="result">

<input type="text" STYLE="font-size:15pt" size="2" name="result">

<input type="text" size="2" STYLE="font-size:15pt"  name="result">

<input type="text" size="2" STYLE="font-size:15pt"  name="result">

<input type="text" size="2" STYLE="font-size:15pt"  name="result">

<input type="text" size="2" STYLE="font-size:15pt"  name="result">

</form>
  1. <script>
  2. function mylotto() {
  3. var rlts = document.getElementsByName("result");
  4. for(var i=0 ; i<=5; i++) {
  5. rlts[i].value=""; // clear results
  6. }
  7. var max=eval("document.lot.maxnum.value");
  8. if (max.length<1) {
  9. alert ("You must choose a number for the maximum value!");
  10. document.lot.maxnum.focus();
  11. return false;
  12. }
  13. for(var i=0 ; i<=5; i++) {
  14. rlts[i].value=(Math.floor(Math.random()*max)+1);
  15. }
  16. }
  17. </script>
  18. <form name="lot">
  19. Enter the Maximum Number Value<input type="text" name="maxnum" value="49" size="2" STYLE="font-size:15pt"><br><br>
  20. <input type="button" STYLE="font-size:12pt" value="Generate Lotto 6/49 Numbers" onclick="mylotto()">
  21. <br><br>
  22. <input type="text" size="2" STYLE="font-size:15pt" name="result">
  23. <input type="text" STYLE="font-size:15pt" size="2" name="result">
  24. <input type="text" size="2" STYLE="font-size:15pt"  name="result">
  25. <input type="text" size="2" STYLE="font-size:15pt"  name="result">
  26. <input type="text" size="2" STYLE="font-size:15pt"  name="result">
  27. <input type="text" size="2" STYLE="font-size:15pt"  name="result">
  28. </form>


It is basically a six number random generator.

It works good untill you run it a few times and start to get duplicate numbers.

I have hunted around the web and it seems I should "shuffle" the numbers.
I have tried to incorporate but bombs out all the time.

Can someone show me how to do this and where to put the code.

If there is another way to prevent duplicates, I will gladly listen, but just remember I a a newbie

Thanks

Joe
http://www.schembrionics.com
The Ultimate Solutions Center
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 15th, 2011, 4:33 am

  • Poly
  • Guru
  • Guru
  • User avatar
  • Joined: Jul 31, 2004
  • Posts: 1054
  • Loc: Same place you left me.
  • Status: Offline

Post August 15th, 2011, 1:50 pm

Hello wpas,

The following code will randomly generate a total of 6 numbers plus 1 bonus number. The maximum number that can be generated is 49. It will then ouput the data to a table.

The Script:


Code: [ Select ]
<script type="text/javascript" language="javascript">
    var lotto = {
        max : 49,
        num : 6,
        stars: 1
    }
            
    function lottery() {
        printNumbers(getNumbers((lotto.num+lotto.stars),lotto.max),"lotto");
    }

    function printNumbers(numbers,type){
        for(var x in numbers){
            document.getElementById(type+x).innerHTML = numbers[x];
        }
    }

    function getNumbers(totalBalls,balls) {
        var numbers = [];
        for (var i = balls; i > 0; i--){
            numbers.push(i);
        }
        numbers.sort(
            function(){
                return (Math.round(Math.random())-0.5);
            }
        );
        return numbers.slice(0,totalBalls);
    }
</script>
  1. <script type="text/javascript" language="javascript">
  2.     var lotto = {
  3.         max : 49,
  4.         num : 6,
  5.         stars: 1
  6.     }
  7.             
  8.     function lottery() {
  9.         printNumbers(getNumbers((lotto.num+lotto.stars),lotto.max),"lotto");
  10.     }
  11.     function printNumbers(numbers,type){
  12.         for(var x in numbers){
  13.             document.getElementById(type+x).innerHTML = numbers[x];
  14.         }
  15.     }
  16.     function getNumbers(totalBalls,balls) {
  17.         var numbers = [];
  18.         for (var i = balls; i > 0; i--){
  19.             numbers.push(i);
  20.         }
  21.         numbers.sort(
  22.             function(){
  23.                 return (Math.round(Math.random())-0.5);
  24.             }
  25.         );
  26.         return numbers.slice(0,totalBalls);
  27.     }
  28. </script>

This is the script that will generate the numbers and prepare them to be output into an HTML table. This code needs to be placed inside the <head> tag of your document.

Displaying The Numbers:


Code: [ Select ]
<table width="700" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td width="100" align="center">Lotto #1:</td>
  <td width="100" align="center">Lotto #2:</td>
  <td width="100" align="center">Lotto #3:</td>
  <td width="100" align="center">Lotto #4:</td>
  <td width="100" align="center">Lotto #5:</td>
  <td width="100" align="center">Lotto #6:</td>
  <td width="100" align="center">Bonus:</td>
 </tr></table><h3>
 <table width="700" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td width="100" align="center" id="lotto0">&nbsp;</td>
  <td width="100" align="center" id="lotto1">&nbsp;</td>
  <td width="100" align="center" id="lotto2">&nbsp;</td>
  <td width="100" align="center" id="lotto3">&nbsp;</td>
  <td width="100" align="center" id="lotto4">&nbsp;</td>
  <td width="100" align="center" id="lotto5">&nbsp;</td>
  <td width="100" align="center" id="lotto6">&nbsp;</td>
 </tr>
</table><br /></h3>
<input type="button" value=" Generate " id="reload" onclick="lottery()">
  1. <table width="700" border="0" cellspacing="0" cellpadding="0">
  2.  <tr>
  3.   <td width="100" align="center">Lotto #1:</td>
  4.   <td width="100" align="center">Lotto #2:</td>
  5.   <td width="100" align="center">Lotto #3:</td>
  6.   <td width="100" align="center">Lotto #4:</td>
  7.   <td width="100" align="center">Lotto #5:</td>
  8.   <td width="100" align="center">Lotto #6:</td>
  9.   <td width="100" align="center">Bonus:</td>
  10.  </tr></table><h3>
  11.  <table width="700" border="0" cellspacing="0" cellpadding="0">
  12.  <tr>
  13.   <td width="100" align="center" id="lotto0">&nbsp;</td>
  14.   <td width="100" align="center" id="lotto1">&nbsp;</td>
  15.   <td width="100" align="center" id="lotto2">&nbsp;</td>
  16.   <td width="100" align="center" id="lotto3">&nbsp;</td>
  17.   <td width="100" align="center" id="lotto4">&nbsp;</td>
  18.   <td width="100" align="center" id="lotto5">&nbsp;</td>
  19.   <td width="100" align="center" id="lotto6">&nbsp;</td>
  20.  </tr>
  21. </table><br /></h3>
  22. <input type="button" value=" Generate " id="reload" onclick="lottery()">

You will notice this contains 3 elements. First is the table containing the labels. Second is another table, with the output data. Third is a button that will generate the numbers each time you press it, calling the lottery function from our script above. You can apply styles or any other effects to these tables and button.

Complete Code:


Code: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Random Lotto Number Generator</title>
<script type="text/javascript" language="javascript">
    var lotto = {
        max : 49,
        num : 6,
        stars: 1
    }
            
    function lottery() {
        printNumbers(getNumbers((lotto.num+lotto.stars),lotto.max),"lotto");
    }

    function printNumbers(numbers,type){
        for(var x in numbers){
            document.getElementById(type+x).innerHTML = numbers[x];
        }
    }

    function getNumbers(totalBalls,balls) {
        var numbers = [];
        for (var i = balls; i > 0; i--){
            numbers.push(i);
        }
        numbers.sort(
            function(){
                return (Math.round(Math.random())-0.5);
            }
        );
        return numbers.slice(0,totalBalls);
    }
</script>
</head>

<body>

<table width="700" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td width="100" align="center">Lotto #1:</td>
  <td width="100" align="center">Lotto #2:</td>
  <td width="100" align="center">Lotto #3:</td>
  <td width="100" align="center">Lotto #4:</td>
  <td width="100" align="center">Lotto #5:</td>
  <td width="100" align="center">Lotto #6:</td>
  <td width="100" align="center">Bonus:</td>
 </tr></table><h3>
 <table width="700" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td width="100" align="center" id="lotto0">&nbsp;</td>
  <td width="100" align="center" id="lotto1">&nbsp;</td>
  <td width="100" align="center" id="lotto2">&nbsp;</td>
  <td width="100" align="center" id="lotto3">&nbsp;</td>
  <td width="100" align="center" id="lotto4">&nbsp;</td>
  <td width="100" align="center" id="lotto5">&nbsp;</td>
  <td width="100" align="center" id="lotto6">&nbsp;</td>
 </tr>
</table><br /></h3>
<input type="button" value=" Generate " id="reload" onclick="lottery()">
</body>
</html>
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Random Lotto Number Generator</title>
  6. <script type="text/javascript" language="javascript">
  7.     var lotto = {
  8.         max : 49,
  9.         num : 6,
  10.         stars: 1
  11.     }
  12.             
  13.     function lottery() {
  14.         printNumbers(getNumbers((lotto.num+lotto.stars),lotto.max),"lotto");
  15.     }
  16.     function printNumbers(numbers,type){
  17.         for(var x in numbers){
  18.             document.getElementById(type+x).innerHTML = numbers[x];
  19.         }
  20.     }
  21.     function getNumbers(totalBalls,balls) {
  22.         var numbers = [];
  23.         for (var i = balls; i > 0; i--){
  24.             numbers.push(i);
  25.         }
  26.         numbers.sort(
  27.             function(){
  28.                 return (Math.round(Math.random())-0.5);
  29.             }
  30.         );
  31.         return numbers.slice(0,totalBalls);
  32.     }
  33. </script>
  34. </head>
  35. <body>
  36. <table width="700" border="0" cellspacing="0" cellpadding="0">
  37.  <tr>
  38.   <td width="100" align="center">Lotto #1:</td>
  39.   <td width="100" align="center">Lotto #2:</td>
  40.   <td width="100" align="center">Lotto #3:</td>
  41.   <td width="100" align="center">Lotto #4:</td>
  42.   <td width="100" align="center">Lotto #5:</td>
  43.   <td width="100" align="center">Lotto #6:</td>
  44.   <td width="100" align="center">Bonus:</td>
  45.  </tr></table><h3>
  46.  <table width="700" border="0" cellspacing="0" cellpadding="0">
  47.  <tr>
  48.   <td width="100" align="center" id="lotto0">&nbsp;</td>
  49.   <td width="100" align="center" id="lotto1">&nbsp;</td>
  50.   <td width="100" align="center" id="lotto2">&nbsp;</td>
  51.   <td width="100" align="center" id="lotto3">&nbsp;</td>
  52.   <td width="100" align="center" id="lotto4">&nbsp;</td>
  53.   <td width="100" align="center" id="lotto5">&nbsp;</td>
  54.   <td width="100" align="center" id="lotto6">&nbsp;</td>
  55.  </tr>
  56. </table><br /></h3>
  57. <input type="button" value=" Generate " id="reload" onclick="lottery()">
  58. </body>
  59. </html>

The above contains all of the code for a complete HTML/JavaScript example on how to generate random lottery numbers without any repeated numbers.

Post up if you have any difficulties with the code.
Every job is a self-portrait of the person who did it: Autograph your work with excellence.
  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 15th, 2011, 2:38 pm

Hi Poly

Worked pretty good

Just need one more thing if you don't mind.

Is it possible to sort the numbers displayed so that if we get

23 7 31 4 45 43

We actually will see the sorted results

4 7 23 31 43 45

It makes it much easier to view

Thanks
http://www.schembrionics.com
The Ultimate Solutions Center
  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 15th, 2011, 2:42 pm

Hi Poly

Your script requires head and body.

If you will notice my script only needed body

In the situation I am in, I can only insert javascript between<body> and </body>

Can you script be done for use in body section only

Thanks
http://www.schembrionics.com
The Ultimate Solutions Center
  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 15th, 2011, 3:02 pm

Hi Again

I can use your script as it is.

The only problem is that it is not sorted

When I looked at your script, it did appear to have sorting but I do not see it in the result.

Is there an error or something

Thanks
http://www.schembrionics.com
The Ultimate Solutions Center
  • Poly
  • Guru
  • Guru
  • User avatar
  • Joined: Jul 31, 2004
  • Posts: 1054
  • Loc: Same place you left me.
  • Status: Offline

Post August 16th, 2011, 11:32 am

I'll look into it as soon as I get a chance.
Every job is a self-portrait of the person who did it: Autograph your work with excellence.
  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 16th, 2011, 12:29 pm

Hi Poly

thanks for your response

could you possible also add a "Reset" button to clear the numbers.

I tried but cannot seem to make it work.

thanks

Joe
http://www.schembrionics.com
The Ultimate Solutions Center
  • Poly
  • Guru
  • Guru
  • User avatar
  • Joined: Jul 31, 2004
  • Posts: 1054
  • Loc: Same place you left me.
  • Status: Offline

Post August 16th, 2011, 7:58 pm

Sure, shouldn't be too hard. Soon as I'm back on my PC I'll take a look at it and see what I can figure out.
Every job is a self-portrait of the person who did it: Autograph your work with excellence.
  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 16th, 2011, 8:16 pm

Thanks Poly

Look forward to your response

Joe
http://www.schembrionics.com
The Ultimate Solutions Center
  • Poly
  • Guru
  • Guru
  • User avatar
  • Joined: Jul 31, 2004
  • Posts: 1054
  • Loc: Same place you left me.
  • Status: Offline

Post August 16th, 2011, 11:14 pm

This has turned out to be a bit trickier than I expected. I have gotten quite a bit of it working how you are wanting, and am working on the reset button right now. Should have it working shortly.

Update: Finished!
This was pretty tricky, and I had to reference work done by Micky Penzance. Ultimately what we are doing is generating a series of numbers based off the users input on how many numbers to generate and what the maximum number can be. The numbers are ordered to be ascending. Lastly we output the data to the textbox. Each time you click Generate Numbers a new set of numbers are selected. Clicking reset clears the text box back to its original state. There are also fixes for the errors thrown when using Javascripts document commands in Netscape.

What it does:
Generates X number of numbers.
Value of each number cannot exceed Y.
Verify no repeat numbers.
Output to text box.

Final Code:


Code: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Random Lotto Number Generator</title>
</head>

<body>
<script language="JavaScript">
var loop;
var randy;

function make_array(size){
this.length = size;
      for (a=0; a<size; a++) this[a]="";
}

function generatenos(){
hold = new make_array(document.lottery.max_number.value);
document.lottery.numbers.value = "";
    for(loop=0;loop<document.lottery.balls_drawn.value;loop++){
        randy = Math.round(Math.random()*(document.lottery.max_number.value-1));
        randy++;
        if(hold[randy]==1){
            loop--;
            continue;
            }
        if(hold[randy]!=1){
            hold[randy]=1;
            }
            }
    for(loop=0;loop<=document.lottery.max_number.value;loop++){
        if(hold[loop]==1)
            document.lottery.numbers.value = document.lottery.numbers.value + loop + " ";
    }
}
</script>

<script language="JavaScript">
var axel = Math.random() + "";
var PageId = axel * 1000000000000000000;
NS4 = document.layers;
if (NS4) {
origWidth = innerWidth;
origHeight = innerHeight;
}
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if (NS4) onresize = reDo;
</script>

<center>
<form name="lottery">Total number of balls:
   <input type="text" name="balls_drawn" size="3" value="6">
   Maximum Number:
   <input type="text" name="max_number" size="3" value="49">
   <input type="button" value="Generate Numbers" onclick="generatenos()" name="button2"><br />
   <input type="text" name="numbers" size="29" value="Good luck!">
   <input type="reset">
   </form>
</tr>
</tbody></table></center>
</body>
</html>
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Random Lotto Number Generator</title>
  6. </head>
  7. <body>
  8. <script language="JavaScript">
  9. var loop;
  10. var randy;
  11. function make_array(size){
  12. this.length = size;
  13.       for (a=0; a<size; a++) this[a]="";
  14. }
  15. function generatenos(){
  16. hold = new make_array(document.lottery.max_number.value);
  17. document.lottery.numbers.value = "";
  18.     for(loop=0;loop<document.lottery.balls_drawn.value;loop++){
  19.         randy = Math.round(Math.random()*(document.lottery.max_number.value-1));
  20.         randy++;
  21.         if(hold[randy]==1){
  22.             loop--;
  23.             continue;
  24.             }
  25.         if(hold[randy]!=1){
  26.             hold[randy]=1;
  27.             }
  28.             }
  29.     for(loop=0;loop<=document.lottery.max_number.value;loop++){
  30.         if(hold[loop]==1)
  31.             document.lottery.numbers.value = document.lottery.numbers.value + loop + " ";
  32.     }
  33. }
  34. </script>
  35. <script language="JavaScript">
  36. var axel = Math.random() + "";
  37. var PageId = axel * 1000000000000000000;
  38. NS4 = document.layers;
  39. if (NS4) {
  40. origWidth = innerWidth;
  41. origHeight = innerHeight;
  42. }
  43. function reDo() {
  44. if (innerWidth != origWidth || innerHeight != origHeight)
  45. location.reload();
  46. }
  47. if (NS4) onresize = reDo;
  48. </script>
  49. <center>
  50. <form name="lottery">Total number of balls:
  51.    <input type="text" name="balls_drawn" size="3" value="6">
  52.    Maximum Number:
  53.    <input type="text" name="max_number" size="3" value="49">
  54.    <input type="button" value="Generate Numbers" onclick="generatenos()" name="button2"><br />
  55.    <input type="text" name="numbers" size="29" value="Good luck!">
  56.    <input type="reset">
  57.    </form>
  58. </tr>
  59. </tbody></table></center>
  60. </body>
  61. </html>


Hopefully this does what you want it to do. Post up if you still have issues!
Every job is a self-portrait of the person who did it: Autograph your work with excellence.
  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 17th, 2011, 12:54 am

Hi Poly

Tested your script and it works great from what I have done so far.

I want to thank you very much for all your assistance.

Since I know what the script does, I can use it as a valuable learning execise.

Again, thank you very much for your help.

Could not have done it without you

Are you a night owl as you seem to be up in the wee hours of the morning

Joe
http://www.schembrionics.com
The Ultimate Solutions Center
  • Poly
  • Guru
  • Guru
  • User avatar
  • Joined: Jul 31, 2004
  • Posts: 1054
  • Loc: Same place you left me.
  • Status: Offline

Post August 17th, 2011, 1:03 am

Night time is the best time of the day ;)
Every job is a self-portrait of the person who did it: Autograph your work with excellence.
  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 17th, 2011, 1:11 am

Poly

As I was testing, I accidentally left the max balls and max number blank and as expected nothing happened.

Is it possible to add an alert message such that if either or both are left blank to say something like:

max balls: "You must enter the number of balls"

max number: "You must enter the maximum number and it must be greater than the number of balls"

Thanks
http://www.schembrionics.com
The Ultimate Solutions Center
  • wpas
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 12, 2010
  • Posts: 214
  • Loc: Canada
  • Status: Offline

Post August 17th, 2011, 1:20 am

Hi Poly

I noticed that if I filled in the number of balls but left the max number blank, the script went into an endless loop.

However, if I left the number of balls blank, but filled in the max number then nothing happened.

I guess then the critical one is the number of balls.

If it is left blank, the you should get the alert message and the script should be prevented from running or else just reset to beginning after ok is pressed on the alert message.

For the max number I guess you only need the alert message

Joe
http://www.schembrionics.com
The Ultimate Solutions Center
  • Poly
  • Guru
  • Guru
  • User avatar
  • Joined: Jul 31, 2004
  • Posts: 1054
  • Loc: Same place you left me.
  • Status: Offline

Post August 17th, 2011, 1:40 am

I'll fix it up first thing in the AM. Will be a simple JS validation. One question on deciding how to do it: If I build it using an external .js file for validation, can you use that?
Every job is a self-portrait of the person who did it: Autograph your work with excellence.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 17th, 2011, 1:40 am

Post Information

  • Total Posts in this topic: 20 posts
  • Users browsing this forum: No registered users and 182 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.