Search Results - VBForums

Search:

Type: Posts; User: dbasnett

Page 1 of 13 1 2 3 4

Search: Search took 0.13 seconds.

  1. VS 2008 Re: Calculating All IP Addresses in a Range (Pretty Good Start)

    FWIW - if you are working with IPv4 addresses you can treat the ip address as a number.


    ''' <summary>
    ''' converts a Net.IPAddress to an Integer
    ''' </summary>
    ''' <param...
  2. Replies
    15
    Views
    282

    VS 2013 Re: Random distribution in VB

    Having not heard of this I had to give it a try. I created this class:


    Public Class RandomSum
    ...
  3. VS 2012 Re: Letter Combinations - Comments / Suggestions

    Here is the math:



    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    For x As Integer = 10 To 3 Step -1
    ...
  4. VS 2012 Re: Letter Combinations - Comments / Suggestions

    I posted the wrong numbers. Both return the same count. From what I can tell testing 9 letters mine might be slightly faster.
  5. VS 2012 Re: Letter Combinations - Comments / Suggestions

    At one point I had added list = list.distinct which was great until there were 10 letters at which point I got an OOM error.
  6. VS 2012 Re: Letter Combinations - Comments / Suggestions

    It started off being recursive but with 10 letters I had issues. 9 letters produces 986,400 combos in approx. 200 ms., 10 letters is 9,864,090 in 2.7 secs.

    Hope this example answers your...
  7. VS 2012 Letter Combinations - Comments / Suggestions

    Given a set of letters produce all the combinations of those letters. These two functions satisfy this. I am asking for comments / suggestions / sanity check. Thanks in advance. This was done to...
  8. Replies
    6
    Views
    146

    Re: Integer to Byte

    The problem is the '1' which is being interpreted as integer. Unfortunately there is not a Type character for byte. One idea is to work with integers and only switch to bytes if absolutely needed. ...
  9. Replies
    14
    Views
    341

    VS 2013 Re: Loosly compare string

    All of this depends on the specifics which you did not state. Specifics for the file name guess:


    must start with lowercase uxm_
    followed by three numbers
    followed by _
    followed by three...
  10. Replies
    4
    Views
    149

    VS 2013 Re: What is Colon (:) e.KeyChar code?

    Agreed.
  11. VS 2013 Re: How to calculate time remaining for prime factor finder?

    See my signature for a fairly fast prime number calculator.
  12. Replies
    18
    Views
    474

    VS 2013 Re: Super Simple Countdown timer

    This is why I used a stopwatch. You might stop the timer from ticking but the current time keeps on going, nothing you can do about that.
  13. Replies
    7
    Views
    235

    VS 2013 Re: Dice Simulator question

    The way you have it the random numbers are likely the same. Here is a short version of what you have



    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
    ...
  14. Replies
    18
    Views
    474

    VS 2013 Re: Super Simple Countdown timer

    Take a look at this.


    Public Class Form1

    Dim numSecs As Integer = 10
    Dim stpw As New Stopwatch
    Dim countdownFrom As New TimeSpan(0, 0, numSecs)

    Private Sub...
  15. VS 2013 Re: Manipulating Strings from SerialPort

    Are you sending a newline after the 1-3 numbers? Are you sending ASCII chars representing the numbers?
  16. Replies
    4
    Views
    213

    Re: stopping program when using serial port

    A quick glance shows that you have a lot of things running on the UI thread and one of them, the SerialPort.ReadLine, is a blocking operation. One thing you might try is to move the...
  17. VS 2010 Re: SyncLock protecting thread counter

    Here is a simulation of what I think you want to do.


    Public Class Form1

    Private Sub GetServicesFromSingleComputer(compNM As Object)
    Debug.WriteLine("S " & compNM.ToString)
    ...
  18. Re: String.Format with one decimal value only...

    You meant
    LabelSpeedDisplay.Text = String.Format("{0:N2}", Registers(7) / 100)
  19. Thread: MSDN Logon

    by dbasnett
    Replies
    2
    Views
    147

    Re: MSDN Logon

    This happens both at home and work, and I have different anti-virus software at both. Will check it though.

    Doesn't explain why using the back button and then clicking again works.
  20. Thread: MSDN Logon

    by dbasnett
    Replies
    2
    Views
    147

    MSDN Logon

    For at least a month I have been having an issue with MSDN. I am repeatedly asked to logon even though I am already logged in.

    For example, I came across this link in a forum thread,...
  21. Replies
    9
    Views
    270

    Re: Help with factorial calculation :?

    This N! = (1^2)*(2^2)*(3^2)...*(N^2) is NOT the formula for factorial. This is:

    N! = 1 * 2 * 3 * ... N

    5! = 1 * 2 * 3 * 4 * 5 = 120
  22. Replies
    14
    Views
    228

    Re: variable for 'anyword'

    To 'Dim' a variable that can hold letters with a maximum length of approximately 2 billion letters do this:


    Dim anyword As String
  23. Replies
    14
    Views
    345

    VS 2008 Re: [RESOLVED] Read Text File in Reverse?

    If it is OK to read the entire file then the methods presented would work. Here is an alternative that reads the file in chunks from the end. Just thrown together so it isn't tested completely, but...
  24. VS 2013 Re: How to do 16 bit Unsigned Short byte flip ?

    I was writing assembler for the Navy in the 70's also, though it wasn't my first assembler. If the Q had been about doing it in assembler...
  25. VS 2013 Re: How to do 16 bit Unsigned Short byte flip ?

    Speed comparison because I found it hard to believe that XOR would be faster:


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    Debug.WriteLine("")...
  26. VS 2013 Re: How to do 16 bit Unsigned Short byte flip ?

    The flipping part will look like this


    Dim b() As Byte = New Byte() {2, 0, 13, 78, 10, 20, 40, 80}

    For idx As Integer = 0 To b.Length - 2 Step 2
    Dim h As Byte =...
  27. Replies
    8
    Views
    236

    Re: Prevent Focus on textbox in code

    Create an invisible label on the form. If there are zero controls that can receive focus select the invisible label.
  28. Re: VB.NET Serial Port Help - Issues with open and closing then reopening and closing

    The code I posted was supposed to be ran in a new project. The intent was to prove (or not prove) that the problem wasn't with opening an closing. All you should have to do is change the port name....
  29. Re: VB.NET Serial Port Help - Issues with open and closing then reopening and closing

    In the button click handler a thread is created to open and close the port several times.
  30. Re: VB.NET Serial Port Help - Issues with open and closing then reopening and closing

    Using the code I posted can you confirm that this happens. My suspicion is that the real code is processing an event on another thread when the close is attempted.
  31. Re: VB.NET Serial Port Help - Issues with open and closing then reopening and closing

    My guess would be that the serial port is handling one of its events when you attempt to close it. To ascertain if the port will fail on close if there is no activity I wrote the following test:

    ...
  32. Re: How to make VB.NET Garbage Collector Example?

    A minute right. :)
  33. Replies
    2
    Views
    172

    VS 2010 Re: Get last line in multitextbox

    Textbox controls have a property that is the lines already, so to loop through them:


    'loop all messages that aren't blank
    For Each ln As String In...
  34. Re: Help Needed with a basic threading Problem

    This counts words based on starting letter and shows the counts with a random color. Runs fine with the synclock, and the error is reproduced if the synclock is removed or the lock object scope is...
  35. Replies
    2
    Views
    241

    VS 2013 Re: Convert string to hex byte

    This should answer your question:

    http://msdn.microsoft.com/en-us/library/c7xhf79k%28v=vs.110%29.aspx
  36. Replies
    24
    Views
    523

    VS 2012 Re: Picturebox to SerialPort

    Who is the manufacturer and what is the part number?
  37. Replies
    24
    Views
    523

    VS 2012 Re: Picturebox to SerialPort

    A complete description of the LCD screens (and / or a link) would be of great help.
  38. Replies
    24
    Views
    523

    VS 2012 Re: Picturebox to SerialPort

    How are your monitors connected? Normally they are NOT connected via serialports.
  39. Re: serialport datareceived pls help me(arduino to vb.net)

    https://social.msdn.microsoft.com/Search/en-US?query=vb%20.net%20string.length&emptyWatermark=true&searchButtonTooltip=Search%20MSDN&ac=5
  40. Replies
    11
    Views
    434

    Re: Chart impact on timer

    Not sure how you are acquiring data, but you shouldn't have a problem doing that at 50Hz, though using a timer isn't likely to be the best approach.

    Showing the results, especially with a chart...
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.