Skip to content

Instantly share code, notes, and snippets.

View dridk's full-sized avatar

sacha schutz dridk

View GitHub Profile
@dridk
dridk / test.cpp
Last active September 3, 2018 22:35
std::bind and std::function
#include <iostream>
#include <typeinfo>
#include <functional>
#include <vector>
using namespace std;
class Test
{
@dridk
dridk / cpp
Created September 3, 2018 22:35
std::bind and std::function
#include <iostream>
#include <typeinfo>
#include <functional>
#include <vector>
using namespace std;
class Test
{
public :
@dridk
dridk / orm.cpp
Created September 1, 2018 17:55
CRTP inheritance with static fields
#include <iostream>
#include <map>
#include <string>
#include <list>
using namespace std;
// =========== Classe de base: caché a l'utilisateur ==================================
template <typename T>
class Base
{
@dridk
dridk / gist:291da3be27ecfa409fb4af6f0cce822b
Created March 22, 2017 12:43
Denovo & recessif mutation selection with variant_tools
#!/bin/bash
pwd
MAMAN="maman.vcf.gz"
PAPA="pere.vcf.gz"
ENFANT="enfant.vcf.gz"
DP_MAX=50
EXAC_AF=0.001
# initialize vtools prj
#ifndef MATABLEVIEW_H
#define MATABLEVIEW_H
#include <QTableView>
class MaTableView : public QTableView
{
Q_OBJECT
public:
explicit MaTableView(QWidget *parent = 0);
ScrollView {
scrollViewProperties.pinchToZoomEnabled: true
scrollViewProperties.initialScalingMethod: ScalingMethod.AspectFit
scrollViewProperties.minContentScale: 1
scrollViewProperties.maxContentScale: 10
scrollViewProperties.scrollMode: ScrollMode.Both
Container {
WebView {
ScrollView {
scrollViewProperties.pinchToZoomEnabled: true
scrollViewProperties.initialScalingMethod: ScalingMethod.AspectFit
scrollViewProperties.minContentScale: 1
scrollViewProperties.maxContentScale: 10
scrollViewProperties.scrollMode: ScrollMode.Both
Container {
WebView {
@dridk
dridk / gist:4252345
Created December 10, 2012 18:32
enable qDebug in blackberry10 SDK
void myMessageOutput(QtMsgType type, const char* msg){
fprintf(stdout, "%s\n", msg);
fflush(stdout);
}
int main(int argc, char **argv)
{
Application app(argc, argv);
@dridk
dridk / gist:4196811
Created December 3, 2012 18:13
qxtjson example
//parser un json (QString) vers un QVariant
QString source = "{"name": "sacha"}
QVariant data = QxtJson::parse(source);
//affiche "sacha"
qDebug()<<data.toMap().value("name").toString();
//ecrire du json
QVariantMap data;
data.insert("name", "olivier");
QString source = QxtJson::parse(data);
@dridk
dridk / gist:4196853
Created December 3, 2012 18:20
qml data
Label
{
text:myData.name
}