Jump to content

Same Functionallity cleaner way?


Recommended Posts

Heya guys...I made this script that should go through every possibity combination. And its going to end up in a 26 digt, with lowercase a-z and 1-9. I want it to write these to a document. Its not much of a "useful" program but more to learn the syntax and how stuff work :)...

 

I did devolp a code that will write every combination of 3 digts with the numbers 1-3 which do what I want my final program to do.

 

The code is messy but I tried with comments to explain whats going on. Its more a snippet of what the final program shall do.

I feel like I've over complicated the code and if I kept this way the 26 digts...Will be rather a pain to code xD...Is there an easier way?

<snip>

Edited by Melba23
Code removed
Link to comment
Share on other sites

StringRegExp Will deteminate if it do exist...But how will this help  :wacko: ?

I need to to write like

AAAA

AAAB

AAAC...

AACA

AACB

...

CCCB

CCCC

DONE

 

How could I do this?

An alternative is to use something like the code below, but how will I detaminate an end?

<snip>

All credits for that go to um Valutaner or how the name was spelt

Edited by Melba23
Code removed
Link to comment
Share on other sites

StringRegExp Will deteminate if it do exist...But how will this help  :wacko: ?

I need to to write like

AAAA

AAAB

AAAC...

AACA

AACB

...

CCCB

CCCC

DONE

 

How could I do this?

An alternative is to use something like the code below, but how will I detaminate an end?

<snip>

All credits for that go to um Valutaner or how the name was spelt

The amount of permutations that you will end up with will be an insane amount of data.  I don't know what sort of storage you are going to use to contain this amount of data.

Take a look at just _ArrayPermute() which will not use the same letter more than once, and you can see that at just a-h (8 letters) without ever repeating a letter twice, we are already at 40,320 results. Bump that up by just one more letter ("i") for 9 letters and we are at 362,880 results.  You will see an even larger increase because you wish to be able to repeat characters in each result.  The only way I can picture this working is to generate a single result, given its index.  In fact, I think this has been discussed before at some length in another thread.

Edited by Melba23
Code removed
Link to comment
Share on other sites

I am well aware of the insanity of the reasualt, In fact I know how many resualt there is xD...

But maybe its me searching wrong tags, but I couldn't find anything around this.

So far, I asume the only way is to do this IF statement reapting owo?

And in the big whole it can be as unsorted as you want xD

ALL possibilities just have to be met...

Edited by Zanaj
Link to comment
Share on other sites

I am well aware of the insanity of the reasualt, In fact I know how many resualt there is xD...

But maybe its me searching wrong tags, but I couldn't find anything around this.

So far, I asume the only way is to do this IF statement reapting owo?

Sorry man, but there is no way to list all of this data like you are wanting.  Currently, it's impossible, and I don't see that changing any time soon.  Being able to pull up a single index of possible permutations (or combinations as you seem to want, which is much bigger) would even be fairly impractical.

If you honestly know how many results this will produce in theory, then you know why it's impossible.  First off, I don't know that there is enough storage in the world to hold this much data, and second, I don't know of a super computer capable of finishing the job before you die.

Edit: I'm sure somebody good with math will pop by at some point and demonstrate what an astronomical numbers of results this would produce, but permutations alone, of 36 characters (meaning no result is allowed to have 2 of the same characters) would results in 36! items, which  = 371,993,326,789,901,217,467,999,448,150,835,200,000,000 results.

Edit2 ( because this is interesting :P ) :

So the formula (I think) for determining the number of combinations would simply be n^r where n= number of characters to choose from, and r= combination length in digits.  So we have 36 characters and you want 26 digit results, so that is 36^26 which = 29,098,125,988,731,506,183,153,025,616,435,306,561,536.  Now that number is only the amount of results if you require all results are 26 digits, if you also wanted 25 digits, 24 digits, etc to be returned, we are again looking at increasing that number quite a bit.

Now if somehow magically, we were able to cram the 26 digit results in to one byte each, we are looking at 29,098,125,988,731,506 Yottabytes (I'd break it down more, but I don't know any larger unit to measure storage in).  Keep in mind 1 Yottabyte = 1 Trillion Terabytes, and you need 29 quadrillion of those.

Edited by danwilli
Link to comment
Share on other sites

  • Moderators

Zanaj,

 

 

every possibity combination. And its going to end up in a 26 digt, with lowercase a-z and 1-9. I want it to write these to a document. Its not much of a "useful" program but more to learn the syntax and how stuff work

 

Who are you kidding? What you want to do is known as a "rainbow table" and we will not help you produce one - do NOT ask about such things again.  Thread locked and any helpful code removed. :naughty:

 

To the responders,

 

Guys, please engage your brains before replying in future. ;)

 

M23

Edited by Melba23
Typo

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...