|
Is it just me or does everyone feel cheated when you don't get a feedback wether a solution worked or not? Maybe I am just small...
|
|
|
|
|
Whats even worse is that you sometimes dont even get to know if your answer was read or if you have wasted your time because the answer wasnt even read by the questioner.
|
|
|
|
|
Exactly!!
|
|
|
|
|
niansah wrote:
Is it just me or does everyone feel cheated when you don't get a feedback wether a solution worked or not?
It is good to know. Especially given that some people's command of the language isn't so great and I wonder whether I interpreted their original question correctly in the first place.
niansah wrote:
Maybe I am just small...
No. Feedback is important in all areas. You cannot improve without feedback. Imagine a baby learning to walk. Without the feedback of the sensation of hitting the floor when they stumble they won't know what moves work and what don't.
Answering questions is great as a learning tool and to keep information going. It is amazing how much more information I can retain by helping others. Mainly because the problems they have may not be in the same area I am currently working on, so by thinking about the area they are asking about keeps the information fresh in my mind, so that if I move back to that area I can recall it much quicker.
Sometimes I feel that I can't be bothered answering questions here. If I feel really bad about not being appreciated or that I'm being used I just leave it a couple of days then come back.
So, don't feel discouraged about people not leaving feedback on your answers. There are many people here who genuinely appreciate the efforts made by those who share knowledge.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Hi,
I am trying to get all the farm name attrbute from Xml files thorugh loop
I have to verify conditoion that when farm name is equal to dev1
It should exit from the loop
my code retrieves only one value from farm name dev2 my code does not search for farm name dev2
any body can help me giving me code
XmlDocument doc = new XmlDocument();
doc.Load("c:/farm-config.xml");
XmlNode farm=doc.SelectSingleNode("/root/farm-config/farm/@name");
MessageBox.Show(farm.InnerText);
xml file strucutyue is as given below
Hi,
I am trying to get all the farm name from Xml files.
This is my xml file structure
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm-config>
<farm name="dev2">
<connection address="localhost1" user="root1" selectedConnection="1" password="daask6">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
<farm name="dev1">
<connection address="localhost1" user="root1" selectedConnection="1" password="daask2">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
</farm-config>
</root>
regards
sanjeev
|
|
|
|
|
Well, given your query, InnerText would only return a result if:
<farm name="dev2">Some text</farm>
You may want InnerXml instead.
Marc
<a href="http://www.myxaml.com">MyXaml</a>
<a href="http://aut.tigris.org">Advanced Unit Testing</a>
<a href="http://wdevs.com/Default.aspx?tabid=80">YAPO</a>
|
|
|
|
|
hi!
Perhaps I've misunderstood you, but XmlNode.SelectSingleNode will always return a single node.
If you want several nodes you should use XmlNode.SelectNodes()...
mav
|
|
|
|
|
XmlDocument doc = new XmlDocument();<br />
doc.Load("c:/farm-config.xml");<br />
XmlNodeList farm=doc.SelectNodes("//farm");<br />
foreach(XmlNode n in farm)<br />
{<br />
if (n.Attributes.GetNamedItem("name").Value == "dev1")<br />
MessageBox.Show(n.Attributes.GetNamedItem("name").Value + " is a match!" );<br />
else<br />
MessageBox.Show(n.Attributes.GetNamedItem("name").Value + " is not a match!" );<br />
}<br />
|
|
|
|
|
I have the following situation:
Person A performs an application action that affects Person B. Management wants the application to automatically generate an e-mail to Person B, notifying them of the action. I can think of two solutions. 1) Query the Active Directory LDAP server for the e-mail address tied to Person B. 2) Get a dump of the e-mail addresses from the Exchange administrator and tie it into the application like another table.
I don't like #2 because it doesn't account for change very well and I don't want to implement ANOTHER import/reconcile process if I don't have to. However, I've never done LDAP work and don't know how to exactly go about "eating this elephant". The proverbial answer is "one bite at a time", but where to start?
BTW: The application is ASP. NET. The domain is Win Server 2000, Exchange 2000, and SQL Server 2000.
Suggestions, pointers, hints, and help are welcome.
Thanks in advance,
Darien
"I don't know. I haven't tried today." - Trumpet icon Maynard Ferguson's response when asked how high he could play.
|
|
|
|
|
Look at the System.DirectoryServices namespace. You can use a DirectorySearcher object and get the user account. The property to look for is "mail". I just did a phone/email list for a company last week. I don't have any of the code, but if you get stuck on something, I might be able to help.
When getting the value of a property from a DirectoryEntry object, always do a .Contains("prpertyname") before trying to access the property. Not every entry will have the property you are after.
|
|
|
|
|
Hi:
I've been told by people in the know, that the accepted way of storing program data (like screen coordinates, directory settings, etc.) in the .NET world is with XML files (as opposed to the registry or old fashioned INI files).
OK, I'll buy that. I have managed to create a simple XML file that writes two program settings, Start Directory and the maximum number of files. I threw in a comment just for the hell of it.
<datalocations startdir="C:\Marks\DataFind\GPS\" maxfiles="100">
What I would like to know is if it will be possible to read and alter this file in a random-access fashion. I was hoping that there would be some analogy to the old INI file approach where you had a key, a subkey, the value and possibly a default value if the key was not found. You could request to read or alter the settings of specific keys without disturbing the others and without having to read through the file sequentially to get to the key you are looking for.
I am just a bit overwhelmed by the number of XML classes. Admittedly, I do not know XML all that well, but I will say that, if I can help it, my file will not get any more complex than the sample I have provided above. There will be additional entries but I see no need for further nesting and "noding".
For now, I just want to be able to quickly read and update the StartDir and MaxFiles fields of the file without having to resort to a sequential read. Can this be done? Could you point me to the class or classes that would be most useful?
Thank you very much in advance,
Jethro
|
|
|
|
|
Try to search for application settings xml here on CodeProject.
You will get several hits and you are free to choose an existing solution for your problem.
|
|
|
|
|
Hi Robert:
Thanks, I can see that there are several useful articles there. I'll have a look.
Cheers,
Jethro
|
|
|
|
|
|
Hi,
For sequential read you would use the XmlTextReader to read your file. This is forward only and extremely fast. You would "pull" the information out in a while loop.
For random access, I would use XPathDocument and navigator.
Information on the above is well documented, just google for it.
...INI file approach where you had a key, a subkey, the value and possibly a default value if the key was not found...
With xml, YOU decide how you want to access the node!
<config>
<user-key name="something" value="111" default="0" />
<user-key name="something else" value="XML Rocks" default="Merry Christmas" />
</config>
Alternatively, look into storing your custom tags in web.config/machine.config.
Here is an article: http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=90
|
|
|
|
|
|
csharpask wrote:
but when I want to compile it asks to configure C# compiler location. But how to do so ?
It probably wants the path to the command line compiler, csc.exe. See here[^] for more info.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
Hi,
I know the path of csc, what I don't see is where in Eclipse I should put it .
|
|
|
|
|
Anonymous wrote:
I know the path of csc, what I don't see is where in Eclipse I should put it
Ah. I thought you knew where to put it, but didn't know the path to csc! Well, I don't know Eclipse, so I can't help.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
hi all,
I want to start or stop a SQL server but it is in different machine.All the computers are in a Network.
I try to using System.ServiceProcess Interface..But it successfull only for my machine SQL Server.
When I try to stop another machine SQL Server,it says
"can not open service control manager on computer 'janaka'.This operation might require other privileges."
Then how can I log on to other computer using C# and start/stop SQL sevrer?
any answers whould be appreciated
thanks in advance..
|
|
|
|
|
Hi all,
Is there a way to change a corresponding cell's combobox's datasource upon selection in another combocolumn?
To clarify my question I'll use the following example:
Let's say we have a grid with two combobox columns, the 1st column is gender and the 2nd is for name. Choosing male will populate the male employees and female will populate female employees in the corresponding cell on the other column in the selected row.
Is this possible?
Any help will be appreciated...
Roy
|
|
|
|
|
Inheret a class library from DataGridColumnStyle class and add to it's controls a combo box ,and override the Commit(),Edit(),Abort(),etc all abstract methods and then add it to the data grid,by the TableStyles collection inthe datagrid proprties.
|
|
|
|
|
Thanx, but I already did that.
What I need now is to be able to rebind the corresponding combobox in the 2nd column (and none of the other comboboxes in that column) to a new dataset that will be filled according to the selection in the 1st column.
Roy
|
|
|
|
|
using Microsoft.DirectX;
using Microsoft.DirectX.AudioVideoPlayback;
Ok thats what i got, but "The type or namespace 'DirectX' does not exist in the class or namespace 'Microdoft'"
So where do i get DirectX for my apps to use?
or "(are you missing an assembly reference?)(CS0234)"
|
|
|
|
|
Had you setup the dx sdk ?
|
|
|
|