Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Anyone have a clue what this code does?

Anyone have a clue what this code does?

Scheduled Pinned Locked Moved The Weird and The Wonderful
question
18 Posts 16 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Joe Sonderegger

    :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

    Have a nice life!!

    L Offline
    L Offline
    Luc Pattyn
    wrote on last edited by
    #2

    it shows there is no need for obfuscators in the modern toolbox. :laugh:

    Luc Pattyn [Forum Guidelines] [My Articles]


    this months tips: - before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use PRE tags to preserve formatting when showing multi-line code snippets


    C 1 Reply Last reply
    0
    • J Joe Sonderegger

      :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

      Have a nice life!!

      S Offline
      S Offline
      Steve Hansen
      wrote on last edited by
      #3

      Looks some kind of sort method to me :P

      1 Reply Last reply
      0
      • J Joe Sonderegger

        :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

        Have a nice life!!

        D Offline
        D Offline
        DoomedOne
        wrote on last edited by
        #4

        Apparently this code generates a list of reversed ordered blocks of indexes where the new_settings and acc_settings differ, separating the block in the items where the value in new_settings is > the next item in acc_settings. I guess...

        K 1 Reply Last reply
        0
        • J Joe Sonderegger

          :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

          Have a nice life!!

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #5

          It's a breath mint and a dish detergent.

          1 Reply Last reply
          0
          • J Joe Sonderegger

            :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

            Have a nice life!!

            CPalliniC Online
            CPalliniC Online
            CPallini
            wrote on last edited by
            #6

            Uhm... Provides theoretical foundation to Dark Bulk Matter existence? :-D

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

            In testa che avete, signor di Ceprano?

            1 Reply Last reply
            0
            • J Joe Sonderegger

              :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

              Have a nice life!!

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #7

              It returns the number 42 and the question is "How many roads must a man walk down?"

              Deja View - the feeling that you've seen this post before.

              My blog | My articles

              F P 2 Replies Last reply
              0
              • P Pete OHanlon

                It returns the number 42 and the question is "How many roads must a man walk down?"

                Deja View - the feeling that you've seen this post before.

                My blog | My articles

                F Offline
                F Offline
                Fatbuddha 1
                wrote on last edited by
                #8

                Now thats a good one! Cheers

                You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)

                1 Reply Last reply
                0
                • J Joe Sonderegger

                  :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

                  Have a nice life!!

                  I Offline
                  I Offline
                  ied
                  wrote on last edited by
                  #9

                  It's a model describing the eating pattern probability of termites... -- Ian

                  1 Reply Last reply
                  0
                  • J Joe Sonderegger

                    :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

                    Have a nice life!!

                    V Offline
                    V Offline
                    Vasudevan Deepak Kumar
                    wrote on last edited by
                    #10

                    First it missed a good indentation. ;)

                    Vasudevan Deepak Kumar Personal Homepage
                    Tech Gossips
                    A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                    1 Reply Last reply
                    0
                    • D DoomedOne

                      Apparently this code generates a list of reversed ordered blocks of indexes where the new_settings and acc_settings differ, separating the block in the items where the value in new_settings is > the next item in acc_settings. I guess...

                      K Offline
                      K Offline
                      KarstenK
                      wrote on last edited by
                      #11

                      Surrender!!! You wrote it. ;P

                      Greetings from Germany

                      1 Reply Last reply
                      0
                      • P Pete OHanlon

                        It returns the number 42 and the question is "How many roads must a man walk down?"

                        Deja View - the feeling that you've seen this post before.

                        My blog | My articles

                        P Offline
                        P Offline
                        peterchen
                        wrote on last edited by
                        #12

                        Awww shucks, now it happened again.


                        We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                        My first real C# project | Linkify!|FoldWithUs! | sighist

                        1 Reply Last reply
                        0
                        • L Luc Pattyn

                          it shows there is no need for obfuscators in the modern toolbox. :laugh:

                          Luc Pattyn [Forum Guidelines] [My Articles]


                          this months tips: - before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use PRE tags to preserve formatting when showing multi-line code snippets


                          C Offline
                          C Offline
                          codemunkeh
                          wrote on last edited by
                          #13

                          Quick n Easy Obfuscation! Search for the regular expression // {.*} and replace with nothing at all. (God help you if you use // anywhere in like, a file path).


                          Ninja (the Nerd)
                          Confused? You will be...

                          1 Reply Last reply
                          0
                          • J Joe Sonderegger

                            :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

                            Have a nice life!!

                            N Offline
                            N Offline
                            NimitySSJ
                            wrote on last edited by
                            #14

                            Why? Is it something you need to figure out for work? Just a challenge for us? What's the concern? -Nick P.

                            J 1 Reply Last reply
                            0
                            • N NimitySSJ

                              Why? Is it something you need to figure out for work? Just a challenge for us? What's the concern? -Nick P.

                              J Offline
                              J Offline
                              Joe Sonderegger
                              wrote on last edited by
                              #15

                              About 4 years ago I had a problem with this code and spent a night trying to understand what the programmer wanted to do. It was just the worst code I have seen. Especially with parameter l and 1 is very difficult to tell apart...

                              Have a nice life!!

                              1 Reply Last reply
                              0
                              • J Joe Sonderegger

                                :confused: void set_ptList(int len, int *start) { int i, z, l; i = 0; z = 0; while (i < len) { if (new_settings[3][i] != act_settings[3][i]) { if (i < (len-1)) { if (new_settings[3][i] > act_settings[3][i+1]) { i++; z++; } else { for (l = i; l >= i-z; l--) { list[*start][0] = 3; list[*start][1] = l; (*start)++; } z = 0; i++; } } else { l = i; i++; while (z >= 0) { list[*start][0] = 3; list[*start][1] = l; (*start)++; z--; l--; } } } else { i++; } } } :confused:

                                Have a nice life!!

                                T Offline
                                T Offline
                                Tom Delany
                                wrote on last edited by
                                #16

                                :omg: :wtf: That makes my head hurt!

                                WE ARE DYSLEXIC OF BORG. Refutance is systile. Your a$$ will be laminated.

                                X 1 Reply Last reply
                                0
                                • T Tom Delany

                                  :omg: :wtf: That makes my head hurt!

                                  WE ARE DYSLEXIC OF BORG. Refutance is systile. Your a$$ will be laminated.

                                  X Offline
                                  X Offline
                                  Xpnctoc
                                  wrote on last edited by
                                  #17

                                  Tom, I LOVE your signature line. DYSLEXIC of BORG!!! I laughed till my stomach hurt.

                                  T 1 Reply Last reply
                                  0
                                  • X Xpnctoc

                                    Tom, I LOVE your signature line. DYSLEXIC of BORG!!! I laughed till my stomach hurt.

                                    T Offline
                                    T Offline
                                    Tom Delany
                                    wrote on last edited by
                                    #18

                                    :) I wish I could claim it as my own original line, but I got it from my son. He found it somewhere online, and I loved it. :)

                                    WE ARE DYSLEXIC OF BORG. Refutance is systile. Your a$$ will be laminated.

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups