Skip to content

Instantly share code, notes, and snippets.

View glauco's full-sized avatar

Glauco Oliveira glauco

View GitHub Profile
@glauco
glauco / gist:2038839
Created March 14, 2012 19:24
Código do estagiário
public string TirarAcentos(string texto) {
string textor = "";
for (int i = 0; i < texto.Length; i++) {
if (texto[i].ToString() == "ã") textor += "a";
else if (texto[i].ToString() == "á") textor += "a";
else if (texto[i].ToString() == "à") textor += "a";
else if (texto[i].ToString() == "â") textor += "a";
else if (texto[i].ToString() == "ä") textor += "a";
else if (texto[i].ToString() == "é") textor += "e";
@glauco
glauco / gist:1871342
Created February 20, 2012 20:51
Implementing a Singleton in Io
Highlander := Object clone
Highlander clone := Highlander
@glauco
glauco / gist:1200993
Created September 7, 2011 16:12
Random numbers
­#!/usr/bin/python
import random
for k in range(10):
r = random.randint(1,3)
print r,