Skip to content

Instantly share code, notes, and snippets.

View hjpbarcelos's full-sized avatar

Henrique J. P. Barcelos hjpbarcelos

View GitHub Profile
@hjpbarcelos
hjpbarcelos / ImageHandler.php
Last active December 15, 2015 21:49
Brincando...
<?php
namespace GdWrapper;
interface Image {
public function getPath();
public function getWidth();
public function getHeight();
public function getType();
}
@hjpbarcelos
hjpbarcelos / sorting.erl
Created March 12, 2013 20:16
Erlang sorting
-module(sorting).
-export([mergesort/1, quicksort/1]).
merge([], L) -> L;
merge(L, []) -> L;
merge(L1=[H1|T1], L2=[H2|T2]) ->
if
H1 =< H2 -> [H1 | merge(T1, L2)];
true -> [H2 | merge(L1,T2)]
@hjpbarcelos
hjpbarcelos / artigo.md
Created November 12, 2012 22:31
2012-11-10 - Artigo Imasters - TDG & RDG

Padrões TableDataGateway e TableRowGateWay - Teoria e Prática

Introdução

Olá, pessoal!

Bom, este é o meu primeiro artigo aqui no iMasters, espero que gostem e que seja lhes seja útil.

Os puristas dos Design Patterns podem não gostar muito do conteúdo deste artigo, pois ele foge um pouco da implementação padrão conhecida, que é definida por Martin Fowler no clássico Patterns of Enterprise Application Architecture.