Question: Anyone know of a program?

Lives, Links, News, and TG. All these discussions abound in here!

Moderator: Moderators

Question: Anyone know of a program?

Postby Garath the Shadowshifter » Tue Apr 10, 2007 10:40 pm

I felt this was the best area (thread) to post this...

I was wondering if anyone knew of a program that would 'randomize' a list?

Like say I make a list of five foods...

1-Hamburger
2-Fries
3-cookies
4-Fish
5-oranges

What I need is a program that will randomly rearange those.

So upon accessing the program it would do something like this:

1-Oranges
2-cookies
3-Fish
4-Hamburger
5-Fires

Does anyone know of a program that will give me these results?

If not I'll have to go with my backup plan. It'll work but be annoying. ^^;
This Party's Getting CRAZY! LET'S ROCK!!
Image
User avatar
Garath the Shadowshifter
Active MSFer
Active MSFer
 
Posts: 897
Joined: Thu Mar 04, 2004 6:27 pm

Postby Beyond » Tue Apr 10, 2007 11:25 pm

Let me see...

Code: Select all
<html>
<head>
<script language="javascript">
var anyArray = new Array("Hamburger","Fries","Cookies","Fish","Oranges");

function randOrd(){
   return (Math.round(Math.random())-0.5);
}

anyArray.sort(randOrd);
</scripT>
</head>
<body>
<script>
document.write("1-" + anyArray[0] + "<br />");
document.write("2-" + anyArray[1] + "<br />");
document.write("3-" + anyArray[2] + "<br />");
document.write("4-" + anyArray[3] + "<br />");
document.write("5-" + anyArray[4] + "<br />");
</script>
</body>
</html>


Taran!

Copy and paste it into notepad and save it as .html then watch it in your favorite browser.
Randomness: Because coherency is overrated.
User avatar
Beyond
Active MSFer
Active MSFer
 
Posts: 971
Joined: Sun Dec 26, 2004 1:45 am
Location: near the protocol 7

Postby Garath the Shadowshifter » Tue Apr 10, 2007 11:31 pm

I can't save it as a .html file. That option isn't there for me.

I tried renaming the file to inclued that at the end, but as I kinda figured that didn't work.
This Party's Getting CRAZY! LET'S ROCK!!
Image
User avatar
Garath the Shadowshifter
Active MSFer
Active MSFer
 
Posts: 897
Joined: Thu Mar 04, 2004 6:27 pm

Postby Garath the Shadowshifter » Tue Apr 10, 2007 11:34 pm

Ok I figured out how to save it as an HTML file, but it doesn't do anything when I load it up.

Obviously I fail at understanding this program. >_<
This Party's Getting CRAZY! LET'S ROCK!!
Image
User avatar
Garath the Shadowshifter
Active MSFer
Active MSFer
 
Posts: 897
Joined: Thu Mar 04, 2004 6:27 pm

Postby Beyond » Tue Apr 10, 2007 11:41 pm

1. My Computer : Tools > Folder Options : View > Uncheck Hide extensions for known file tipes.
2. Change your... file.html.txt to file.html
3. ????
4. profit.
Randomness: Because coherency is overrated.
User avatar
Beyond
Active MSFer
Active MSFer
 
Posts: 971
Joined: Sun Dec 26, 2004 1:45 am
Location: near the protocol 7

Postby Garath the Shadowshifter » Wed Apr 11, 2007 9:13 pm

Ah now I got it working.

Thank you Beyond!
This Party's Getting CRAZY! LET'S ROCK!!
Image
User avatar
Garath the Shadowshifter
Active MSFer
Active MSFer
 
Posts: 897
Joined: Thu Mar 04, 2004 6:27 pm

Postby Selena Aninikkou » Thu Apr 12, 2007 12:21 am

http://crystalsanctuary.rpgsource.net/d ... omizer.zip

Here, though I'm sure by now you don't need it and wouldn't want anything from a worthless fake programmer anyway.
ImageImageImage
Popful Mail rules ^^
User avatar
Selena Aninikkou
Quiet MSFer
Quiet MSFer
 
Posts: 345
Joined: Thu Apr 29, 2004 12:57 am
Location: Ontario, Canada

Postby Beyond » Thu Apr 12, 2007 12:45 am

Don't feel bad. You tried, that's what is important.

I actually cheated becouse I searched the internet for references. And mine is a minimalistic approach. It needs a nice GUI, if you want you can help Garath with it.

°3° You have developed fast for a GUI program.

¯3¯ But I would recomend you to keep the size of your proyect down in cases like this one, simple proyects you want to share. 10mb the bin directory is too much. This involves avoiding using 'extra' libraries, they add too many thing you are not using.
Randomness: Because coherency is overrated.
User avatar
Beyond
Active MSFer
Active MSFer
 
Posts: 971
Joined: Sun Dec 26, 2004 1:45 am
Location: near the protocol 7

Postby Selena Aninikkou » Thu Apr 12, 2007 8:46 am

It isn't 10 MB, it's 4.7 MB. And it's large because...

  • I put the Qt libraries I used right into the folder, so you don't have to go to http://www.trolltech.com/ and download them yourself.
  • I left both the Windows and Linux executables in the bin folder. I probably could have deleted the latter and saved space.
  • To follow the requirements of the licence I used, I left the source code in the folder with the compiled program.
ImageImageImage
Popful Mail rules ^^
User avatar
Selena Aninikkou
Quiet MSFer
Quiet MSFer
 
Posts: 345
Joined: Thu Apr 29, 2004 12:57 am
Location: Ontario, Canada

Postby Beyond » Thu Apr 12, 2007 7:31 pm

My mistake. I didn't specify.

bin/
- QtCore4.dll 1871 kb
- QtGui4.dll 7685 kb
- randomizer 460 kb
- randomizer.exe 313 kb
total 10576 kb

The libraries are what makes it bigger. 10mb total for the windows version.
Randomness: Because coherency is overrated.
User avatar
Beyond
Active MSFer
Active MSFer
 
Posts: 971
Joined: Sun Dec 26, 2004 1:45 am
Location: near the protocol 7


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 78 guests