2,157 Posted Topics
Re: Normally you'd get a resource using [icode]myProject.Properties.Resources.<resourcename>[/icode]. Are you including the resource file in the executable? I'm not sure if the Express edition automatically uses the /resource compile option, you might need to use resgen.exe | |
Re: You wouldn't want to use a static lock with a non-static object. Remember that all objects of that type will be locked when one thread tries to access them. | |
Re: Create a structure that holds two arrays and pass back the structure. | |
Re: Use [noparse][code] [/code][/noparse] tags. It makes it a lot easier to talk about your code when you can refer to line numbers and it actually has some formatting to it. And you have your loops wrong. There won't be any data to write they way you've set it up. | |
Re: Have you tried using the SQL Server Data Transformation Services (DTS) Import Wizard or the SQL Server Import and Export Wizard? Not sure if they will let you select columns/rows but it's worth a try. | |
Re: You'll have to convert them: [code]int[] myInts = new int[number.Length]; for(int i = 0; i < number.Length; i++) { if (Int32.TryParse(number[i], out myInts[i]) == false) { // conversion failed, it wasn't an integer } }[/code] | |
Re: Employee, patient, doctor and pharmacy all 'have an' address, so I'd just have an address ID in their tables linking to the address table. I would have admission -> treatment be a 1:M relationship, and History be a 1:M to admission. Prescription would be Treatment -> Prescription in a 1:M. … | |
Re: imgSet is a 2D array and you are treating it like a 1D array in both lines 7 and 10. | |
Re: It's a decimal, and you covert it by doing this [icode]int myInt = (int)myUpDown.Value;[/icode]. Note that if you allow values outside of the normal Int32 range the value you get will be wrong :) | |
Re: Depends on how much data is in the table. If you filter in your code, all the data has to be transferred from the server to your application. Not a big deal for 20 rows. It is a big deal for a million rows. | |
Re: What you need to remember is that factors come in pairs and that you only need to check up to the square root of the number for factors to get them all (think about it a bit). So, you need to [code=text]Loop i from 1 to Square root of number … | |
Re: Old [URL="http://www.mssqlcity.com/Articles/Adm/SQL70Roles.htm"]tutorial[/URL] and they call them roles now, unless you are talking about server clusters. | |
Re: You'll need either addbefore (easiest) or addafter to sort. [code]Create a new empty list. Go through each item in your list Find first item in new list that is greater than current item. Add current item before this item New list is now in sorted order.[/code] This isn't the fastest … | |
Re: When something implements IEnumerable it needs a method called GetEnumerator that returns and IEnumerator object. This object is used by foreach and LINQ method to iterate through the collection. The syntax of [icode]IEnumerable.GetEnumerator()[/icode] is what as known as an explicit implementation of the interface. The main reason to do this … | |
Re: You create a process object (line 2) and set some parameters and then execute "cmd.exe" without using the process at all (line 7 call to static Process.Start). Line 8/9 there is nothing running under this process object so these commands have nothing to do so you get the error. You … | |
Re: Where exactly is it hanging? Have you run the code in the debugger and looked at the values of the variables? Have you single stepped through the code to see what was happening? | |
Re: Make randomizer a static class variable instead of an instance variable. What is happening is that all the generators are being created so fast that the seed value, which is based off the time, is the same. This causes them to all generate the same sequence. If you just have … | |
Re: Depends on how you invoke the thread, but normally yes. It isn't passed on to the main thread but it can bring your whole system down. | |
Re: Wherever you declare them, since it isn't in this code, just add [icode]= 0;[/icode] to the end. | |
Re: Nope. If you tell it they need to be sorted, it's going to sort them. You can always sort them yourself and then place them in the combo box however makes you happy. | |
![]() | Re: 1) They are text boxes on the form that are being used to display some data. 2) No, not unless you are willing to pay my consulting rates, and I don't think you can afford me. |
Re: You insert a record, then call fill before update? Why? The fill method clears out changes that haven't been committed to the database. | |
Why isn't mine showing? On my profile it shows a ? that you can click on to see the picture. Image size is 200x150 and 25k | |
Re: [URL="http://www.dependencywalker.com/"]Dependency Walker[/URL] | |
Re: I would average from the array. Having to go through the listview to get the values adds additional coding that just slows down the process. Also remember that since they are averages, divide by the number of students :) | |
Re: What's the question, as I don't see a question mark in there at all. | |
Re: [URL="http://www.connectionstrings.com/mysql"]Connection strings[/URL] | |
Re: I'd do it by sending an async message with a timeout. If you don't get a response back in time you'd assume the client is dead. pseudorandom21's suggestion would tell you if the client machine is pingable, but I don't think that is what you were asking. | |
Re: Don't put attendance in the events table, it's not part of the event. Create an events table, and an attendance table. The attendance table would have two columns: EventID and MemberID. Again, with the Race information you don't want to create columns for each race (what if you add more … | |
Re: If you want it easy, I'd stick with C/C++ for this kind of thing. You could do it in VB.Net or C# (or IronPython, etc.) but then you'd need to deal with the managed/unmanaged code differences. | |
Re: You run into the same problem on the server if they are background threads. Because they aren't closed (just ended) they leave the connection up until they timeout. If they are foreground threads then they block closing. You could attempt to close them and set a timeout to abort them … | |
Re: Your ray is technically a line, as is the edge of the bounding box. Check if they intersect and where. Then check if the intersection point is within the segment that is the edge of the bounding box. If it is, use the distance between two points formula to find … | |
Re: You never show Form2 so how does the date get set? | |
Re: In line 24 you are returning the elements of the node. [URL="http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.value.aspx"]Elements[/URL] don't have a Value (look at the chart under Element). | |
Re: You have a foreign key constraint on the table and there is no record of the key you are trying to insert. In other words, one of the columns in ORDER_DRIVER is a foreign key in Driver, and the value you are putting in ORDER_DRIVER doesn't exist in Driver. | |
Re: You just need to use [URL="http://msdn.microsoft.com/en-us/library/ms224424.aspx"]String.IndexOf(String, Int32, StringComparison)[/URL] | |
Re: 1. Male 2. 49 3. c)Almost Always - Actually always. 4. c)Almost Always - Actually always. 5. c)Almost Always - Actually always. 6. c)Almost Always - Actually always. I'm diabetic, what's in food is important to me :) | |
Re: Line32 should be [icode]for (int iRow = iSize; iRow > 0; iRow--) {[/icode] Line 34 should be [icode]for (int iColumn = 0; iColumn < iRow; iColumn++) {[/icode] | |
Re: the sender argument will tell you which button you pressed. You just need to cast it to a button type. | |
| |
Re: Don't insert the () and - in the database, they are formating, not part of the actual data. When you pull them from the database, apply formating to display. If the value is null (no number) then you don't display anything. | |
Re: You need to explain more what you expect. | |
Re: Have you taken a look at [URL="http://www.asp.net/mvc/tutorials"]this[/URL] page? If you check the security link, I suspect you'll find what you want. | |
Re: [QUOTE=shelexelex;1494171]Html is a web scripting language, it has no compiler, its not like a programming language that has a compiler and since its not have a compiler, it cannot be compiled. Its just a language that tells the browser how to display a particular information.[/QUOTE] Actually you could make an … | |
Re: DLLImport is for DLLs that weren't written in managed code. All you need to do is add the DLL to your project references, include a 'using' statement for the namespace and you can use what is in the DLL. | |
| |
Re: In your first form put something like this: [code]this.dataGridView1.Columns["ID"].Visible = false;[/code] It will hide the column but the data will still be there for you to use. | |
Re: You need to add the dll to the references. Right click references, select add and browse for the dll. |
The End.