2,157 Posted Topics
Re: It looks like every time you display the calendar you make a couple of database calls. This will slow down the display. Why do you make these calls? | |
Re: [code]using System; using System.Text; using System.Text.RegularExpressions; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Regex reg = new Regex("[A-Z][a-z]*[0-9]*"); String str = "C23H24Na1O"; StringBuilder sb = new StringBuilder(); foreach (Match m in reg.Matches(str)) { sb.Append(m.Value); if (Char.IsDigit(m.Value[m.Value.Length - 1]) == false) { sb.Append(1); } } Console.WriteLine(sb.ToString()); Console.ReadLine(); … | |
Re: Let us say we have a base class known as Animal that has a virtual method Eat. We derive some child classes Lion, Bear, Bird. Now we want to have a collection of these creatures and since they all derive from Animal, we can create an Animal array and instantiate … | |
Re: With a RTB you can. Something like:[code] RichTextBox1.SelStart = 0 RichTextBox1.SelLength = 1 RichTextBox1.SelColor = vbRed RichTextBox1.SelStart = 1 RichTextBox1.SelLength = 6 RichTextBox1.SelColor = vbGreen[/code] | |
Re: You are using int to store what most likely would be a floating point number (I have $4.82 in my account so I'd enter 4.82). You are using int to store a string (xact_type) and comparing it to something that doesn't exist "credit, debit". You are also using the assignment … | |
Re: You seem to be going from 0 to 999 instead of 1 to 1000. | |
Re: Let's see the insert statement and the report_data definition. | |
Re: So what is the question? The code you have written won't even compile, so I'm not sure what you want. | |
Re: Add a method to the MouseEnter event to change this.Backcolor to white. | |
Re: The [icode]Complex c[a][/icode] sets up storage for an array of Complex class/structure but doesn't create them. You'll have to create a complex object then assign it to the array. | |
Re: You have A3 backwards, it should only be a get method returning the values required. You have no constructor for RealEstateSalesperson as required by B1. You also placed your set methods in the base class, and part B says place them in the child classes. Your MakeSales method signature is … | |
| |
Re: When you install your database it usually asks what region encoding to use, or uses what .NET refers to as InvariantCulture (which is very much like USA settings). | |
Re: When you implement an interface you need to provide an actual method for each method signature in the interface. It's complaining that it isn't abstract because you didn't do so, and the only way not to do so is in an abstract class. Provide a Validate method in your updateInfo … | |
Re: for loops require integers as the increment value. Why are you trying to loop through all the valid values? The requirements are to generate one (1) number and return it. | |
Re: You have no method in your class called InitializeComponent, which you call in your parameterless constructor. | |
Re: Nope. It's easy enough to create a simple form with the buttons you want and return the values as needed. | |
Re: You provide no code, don't say what exception is being thrown or where in the code it is being thrown and you expect what for an answer? | |
Re: Don't put the path into your code, use the Settings (In Visual Studio, select Project the Properties (last item). Then select the Settings tab). The settings are kept in an XML file so when you need to change one for a different system, you can just edit the XML file … | |
Re: Without performing some very complicated code using [URL="http://msdn.microsoft.com/en-us/library/system.reflection.emit.typebuilder.aspx"]Emit[/URL] you can't. But what you can do is use a Dictionary<Tkey,Tvalue> you can do something more useful. For example let's create a DVD class: [code]class DVD { public String Title { get; private set; } public int RunTime { get; private set; … | |
Re: [code]Ping test = new Ping(); PingReply result = test.Send("google.com"); if (result.Status == IPStatus.Success) { // there is a network connection between the machines }[/code] You'll need a [icode]using System.Net.NetworkInformation[/icode] at the top of your code. | |
Re: The calendar part of DateTimePicker is hidden until the user clicks on the dropdown box, and what would be the point of using a DateTimePicker without letting someone easily select the date from a calendar? | |
Re: First problem: Try something like [code]do { printf("Enter you weight in pounds:\n"); fgets(input, sizeof(input), stdin); } while (sscanf(input, "%f", £s) == 0);[/code] Second problem: Put [icode]BMI = 0;[/icode] between lines 46 and 47. | |
Re: Create a new method in form2 to handle the click event using the override keyword in the method signature i.e. public override blah blah blah... | |
Re: [URL="http://msdn.microsoft.com/en-us/library/system.threading.waitcallback.aspx"]WaitCallback[/URL] delegate (line 14 in first block of code) only takes one parameter and you are giving it a two parameter method (DoChecking has two parameters). | |
Re: Your constructor that takes arguments has 5 but your parameterless constructor is calling for a constructor that only has 4 arguments. You'll need to add one more argument in there. Once you add that you'll get another error about needing an explicit cast (why 0M and not just 0?) | |
Re: m is always 1 more than the number of items you have (see line 20). In line 48 you are looping from 0 to m (your <=) so there is no element names[i] when i == m, thus a null reference exception. Try changing line 48 to [icode]for (i = … | |
Re: There is a typo in your first code block. Don't put '=' between string and the variable names :) | |
Re: You'd execute a non-query on the database using a create table command. The syntax of the command would depend on the database you are using. You can't have two tables with the same name, how would the system know what table you want to use? | |
Re: Depends on the size of the records. 1 MB @ 600 records is a little over 1600 bytes for each. Modern systems laugh at 1 MB usage. | |
Re: [URL="http://download.oracle.com/javase/tutorial/java/concepts/object.html"]What Is an Object[/URL] | |
Re: [URL="http://en.csharp-online.net/Deploying_Windows_Applications%E2%80%94Creating_an_Installation_Package_for_the_Simple_Editor"]Here[/URL] is a (long) tutorial on how to create a setup project to install software with dependencies. | |
Re: Break your code up into the steps you need to do and solve each one: 1) Verify that the two new password fields match 2) Verify that the entered userid/password combination is valid 3) Change the password to the new password You are almost there :) | |
Re: You are blocking the GUI thread with the [icode]array[k].Join()[/icode] call. Why are you calling Join() at all? | |
Re: Line 8: Returns a number from 1 to 99, not 1 to 100. The upper bound is exclusive in [URL="http://msdn.microsoft.com/en-us/library/2dx6wyd4.aspx"]Random.Next[/URL] Line 16: What happens when the user types "I want to quit this game" instead of a number? Line 18 only lets you enter 5 guesses. The requirements say 6. … | |
Re: Explain more. Do you want to call a C++ DLL from C#? | |
Sometimes we need to generate sequence and perform some process on the results. This usually results in some code like this (We'll be using the [URL="http://en.wikipedia.org/wiki/Fibonacci_number"]Fibonacci sequence[/URL] in these examples): [code]void MyMethod() { // What we want to do is output to the screen the first 10 Fibonacci numbers // … | |
Re: Your example is already in 1NF which requires that there be no repeated columns in the table. It looks like you are trying to convert it into 2NF but even then your example fails as you repeat data from the first table in the second table. I'm also not sure … | |
Re: To me all of 2 seconds to type "How to use MATLAB" in a search engine and come up with [URL="http://www.mathworks.com/help/techdoc/learn_matlab/bqr_2pl.html"]this[/URL]. | |
Re: Look [URL="http://www.codeproject.com/KB/grid/DataGridView_manipulation.aspx"]here[/URL] | |
Re: The Phoneme set can be found on [URL="http://msdn.microsoft.com/en-us/library/ms720568%28v=vs.85%29.aspx"]this[/URL] page. You'll also find lots of pages on the links to the left (on that page) about using SAPI 5.3. | |
Re: That's because you are running everything in the GUI thread, and you don't give it time to update. Put [icode]lable1.Refresh();[/icode] between lines 40 and 41 in your code. | |
Re: Two steps to be followed to disable the Copy-Paste feature in a textbox, 1) To stop right click copy/paste, disable the default menu and associate the textbox with an empty context menu that has no menu items. 2) To stop the shortcut keys you'll need to override the ProcessCmdKey method: … | |
Re: In your filename variable you have a full path, which you combine with another path. Why? Same for your destination file. Also, your timer won't tick while the file is being copied as you are running both in the same (GUI) thread. | |
Re: [QUOTE=phallicgore;1466476]I have to Google almost everything for his classes, I didn't get the books they almost never help me.[/QUOTE] What book(s) does the class ask you to get? | |
Re: [URL="http://msdn.microsoft.com/en-us/library/ms754130.aspx"]Windows Presentation Foundation[/URL] | |
Re: Because bitwise complement is faster than negating the number (which is done by taking the bitwise complement and adding 1). For example, let us say that the next element that is larger is 1 (or 0000 0001 binary). The bitwise complement is -2 (1111 1110) and the negation of the … | |
Re: According to [URL="http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/70518c00-ef96-4b91-97dd-6ba81df27547"]this[/URL] post on MSDN, you can set the format option to "CSV". |
The End.