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
extern crate structopt; | |
use structopt::StructOpt; | |
use noria::{ControllerHandle, DataType}; | |
#[derive(StructOpt, Debug)] | |
#[structopt(name = "noria-script")] | |
pub struct Config { | |
deployment: String, | |
#[structopt(long = "no-insert")] |
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
use noria::{ControllerHandle, DataType}; | |
#[tokio::main] | |
async fn main() { | |
let vote_sql = "CREATE TABLE Vote (aid int, bid int, cid int, did int, eid int, uid int);"; | |
let range_sql = "QUERY VoteEquiAndInequality: \ | |
SELECT * \ | |
FROM Vote \ | |
WHERE aid = ? AND bid = ? AND cid = ? AND did = ? AND eid = ? AND uid >= ? AND uid < ?;"; |
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
g++ -o <NAME_OF_EXECUTABLE> -std=c++11 *.cpp `pkg-config --cflags --libs /usr/local/Cellar/opencv/3.4.0_1/lib/pkgconfig/opencv.pc` |
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
const methodData = [{ | |
supportedMethods: ["basic-card"], | |
data: { | |
supportedNetworks: ['visa', 'mastercard'], | |
supportedTypes: ['debit'] | |
} | |
}, { | |
supportedMethods: ["https://example.com/bobpay"], | |
data: { | |
merchantIdentifier: "XXXX", |
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
// c++ solution | |
#include <iostream> | |
using namespace std; | |
struct Node { | |
int count; | |
Node* next; | |
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
<?xml version='1.0' encoding='UTF-8' ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:h="http://xmlns.jcp.org/jsf/html" | |
xmlns:p="http://primefaces.org/ui" | |
xmlns:f="http://xmlns.jcp.org/jsf/core" | |
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> | |
<h:head> | |
<title>Consulter profils</title> | |
</h:head> |
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
private boolean getUser(String userId) { | |
Query query = em.createQuery( | |
"SELECT u FROM UserProfile u" + | |
" WHERE u.emailId = :emailId"); | |
query.setParameter("emailId", userId); | |
System.err.println("after creation"); | |
ArrayList<UserProfile> results = performQuery(query); | |
System.err.println("after performed"); | |
if (results == null) |
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
import os, sys, csv, psycopg2, argparse | |
# db variables | |
db = { | |
'dbname': 'db2-project', | |
'user': 'boubou', | |
'host': 'localhost', | |
'password': '' | |
} | |
try: |
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
# Upgrade to the "DO" recipe "Track Your Work Hours" by @dmerrick | |
# To use, connect to the recipe (https://ifttt.com/recipes/227069-track-your-work-hours) and change the "Formatted Row" content with the one below. | |
# It gives the time in "HHhMM" format of a work time, and the total of all work times in the same readable format. | |
{{OccurredAt}} ||| =IF(ISODD(ROW()), "Started", "Stopped") ||| =IF(ISEVEN(ROW()),ROUND(((DATEVALUE(REGEXEXTRACT(INDIRECT(ADDRESS(ROW(),COLUMN()-2,4)), "\w+ \d{2}, \d{4}")) + TIMEVALUE(REGEXEXTRACT(INDIRECT(ADDRESS(ROW(),COLUMN()-2,4)), "\d{2}:\d{2}[A|P]M$"))) - ( DATEVALUE(REGEXEXTRACT(INDIRECT(ADDRESS(ROW()-1,COLUMN()-2,4)), "\w+ \d{2}, \d{4}")) + TIMEVALUE(REGEXEXTRACT(INDIRECT(ADDRESS(ROW()-1,COLUMN()-2,4)), "\d{2}:\d{2}[A|P]M$")))) * 24, 2),"") ||| =if(ISEVEN(ROW()), CONCATENATE(IFERROR(CONCAT(REGEXEXTRACT(text(INDIRECT(ADDRESS(ROW(), COLUMN() -1, 4)), "###.##"), "^\d+"),"h"), ""), ROUND(60* VALUE(REGEXEXTRACT(text(INDIRECT(ADDRESS(ROW(), COLUMN() -1, 4)), "###.###"), "\.\d*"))), " |
NewerOlder