2,157 Posted Topics
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: [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. | |
Re: I love that headline, since they explain it in the 2nd paragraph. Defy explanation indeed. | |
Re: 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 … | |
Re: Sounds like they've set it up wrong. Not being a system admin, there isn't much else I can add. | |
Re: 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 … | |
Re: 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 … | |
Re: Cheap and fast method is to pad the text with spaces on both sides (to keep it centered). | |
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 … | |
Re: 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. | |
Re: [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 … | |
Re: It's placing a tab between each column of the DGV. | |
Re: Let's see what you have | |
Re: 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 … | |
Re: [code]String myString = "omaha nebraska weather 2400"; int myInt = Int32.Parse(myString.Split(' ').Last());[/code] | |
Re: 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). | |
Re: [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 :) | |
Re: If you have no idea what to do and this is your final project, you might want to consider another field of study. | |
Re: 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. | |
Re: 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. | |
Re: [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 … | |
Re: SelectedIndexChanged fires when you change tabs. | |
Re: 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, … | |
Re: 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 … | |
Re: 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. | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: You can only add references to managed code DLLs. If you are using DLLImport, it's not a managed DLL. | |
Re: What tax do you pay if your income after deductions is exactly 20000? | |
Re: use Regex.Replace, as in [code] string newstring = rgx.Replace(oldstring, String.Empty);[/code] | |
Re: Yes you can, except you have mis-matched [B]{}[/B] in your example. | |
![]() | Re: 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 … ![]() |
Re: What does the LoaderException property say? | |
Re: Did you try removing the |dataDirectory|\\ portion? What error did you get? | |
Re: [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 :) | |
Re: What happens when you have "(Test)Word(Broken)"? | |
Re: [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] | |
Re: Since they are static methods you just use the class name followed by the method: [code]InputUtility.GetDouble(...)[/code] | |
Re: 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. | |
Re: You have no control with the name 'Label1' is what that means. | |
Re: 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. | |
Re: Running in debug mode? | |
Re: [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 … |
The End.