Skip to content

Instantly share code, notes, and snippets.

View marceloboeira's full-sized avatar
🤙
Making things boring

MB marceloboeira

🤙
Making things boring
View GitHub Profile
@marceloboeira
marceloboeira / .gitconfig
Created November 12, 2014 10:21
Git Aliases
[alias]
A = add -A
st = status
cm = commit -m
cma = commit -am
b = branch
co = checkout
pl = pull
plom = pull origin master
ps = push
Here is a simple jQuery plugin to make a table header fixed on top of a div when this is scrolled.
Using the code from twitter bootstrap documentation page, this code is customized for table header.
Create the table with following layout -
<div class="row fixed-table">
<div class="table-content">
<table class="table table-striped table-fixed-header" id="mytable">
<thead class="header">
<tr>
<th>Email Address</th>
#include<stdio.h>
#include<string.h>
#define FILE_NAME "data.txt"
#define MAX_CHARS 100
FILE *getFile(int write) {
return (write == 1) ? fopen(FILE_NAME,"a+") : fopen(FILE_NAME,"r+");
}
@marceloboeira
marceloboeira / qs.c
Created April 30, 2014 23:37
Quick Sort
#include<stdio.h>
void qs(int *v, int a, int b){
int p, aux, i = a, j = b, m;
m = (int) ((i + j) / 2);
p = v[m];
while(j > i) {
while (v[i] < p) i = i + 1;
while (v[j] > p) j = j - 1;
if(i <= j){
@marceloboeira
marceloboeira / students.core.c
Last active August 29, 2015 13:58
- 23/04/2014 - Performance Upgrade ((A==B) == (B==A))
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef __unix__
#define OS_Windows 0
#include <unistd.h>
#elif defined(_WIN32) || defined(WIN32)
#define OS_Windows 1
#include <windows.h>
/**
Faça um programa que cadastre no mínimo 5 filmes (nome, gênero,
classificação etária e ator ou atriz principal). O programa deve ser capaz
de receber como critérios de pesquisa:
A) A idade de uma pessoa e mostrar o(s) nome(s) do(s) filmes que ela
pode assistir, informando os demais dados sobre cada filme, se
existir algum.
B) O nome de um ator e mostrar os dados do(s) filme(s) do(s) qual(is)
ele participa, se houver algum.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
char operators[4] = {'+','-','*','/'};
int main(int argc, char *argv[]) {
float _stack = 0;