I hereby claim:
- I am mroik on github.
- I am mroik (https://keybase.io/mroik) on keybase.
- I have a public key ASBnpSDjaJtoZZWtpHb7Uh_HyAeUm3urXCdIVYvEu5nnbgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
int split(char *string, char sep, int n_char, char ***array_values) | |
{ | |
int n_values = 1; | |
int start = 0; | |
for(int x = 0; x < n_char; x++) | |
{ | |
if(string[x] == sep) | |
n_values++; | |
} |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef int(*int_ptr)(test); | |
typedef struct { | |
int a; | |
int_ptr next; | |
} test; | |
int next_r(test* self) |
exception NoItems | |
// O(n) | |
let reverse lst = | |
let rec rr lst acc = | |
match lst with | |
| [] -> acc | |
| x :: xs -> rr xs (x :: acc) | |
rr lst [] |
let fact x = | |
let rec fact_r x acc = | |
match x with | |
| 1.0 -> acc | |
| y -> fact_r (x - 1.0) (acc * x) | |
fact_r x 1.0 | |
let expo x k = | |
let rec expo_r x k acc = | |
match k with |
let fact x = | |
let rec fact_r i acc = | |
match i with | |
| 0.0 -> acc | |
| a -> fact_r (i - 1.0) (acc * i) | |
fact_r x 1.0 | |
let rec pwr bas ex = | |
match ex with | |
| 0 -> 1.0 |
associazione: type. | |
studente: type. | |
*: associazione. | |
;: studente -> associazione -> associazione. %infix right 1 ;. | |
apolitica: associazione -> type. | |
rappresentante: studente -> type. | |
corrotta: associazione -> type. | |
contiene_rapr: associazione -> type. |
instance: type. | |
user: type. | |
can_be_annoyed_at: user -> user -> type. %infix none 1 can_be_annoyed_at. | |
@: user -> instance -> type. %infix none 1 @. | |
>>: instance -> instance -> type. %infix none 1 >>. | |
annoyed_at: user -> user -> type. %infix none 1 annoyed_at. | |
</3: user -> user -> type. %infix none 1 </3. | |
can_enjoy: user -> user -> type. %infix none 1 can_enjoy. | |
enjoys: user -> user -> type. %infix none 1 enjoys. |
use rand::Rng; | |
use std::cmp::Ordering; | |
fn main() { | |
let mut list: [i32; 1000] = [0; 1000]; | |
let mut helper: [i32; 1000] = [0; 1000]; | |
let mut rng = rand::thread_rng(); | |
for x in 0..1000 { | |
list[x] = rng.gen_range(0..999); | |
} |
use rand::Rng; | |
struct Node { | |
v: i32, | |
l: Option<Box<Node>>, | |
r: Option<Box<Node>> | |
} | |
fn make_node(v: i32) -> Node { | |
return Node { |