|
Just write a recursive delete method.
something like (psuedo code):
public bool DeleteNode(Guid id)
{
return DeleteNode(id, this);
}
private bool DeleteNode(Guid id, NodeModel model)
{
if (id == model.Id) delete model object here; return true;
foreach (NodeModel in Children)
{
if (DeleteNode(id, model))
return true;
}
return false;
}
|
|
|
|
|
If you delete an internal node, what do you do with its children? Your code would leave them orphaned...
Depending on what the original structure is meant to represent, it need rebuilding in some way after a deletion (or maybe deletion should be disallowed for some nodes...)
We need more information from the OP to define then solve his problem.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
|
I was thinking more in terms of structures like B-trees (used in database indexing, etc), where deleting a node involves reconnecting any fragments (and in the case of a B-tree) possibly rebalancing the tree.
The point remains that we need to understand the semantics of the structure in order to know what a delete should do.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Any source code out there already for a GE Versimax E05 PLc so that I can exchange data using C#? Already looked at the drivers created already but little pricey for me.
|
|
|
|
|
For something so specific and vertical?? Probably not.
Google is your friend. I'd start with "Versimax E05 PLC C#" and start hunting.
|
|
|
|
|
Hi
This is Chandra and Good evening. My query is, i have one web page. In that web page i have GridView Control. At presnt i can able to export the data to Excel from Gridview control.I have also Charts control in the same Web Page which is displying sales information.
Here My Question is.. Is it possible to export the Chart control as well as Gridview data to Excel format.
Thanks
Chandrakanth
Chandrakanth
|
|
|
|
|
|
Hi Sandeep,
Thanks for your information. Meanwhile in my case i can not hard code the chat names because i have different types of grids like CategoryInfo,SubcategoryInfo Info,ProductInfo, SalesInfo etc. These are all grids contains lot of records and Each Grid has 3 types of charts. In this case how can i approach.
Thanks
Chandrakanth.
|
|
|
|
|
I provided a direction to start. I have not done it myself or played with it. You have to look around for tweaks you want. Try out, it might not be as hard as you think.
|
|
|
|
|
I am doing a university website for my third year project using asp.net the website is only for university staff and registed students so when logging in password and user name need to be validated using the schools active directry this is my 1st website and i dont have any idea of active directry plz help
|
|
|
|
|
|
|
I can't code ila algorithm and quinlan algorithm
please help me source code this algorithm
thanks so much
|
|
|
|
|
This is not a rent-a-coder site. Put some effort in. Turning an algorithm into executable code is a pretty elementary skill for programmers, perhaps you should pay more attention to your course.
|
|
|
|
|
Try this:
NonPublic Unstatic InVoid ILA(Quinlan q)
{
if(q was Quinlan)
{
WhereIsItNow(ILA(UnQuinlan exQ);
}
}
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
|
|
|
|
|
Perhaps the Algorithm forum would be more suited?
|
|
|
|
|
It does not work like this here.
Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.
Try them and tell if you face issues.
|
|
|
|
|
kindly provide me interview question of asp.net developer for 3 years exp.
Thanks & Regards
Anish Singh
|
|
|
|
|
Question 1: Do you have any experience of using Google?
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
True, that's quite most important question at all.
When we hired a new supporter two years ago, we tried to test that: imagine a colleague installing our products at a customer site calls you because he receives msi error <some number> (we used a number which we expected no candidate would already know the solution of). Candidates did enter the search term into Google, but none of them actually stepped further into the links provided by Google and thus get to the solution...
That said, the "let me google that for you" answers here on this site help only with the step the guys already know to do, but not with the decisive steps thereafter...
|
|
|
|
|
Bernhard Hiller wrote: That said, the "let me google that for you" answers here on this site help only with the step the guys already know to do, but not with the decisive steps thereafter...
It's about trying to teach people how to use their brain, and apply some basic initiative to the issue of problem solving. Far too many people these days post questions that begin with "how to ..." without making any attempt to research the basics. If I was recruiting for an IT (or any other) position, I would certainly not wish to employ anyone who posted the sort of question seen above.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
Richard MacCutchan wrote: It's about trying to teach people how to use their brain, and apply some basic
initiative to the issue of problem solving.
Can you show me how to use Google?
Everything makes sense in someone's mind
|
|
|
|
|
At my last interview the VP asked me how confident I was in handling any coding issue that may arise. I told her I was 100% confident because if I didn't already know how to handle the issue I could find the solution on Google.
She liked the answer and I got the job. Nothing wrong with google. That is, with the search engine.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Are you that developer, or are you looking to hire one?
|
|
|
|