Search Results - VBForums

Search:

Type: Posts; User: Evil_Giraffe

Page 1 of 13 1 2 3 4

Search: Search took 0.05 seconds.

  1. Re: Feedback requested about my unit testing strategy

    Testing the internals of a unit makes it not-a-unit-test. The test is against the externally visible behaviour of that unit. So, if your unit is a class, you wouldn't need access to the private...
  2. Replies
    12
    Views
    401

    Re: Help With Object Oriented VB

    For all the object oriented solutions presented, I am seeing a curious lack of the Class keyword. None of these solutions are an object oriented approach. Just sayin'. It doesn't matter, they're...
  3. Replies
    7
    Views
    258

    Re: Usng 4.5 task factory async await

    No, with Tasks you call ContinueWith and pass it a method to invoke when the result is available. No events involved.
  4. Replies
    7
    Views
    258

    Re: Usng 4.5 task factory async await

    If you're using Tasks, you don't need to async/await.
  5. Replies
    5
    Views
    182

    VS 2010 Re: Creating asynchronous sockets

    Um, yes. the async model is going to have callbacks. That's the point. It's conceptually harder to get your head around but once you have mastered it, you can free yourself of most of your threading...
  6. VS 2010 Re: Object Reference not Set - even if it is?

    Oh ho. Threading + error exhibiting only some of the time == Race Condition. I'd, as ever, heartily suggest you use the asynchronous socket API and stay entirely on a single thread. This would...
  7. Replies
    5
    Views
    283

    VS 2010 Re: [RESOLVED] Class hierarchy question

    If DoSomeStuff has no implementation in A and the implementation must be supplied by an inheriting class, you can mark the method as MustOverride rather than have an empty implementation:...
  8. Re: Generic class with multiple type constraints

    I think you're confusing generic constraints with generic type parameters. When you declare a variable as List(Of Integer), the "Integer" bit isn't a constraint.
  9. VS 2013 Re: Unit Testing Private Sub and Private Functions

    There are also significant schools of thought that would suggest the use of Default Instances, Application.DoEvents, Thread.Sleep, ... Doesn't mean those constructs aren't things that appear to work...
  10. VS 2013 Re: Unit Testing Private Sub and Private Functions

    Okay, I can see several different responsibilities in there which may be why you're finding it hard to test. What's the test that you're trying to write now? Pretend that the sub/function is public,...
  11. VS 2013 Re: Unit Testing Private Sub and Private Functions

    Unit Testing private subs/functions is the incorrect thing to do. You should only unit test externally visible behaviour. Sometimes you might not know how to write a test for the effect that your...
  12. Replies
    9
    Views
    309

    Re: 3d Rectangle

    Why are you defining a 3D rectangle? A 2D rectangle is useful because then you're talking about a block of pixels on screen, so special handling for that is somewhat obvious. It isn't so obvious in a...
  13. Replies
    8
    Views
    254

    Re: raise event question

    Sometimes, yes. Not in this case, however. What on earth is the problem with extracting a method from the handling method and calling it? Whether you expect the code to change again is somewhat...
  14. VS 2013 Re: When is the best way to load initial data (MVVM, IoC, Unit testing)?

    What is in control of constructing the VMs? If you have a controller to deliver them, then it makes sense to do it there. However, if you have one piece of generic code that loads any VM required...
  15. VS 2010 Re: Need a code to delay the execution of the code

    Just adding a delay won't work. You'll still raise a TextChanged event as each character is "typed" into the TextBox. If you delay long enough that the barcode scanner finishes typing you'll still...
  16. VS 2013 Re: Tic-Tac-Toe: What data structure would you use?

    A 3 by 3 array may seem the most natural way of representing this, but the best model is not the most realistic, but the one that most effectively answer the questions of the domain. You may find...
  17. Replies
    6
    Views
    303

    VS 2013 Re: "Online" Game help

    That is a massively insecure way of arranging things. Exposing the database directly to the network is a no-no. Having clients directly access the database is a no-no. Embedding credentials in the...
  18. Replies
    8
    Views
    225

    VS 2012 Re: Event handling problem

    You've got two fields typed as Example in your Form, T which you assign a new instance of Example to in its initialiser, and Log. You call the Test() method on T, but the Log_UpdateStatus event...
  19. VS 2013 Re: Stuck on the most basic of problems - Reference to a non-shared member...

    Well, yes there is. And you've actually nailed why that is earlier:



    The nested class does have access to the outer class's fields and properties (local variables are not the same).



    ...
  20. VS 2010 Re: Deleting Items In A List In A For...Next Block

    The problem is that you think you've created a temporary list, but you haven't. You've created a second way of referring to the same list. TempList is the same list as bmpList, so iterating over...
  21. Replies
    8
    Views
    271

    VS 2005 Re: Textbox - Currency without "$"

    Or, having played with this a bit more... supposing you want to keep the rest of the current culture's settings... (e.g. european countries' use of "," as the decimal point, etc, which the above code...
  22. Replies
    8
    Views
    271

    VS 2005 Re: Textbox - Currency without "$"

    Sounds like you need a custom format string so that you can specify different behaviour for positive and negative numbers ( http://msdn.microsoft.com/en-us/library/0c899ak8.aspx#SectionSeparator )....
  23. Re: I can't discover how to 'Cast' a Form.

    I think you've gone down a wrong path here. Can you show us the methods that call the PlaceMe method? It definitely feels like you're solving the wrong problem here.
  24. Replies
    17
    Views
    437

    Re: Public Class Issue ?

    What's happening there is that you're now defining a Class inside a Sub, which is not allowed. Perhaps you mean this:

    Module Module1
    Sub Main()
    Console.Writeline("Hello")
    ...
  25. Replies
    17
    Views
    437

    Re: Public Class Issue ?

    The concept in your OP does not, as you've discovered, work. I'm not sure what it is about the code that you're trying to achieve. In what way does the class "not work"?
  26. Replies
    17
    Views
    437

    Re: Public Class Issue ?

    Module1 no longer has a Sub called Main() as an entry point to the program is the problem. What are you trying to do?
  27. Re: Having some trouble with I think it's supposed to be linked lists, but I'm not su

    I'm not sure you've grokked path-finding algorithms if you think they're about graphics. They find paths through graphs, which is what your objects will be. Each room is a node in the graph, and...
  28. Replies
    11
    Views
    554

    Re: [RESOLVED] App.Config and dlls

    Whoops, well that's what I get for not reading properly.

    What I believe should be possible is for the plug-in assembly to define a Configuration Settings class, and have the main application's...
  29. Replies
    11
    Views
    554

    Re: [RESOLVED] App.Config and dlls

    The endpoint is the code that runs to work out what JSON to return. (Or, perhaps more specifically, the mapping between the URL and the function that will be invoked)
  30. Re: Where is my salted/hashed password in my DB?

    Or should it be Password+Salt? Is there a difference? Depending on the hash function, there may be.

    These things have been considered by authentication library authors, and in some cases been...
  31. Replies
    56
    Views
    1,840

    Re: Justifying text

    Have you checked the RTB's options as tg suggested?
  32. Re: Where is my salted/hashed password in my DB?

    "Roll your own" refers to both a home-brew algorithm and a home-brew implementation. It's the latter problem here.

    [Edit: And what's missing is, among other things, correct choice of hash...
  33. Replies
    11
    Views
    554

    Re: [RESOLVED] App.Config and dlls

    The plug-in shouldn't be pulling configuration, the host should push it in, surely?
    Also, having a plug-in set up endpoints seems dangerous, shouldn't the host provide the ability for the plug-in to...
  34. Replies
    56
    Views
    1,840

    Re: Justifying text

    I'd say that a Label isn't designed for the sort of text that you'd justify, but rather short descriptions to place next to input controls, and so on. If you have a large block of text to render then...
  35. Re: Where is my salted/hashed password in my DB?

    Wow, yeah, I really made a hash out of typing that sentence, eh?



    No. If you really have to stick with rolling your own security, then stop. Just stop.

    NEVER roll your own security, because...
  36. Re: Where is my salted/hashed password in my DB?

    In this particular case, there are those who know about security and those who are trying to apply "common sense" to the situation. Common sense says that storing the salt next to the hashed password...
  37. Re: Where is my salted/hashed password in my DB?

    The salt is not a key of the system, revealing it does not reduce the security guarantees. It is there to stop an attacker being able to see where two users have the same password. This has two...
  38. Re: Where is my salted/hashed password in my DB?

    Yes, that is correct. To validate the user you need to retrieve the hashed password and salt, then user the salt to hash the supplied plaintext password and check that matches the hash retrieved from...
  39. Replies
    4
    Views
    324

    Re: Adjusting Time

    What makes you think it isn't efficient enough for your purpose?

    Also, from your description of the problem with negative seconds, you're keeping the offset in a TimeSpan which you can simply add...
  40. Replies
    4
    Views
    397

    Re: Lapse Time

    Okay, the problem is multiple independent clocks in your system. There is another alternative to having a single clock: Vector Clocks (in trying to find these again (I'd read about them a couple of...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.