Skip to content

Instantly share code, notes, and snippets.

View novasdream's full-sized avatar

Bruno Novais novasdream

  • Cardoso, SP - Brasil
View GitHub Profile
@novasdream
novasdream / matriz_esparsa_struct.c
Created June 1, 2016 22:42 — forked from marcoscastro/matriz_esparsa_struct.c
matriz esparsa - estrutura
/*
Estrutura célula contendo os seguintes campos:
- valor
- linha e coluna (posição da célula)
- ponteiro para o próximo elemento
- ponteiro para o elemento anterior
*/
typedef struct celula
{
int valor;
@novasdream
novasdream / matriz_esparsa.cpp
Created June 1, 2016 22:42 — forked from marcoscastro/matriz_esparsa.cpp
Programação em C - Matriz esparsa
/*
Implementação de matriz esparsa usando lista duplamente ligada
www.GeeksBR.com
*/
#include <stdio.h>
#include <stdlib.h>
#define MAX 10 // máximo do vetor de células (ver na função main)
@novasdream
novasdream / clojure-match.clj
Last active August 29, 2015 14:26 — forked from ckirkendall/clojure-match.clj
Language Compare F#, Ocaml, Scala, Clojure, Ruby and Haskell - Simple AST example
(use '[clojure.core.match :only [match]])
(defn evaluate [env [sym x y]]
(match [sym]
['Number] x
['Add] (+ (evaluate env x) (evaluate env y))
['Multiply] (* (evaluate env x) (evaluate env y))
['Variable] (env x)))
(def environment {"a" 3, "b" 4, "c" 5})
@novasdream
novasdream / .vimrc
Last active August 29, 2015 14:16 — forked from gtcarlos/.vimrc
set nocompatible
filetype off
" Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim' " Required
Plugin 'tpope/vim-fugitive'
Plugin 'vim-scripts/closetag.vim'
/*
This code should be pasted within the files where this function is needed.
This function will not create any code conflicts.
The function call is similar to printf: ardprintf("Test %d %s", 25, "string");
To print the '%' character, use '%%'
This code was first posted on http://arduino.stackexchange.com/a/201
*/