|
Hi
I have a filled TreeView and a I have to select a Node in this TreeView. I know the path to select it, but how can I make a selection in this TreeView?
"FullPath" is ReadOnly
Thanks a lot for help
Greets
Michael
|
|
|
|
|
Hi!
Just set the SelectedNode property.
Regards,
mav
|
|
|
|
|
Dear All,
I run a squid server on WinXP (127.0.0.1:8081).
I have a C# application that I want to it redirect ALL HTTP request to squid.
(application and squid run on one system)
I use GlobalProxySelection and below code in my application, but dont work.
Uri proxyURI = new Uri("http://127.0.0.1:8081");
GlobalProxySelection.Select = new WebProxy(proxyURI);
How can I redirect ALL http request to this proxy server?
--TNX
|
|
|
|
|
Why does Double.NaN != Double.NaN
ie, this fails
double d1 = Double.Nan;
double d2 = Double.Nan;
System.Diagnostics.Debug.Assert(d1 == d2);
|
|
|
|
|
|
Read my question.
MSDN says
Use IsNaN to determine whether a value is not a number. It is not possible to determine whether a value is not a number by comparing it to another value equal to NaN.
I already know that. I am asking why.
|
|
|
|
|
Is a not defined number equal to another one?
Is 2/0 equal to 3/0?
Intuitively seen (probably) yes, but mathematical: No!
Double.NaN is mathematically not existing so it isn't equal to anything (including itself).
|
|
|
|
|
Fair enough but I think of NaN as being the numerical equivilent of null and the following is true
Object o1 = null;
Object o2 = null;
o1 == o2;
|
|
|
|
|
I got your point of view but from a mathematical point of view the framework is absolutely right.
|
|
|
|
|
Hi,
I got a service. I am trying to monitor the data on that service using the perfmon tool of windows XP.
I checked the log file of that service, the data collected is 0 for all the performance counters.
I am having these performance counters: Average Response time, Number of Requests, Number of Requests per second.
Can anyone help me, how to monitor and collect the data on that service.
Thank you.
ftht
|
|
|
|
|
This is my code in C#.The database i am trying to access is having 49 entries in NotesdataTable sequentially(1 to 49).When i check ,i get the entry at first row, first column as 23 when the expected one is 1.
string s="";
int i,j;
string path=Application.StartupPath;
conn=new OleDbConnection("FILE NAME="+path+"\\itskiosk.udl");
adpt=new OleDbDataAdapter("Select * from NotesDataTable",conn);
DataSet dataset=new DataSet();
adpt.Fill(dataset,"NotesDataTable");
MessageBox.Show(dataset.Tables["NotesDataTable"].Rows[0][0].ToString());
What is the problem. If any body has any idea pl let me know.
Thank you.
world of intelegence
|
|
|
|
|
Try adding "ORDER BY [Column]" to your select statement
|
|
|
|
|
tahnks it is working properly know
|
|
|
|
|
check the table name that u have mentioned in C# code with the one u created
in Database.
I observed a mismatch between those two from ur query.
u might have done...
NotesdataTable in Database
NotesDataTable in C# code.
check it
venkat
|
|
|
|
|
Hi,
I want to complie my application become exe file.
Please help me.
Thanks.
|
|
|
|
|
Select Console or Winforms Application if you are using VS .NET or give the /target:winexe (GUI) or /target:exe (Console) if you are using the command line compiler.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Tran,
For a windows application, you may use:
csc /t:winexe /out:./WindowsApplication1.exe Class1.cs
For a normal console application, you can use:
csc /t:exe /out:ConsoleApplication1.exe Class1.cs
Alternatively, as the other poster has suggested, you may directly select the appropriate application project type in Visual Studio .NET New Project Dialog.
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
Hello everyone. Is there a way to export Outlook contacts from the Exchange server? I have written some code to extract the contact information through the local Oulook;however, I find it rather diffucult to apply this to the exchange server 2003. I need to export all contacts.
The reason behind this is we are making a white list at work to allow incomming emails, the problem is we have to assign someone in IT to manually export our executives contacts on a weekly basis to produce this white list.
Is there anyway around this?
thanks in advance
|
|
|
|
|
What might be the easiest way to remove all non-alphanumberic values from a string?
|
|
|
|
|
|
I am not that familar with RegEx. Can this been done with one replace call? Do you have an example?
|
|
|
|
|
This seems to work fine for me
string x = "123ABCD;233-";
x = System.Text.RegularExpressions.Regex.Replace(x, @"[^\w]", "");
This prints 123ABCD233;
You can Google for regexes that match more/less characters as you want.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks.
That was exactly what I was looking for.
|
|
|
|
|
Hi,
My program generates a log file for every event that happens in the program. So, I open the file and keep it open till the end. This is how I open the file for writing:
<br />
public CLogHandler()<br />
{<br />
this.m_fsLog = new FileStream(strTodaysLogFile, System.IO.FileMode.Append, System.IO.FileAccess.Write, System.IO.FileShare.Read);<br />
this.m_swLog = new StreamWriter(this.m_fsLog);<br />
if(this.m_swLog != null) this.m_swLog.AutoFlush = true; <br />
}<br />
<br />
pubic WriteLogMessage()<br />
{<br />
if(this.m_swLog != null) this.m_swLog.Write("[" + DateTime.Now.ToString("HH:mm:ss") + "] " + aMsg + Environment.NewLine);<br />
}<br />
One of the requirements is to display the current log file contents in a child form. So, I open the log file for reading like this :
<br />
System.IO.FileStream fs = new FileStream(this.m_strCurrentFileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read);<br />
System.IO.StreamReader sr = new StreamReader(fs);<br />
<br />
while(sr.Peek() > -1) this.DisplayLogText(sr.ReadLine() + Environment.NewLine);<br />
<br />
fs.Close(); <br />
As you see, when I open the file for writing, I'm granting FileShare.Read, which means other processes can open the file for reading. But when I try to open the file for reading, it gives IOException that the file is being used by another process.
So, how can we write and read to and from a file simultaneously in the same program (ofcourse, without stopping the write process)??
Cheers
CNU
|
|
|
|
|
The title says it all. I need to know if there is anyways to make a "copy" of a reference type.
So basically i want to know if there is a way to make a Reference Type variable act like a value type variable.
Or is the only way copy a reference type is to create a new one and then move all the info out of the old one into the new
Thanks for your help!
|
|
|
|