2,157 Posted Topics

Member Avatar for bhagawatshinde

First question I have to ask is what is taking you so long to create the files? I just ran a test and was able to create 10,000 files in less than 4 seconds.

Member Avatar for Ketsuekiame
0
100
Member Avatar for berwick53

Line 21 you declare the method [I]Addtion[/I]. Notice that the accessors are 'public'. Now take a look at the method [I]Main[/I]. Its accessors are 'static'. This is where your problem lies. Methods that are static are used by using the class name and the method. Using your code as an …

Member Avatar for Momerath
0
160
Member Avatar for zachattack05

You need to explain more why you need a table that references both tables A and B, but doesn't link records in A and B.

Member Avatar for lolafuertes
0
214
Member Avatar for tubby123

[QUOTE=griswolf;1612602]What is X in your code?[/QUOTE] I'd question the use of global values X, Y, l1, and l2 (that is a lower case L). While this function might work for one specific example, it's not very reusable and poorly designed.

Member Avatar for Momerath
0
177
Member Avatar for ithelp

I love that headline, since they explain it in the 2nd paragraph. Defy explanation indeed.

Member Avatar for Ancient Dragon
-1
518
Member Avatar for codeholic

You do realize that 55 numbers taken 5 at a time is 3,478,761 combinations? Or did you mean that it needs to select one number from column 1, one number from column 2, etc? If so, then you have 161,051 combinations. That's a lot for one listbox. Could you explain …

Member Avatar for Momerath
0
531
Member Avatar for z_zendegi

Sounds like they've set it up wrong. Not being a system admin, there isn't much else I can add.

Member Avatar for Momerath
0
98
Member Avatar for selvavijay1987

Need a little bit more before I can offer a solution :) Let's say we have 4 points located at (0,0), (0,1), (5,5) and (5,7) {Points 1 through 4, respectively}. First time we'd find that Points 1 & 2 are closest, so we 'merge' them into Point (1,2). Next we'd …

Member Avatar for selvavijay1987
0
231
Member Avatar for DeathEater

If you must call it from the AddForm then you'll need to pass a reference to the main form to the AddForm. The easiest way to do this is to create a new constructor in AddForm that takes a mainform parameter and save it. In general this is a bad …

Member Avatar for DeathEater
0
122
Member Avatar for shelly1234

Cheap and fast method is to pad the text with spaces on both sides (to keep it centered).

Member Avatar for Momerath
0
151
Member Avatar for Momerath

As a companion article to my [URL="http://www.daniweb.com/code/snippet349081.html"]Permutation Generation[/URL], I now present Combination generation. This snippet will do a lazy generation of the combinations of a set of objects. Each combination has a grouping size (number of items in each combination). If you need a different grouping size, you'll have to …

Member Avatar for codeholic
2
1K
Member Avatar for spoonlicker

I once worked for a man who said "If you call yourself a software engineer you better have some engineering background". He rejected peoples resumes based on this thought.

Member Avatar for Fareena.B
0
485
Member Avatar for Mavericks

[QUOTE=Mavericks;1609477]What does priorities of the vertices(distances) added to the SPT are nondecreasing mean?[/quote] It means that the priorities aren't negative. [QUOTE=Mavericks;1609477]Does it mean distance s-v-t is greater than s-v as only the edge weight or distance is positive ? So, it cannot decrease and can only increase.[/quote] Almost, it means …

Member Avatar for Mavericks
0
502
Member Avatar for pseudorandom21
Member Avatar for fashxfreak
Member Avatar for tubby123

I think you are confused because you are considering the lists as 2 separate lists, when they are actually more like a Y shape. For example, let's take these as the two lists: List 1 = 1->2->3->5->10 List 2 = 4->7->3->5->10 So following your steps we get: Step 1: X …

Member Avatar for tubby123
0
164
Member Avatar for pseudorandom21

[code]String myString = "omaha nebraska weather 2400"; int myInt = Int32.Parse(myString.Split(' ').Last());[/code]

Member Avatar for pseudorandom21
0
153
Member Avatar for zachattack05

It does return a value, the reference to the class you just constructed. A constructor can return nothing else (or it's not a constructor).

Member Avatar for zachattack05
0
70
Member Avatar for sherinpoulose

[QUOTE=Mitja Bonca;1608481]1st of all, dataSet does NOT have any rows. DataSet is only a collection of dataTables.[/QUOTE] I believe he's using 'data set' in the mathmatical meaning, not DataSet the class :)

Member Avatar for sherinpoulose
0
1K
Member Avatar for ruchi18

If you have no idea what to do and this is your final project, you might want to consider another field of study.

Member Avatar for emond
0
232
Member Avatar for BlueNoteMan

since you didn't post all the code it's hard to tell, but I'm guessing the the line "Cashflow cf" is in a method. This makes 'cf' only available to that method. Post more code.

Member Avatar for BlueNoteMan
0
290
Member Avatar for apanimesh061

No, C# is not recommended for these things. You can do them (MS released a OS written in C#) but there are issues with .NET that can occur when you make system software (has to do with versioning and the way .NET loads assemblies) on Windows based systems.

Member Avatar for WildBamaBoy
0
213
Member Avatar for vaishnu

[code]byte a = 23; byte v1 = (byte)(a / 10); byte v2 = (byte)(a % 10);[/code] If you mean 0x23 (which is different than just plain old 23) then change the number 10 to the number 16 or you can do this: [code]byte a = 0x23; byte v1 = (byte)(a …

Member Avatar for ddanbe
0
149
Member Avatar for DeathEater
Member Avatar for jmurph333

Get the graphics object of the form (this.CreateGraphics()) then use the [URL="http://msdn.microsoft.com/en-us/library/system.drawing.graphics.drawline.aspx"]DrawLine()[/URL] method. You'll need to put the line drawing in the Forms Paint event, otherwise resizing or moving another form over the form will erase the line (Things drawn on the form are not part of the form itself, …

Member Avatar for Momerath
0
113
Member Avatar for SaNa IT

Instead of using Access, take a look at [URL="http://www.microsoft.com/sqlserver/en/us/editions/express.aspx"]SQL Server Express Edition[/URL]. Since it's an actual server, it's a lot easier to share than a file based database. You can host IIS and SSEE on your own computer if you want. If you are having computers connect remotely, you'll need …

Member Avatar for Momerath
0
135
Member Avatar for zachattack05

Normally I'd see this done with serialization in the C# world, this looks like C code :) The only issue I have is the hard coded lengths in lines 17/18, but you have to have them for something like this.

Member Avatar for skatamatic
0
2K
Member Avatar for pivotcity

[QUOTE=hericles;1606926]Your simplest solution is to wrap that section in a try/catch block where the exception triggers a console message prompting the user to try again. Or first check the string only contains numbers before calling the parse command.[/QUOTE] I disagree, the simplest solution is to use [URL="http://msdn.microsoft.com/en-us/library/f02979c7.aspx"]Int32.TryParse()[/URL]. Using exceptions for …

Member Avatar for pivotcity
0
163
Member Avatar for bribissell

both compJapaneseLang and userLang are string arrays, but you treat them like they are not. Try changing your line 15 to[code]if (userLang[0] == compJapaneseLang[i]) [/code] There is no need to call ToString on a string, or use GetValue to index an array, or to call ToLowerInvariant when you know that …

Member Avatar for bribissell
0
325
Member Avatar for zachattack05

First problem: Add a boolean field to the item table to indicate if the item is discontinued and adjust your SQL code to allow for it. Second problem: Price should be in it's own table with FK to item table. It should have item #, start date, end date, and …

Member Avatar for jbrock31
0
97
Member Avatar for MagnetoM

Find one you are interested in, download the code, look to see if they have a bugs/features list, fix/add bug/feature, submit code.

Member Avatar for Momerath
0
149
Member Avatar for arsalanghouri

Change lines 6-13 to read: [code] decimal maxValue = (decimal)cmd.ExecuteScaler();[/code] Yep, just the one line. This is for numeric data, if another type, change the (decimal) to whatever type it is.

Member Avatar for Momerath
0
153
Member Avatar for MagnetoM

To show you that you can add the same handler multiple times (lines 86,87 and 91,92) and that if you remove the handler, it only removes one (line 88 and 93). You have to remove it as many times as you added it if you don't want it to handle …

Member Avatar for Momerath
0
121
Member Avatar for WildBamaBoy

You are going to have to break it up into chunks and send them that way, just like FTP does. Default buffer size is 4k, so I'd use 4k chunks.

Member Avatar for WildBamaBoy
0
409
Member Avatar for mohana88

You can only add references to managed code DLLs. If you are using DLLImport, it's not a managed DLL.

Member Avatar for mohana88
0
8K
Member Avatar for Renzeeks
Member Avatar for complete

use Regex.Replace, as in [code] string newstring = rgx.Replace(oldstring, String.Empty);[/code]

Member Avatar for kvprajapati
0
176
Member Avatar for kapojian
Member Avatar for Momerath
0
108
Member Avatar for Falcon25

You need to consider what it means to factor a number (and in this case, prime factor a number). Once you understand that you'll need: [LIST] [*]A loop [*]A way to test if a number is a factor [*]A way to remove the factor from the number you are trying …

Member Avatar for Falcon25
0
231
Member Avatar for apanimesh061
Member Avatar for MagnetoM
Member Avatar for MagnetoM
0
201
Member Avatar for prvnkmr194

[QUOTE=ddanbe;1594728]I'm not a native English speaking person, so please explain what you mean by the above sentence.[/QUOTE] I am and I need it explained :)

Member Avatar for ddanbe
0
146
Member Avatar for johang_80
Member Avatar for yousafc#

[code]public void SetLable1(string connString) { int totalCustomer = 0; string sql = "SELECT COUNT(*) FROM studentinfo"; using (SqlConnection conn = new SqlConnection(connString)) { SqlCommand cmd = new SqlCommand(sql, conn); try { conn.Open(); totalCustomer = (Int32)cmd.ExecuteScalar(); } catch (Exception ex) { Console.WriteLine(ex.Message); } } label1.Text = totalCustomer.ToString(); }[/code]

Member Avatar for yousafc#
0
269
Member Avatar for scrivomcdivo

Since they are static methods you just use the class name followed by the method: [code]InputUtility.GetDouble(...)[/code]

Member Avatar for bribissell
0
1K
Member Avatar for leo88

Since it is a query, why would you perform line 4 (ExecuteNonQuery)? and it would be [icode]int count = (int)AccessDb_Cmd.ExecuteScalar();[/icode] but you'll have to set the [i]command[/i] parameter of the [b]AccessDb_Cmd[/b] first.

Member Avatar for leo88
0
154
Member Avatar for kapojian
Member Avatar for vaishnu

Does it have to be done in C#, as the link you gave provides both the C source to do this and an executable to do it. Looking at the C source (and the description from the link) it doesn't look too difficult.

Member Avatar for vaishnu
0
267
Member Avatar for vincezed
Member Avatar for qwesr

[QUOTE=qwesr;1594245]Is there any way to figure out were it will move without having to do making time consuming functions that convert the percentages to ratios then make many random functions and a bunch of if-statements to see weather it will move right or left.[/QUOTE] Sure, but it has nothing to …

Member Avatar for Momerath
0
150

The End.