Search Results - VBForums

Search:

Type: Posts; User: Evil_Giraffe

Page 1 of 13 1 2 3 4

Search: Search took 0.06 seconds.

  1. Re: Question about List(Of T) when T inherits some other class...

    Why do you need to change it? Why can't you declare/instantiate it as a List(Of classA) to start with?

    [Edit: Do you understand why what you're trying to do isn't allowed?]
  2. VS 2015 Re: Dispose of a class from within the class.

    I'd suggest perhaps not making it entirely self-contained. If you have many instances of the class then they will all have their own timer. It would be better to have a single object containing a...
  3. Replies
    17
    Views
    766

    VS 2015 Re: Extremely Large Numbers in VB

    Hmmm, utterly off-topic, but....



    Legally, yes. The copyright covers the "work" - you haven't created a different "work", you've copied it in a different format.



    No, not if you created...
  4. Replies
    17
    Views
    766

    VS 2015 Re: Extremely Large Numbers in VB

    If you have a process that, given a reference, returns an image (and crucially, returns the same image each time you give it the same reference), in what fundamental way has that image not been...
  5. Re: Exit do until loop after a certain time

    And when we realise we're talking about propagation of thread-local updates, you can see that it is much more likely to happen with a simple type like a bool than a complex object, because those are...
  6. Re: Exit do until loop after a certain time

    Um, not exactly. The language makes no guarantees that the code posted earlier will EVER show the updated value to the reading thread, because there are no memory barriers. Both threads are entirely...
  7. Re: Exit do until loop after a certain time

    You'll also need to know that altering a variable from one thread doesn't necessarily mean that another thread reads the updated value of that variable. Which puts a rather nasty...
  8. Replies
    1
    Views
    281

    Re: Inventory Item Class

    That's not a bad attempt, good work. One thing to note: the assignment asked for the "Inventory" class to not be a Form, but just a Class.

    Now on to your problem: I'm thinking from reading through...
  9. Replies
    8
    Views
    361

    VS 2015 Re: Renaming variables

    Depending on which version you're using, you may have access to the Rename Variable command in the Refactor menu. I don't quite know where you'd look for it, as I use R# in place of the VS supplied...
  10. Replies
    22
    Views
    898

    VS 2010 Re: SQL Parimeterize a table name...?

    I'm still not seeing why you'd need to if you've designed your database properly. This suggests you are creating new columns in the table as the system is run, which is the wrong approach. I'd love...
  11. Replies
    22
    Views
    898

    VS 2010 Re: SQL Parimeterize a table name...?

    I'm sorry, but I don't see how why you'd need to do that, unless you're using a database badly... I think you should have a think about what you're actually querying and how you're storing it.

    And...
  12. Replies
    22
    Views
    898

    VS 2010 Re: SQL Parimeterize a table name...?

    You can't parameterise the column or the table. That's not how parameterisation of SQL works. What are you trying to do that you think parameterising these things is the right approach?
  13. Replies
    2
    Views
    246

    Re: [VB.NET] Rigid Polygon Generation

    The term you're looking for would be Procedural Generation. If you're looking for something like a giant land mass, I'd suggest searching for something like 'procedural generation continent'

    The...
  14. VS 2013 Re: How to add a SUB to the base FORM class?

    Another option is to spin the dependency around. Have the TranslationManager expose an Event that it raises when the language should be changed.Create your TranslationManager instance, and pass it to...
  15. Replies
    9
    Views
    458

    Re: Permutations With Repetition

    Apologies if I came across as harsh. I did a back-of-the-napkin estimate for the amount of memory required just to store 36^10 10-character strings and it came out as tens of thousands of petabytes. ...
  16. Replies
    9
    Views
    458

    Re: Permutations With Repetition

    I find it much more likely that you're writing someone's password cracker for them, but fortunately this is a very naive approach that wouldn't make an effective cracker.

    As to your...
  17. Replies
    24
    Views
    1,179

    Re: Shuffling a string Array

    The test code should have been placed in a Console Application project. And yes, that sorting algorithm will produce a non-biased result. There are basically three common ways to correctly shuffle:...
  18. Replies
    24
    Views
    1,179

    Re: Shuffling a string Array

    Ummmm, not sure what you mean here. A PRNG of the sort provided by the Random class is perfectly sufficient for shuffling a reasonably sized data set. All the shuffling algorithms presented here rely...
  19. Replies
    24
    Views
    1,179

    Re: Shuffling a string Array

    Nice try, but nope:


    1, 2, 3: 18634
    1, 3, 2: 17262
    2, 1, 3: 17202
    2, 3, 1: 14768
    3, 1, 2: 14839
    3, 2, 1: 17296
    other : 0
  20. Replies
    24
    Views
    1,179

    Re: Shuffling a string Array

    Do you know which sorting algorithm Array.Sort uses under the hood? Is it one that would come out with a significant bias if you just randomly pick with a flat distribution for each comparison of...
  21. VS 2010 Re: Help With Code for Roman Numeral Calculator

    Whoops. After berating others for not reading the OP properly I misread this sentence. You aren't introducing a second form, it's a second textbox on the same form :$

    So, what you are after is to...
  22. VS 2010 Re: Help With Code for Roman Numeral Calculator

    So is the part that you are stuck on converting a number to this "Roman Numerals" format? Or is it how the second form interacts with the first form?
  23. VS 2010 Re: Help With Code for Roman Numeral Calculator

    Not for this assignment, they aren't using "proper" Roman Numerals. It might help to actually read the description from the OP:



    IV is invalid because the letter values are in ascending order.
  24. VS 2010 Re: x is not declared or inaccessible

    Presumably that snippet you posted was just typed off the top of your head, given the lack of casing that the VB IDE would do. How about, if you can't show us the code that exhibits the problem, you...
  25. Replies
    4
    Views
    296

    VS 2010 Re: Access Shared Buffers

    There are several ways. Yes, you could use locking primitives.
    You could go lock-free and keep allocating more buffers and treat-them as write-once and leave the reading code to release the memory....
  26. VS 2015 Re: ***! Weird form error on creation

    That StackTrace tells you exactly which method the exception is being thrown from. It's a little obscured because the method won't actually be called 'ctor', but that refers to the constructor of...
  27. Replies
    1
    Views
    262

    Re: Range polygon from convex hull.

    Why not, from the points of your hull, for each of those calculate a set of n points in a circle around each point (you may need to experiment to find the best value of n for your needs).

    Now you...
  28. Re: Problem with datetime format and regional settings

    If you have to convert to/from strings (And I would agree with SS that you really should try and avoid this if possible), there is a Round Trip Format that you can use specifically for this scenario:...
  29. Re: how can i break program execution when a variable changes value?

    This is essentially suggesting to have all code that actually writes to the field be funnelled through a single place, for which there are other techniques than properties. If you have a publicly...
  30. Replies
    6
    Views
    451

    Re: Two Digits

    I think your teacher may be looking for you to demonstrate some sort of algorithm to calculating it, rather than just enumerating all the possible values. For example, if the first digit is 1, and...
  31. Re: Comparing datetime to Now in a timer [Should be simple right?]

    Well, perhaps, but the way I look at it, the correct way to write a reminders app wouldn't involve comparing datetimes to Now. You'd maintain a list of datetimes, calculate how long it is until the...
  32. Re: VB 2010 random number help! (Reference to a non shared member requires an objec..

    I'll give you a hint: these lines do not do what you think they do

    RES1.Equals(Convert.ToInt32(RND1) + Convert.ToInt32(RND2))
    RES2.Equals(RND3 + RND4)
    RES3.Equals(RND5 + RND6)

    (The...
  33. Replies
    9
    Views
    721

    Re: Problem Drawing concentric circles

    Well you'll have to show your code to let us know which method you are using to draw the circle, however assuming it is this method:...
  34. Re: How can I refactor this code?

    The exception is because you are trying to assign an IEnumerable(Of Double) to a variable that holds a List(Of Double). You could convert the sequence to a list by calling ToList on it, but why...
  35. Replies
    11
    Views
    524

    Re: Collection Modified

    Think of it like this:

    You have a dictionary containing the following key/value pairs:

    { K1: A1, K2: A2, K3: A3 }

    Now you say you want to iterate over all the entries in the dictionary (and...
  36. Re: How can I refactor this code?

    A few points.

    1) You don't need to define an explicitly named delegate for this, you can represent it as a function that takes a Sample and returns a Double, there is the Function(Of T1, TResult)...
  37. Re: How can I refactor this code?

    You can pass in an object that represents a function taking a Sample and return a Double. I know you know how to do this because you've already done it in your code, although it's possible you didn't...
  38. Replies
    6
    Views
    668

    Re: PanGram Program

    Since this is for a class, your aim here is to make it as easy as possible for the teacher to see that you've done what the assignment has asked for. I am assuming that the description you posted is...
  39. VS 2015 Re: [RESOLVED] Day of the week * wiht * IF on vb.net

    The other thing to consider is that if you are calling DateTime.Now multiple times in an expression and expecting it to return a DateTime that represents the same day for each one, then you'd be...
  40. Replies
    4
    Views
    349

    Re: get key in hashtable

    What are you trying to achieve?

    No it's not possible to do what you describe. Either you need to be able to calculate the key from the value or you need a separate lookup that stores them the...
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.