huge variables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Hansen

    huge variables

    Is in any way possible to define a variable as a integer-value which contain
    about 300 numbers in a row?

    I have thought about an Override-function for Data-types but I dunno how -
    but if it is possible that a Data-type which can hold an unlimited numbers
    of numbers :D exists I would be happy or if it is possible to Override the
    Dim-function...


    Hilsen fra Peter
    (sorry about gramma etc - I am not that good at English as I thought - hehe)


  • Kurt

    #2
    Re: huge variables

    damn... i think the best you can probably do is to create an array or
    arraylist of integes to store all of those numbers... otherwise, just
    declare a string variable, and convert substrings into integer variables
    from there if you wish...


    "Peter Hansen" <wont@tell.yo u> wrote in message
    news:u1xxYNPfDH A.620@TK2MSFTNG P11.phx.gbl...[color=blue]
    > Is in any way possible to define a variable as a integer-value which[/color]
    contain[color=blue]
    > about 300 numbers in a row?
    >
    > I have thought about an Override-function for Data-types but I dunno how -
    > but if it is possible that a Data-type which can hold an unlimited numbers
    > of numbers :D exists I would be happy or if it is possible to Override the
    > Dim-function...
    >
    >
    > Hilsen fra Peter
    > (sorry about gramma etc - I am not that good at English as I thought -[/color]
    hehe)[color=blue]
    >
    >[/color]


    Comment

    • One Handed Man [ OHM ]

      #3
      Re: huge variables

      We do not want to lose something in the translation of your question into
      English.



      Can you please explain exactly what you are trying to do with your code? It
      may help us understand and offer differing solutions to your problem.



      OHM


      "Peter Hansen" <wont@tell.yo u> wrote in message
      news:u1xxYNPfDH A.620@TK2MSFTNG P11.phx.gbl...[color=blue]
      > Is in any way possible to define a variable as a integer-value which[/color]
      contain[color=blue]
      > about 300 numbers in a row?
      >
      > I have thought about an Override-function for Data-types but I dunno how -
      > but if it is possible that a Data-type which can hold an unlimited numbers
      > of numbers :D exists I would be happy or if it is possible to Override the
      > Dim-function...
      >
      >
      > Hilsen fra Peter
      > (sorry about gramma etc - I am not that good at English as I thought -[/color]
      hehe)[color=blue]
      >
      >[/color]


      Comment

      • Peter Hansen

        #4
        Re: huge variables

        kay kay

        A single letter should be converted with the Asc(letter)-function into a
        number. The number has to go through a equation and end up in a pretty long
        number - about 200 numbers.

        I am going to use this as a certification for a single user. The username
        and the incrypted string is parsed into a txt-file like

        -----------------start
        John Doe

        [huuuuuge string]
        -----------------stop

        This file has to be used when trying to connect to a server. You would have
        to upload this file and the server will check if the string is equal to the
        username (through the equation) - no arms no cookies (no valid txt-file - no
        access)

        The huge string is created by a simple function where every single letter is
        parsed throug a equation which returns about 200 to 300 numbers pr. letter.
        Every time a letter returns a integer value (200 to 300 numbers) they will
        be pasted to the end of the function like if the letter 'k' returns the
        number 8 and the letter 'r' returns 9 then 9 will be pasted beside 8 as
        89...

        A single name on 5 letters will therefor end up in a huge string, about 1500
        numbers

        The problem is the equation. I haven't been able to find a data-type which
        can handle the result of the equation if the result is as it should be - at
        200 to 300 numbers...

        like

        Asc(letter) -> the equation = a 200 to 300 integer-value. huge string =
        integer value & integer value ....

        The problem is not the string (at the moment) but the integer value because
        of the datatype is too small :D


        Does it make any sence or?

        Hilsen fra Peter
        (sorry about gramma etc)

        "One Handed Man [ OHM ]" <terry_burnsREM OVE%FOR%NO%SPAM @BTOpenworld.co m>
        wrote in message news:#qjTiuPfDH A.1200@TK2MSFTN GP09.phx.gbl...[color=blue]
        > We do not want to lose something in the translation of your question into
        > English.
        >
        >
        >
        > Can you please explain exactly what you are trying to do with your code?[/color]
        It[color=blue]
        > may help us understand and offer differing solutions to your problem.
        >
        >
        >
        > OHM
        >
        >
        > "Peter Hansen" <wont@tell.yo u> wrote in message
        > news:u1xxYNPfDH A.620@TK2MSFTNG P11.phx.gbl...[color=green]
        > > Is in any way possible to define a variable as a integer-value which[/color]
        > contain[color=green]
        > > about 300 numbers in a row?
        > >
        > > I have thought about an Override-function for Data-types but I dunno[/color][/color]
        how -[color=blue][color=green]
        > > but if it is possible that a Data-type which can hold an unlimited[/color][/color]
        numbers[color=blue][color=green]
        > > of numbers :D exists I would be happy or if it is possible to Override[/color][/color]
        the[color=blue][color=green]
        > > Dim-function...
        > >
        > >
        > > Hilsen fra Peter
        > > (sorry about gramma etc - I am not that good at English as I thought -[/color]
        > hehe)[color=green]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • One Handed Man [ OHM ]

          #5
          Re: huge variables

          That's much clearer. I'm off to lunch now, and if someone has not answered
          by the time I get back, I will

          Regards


          "Peter Hansen" <wont@tell.yo u> wrote in message
          news:%23hcKuFQf DHA.1872@TK2MSF TNGP09.phx.gbl. ..[color=blue]
          > kay kay
          >
          > A single letter should be converted with the Asc(letter)-function into a
          > number. The number has to go through a equation and end up in a pretty[/color]
          long[color=blue]
          > number - about 200 numbers.
          >
          > I am going to use this as a certification for a single user. The username
          > and the incrypted string is parsed into a txt-file like
          >
          > -----------------start
          > John Doe
          >
          > [huuuuuge string]
          > -----------------stop
          >
          > This file has to be used when trying to connect to a server. You would[/color]
          have[color=blue]
          > to upload this file and the server will check if the string is equal to[/color]
          the[color=blue]
          > username (through the equation) - no arms no cookies (no valid txt-file -[/color]
          no[color=blue]
          > access)
          >
          > The huge string is created by a simple function where every single letter[/color]
          is[color=blue]
          > parsed throug a equation which returns about 200 to 300 numbers pr.[/color]
          letter.[color=blue]
          > Every time a letter returns a integer value (200 to 300 numbers) they will
          > be pasted to the end of the function like if the letter 'k' returns the
          > number 8 and the letter 'r' returns 9 then 9 will be pasted beside 8 as
          > 89...
          >
          > A single name on 5 letters will therefor end up in a huge string, about[/color]
          1500[color=blue]
          > numbers
          >
          > The problem is the equation. I haven't been able to find a data-type which
          > can handle the result of the equation if the result is as it should be -[/color]
          at[color=blue]
          > 200 to 300 numbers...
          >
          > like
          >
          > Asc(letter) -> the equation = a 200 to 300 integer-value. huge string =
          > integer value & integer value ....
          >
          > The problem is not the string (at the moment) but the integer value[/color]
          because[color=blue]
          > of the datatype is too small :D
          >
          >
          > Does it make any sence or?
          >
          > Hilsen fra Peter
          > (sorry about gramma etc)
          >
          > "One Handed Man [ OHM ]" <terry_burnsREM OVE%FOR%NO%SPAM @BTOpenworld.co m>
          > wrote in message news:#qjTiuPfDH A.1200@TK2MSFTN GP09.phx.gbl...[color=green]
          > > We do not want to lose something in the translation of your question[/color][/color]
          into[color=blue][color=green]
          > > English.
          > >
          > >
          > >
          > > Can you please explain exactly what you are trying to do with your code?[/color]
          > It[color=green]
          > > may help us understand and offer differing solutions to your problem.
          > >
          > >
          > >
          > > OHM
          > >
          > >
          > > "Peter Hansen" <wont@tell.yo u> wrote in message
          > > news:u1xxYNPfDH A.620@TK2MSFTNG P11.phx.gbl...[color=darkred]
          > > > Is in any way possible to define a variable as a integer-value which[/color]
          > > contain[color=darkred]
          > > > about 300 numbers in a row?
          > > >
          > > > I have thought about an Override-function for Data-types but I dunno[/color][/color]
          > how -[color=green][color=darkred]
          > > > but if it is possible that a Data-type which can hold an unlimited[/color][/color]
          > numbers[color=green][color=darkred]
          > > > of numbers :D exists I would be happy or if it is possible to Override[/color][/color]
          > the[color=green][color=darkred]
          > > > Dim-function...
          > > >
          > > >
          > > > Hilsen fra Peter
          > > > (sorry about gramma etc - I am not that good at English as I thought -[/color]
          > > hehe)[color=darkred]
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Cor

            #6
            Re: huge variables

            Peter,
            Just a simple approach
            \\\\\\\\\
            Dim sharp As String
            sharp = Nothing
            Dim ohm As String
            Dim i As Integer = 1
            Do While i < 201
            sharp = sharp & (Asc("A") + i).ToString("00 0") 'be changed by a
            randomizer
            i += 1
            Loop
            MessageBox.Show (sharp)
            For i = 1 To 200
            ohm = ohm & Chr(CInt(sharp. Substring((i * 3 - 3), 3)) - i)
            'therefore that easy randomiser
            Next
            MessageBox.Show (ohm)
            //////////
            For what I understand that you wanted it I think it will work, with a string
            of numbers you can do anything you want.
            The value is to large to put it in an int64 and with arrays I suspect that
            you get problems when you send them to other places.
            I hope this gives you a little help to get on the route.
            Cor


            Comment

            • One Handed Man [ OHM ]

              #7
              Re: huge variables

              Sorry one more question, to do with your use of the word numbers

              //
              A single letter should be converted with the Asc(letter)-function into a
              number. The number has to go through a equation and end up in a pretty long
              number - about 200 numbers.
              //

              I assume you mean
              about 200 digits long ? such as ( as opposed to 200 integers )
              200000000000000 000000000000000 000000000000
              000000000000000 000000000000000 000000000000000 000000000000
              000000000000000 000000000000000 000000000000000 00000000000
              000000000000000 000000000000000 000000000000000 00000000
              000000000000000 000000000000000 000000000000000 0000000000
              000000000000000 000000000000000 000000000000000 000000000






              "Peter Hansen" <wont@tell.yo u> wrote in message
              news:%23hcKuFQf DHA.1872@TK2MSF TNGP09.phx.gbl. ..[color=blue]
              > kay kay
              >
              > A single letter should be converted with the Asc(letter)-function into a
              > number. The number has to go through a equation and end up in a pretty[/color]
              long[color=blue]
              > number - about 200 numbers.
              >
              > I am going to use this as a certification for a single user. The username
              > and the incrypted string is parsed into a txt-file like
              >
              > -----------------start
              > John Doe
              >
              > [huuuuuge string]
              > -----------------stop
              >
              > This file has to be used when trying to connect to a server. You would[/color]
              have[color=blue]
              > to upload this file and the server will check if the string is equal to[/color]
              the[color=blue]
              > username (through the equation) - no arms no cookies (no valid txt-file -[/color]
              no[color=blue]
              > access)
              >
              > The huge string is created by a simple function where every single letter[/color]
              is[color=blue]
              > parsed throug a equation which returns about 200 to 300 numbers pr.[/color]
              letter.[color=blue]
              > Every time a letter returns a integer value (200 to 300 numbers) they will
              > be pasted to the end of the function like if the letter 'k' returns the
              > number 8 and the letter 'r' returns 9 then 9 will be pasted beside 8 as
              > 89...
              >
              > A single name on 5 letters will therefor end up in a huge string, about[/color]
              1500[color=blue]
              > numbers
              >
              > The problem is the equation. I haven't been able to find a data-type which
              > can handle the result of the equation if the result is as it should be -[/color]
              at[color=blue]
              > 200 to 300 numbers...
              >
              > like
              >
              > Asc(letter) -> the equation = a 200 to 300 integer-value. huge string =
              > integer value & integer value ....
              >
              > The problem is not the string (at the moment) but the integer value[/color]
              because[color=blue]
              > of the datatype is too small :D
              >
              >
              > Does it make any sence or?
              >
              > Hilsen fra Peter
              > (sorry about gramma etc)
              >
              > "One Handed Man [ OHM ]" <terry_burnsREM OVE%FOR%NO%SPAM @BTOpenworld.co m>
              > wrote in message news:#qjTiuPfDH A.1200@TK2MSFTN GP09.phx.gbl...[color=green]
              > > We do not want to lose something in the translation of your question[/color][/color]
              into[color=blue][color=green]
              > > English.
              > >
              > >
              > >
              > > Can you please explain exactly what you are trying to do with your code?[/color]
              > It[color=green]
              > > may help us understand and offer differing solutions to your problem.
              > >
              > >
              > >
              > > OHM
              > >
              > >
              > > "Peter Hansen" <wont@tell.yo u> wrote in message
              > > news:u1xxYNPfDH A.620@TK2MSFTNG P11.phx.gbl...[color=darkred]
              > > > Is in any way possible to define a variable as a integer-value which[/color]
              > > contain[color=darkred]
              > > > about 300 numbers in a row?
              > > >
              > > > I have thought about an Override-function for Data-types but I dunno[/color][/color]
              > how -[color=green][color=darkred]
              > > > but if it is possible that a Data-type which can hold an unlimited[/color][/color]
              > numbers[color=green][color=darkred]
              > > > of numbers :D exists I would be happy or if it is possible to Override[/color][/color]
              > the[color=green][color=darkred]
              > > > Dim-function...
              > > >
              > > >
              > > > Hilsen fra Peter
              > > > (sorry about gramma etc - I am not that good at English as I thought -[/color]
              > > hehe)[color=darkred]
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • Danny van Kasteel

                #8
                Re: huge variables

                Hi,

                I've been reading the thread, and one thing that struck me as odd was that
                you are trying to mimic an immensely difficult and sensitive procedure by
                re-inventing the wheel...

                First of all, it is perfectly possible to convert a large amount of
                characters into a byte array and vice versa using the system.text.enc oding
                namespace.

                Secondly, and most importantly, why not use the System.Security .Encryption
                namespaces that .Net provides to create a strongly (128 bit) encrypted
                string? It is fairly easy to encrypt data using either DES or TripleDES
                (Data Encryption Standard), and provided you keep the keys secret, it is
                nearly unbreakable encryption. You can store the encrypted data as
                Base64-encoded strings in the text file, perhaps. (Convert.ToBase 64String())

                Hope this helps,

                Danny van Kasteel


                "Peter Hansen" <wont@tell.yo u> wrote in message
                news:u1xxYNPfDH A.620@TK2MSFTNG P11.phx.gbl...[color=blue]
                > Is in any way possible to define a variable as a integer-value which[/color]
                contain[color=blue]
                > about 300 numbers in a row?
                >
                > I have thought about an Override-function for Data-types but I dunno how -
                > but if it is possible that a Data-type which can hold an unlimited numbers
                > of numbers :D exists I would be happy or if it is possible to Override the
                > Dim-function...
                >
                >
                > Hilsen fra Peter
                > (sorry about gramma etc - I am not that good at English as I thought -[/color]
                hehe)[color=blue]
                >
                >[/color]


                Comment

                Working...