Skip to content

Instantly share code, notes, and snippets.

View frabert's full-sized avatar

Francesco Bertolaccini frabert

View GitHub Profile
// using NetLua;
var lua = new Lua();
lua.DynamicContext.var = LuaObject.NewTable(); // Using dynamic features
lua.DynamicContext.var.x = 4; // Automatic type casting
lua.DoString("var.x = 5"); // Simple API
Console.WriteLine(lua.DynamicContext.var.x); // Writes 5

Keybase proof

I hereby claim:

  • I am frabert on github.
  • I am frabert (https://keybase.io/frabert) on keybase.
  • I have a public key whose fingerprint is DC75 8F7B 6546 19F4 2632 8425 E13E E8E1 F7F4 C157

To claim this, I am signing this object:

#include <stdio.h>
int conta(int a[], int elem, int init, int end) {
int tmp = 0;
int i;
for(i = init; i < end; i++) {
if(a[i] == elem) tmp++;
}
return tmp;
}
#include <stdio.h>
#include <stdlib.h>
void stampaMatrice(int** a, int h, int w) {
for(int i = 0; i < h; i++) {
for(int j = 0; j < w - 1; j++) {
printf("%d ", a[i][j]);
}
printf("%d\n", a[i][w - 1]);
}
@frabert
frabert / scheletro1.c
Last active January 6, 2017 09:10
Scheletri per esercitazione
#include <stdio.h>
#include <stdlib.h>
// Funzioni da implementare
int *leggiInput(int *dim);
int *eliminaDup(int *vect, int dim, int *dim_nodup);
int ugualeASomma(int *vect, int dim);
int *maggioreDeiSuccessivi(int *vect, int dim);
int main() {
@frabert
frabert / es4.c
Created June 24, 2017 14:14
Esercizio 4 (25/07/2017) esercitazione
#include <stdlib.h>
#include <stdio.h>
typedef struct node {
int k;
struct node *l, *r;
} node_t;
void insert(node_t **n, int k) {
if(*n == NULL) {
local selectedMediaItems = reaper.CountSelectedMediaItems(0)
local notes = { 'A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#' }
function transpose(amount, note)
local index = 0
for i, v in ipairs(notes) do
if v == note then
index = i
end
@frabert
frabert / COPYING
Last active December 21, 2023 13:35
Favicons for HN
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit