2,157 Posted Topics
Re: You can't add 1 to the time and expect to get the result that you added 2. Make an instance variable, increment it each time your timer ticks and add it as to the hour. | |
Re: No, only variables in a class are serialized, methods are not. | |
Re: Ok, the reason why it does that is that the 0:5eFE in the 5/6 spots indicates that this is an [Intrasite Automatic Tunnel Addressing Protocol (ISATAP) Address](http://msdn.microsoft.com/en-us/library/aa922393.aspx) (Tunneling IPv6 traffic on an IPv4 network). That is the correct format for an ISATAP address, you'll just have to deal with the … | |
Re: Ada Lovelace wrote an algorithm to be processed by the Babbage Engine in the early 1800's, and the machine wasn't built until 1991. | |
Re: Using shared memory is very easy in C#, no need for unmanaged code. Just do a search on memory mapped files. But I believe the original poster is trying to create software to automate something he doesn't have the source for, such as a game. | |
![]() | Re: Your ErrorCheck method returns a value, but you never accept the value so it might as well not return one. You check iError in line 57 to see if it is one of your error codes, but since it *never* gets changed from the initial value, it will always be … |
Re: No need to create a class, just force it to box the value: `this.button1.Tag = (object)12;` But remember, when you go to retrieve it, it will be of type Object, you'll have to cast it back into whatever you need it to be. | |
Re: What's n? Why aren't you using the size of the array as the limit? | |
Re: You'll need to convert them one by one, you can't cast strings into int. So use Convert.ToInt32, Int32.Parse or Int32.TryParse | |
Re: Use a List<T> rather than an array. It will dynamically change its size as needed, and you can treat it as (and convert it to) an array. | |
Re: Do you see any paramters in your stored procedure? No you do not. Then why are you providing them in lines 87-93? | |
Re: This is not a code writing service. If you have a problem you don't understand *with your code* then come back and let us know. | |
Re: [Dragon Book](http://dragonbook.stanford.edu/) | |
Re: Not too difficult int[] counts = new int[list_steps.Length - 1]; for (int i = 0; i < list_steps.Length -1; i++) { counts[i] = listSource.Select(p => p >= list_steps[i] && p <= list_steps[i+1]).Count(); } | |
Re: The problem is that C# is case sensitive and your Main method in line 27 is 'main' instead of 'Main' (assuming those are in different files). | |
Re: And you want us to debug your code, but you don't post any? What line gives the error? What are the values of the various variables at the time the error occurs? | |
Re: You really aren't saving that much memory (about 4 bytes) so I wouldn't worry about it unless you are building for embeded systems. As for issues, yes it can cause some. What if you decide you need to know how many times your dog barks. If you put a counter … | |
Re: How big is the file? You are limited by how much memory you have on your system, and the 2GB data limit (if you are using .NET 4.0 or lower). | |
Re: It looks like your png is being scaled up to cover the area, use a higher resolution picture. | |
Re: Just because you Disposed of an object doesn't mean the system has. Keep opening/closing the form and see if you run out of memory (you really do have a leak) or at some point all those GDI objects vanish (the GC ran and cleaned up for you). | |
Re: The easiest way to get all the text into an array is File.ReadAllLines() String[] lines = File.ReadAllLines("MyFileNameHere.txt"); Once you have all the text, you loop through the array, then loop through each character in the string. But you don't really care about line breaks and stuff, so just use File.ReadAllText() … | |
Re: Instead of all this complicated code, why don't you use[ NumericUpDown](http://msdn.microsoft.com/en-us/library/system.windows.forms.numericupdown.aspx) boxes? | |
Re: Using a loop is a waste of time. Arrays contain multiple methods for searching built in: BinarySearch() Exists() Find() FindAll() FindIndex() FindLast() FindLastIndex() IndexOf() LastIndexOf() | |
Re: It's telling you that the DevExpress DLL doesn't have a valid signature. Did you buy DevExpress or are you trying to distribute the developer DLL you can download for free? | |
Re: Do you really think the original poster is waiting around after 5 years to give you the code? | |
Re: http://www.simple-talk.com/sql/t-sql-programming/reading-and-writing-files-in-sql-server-using-t-sql/ | |
Re: Line 21: When you call a method, you don't provide the types with the method. Remove the two 'double'. Line 21: rate is not a variable in your method, did you mean rateofPay? | |
Re: Where are you reading the file? I see you changing the path, but not actually reading any data from the file. And why do you change the path? | |
Re: You should create a class to hold the band name and the minutes used. Use a List<T> to hold each of these that you create. Create your form as requested. | |
Re: Use String.Trim() to remove spaces. | |
Re: Where do you get the error? What line? What are the values of the various variables at the time? | |
Re: When you create the form ( = new MyForm) and before you show it, you'll need to set the BackColor property. I'd create a method that sets the properties and just pass the form object to it. | |
Re: Not sure what you are asking, but to make a generic, you need a generic type indicator class Factory<T> { | |
Re: You are creating a lot of random values (and way too many Random objects, you only need 1 per program). You need to rethink the logic of this program as you are doing a lot of stuff that doesn't need to be done (and line 37 effectively ends your program). | |
Re: Once you parse the line you never store the value into your other arrays (that you haven't declared). Since you don't know the size that these arrays will be, I'd use a List<T> to hold the values. | |
Re: Without seeing the code and how you implemented the priority queue there really isn't anything we can say, it would all be guesses. | |
Re: You will have to get the HorizontalScrollBar property of each DataGridView and add a handler to the OnScroll event. When the event is raised, set the other scroll bars to the same Value as the one that was scrolled. Make sure you set a sentinal value in the handler to … | |
Re: You might want to consider using WebClient or WebRequest/WebResponse instead of WebBrowser. Not sure if they will meet your needs, depends on what you are looking at :) | |
Re: If you decide to leave it as parallel arrays, just use [Array.IndexOf()](http://msdn.microsoft.com/en-us/library/7eddebat.aspx) to find the index. | |
Re: 1) He's talking about Winforms so there is no aspx page at all 2) This is over a year old, he's probably figured it out by now. | |
Re: Remove 'APPOINTMENTS' from your table list. You are getting a record for every row in the appointments table that matches the criteria. If you are going to use two tables like that, you need to somehow tell it which rows in the appointments table belong to which rows in the … | |
Re: You could make the work handler a service and pass it the information as you receive it. No need for threading or async handling. | |
Re: Your code isn't in a class. C# is an OO language and requires everything to be in a class. Other than that there doesn't seem to be anything wrong. That should open the COM1 port (and then immediatly close it since your method ends and the 'port' variable only has … | |
Re: in line 83 you are converting txtTemp.Text to an int, shouldn't you be converting your new textboxes.Text to ints? |
The End.