|
teeboss wrote: (HTMLElementCollection)myDoc.getElementsbyTagName("Table");
OK, have you tried removing the cast and seeing what comes back ?
Can you control the HTML ? Because I've never used 'getElementsByTagName', getElementById always works fine for me, but this table has no Id. It's also not XHTML, which sucks.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
yeah That table was not done by me so I cant control the HTML code.
SO like i asked, is there anyway I can retrieve data of a table cell?
And Christtian, I'm on Yahoo Messenger now! My ID is mrhoangtuan. If u dont mind add me so we can chat more. I have something to ask u 2.
|
|
|
|
|
Sorry, I don't use yahoo.
The other obvious method is string mashing, just take the text and search for the table directly. It's not pretty, but it would work
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sry but i'm not good at string mashing. Can u give me some sample?
|
|
|
|
|
Did you try removing the cast to see what that object was returning ? It's a better option.
I'd probably try pulling stuff out with regex, rather than the find methods on the string class, if I had to go that way
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi
i'd like to compare 2 instances of the same class. i've used the XmlSerializer to save an instance
of a class into a Xml-File. after the deserialization from the file, i'd like to compare the original instance of the class and the one i've deserialized to see if the two instance are the same.
i've ask a friend and he told me that i have to use Reflection, but he didn't told me how exactlly i have to do that.
pls help
greets
pdluke
|
|
|
|
|
pdluke wrote: i'd like to compare the original instance of the class and the one i've deserialized to see if the two instance are the same.
Be careful. The two objects will not be the same. What you mean is that you are testing to see if they are equal.
You can do this without reflection. You can override the Equals method:
public override bool Equals(object obj)
{
bool isEqual = base.Equals(obj);
if (!isEqual)
return false;
return isEqual;
}
Only you can determine what constitutes equality.
|
|
|
|
|
if you have unit tests for your object you could use them instead of the equals method. It depends whether you are interested in them being functionally identical or having the same state or both.
Russell
|
|
|
|
|
Use this.GetType().GetProperties() to get an array of the properties, then us the GetValue method of each to get the value of the property for this and obj2 to compare the values. If you're not exposing all your data as properties, use GetMembers instead.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Hi I'm using ZedGraph Version 4.5.1.24865
I've two problems(questions):
I've a problem with the Xaxis scale, my Xaxis has following configuration:
Xaxis.Type = AxisType.Date;
Xaxis.Scale.MajorUnit = DateUnit.Second;
Xaxis.Scale.MajorStep = 0.2F;
Xaxis.Scale.MinorUnit = DateUnit.Second;
Xaxis.Scale.MinorStep = 0.001F;
Xaxis.Scale.Format = "mm:ss:fff";
When I zoom into the graphpane and the label with the value 25:00:00 is outside the visible area, then the next labels(example: 25:01:525; 25:02:455) aren't shown, but values like 26:00:00, 26:01:438, 26:13:389 are shown until the label 26:00:00 is outside the visible area.
This is what i get:
Xaxis__________________________________________________________
Labels 26:00:00 26:01:438
This is what i want:
Xaxis _________________________________________________________
Labels 25:01.525 25:02:455 … 26:00:000 26:01:438
What am I doing wrong, how can I fix this problem?
Is it possible to set the language default to english? Because when i use the german contextmenu the menuitem "Punktwerte anzeigen" appears twice (once for the function "point values" and once for "undo zoom step" .
Thanks
Best regards
|
|
|
|
|
hi all, i wish to use a delay of time = 1msec. is there a function can help me?
thank u.
|
|
|
|
|
delay of time = 1msec? nvm
u can use timer:
public System.Timers.Timer aTimer = new System.Timers.Timer();
aTimer.Interval = 1;
aTimer.Enabled = true;
aTimer.Elapsed += new ElapsedEventHandler(OnTime);
public void OnTime(object source, ElapsedEventArgs e)
{
//... do something
}
|
|
|
|
|
System.Threading.Thread.Sleep(1);
|
|
|
|
|
There is no way you can count on a 1 msec delay, it's just not going to happen. That's the lowest value you can set on a timer, it's always going to be more than that.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
As Christian said, the delay you get from a timer will exceed 1 msec, no matter what you ask
for. (If you ask for small values, you probably will get around 10 to 16 msec). This holds
true for Form.Timer, Threading.Timer and Timers.Timer
There are ways to obtain shorter delays, e.g. by using a multimedia timer.
I have just finished an article on this, I expect it to appear in the coming days.
Title will be "Timer surprises...".
Luc Pattyn
|
|
|
|
|
Using C# in VS.NET 2003, I included the system.windows.forms namespace but i can't find the HTMLElement. It should be available. How come?
Any suggestion pls?
|
|
|
|
|
I think this class is only available in Dot Net 2.0 (VS 2005).
|
|
|
|
|
That means i have to buy a new version If so then this is terrible . Is there something else i can do?
|
|
|
|
|
You could try to use the XmlDocument / XmlElement objects - but that gave me a lot of trouble.
Or you could just use the Express version
|
|
|
|
|
|
Hi
Can anybody help me with the code how to loop a windows forms datagrid using c#
Regards,
Sivaprasad
|
|
|
|
|
hi friends,
do any one of you have any idea about returning more than a single value from a function.
if so, do favour me by sending some sample codes as early as possible
Thanks
Suresh.C
|
|
|
|
|
Use collection object
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
You could use output parameters.
eg
private bool SomeFunction(string inParameter, out string outParm)
{
outParm = "someValue";
return true;
}
|
|
|
|
|
You could also create a struct which encapsulates all the the members you would like to return. The function would return an object of the structure type.
|
|
|
|