This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QT += core gui webkitwidgets | |
TEMPLATE = app | |
TARGET = QWebView_html-to-cpp | |
INCLUDEPATH += . | |
HEADERS += mainwindow.h jsobj.h | |
SOURCES += main.cc mainwindow.cc jsobj.cc | |
CONFIG += c++11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QT += core gui webkitwidgets | |
TEMPLATE = app | |
TARGET = QWebView_cpp-to-html | |
INCLUDEPATH += . | |
HEADERS += mainwindow.h jsobj.h | |
SOURCES += main.cc mainwindow.cc jsobj.cc | |
CONFIG += c++11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QCoreApplication> | |
#include <QJsonDocument> | |
#include <QJsonObject> | |
#include <QDebug> | |
int main(int argc, char *argv[]) { | |
QCoreApplication a(argc, argv); | |
auto json = QJsonDocument::fromJson(QByteArray(R"( | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QCoreApplication> | |
#include <QJsonDocument> | |
#include <QJsonObject> | |
#include <QJsonValue> | |
#include <QString> | |
#include <QDebug> | |
class JsonValue : public QJsonValue { | |
public: | |
JsonValue(QJsonValue&& value) : QJsonValue(value) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QT += core gui webkitwidgets | |
TEMPLATE = app | |
TARGET = QWebView_exchange-value | |
INCLUDEPATH += . | |
HEADERS += mainwindow.h jsobj.h | |
SOURCES += main.cc mainwindow.cc jsobj.cc | |
CONFIG += c++11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QT += core gui webkitwidgets | |
TEMPLATE = app | |
TARGET = QWebView_dom | |
INCLUDEPATH += . | |
HEADERS += mainwindow.h | |
SOURCES += main.cc mainwindow.cc | |
CONFIG += c++11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if !defined HELPER_HPP | |
#define HELPER_HPP | |
#include <codecvt> | |
#include <locale> | |
#include <string> | |
namespace helper { | |
std::string to_string(const std::wstring& src) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <istream> | |
#include <ostream> | |
#include <boost/asio.hpp> | |
#include <boost/asio/spawn.hpp> | |
class client { | |
public: | |
client(boost::asio::io_service& io_service, const std::string& server, const std::string& path) | |
: resolver_(io_service), socket_(io_service) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/asio.hpp> | |
auto main(int argc, char** argv) -> int { | |
if (argc != 3) { | |
std::cerr << "Usage: " << argv[0] << " <ip> <port>" << std::endl; | |
return 1; | |
} | |
boost::asio::io_service io; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 | |
rem Set Version | |
set VIM_VER=v7.4.1627 | |
set LUA_VER=5.3.2 | |
set PERL_VER=522 | |
rem Set variables |