Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
GoingNative 8: Introducing Casablanca - A Modern C++ API for Connected Computing
May 03, 2012 at 10:27 AM@benjaminLindley: Ah, that makes sense. Looking at the interface, it appears the solution is to return a const ref to the underlying field map and/or element vector and use their find/at functions:
auto& fields = jobject.fields(); auto iter = fields.find("id"); if (iter != fields.end()) id = static_cast<int>(iter->second.as_double());The field map is implemented as stdext::hash_map - wonder why no std::unordered_map?
GoingNative 8: Introducing Casablanca - A Modern C++ API for Connected Computing
May 03, 2012 at 1:19 AMThis is a really nice library, something that I would love to see in the standard. The client code I wrote was really simple and clean. You really start to see the goodness of C++11 when you use a library like this.
One comment - is there a reason why the field/key operators in the json::value class only return by reference and not by const reference as well?
Something like this:
void kung_foo(json::value const& jobject) { int id = static_cast<int>(jobject["id"].as_double()); }won't compile.
Channel 9 now has a Windows 8 app!
Apr 19, 2012 at 12:00 PMAnother suggestion about horizontal scrolling that's bugging me. (not only in your app but others)
1) On the main page, scroll right so that something like the "Shows" group is near the middle of the screen. The horizontal scrollbar position should be about 2/3rds of the way across now.
2) Click on one of the items in the Shows group.
3) Once the item is opened, click the Back button.
When you return to the main page, the horizontal scrollbar is reset to the far left position when, in my opinion, it should be at the same place it was at the end of step 1.
Windows 8 Consumer Preview Demo
Mar 05, 2012 at 3:29 AMWhat is it specifically you're switching from/to? (which apps/services)
Ping 133: Googlighting, Lumia Bundle, Facebook & Bing, Visual Studio 11 Beta
Feb 29, 2012 at 6:23 AMMoonlighting - hey, there's a modern show people can relate to.
What's the future plan, to attack Apple using a Little House on the Prairie parody?
Writing modern C++ code: how C++ has evolved over the years
Sep 17, 2011 at 9:01 PMGeddy Lee pushed to the back of a vector. Now I've seen everything...
Is there a table anywhere that lists all the classes/algorithms/etc. that have been added to the std:: library?
C9 Lectures: Stephan T Lavavej - Advanced STL, 5 of n
May 22, 2011 at 2:03 PMSomething I just remembered - if you want a quick and easy way to start using boost, this site provides an installer for the headers and pre-built binaries: (VS2003-VS2010, 32-bit only)
http://www.boostpro.com/download/
The path class supports multiple character types. So you can replace these:
with this:
One function instead of one for each string type you need to support.
http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/reference.html#class-path
C9 Lectures: Stephan T Lavavej - Advanced STL, 5 of n
May 20, 2011 at 9:49 AMBoost is truly great, not just from a content standpoint, but in how fast they release new versions/updates. I'm using it primary for TR1 support, but there's alot of other excellent stuff I've used:
I'm off to try mapped files, something I can use that I wasn't aware of - thanks Thomas.
Why not just return the pointer?
vert3 const* Foo::vertices_data() const { if (_vertices.empty()) throw std::runtime_error("See Effective STL, item 16"); return &_vertices[0]; } ... Foo foo; vert3 const* data = foo.vertices_data();Tony Goodhew: VC++ Developer Communication - Questions and Answers
Mar 03, 2011 at 8:55 PMWhat I'd like to see is a stand-alone VC++ product like you had back in the 90s. (I think it was called VC++ Pro?) I never understood why you guys deviated from that - is it really fair that I have to pay for C#, VB and whatever other .Net language is in VS Pro when I have no use for them? It's like being forced to buy the Godfather boxset when all I want is I and II. (Clarification: I'm not saying C#/VB quality = Godfather III quality, I'm simply saying I don't use them)
MFC - I think it's the best c++ option when you want an app that looks and feels like a Windows app. As others have said, the big problem is the code feels too non-standardish and outdated. I think even Qt suffers from this, but not quite to the same extent. It would be great to see std::containers, algorithms, etc. used in the MFC library, as well as some refactoring to use some of the current popular design patterns. (say, MVC)
C++0x - My guess is that it will be a good 3+ years before you can write code that's truly transparent across the major platforms/compilers, and I don't really see the point in writing C++0x based code until then. (I can get by with current standard + boost for now)
But, since you are looking for input, the items I prefer from the new standard are the ones that decrease verbosity - initializer lists, range-based for loops, constructors calling other constructors, data member initialization, etc. The less typing, the better IMO.