This file contains 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
Q_DECL_EXPORT int main(int argc, char *argv[]) | |
{ | |
QScopedPointer<QApplication> app(Sailfish::createApplication(argc, argv)); | |
//initialize the milk classes | |
MilkTask *mt = new MilkTask(qApp); | |
QScopedPointer<QDeclarativeView> view(Sailfish::createView()); | |
//create the root context and set the context properties |
This file contains 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 <QApplication> | |
#include <QJsonDocument> | |
#include <QJsonObject> | |
#include <QJsonArray> | |
#include <QJsonParseError> | |
#include <QFile> | |
#include <QDebug> | |
struct DeskWallpaper { | |
int width; |
This file contains 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 <CL/cl.hpp> | |
#include <QVector> | |
int main() | |
{ | |
std::vector<cl::Platform> all_platforms; | |
cl::Platform::get(&all_platforms); | |
if (all_platforms.empty()) |
This file contains 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
from PIL import Image, ImageDraw | |
img = Image.open("beach.jpg") | |
pixels = img.load() | |
# Choose the pixelization length | |
pixelization_length = 6 | |
# Define the pixelize and mask image | |
pixelize_image = Image.new('RGBA', img.size) |
This file contains 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 <QSqlRecord> | |
#include "lqsqlrelationaltablemodel.h" | |
LQSqlRelationalTableModel::LQSqlRelationalTableModel(QObject *parent, QSqlDatabase db) | |
: QSqlRelationalTableModel(parent, db) | |
{ | |
} | |
LQSqlRelationalTableModel::~LQSqlRelationalTableModel() | |
{ |
This file contains 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
1.) Prepare by installing compiler and required library (optional is also installed for this tutorial) | |
sudo apt-get install build-essential cmake cmake-gui git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python3-dev python3-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev | |
2.) Clone the git repo | |
git clone https://github.com/Itseez/opencv.git | |
3.) Switch to the 3.0.0 tag | |
cd opencv/ | |
git checkout 3.0.0 |