When gmail.google.com didn’t actually go to GMail
Sat, 21 Aug 2010 15:41:40 GMT
The other day, I logged on to my home network and entered gmail.google.com from Firefox. Imagine my surprise when I got a “landing” page with a bunch of URLs, rather than the usual spartan GMail page.
One terrifying thought followed the other. Was my machine infected? Was my WiFi router compromised? Maybe the ASDL modem? Worse, how long had it gone unnoticed?
Ok, time to take a deep breath and start isolating the problem, I figured.
I logged on from an alternate machine and found it worked fine there. I did a nslookup from the command prompt on my machine on gmail.google.com, and got back an IP address in the Google domain.
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 218.248.241.5
Name: www3.l.google.com
Address: 209.85.231.100
Aliases: gmail.google.com
More...
Why you should always dispose DataGridViews
Sun, 11 Apr 2010 09:31:28 GMT
Because your application can crash otherwise, that’s why.
While it’s always a good idea to explicitly dispose everything that is disposable, we can usually get away without disposing UI controls because
a. Complex controls aren’t created often – a single instance is often reused.
b. The finalizer kicks in and saves the day.
If you’re creating multiple instances of a System.Windows.Forms.DataGridView, however, watch out, because (b) doesn’t happen at all if you don’t call Dispose or otherwise cause the control to be destroyed.
More...
When a C++ destructor did not run – Part 2
Sat, 05 Dec 2009 10:24:24 GMT
In the previous post, we saw that linking a C++ static library compiled with /EHs to a mixed mode application prevented the destructor from running when an exception is thrown. Here’s the sample project that demonstrates the behavior, in case you aren’t convinced.
This is the code inside the library.
1: C::C()
2: {
3: cout << "Constructed" << endl;
4: }
5:
6: C::~C()
7: {
8: cout << "Destructed" << endl;
9: }
10:
11: void SomeFunc()
12: {
13: C c;
14: throw std::exception("Gone");
15: }
More...
When a C++ destructor did not run – Part 1
Fri, 04 Dec 2009 06:01:00 GMT
Consider this piece of C++ code.
1: using namespace std;
2:
3: class C
4: {
5: public:
6: C()
7: {
8: cout << "Constructed";
9: }
10: ~C()
11: {
12: cout << "Destructed";
13: }
14: };
15:
16: void SomeFunc()
17: {
18: C c;
19: throw std::exception("Gone");
20: }
More...
Wrong compiler warning? Or Not?
Tue, 01 Dec 2009 05:27:57 GMT
This piece of code results in a warning.
1: class Test
2: {
3: public static void Main()
4: {
5: object obj = "Senthil";
6: string myName = "Senthil";
7: Console.WriteLine(obj == myName);
8: }
9: }
More...