Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: wsmmi6674

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    781

    Re: How to determine cause of Enter event?

    That is what I figured, and I do have a handler for clicking for focus (MouseDown event), but I don't see an event for getting focus via tabbing.

    I also though about watching for a click, followed...
  2. Replies
    2
    Views
    781

    How to determine cause of Enter event?

    I have a custom control. When focus is given to this control, the Enter event is triggered. Is there any way to determine what caused focus to come to this control (Tabbed in, Shift-tabbed in, mouse...
  3. Thread: Promotions

    by wsmmi6674
    Replies
    6
    Views
    996

    Re: Promotions

    This is generally referred to as the "Peter Principle". See this link:http://pespmc1.vub.ac.be/PETERPR.html

    It is commonly paraphrased as "One tends to rise to the level of one's incompetence"....
  4. Re: Looking for ideas for "field of view" (line of sight) algorithm

    You should start from the outside as this will naturally lead to marking many of the interior cells as the visibility of the outside cells are determined.

    The touching diagonal obstacle problem is...
  5. Re: Looking for ideas for "field of view" (line of sight) algorithm

    I'm sure there are plenty of predefined solutions to this issue, but I'll chime in with my idea.

    Rather than considering the point of view of the observer, consider instead the ability of each...
  6. Replies
    4
    Views
    909

    Re: bitmap question

    The Bitmap class has a nice constructor option to simplify loading one from an embedded resource. It is using the namespace from the type and combining that with the string you pass in to create the...
  7. Replies
    8
    Views
    1,106

    Re: Multiple Enumerators

    I had a similar situation this week where I had nested lists of XML nodes, and I wanted to iterate over them all. Say you have a class with nested data:


    public class Nestor
    {
    public class...
  8. Replies
    10
    Views
    9,392

    Re: Shuffle Algorithm

    This assumes you are using the language's built-in random function (i.e. rand() for c++). There are plenty of algorithms available for an acceptable n-bit pseudo random number generator. And if...
  9. Replies
    2
    Views
    687

    Re: Overloading operators with Enums?

    Thanks, Pete.

    I was guessing that a class was the only way to do what I want. Its a bit more work, with more overhead, but it will get the job done. Ideally, I'd like to do this:



    public...
  10. Replies
    2
    Views
    687

    Overloading operators with Enums?

    Is it possible to overload an operator with both the addend and augend (lhs & rhs) as user defined enum types? I have two enums defined as:


    public enum Rotate
    {
    CLOCKWISE,
    COUNTER_CLOCKWISE...
  11. Replies
    10
    Views
    9,392

    Re: Shuffle Algorithm

    It depends on how you define the terms. Assuming a perfect random function, either Robo's or my algorithm results in a completly random distribution. The best a human could do is equal it. A dealer...
  12. Replies
    10
    Views
    9,392

    Re: Shuffle Algorithm

    Of couse! How silly of me. Note that your construction of selecting the next item to swap:


    int rand_ind=random(0,n-1);
    Is correct, unlike:


    int rand_ind=random(0,arr.size()-1);
    Which will...
  13. Replies
    10
    Views
    9,392

    Re: Shuffle Algorithm

    Assuming a "perfect" randomization function, here is some pseudo code that will return a random item from an array, one at a time, until the array is exhausted:



    Initialization:
    Fill an array...
  14. Replies
    1
    Views
    1,757

    Re: Taking over project - lone ranger

    Here are the areas I would focus on:

    - Requirements
    Try to get as complete a list of requirements as possible. In addition to the original developer (O.D.), also talk to the people that...
  15. Replies
    38
    Views
    43,944

    Re: Color Detection Algorithm

    Whereas RGB represents the Red, Green and Blue components of a color, HSV represents the Hue, Saturation, and Value (light- or dark-ness) components. Some feel it is a better match with the way...
  16. Thread: Simple Quiz

    by wsmmi6674
    Replies
    84
    Views
    3,733

    Re: Simple Quiz

    Jenny 8675309 is the correct answer to my question.
    --
    Scott
  17. Thread: Simple Quiz

    by wsmmi6674
    Replies
    84
    Views
    3,733

    Re: Simple Quiz

    An excellent guess, but wrong. Think about three orders of magnitude higher.
    --
    Scott
  18. Replies
    4
    Views
    7,125

    Re: Regarding Knapsack problem

    I see nothing in your code that indicates successive runs of the for loop will be N-1, N-2, etc. You may be assuming that since the cap (capacity of the knapsack) value will be getting progressively...
  19. Thread: Simple Quiz

    by wsmmi6674
    Replies
    84
    Views
    3,733

    Re: Simple Quiz

    A bit late, but if we are allowed to use math symbols, an infinately large number can be generated with two or more ones via:
    ((11!)!)!... etc.

    To attone for my smart a$$ answer, I offer this...
  20. Replies
    4
    Views
    7,125

    Re: Regarding Knapsack problem

    This feels like a homework problem, but what the heck...

    I believe the running time of your algorithm is limited by O(n^2). That is, for each item in the list, another loop is started over every...
  21. Replies
    2
    Views
    1,181

    Re: Wrapping objects with many links

    Unfortunately I cannot make the map out of graph nodes. The map already exists, and is an external component I have access to.

    The reason I don't want to duplicate the mapping information in the...
  22. Replies
    38
    Views
    43,944

    Re: Color Detection Algorithm

    Assuming you receive pixel values in RGB form, another option is to convert the color to HSV (Hue - Saturation - Value). Pure green has (I believe) a hue value of 192.

    This would make it easier to...
  23. Replies
    2
    Views
    1,181

    Wrapping objects with many links

    Hello,

    I can't figure out a good way wrap a collection of objects with many links between them without losing the linkage information. Here is what I have:

    There is a class representing a node....
Results 1 to 23 of 23


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center