|
andredani wrote: now it only deletes the lines hwo gets in use, right?
Yes, it should only write the lines which are not used in the temp file (and therewith deleting the used lines).
andredani wrote: can u help me with a counter for this:
if subitem[0] and subitem[1] matches with a lines[idex +1] and a lines[idex +2] then calculate subitems[1] with +1.
I'm not quite sure that i understand what you mean. Let's assume your file looks like (I added line numbers):
# (line 1)
5 (line 2)
6 (line 3)
5 (line 4)
6 (line 5)
Normally your SubItems would be filled like this:
SubItems[0] = 5
SubItems[1] = 6
SubItems[3] = 5
SubItems[5] = 6
But because line 2 = line 4 and line 3 = line 5 you want to add 1 to SubItems[1], so that the SubItems are:
SubItems[0] = 5
SubItems[1] = 7 (6 from line 3 + 1)
SubItems[3] = 5
SubItems[5] = 6
Is that what you mean?
|
|
|
|
|
ehh.. now i don´t understand you hehe... '
i´m gonna try to excplain in easy terms...
subitems[0] and subitem[1] have to be unique.
.txt fil for example:
#
Online
K411
2007-05-05 20:15:12
AD
#
Historik
K411
2007-05-05 20:15:12
AD
#
Online
K412
2007-05-05 20:15:12
AD
Here is everything ok because line1 and line2 after# is unique.
But this is wrong:
#
Online
K412
2007-05-05 20:15:12
AD
#
Online
K412
2007-05-05 20:15:12
AD
In this example i have to add +1 on k412 to k413. so its unique. And also check k413 if its unique..
Little hard to excplain..
Need this so bad...
Thanks man!
|
|
|
|
|
Does the second line (K412 and K413 in your example) always start with one letter and is followed only by digits? Will there never be Km413 or just 413?
|
|
|
|
|
yes always ONE letters and fallowed by 6 numbers... it makes all little bit harder...
thanks!!! BUT the last number, is a string hwo starts with 1
like this:
string ett = "1";
for exampel: K44322+(ett) = K443221
So "ett" is the only one hwo going to change!
Thanks man i´m stuck now need your help!
|
|
|
|
|
You asked the same question a couple of hours ago and I answered it.
Please don't double-post your questions - it's rude.
Paul
|
|
|
|
|
hi all,
any ideas abt getting unique nodes from an xml document. for example if u have this kind of a structure
<a></a>
<b></b>
<a></a>
<b></b>
<a></a>
<b></b>
how can u get only a and b. Is there a way using XSL extension objects.
by the way I'm using C# .NET 1.1
Any help would be highly appreciated
Thanks in advance
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Rocky# wrote: how can u get only a and b
Eh? There are multiple copies, which "unique" one do you want?
|
|
|
|
|
I wanna get the name of the nodes as u can see in my example where a and b are the nodes (which can stand as the column headings in a table) but in xml these headings r repeated quite a lot of times. I just wanna get the node names only once...
u know in this example it would be a and b
instead of
a b
a b
a b
...
I just want it to be
a b
possibly in the form of an array so that I can use it conveniently
hope its clear now
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
|
hi Ed
thanks for the reply. I tried a few things after seeing that example on the link but its no use! Its actually counting the nodes at differet levels in that example. What I want is the names of nodes at a certain level. The level in the heirarchy is not a problem. the problem is getting the names dynamically. And really it looks quite a simple task when u hear it but it really is causing me a head ache now!!
Thanks for ur help buddy I appreciate this!
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Rocky# wrote: Its actually counting the nodes at differet levels in that example.
Then simply remove statement(s) which are doing the counting. What my idea was was that you could use this transformation to "transform" the data and then simply read in what you need from the result of the transformation.
An alternative method would be to use a dictionary to store them (and optionally count them).
Dictionary<string, int> counts = new Dictionary<string, int>();
foreach (XmlElement element in dom.DocumentElement)
{
if (!counts.ContainsKey(element.Name))
{
counts.Add(element.Name, 0);
}
counts[element.Name]++;
}
|
|
|
|
|
I found a way around using the for-each-group
Its something like that:-
XSL
<xsl:for-each-group select="Inputs/*" group-by="name()">
<td class = 'detail_table_element'>
<b><xsl:value-of select="name()"></xsl:value-of>(In)</b>
</td>
</xsl:for-each-group>
<xsl:for-each-group select="Outputs/*" group-by="name()">
<td class = 'detail_table_element'>
<b><xsl:value-of select="name()"></xsl:value-of>(Out)</b>
</td>
</xsl:for-each-group>
--------------------------
<Outputs>
<Compound>BiPhenyl</Compound>
<Value>0.000000005</Value>
<Compound>BiPhenyl</Compound>
<Value>0.000000005</Value>
<Compound>BiPhenyl</Compound>
<Value>0.000000005</Value>
<Compound>BiPhenyl</Compound>
<Value>0.000000005</Value>
<Compound>BiPhenyl</Compound>
<Value>0.000000005</Value>
<Compound>H2O</Compound>
<Value>0.703552320</Value>
</Outputs>
but then again i thought there should be some change in the XML as well so that the individual rows can be identified as well. So curently its turned into an XML problem rather than C# problem
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Hello, I wanted to know if there's any way with C# to create MFC like projects, where you have Documents and Views architecture. Thanks in advance.
|
|
|
|
|
|
Yes, it is it. Thanks for the help!
|
|
|
|
|
Djavid j wrote: sqlquery = "select * from voorbeeld";
Is this a view or a table... in case if its a view I think you're missing a Key column. thats why it can't be deleted. or may be your showing grouped data in this
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
I think you need to assign your own delete command to the adapter.
do at bit of research on ur own plz I'm quite busy myself
Thanks
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
oh well how nice!!
HEY LOOOK EVERYBUDDY THERE'S A BABY OVER HERE WHO NEEDS SOMEONE TO FEED HIM!
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Draw a shape in a corresponding position of a picture when the item is clicked from the list view control.
udhay
|
|
|
|
|
Is that a question ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I want to display the selected item when i clicked in the list view control and how to get the corresponding column item.
Udhay
|
|
|
|
|
listviewitem_click event code
dim strshow=listviewitem.selecteditem(0).subitem(colname).text
|
|
|
|
|
This will getting the item of the first index.
The user will be selecting randomly
|
|
|
|
|
Can someone please help me to my previous question.
|
|
|
|
|
Please don't do this. It not only makes the forums more noisy, but is also rude.
Cheers,
विक्रम
Be yourself, no matter what they say.
- Sting, Englishman in New York.
|
|
|
|