2,157 Posted Topics

Member Avatar for bords

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?

Member Avatar for Momerath
0
158
Member Avatar for srikanth2321

[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(); …

Member Avatar for Momerath
0
221
Member Avatar for lochnessmonster

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 …

Member Avatar for mrnutty
0
109
Member Avatar for RavesCoder
Member Avatar for ddanbe
0
84
Member Avatar for arkanoid

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]

Member Avatar for arkanoid
0
121
Member Avatar for rbduck09

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 …

Member Avatar for rbduck09
0
144
Member Avatar for thebigbroski
Member Avatar for abarrett86
Member Avatar for JudeV

So what is the question? The code you have written won't even compile, so I'm not sure what you want.

Member Avatar for Momerath
0
109
Member Avatar for CHOCHOCHO
Member Avatar for fpsasm

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.

Member Avatar for fpsasm
0
114
Member Avatar for alex9292

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 …

Member Avatar for Momerath
0
164
Member Avatar for revjim44
Member Avatar for carlitosway17
Member Avatar for Dragutin

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).

Member Avatar for Momerath
0
20
Member Avatar for boifang

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 …

Member Avatar for Momerath
0
108
Member Avatar for kra9853

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.

Member Avatar for kra9853
0
168
Member Avatar for carlitosway17

You have no method in your class called InitializeComponent, which you call in your parameterless constructor.

Member Avatar for carlitosway17
0
2K
Member Avatar for abhi10kumar

Nope. It's easy enough to create a simple form with the buttons you want and return the values as needed.

Member Avatar for ddanbe
0
118
Member Avatar for Jake.20

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?

Member Avatar for Jake.20
0
173
Member Avatar for prayag.419

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 …

Member Avatar for Momerath
0
106
Member Avatar for james6754

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; …

Member Avatar for Kru
0
118
Member Avatar for bhagawatshinde

[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.

Member Avatar for Momerath
0
168
Member Avatar for bhagawatshinde

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?

Member Avatar for bhagawatshinde
0
93
Member Avatar for yassop

First problem: Try something like [code]do { printf("Enter you weight in pounds:\n"); fgets(input, sizeof(input), stdin); } while (sscanf(input, "%f", &pounds) == 0);[/code] Second problem: Put [icode]BMI = 0;[/icode] between lines 46 and 47.

Member Avatar for yassop
0
309
Member Avatar for ajinkya112

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...

Member Avatar for Momerath
0
104
Member Avatar for JannuBl22t

[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).

Member Avatar for Momerath
0
223
Member Avatar for carlitosway17

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?)

Member Avatar for Momerath
0
292
Member Avatar for NewOrder

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 = …

Member Avatar for NewOrder
0
180
Member Avatar for abhi10kumar

There is a typo in your first code block. Don't put '=' between string and the variable names :)

Member Avatar for Mitja Bonca
0
124
Member Avatar for ajinkya112

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?

Member Avatar for Rynkadink
0
142
Member Avatar for AngelicOne

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.

Member Avatar for Momerath
0
230
Member Avatar for james6754

[URL="http://download.oracle.com/javase/tutorial/java/concepts/object.html"]What Is an Object[/URL]

Member Avatar for Momerath
0
143
Member Avatar for funfullson

[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.

Member Avatar for funfullson
0
74
Member Avatar for paddypowa

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 :)

Member Avatar for zachattack05
0
4K
Member Avatar for JannuBl22t

You are blocking the GUI thread with the [icode]array[k].Join()[/icode] call. Why are you calling Join() at all?

Member Avatar for Venjense
0
89
Member Avatar for JudeV

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. …

Member Avatar for Momerath
0
193
Member Avatar for vincezed
Member Avatar for Momerath

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 // …

Member Avatar for Momerath
2
631
Member Avatar for StephenChristen

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 …

Member Avatar for StephenChristen
0
128
Member Avatar for nirveshverma

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].

Member Avatar for Momerath
0
102
Member Avatar for abhi10kumar

Look [URL="http://www.codeproject.com/KB/grid/DataGridView_manipulation.aspx"]here[/URL]

Member Avatar for Momerath
0
108
Member Avatar for sah

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.

Member Avatar for Momerath
0
128
Member Avatar for Jessurider

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.

Member Avatar for Jessurider
-1
119
Member Avatar for bhagvad30

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: …

Member Avatar for Momerath
0
291
Member Avatar for xZombeast

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.

Member Avatar for rohand
0
133
Member Avatar for 5ophie2012

[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?

Member Avatar for 5ophie2012
0
1K
Member Avatar for Jessurider

[URL="http://msdn.microsoft.com/en-us/library/ms754130.aspx"]Windows Presentation Foundation[/URL]

Member Avatar for ddanbe
0
156
Member Avatar for jonsca

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 …

Member Avatar for ddanbe
1
125
Member Avatar for C#Jonathan

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".

Member Avatar for Momerath
0
100

The End.