|
Yeah your right, I didn't recognize! Oops
|
|
|
|
|
No, no, you misunderstood - that was not directed at you or your question (which is a good, sensible question). That is why it was a reply to RobCroll and not to you, and why his answer is light grey, and yours is still blue.
His answer to your question was wrong in just about every respect, and what he said you should ignore - look at Dave Kreskowiak's answer which is much, much better. That is why I (and I suspect others) voted him down - the advice was bad. If you look at the bottom left corner of a message you will see a "rate this message" facility. Have a look at his answer: 1.71/5 (7 votes) indicating he has had seven ratings, and that they have generally been unhappy. A vote of one is a "this is bad", a vote of 5 is a "this is good". If your message has no votes, it is blue, if it is down voted, it goes grey. If it is upvoted it goes green.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
You're right! Thanks
|
|
|
|
|
You're welcome!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
The stack is (NOT OPTIMIZED VERY FAST MEMORY!) just an area in memory where various values are stored in a Last In, First Out fashion. It's used to hold simple variable values, pointers to objects, parameters for methods calls, return addresses for returning control back to where a method was called from, ...
A heap is a block of memory that contains both free (reserved for your app but unused) memory and allocated objects such as buffers, class instances, strings, or other complex types.
|
|
|
|
|
This uesd to be a lot easier question to answer - the stack was a small bit of RAM pointed to by the CPU Stack Pointer (SP) register, which made it fast and easy to access. Every CALL instruction pushed the current values in all CPU registers onto the stack, then popped them back when the CALLed routine was finished to resume execution. The Heap was a block reserved in RAM by an application to hold and access run-time data. Now it's a bit more complex, but this[^] discussion puts it in perspective.
Will Rogers never met me.
|
|
|
|
|
|
Finally some one has answered!!!
|
|
|
|
|
Hello
I develop a simple desktop application of sales management.
In my application in shipment report have 4 parameter
Report View by
Invoice
Date
Buyer
Product
I used ratio button in form so user can chose only one parameter at a time to view report
now i want to use check boxes user can chose multiple parameter use at a time to view report
Can you please suggest me how i can do this in short coding
Hope I clear my query
Thanks
|
|
|
|
|
hi all , i use this code to fill datagrid with data from my database
private void btn_by_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
SqlConnection con = new SqlConnection("Data Source=MS-TOSHIBA;Initial Catalog=dalily system;Integrated Security=True");
SqlCommand cmd = new SqlCommand("select place.name,place.address,place.telephone,place.website,place.email,place.info from place,subcateogry where place.subcat_id=subcateogry.id And subcateogry.name='" + subcat_comboBox.SelectedItem.ToString() + "' ", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
dt.Load(dr);
dataGridView1.DataSource = dt;
dr.Close();
con.Close();
}
now i want when i click on row
select coordinate_x & coordinate_y from place table where name is in row i clicked on
And store coordinate_x & coordinate_y as double
thanks in advance
|
|
|
|
|
Just stop posting the same question twice in a row. There's no need and you're not drawing any more attention to your question. You're drawing it to yourself and not in a good light either.
|
|
|
|
|
i don't want to do that but there is a problem with my browser so when i click post nothing happen so i think my question not posted
|
|
|
|
|
Then you can check to see if it has been posted before doing it again.
|
|
|
|
|
hey,
my company wrote an activeX DLL in VB6 few years back, and now i've been asked to run some tests with it.
since i dont have VB6 environment anymore, i thought it'll be best to try and make a simple C# program that will call the registered COM Dll.
to do that i copied the DLL into c:\windows\system32, used regsrv32 to register the DLL, restarted the computer and referenced to it from my project.
from there i tried working like i use to:
mydll.cMain obj = new mydll.cMain();
int res;
res = obj.SetHttpServer("www.test.com", 80);
res = obj.PingServer();
with the first method call (SetHttpServer) Everything worked fine,
on the second method call (PingServer) i keep on getting Error# 429 " ActiveX component can't create object".
i looked over the original VB class, and it seems pretty simple, it creates an HttpWebRequest object and requests a string from the webserver defined with the SetHttpServer.
What am i doing wrong?
Thank you
Alon
|
|
|
|
|
Does the .DLL have any dependencies that you didn't copy over??
Use this[^] to find out.
|
|
|
|
|
Hey Dave,
that was my first thought too,
my dll depends on MSVBVM60.DLL which uses other windows DLL..
since i use Windows 7 (or Windows xp sp3 in another computer i tried) i found the file already to be located at 'system32' folder.
do i need to register the msvbvm60 file as well?
|
|
|
|
|
No, it's already there and done.
|
|
|
|
|
I have the following two variables
[code]
bytes_per_pixelS = 2;
byte[] stbd_data = new byte[stbd_width * num_lines * bytes_per_pixelS];
Array pingDataArray = new ushort[stbd_width * num_lines];
[/code]
To assign stbd_data to pingDataArray, which one is correct, knowing that stbd_data array is twice as long as the pingDataArray....
[code]
for (int i = 0; i < stbd_width * num_lines; ++i)
{
pingDataArray.SetValue( BitConverter.ToUInt16 (stbd_data ,2*i),i);
} }
[/code]
or
[code]
for (int i = 0; i < stbd_width * num_lines; ++i)
{
pingDataArray.SetValue( BitConverter.ToUInt16 (stbd_data ,i),i);
}
[/code]
thanks
|
|
|
|
|
I'm having issue understanding how I can read XML from a webservice.
What webservice is sending back an object array that contains XmlAttribute and XmlElements within the array.
Most of what I am finding on how to parse an XML response they are either deserializing it and converting it to their custom class or they are loading from a file.
In my case I can't do neither since what is returned is an object[].
I'm not asking for code.. just some help to point me in the right direction on what process I should take for reading this information.
|
|
|
|
|
If the objects within the array are well-formed XML in strings, then you can use an XmlDocument and its LoadXml method then go from there.
But maybe you need to read up more on deserialization.
|
|
|
|
|
The problem is objects within the array are not strings. They are of type XmlAttribute and XmlElement.
So this is the return I am supposed to get:
<response code="200" name="success">
<message>Domain domain.com exists</message>
</response>
But it returns:
object[] getData = soap.domainExists("domain.com");
So within getData is:
getData[0] = XmlAttribute (type)
getData[1] = XmlElement (type)
getData[2] = XmlElement (type)
getData[3] = XmlElement (type)
|
|
|
|
|
I see. I did this:
object[] blah = soap.domainExists("domain.com", param);
foreach (object o in blah)
{
Type t = o.GetType();
Console.WriteLine(t);
if (t == typeof(XmlElement))
Console.WriteLine(((XmlElement)o).InnerXml);
else if (t == typeof(XmlAttribute))
Console.WriteLine(((XmlAttribute)o).InnerXml);
}
Which returns:
<key xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>status_code</key><value xsi:type="xsd:int" xmlns:xsi="http://www.w3.org/2001/XM
LSchema-instance">200</value>
System.Xml.XmlElement
<key xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>status_name</key><value xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001
/XMLSchema-instance">success</value>
System.Xml.XmlElement
<key xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>status_message</key><value xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2
001/XMLSchema-instance">Domain domain.com exists</value>
I jsut need to figure out how to parse it
modified 12-Jun-12 14:49pm.
|
|
|
|
|
JD86 wrote: I'm having issue understanding how I can read XML from a
webservice. What webservice is sending back an object array that
contains XmlAttribute and XmlElements within the array.
From this and your other posts I am pretty sure your problem is that you want to
1. Get the xml
2. parse the xml
3. turn it into some sort of data structure.
Steps 2 and 3 have nothng to do with a "webservice". Steps 2/3 are the same regardless of where the xml comes from.
As far as a solution to 2/3 then the steps are.
A. FIRST determine what is in the xml.
B. Second learn how to parse xml.
C. Write code using B and knowledge from A to produce what you want.
|
|
|
|
|
Thanks.
The problem I'm having is I'm expecting/wanting something in the format:
<response code="200" name="success">
<message>Domain domain.com exists</message>
</response>
Which is what you get if you browse to the webpage.
But I'm getting the format shown above which is completely different and more difficult to parse from what I can tell
|
|
|
|
|
Ok I just parsed it my own way
<pre lang="c#">
object[] blah = soap.domainExists("domain.com", param);
bool success = false;
string msg = string.Empty;
ParseXml(blah, out success, out msg);
</pre>
<pre lang="c#">
static void ParseXml(object[] data, out bool success, out string message)
{
success = false;
message = "Failed to parse XML";
// Loop through objects
foreach (object o in data)
{
// We only care about XmlElement. Ignore the XmlAttribute
if (o is XmlElement)
{
// Get the innerText
string text = ((XmlElement)o).InnerText;
if (text.StartsWith("status_code"))
{
if (text.Replace("status_code", string.Empty).Equals("200", StringComparison.CurrentCultureIgnoreCase))
success = true;
}
else if (text.StartsWith("status_message"))
{
message = text.Replace("status_message", string.Empty);
}
}
}
}
</pre>
|
|
|
|