2,157 Posted Topics

Member Avatar for emrahteam

I'm not sure what the problem is. You have a 26x26 array and only 26 unique values. You will have duplicates.

Member Avatar for emrahteam
0
84
Member Avatar for WildBamaBoy

StartInfo is used to start a process, not retrieve the information about a running process. Use [URL="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.mainmodule.aspx"]MainModule[/URL] property to get the [URL="http://msdn.microsoft.com/en-us/library/system.diagnostics.processmodule.aspx"]ProcessModule[/URL] class of the running process. It has information about running processes.

Member Avatar for WildBamaBoy
0
144
Member Avatar for JOSheaIV

[code]namespace MyGlobals { public static sealed class Global { public static int ScreenWidth = 1024; } } // somewhere else in your code int width = Global.ScreenWidth;[/code]

Member Avatar for JOSheaIV
0
112
Member Avatar for steven8579

You need a [ICODE]using System.Drawing;[/ICODE] at the top of your code (and System.Drawing.dll in your references, if it isn't there).

Member Avatar for steven8579
0
615
Member Avatar for everhett.raman
Member Avatar for fx1250s
0
217
Member Avatar for judithSampathwa

The regex is creating three named matches (so you can get each part of the phone number) called NPA, NXX3 and NXX4. So we have this: [ICODE]^[/ICODE] - must match the beginning of the string [ICODE]\(?[/ICODE] - starts with a paren (the ? makes it optional) [ICODE](?<NPA>[2-9]\d{2})[/ICODE] - Create a …

Member Avatar for Narue
0
434
Member Avatar for judithSampathwa

[code]myTextBox.Text = myFloatValue.ToString("#,###.00");[/code] Will convert a float to the format you want. For input, set that as the mask in the textbox (not tested).

Member Avatar for Mitja Bonca
0
175
Member Avatar for zobobthegreat

Why not use [URL="http://msdn.microsoft.com/en-us/library/3c932kx5.aspx"]GetAttribute(String)[/URL]?

Member Avatar for kvprajapati
0
3K
Member Avatar for riotburn
Member Avatar for iamthwee
0
735
Member Avatar for xbox221

What is line 8 for? Since the variable [I]line[/I] is a string (you define it as such in line 7), why are you converting it to a string? Line 10 you need put quotes around what you are comparing. [code]using System; using System.Text; namespace Text { class Program { static …

Member Avatar for xbox221
0
970
Member Avatar for dineshcbe

The document is in error, the second array does not derive from the first. I suspect it's a typo (many of them).

Member Avatar for Momerath
0
81
Member Avatar for mrnobody

Lines 33 and 34 declare space for the arrays, but don't actually allocate objects into the space, so when you try to use them in lines 36 and 37 there is nothing there to access. You need to actually declare the objects (not just the array to hold them). You'll …

Member Avatar for Momerath
0
95
Member Avatar for oredigger

It means exactly that. As long as what has focus can accept a paste and there is something to paste, it will work just like when you copied that text from the webpage where you found it and pasted it into the box to post your message :)

Member Avatar for oredigger
0
322
Member Avatar for Raihanorium
Member Avatar for vedro-compota

int types are always initialized (to zero). You can check if a string type is null ([icode]if (myString == null) { // Not initialized[/icode]. In general, a null reference means the variable doesn't have an object.

Member Avatar for Farhad.idrees
0
180
Member Avatar for UsSy

Here is a sample class:[code]enum Sex {Unknown, Male, Female}; public class Human { Sex sex; DateTime birthday; public Human() { sex = Sex.Unknown; birthday = DateTime.Now(); } public Human(Sex s) { sex = s; birthday = DateTime.Now(); } public Human(DateTime d) { sex = Sex.Unknown; birthday = d; } public …

Member Avatar for Momerath
0
88
Member Avatar for vedro-compota

First, your methods have no return type, so it won't even compile. Second, the variables you declare in the methods only exist in that method. Third, the proper way to declare a nested class would be [icode]A.B bb = new A.B()[/icode] Forth, B does not inherit methods from A, so …

Member Avatar for vedro-compota
0
122
Member Avatar for Drakarus

You can use Clear() to empty a list, or you can just create a new one (and let the garbage collector clean up the old one).

Member Avatar for Drakarus
0
5K
Member Avatar for james6754

[code]int numberOfFives = 0; foreach (int i in myIntArray) { if (i == 5) { numberOfFives++; } } Console.WriteLine("There are {0} fives in the array", numberOfFives);[/code]

Member Avatar for Venjense
0
120
Member Avatar for vedro-compota

To answer your question, rather than tell you how to do it, yes, it could return those values. If the file doesn't exist, it will return whatever is in exp.Message. If some other error occurs it will return "not possible to open a file". Otherwise it returns "all right!"

Member Avatar for iconoclazt
0
119
Member Avatar for DaveTran

You can try removing all the object creation you are doing (the Vector3 ... lines) and just use the properties directly (except for the EulerAngle). I'd also remove all the calls to ToString() and let the system do the conversion itself. Probably won't make a difference, but who knows what …

Member Avatar for DaveTran
0
110
Member Avatar for Will Gresham

Since you can move in any direction (as long as you haven't visited that spot before) you'll need to generate all possible moves from each spot, and continue doing so until you have generated all possible words (boggle says 3 letters or more). So I'd generate a list of all …

Member Avatar for Momerath
0
89
Member Avatar for james6754

[URL="http://www.amazon.com/Head-First-2E-Real-World-Programming/dp/1449380344/ref=sr_1_1?ie=UTF8&s=books&qid=1292544604&sr=8-1-spell"]Head First C#[/URL] [URL="http://www.amazon.com/Pro-2010-NET-Platform-Fifth/dp/1430225491/ref=sr_1_1?ie=UTF8&s=books&qid=1292544643&sr=1-1"]Pro C# 2010 and the .NET 4.0 Platform[/URL] [URL="http://www.amazon.com/C-4-0-Nutshell-Definitive-Reference/dp/0596800959/ref=sr_1_1?s=books&ie=UTF8&qid=1292544689&sr=1-1"]C# 4.0 in a Nutshell[/URL]

Member Avatar for vedro-compota
2
164
Member Avatar for angele18

What type is Price and what values do you have in from.SelectedItem/to.SelectedItem? I'd take a look at what the sql variable looks like before you call ExecuteReader().

Member Avatar for Sergey.Smirnov
0
91
Member Avatar for krosty4782
Member Avatar for krosty4782
0
177
Member Avatar for hearthand

You could use a BinaryWriter to put them both into the same file. I'd put some sort of header to indicate the length of the string and the length of the image part.

Member Avatar for hearthand
0
203
Member Avatar for MasterGberry

It does exactly what you think it does. You don't say what problem you are having so it's hard to figure out what it is you think it is doing. Your code there works fine.

Member Avatar for MasterGberry
0
143
Member Avatar for Xeros606

While you can use pointers in C# (using unsafe code) what you really want to do is pass a reference. Change your constructor to [code]public ReceivesArray(ref int[,] the Array) {[/code] and then add ref before any variables used to call the constructor. The compiler will complain if you are doing …

Member Avatar for Momerath
0
124
Member Avatar for Gamer0077

Here is a sample program that takes what is in textBox1 and puts it into textBox2 one word at a time. The form has the two textbox, a button, and a timer (with a delay of 5 for my test). [code]using System; using System.Collections; using System.Windows.Forms; namespace WindowsFormsApplication2 { public …

Member Avatar for Gamer0077
0
1K
Member Avatar for sunny124

Don't even bother with the if. Enum's are basically just numbers so you can do this: [code]Store.Category = (ItemCategory) category;[/code]

Member Avatar for kvprajapati
0
131
Member Avatar for Erslich

It's probably the bitmap object that is causing the issue, it being used by the GUI and whatever code you use to update the bitmap.

Member Avatar for PierlucSS
0
1K
Member Avatar for moose333

Your Form_Load event executes after the Form_Paint event so myBitmap hasn't been set yet. You need to initialize variables in the Form constructor.

Member Avatar for moose333
0
408
Member Avatar for michaelsd

If you developed the DLL in C# just add a reference to the DLL in your project and it will be available to the project. You can add a "using" statement so you don't have to type all the rest out. What you are doing is trying to import it …

Member Avatar for Momerath
0
155
Member Avatar for AMetnik

Without knowing what [B]column[/B], [B]value[/B] and [B]dbcontent[/B] contains there is no way to answer your question. Also, what's the point of passing in two parameters that you only use to compare to each other (line 6)?

Member Avatar for AMetnik
0
246
Member Avatar for Mattan360

If the javascript code has more than 32 bytes then it is wrong as SHA256 is a 32 byte hash. I'm not sure what you mean by 'any unidentified characters' since it is a collection of bytes, not characters. Does the javascript turn the hash into a string representing the …

Member Avatar for kvprajapati
0
2K
Member Avatar for trippinz
Member Avatar for Diamonddrake
0
159
Member Avatar for rairai979

Could you show the code that reads the text file and the WriteToServer command you are using?

Member Avatar for buddylee17
0
127
Member Avatar for Mattan360

When you attempt to read from the MemoryStream, it is pointing at the end of the buffer. Reset the pointer to the start of the MemoryStream buffer before reading [icode]outS.Seek(0, SeekOrigin.Begin);[/icode]

Member Avatar for Mattan360
0
100
Member Avatar for Finarfin34

Use the BeginExecuteXXX methods (and EndExecuteXXX) of the SQLCommand object. Not sure how you'll handle keeping the query state between pages, though.

Member Avatar for Momerath
0
95
Member Avatar for Klaurac

You need to call AcceptChanges on the dataset before it will update the database. You should be able to see everything in the database explorer.

Member Avatar for Klaurac
0
268
Member Avatar for mscutie33

Change your while loop to [code]MyWriter.Close(); String myString; List<int> myList = new List<int>(); while ((myString = MyReader.ReadLine()) != null) { myList.Add(Int32.Parse(myString)); } int[] myArray = myList.ToArray();[/code] There are better ways to do what you are doing, I'm just giving you something that should work based on what you have.

Member Avatar for mscutie33
0
2K
Member Avatar for "ICode"

Don't put the connection string in the code, put it in the Application settings. That way you don't have to worry about it, the people using it (the other developers) will have to set it.

Member Avatar for Momerath
0
932
Member Avatar for akklmx

You get the error because C# considers the backslash character (\) and escape character to use to get a special characters (line return or linefeed). There are two ways to solve this problem, the first being the one Mitja posted, by prefixing the string with the "this is a literal …

Member Avatar for Mitja Bonca
0
833
Member Avatar for shahiduop

[URL="http://www.amazon.com/s/ref=nb_sb_ss_c_1_21?url=search-alias%3Dstripbooks&field-keywords=compiler+construction&x=0&y=0&sprefix=compiler+construction"]Compiler Construction[/URL]

Member Avatar for meetanu
0
87
Member Avatar for trippinz
Member Avatar for jigglymig1

Try changing line 3 to [code]graphics.FillEllipse(new SolidBrush(Color.FromName(mycolor)), e.X, e.Y, 4, 4);[/code] If the color name isn't valid, you get black.

Member Avatar for Momerath
0
64
Member Avatar for deucalion0

I'd try turning on double buffering for the form, and using SuspendLayout/ResumeLayout on the pictureboxes (suspend them all before doing the move, resume them after). You could also try suspending and resuming layout on the form itself.

Member Avatar for Momerath
0
130
Member Avatar for Wattsits

Here is a C# translation: [code]private void MenuItem6_Click(Object sender, EventArgs e) { if ((this.PictureBox1.Image != null)) { ArrayList barcodes = new ArrayList(); BarcodeImaging.FullScanPageCode39(barcodes, this.PictureBox1.Image, 10); if (barcodes.Count > 0) { StringBuilder message = new StringBuilder(); message.Append("Found barcodes:" + Environment.NewLine); foreach (object bc in barcodes) { message.Append(bc.ToString() + Environment.NewLine); } MessageBox.Show(message.ToString(), …

Member Avatar for Wattsits
0
122
Member Avatar for TheDocterd

Read this about [URL="http://msdn.microsoft.com/en-us/library/aa730869%28VS.80%29.aspx"]Application and User settings[/URL]

Member Avatar for TheDocterd
0
88
Member Avatar for cheapterp

Make the query [code]SELECT ActiveStatus, Count(ActiveStatus) FROM tblUserData GROUP BY ActiveStatus[/code] Your front end script can then get which status the row is and how many times it occurs.

Member Avatar for Momerath
0
181

The End.