Jump to content

madknight3

Member
  • Content count

    1,786
  • Joined

  • Last visited

Awards


About madknight3

  • Title
    Veteran
  • Birthday 1989-12-04

Profile Information

  • Gender
    Male
  • Location
    Canada

Recent Profile Visitors

1,529 profile views
  1. Help verifying input type VB.NET

    Console.ReadLine() will always return a String. You could use Double.TryParse to see if it's a number or not like so Dim input As String = Console.ReadLine() Dim value As Double If Double.TryParse(input, value) Then ' It was a double and the variable "value" now contains the converted input Else ' It wasn't a valid double and the variable "value" is set to zero End If
  2. Chevereto API? C#

    There are a lot of classes in .NET for making web requests. You can use HttpClient, WebClient, HttpWebRequest or WebRequest. The specifics for what kind of requests you need to make are outlined in the Chevereto API docs.
  3. I expect there are many PHP libraries that can do what you need. I'm not a PHP dev, so I'll leave it to you to search for an appropriate one for your company. If for some reason PHP doesn't have an acceptable library, you could use one from another language. You could use a web service, command line tools, or something else that PHP can call to get the results from the other application. I've only done this in .NET before and have used iText (Java and .NET support), iTextSharp (.NET only), and ABCpdf .NET 9 (.NET only). I also recall looking into Adobe PDF Library (C++, .NET, and Java support) and others but I don't remember what they all were. iText suited our needs.
  4. Visual Basic Help

    The WebClient class has a DownloadFileCompleted event you can use. You can "Handles" it just like you did with the DownloadProgressChanged event in your code snippet, or you can use the "AddHandler" like in the link example (just don't do both or the event will be triggered twice).
  5. What does myImage refer to in this code?

    That is an extension method. The first parameter is prefixed with a "this" keyword which means that you can call that method on an object of that type. In this case, an Image. So "myImage" is of type Image.
  6. Thoughts on Rust?

    I've briefly played around with the basics but I haven't had the time to fully dive into language. With that said I've been following its progress for a while so the below information is me parroting what I've heard/read. Rust probably isn't very suitable as a first language for complete beginners, however, it seems like there's enough to get someone with some previous experience going. They are in the midst of a full rewrite of the official rust book (chapters 2 - 8 done and the rest in the editing process, progress here) so it appears to be at the point where it's worth reading over the first edition (and supplement as necessary). Another popular resource is Rust by Example. And there's quite a few blogs/tutorials/talks out there to find for additional resources. There's a very active rust subreddit which you can follow for information/asking questions/etc. It has some additional resources linked in the side bar. There are also a few "Are we ___ yet?" sites for rust that, if up to date (I'm not sure), might give you a general idea of how rust is doing in some specific spaces. Are we (I)DE yet? Are we web yet? Are we game yet? Are we (machine) learning yet?
  7. Advice On Web Development Education

    Apply anyway. Worst case, you don't get the job (which you wouldn't if you didn't apply anyway) and you may end up with some extra interview experience. I'm sure you can find plenty of specific advice online for how to job hunt without a degree too. You can cover a lot of CS material on your own though. Check out OSSU. You can start with an Intro to Computer Science course (like Harvard's CS50 which covers a mixture of C, Python, SQL, and JavaScript plus CSS and HTML) and go on from there. Web development can still be your priority but the additional knowledge can help.
  8. You need to make an HTTP request in the WinForms app. There are a few classes in .NET that let you make them. One of them is HttpClient
  9. Best programming IDE

    Out of curiosity, do you still use Vim shortcuts in whatever your editor of choice is now?
  10. Best programming IDE

    It depends. IDE's tend to support multiple languages but that doesn't mean they support everything. It also doesn't mean that all languages are supported equally. So sometimes you may want to use more than one editor. If you liked PyCharm, then you'll like IntelliJ for Java. IntelliJ appears to have two plugins for Haskell. I haven't used either of them though, so I can't speak to their quality. Intellij-Haskell HaskForce
  11. Yes, like Erik says, the plain class files aren't of any use to a running application. You would need to take the class files, compile them into an assembly, and then call the code from that assembly. StackOverflow: How to load a class from a .cs file contains some information on the subject. But this is overly complicated and probably only actually needed in very rare situations (ie: it's very unlikely you need to do it). I expect what you're trying to achieve can be done in a much better/easier way. For example, most databases can be set up and accessed remotely from other computers. This may be good enough for your purposes but be aware that in can introduce security issues.
  12. Socket programming in a managed .NET application (like the C# WinForms app being used) is normally done using the System.Net.Sockets namespace, not using WinSock. There is the basic Socket class that you can use that is very flexible. Source .NET also provides some protocol specific classes that can help make things easier. For TCP sockets you have the TcpClient and TcpListener classes. For UDP sockets you have the UdpClient class. These classes use the Socket class underneath, but do a lot of things for you.
  13. Copying a value from one byte array to another

    You're getting that error because data is empty // Example byte[] data = {}; // empty byte[] bytes = new byte[data.Length]; Array.Copy(data, 0, bytes, 0, 1); // Throws ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds. // If data has at least 1 item, that code works byte[] data = {255}; // 1 element byte[] bytes = new byte[data.Length]; Array.Copy(data, 0, bytes, 0, 1); // works Note that Array.Copy is probably overkill for a single item though.
  14. I'm not sure if you're going in the right direction with this. You might want to consider having a separate application running on the server that the clients can communicate with. The idea is that the server application handles a lot of the functionality and database work on it's end and moves that work away from the client. For example, one option is to create a console/desktop application that uses TCP or UDP sockets (depending on what you're trying to do). Here are some related links: TcpClient TcpListener UdpClient You can also google for more client-server information/examples/tutorials/etc. Another option is to create a web service with ASP.NET Web API. You're clients will then communicate with the server using HTTP requests. If you go this route, I'd recommend using the new ASP.NET Core 2.0 if possible but you can use the older ASP.NET Web API if you want. Again, here are some related links ASP.NET Core Web API tutorial Older ASP.NET Web API tutorial HttpClient Class Again, you can google for more Web API information/examples/tutorials/etc.
  15. You need to do more than just include that code in your Form1 class. You need to actually call that HideCaret() method somewhere, specifically in the GotFocus event. https://stackoverflow.com/a/2359382/1765721 For more information on this event, see the documentation: Control.GotFocus Event
×