Search Results

Search found 6 results on 1 pages for 'whirlwin'.

Page 1/1 | 1 

  • How do you explain commented-out code to a non-programmer? [closed]

    - by whirlwin
    What is the quickest and most comprehensible way to explain to a non-programmer what commented-out code is? When I mentioned it in a conversation to non-programmers, they seemed lost. Such people could for instance be graphical designers, when working on the same team to make an application. Typically I would need to mention what I will be/currently am working with during an update meeting. At first I thought about substituting commented-out with unused code. While it is true to some degree, it is also very ambiguous. If you are wondering, I am working with legacy code with commented-out code. This leads to my question: "how do you explain commented-out code to a non-programmer?"

    Read the article

  • Windows CHKDSK starts when 6 seconds have passed

    - by Whirlwin
    After reading this thread I might have sorted out why the CHKDSK-prompt starts. But the biggest problem is that when it prompts me with Press any key with in 10..0 seconds, nothing happens until the timer hits 6, then it starts the check even though I've pressed any button (and yet it's 4 seconds left). This question states the problem as it appears at me, though the answer is wrong. Why does the actual check start after 6 seconds, and is there any way to disable it from within Windows?

    Read the article

  • Ruby shortest/most efficient way to write rnd hex

    - by Whirlwin
    Hi. What I have is a method used to generate random hex values. E.g 666 or FF7 However, I don't think it is efficient at all.. What I want is to make it more efficient which perhaps will make my code shorter as well, but I don't know how. That is why I need tips or hints Here is my code so far: def random_values random_values = Array.new letters = ['A','B','C','D','E','F'] for i in 1..15 if i <= 9 random_values << i else random_values << letters[i-10] end end return random_values.shuffle[0].to_s + random_values.shuffle[0].to_s + random_values.shuffle[0].to_s end As you probably see, I do not generate random numbers. I just shuffle the array containing the values I want, meaning all the numbers in the array are unique, which is not needed, but was the easiest solution for me when I wrote the code. I am most concerned about the return line.. If only it was possible to write like: return 3.times { random_values.shuffle[0] } or return random_values.shuffle[0].to_s *3 Thanks in advance!

    Read the article

  • Ruby shortest way to write rnd hex

    - by Whirlwin
    Hi. What I have is a method used to generate random hex values. E.g 666 or FF7 However, I don't think it looks simple/elegant at all.. What I want is to make it more simple which perhaps will make my code shorter as well, but I don't know how. That is why I need tips or hints Here is my code so far: def random_values random_values = Array.new letters = ['A','B','C','D','E','F'] for i in 1..15 if i <= 9 random_values << i else random_values << letters[i-10] end end return random_values.shuffle[0].to_s + random_values.shuffle[0].to_s + random_values.shuffle[0].to_s end As you probably see, I do not generate random numbers. I just shuffle the array containing the values I want, meaning all the numbers in the array are unique, which is not needed, but was the easiest solution for me when I wrote the code. I am most concerned about the return line.. If only it was possible to write like: return 3.times { random_values.shuffle[0] } or return random_values.shuffle[0].to_s *3 Thanks in advance!

    Read the article

  • Having duplicate enumerator values

    - by whirlwin
    I'm creating a Tetris clone in C++, and I have an enum GameProperty, which is specified as follows: enum GameProperty { NUM_OF_TETROMINOES = 7, NUM_OF_TILES = 4, TETROMINO_ROTATIONS = 4 }; In my case, I only use these values when looping through a tetromino's tiles, e.g: for (int i = 0; i < TETROMINO_TILES; i++) { } Is it under any circumstance considered bad practice to have multiple enumerators with the same value?

    Read the article

  • Using external SOAP service in Workflow service

    - by whirlwin
    I am using the .NET 4 framework and have made a WCF Workflow Service Application. I want to use a SOAP web service (.NET 3.5) I have running in another instance of VS. The only method that is exposed is the following: [WebMethod] public string Reverse(string input) { char[] chars = input.ToCharArray(); Array.Reverse(chars); return new string(chars); } I have used the following steps to add the service in my Workflow: Add Service Reference Provided the WSDL (the operation shows in the Operations box as expected) Clicked OK Build the solution to ensure that the service shows in my toolbox Drag the service from the toolbox into the workflow However, when I look at the properties of the service in the workflow, there is no way to specify the input argument or where to store the result of the invocation of the service. I only have the option of specifying some obscure parameters such as Body:InArgument<ReverseRequestBody and outBody:OutArgument<ReverseResponseBody (none of which are strings). Here is a screenshot depicting the properties of the service in the workflow: My question is therefore: Is it possible at all to use the SOAP service by specifying a string as the input argument (like it is meant to be used), and also assign the result to a workflow variable?

    Read the article

1