Recent content by jbunniii

  1. jbunniii

    Other What are some recommended books on human irrationality?

    Perhaps also of interest: Extraordinary Popular Delusions & the Madness of Crowds by Charles Mackay. A classic originally published in 1841, it starts with three examples of mass financial mania: the Mississippi Scheme, the South Sea Bubble, and the Dutch Tulip Mania. Then moves on to...
  2. jbunniii

    WIRED on Intl Master of Chess beat online by an Unknown Player

    Worth noting that chess.com hasn't unbanned the guy. They're pretty confident in their cheating-detection algorithms. There were apparently other suspicious indicators besides engine-accurate play: rating trend over time for all games played by the user, statistics of the amount of time spent...
  3. jbunniii

    Reddit Attacks Wall Street

    QQQ declined roughly 80% from its peak in March 2000 to its nadir in October 2002. It absolutely was that bad! Many high-flying individual stocks went all the way to zero. Unless you bought at the 2000 peak and had to sell before the S&P500 briefly reached that level again in 2007. Or between...
  4. jbunniii

    Reddit Attacks Wall Street

    The same thing happened with hundreds of stocks in the dot-com era (late 1990s). Almost all of them without justification, and almost all of them came crashing back to Earth eventually. As now, much of the hype was driven by message boards, although Reddit didn't exist at the time. The mania...
  5. jbunniii

    Anyone know SFML to answer this screen mapping question?

    Sounds like a cheap-*ss employer which fails to recognize that lost productivity is far more expensive than better equipment. Avoid such employers like the plague that they are.
  6. jbunniii

    Anyone know SFML to answer this screen mapping question?

    Indeed! More screen real estate = more productive software development. Before Covid, when I used to work at an office (remember those?), I used three displays including my MacBook Pro screen, which itself has 3072x1920 resolution. I could easily have made good use of four or even five displays...
  7. jbunniii

    Should we have a socialist grading system in colleges?

    If you give everyone the same GPA, then why have GPA's at all? They would be of no use to employers who actually do need a way to efficiently distinguish between less promising and more promising fresh-graduate applicants. (Obviously they do this in the interviews as well, but they don't have...
  8. jbunniii

    Understanding where pip saves the downloaded Python modules

    I don't see any reason why you can't uninstall the one you don't want now. If there is some technical reason, then I would suggest editing your PATH and PYTHONPATH to remove any directories associated with the Python that you don't want to use. At least Windows users have the luxury of being...
  9. jbunniii

    Understanding where pip saves the downloaded Python modules

    Do you also have two pips installed? If so, each is probably configured to install packages into a directory associated with its corresponding Python installation. If both Pythons are the same version (3.7) then they'll be able to import each other's packages if visible in your PYTHONPATH.
  10. jbunniii

    Function Template: Solve Complications with Mixing Types for Variable Swapping

    template<class T> T swapVars(&var1,&var2) { T temp = a; a = b; b = temp;} Should be: template<class T> void swapVars(T& var1, T& var2) { T temp = var1; var1 = var2; var2 = temp;} 1. You omitted the types of the arguments. 2. Your arguments are var1 and var2, but the function implementation uses...
  11. jbunniii

    Function Template: Solve Complications with Mixing Types for Variable Swapping

    template<class T> T larger(T a, T b) accepts its arguments by value. A call such as int a = 1; double d = 2.0; double maxVal = larger<double>(a, d); is permissible because the int argument a is implicitly convertible to a double. Your earlier example template <class T> void swapVars(T &var1, T...
  12. jbunniii

    My destructor is causing my program to crash

    Using smart pointers avoids problems with mismatched new/delete. #include <memory> #include <string> #include <vector> class HasPtr { friend void swap(HasPtr&, HasPtr&); public: HasPtr(const std::string &s = std::string()): ps(std::make_unique<std::string>(s)), i(0) {} HasPtr(const...
  13. jbunniii

    C/C++ Question on this program with exception C++

    What if you put a breakpoint on the line cout<<" Destructor MoreTrouble.\n\n"; Does the debugger stop there if you do that?
  14. jbunniii

    C/C++ Question on this program with exception C++

    Yes, in your case it doesn't make a difference because you're not managing a BigTrouble object via a pointer to MoreTrouble. An example where it would matter is as follows: // Perfectly legal to use BigTrouble // via a pointer to its base class MoreTrouble MoreTrouble* pMT = new BigTrouble; ...
  15. jbunniii

    C/C++ Question on this program with exception C++

    MoreTrouble is also being used as a base class! class BigTrouble : public MoreTrouble I see the message Destructor MoreTrouble printed three times: see copy of your image below. How many times do you expect to see it? Two possible reasons come to mind for unexpected step behavior using the...
Back
Top