|
Hey, that's clever!
But could we imagine a dll with the extension .exe and vice-versa?
hehe...
sorry, I couldn't resist either!
|
|
|
|
|
Hello,
How can I make a search that do not only find the exact match but also similiar matches with xpath ?
For example,
our xml fragment is -lets say- like this :
<br />
<ROOT><br />
<DATA attribute1 = "123" attribute2 = "987"><br />
<AA> something here </AA><br />
<AB> again something here </AB><br />
</DATA><br />
<DATA attribute1 = "abc" attribute2 = "def"><br />
<BA> 123 </BA><br />
<BB> 987 </BB><br />
</DATA><br />
</ROOT><br />
..and I want to make a search to find all DATA's that contains the string "23" anywhere (at its attributes, childs, childs' attributes etc.
So after my search I will find the first DATA element (because its attribut1 is 123 and this contains 23) and also the second DATA element (because its BA child's value is 123 which contains 23).
Can I do this using xpath (I haven't find any SQL like "like" method under xpath) or may I choose another strategy?
.:: Something is Wrong ::.
|
|
|
|
|
You Must Load Youre Data To dataset Or dataView and then Search with Youre Cretria ;
MHF
|
|
|
|
|
may I use sql like select statements and complex queries in this dataset ?
also how can I acces element attributes through this dataset
.:: Something is Wrong ::.
|
|
|
|
|
DataTable Have Select Method You can use it
But for Complex Queries you must write a class or function that use that
Search in the internet mybe Find some codes
MHF
-- modified at 10:13 Tuesday 15th August, 2006
|
|
|
|
|
pashje wrote: Can I do this using xpath (I haven't find any SQL like "like" method under xpath) or may I choose another strategy?
yes you should
XmlDocument doc = new XmlDocument()
doc.Load(filename);
XmlNodeList list = doc.SelectNodes("//DATA@[your argusments here]");
I suggest grabbing the old book "XML in a nutshell". You need to know a few commands for xpath to get this to work.
Then just to a foreach on the XmlNodeList
foreach(XmlNode node in list){}
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
contains would be the most useful function in this case
XmlNodeList list = doc.SelectNodes("//DATA[contains(.,'123')]");
only two letters away from being an asset
|
|
|
|
|
i create a application in c#, and i want to call other program such as program in namespace 1 call program in namespace 2 , anybody can help?
-- modified at 8:18 Monday 14th August, 2006
|
|
|
|
|
Calculator will launch by this.
System.Diagnostics.Process.Start("calc.exe");
|
|
|
|
|
I'm experimenting with a very basic .Net remoting client server i wanted to make sure i could get it to work before trying something more complex the client server works fine locally i.e. with both server and client on the same machine however when going between two different computers which are local on the network it doesn't work i get a message simmilar to unable to connect to remote server or something to that effect the configuration files are below:
<CLIENT>
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown type="GPSWaypathData, GPSWaypathData" url="tcp://10.34.144.109:8989/GPSWaypathData" />
</client>
</application>
</system.runtime.remoting>
</configuration>
<SERVER>
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" type="GPSWaypathData, GPSWaypathData" objectUri="GPSWaypathData" />
</service>
<channels>
<channel ref="tcp" port="8989" />
</channels>
</application>
</system.runtime.remoting>
</configuration>
Any help would be really apreciated
-- modified at 8:02 Monday 14th August, 2006
|
|
|
|
|
Did you check the firewall settings (Control Panel->Windows Firewall) on the server? It is possible that port 8989 is blocked for incoming traffic. You could try explicitly adding the port to the Exceptions list.
|
|
|
|
|
No theres no firewall in place between either of the computers
|
|
|
|
|
I meant the firewall built into Windows.
Try running netstat -a on the command line to check if the server is running on the port you specified. To check whether the server is reachable from the client, try running "telnet <server ip=""> <port no="">" and see if it connects.
|
|
|
|
|
Hi
Is there Any ApI Function that Give the Current resulation of Windows ??
With Thanks....-><-
MHF
|
|
|
|
|
Try the Screen.PrimaryScreen.Height and Screen.PrimaryScreen.Width properties.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
thanks this Screen.PrimaryScreen.Bounds.Width work
MHF
|
|
|
|
|
Hi to all,
it's urgent.
I know how to build a DirectShow FilterGraph in VC++6, but I dont know it in C#.
How to build a DirectShow FilterGraph in C#?
How to find a Register Filter (in IBaseFilter Interface) using it's name?
How to Connect pins of 2 filters?
If possible explain with example.
please help me.
Thanks & Regards,
Aniket Salunkhe
-- modified at 7:04 Monday 14th August, 2006
|
|
|
|
|
This is a follow on question from:
http://www.codeproject.com/script/comments/forums.asp?forumid=1649&XtraIDs=1649&searchkw=hodges&sd=5%2F16%2F2006&ed=8%2F14%2F2006&select=1619517&df=100&noise=5&mpp=50&fr=319#xx1619517xx
I have been able to populate a context menu with data from a database. However I now have the problem of working out which item has been selected from the menu.
This is the code that adds the items to the menu:
private void addPersonalPhonebookItem(string name, string number)<br />
{<br />
ToolStripMenuItem personal = ts_phonebook_personal;<br />
ToolStripMenuItem personalMenuItem = new ToolStripMenuItem();<br />
<br />
personalMenuItem.Name = name;<br />
personalMenuItem.Text = name + " (" + number + ")";<br />
personalMenuItem.Click +=new EventHandler(phonebookMenuItem_Click);<br />
personalMenuItem.Tag = name + number;<br />
personal.DropDown.Items.Add(personalMenuItem);<br />
}<br />
And this is the EventHandler:
void phonebookMenuItem_Click(object sender, EventArgs e)<br />
{<br />
MessageBox.Show("You Just Clicked: " + e.ToString());<br />
}<br />
How do I get the 'name' or 'number' of the clicked item...
Thanks again in advance,
Phil
|
|
|
|
|
void phonebookMenuItem_Click(object sender, EventArgs e)
{
ToolStripMenuItem mnu = (sender as ToolStripMenuItem);
MessageBox.Show("You just clicked: " + mnu.Name);
}
(Hmmm, ever wandered what the sender property did?)
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Thanks for the quick reply... Great stuff...
Phil
|
|
|
|
|
Not a problem, at least you explained your problem more thouroughly than other people. (And also said thanks which is a nice change )
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
I have a console project. How do I execute a commandline statement eg.
cd C:\Program Files
He who laughs last is a bit on the slow side
|
|
|
|
|
A simple question deserves a simple answer but unfortunately one cannot be given for this question, it's more complex than you think because
cd C:\Program Files
Is actually interpreted by cmd.exe and is not a system command. If you simply want to launch a file with arguments or something like that then you can use the System.Diagnostics.Process class.
You'll have to provide more information as to exactly what you want to accomplish, are you writing a "wrapper" around the Windows console? (Based solely on the example command you gave).
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
I'm currently busy with my application's installer. I have all done, so all I still need to do is to create the database at installation. I have the sql script for that. How I see this I have to do the following. btw I'm using msde for the database..
1 - restart the service, this I want to do via command prompt.
2 - log into osql and the instance with ... osql -E -S machinename\instancename
3 - execute the script file, sending parameters with, the installation path.
I might be able to somehow link step 2 & 3 with the following command...
osql -E -S machinename\instancename -i "path\script.sql"
I'm just not quite sure how to specify the path values that supposed to be within the script file, that is to where it must create the MDF and LDF files.
He who laughs last is a bit on the slow side
|
|
|
|
|
NeroToxic wrote: I'm just not quite sure how to specify the path values that supposed to be within the script file, that is to where it must create the MDF and LDF files.
Best bet would be to generate the script on the fly. This way to can specify absolute paths in the script and not get bogged down with the current working directory which can cause big problems sometimes.
NeroToxic wrote: He who laughs last is a bit on the slow side
Love it
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|