Skip to content

Instantly share code, notes, and snippets.

View JoaoGFarias's full-sized avatar
🏠
Working from home

João Farias JoaoGFarias

🏠
Working from home
View GitHub Profile
@JoaoGFarias
JoaoGFarias / Getting Started With Subversion.markdown
Created June 3, 2012 21:17 — forked from embs/Getting Started With Subversion.markdown
Primeiros passos com o controlador de versão Apache Subversion

Getting Started With Subversion

O que é Subversion (SVN)?

Resposta curta: um controlador de versão.

Resposta longa: não é incomum haver projetos em que mais de um programador desenvolve código simultaneamente. Uma solução para a sincronização do desenvolvimento é a criação de um repositório de código remoto (armazenado em alguma máquina na Internet) para onde cada programador fará o upload do seu código e de onde cada programador poderá fazer o download da versão mais recente do projeto (isto é, baixar modificações realizadas por outros programadores). O, então, Apache SVN

cpdef int fib(int n):
cpdef fibAux(int n, int a, int b):
if n == 0:
return a
else:
return fibAux(n-1,a+b,a)
if n == 2 or n == 1:
return n
'''
Look at foo1 and foo2
Foo1 makes a comparison, uses an if on each interation and is able to stop interacting at any point of the array
Foo2 a comparison, a boolean calculus and an attribution at each interaction, and always loop through ALL the array
Let's see how they run...
'''
import time
@JoaoGFarias
JoaoGFarias / Triangle of Numbers Printer
Created May 4, 2014 03:02
A simple script that prints a beatiful triangle using a recursion (printLine) inside other recursion (printTriangle)
#!/usr/local/bin/python2.7
import sys
def printLine(n):
sys.stdout.write(str(n))
if n != 1:
sys.stdout.write(' ')
printLine(n-1)
else:
@JoaoGFarias
JoaoGFarias / Subdivision.py
Last active August 29, 2015 14:02
Subdivision of a Bezier Curve
__author__ = 'Joao'
from Geometry.Point import ControlPoints
from Geometry.Point import Point2D
from bezierCurveAlgorithms.deCasteljau import bezier_curve_generator
from fn import recur
def subdivide(control_points,t = 0.5):
"""
@param control_points: The control points of the Bezier curve
@JoaoGFarias
JoaoGFarias / interface.html
Created August 14, 2014 12:47
HTML5 Local Storage - Tizen and JSON integration
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="A single-page template generated by Tizen Web IDE"/>
<title>HTMl 5 - JSon - Test</title>
<link rel="stylesheet" href="./css/jquery.mobile-1.3.2.css"/>
@JoaoGFarias
JoaoGFarias / interface.html
Created August 15, 2014 12:56
Tizen and Google Maps
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="Tizen basic template generated by Tizen Web IDE"/>
<title>Tizen Web IDE - Tizen - Tizen basic Application</title>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
@JoaoGFarias
JoaoGFarias / miniMapsAPI.js
Last active August 29, 2015 14:05
Mini-Google Maps API
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
@JoaoGFarias
JoaoGFarias / gist:73380ef76bd153540ea7
Created September 8, 2014 12:55
Selenium - Parallel Data-Driven testing using TestNG
/*This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@JoaoGFarias
JoaoGFarias / persistentTreePHP.php
Created January 5, 2015 18:55
A persistent binary search tree in PHP
<?php
abstract class Node{
abstract public function __construct($left,$val,$right);
abstract public function isEmpty();
abstract public function insert($val);
abstract public function member($val);
}