sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"despesas": [ | |
{ | |
"janeiro": [ | |
{ | |
"codigo": 1, | |
"descricao": "LEGISLATIVA", | |
"executada": "34.521.550,81", | |
"realizada": "29.459.762,57", | |
"saldo_a_pagar": "5.061.788,24" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bpaulino.com.br.todolist.model; | |
import java.util.UUID; | |
/** | |
* Created by bruno on 12/9/15. | |
*/ | |
public class TodoItem { | |
private UUID mId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/main_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var createChess = function (width, height){ | |
for(var i = 1; i <= height; i++){ | |
var line = ""; | |
for(var j = 0; j < width; j++){ | |
var newChar = ""; | |
if(i % 2 == 0){ | |
newChar = (j % 2) == 0 ? "#" : " "; | |
} else { | |
newChar = (j % 2) != 0 ? "#" : " "; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var power = function(base, exponent) { | |
if (exponent == undefined) | |
exponent = 2; | |
var result = 1; | |
for (var count = 0; count < exponent; count++) | |
result *= base; | |
return result; | |
}; | |
console.log(power(2, 10)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Automovel | |
def acelera | |
# Aciona injeção eletrônica | |
# injeta combustível e etc... | |
puts "Acelerando automóvel..." | |
end | |
end | |
class Carro < Automovel | |
def acelera |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Automovel | |
def self.tipo_cambio | |
puts "Manual" | |
end | |
def acelera | |
puts "Acelerando automóvel..." | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'json' | |
def listar_usuarios | |
uri = URI('http://jsonplaceholder.typicode.com/users') | |
response = Net::HTTP.get(uri) | |
JSON.parse(response) | |
yield JSON.parse(response) if block_given? | |
puts "Finalizando listagem de usuarios" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'json' | |
def listar_usuarios(quantidade, my_proc) | |
uri = URI('http://jsonplaceholder.typicode.com/users') | |
response = Net::HTTP.get(uri) | |
JSON.parse(response) | |
my_proc.call(quantidade) | |
yield JSON.parse(response) if block_given? | |
puts "Finalizando listagem de usuarios" |