Month: March 2018

Genetic algorithm part 1: basic

Content page Part 1: Basic Genetic algorithm Part 2: Getting sample price data & ta-lib for node.js Part 3: Preparing important indexes/values Part 4: Portfolio selection; Target: outperform the market by 15%; not good enough Part 5: Evolution Strategy Part 6: Building Classifiers, buy, sell or hold? Part 7: to be announced note: I may revise content



Qt:Parsing a nested JSON

QJsonDocument doc; doc = QJsonDocument::fromJson(“{ ” ” \”city\”: \”London\”, ” ” \”time\”: \”16:42\”, ” ” \”unit_data\”: ” ” [ ” ” { ” ” \”unit_data_id\”: \”ABC123\”, ” ” \”unit_data_number\”: \”21\” ” ” }, ” ” { ” ” \”unit_data_id\”: \”DEF456\”, ” ” \”unit_data_number\”: \”12\” ” ” } ” ” ] ” ” }”); // This


Qt – Menu Bar with QMainWindow

Menu demo code Main.h #ifndef _MAINWINDOW_H #define _MAINWINDOW_H #include “ui_MainWindow.h” #include “Agents.h” class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(); virtual ~MainWindow(); private: Ui::MainWindow widget; Agents *agents; private slots: // functions void InitClass(); void InitConnect(); void FormClose(); void Agents(); }; #endif /* _MAINWINDOW_H */   Main.cpp #include “MainWindow.h” MainWindow::MainWindow() { widget.setupUi(this); InitClass(); InitConnect(); }


Creating Carthage for your iOS project

What is Carthage It is dependency package manager for iOS development and it is not intrusive like Cocoapod. Installation brew carthage How to create a Cartfile? To go the root of your project, create a file called Cartfile. github “Realm/realm-cocoa” == 3.2 github “SwiftyJSON/SwiftyJSON” ~> 4.0 Format origin UserName/Project ~> dependencyVersion == 1.0 means “Use exactly


iOS Tutorials

Creating iOS Framework and use Cocoapods for distribution https://www.raywenderlich.com/126365/ios-frameworks-tutorial Set up Carthage for distribution https://www.raywenderlich.com/165660/carthage-tutorial-getting-started-2


Qt 4.8.x and Netbean 8.x on windows 10 with MinGW

It has been a while and no one really write this post. Netbeans 8.x https://netbeans.org/downloads/ Msys http://www.msys2.org/ MinGW https://sourceforge.net/projects/mingw/ Qt open-source x86 MinGW 4.8.7 for Windows https://download.qt.io/official_releases/qt/4.8/4.8.7/ qt-opensource-windows-x86-mingw482-4.8.7.exe   Qt open-source x86 MinGW 5.10.1 for Windows https://download.qt.io/archive/qt/5.10/5.10.1/single/   Environmental Path Add C:\Mingw\bin and [qt installation root]/bin to your Windows environment Path   Including Runtime Library Copy the stdc++ file


React.js – Central State Control: React-Redux

Content Page Installation Basic Introduction – Kickstarter Sonic boom your UI with Bootstrap 4 – Reactstrap Passing data with Props / State and lifecycle Navigation with React-Router Debugging Tool with React Development Tool Central State Control: Redux Hands-on time Calculated Data with Reselect Making a form with ReduxForm Refs GraphQL Get a serious in-depth book