Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Everything posted by madknight3

  1. 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. 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 J
  4. 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. 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. 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 wor
  7. 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. Out of curiosity, do you still use Vim shortcuts in whatever your editor of choice is now?
  10. 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 re
  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. 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-se
  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
  16. Web development does have a fairly low barrier to entry, especially for basic GUI work. HTML, CSS, and JavaScript (usually the first three things you start with) aren't too hard to get started with. Outside of web development, most programming languages will start you off with basic command line applications. The point is to allow you to focus on learning the language without having to also learn how to work with a GUI right away. Which you choose is entirely up to you. Web development is fine, however, it sounds like choosing something outside of web development is wh
  17. First, note that these tools are not required for all web development. They are recommend for ASP.NET development though which is a .NET web framework. If you're not familiar with the differences between client side vs server side web development and don't know what web frameworks are, then learning a bit about that stuff first may help. Now, onto your specific question. Here is the feature comparison list for the different versions of Visual Studio 2017 (Community, Professional, and Enterprise). Community and Professional are almost identical in features and Enterprise
  18. The code isn't "refreshing" the form. It's hiding the existing form, and creating another form1 and showing it. The original form1 is still there in the background. this.Hide(); // The "this" keyword refers to the current form1. So you're hiding the current form1. form1 f1 = new form1(); // Here you're creating a new form1 that is separate from the existing form1 f1.Show(); // Here you're showing the new form1 and the old form1 is just going to remain hidden in the background // Side Note: // Hide() is just setting the Visible property to false. // So this.Hide(); // is just a shorter
  19. Should be like this ffmpeg -ss 00:00:15 -i "C:\Videos\A guide to Harvard Referencing.mpf" // etc Just use the specific path to the video on your computer. I just put one there as an example.
  20. No problem. Not sure if you'll need the videos full path when you run it from your application, just keep it in mind if it doesn't work.
  21. You probably just need quotes around the filename. Also, the path to cmd.exe shouldn't be there. It should just be the path to the video file
  22. /r/ProgrammerHumor/ - Ways of doing a for loop Lots of great suggestions there!
  23. Basically, the code is running FFmpeg from the command line using the Process class. Here is some documentation to explain the Process classes in more detail Process Class ProcessStartInfo Class FFmpeg is generating an image from the specified video (ie: the video parameter) and saving it to the specified location (ie: the thumbnail parameter) which you can then load into your application (ie: the code in the LoadImage method).
  24. Note that I haven't needed this feature before so I haven't tried any of these options out myself. I'm just helping you Google. You'll have to look into them more yourself. In terms of Visual Studio extensions, here are some I found TeamCoding (Seems to use CodeLens which isn't in the free Community version of VS) Collab (Looks dead) floobits plugin (Looks dead) Cloud IDEs usually have this feature although I'm not sure how many out there have .NET support. One option I found was Codeanywhere which seems to suggest it supports .NET Sinc