2,157 Posted Topics

Member Avatar for choover12

Exactly what would it be splitting the string on? No, you can't split a string using no character. I would really like to see an example of what you thought would happen.

Member Avatar for kvprajapati
0
326
Member Avatar for DaveTran

It's known as loop unrolling (or [URL="http://en.wikipedia.org/wiki/Loop_unwinding"]loop unwinding[/URL]). One thing you can do is move the [icode]int i1[/icode] to outside the loop. I believe the built in optimizer will do that for you, but it doesn't hurt. So your code becomes [code]int i1; int i2; int len = batchVertices.Length; for …

Member Avatar for Momerath
0
142
Member Avatar for jlovesfishiee

I'm assuming this is inside a form and you have [icode]using System.Windows.Forms[/icode] at the top. I'd retype the line and see what it says. Also, instead of that clumsy tryparse statement, use [code]else if (Char.IsNumber(e.KeyChar) == false) {[/code]

Member Avatar for Mitja Bonca
0
391
Member Avatar for Martje

By default convert wants the DateTime in MM/DD/YYYY format. Do you have exception handling catching an error? Secondly, add [icode]datatTimePicker1->Refresh();[/icode] after you set it.

Member Avatar for Momerath
0
88
Member Avatar for Phil++

To expand on what Cale said, the second parameter must be a filename, not a directory (though it can include a directory).

Member Avatar for Momerath
0
71
Member Avatar for anurag09

Using a third variable is so passe for integer values: [code]int a = 1; int b = 5; a = a ^ b; b = a ^ b; a = a ^ b; [/code]

Member Avatar for Momerath
-2
127
Member Avatar for Sarah Smith

The array you are copying into has to be allocated before you do the copy: [icode]Dim myTargetArray As Array = Array.CreateInstance(GetType(String), 15)[/icode] for example.

Member Avatar for lolafuertes
0
101
Member Avatar for Dersev

Once you have built your list you assign it as the datasource for the ListBox:[code]listBox1.DataSource = urls;[/code]

Member Avatar for Dersev
0
155
Member Avatar for sharkpit

a,b,c,d are instance variables and you are treating them like they are class variables. You either need to instantiate an object of type RegularMatrix or declare them as static.

Member Avatar for Mitja Bonca
0
125
Member Avatar for DioRani

[code]public String GetLastWord(String input) { String[] parts = input.Split(new char[] {' ', '.', '?', '!'}, StringSplitOptions.RemoveEmptyEntries); return parts[parts.length-1]; }[/code]

Member Avatar for Mitja Bonca
0
169
Member Avatar for AndrevdBerg

You could try adding [icode]SqlConnection.ClearPool(Conn)[/icode] or [icode]SqlConnection.ClearAllPools[/icode] before your open statement.

Member Avatar for AndrevdBerg
0
3K
Member Avatar for erum
Member Avatar for Momerath
0
161
Member Avatar for johnt68

When you say the name is a string, do you have a list of allowable (or not allowable) characters? How many digits is the account number (depending on length there are different methods to check if it is all digits). Same for the password, what characters are allowed?

Member Avatar for johnt68
0
117
Member Avatar for SkyVValker

You need to create a variable to hold the command and build it. Then you can use the exec function to execute the variable: [code]declare @sql varchar(200) select @sql = 'select tablename.' & @myColumnName & ' from tablename' exec @sql[/code] Please note that this is not a full procedure, you'll …

Member Avatar for SkyVValker
0
60
Member Avatar for NewOrder

You were good up until you hit: [QUOTE=Antenka;1392457]this change might resolve the error: [code=c#] IchecherMove[ , ] checker = new IchecherMove[9 , 9]; [/code] but you cannot instantiate interfaces. So we need some workaround ..[/QUOTE] You can declare arrays of interfaces, as it's not instantiating an interface, it's just creating …

Member Avatar for NewOrder
0
1K
Member Avatar for nssltd

Add this to your project: [code]public static class Methods { public static String Limit(this string s, int n) { return s.Substring(0, n > s.Length ? s.Length : n); } }[/code] This is an extension method that allows you to limit the length of a string. You can then just do …

Member Avatar for nssltd
0
131
Member Avatar for Jimbomcdeans

Yes there is, you can read all about the [URL="http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx"]SerialPort[/URL] class right there.

Member Avatar for Jimbomcdeans
0
131
Member Avatar for jay_el_em

Yes, you can do that. In the debugger, what does it say the value of accessName is? You can all look at the [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparameter.aspx"]SQLParameter[/URL] class which will make your code safer from SQL Injection attacks if you allow user input anywhere.

Member Avatar for Momerath
0
88
Member Avatar for mikesowerbutts

It sounds like the pdf library is using unmanaged resources and you aren't disposing of the object properly. Or they aren't disposing of the unmanaged resources. Does PDFDocument have a close() or dispose() method?

Member Avatar for mikesowerbutts
0
1K
Member Avatar for vedro-compota
Member Avatar for vedro-compota
0
178
Member Avatar for little.daffodil

[code]using (StreamReader sr = File.OpenText("filenamehere")) { String input; while ((input = sr.ReadLine()) != null) { //do stuff with line } }[/code] If you are going to be concatenating text, use StringBuilder to do it.

Member Avatar for little.daffodil
0
262
Member Avatar for gusadolfo

If you don't want to deal with P/Invoke then I'd download [URL="http://code.google.com/p/cassia/"]Cassia[/URL]

Member Avatar for gusadolfo
0
90
Member Avatar for prakash2813

Read [URL="http://www.dotnet247.com/247reference/msgs/41/207281.aspx"]this[/URL]

Member Avatar for Momerath
0
76
Member Avatar for judithSampathwa

You don't want to select @empid, you want to select the column in your table that contains the ID. @empid should be set to the email address of the Employee.

Member Avatar for judithSampathwa
0
160
Member Avatar for Smith5646
Member Avatar for Netcode
0
233
Member Avatar for zachattack05

Have you looked at the inner exception? Not sure if this will help, but it's the first place I'd look.

Member Avatar for zachattack05
0
203
Member Avatar for erum
Member Avatar for jlovesfishiee

[code]string[] parts = textBox1.Text.Split('.'); foreach (string str in parts) { int myInt; if (Int32.TryParse(str, out myInt)) { // Do something with the value in myInt } else { // the string wasn't an integer, can do something if I want } }[/code]

Member Avatar for jlovesfishiee
0
119
Member Avatar for jigglymig1

When properly designed, Implementations would change more often than Interfaces.

Member Avatar for darkagn
0
82
Member Avatar for basics_of_sena

Can you give an example of the type of questions they asked as that will help fine more questions like that one :)

Member Avatar for apines
0
290
Member Avatar for choover12

Works fine for me, are you sure you aren't doing something to Name before you check it?

Member Avatar for choover12
0
167
Member Avatar for vedro-compota

[code]string[] mass = new string[this.LevelNumber];[/code] You tell a variable it will be an array [B]([icode]string[] mass[/icode])[/B]. Then you assign space to hold the values [B]([icode]= new string[this.LevelNumber];[/icode])[/B]

Member Avatar for vedro-compota
0
139
Member Avatar for jdm

Read [URL="http://www.switchonthecode.com/tutorials/csharp-tutorial-simple-threaded-tcp-server"]this[/URL]

Member Avatar for jdm
0
129
Member Avatar for choover12

[code]float result; if (Float.TryParse(myString, out result)) { // parse was successful and result contains the parsed value } else { // parse failed }[/code]

Member Avatar for Dolly.Oswal
0
118
Member Avatar for Phil++

You'll have to open a different file to write to, not the same one as the original. Once done you can delete the original and rename the 'new' file.

Member Avatar for Unhnd_Exception
0
132
Member Avatar for radnam

What you want is database Replication. You can read all about doing this with SQL Server right [URL="http://technet.microsoft.com/en-us/library/ms151198.aspx"]here[/URL].

Member Avatar for Momerath
0
138
Member Avatar for etftw

You want [URL="http://www.microsoft.com/sqlserver/2008/en/us/compact.aspx"]SQL Server Compact Edition[/URL]. It does everything you want :)

Member Avatar for etftw
0
323
Member Avatar for Wahoo

1) Look at the degree requirements for the four-year university, and take all the courses you can that are general requirements (English, History, Psychology, etc.) and get them out of the way. This will allow you to focus on your major when you transfer (and will cost less money). 2) …

Member Avatar for theonly
0
150
Member Avatar for jugnu

In your second code example you create a new frmEmployee (line 3). This new form is not the same as the initial form, so why do you think the initial form would have any data from it?

Member Avatar for Momerath
0
113
Member Avatar for tantii

[QUOTE=oredigger;1386259]First a couple of observations... -By calling [ICODE]randomnumber.Next(1, 7)[/ICODE] you will receive a "random" number whose minimum value is 1, and whose maximum value is 7. [/QUOTE] Actually, the upper bound is exclusive, so the number is from 1 to 6 ([URL="http://msdn.microsoft.com/en-us/library/2dx6wyd4.aspx"]Random.Next(Int32, Int32)[/URL]).

Member Avatar for Momerath
0
331
Member Avatar for tom_cat

Tunneling usually involves connecting to one machine on an open port and that machine forwards your data to a third machine on a different port. For example, lets say you want to connect to a chat server that uses port 7000 to communicate with. But you are at work, and …

Member Avatar for oredigger
0
2K
Member Avatar for Pundia

It sounds like you are reusing your same Point object in multiple places. How are you getting the Points?

Member Avatar for Pundia
0
213
Member Avatar for buster2209

Yes, but you'll have to use a windows function to do so. Add this where you need it [code]private const int WM_VSCROLL = 0x115; private const int SB_BOTTOM = 7; [DllImport("user32.dll", CharSet = CharSet.Auto)] private static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);[/code] You can then scroll …

Member Avatar for buster2209
0
122
Member Avatar for celiz45

Isn't this what [URL="http://folding.stanford.edu/"]folding@home[/URL] is doing? It's more complex than something you'll find posted on a forum like this.

Member Avatar for swinefish
0
66
Member Avatar for chupoi
Member Avatar for Diamonddrake

I suspect it is something the 3rd party DLLs are doing. You can compile 64 bit applications on a 32 bit machine with no issues (at least I've never had any).

Member Avatar for Diamonddrake
0
105
Member Avatar for S.IDK

BigInteger will give you the required precision, but 50^99 isn't 1.97654296816219383545704208846E+172, it is 15777218104420236108234571305655724593464128702180460095405578613281250000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000 or 1.577721810442023610823457130565572459346412870218046009540557861328125E+168 The built in calculator uses it's own types that aren't available in VB.NET

Member Avatar for Momerath
0
118
Member Avatar for dineshcbe

[url]http://www.switchonthecode.com/tutorials/csharp-tutorial-simple-threaded-tcp-server[/url]

Member Avatar for Momerath
0
100
Member Avatar for Waseem Siddiqui
Member Avatar for oredigger

You have the sender object, cast it to a button and look at the Text property and do whatever you need to look up the age, hometown, etc.

Member Avatar for oredigger
0
158

The End.