2,157 Posted Topics
Re: [code]@"^(\d\d\.\d\d|\d\d\.\d\d\.\d\d)$"[/code] You need to escape the . or it will match things like 02a34. | |
Re: Need to see more of the Dog class. Are you trying to set the name of the dog? Is there something in the Dog class that can hold the name? Also, your code won't run. The [B]dogs[/B] variable, while declared, never has anything assigned to it. You need a [I]new[/I] … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.selectedindex.aspx"]TabControl.SelectedIndex[/URL] | |
Re: [url]http://www.codeproject.com/KB/miscctrl/uxtheme.aspx[/url] | |
Re: You don't show the Coin class so it's hard to tell what you need to do. On the other hand, no where do you have code where you call a [B]void[/B] method and store the result in an int. No where. Let me make it clear: No where. [B]void[/B] means … | |
Re: Without knowing more about what you are trying to do (Do you want [B]Update()[/B] to run right after you show the form, or after the user is finished with the form) it's hard to help. But, if you want the user to have to deal with form two and close … | |
Re: Your question is vague. Do you want to select data from 2 tables for 2 controls? Do you want to join the tables? Inner or outer join? Are you looking for code, the SQL statement, or what? What do the tables look like? What information do you want from the … | |
Re: Yes, you are reading them correctly. Sometimes you see binary numbers split like that because it makes it easier to convert them to hexadecimal (each 4 bits = 1 hex digit). | |
Re: A google search returned [URL="http://www.google.com/imgres?imgurl=http://images.fanpop.com/images/image_uploads/dani-falling-america-27s-next-top-model-41478_400_300.jpg&imgrefurl=http://www.model2474.net/evolutionary-development-model.html&usg=__cNl4uIhV8yEU-AkVQ0w2__jMJyA=&h=300&w=400&sz=69&hl=en&start=0&zoom=1&tbnid=s9pHETl9iAtEvM:&tbnh=145&tbnw=209&prev=/images%3Fq%3DEvolutionary%2BDevelopment%2BModel%26um%3D1%26hl%3Den%26client%3Dfirefox-a%26hs%3D1Rk%26sa%3DX%26rls%3Dorg.mozilla:en-US:official%26biw%3D1280%26bih%3D872%26tbs%3Disch:1&um=1&itbs=1&iact=hc&vpx=672&vpy=385&dur=2881&hovh=194&hovw=259&tx=113&ty=92&ei=YRe3TM2-AZP2tgPToZzpCA&oei=YRe3TM2-AZP2tgPToZzpCA&esq=1&page=1&ndsp=30&ved=1t:429,r:15,s:0"]this[/URL] | |
Re: Don't worry about it, the SQLConnection object will handle the disposing of the unmanaged resources all by itself. | |
Re: Old thread, and your code produces the wrong value for one number. | |
Re: File.Delete only takes 1 parameter and you've supplied two. Get rid of all the 'true's. | |
Re: [icode]OrderDate = " + lblDate.Text + " ";[/icode] is where the problem is. The lblDate.Text is probably something like "Sep 21, 2008". You need to quote the date (at least) or learn to use parameters (best). Quoting the date is simple, just change that part to [icode]OrderDate = [B]'[/B]" + … | |
Re: First, the closing tag has a / as the first character (for your code block) :) Second, when I run the code and tell it I want to do calculation 8 I get the Invalid input line. So I guess I don't understand what problem you are having :) | |
Re: You'll need to use [URL="http://msdn.microsoft.com/en-us/library/aa446536.aspx"]P/Invoke[/URL] which can become complicated depending on the parameters you need to pass. | |
Re: You add the parameters to the [B]cmd[/B] object but then use the [B]da[/B] object to execute the query. What's the purpose of the [B]cmd[/B] object when you aren't using it? | |
Re: foreach uses the IEnumerable interface to get it's list of objects. While using this interface, you can't add or delete elements of the collection or it causes issues with the internal tracking used by the interface. By calling Dispose on the control you've caused it to 'delete' itself without removing … | |
Re: Where's the Book class? Where's the RetrieveBookList method? What line is giving you the error in all that code? | |
Re: [QUOTE=srinivasan106;1355715]actuAlly sec algorithm computes minimum of the array each time and inserting it at first..[/QUOTE] Unless you pass parameters that are wrong, the second example generates an error. For example, let's say you have an array of 10 items. If you call your method with [icode]select(myArray, 10)[/icode] You will get … | |
Re: [I]foreach[/I] is used to iterate through any collection that implements the [I]IEnumerable[/I] interface (which includes arrays of value types). But, the [I]foreach[/I] iteration variable (in your case [B]val[/B]) cannot be assigned to as this would 'break' the enumeration that was obtained. You also cannot alter the collection that is being … | |
Re: Wouldn't something like [icode]nextdoor(X,Y) :- not west(X,Y) == west(Y,X)[/icode] work? If X is west of Y you get No == No, which is true. If Y is west of X you get Yes == Yes, which is true. If neither is west of the other you get Yes == No … | |
Re: dt.Columns returns an System.Data.DataColumn IEnumerable, but you are trying to force it to be a string (line 6). Use [icode]foreach (Column cols in dt.Columns)[/icode] instead | |
Re: This is the same problem as the "guess the number" game. You pick a range to search in that you know the number (in this case, the cube root) exists. You then divide this range in half, and determine which half the number exists in. Repeat dividing in half until … | |
Re: While lines 5 and 6 create elements, they aren't automatically added to the xmldoc. From the [URL="http://msdn.microsoft.com/en-us/library/fw1ys7w6.aspx"]documentation[/URL] "Although this method creates the new object in the context of the document, it does not automatically add the new object to the document tree. To add the new object, you must explicitly … | |
Re: it's line 3 that is the problem, the part right after the equal sign. [B]counts[i][/B] is not a boolean value but you are treating it as one. What condition are you trying to test for? This is a common bad habit C/C++ programmers develop :) | |
Re: First, I've reformatted your code with the proper indentation, this will make it easier to see why you have some errors: [code]using System; public class BonusProduction { public static void Main() { int FName, LNAME; double LastYearProduction; double ThisYearProduction; Console.WriteLine("Enter your first name"); FName = Convert.ToInt32(Console.ReadLine()); Console.ReadLine("Enter your last name"); … | |
Re: You are asking malloc to supply you enough space to hold 'A', which is a pointer to a structure that requires a pointer. You need to allocate data for the 'data' pointer inside your Matrix class. | |
Re: Since C isn't object oriented, I'll have to assume you mean the mathematical model for certain classes of data structures. Wikipedia has a decent [URL="http://en.wikipedia.org/wiki/Abstract_data_type"]article[/URL]. | |
Re: When using the built in Copy method, it does what is called a shallow copy. This means that anything inside the object that is a reference, they just copy the reference (they don't create a new object of that type). You'll have to create your own copy method that does … | |
Re: You'll have to create your own MessageBox class (call it something other than MessageBox or you'll probably have issues) and implement your own buttons. | |
Re: You'll need to trap key presses, the code below does this, but you'll need to figure out which key is the print screen key and just not pass it on to the system: [code]using System.Windows.Forms; public class MyClass { private HookProc myCallbackDelegate = null; public MyClass() { // initialize our … | |
Re: Create a separate log in window, and use ShowModal() to process it. They won't be able to interact with anything other than the log in window until you close it. | |
Re: The easiest way is to use String.Split(). If you look at your text, you can see that each item is separated from another by a specific character, in this case ':', ' ', '(', ',', ')' so that's what we split on: [code]char[] splitc = {':', ' ', '(', ',', … | |
Re: Your queue class should be independent of your patient class. A patient doesn't have a Queue, a Queue contains a patient. What does a queue need? A way to add members to the queue, a way to remove members from the queue and a way to see if there is … | |
Re: If your printer can detect the paper size, then PrintOptions.PaperSize will have the value you are looking for. No matter what, though, your program will consider the paper to be of a specified length. Mostly this will determine how much it will attempt to print before it does a 'next … | |
Re: You could create each area as a frameless child window of a MDI form. That way they will act as independent windows regarding tab (and events). | |
Re: If dtModified is the changed version of dtoriginal, dtModified.GetChanges() will give you the changes. A merged table doesn't have changes, it is supposed to be current. Check out the documentation on [URL="http://msdn.microsoft.com/en-us/library/fk68ew7b.aspx"]Merge[/URL] | |
Re: Testing for equality in C# is done with [B]==[/B] not [B]=[/B] so your line 21 is wrong (and should give you a compile error). And I'm not sure what you are trying to test for, so I can't help you write your test. | |
Re: It's going to display it 2 times: 1) When you type it in the console echos your input, so you can see what you have typed 2) When Console.Write() line executes | |
Re: [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx"]SqlBulkCopy[/URL] | |
Re: Just a FYI: You should only ever execute [I]new Random()[/I] one time in your code. There is no need to have multiple generators and you can run into timing issues (like the problem here) if you do. | |
Re: [code]foreach (char c in TextBox2.Text.ToCharArray()) { port.Write(c); }[/code] This will send each character in the textbox (if your Write method supports characters, otherwise convert them to strings :)) You might want to pick a different event to send on, as TextChanged will fire when the text changes. So if the … | |
Re: [url]http://forum.xda-developers.com/showthread.php?t=465590[/url] | |
Re: You don't have to escape ' marks in C#, remove the \ characters. | |
Re: Error 916 means you don't have permissions or it's the bug mentioned [URL="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=355238&wa=wsignin1.0"]here[/URL] | |
Re: Traversing a linked list in an O(n) operation. So splitting a list is an O(n) operation. Having to do it multiple times gives O(n) + O(n/2) + O(n/4), etc. which is still considered O(n). Then it needs to make (n ⌈lg n⌉ - 2⌈lg n⌉ + 1) comparisons. Since we … | |
Re: Your question is unclear. Do you want IP address of a machine or the headers of an email? For IP address you use:[code]IPHostEntry ip = Dns.GetHostEntry("www.google.com"); IPAddress[] addr = ip.AddressList;[/code] Getting headers is a little more involved, I'd suggest searching for "read email C#" in Bing or Google. | |
Re: At what school does a Masters degree student not know what kind of software uses databases? |
The End.