- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 24
- Posts with Upvotes
- 22
- Upvoting Members
- 16
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: It appears your data is actually an array (or list) of items; you can tell due to the square brackets: "PSQL": [ ... ] So, your structure should probably look something like this: Dictionary<string, List<Dictionary<string, string>>> That is, a dictionary with a string key and a list of dictionary (string, … | |
Re: Are you reading the database to get the current states of the seats before the code above is called? You would need to have a list of the seats that have already been taken. Then after line 4 in your code sample, you could check the user's selection against that … | |
Re: Hi, A couple of things to look at: 1 - In your function "MStudent" - what are you doing with the return value from this? Hint - check out how you are calling it. 2 - In the function "CalcAvrg" - take a closer look at how you are accessing … | |
Re: I was suspecting the same thing. Unless I'm missing something, in "getBook", you are re-using the "resultSet" variable, assigning it new results from getting the data on a single book. When you return back to the loop in "getAllBooks()", it's referencing the same "resultSet" variable, which a) contains the results … | |
Re: Can't do it your way - the "CellType" property is read only. If you are setting the columns in the designer, when you add a new column, you can specify the type from the drop-down. In code, if you are adding the columns by hand, you can do it this … | |
Re: From what perspective are you closing the forms? That is, are you trying to close all of the forms from the main form, or are you just trying to close a secondary form when you are done with it? As in, you open the second form, do some stuff, then … | |
Re: Enrique, It's because you declare the class "DataStructure" within the namespace of "CreateFile". When the file is created, the class is serialized with the namespace under which it was created. When the ReadFile project comes along, it cannot resolve the "CreateFile" namespace that's in the data file. Try this: declare … | |
Re: Check lines 68-70 - the test condition is "true" (that is, it will *always* be "true") - do you really want that? Shouldn't you have a condition you can test to see if you want to keep looping? Line 110 - what happens to the lines after the "continue" statement? … | |
Re: You can't declare an instance of a variable more than once. That's what's happening. Try this: [CODE]// Secondary.h #ifndef SECONDARY_H #define SECONDARY_H #include <iostream> using namespace std; #include <string.h> extern string HelloWorld; void HelloEarth(); #endif[/CODE] Change Main.cpp and Secondary.cpp to include "Secondary.h", remove the function declaration of "HelloEarth" from Main.h, … | |
Re: First, use code tags when posting - it makes reading the code easier. 1) As you've coded it, yes - kind of. That is, you create each object in main(), then pass each off to a distinct thread. However, there's nothing stopping you from, after starting the thread, from modifying … | |
Re: Check out this part of your code: [CODE]... bool radioButton1_CheckedChanged = true; bool convertToCelsius_CheckChanged = true; if (radioButton1_CheckedChanged == true) { convToF(double.Parse(Current.Text)); ...[/CODE] Won't this [B]always[/B] be the case...? Should the first 2 statements be moved elsewhere? | |
Re: I don't see a class declaration at the top of the code. It should be just before your first curly brace ({) at the top. Something like: [CODE]public class Teller[/CODE] When I put that in, the code ran. You really should have one outer loop that takes in the user's … | |
Re: Try [URL="http://www.dijksterhuis.org/finding-the-local-ip-addresses-in-c/"]this link[/URL]. | |
Re: Look at the last part of your long "if" statement: [CODE]else if(side1==side2 || side2==side3 || side1[COLOR="Red"]=[/COLOR]side3) // code error here[/CODE] Is something missing? | |
Re: In Panel.java, as the new last line of the constructor, type this: [CODE]ingredientScroll.setPreferredSize(new Dimension(200, 100));[/CODE] Of course, you may want to interrogate the parent (Frame) to get the dimensions and set the size of the JScrollPane appropriately. | |
Re: Ah, but they don't have the same *values* - you are constructing arrays of *objects*. Now, the objects may contain the same values, but that's it. Each object is different. You can either change over and make the arrays out of integers, or provide a comparison function that, when you … | |
Re: Generally speaking, it should be a loop in main() that is outside your current loop. That is, you enter the main loop to get the user's choice (1= reserve, 0 = exit). If the user enters a 1, you then get the input for the row and column and check … | |
Re: When you say "registry", do you mean the actual registry, or the certificate store (accessed by running "mmc", then from the "File" menu, selecting "Add/Remove Snap-in...", then selecting the "Certificates" snap-in, etc.)? If the latter, see below... It's been a bit, but I used this code in the past to … | |
Re: Your code is "converting" the object at element position 0 (an instance of MyDataType) to a string - but since it's an object, you are getting the type name. I'm assuming you want "nut" to appear in the text box. If so, the code that does this is: [CODE]textBox1->AppendText(arrayObject[0]->name);[/CODE] If … | |
Re: You are not giving the webBrowser component enough time to load, before you try to set the properties of the HTML document. Try using another button, like this: [CODE]private void button1_Click(object sender, EventArgs e) { // lets the browser control load up webBrowser1.Navigate(" http://www.httpsurf.com/ "); } private void button2_Click(object sender, … | |
Re: You're almost there... [CODE]byte[] fileStream = File.ReadAllBytes(Path); string first = Encoding.UTF8.GetString(fileStream, 0, 70);[/CODE] | |
Re: Here's some example code from MSDN: [url]http://msdn.microsoft.com/en-us/library/aa363634(VS.85).aspx[/url] | |
Re: Sounds like you need something like a "MultiMap". Check out [URL="http://www.dotnetperls.com/multimap"]this[/URL] link. | |
Re: How else would you? I mean, are you looking to load each "Student" into some sort of object, and then be able to say something like: [CODE]if (firstPerson.Age == secondPerson.Age) { ... }[/CODE] If so, you will still have to process the XML to load the objects. | |
Re: Have you seen [URL="http://www.functionx.com/vb/adonet/ta.htm"]this[/URL] article? (Not sure what the goofy photos are all about). Seems to cover some of the basic aspects of working with table adapters. It's in VB.NET, but should be easily translated to C#. | |
Re: Assuming the text "-- Select Date --" is the first item in the box, then this will work: [CODE]comboBox1.SelectedIndex = 0;[/CODE] Note that even when yo do this in code, it will cause the "SelectedIndexChanged" event to fire for the combo box. | |
Re: Knowing nothing more about your code that what you wrote, an extremely high-level solution could look like: 1) Convert your main() function to C# in a new C# Console Application project. 2) Create a new C++ "Class Library" project. 3) Copy all of your C++ code, minus the main() function, … | |
Re: Slight change, but you were close: [CODE]string sSQL = "SELECT * FROM Tasks WHERE Notes = '" + No + "'"; res = stmt->executeQuery(sSQL); [/CODE] Of course, this assumes that "Notes" in your database is a character column. If it is a numeric column, then leave the single-ticks out of … | |
Re: On line 61, you are defining a local version of "VideoTransmit" that eclipses the one you declared on line 23. Just state: [CODE]at = new VideoTransmit(new MediaLocator(sourcevideo), ipvideo, portvideo);[/CODE] and it will use the variable you declared on line 23. | |
Re: The assignment seems straightforward. Do you have some specific questions about it? |