Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Carlos Lamb CarlosCorderoSaavedra

🎯
Focusing
  • OdigeO
  • Spain ( Madrid )
Block or report user

Report or block CarlosCorderoSaavedra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View JSON Parser
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class WeatherDataParser {
/**
* Given a string of the form returned by the api call:
* http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7
* retrieve the maximum temperature for the day indicated by dayIndex
View Implementing Removing Mean Friends
import java.util.ArrayList;
public class Person
{
private String name;
private ArrayList<Person> friends;
public Person(String name)
{
this.name = name;
View Implement nonFriend
import java.util.ArrayList;
public class Person
{
private String name;
private ArrayList<Person> friends;
public Person(String name)
{
this.name = name;
View Separators
import java.util.ArrayList;
public class Person
{
private String name;
private ArrayList<String> friends;
public Person(String name)
{
this.name = name;
View Array Algorithms Find All Matches
import java.util.ArrayList;
public class ListOfPictures
{
public static void main(String[] args)
{
ArrayList<Picture> gallery = new ArrayList<Picture>();
gallery.add(new Picture("degas1.jpg"));
gallery.add(new Picture("gaugin1.jpg"));
gallery.add(new Picture("monet1.jpg"));
View Array Algorithms Count Matches
import java.util.ArrayList;
public class ListOfPictures
{
public static void main(String[] args)
{
ArrayList<Picture> gallery = new ArrayList<Picture>();
gallery.add(new Picture("degas1.jpg"));
gallery.add(new Picture("gaugin1.jpg"));
gallery.add(new Picture("monet1.jpg"));
You can’t perform that action at this time.