Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 30
Start with writing a program to shuffle cards. That part is hard enough. Once upon a time, I wrote a program to shuffle cards, and it removed any frequencies of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined! The Flavored Coffee Guy's Avatar
    Join Date
    Aug 2006
    Posts
    0

    Start with writing a program to shuffle cards. That part is hard enough.

    Once upon a time, I wrote a program to shuffle cards, and it removed any frequencies of repetition and produced a naturalized random. I started by drawing a random number between 1 and 100, then a second number between 1 and 10. I cut the deck at 31 cards and loaded that into my right hand array, 21 into my left hand array, and moved the cards from the right hand array into the left hand array based upon the random number between 1 and 10. The random number between 1 and 100 is used to determin how many times to shuffle the deck, and put into a loop. Instead of drawing a number between 1 and 26, or 1 in 52, I drew two numbers between 1 and 3 every time the loop reaches the point at which it will fill the first Deck array that was cut, one for the left hand, one for the right hand array, and the loop is within the first loop of how many times to shuffle. This left hand/right hand controller switches from the left drawing a random number of 1,2, or 3, and placing that number of cards into the deck array. Then the right hand does the same thing, and this alternation is committed to until the full deck is back into the deck array. The cutting of the cards is then repeated after the counter is deincremented for the main number of times to shuffle loop.

    If you've ever physically shuffled a deck of cards, then you know that you almost never see every other card go to either the absolute left or right hand, and there are always some left over because the deck wasn't cut exactly. So, the program is written to insure the deck is never cut exactly, and the cards are shuffled imperfectly.

    This is the program that is needed to randomly name files and directories, and insure that no-two computers are the same. Other than that, any card game can use naturalized randoms with it.

    With video games, you can position enemies prior to game play by loading an array of possible starting positions for the enemy game characters. I don't know if you ever played Starwars Battlefield II, but that game has some serious issues in character placement. The appear out of nowhere, and that's really the bad part. I'd use that radar feature, that they always place in games to tell you where the enemies are, to uh, make sure that the game player doesn't see where they are coming from, and that they don't appear out of nowhere.

    You can see an example of how randoms can be utilized in cross multiplication of randoms to produce a naturalized random here at this link:
    Magic Squares

    Every time you close the window it opens, and click on the link again you will find another puzzle. There are over 40 thousand different puzzles, but only 99 answers. Sorry for any inconvenience, but it only works with Microsoft's Internet Explorer.

    Now, if you add up any row, column, or diagonal, which is marked out and colored so that it's easy to follow, I always maintain the upperhand, and know the answer you'll find on your calculator.

  2. #12
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    Luton, England, UK, Earth
    Posts
    639
    Now, is it me or does this look like spam?

    Someone who has no posts on the forums, obviously clued up about security matters, with links to an app they made?

    Ah well, could be wrong...

  3. #13
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    I don't have the foggiest idea what the point of this thread is.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  4. #14
    Linux Engineer psic's Avatar
    Join Date
    Nov 2004
    Location
    Ljubljana, Slovenia
    Posts
    1,205
    Quote Originally Posted by techieMoe
    I don't have the foggiest idea what the point of this thread is.
    That makes two of us. Perhaps to give me a headache? It's working...

    Just a thought: the weakest link in computer security is the user. You can encrypt everything like crazy, have 20+ character long passwords with random letters, numbers, etc., but if you can convince some secretary that you need file X, well, you've got it, encryption or no encryption.

  5. #15
    Just Joined!
    Join Date
    Aug 2006
    Posts
    23
    on my pc it says this guy has 0 posts 0.o. 0.o

  6. #16
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Coffee Lounge posts don't count towards a person's post count.

    Okay, first off, I hate to mention it, but probably very few of us have IE to view your app there .

    Secondly, the reason why we're not taking you seriously is that you're being extremely long-winded and unnecessary over the issue. While (I'm sure) a fascinating topic for a master's thesis, it is extremely impractical and is an extremely unnecessary issue. Have a firewall, be a smart user, and you're pretty much perfectly safe. Theoretically, you're not, but realistically, you are. Find me a person who has been "hacked" or gotten a virus, and I can all but guarantee you that they either a) ran a program they shouldn't have, or b) did it themselves.

  7. #17
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    Luton, England, UK, Earth
    Posts
    639
    Cabhan, don't worry, it's spam

  8. #18
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    Quote Originally Posted by Cabhan
    Have a firewall, be a smart user, and you're pretty much perfectly safe. Theoretically, you're not, but realistically, you are. Find me a person who has been "hacked" or gotten a virus, and I can all but guarantee you that they either a) ran a program they shouldn't have, or b) did it themselves.
    I feel this is a key point: as you said ... theoretically a lot of things could happen, but if we go around trying to deal with problems which don't exist we're wasting our time. I don't think there's any such thing as 'absolute security' or absolute anything for that matter ...

    If you want a perfect model of randomness though, bus timetables are the way to go. The times are there on a table (your encryption key) but the buses are subject to the randomness of traffic along the way, so they never roll up on time. I speak as one who knows ...

    As for this thread ... remember that bulls**t baffles brains.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  9. #19
    Just Joined! The Flavored Coffee Guy's Avatar
    Join Date
    Aug 2006
    Posts
    0
    Quote Originally Posted by onlinebacon
    Now, is it me or does this look like spam?

    Someone who has no posts on the forums, obviously clued up about security matters, with links to an app they made?

    Ah well, could be wrong...
    Funny, it's an online puzzle, not an application. Free, isn't spam, and an example is what you really need.

    But then, I'm starting to believe that most of you making comments, aren't even programmers.

  10. #20
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    Quote Originally Posted by The Flavored Coffee Guy
    Funny, it's an online puzzle, not an application. Free, isn't spam, and an example is what you really need.

    But then, I'm starting to believe that most of you making comments, aren't even programmers.
    We're not trying to hurt your feelings - though we can seem a bit brutal sometimes - we're just concerned that you have 0 posts to the main forum, and you're not really involved in a discussion. You're trying to tell us that something is wrong with our favourite OS. You have the solution to this. We're trying to tell you that there isn't a problem.

    Normally someone posting to the coffee lounge says, 'Hello ...' and gives us some brief background about themselves.

    Zero posters with very long first posts to the coffee lounge make us think the following:
    • you might be a spammer (personally I don't think so);
    • you're a troll of some sort, and trying to annoy us (could be);
    • you're a twit.

    Again - sorry if this is offensive, but what are you trying to achieve? Threads like this usually get locked, and we all know it.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •