|
The short answer is no. A possible solution is here[^] though.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
The slight longer than short answer is if you have two threads deadlocked, how is your code going to even execute to find out which thread has the lock tied up??
Another issue is that since you can have two objects holding locks on each other, waiting indefinately, the owner of the lock(s) would be correct. It's the poor design of the locking scheme that's the problem.
|
|
|
|
|
I need to parse a CSV file and match it with the first line of CSV with my table field.
(eg My first line of Csv file will be like this
Venue Event Date Cost Quantity Notes
my database table fields will be
Venue Event Date Notes Quantity Cost.
I need to match because the order of CSV file will change . Can any one help me to match fields. My table fields and Csv fields will be same only. Pardon me if my presentation is wrong. Thanks in advance.
|
|
|
|
|
When you have the fields in the file, surely you should be able to iterate over them and match them with those in the DB?
Cheers,
विक्रम
And sleep will come, it comes to us all
And some will fade and some will fall
|
|
|
|
|
|
Hi all,
I'm trying to create a login that should use Windows Authentication.
This is what I have done so far:
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
if (Login1.UserName == "admin" && Login1.Password == "admin")
e.Authenticated = true;
}
So how can I authenticate the username and password with the windows logon??
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
just use win32 api to impersonate with your user credentials.
try something like
[DllImport("advapi32.dll", CharSet=CharSet.Auto)]<br />
public static extern int LogonUser(String lpszUserName,<br />
String lpszDomain,<br />
String lpszPassword,<br />
int dwLogonType,<br />
int dwLogonProvider,<br />
ref IntPtr phToken);
regards
j.
|
|
|
|
|
Hello,
I am developing C# application which is having some hardware dependencies. While initializing application in one of my class i am starting all harware threads. When i modify some settings i need to restart the application.
How can i make sure that all threads should be killed before doing Application.Restart()?
Is their any way which will kill all running threads simultaneously instead of killing specific threads one by one.
Thanks.
|
|
|
|
|
gajesh wrote: Is their any way which will kill all running threads simultaneously instead of killing specific threads one by one.
i suspect there no other way to do this. You need to kill one by one. Where you are storing the thread objects ? You can loop through this and stop all.
|
|
|
|
|
Erhm, a background thread (set the IsBackground property to true) will be killed automatically as soon as the 'main' process is killed. I'm not sure if this also goes for Application.Restart();
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
Thanks Eduard.
You are correct, Application.Restart() is not killing main process.
|
|
|
|
|
How to calculate the Daily,Weekly & Monthly time Duration from breaktime (i.e.,calculated from Outtime & Intime)?
Breaktime Code
TimeSpan minus = (TimeSpan.Parse(txtin.Text) - TimeSpan.Parse(txtout.Text));<br />
txtdur.Text = Convert.ToString(minus);
A.W.Abdul Sathar
|
|
|
|
|
Use Substract method of TimeSpan class.
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
Now I understand I can use
System.Diagnostics.Process.Start("http://some.url.com");
to launch the default browser and navigate to a specific page, and I also understand that I can launch a specific browser, which will then go to the default home page using
System.Diagnostics.Process.Start("iexplore");
However, is there a means of launching the default browser to the default homepage? (without checking the registry to see what the default browser is preferably)
Perhaps there's some special url I can navigate to (like about:blank, but representing the default homepage)
I have no blog...
|
|
|
|
|
Erhm, the default browser setting is stored in the registry, su you'll need to check the registry in order to find the default browser.
Why don't you want to check the registry?
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
Eduard Keilholz wrote: Please vote my message! Click on one of the numbers beside 'Rate this message'.
That's lame...
|
|
|
|
|
I voted. I don't think he'll be happy, but I voted.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
True. He solicited a number near 'Rate this message'. And the most nearest number was '1'.
|
|
|
|
|
Click on one of the numbers beside 'Rate this message'.
Always happy to oblige
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Eduard Keilholz wrote: Click on one of the numbers beside 'Rate this message'
So the most nearest number and that which was specified in your request was granted, which is also the 'Univoter ' Fame: 'The Unique Number One '
|
|
|
|
|
I think you'll have to check the registry to see which application is registered by default to open the htm/html files and launch that one. Another option in to use PInvoke. I think the function needed is FindExecutable from shell32.dll. See www.pinvoke.net[^] for more info on that.
|
|
|
|
|
System.Diagnostics.Process.Start("about:home");
works for me. but then iexplore is my default browser so i'm not sure about other browsers but maybe you can test?
If it' stuck, DO NOT pull harder!
|
|
|
|
|
Works in ie, no go in FF, that's the sort of thing I'm looking for though thanks!
I have no blog...
|
|
|
|
|
I have a database query that will, for purpose of discussion, return either 1, 2 or 3 results. It could be any of these sizes.
I also have an array with 3 values in it. This is fixed.
I want to loop from i = 0 to 2 and compare a field's value from query row i to the value in array row i and do something if they match and do something different if they don't.
However, since I will always be looping 3 times and sometimes my query result will only have 1 or 2 rows in it, how do I check to see if the query row index exists before I go forward with the comparison?
Something along the lines of IfExists(mydata.Rows[0]) == TRUE is what I'm looking for. Any ideas? Thanks in advance! -Kari
|
|
|
|
|
store 1,2 and 3 in ArrayList.
Arraylist has one method to check value is contains or not.
Arr.Contains(mydata.Rows[0]);
bEST rEGARD
pATHAN
---------------------------------------------------
|
|
|
|