Unexpected Error 0×8ffe2740 Occurred

November 26th, 2007

“Unexpected Error 0×8ffe2740 Occurred” – this message appeared today on my PC when I was trying to start IIS. A while of “googling” revealed that this is rather normal behavior of the server :)

According to http://support.microsoft.com/kb/816944 this error occurs when some other application uses port 80 (default for a web server).

Instead of expressive error message they create KB article with explanations :)

Vomit C++

November 17th, 2007

Few days ago I found very interesting piece of code in polish usenet. The code is correct and it works fine but it looks like... yes, like vomit. C++ programmers, can I have a request? Please, do not move features from other languages that we can live without, to the C++.

C++:
  1. void increment(int &i)
  2. {
  3.     ++i;
  4. }
  5.  
  6. static void test1()
  7. {
  8.     boost::function<void (int &)> add1=::increment;
  9.     std::vector<std::vector<int>> vec(10, std::vector<int>(10, 2010));
  10.     std::for_each(vec.begin(), vec.end(), boost::lambda::bind(boost::lambda::ll::for_each(),
  11.                 boost::lambda::bind(boost::mem_fn((std::vector<int>::iterator(std::vector<int>::*)())
  12.                         &std::vector<int>::begin), boost::lambda::_1),
  13.                 boost::lambda::bind(boost::mem_fn((std::vector<int>::iterator(std::vector<int>::*)())
  14.                         &std::vector<int>::end), boost::lambda::_1),
  15.                 add1));
  16.     std::for_each(vec.begin(), vec.end(), boost::lambda::bind(boost::lambda::ll::copy(),
  17.                 boost::lambda::bind(boost::mem_fn((std::vector<int>::iterator(std::vector<int>::*)())
  18.                         &std::vector<int>::begin), boost::lambda::_1),
  19.                 boost::lambda::bind(boost::mem_fn((std::vector<int>::iterator(std::vector<int>::*)())
  20.                         &std::vector<int>::end), boost::lambda::_1),
  21.                 std::ostream_iterator<int>(std::cout, " ")));
  22.     std::cin.get();
  23. }

Designed by SirMike © All rights reserved

Valid XHTML 1.0! Valid CSS!

Powered by Rootnode