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
\usetikzlibrary{arrows} | |
\usetikzlibrary{arrows.meta} | |
\begin{tikzpicture} | |
%rotate around={30:(-1,0.5)} | |
\coordinate (v1) at (0,5); | |
\draw[ultra thick, rotate around={30:(v1)}] (-0.17,5) rectangle (0.17,-1); | |
\node[rotate around={30:(v1)}] at (0.7, 2) {\Huge L}; | |
\draw[ultra thick, fill=white] (v1) circle (0.5); | |
\draw[ultra thick, fill=white, rotate around={30:(v1)}] (0,-2) circle (1.5); | |
\draw[fill=black] (v1) circle (0.1); |
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 <string> | |
#include <vector> | |
#include <algorithm> | |
const std::vector<std::string> states = {"scissors","paper","rock"}; | |
inline auto pick_up(const std::string& name) | |
{ | |
return distance(states.begin(), find(states.begin(), states.end(), name)); | |
} |
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
#ifndef TABLE_H | |
#define TABLE_H | |
#include <vector> | |
template <class T> | |
class Table | |
{ | |
public: | |
Table(); //Tavola 1x1 |
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
// | |
// Created by fpasqua on 02/11/17. | |
// | |
#ifndef NEWGAMEOFLIFEXL_GAMEOFLIFE_H | |
#define NEWGAMEOFLIFEXL_GAMEOFLIFE_H | |
#include <cstddef> | |
#include <array> |
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
// | |
// Created by fpasqua on 02/11/17. | |
// | |
#ifndef NEWGAMEOFLIFEXL_GAMEOFLIFE_H | |
#define NEWGAMEOFLIFEXL_GAMEOFLIFE_H | |
#include <cstddef> | |
#include <vector> | |
#include <algorithm> |
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
extern crate num; | |
use num::Complex; | |
/// Try to determine if `c` is in the Mandelbrot set, using at most `limit` | |
/// iterations to decide. | |
/// | |
/// If `c` is not a member, return `Some(i)` where `i` is the number of | |
/// iterations it took for `c` to leave the circle of radius two centered on the | |
/// origin. If `c` seems to be a member (more precisely, if we reached the | |
/// iteration limit without being able to prove that `c` is not a member), |
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
extern crate crossbeam; | |
extern crate num; | |
use num::Complex; | |
/// Try to determine if `c` is in the Mandelbrot set, using at most `limit` | |
/// iterations to decide. | |
/// | |
/// If `c` is not a member, return `Some(i)` where `i` is the number of | |
/// iterations it took for `c` to leave the circle of radius two centered on the | |
/// origin. If `c` seems to be a member (more precisely, if we reached the |
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
use std::io; | |
use std::fmt::Write; | |
/* | |
STDIN: | |
4 | |
7 1 199999 4 | |
STDOUT: | |
17 2 2750131 7 |
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
==> Making package: x86_64-unknown-redox-newlib-git r17774.d5ac42a49-1 (Thu Feb 22 17:22:12 CET 2018) | |
==> Checking runtime dependencies... | |
==> Checking buildtime dependencies... | |
==> Retrieving sources... | |
-> Updating newlib git repo... | |
-> Updating rust git repo... | |
==> Validating source files with md5sums... | |
newlib ... Skipped | |
rust ... Skipped | |
==> Extracting sources... |
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
extern crate num; | |
use num::Float; | |
use std::ops::{Add,Sub,Mul}; | |
#[derive(Debug, Eq, PartialEq)] | |
struct Vector2<T> { | |
x: T, | |
y: T, | |
} |
OlderNewer