2,157 Posted Topics
Re: Your sln file is corrupt or you are trying to compile this code targeting a framework before they added auto-properties. | |
Re: How fast do you want the player to move? Current rate (if the 60 frames a second is accurate) is 2400 pixels/second. Once you know that, it's simple math and a counter to keep the player at your set speed. | |
Re: Why yes there is. [URL="http://msdn.microsoft.com/en-us/library/gg145045.aspx"]MSDN[/URL] | |
Re: Asked and answered over [URL="http://www.daniweb.com/software-development/csharp/threads/369550/1588343#post1588343"]here[/URL], and it's a deep copy you want :) | |
Re: [icode]btnNode.Parent[/icode] holds the parent, but you have to set it before you add the button | |
Re: Here is your code reposted, with [noparse][code] [/code][/noparse] tags so we can actually read it:[code]namespace Assignment3 { class Converter { private int currency; public static void converter(int currency, int[] breakdown, int[] demon) { int diff = currency; int x = 0; while (diff > 0) { breakdown[x] = diff / … | |
Re: It looks like you are comparing each row to every other row. For 1,000,000 records this will result in 499,999,500,000 rows (that's almost 500 billion) and comparisons. That's a lot of time required there. Also, at a minimum size of 11 bytes per record (you don't need to store the … | |
Re: Try adding [icode]sw.Flush();[/icode] as line 78 | |
Re: We don't have enough information to normalize it. For example, FeePerMonth: Is this a standard rate for all classes or is does it depend on what class you are taking (Writing class is cheaper than Programming class, for example). What is Result? What does 1st Term represent (and 2nd Term … | |
Re: You need to think about what objects you might have to create. Off the top of my head I would have Car, RentalAgreement, Customer, Salesperson, Inventory (car collection). | |
Re: I use this extension method to perform deep clones of objects:[code]using System; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; public static class ObjectCopier { public static T Clone<T>(this T source) { if (!typeof(T).IsSerializable) { throw new ArgumentException("The type must be serializable.", "source"); } if (Object.ReferenceEquals(source, null)) { return default(T); } IFormatter … | |
Re: Yes you can. On SqlServer you'd do something like this: [code]CREATE TABLE Addresses( ChildID int, ParentID int, Address varchar(100), City varchar(100), State char(2), Zip varchar(9) Constraint PK_Addresses PRIMARY KEY(ChildID, ParentID) )[/code] | |
Re: 'perminuterate' is an array which means it has multiple values. Which one did you want to multiply 'lengthoftime' by? | |
Re: [QUOTE=TedMosby;1578617]I have to use this as we don't have SQL Server and can't do it all in Access as we don't have licences for that either (only certain people have it) [/QUOTE] More of a side note, but [URL="http://www.microsoft.com/express/Database/"]SQL Server 2008 R2 Express [/URL]is free and better than using Access. | |
Re: What do you expect to see in the textbox as there are at least a billion different ways of displaying numbers. Without knowing what you want, how can someone tell you how to get it? | |
Re: [code]if (v < 11) { if (v == 1) { v = 0; positioncheck = false; } else { v *= 50; } } else { int n = v / 10 - 1; position.Y += 50 * n; v -= 10 * n; v *= 50; }[/code] | |
Re: Where are you storing the references to the array of buttons? Do you want to be able to click on those buttons? Please explain, exactly, what you want to have happen when you click on button2. | |
Re: It was trying to load a type, 'readAud.singalAndFft' and failed to do so. TypeLoadException is thrown when the common language runtime cannot find the assembly, the type within the assembly, or cannot load the type. | |
Re: So what is the issue you are having? I created a class with a nullable DateTime, made an array of that class. Then I created an array of Strings with days of the week in them and did the code you have an had no issues. | |
Re: If you put the URL that you create into a web browser and try to view it you get "We're sorry, the page you requested cannot be found." So you aren't creating the URL properly. | |
Re: It's not a bad practice, it's probably the most common one around :) Yes, if the data is exported then imported *improperly* then you could experience loss of relations. Using VBA is a bad idea, probably why doing database stuff with it is a bad idea :) | |
Re: It sounds like you are using an unmanaged resource and not disposing of it properly. | |
Re: Catch the exception inside the for loop, not outside. | |
Re: in line 10 you use an attribute of loNode. Where did you set loNode to anything? | |
Re: [code]@"select * from student a inner join student contact b on a.studentno=b.studno where a.studno= ... [/code] From this is looks like you have two tables 'student' and 'student contact' that you are trying to join. If so, SQL does not like spaces in the names of tables so you'd have … | |
Re: This is a large and complex project that will require you to have extensive knowledge in multiple areas. I would start [URL="http://en.wikipedia.org/wiki/Acoustic_fingerprint"]here[/URL] and follow some of the open software links to see how they did it. | |
Re: what is the namespace in the files "ChatEngine.cs" and "IChatEngine.cs"? | |
Re: You have declared this as a function that returns a SqlCommand. No where in the code do you actually do this, so the compiler is complaining that it is possible to run this code and not get a SqlCommand back. I'm not sure if you actually want to return anything. … | |
Re: One of the features of using a random number generator is that it's repeatable. All you need to do is store the starting seed that you provide the generator and you'll be able to repeat exactly the same sequence of numbers. | |
Re: [icode]Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;[/icode] Replace the various 'my...' with the actual values. | |
Re: Based on the error, I'd say that [icode]System.Configuration.ConfigurationManager.AppSettings["database"][/icode] doesn't have valid userid/password in it. | |
Re: What it's trying to tell you is that the class MortgageData doesn't have a method named 'displayPayment'. Since it doesn't have one, you can't call it. Now I'm not sure what class your second block of code is in, but it does have a displayPayment method and if that was … | |
Re: When you use a DataTable and call the Update() method one of three things can happen: [LIST] [*]A row is added [*]A row is changed [*]A row is deleted [/LIST] The adaptor needs to know how to do all these things but you have not told it how, thus the … | |
Re: A PictureBox is a control and thus needs to be added to a form. You'll need to set the positions and size of the PictureBox before you add it to the forms control collection. | |
Re: Your varbinary only holds 1024 bytes (1KB) not 1MB. Are your images supposed to be over 1KB in size? | |
Re: You can't put a window in the forground that isn't visible. Reverse your code and show the window first, then set it to forground. | |
Re: Using your example, it would be[code]A myForm = new A(); A.ShowDialog(); // execution stops here until the user closes the form 'A' ...[/code] | |
Re: [code]Database=\\192.168.03.14\Database\SCHOOL.fdb;DataSource=192.168.03.14;[/code] Why do you have the source listed in both the database and datasource? You need to remove it from the database. You might need to remove the '\Database' or move it to the DataSource parameter, I don't have firebird to test. Also, next time, it would help if you … | |
Re: [code]for (int x = 2; x < 100; x++) { while (x % 2 != 0) { int y = 2; bool prime = true; do { if (x % y == 0) { prime = false; break; } y++; } while (y < x); if (prime) Console.WriteLine("{0} is prime!", … | |
Re: You've declared output1 as a jagged array ([][]) instead of a 2D array ([,]) but in line 16 you are trying to access it as a 2D array. I'd change output1 to a 2D array as you'll have more work to do if you want to use it as a … | |
Re: Use FileSystemWatcher and trap the [URL="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.onrenamed.aspx"]Rename[/URL] event | |
Re: Is the resource part of the class library? | |
Re: Windows Vista and Windows 7 consider the root directory of the C: drive to be a protected directory. Put the file somewhere else. | |
Re: [URL="http://download.oracle.com/docs/html/E10927_01/bulkcopy.htm"]Oracle Bulk Copy Classes[/URL] | |
Re: [code]Assembly asm = Assembly.GetExecutingAssembly(); Object myObj = asm.CreateInstance("Some.Object.Name");[/code] | |
Re: I'm currently reading 3 F# books (one of which is an updated version from F# 1.1 to F# 2.0). Doing things in F# takes a little getting used to (all values are immutable be default). Some of the ideas have carried over into my C# programming (no side effects!). I … | |
Re: From your posting:[code]if ((z==46) & (j==1.15))[/code] What is the value of 'j' here? Where did it get set to that value? Do you use 'j' anywhere else in your code? |
The End.