Search:

Type: Posts; User: peterst

Page 1 of 13 1 2 3 4

Search: Search took 0.02 seconds.

  1. Re: how to check from server.exe if client is alive

    I am 100% for using heartbeats from clients.

    When clients send their heartbeat signal (or "I'm alive") is much simpler to manage on server side. Keep track of last time when heartbeat is received...
  2. Replies
    7
    Views
    902

    Re: Password Encryption

    Number of iterations is related how long it will take to calculate the final value. More iterations = more time = longer and harder to bruteforce.
  3. Thread: Dead Monitor

    by peterst
    Replies
    25
    Views
    729

    Re: Dead Monitor

    Get something new with no flickering, good color reproduction and if it is for development and work - try to find something 16:10 if available.
  4. Replies
    6
    Views
    434

    Re: Pagination Logic

    Some examples from from forums.

    First page is current one:


    1 2 3 4 5 ... > >|


    Last page is current one:
  5. Replies
    8
    Views
    479

    VS 2015 Re: how to read csv

    C# version:


    var items = csv.Split("\r\n")
    .Skip(4)
    .Take(5)
    .Select(s => s.Split(';'));

    VB.NET version:
  6. Replies
    6
    Views
    434

    Re: Pagination Logic

    You can do it more generic by defining the number of page buttons shown as your requirement may change in future. Take for example forum software where on top the paging is more simpler showing...
  7. Re: Upgrading to VS 2022 Version 17.3.0 is a horrendous disaster!

    For long time I am on preview versions of VS (currently on VS 2022 17.4.0 Preview 1) and haven't noticed similar problems. Well, there are other issues but they appear randomly and restart of VS...
  8. Replies
    4
    Views
    361

    Re: Pexels Api Get image

    Your async function Get_image_url returns just Task() which equals to Sub Get_image_url in non-async world. But Get_image_url sounds like you want to return URL string and you have to define it as:
    ...
  9. Re: Why is OneDrive Deleting My Project Files Causing Error System.InvalidOperationEx

    Someone else reported similar problem here (in this forum) in the past about using OneDrive or something similar to "backup" sources and there were some losses. I don't remember the details, but in...
  10. Re: ActiveX dll's that reference each other

    Circular dependencies! Welcome to Hell :-)

    It is wonderful experience when you clone source of A and B and there are missing those initial simple binary dependencies) and current version of...
  11. Replies
    13
    Views
    753

    Re: can someone convert this small code c+ vb6

    True, true!
    "That's actually C+"
    https://www.vbforums.com/images/ieimages/2022/07/8.jpg
  12. Replies
    13
    Views
    753

    Re: can someone convert this small code c+ vb6

    No! You do not understand! This is VB2048 code that supports C auto-converted to C# and then transpiled to VB6 and produces the best optimized binary that runs in a micro container called computer...
  13. Replies
    16
    Views
    832

    Re: Some verbose C# code

    And some real-world example:


    List<string> a = new();

    var b = a as IEnumerable<string>;
    if (b is not null) {
    // executed as check is true
    Console.WriteLine("b is not null");
    }
  14. Replies
    16
    Views
    832

    Re: Some verbose C# code

    class MyBaseType
    {
    }

    class SomeType : MyBaseType
    {
    }

    ...
  15. Thread: MD5 Hash

    by peterst
    Replies
    9
    Views
    557

    Re: MD5 Hash

    Standard home/small office network is 1Gbit/s or about 100MB/s.
    5400RPM HDD sequential reads are about 130-140MB/s
    7200RPM HDD sequential reads are about 220-230MB/s

    So 500MB over network...
  16. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    NuGet? NO WAY! It will infect my repos with little 'netters :-)

    BTW I am using TOML and YAML libs where needed, but it will be hard to explain to most VB6 people what are these formats and better...
  17. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    You can start with running following command in command prompt/power shell:


    git clone https://github.com/dotnet/winforms.git


    Or just clone every interesting and valuable repo from here:...
  18. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    It is good that some developers didn't know what Microsoft told 15+ years ago and there are many shell extensions written in .NET :D

    Also there are full shell replacements for the Windows desktop,...
  19. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    Not saying that. I am saying that language features, libraries, frameworks, tools that exist in one development platform (including the language itself) may not exist in another. (And people do:...
  20. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    It was ArrayList, then List(Of T), then Dictionary(Of TKey, TValue), now Stream, and then... There will be always something missing in any language. Especially missing libraries or frameworks.
    ...
  21. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    Niya, you are thinking (again) of all SDO's "transpiler" stuff and how you can imitate "inheritance" in the example you coment. But in reality no one will do that for .NET (or other language) library...
  22. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    https://dotnet.microsoft.com/en-us/languages



    Strange when talking about .NET to assume .NET = C# or .NET = VB.NET...
  23. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    Vzzzzz, title and most of the post is referring about .NET, not VB.NET only.

    So I gave example. I can give example in hard/impossible to convert code in VB.NET, but we are talking about .NET...
  24. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    Really? Try re-read first post again?
  25. Thread: .NET to VB6

    by peterst
    Replies
    60
    Views
    2,172

    Re: .NET to VB6

    How hard will be to convert this .NET code to VB6?

    let waitOneNoTimeoutOrCancellation =
    MakeAsync(fun ctxt ->
    match savedCont with
    | None ->
    let descheduled =
    // An arrival may...
  26. Replies
    16
    Views
    707

    VS 2022 Re: Need help with GUI for Service application

    I've read again the thread about monitoring app and that you are the IT manager, so no problem with firewalls :-)

    I have different view on the design how monitoring system (servers, clients,...
  27. Replies
    16
    Views
    707

    VS 2022 Re: Need help with GUI for Service application

    There is very small limitation that is called firewall. Opening firewall ports in corporate environment is hard for non-technical reasons.
  28. Re: Why are some dictionary variables prefixed with "cs"?

    cs stands for case sensitive. How do I know that? Maybe I have some secret comments from... Microsoft :D
  29. Re: Trying to get a date from a large number

    From StackOverflow answer you can use following routine:



    public static DateTime UnixTimeStampToDateTime( double unixTimeStamp )
    {
    // Unix timestamp is seconds past epoch
    DateTime...
  30. Re: Trying to get a date from a large number

    Obvious question is what are you using as VS and target versions? DateTimeOffset.FromUnixTimeMilliseconds exists in .NET Framework 4.6+ according documentation.
  31. Re: Trying to get a date from a large number

    var dt = DateTimeOffset.FromUnixTimeMilliseconds(1657084595073);


    Result is DateTimeOffset (copied from watch: 7/6/2022 5:16:35 AM +00:00)

    Use DateTimeOffset.DateTime to get DateTime object.
  32. Replies
    13
    Views
    727

    Re: sendbroadcast packets to all interface?

    NSSM FTW!
  33. Replies
    27
    Views
    1,190

    Re: Thunk for a CopyMemory replacement?

    REP MOVSB/W/D/Q is avoided in many system libraries since Pentium 1 or 2. Few reasons are - prefetch queue in CPUs, memory cache (different levels), multi-CPU/core/threads systems.

    Simple...
  34. Replies
    6
    Views
    723

    Re: [RESOLVED] Optical Character Recognition

    Now more real optimization that may avoid some future problems:

    Loading image from file (Bitmat.FromFile()) actually locks the file and may become an issue if you run multiple threads or processes...
  35. Replies
    6
    Views
    723

    Re: [RESOLVED] Optical Character Recognition

    You can "optimize" this part of your code:

    Dim angleText = "{0} degrees"
    If (angle = 0) Then
    angleText = String.Format(angleText, "0")
    ElseIf (angle = 1) Then
    angleText =...
  36. Replies
    6
    Views
    723

    Re: [RESOLVED] Optical Character Recognition

    The library you used (https://github.com/charlesw/tesseract/) supports from .NET Framework 4.0 to .NET 6 - info got from NuGet package page:...
  37. Re: Good Programming Practice: About "ByVal MyObject"

    Optimization should be done by library authors. Same with that Len(B) discussion - all this is important for library authors. Developers will use the library as abstraction layer that hides the...
  38. Replies
    47
    Views
    1,444

    Re: VBForums most active sections stats.

    :D

    public int Add(int a, int b) => a + b;

    public int Subtract(int a, int b) => a - b;

    public int Mul(int a, int b) => a * b;

    public int Div(int a, int b) => a / b;
  39. Re: Good Programming Practice: About "ByVal MyObject"

    Probably someone already made real world benchmarks on ByVal vs ByRef but I just finished testing of old tool that processes millions of records with mostly string data - all hold in memory for...
  40. Re: Good Programming Practice: About "ByVal MyObject"

    When working with other 10+ devs - some experienced but most not so much, rules are rules. Performance penalty cannot compare to wasted weeks and months debugging strange issues and referenced...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width