Olivier Langlois's blog - Last comments
http://blog.olivierlanglois.net/index.php?disp=comments
en-CAhourly12000-01-01T12:00+00:00In response to: Optimizing C++ code for Intel processors (and possibly many others)
http://blog.olivierlanglois.net/index.php/2007/11/25/optimizing_c_code_for_intel_processors_a#c4459
2012-08-15T03:02:02ZMaurizio [Visitor]if( ptr != NULL )
{
delete ptr;
ptr = NULL;
}
should be changed to:
delete ptr;
ptr = NULL;
This is plainly wrong when talking optimizations as the "delete ptr" statement will most likely turn into a function call to the delete operator, which will at the bare minimum check that ptr is not null before looking into the memory heap data structures.
{
delete ptr;
ptr = NULL;
}
should be changed to:
delete ptr;
ptr = NULL;
This is plainly wrong when talking optimizations as the "delete ptr" statement will most likely turn into a function call to the delete operator, which will at the bare minimum check that ptr is not null before looking into the memory heap data structures.]]>In response to: Linksys Wireless-N Gaming Router WRT330N model review
http://blog.olivierlanglois.net/index.php/2010/12/05/linksys_wireless_n_gaming_router_wrt330n#c1042
2011-09-02T06:18:40ZRMP [Visitor]Nice post. It helped me to find the issue why PS3 is hanging when we send media files via chunking..In response to: Distributed Systems: Concepts and Design (4th Edition)
http://blog.olivierlanglois.net/index.php/2010/03/28/distributed_systems_concepts_and_design_#c863
2011-05-24T22:55:39Zmarwan ahmed abdelhady [Visitor]nice bookIn response to: Compiler Design in C
http://blog.olivierlanglois.net/index.php/2007/06/02/compiler_design_in_c#c856
2011-05-17T14:01:19ZTurbo Pascal Fan [Visitor]Another good resource on compiler design
http://turbopascal.org/
http://turbopascal.org/]]>In response to: NAT traversal for the dummies and the best NAT router for online gaming
http://blog.olivierlanglois.net/index.php/2007/05/23/nat_traversal_for_the_dummies_and_the_be#c714
2011-03-21T06:49:52Zlano1106 [Member]I went to see the youtube video for the top 10 gaming routers. I have to disagree with the top 1 choice which is a router that I got problems with:
http://blog.olivierlanglois.net/index.php/2010/12/05/linksys_wireless_n_gaming_router_wrt330n
IMO, Netgear products are of higher quality.
http://blog.olivierlanglois.net/index.php/2010/12/05/linksys_wireless_n_gaming_router_wrt330n
IMO, Netgear products are of higher quality.
]]>In response to: NAT traversal for the dummies and the best NAT router for online gaming
http://blog.olivierlanglois.net/index.php/2007/05/23/nat_traversal_for_the_dummies_and_the_be#c713
2011-03-21T01:21:51ZXBox Repair Chicago [Visitor]Today this problem is almost gone, most routers are now RFC 4787 compliant. Great fix for the problem and those who have older routers can now game in peace. In response to: NAT traversal for the dummies and the best NAT router for online gaming
http://blog.olivierlanglois.net/index.php/2007/05/23/nat_traversal_for_the_dummies_and_the_be#c676
2011-02-15T14:32:39ZEducational Games Online [Visitor]Check out this vid on Top Routers for Gaming 2011 at http://www.youtube.com/watch?v=kASW1o4hImE. Get some ideas then do some more research after, get the info straight and get it right the first time. In response to: Graph breadth-first traversal algorithm C++ implementation
http://blog.olivierlanglois.net/index.php/2010/08/24/graph_breadth_first_traversal_algorithm_#c396
2010-10-12T06:10:58Zstephen [Visitor]Cool, I thought the interview was an all day affair hence my question about payment.
]]>In response to: Graph breadth-first traversal algorithm C++ implementation
http://blog.olivierlanglois.net/index.php/2010/08/24/graph_breadth_first_traversal_algorithm_#c394
2010-10-11T19:18:17Zlano1106 [Member]Stephen,
You have about 30 minutes, maybe less than that to produce the program. That being said, I am not even sure that I had a working program during the alloted time. and no, they do not pay you for your time like any interviews in any company that I know and IMO, this is the right thing to do.
I have considerably embellished the program once I decided that I would publish it on my website. With all the comments, and all the cool STL usages within the program, I would say that I spent a good evening to bring the program as it is now.
You have about 30 minutes, maybe less than that to produce the program. That being said, I am not even sure that I had a working program during the alloted time. and no, they do not pay you for your time like any interviews in any company that I know and IMO, this is the right thing to do.
I have considerably embellished the program once I decided that I would publish it on my website. With all the comments, and all the cool STL usages within the program, I would say that I spent a good evening to bring the program as it is now.
]]>In response to: Graph breadth-first traversal algorithm C++ implementation
http://blog.olivierlanglois.net/index.php/2010/08/24/graph_breadth_first_traversal_algorithm_#c393
2010-10-11T15:01:52ZStephen Reis [Visitor]Never had any interview where I was asked to write a program. Did that take you long to create Olivier; if ever it did facebook paid your time? Just asking out of curiosity.In response to: Logitech Quickcam Fusion
http://blog.olivierlanglois.net/index.php/2007/10/30/logitech_quickcam_fusion#c249
2010-04-03T17:28:47Zendorphin [Visitor]Have the same problem with software. After using official software XP becomes unstable.
Now, trying fix this not welcome problem
Now, trying fix this not welcome problem]]>In response to: TCP RST flag subtleties
http://blog.olivierlanglois.net/index.php/2010/02/06/tcp_rst_flag_subtleties#c246
2010-03-26T12:42:29ZJoe Beckner [Visitor]Thank you, you are right, the router with IOS Firewall is doing NAT/PAT on the single IP address of the outside T1 interface. So the Google servers will see all users with the same IP address and different TCP port numbers. I will take a look at this some more.In response to: TCP RST flag subtleties
http://blog.olivierlanglois.net/index.php/2010/02/06/tcp_rst_flag_subtleties#c244
2010-03-26T10:47:39Zlano1106 [Member]Hi John,
it seems to be different. In the scenario I am describing, the client TCP/IP stack do receive the server reply. It is the application that do not sees it because a RST is immediately following the reply and is received by the TCP/IP stack before the application has the chance to read the reply from the stack.
This is not the problem that you have because if it was, you would see the reply precedes the RST segment with Wireshark.
In your situation, if you were asking me my opinion, I would suspect your router to be a NAT device and gmail server must have an internal limit that makes it refuse a single IP address to initiate more than a certain number of connections to protect itself against spammers.
I see some avenues to solve the problem:
1. If possible, configure your router to have more than 1 public IP address on the external NIC and make the router NAT module load balance the connections among the available public IP addresses.
2. Here is what my DNS server returns me for gmail.com:
Non-authoritative answer:
Name: gmail.com
Address: 72.14.204.17
Name: gmail.com
Address: 72.14.204.18
Name: gmail.com
Address: 72.14.204.19
Name: gmail.com
Address: 72.14.204.83
You could tweek your DNS server to let it do the load balance for your users.
Please report back here if this has helped you to fix the problem.
it seems to be different. In the scenario I am describing, the client TCP/IP stack do receive the server reply. It is the application that do not sees it because a RST is immediately following the reply and is received by the TCP/IP stack before the application has the chance to read the reply from the stack.
This is not the problem that you have because if it was, you would see the reply precedes the RST segment with Wireshark.
In your situation, if you were asking me my opinion, I would suspect your router to be a NAT device and gmail server must have an internal limit that makes it refuse a single IP address to initiate more than a certain number of connections to protect itself against spammers.
I see some avenues to solve the problem:
1. If possible, configure your router to have more than 1 public IP address on the external NIC and make the router NAT module load balance the connections among the available public IP addresses.
2. Here is what my DNS server returns me for gmail.com:
You could tweek your DNS server to let it do the load balance for your users.
Please report back here if this has helped you to fix the problem.
]]>In response to: TCP RST flag subtleties
http://blog.olivierlanglois.net/index.php/2010/02/06/tcp_rst_flag_subtleties#c243
2010-03-26T09:59:42ZJoe Beckner [Visitor]I think I am experiencing the problem you are referring to in this blog.
I should preface my comment by stating that I am not a software programmer, I am a network hardware person who sells, install and maintains Cisco network switches, routers and firewalls for small and medium businesses.
I am troubleshooting an intermittent problem for a client who has about 100 users on gmail. They experiencing intermittent periods where one or more users cannot access their gmail. All other internet traffic (web, etc.)is ok. Resetting the Cisco3825 router firewall on the T1 line clears the problem. I did not believe that this was really a router problem. All sessions are terminated when the router restarts which is probably why it clears.
I have some Wireshark captures from when users are experiencing problems. What I am seeing is an immediate TCP RST coming back from the Google gmail server after the successfull TCP 3 way session initiation for HTTPS. There are no HTTP codes coming back from the server. This repeats over and over.
I should preface my comment by stating that I am not a software programmer, I am a network hardware person who sells, install and maintains Cisco network switches, routers and firewalls for small and medium businesses.
I am troubleshooting an intermittent problem for a client who has about 100 users on gmail. They experiencing intermittent periods where one or more users cannot access their gmail. All other internet traffic (web, etc.)is ok. Resetting the Cisco3825 router firewall on the T1 line clears the problem. I did not believe that this was really a router problem. All sessions are terminated when the router restarts which is probably why it clears.
I have some Wireshark captures from when users are experiencing problems. What I am seeing is an immediate TCP RST coming back from the Google gmail server after the successfull TCP 3 way session initiation for HTTPS. There are no HTTP codes coming back from the server. This repeats over and over.]]>In response to: What is the C++ SFINAE principle ?
http://blog.olivierlanglois.net/index.php/2007/09/01/what_is_the_c_sfinae_principle#c212
2009-08-31T20:22:24Zlano1106 [Member]Michal,
To be honest, I had an intellectual understanding of the example I was giving but I have
never bothered to compile it to see if it works until today.
I have tried to compile it with gcc 3.4.4 and I get the same error message. I will try to
find an answer and post it if possible.
Thank you for the comment.
To be honest, I had an intellectual understanding of the example I was giving but I have
never bothered to compile it to see if it works until today.
I have tried to compile it with gcc 3.4.4 and I get the same error message. I will try to
find an answer and post it if possible.
Thank you for the comment.
]]>In response to: What is the C++ SFINAE principle ?
http://blog.olivierlanglois.net/index.php/2007/09/01/what_is_the_c_sfinae_principle#c211
2009-08-31T01:29:18ZMichal [Visitor]Hallo Olivier.
Thank You for Your example.
So far I am trying to understand how it works.
Unfortunatelly I have problem with preliminary step: it does not compile on my linux box (g++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)).
I get the following error:
p41.cpp:12: error: expected primary-expression before ">" token
Line 12 in my program is the following:
enum { Yes = sizeof(IsClassT...::test....(0)) == 1 };
(sorry for modifications in line above, but I couldn't put template parameter T in Your page, because they have a format of tag).
have You got idea why doesn't it compile?
best regards
Michal
Thank You for Your example.
So far I am trying to understand how it works.
Unfortunatelly I have problem with preliminary step: it does not compile on my linux box (g++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)).
I get the following error:
p41.cpp:12: error: expected primary-expression before ">" token
(sorry for modifications in line above, but I couldn't put template parameter T in Your page, because they have a format of tag).
have You got idea why doesn't it compile?
best regards
Michal]]>In response to: CLOSE_WAIT vs TIME_WAIT
http://blog.olivierlanglois.net/index.php/2008/06/05/close_wait_vs_time_wait#c205
2009-05-14T16:36:21ZAltosAce [Visitor]Funny that you asked why in a TIME WAIT state, the time out period is not 2*MSL. Actually, if you look at the diagram of TCP finite state machine (12 states), the Timeout is indicated to be 2MSL (towards the bottom, right next to TIME WAIT state). (In my case, the state digram is in the back inside cover of Inside TCP/IP book by K Siyan).In response to: UNIX Network Programming: Networking APIs: Sockets and XTI; Volume 1, Second edition
http://blog.olivierlanglois.net/index.php/2008/07/06/unix_network_programming_networking_apis#c190
2009-03-12T19:39:48Zlano1106 [Member]How is the sock variable initialized? It must be a variable returned from the socket() function.
]]>In response to: UNIX Network Programming: Networking APIs: Sockets and XTI; Volume 1, Second edition
http://blog.olivierlanglois.net/index.php/2008/07/06/unix_network_programming_networking_apis#c189
2009-03-10T00:44:32Ztanixmukherzee [Visitor]hi prasanna i am having a problem with connect function...
i dont know why...
i m giving u the code here..plz help me...
if ((conn=connect(sock,(struct sockaddr *)&server_addr,sizeof(struct sockaddr)))<0)
{
printf("error entered");
getchar();
perror("Connect");
exit(1);
}
the problem is i am having an error like...socket operation on non-socket...
can u help me out...the server program is okay...)
i dont know why...
i m giving u the code here..plz help me...
the problem is i am having an error like...socket operation on non-socket...
can u help me out...the server program is okay...)]]>In response to: XML Schema - The W3C's Object-Oriented Descriptions for XML
http://blog.olivierlanglois.net/index.php/2008/08/04/xml_schema_the_w3c_s_object_oriented_des#c184
2009-01-06T11:39:03ZSimon Sprott [Visitor]This is a great book for learning the XSD standard.
Couple this with a good XML Schema Editor like Liquid XML Studio, and you'll learn the basics of the standard in no time.
The split code/diagram view provides the feedback required to quickly learn the effects on the XSD code as the documents structure changes.
Couple this with a good XML Schema Editor like Liquid XML Studio, and you'll learn the basics of the standard in no time.
The split code/diagram view provides the feedback required to quickly learn the effects on the XSD code as the documents structure changes.]]>