2,157 Posted Topics
Re: They have a FAQ with how to install it [URL="http://developer.gnome.org/gtk-faq/stable/c192.html"]here[/URL] | |
Re: Not sure what the issue is. Just limit the dynamic method to n items in the proposed solution. If it's over n, you reject it as a failed solution. | |
Re: When you run Visual Studio in Debug mode it makes a copy of the database (if it's a file based one) and uses that to do the adds, updates, etc. This is so you can always start from the original database to figure out what is wrong. Look in the … | |
Re: Sounds like you have a lot of work to do. You'll need to read up about P/Invoke as you'll have to use the windows system DLLs to perform most of what you want to do. Good luck with your project. | |
Re: What you are missing is in line 29, this part [B]celsius * (9/5 + 32)[/B]. Since all those values are integers, it's going to do integer math on them. What this means to you is that 9/5 = 1. The other problem with that line is that you put () … | |
Re: The Thread.Sleep() will still lock the UI (you are telling it to sleep, after all). If you want things to happen on a schedule use a timer. | |
Re: It's a poor design to pull the password from the database into your application. Send the userid/password to the database and have it return if it is a valid combination. No data readers, just the ExecuteScaler is needed, you are almost there with it. | |
Re: 1) Yes. The method GetNumberOfSeconds returns an integer which is being assigned to totalSeconds. 2) totalSeconds is being used as a parameter (a value sent to a method). And yes, leftOverSeconds is the amount of seconds that aren't a full hour. 3) Techinically it's dividing it by NUMBER_OF_SECONDS_IN_AN_HOUR which you … | |
Re: The () signify that this is a method. Without the (), in C# at least, it's a property (lower case property, upper case Property has a different meaning). Recto is an instance variable. It holds an instance of the Outside class. Recto.Display() is a call to the method Display of … | |
Re: First thing I'd do is separate the read and the setting of the parameter in line 24 so I could put a breakpoint there and see what is actually being read. Also, how many characters are allowed in the table itself? Splitting is the easy part, btw :) | |
Re: The problem is most likely with the contents of fname. Can you show us some samples that fail (and might as well show filepath too). | |
Re: It is converting the type of (in line 18/19) roomLengthInches into a double instead of an int. It needs to do this otherwise the division would be an integer division and would give wrong answers. For example, if roomLengthInches is anything less than 12, the result would be 0 (zero) … | |
Re: Yes you can, just declare the class as static and all the methods/properties as static. A static class is instantiated when the system decides it wants to do it but always before your first use of the class. You don't have to worry about when that happens, it just works … | |
Re: As I said on the other forum, once you set the boolean value to false [B]IT NEVER CHANGES[/B]. All records after that one will be treated as if they passed the if statement check. You need to rethink your logic. | |
Re: It will work but your threads will go out of scope as soon as the for statement is done. You are also starting them as foreground threads which means your program won't close until they are done. If that's the behavior you want, then you are good. But I'd look … | |
Re: The videos on that site are being played with [URL="http://www.longtailvideo.com/players/jw-flv-player"]JW Player[/URL]. Since it's open source you can just pull the code out that actually plays the video and convert it to C#. | |
Re: You shouldn't close and reopen the connection each time. You should check if it is open and if it isn't, open it. Also, database connections do use unmanaged resources (anything dealing with the system software does) and will need to have the Dispose() method called on it. | |
Re: Memory has nothing to do with it. It has to do with ease of change and reusability. Take your Log.dll for example. If you wrote it well, you could reuse it in other programs without having to write any new code. | |
Re: In the designer, or in your Form1 constructor, set the KeyPreview property to [B]true[/B]: [code]public Form1() { InitializeComponent(); this.KeyUp += new KeyEventHandler(Form1_KeyUp); this.KeyPreview = true; }[/code] | |
Re: use code tags as your code is impossible to read this way. You also don't indicate where the problem is | |
Re: Use [URL="http://msdn.microsoft.com/en-us/library/system.string.split.aspx"]String.Split[/URL] to get them into separate strings. | |
Re: Sounds like a plan. Is there a question in there somewhere or are you just sharing? | |
Re: [code]Console.Write("Enter command =>"); String command = Console.ReadLine(); int i = 0; if (command.Length > 1) { Int32.TryParse(command.Substring(1,1), out i); } switch (command[0]) { case 'm': menu(); break; case 'p': PrintPuzzle(); break; case 'n': shuffle(i); break; case 'r': if (i <= numCols) moveRowRight(i); break; case 'c': if (i <= numRows) moveColDown(i); … | |
Re: Bitmap has a save method, so you could do something like this:[code]Bitmap b = CropBitmap(...); b.Save("C:/myfile.bmp");[/code] | |
Re: Add a variable to your form[code]labelRightEdge = myLabel.Location.X + myLabel.Size.Width;[/code] Then add either a Layout, Resize or SizeChanged event handler to your label. Doesn't matter which one, they all are fired when the label needs to change size. Put this in the handler:[code]Point p = myLabel.Location; p.X = labelRightEdge - … | |
Re: you'll want to use textBox1.Text otherwise you'll just get the class name as your values. You'll need other parameters for the other controls, and I have no idea what types most of the other stuff is. You'd also be better off learning to use [URL="http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbparameter.aspx"]Parameters[/URL]. It will save you from … | |
Re: The WPF Listview is under System.Windows.Controls, so it is not the same as the Winforms Listview. | |
Re: It does work, you just didn't pay attention to the fact that it returns a value. DateTime is immutable, and any method to modify it returns a new DateTime, it does not alter the one you are using. | |
Re: Duplicate post | |
Re: [code]myDateTimeValue.ToString("yyyy-MM-dd hh:mm:ss:fff");[/code] | |
Re: Here is one of your lines [code]float takeHomePay = 28000 * (9 / 50) * (1 / 10) * (3 / 5);[/code] Your problem is that all your numbers are integers, so it does integer math on them. It then converts the result into a float. So you have things … | |
Re: Since the criteria aren't mutually exclusive, you'll need to use just if statements. What I mean by this is a call can be started after 6, and be longer than 60 minutes. If you use if/else you'll only get one of these. I see no where in this that a … | |
Re: Really? You think the original poster is still looking for code after 3 years? | |
Re: Input from the console is a string, so you'll have to accept it as one and then convert it.[code]int x; String input = Console.ReadLine(); if (Int32.TryParse(input, out x)) { // x can be converted to a number, do whatever you need to do here } else { // x can't … | |
Re: Two things: 1) [I]return[/I] ends the execution of the current method and if that method has a return type, tells it what value to return. 2) Both of your parameters are integers, so the division in your return statement is integer division. It is then converted to a double (the … | |
Re: Process.Start returns a Process object. Use that to kill the process. | |
Re: Use code tags, that's impossible to read. | |
Re: What, exactly, do you want to have happen. Does the method run on that event? Is it supposed to change the state of the control? Does it change the state of the control? Does the control reflect the changed state? | |
Re: If they want to type something into your form, it has to go somewhere. You can always set the focus to the textbox so they don't have to click on it. There are also other controls you can use for input. Really don't know what the problem is here. | |
Re: What are the data types for Emp_ID and First_Name? | |
Re: References are included in the .csproj file. Or are you refering to web references? If you don't have any, then there is no references.cs. | |
Re: I don't think neural networks will help with this, you are looking more for knowledge based systems. Here is an [URL="http://www.codeproject.com/KB/architecture/commonkadsx.aspx"]article[/URL], but it uses CLIPS as the language. You have a lot of learning to do first, before you can even begin to start. | |
Re: Put all that code (minus the Sub/End Sub lines) into the Form Load event. | |
Re: You've declared a placeholder for the byte values (line 3), but didn't actually allocate them. Change it to [icode]byte[] Data = new byte[256];[/icode]. No idea what Receive is supposed to do, so can't help you with that. | |
Re: This isn't something that can be answered in a single post. I'd start at [url]http://www.facedetection.com/[/url] and get to reading. | |
Re: You might want to take a look at quad-trees. | |
Re: Remove the Age field. You have their birthday, calculate it yourself. You might want to read the pages [URL="http://msdn.microsoft.com/en-us/library/bb655891%28v=VS.90%29.aspx"]here[/URL]. Doing a full database system for you is a little much. | |
Re: Are you running on Vista or Win7? Do you install to the Program Files directory? | |
Re: I'm not sure what you are asking here. I created a form with a DateTimePicker and a label. I set the format as you did above and added a method to the DateTimePicker.ValueChanged event: [code]private void dateTimePicker1_ValueChanged(object sender, EventArgs e) { label1.Text = dateTimePicker1.Value.ToString(); }[/code] If you do this you'll … |
The End.