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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
char operators[4] = {'+','-','*','/'};
int main(int argc, char *argv[]) {
float _stack = 0;
/**
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.
@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>
@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){
#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+");
}
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>
@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
alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/(\1)/'"
# enable the git bash completion commands
source ~/.git-completion.bash
# enable git unstaged indicators - set to a non-empty value
GIT_PS1_SHOWDIRTYSTATE="."
# enable showing of untracked files - set to a non-empty value
GIT_PS1_SHOWUNTRACKEDFILES="."
#!/bin/bash
export THEOS=/opt/theos
# clone theos.git
cd /opt
git clone git://github.com/DHowett/theos.git
# clone iphoneheaders.git
cd $THEOS
mv include include.bak
linux-vdso.so.1 => (0x00007fffaa1fe000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff84e1f7000)
libunrar.so => ./libunrar.so (0x00007ff84e0bf000)
libmfcbr.so => ./libmfcbr.so (0x00007ff84dd8b000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff84da85000)
libcurl.so.3 => /usr/lib/x86_64-linux-gnu/libcurl.so.3 (0x00007ff84d81e000)
libid3-3.8.so.3 => ./libid3-3.8.so.3 (0x00007ff84d6dc000)
libpq.so.5 => not found
libavcore.so.0 => ./libavcore.so.0 (0x00007ff84d5d9000)
libavformat.so.52 => ./libavformat.so.52 (0x00007ff84d426000)