Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
23 May, 2013, 20:39:00 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Easy way to: -  (Read 359 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Today at 01:21:25
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« on: 05 June, 2012, 02:43:30 »
0

Is there an easy way to create a list with dim 26 with:
Rnd integers for each dim#
Any Dim = int 1-26
Dim x =/= x
Ex
Dim 1 = X
Dim X= 1
Dim 2 = Y
Dim Y = 2

Ask if you dont understand
« Last Edit: 05 June, 2012, 02:44:56 by Wretchedlout » Logged
blue_bear_94
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 02:35:19
Date Registered: 09 May, 2012, 02:45:26
Location: Earth
Posts: 583


Total Post Ratings: +3

View Profile
« Reply #1 on: 05 June, 2012, 02:45:31 »
0

So you want a list of 26 random integers from 1 to 26 where each element is not equal to its index?
Logged


Kraphyko (TI-89 Image Editor) 80%
Starvak 2 1%
TI-84+SE User (2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User (1.02)
Spoiler for Programming Languages:
TI-83+ Basic - 4
TI-83+ Asm - 1
TI-89 Basic - 2
TI-89 C - 2.5
Computer C - 2
GameMaker - 3
Java - 1.5
Racket - 3
Scala - 1
Le jeu.
Spoiler for Ultimate Internet Meme:
<a href="http://www.youtube.com/watch?v=zOMvDCRWBLI" target="_blank">http://www.youtube.com/watch?v=zOMvDCRWBLI</a>
Spoiler for Banner:


This server is always updated to the newest snapshot. Please don't try to join it on 1.4.7.
Sunrise 3 will have to wait till about a week later.
Spoiler for hellowld.radiation:
<< stdradiation

I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... XDXD[I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... Crazy, I must have had too much radiation for breakfast... Evil Laugh CrazyBig smile]
 Cheesy({ MadSmileySmileySadSmileySadSadSad, MadSmileySmileySadSadSmileySadSmiley,
 MadSmileySmileySadSmileySmileySadSad, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSmileySmileySmileySmiley, MadSmileySadSadSadSadSad,
 MadSmileySmileySmileySadSmileySmileySmiley, MadSmileySmileySadSmileySmileySmileySmiley,
 MadSmileySmileySmileySadSadSmileySmiley, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSadSmileySadSad, MadSad});
Spoiler for Give Internet!:
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Today at 01:21:25
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« Reply #2 on: 05 June, 2012, 02:48:28 »
0

Yes, and the index of the number is = dim(num of index num
Logged
blue_bear_94
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 02:35:19
Date Registered: 09 May, 2012, 02:45:26
Location: Earth
Posts: 583


Total Post Ratings: +3

View Profile
« Reply #3 on: 05 June, 2012, 02:49:28 »
+1


1
2
3
4
5
6
7
8
9
10
11
26→dim(L1
Fill(0,L1
For(A,1,13
1+sum(not(cumSum(0=L1→B
Repeat C≠L1(B) and not(L1(C
randInt(1,26→C
End
C→L1(B
B→L1(C
End
Edit: I realized that I made a mistake.
Edit 2: != means not equal (2nd test 2)
« Last Edit: 05 June, 2012, 03:11:18 by blue_bear_94 » Logged


Kraphyko (TI-89 Image Editor) 80%
Starvak 2 1%
TI-84+SE User (2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User (1.02)
Spoiler for Programming Languages:
TI-83+ Basic - 4
TI-83+ Asm - 1
TI-89 Basic - 2
TI-89 C - 2.5
Computer C - 2
GameMaker - 3
Java - 1.5
Racket - 3
Scala - 1
Le jeu.
Spoiler for Ultimate Internet Meme:
<a href="http://www.youtube.com/watch?v=zOMvDCRWBLI" target="_blank">http://www.youtube.com/watch?v=zOMvDCRWBLI</a>
Spoiler for Banner:


This server is always updated to the newest snapshot. Please don't try to join it on 1.4.7.
Sunrise 3 will have to wait till about a week later.
Spoiler for hellowld.radiation:
<< stdradiation

I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... XDXD[I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... Crazy, I must have had too much radiation for breakfast... Evil Laugh CrazyBig smile]
 Cheesy({ MadSmileySmileySadSmileySadSadSad, MadSmileySmileySadSadSmileySadSmiley,
 MadSmileySmileySadSmileySmileySadSad, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSmileySmileySmileySmiley, MadSmileySadSadSadSadSad,
 MadSmileySmileySmileySadSmileySmileySmiley, MadSmileySmileySadSmileySmileySmileySmiley,
 MadSmileySmileySmileySadSadSmileySmiley, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSadSmileySadSad, MadSad});
Spoiler for Give Internet!:
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Today at 01:21:25
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« Reply #4 on: 05 June, 2012, 03:19:12 »
0

:DD thanks
Logged
jsj795
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 26 April, 2013, 03:43:03
Date Registered: 28 July, 2009, 22:10:35
Location: __̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.___
Posts: 1087


Total Post Ratings: +81

View Profile
« Reply #5 on: 05 June, 2012, 03:22:45 »
0

i was trying to make one using seq( and SortA but then blue_bear already got the answer Tongue
Logged



Spoiler for funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*
blue_bear_94
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 02:35:19
Date Registered: 09 May, 2012, 02:45:26
Location: Earth
Posts: 583


Total Post Ratings: +3

View Profile
« Reply #6 on: 05 June, 2012, 14:49:20 »
0

Well, let's see yours.
Logged


Kraphyko (TI-89 Image Editor) 80%
Starvak 2 1%
TI-84+SE User (2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User (1.02)
Spoiler for Programming Languages:
TI-83+ Basic - 4
TI-83+ Asm - 1
TI-89 Basic - 2
TI-89 C - 2.5
Computer C - 2
GameMaker - 3
Java - 1.5
Racket - 3
Scala - 1
Le jeu.
Spoiler for Ultimate Internet Meme:
<a href="http://www.youtube.com/watch?v=zOMvDCRWBLI" target="_blank">http://www.youtube.com/watch?v=zOMvDCRWBLI</a>
Spoiler for Banner:


This server is always updated to the newest snapshot. Please don't try to join it on 1.4.7.
Sunrise 3 will have to wait till about a week later.
Spoiler for hellowld.radiation:
<< stdradiation

I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... XDXD[I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... Crazy, I must have had too much radiation for breakfast... Evil Laugh CrazyBig smile]
 Cheesy({ MadSmileySmileySadSmileySadSadSad, MadSmileySmileySadSadSmileySadSmiley,
 MadSmileySmileySadSmileySmileySadSad, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSmileySmileySmileySmiley, MadSmileySadSadSadSadSad,
 MadSmileySmileySmileySadSmileySmileySmiley, MadSmileySmileySadSmileySmileySmileySmiley,
 MadSmileySmileySmileySadSadSmileySmiley, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSadSmileySadSad, MadSad});
Spoiler for Give Internet!:
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Today at 01:21:25
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« Reply #7 on: 06 June, 2012, 00:13:53 »
0

Herm....
well it seems that about only 1/6 of the time this works. The reason it "dosen't work" is because 5/6 of the time it makes a 0 for one of the variables. Could you please fix this so that only 1-26 are in the variables of the list?
It seems the 0's are in the 20-26th place of the list most of the time
-Thanks Smiley
Logged
blue_bear_94
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 02:35:19
Date Registered: 09 May, 2012, 02:45:26
Location: Earth
Posts: 583


Total Post Ratings: +3

View Profile
« Reply #8 on: 06 June, 2012, 00:59:58 »
0



1
2
3
4
5
6
7
8
9
10
11
26→dim(L1
Fill(0,L1
For(A,1,13
1+sum(not(cumSum(not(L1→B
Repeat C≠B and not(L1(C //changed
randInt(1,26→C
End
C→L1(B
B→L1(C
End
Did you type the L1 token (2nd+L1) or the individual letters 'L' '1'?
Logged


Kraphyko (TI-89 Image Editor) 80%
Starvak 2 1%
TI-84+SE User (2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User (1.02)
Spoiler for Programming Languages:
TI-83+ Basic - 4
TI-83+ Asm - 1
TI-89 Basic - 2
TI-89 C - 2.5
Computer C - 2
GameMaker - 3
Java - 1.5
Racket - 3
Scala - 1
Le jeu.
Spoiler for Ultimate Internet Meme:
<a href="http://www.youtube.com/watch?v=zOMvDCRWBLI" target="_blank">http://www.youtube.com/watch?v=zOMvDCRWBLI</a>
Spoiler for Banner:


This server is always updated to the newest snapshot. Please don't try to join it on 1.4.7.
Sunrise 3 will have to wait till about a week later.
Spoiler for hellowld.radiation:
<< stdradiation

I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... XDXD[I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... Crazy, I must have had too much radiation for breakfast... Evil Laugh CrazyBig smile]
 Cheesy({ MadSmileySmileySadSmileySadSadSad, MadSmileySmileySadSadSmileySadSmiley,
 MadSmileySmileySadSmileySmileySadSad, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSmileySmileySmileySmiley, MadSmileySadSadSadSadSad,
 MadSmileySmileySmileySadSmileySmileySmiley, MadSmileySmileySadSmileySmileySmileySmiley,
 MadSmileySmileySmileySadSadSmileySmiley, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSadSmileySadSad, MadSad});
Spoiler for Give Internet!:
Wretchedlout
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Today at 01:21:25
Date Registered: 04 April, 2012, 08:11:00
Posts: 64

Topic starter
Total Post Ratings: +6

View Profile
« Reply #9 on: 06 June, 2012, 01:08:24 »
0

2nd and 1
and it has worked every time now Smiley

double thanks
« Last Edit: 06 June, 2012, 01:10:18 by Wretchedlout » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.391 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.