Skip to content

Instantly share code, notes, and snippets.

View rmxsantiago's full-sized avatar
🎯
Focusing

Rafael Santiago rmxsantiago

🎯
Focusing
View GitHub Profile
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.http.GET;
import retrofit2.http.Query;
import java.util.List;
@rmxsantiago
rmxsantiago / Main.java
Created August 27, 2017 13:08
Regex which return content from each group
package com.company;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) {
Main main = new Main();
@rmxsantiago
rmxsantiago / Animal.lua
Last active August 13, 2016 22:44
Lua Inheritance
Animal = { name="undefined",sound="no sound" }
function Animal:new (newname, newsound)
local o = {name=newname,sound=newsound}
setmetatable(o, self)
self.__index = self
return o
end
function Animal:toString()
@rmxsantiago
rmxsantiago / Customer.java
Created August 1, 2015 17:01
Problem: Write a program that will read the full list of customers and output the names and user ids of matching customers (within 100km), sorted by user id (ascending).
package br.com.rmxs.intercom.entity;
/**
* Created by rmxsantiago on 7/29/15.
*/
public class Customer {
private long user_id;
private String name;
private double latitude;
private double longitude;
@rmxsantiago
rmxsantiago / FlattenArray.java
Created July 28, 2015 22:22
Problem: Write some code, that will flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4].
package br.com.rmxs.intercom;
import java.util.ArrayList;
import java.util.List;
public class FlattenArray {
public static void main(String[] args) {
/** Array to be flattened **/
/*Object[] inputArray = new Object[]{