Archive for the ‘C++’ Category

C++ trailing return type

Montag, März 31st, 2025

Beispiel:
auto CClass::HasMultipleItems() -> bool {
return m_veciMember.size() > 1;
}

https://en.wikipedia.org/wiki/Trailing_return_type

C++ Lambda Captures

Freitag, März 7th, 2025

The difference is how the values are captured

  • & captures by reference
  • = captures by value
  • Example:

    int x = 1;
    auto valueLambda = [=]() { cout << x << endl; };
    auto refLambda = [&]() { cout << x << endl; };
    x = 13;
    valueLambda();
    refLambda();

    This code will print:

    1
    13

    https://stackoverflow.com/questions/21105169/is-there-any-difference-betwen-and-in-lambda-functions
    https://en.cppreference.com/w/cpp/language/lambda

    Ubuntu: Qt QML QtQuick installieren

    Donnerstag, Januar 16th, 2025

    sudo apt install qtcreator qtbase5-dev qt5-qmake cmake qtdeclarative5-dev qml-module-qtquick-controls

    Qt: Inhalt einer QMap ausgeben

    Donnerstag, Mai 2nd, 2024

    Beispiel:

    for(auto key : themap.keys())
    {
    qDebug() << key << ":" << themap.value(key); }

    The Fear Of Adding Classes

    Mittwoch, Juli 1st, 2020

    http://wiki.c2.com/?FearOfAddingClasses

    GUID erzeugen (MinGW)

    Donnerstag, Mai 9th, 2019
    
    #define APPGUID "XXXXXXXX-49DC-452D-BD0A-4318719DE9B9"
    // mit uuidgen erzeugt
    
    static bool TestAppRunning()
    {
      bool r = false;
    
      #ifdef _WIN32
      CreateMutexA(NULL, TRUE, APPGUID)
      if (GetLastError() == ERROR_ALREADY_EXISTS)
      {
        r = true;
      }
      #endif
      return r;
    }
    
    
    
    
    

    Neuronale Netzwerke – Links

    Freitag, Juli 20th, 2018

    https://www.learnartificialneuralnetworks.com/neural-network-software/backpropagation-source-code/

    https://www.tensorflow.org/versions/r1.0/get_started/mnist/beginners

    http://yann.lecun.com/exdb/mnist/

    https://www.youtube.com/watch?v=aircAruvnKk&list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi

    Projection / Projection Library

    Dienstag, Dezember 5th, 2017

    http://proj4.org

    Qt 5.7.0 Installer-Pakete herunterladen

    Freitag, April 22nd, 2016

    http://download.qt.io/official_releases/qt/5.12

    https://download.qt.io/official_releases/qt-installer-framework/

    Quake auf Raspberry PI compilieren

    Montag, März 14th, 2016

    http://www.raspbian.org/RaspbianQuake3