This repository is currently a compilation of some of my experiments from my internship at LIRIS in the team TWEAK.
The project I'm working on is to reasoning using a RDF API in Javascript that resorts to
/* ============================================================================ | |
* Animal general implementation | |
*/ | |
pub trait Animal { | |
fn cri(&self); | |
} | |
pub struct Chat { } |
#[wasm_bindgen(js_name=Cat)] | |
pub struct Cat { | |
} | |
#[wasm_bindgen(js_class=Cat)] | |
impl Cat { | |
#[wasm_bindgen(constructor)] | |
pub fn new() -> Cat { Cat{ } } |
// Quick experiment about chaining in Rust | |
struct Accumulator { | |
acc: u32 | |
} | |
impl Accumulator { | |
fn new() -> Self { | |
Accumulator{ acc: 0 } | |
} |
#include <iostream> | |
struct MyClass { | |
// Delete the foo function as we want to make a new interface | |
// Helps when there are a lot of code relying on an old interface | |
// we want to delete | |
virtual void foo() final = delete; | |
virtual void foo(int x) { std::cout << "newfoo " << x << '\n'; } | |
void bar() { std::cout << "bar" << '\n'; } |
#include <iostream> | |
#include <optional> | |
struct Contained { | |
Contained() { | |
std::cout << "Contained()\n"; | |
} | |
Contained(const Contained &) { | |
std::cout << "ContainedConstructor\n"; |
#include <iostream> | |
#include <string> | |
// Trying to understand / implement myself the magic behind | |
// https://www.boost.org/doc/libs/1_74_0/libs/assign/doc/index.html#operator+= | |
template<typename ... Ts> | |
void Print(const char * format, Ts ... ts) { | |
char buffer[256]; | |
std::sprintf(buffer, format, ts ...); |
// Trouver tous les noms qui finissent par 5 chiffres | |
/******* | |
* Read input from cin | |
* Use cout << ... to output your result to STDOUT. | |
* Use cerr << ... to output debugging information to STDERR | |
* ***/ | |
#include <iostream> | |
#include <limits> | |
#include <sstream> |
[
Soit un fichier de la forme
4
7 4
4 0
3 4
8 3
Signifiant :