Search results

  1. Skydiver

    Resolved My NuGet manager never loads any list... VS 2012

    I recently created a solution + project in 2022 and opened it on my other machine with just 2019 and it worked. Of course, it was just a simple console app with a few NuGet references, but it did open restore the packages without issues.
  2. Skydiver

    Resolved Several errors came up while programming, I don't understand..

    As a quick aside, the C# style/idiom is not too use "\r\n". Prefer to just call Console.WriteLine() or append Environment.NewLine.
  3. Skydiver

    Get first max value from collection of dictionaries with the help of linq

    Oh I see you are worried about the cost of sorting which would be O( n log n ) vs O( n ) to scan for the lowest value + O( n ) to find the first matching lowest value. Your correct that doing the two passes would be cheaper. As for results showing as "Key" and "Value": create a new dictionary...
  4. Skydiver

    Get first max value from collection of dictionaries with the help of linq

    Why would you not want to use order by? Your current code in post #1 does essentially the same thing but the much harder way. Your code from post #1 would first collect all the values, and find the lowest value. Then it would do a second pass through looking for the entries where there is a...
  5. Skydiver

    Get first max value from collection of dictionaries with the help of linq

    See line 6 in post #2. It will return the first one.
  6. Skydiver

    Tip C#’s Equivalent to VB’s Left, Right and Mid String

    And to further blow your mind... Try doing the same thing using C# ranges: http://humbletoolsmith.com/2019/12/21/csharp-strings-with-ranges,-and-indexes/ var text = "This is a line of text"; Console.WriteLine("Left: {0}", text[..7]); Console.WriteLine("Mid: {0}", text[10..(10+7)])...
  7. Skydiver

    Resolved Can I call a DLL dynamically or must I add reference?

    Your link there above with calling a .NET assembly and using reflection to use the classes defined within. If you are willing to go through all that because you want the flexibility (because you are trying to provide some kind of add-in functionality to your code), then go for it. The benefits...
  8. Skydiver

    Get first max value from collection of dictionaries with the help of linq

    This code doesn't look like it would even compile: var finalResults = baseService.Where( .Select(x => x.DirectionCost.FirstOrDefault(el => el.Value == x.DirectionCost.Values.Min())); Anyway, the way to do things would be to iterate over the original enumerable, and...
  9. Skydiver

    compare image paths

    Assuming that the ImageFileName contains the full path to the image. The results of GetFiles() will also have the full paths. So just check if there is a database entry that matches the name. If the ImageFileName does not contain the full path, then you'll have to massage the results that you...
  10. Skydiver

    Facade design pattern

    What specifically are having an issue with? Let's tackle that first. The trick with programming is solving one small problem at a time. Trying to do it all in one big bang just makes things too complex. (And yes, I do find it ironic that the facade pattern is supposed to hide complexity. ;) )
  11. Skydiver

    Resizing Visual Studio 2019 main window

    Given VS' history of UI issues when they transitioned from Win32 API to WPF, I would not be surprised that they may have some hit-testing bugs for changing the mouse cursor to the resize cursor at the appropriate time.
  12. Skydiver

    Resizing Visual Studio 2019 main window

    If the app had a client rect smaller than the window rect, then yes, it's Windows that decides the resize cursor if the app doesn't handle the non-client mouse messages. In the case of VS2019 were it's client rect completely fills the window rect, the app chooses when to show the resize cursor...
  13. Skydiver

    Resizing Visual Studio 2019 main window

    Are you using the standard Windows mouse driver, or are you using a custom mouse driver that came with your mouse (e.g. Logitech, Razor, Synaptics, etc.)? For example, my Lenovo A485 came with some custom mouse driver that made my Logitech trackball skip like crazy even at the lowest mouse...
  14. Skydiver

    postgreSQL

    If you installed an ODBC driver for Postgre, then you should have selected "Microsoft ODBC Data Source" (not the OLEDB one that you described in post #4".
  15. Skydiver

    Resolved Where to put INI file?

    If your plan to have users do an XCOPY deployment or a extract Zip file deployment, it would make the most sense to put the .INI file right beside your executable. It would be the location of least surprise -- unless you are *nix head. In that case, it seems that the *nix convention is to either...
  16. Skydiver

    Resizing Visual Studio 2019 main window

    It was kind of interesting running Spy++ on VS2019. The window rect and client rect were exactly the same. I'm so used to seeing classic Windows apps where the client rect is inset on the window rect. Anyway, I'm seeing the same behavior as @jmcilhinney : looks to be about 7-8 pixel wide area...
  17. Skydiver

    Question Any way to move the form in design view?

    For runtime, you can change the default start position and/or the location properties. I don't think there's a way to do that in the design view, or at least I've never seen any of the UI designers do it, and I've seen them some things that seem to take the WinForms Designer to its limits.
  18. Skydiver

    Question Beginner - Broad programming question.

    For web development, I'm sorry to say this for any professional web devs out there, but for me the most impactful learning that made all the pieces fall into place for me was the old "Nerd Dinner" tutorial. Before that, I only saw things in web dev as either serving static files, or content...
  19. Skydiver

    Question Beginner - Broad programming question.

    Personally, the way I made that breakthrough when I teaching myself programming (BASIC, 6502 assembly, Forth) was just keep on trying different things. Some things work. A lot of them did not. But any which way there was learning each step of the process. But that was back in the early 80's in a...
  20. Skydiver

    after add feature name and feature value query execution result take too much time ?

    Is the query plan equally as complex without the FeatureName and FeatureValue fields?
Top Bottom