It works again. Thanks.
Kim Togo
Posts
-
Q&A - Comments are not showing. -
Q&A - Comments are not showing.It is exactly the same as I experience it.
-
Q&A - Comments are not showing.When I view Q&A, comments is not showing. But if I add a comment, I can see all other comments until next navigation in Google Chrome ?
-
Detecting USB devicesI would use WMI for that task. How To: (Almost) Everything In WMI via C# - Part 3: Hardware[^]. Example:
// Create event query to be notified within 1 second of
// a change in a service
WqlEventQuery query = new WqlEventQuery(eventName,
new TimeSpan(0, 0, 1),
"TargetInstance isa \"Win32_USBControllerDevice\"");// Initialize an event watcher and subscribe to events that match this query
EventWatcher = new ManagementEventWatcher();
EventWatcher.EventArrived += eventHandler;
EventWatcher.Query = query; -
try to throw and catch.Was troubleshooting some code in C# and came across this: This is not the original code, but just to give an idea of what happens.
try
{
Console.WriteLine("enter try catch");
try
{
Console.WriteLine("enter try finally");
throw new Exception("try-finally exception");
Console.WriteLine("exit try finally");
}
finally
{
Console.WriteLine("finally called");
}
Console.WriteLine("exit try catch");
}
catch (Exception ex)
{
Console.WriteLine("exception: " + ex.Message);
}Output is:
enter try catch enter try finally finally called exception: try-finally exception
The problem was thatexit try catch
was never called. I think the person that has written the code believed that a try-finally has implicit catch. -
Suggestion: Top 10 on questions and answers.Just an idea to Q&A. Q&A is something new to me, but I see many repeating questions and that is very fair :) It could be cool to make a top 10 of the must common questions like: networking, database access etc etc.. The idea started here http://www.codeproject.com/Answers/203204/set-manually-task-on-cores-in-csharp.aspx#answer1[^]
-
VS2005 Query Builder hangs With MySQLThe MySql ODBC Connector v3.51 is a very old driver. The latest is version 5.1. http://dev.mysql.com/downloads/connector/odbc/[^], check it out. I think it will solved your problem :-)
-
To go 64 or not?Go for the 64 bit. Code that runs fin under 32 bit, may have some issue in 64 bit. You have nothing to lose and but much to gain :-)
-
With in the end of the month...... Mono Droid .net offer expire on May 31, 2011. http://mono-android.net/[^] We already have MonoTouch for iPhone and iPad. My question, is it a No-brainer to buy Mono for Android and save 50% on the price? Has any one had good or bad experience on MonoDroid ? - We have a hope of being able to recycle as much of the code that we use on MonoTouch on MonoDroid.
-
Windows 7 Performance Score = 7.45Upgraded my old Samsung Spinpoint 400GB to an OCZ Vertex2 3.5" 128GB. Performance score for my primary hard disk is: 7.7 A known that SSD is expensive. But boy what a performance boot that you can give an old computer! Now i got a SSD 128GB + a data storage HDD at 2TB. SSD, try it, love it.
-
C# program to block user input(both mouse and keyboard) until a specific keyword(password) is enteredAbsolute the best solution.
-
Gaming mouse recommendations?Logitech G500 :thumbsup: rocks! The best mouse ever, a mouse not only for gaming, but for all applications. :)
-
Should I get a new computer at work?Get a new computer :-) Intel Xeon processor 64 bit 12GB RAM DDR3 80GB SSD disk (System disk) + 1TB archive drive Windows 7 64 bit And NVIDIA Quadro NVS 450 card, can connect 4 displays. Check out Dell Precision T3500 :-) Kind regards Kim
-
How can i detect that the system has just restarted/powered onThe problem is. I have made a Win32 service application witch is set to automatic start up. For some reaches, the application unexpectedly terminates. But when I start the application with Service Manager is starts with out errors. But I have thought about this function, witch can tell me how long the system has been up an running. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/gettickcount.asp Then I will try to make a delay for about 10 seconds. when system up time is less then 10 minutes. /Kim
-
How can i detect that the system has just restarted/powered onHi.. Is it possible to detect that Windows has restated or has just been powered on? Kind regards /Kim