Search Results - VBForums

Search:

Type: Posts; User: ThomasJohnsen

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Re: Reducing numbers to one digit (numerology related)

    My code isn't all that complicated except maybe for the charToDigit function. If you make a sort of template program (ie draw a form with the controls you need and name them according to your...
  2. Re: Reducing numbers to one digit (numerology related)

    So you want a 'magic' number for first, middle and last name? Or will there be 3 'semi-magic' number for first, middle and last names that will be combined into a 'super-magic' number? And when is...
  3. Re: Reducing numbers to one digit (numerology related)

    First: your own examples are a bit flawed :wave:.

    To calulate a sum of digits in a number, you can try something like:

    Private Function digitSum(ByVal val As Integer) As Integer
    If...
  4. Replies
    8
    Views
    1,562

    Re: Poker stats.

    It seems I have been moving on a slippery slope. Those very informative posts have convinced me, that no poker-player would ever play a game with more decks than one.

    Two points especially:
    1)...
  5. Replies
    8
    Views
    1,562

    Re: Poker stats.

    If you're sure that 5 of a Kind is below a Straight Flush, I'll add it there instead.
    I doubt, I'll implement multiple versions of pairs, tripples, houses, quads or quintets based on suit though. I...
  6. Replies
    8
    Views
    1,562

    Poker stats.

    Hola members.

    In traditional poker, the various hands and their order is as follows (as is probably well known):
    * High Card
    * One Pair
    * Two Pairs
    * Three of a Kind
    * Straight
    * Flush
    *...
  7. VS 2010 Re: Shortest distance on a circle formula required

    I reckon that if you measure the angles in radians, and scale the result of their subtraction by divisions with PI to be in the range [0;PI[ (positive modulo with real numbers), you will get the...
  8. Re: New Feature on CodeGuru (sister site): Tech IQ: Are You Better than a C# Rookie?

    11 here too :|.
  9. Replies
    6
    Views
    357

    VS 2008 Re: help wanted

    Just had to comment on your variable names {good, bad, wow, yo, stri}. Good fun :wave:

    #EDIT: So as I'm not completely ot - jmcilhinney has a nice example in his sig. It helped me alot, but may be...
  10. VS 2010 Re: calculate the value of one cell by values of 2 other cells

    As .paul. suggested in this thread, the DataTable has a Compute method that can do some expression parsing. I haven't tested how extensive it is, but it might be a very simple solution to your...
  11. Replies
    12
    Views
    1,032

    VS 2010 Re: Removing vowels from string

    , and are all considered vowels (danish language). Usually though is represented as AE, as OE and as AA.
  12. Replies
    7
    Views
    2,233

    [VB.NET] Re: Question on game maps

    There are ways to get the same/good performance regardless of the size of the map. For instance you can divide the map into equally sized blocks, only a few of which are shown at any one time (ofc...
  13. Replies
    10
    Views
    1,739

    Re: [RESOLVED] Dividing a circle

    As I see it, the only place that the error can arise is due to your approximation of Pi with 3.142.
    Pi represented as a double is actually 3,14159265358979.
  14. Replies
    10
    Views
    1,739

    Re: [RESOLVED] Dividing a circle

    If you don't want to bother with the trig-functions, the coordinates for the regular unit-hexagon with center (0, 0) are:
    { (1, 0), (0.5, sqrt(3/4)), (-0.5, sqrt(3/4)), (-1, 0), (-0.5, -sqrt(3/4)),...
  15. Replies
    7
    Views
    1,678

    [VB.NET] Re: XNA - Game Loop

    There are several excellent examples on exactly how to do that online, all of which are in C# though, I'm afraid.
    If converting one from C# to VB is terribly tricky for you, you could ask Shaggy...
  16. Replies
    7
    Views
    1,678

    [VB.NET] Re: XNA - Game Loop

    My guess is, that this is not XNA-related. You're most likely looking for a way to include XNA elements into VB.Net (ie. XNA in a windows control), right?
  17. Replies
    3
    Views
    1,376

    [VB.NET] Re: Help with hex map logic

    Well the easiest (though potentially rather memory-heavy) solution in this case imo is:
    1) Copy all information from the DB to some kind of memory data-structure and use the DB only when...
  18. Replies
    1
    Views
    292

    Re: Need help creating A project

    As has been mentioned before (many times), we do not help solve assignments here. The first step is to attempt a solution yourself, and when/if you run into problems, post the parts of the code that...
  19. Replies
    3
    Views
    1,376

    [VB.NET] Re: Help with hex map logic

    Well imo it depends upon the map. If the map is non-cylindrical in nature, the simplest would probably be to just use a panel with autoscroll. A cylindrical map (going out of the map in a specific...
  20. Replies
    6
    Views
    446

    Re: ReGex Woes...

    When working with multiline strings, i prefer using the RegexOptions.Multiline option. It will change the meaning of ^ and $ from beginning respectively end of string to beginning respectively end of...
  21. Replies
    4
    Views
    513

    Re: Inverting Bits

    ...or if you find subtraction to be more intuitive than using not (though you did specify bitwise operators), you can try something like:

    Dim result As Byte = Convert.ToByte((yourbyte And &HF0) +...
  22. Replies
    7
    Views
    1,790

    Re: Blockbusters (Game Show)

    Creating the hexagons isn't a big deal. But I didn't quite get the rules from that clip (didn't watch the whole thing tbh) - do you have to check for lines through the map, or?
  23. Replies
    5
    Views
    493

    Re: Formatting A Number

    But with my formatting (as per the request in the OP) it returns 02:30:000 as it was supposed to.



    1) You should use Option Explicit - declaring a variable without type is not the most readable...
  24. Replies
    5
    Views
    493

    Re: Formatting A Number

    You could try something like:
    MessageBox.Show(New TimeSpan(Convert.ToInt64(m * TimeSpan.TicksPerMinute)).ToString("mm\:ss\:fff"))
    where m is a floating-point value in the format specified in the...
  25. VS 2010 Re: Adding files to a list with a filter

    First off - this is a commented/edited version of your code - should be mainly self-explanatory:
    'This is a modified version of your code - I have put in remarks, where changes have been made:
    ...
  26. VS 2010 Re: Adding files to a list with a filter

    You're right as usual. But now you know how it's implemented :)
    And besides the OP seemed to want to encapsulate the results into some classes while searching, which means that he has to do the...
  27. Replies
    3
    Views
    386

    Re: Is This Possible?

    Why not just use a "Requires Login" screen-saver?

    Btw what is up with starting every word in capital letters?

    #EDIT: Just realized what you meant with the 2nd part :)
  28. VS 2010 Re: Adding files to a list with a filter

    I can see several problems with your code:
    1) You have declared a function, but as it never returns anything, you might as well use a sub.
    2) Using Application.DoEvents is really not the way to do...
  29. Replies
    6
    Views
    541

    Re: Replace Alphabet

    Or you could try something like:
    'Will replace any occurence of a character in replace_chars with index i that is present in source
    'with the corresponding character in replace_with at...
  30. Replies
    7
    Views
    454

    VS 2008 Re: Writing a cypter please help

    I honestly haven't got a clue about what you're trying to do!
    I cannot see why you would want to use memorystreams, base64 encoding, splitting into 100 char chunks that apparently are put in "s. It...
  31. Replies
    7
    Views
    454

    VS 2008 Re: Writing a cypter please help

    Well if you could explain which encryption you're trying to apply to the file.
    As it stands, without knowing Split0923, KP, ECT.RijEC, GE, IK93 etc., it's a little bit hard to even decipher your...
  32. Re: [RESOLVED] Is VB.NET the right language for me?

    There is! Only product supporting it, I have come across till date though, is the aforementioned Phone Version.
    Btw how did you create a Content project - do you have a version of VB that supports...
  33. Re: [RESOLVED] Is VB.NET the right language for me?

    Is this also true for 2012? Are there other versions than the 2010 Phone that supports XNA for VB?

    #EDIT: I'm asking because if 2012 dosen't support XNA for VB, then VB-XNA is pretty much a lost...
  34. Re: Short list of examples (exclusively 2D) as an introduction to XNA

    Nope - I meant to post it right here :).
    It's mainly intended for one specific member.
    The audience for VB specific XNA introduction examples strictly concerning 2D is too limited for a codebank...
  35. Re: Is VB.NET the right language for me?

    I honestly don't think that it will matter much. Switching from VB.Net to C# or back isn't a big deal. IMO the various programming languages are more similar today than programming languages have...
  36. Re: Short list of examples (exclusively 2D) as an introduction to XNA

    Example 7: A complete game using just 100 lines of code and relying on nothing but what you've learned.

    I thought that I would end this series of examples with a little funny game with rich...
  37. Re: Short list of examples (exclusively 2D) as an introduction to XNA

    Example 6: Using HLSL (High Level Shader Language) to generate interesting picture effects.

    Public Class Game1
    Inherits Microsoft.Xna.Framework.Game

    Private WithEvents graphics As...
  38. Re: Short list of examples (exclusively 2D) as an introduction to XNA

    Example 5: Using Perlin simplex-noise to generate an infinite tiled map.

    Public Class Game1
    Inherits Microsoft.Xna.Framework.Game

    Private WithEvents graphics As GraphicsDeviceManager
    ...
  39. Re: Short list of examples (exclusively 2D) as an introduction to XNA

    Example 4: Simple buttons and sprite-fonts.

    Public Class Game1
    Inherits Microsoft.Xna.Framework.Game

    Private WithEvents graphics As GraphicsDeviceManager
    Private WithEvents...
  40. Re: Short list of examples (exclusively 2D) as an introduction to XNA

    Example 3c: RenderTargets and Blending.

    NOTE: This example also uses the GradientBall class from example 3 and 3b. Also the picture Penguins.jpg has been added to Content.
    Public Class Game1
    ...
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.