Page 1 of 1
Question: Anyone know of a program?
Posted:
Tue Apr 10, 2007 10:40 pm
by Garath the Shadowshifter
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. ^^;
Posted:
Tue Apr 10, 2007 11:25 pm
by Beyond
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.
Posted:
Tue Apr 10, 2007 11:31 pm
by Garath the Shadowshifter
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.
Posted:
Tue Apr 10, 2007 11:34 pm
by Garath the Shadowshifter
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. >_<
Posted:
Tue Apr 10, 2007 11:41 pm
by Beyond
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.
Posted:
Wed Apr 11, 2007 9:13 pm
by Garath the Shadowshifter
Ah now I got it working.
Thank you Beyond!
Posted:
Thu Apr 12, 2007 12:21 am
by Selena Aninikkou
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.
Posted:
Thu Apr 12, 2007 12:45 am
by Beyond
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.
Posted:
Thu Apr 12, 2007 8:46 am
by Selena Aninikkou
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.
Posted:
Thu Apr 12, 2007 7:31 pm
by Beyond
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.