This file contains hidden or 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
import java.util.ArrayList; | |
public class DecoderTree { | |
public static void main(String args[]) { | |
System.out.println(decode("2222")); | |
System.out.println(decode("105")); | |
System.out.println(decode("2175")); | |
System.out.println(decode("0000")); | |
} |
This file contains hidden or 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
#include "wsh.h" | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <cstring> | |
#include <map> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> |
This file contains hidden or 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
import java.util.ArrayList; | |
import java.util.List; | |
public class Days { | |
public static void main(String args[]) { | |
List<String> days = new ArrayList<String>(); | |
days.add(new String("A Partridge in a Pear Tree")); |
This file contains hidden or 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
// | |
// main.cpp | |
// Graph | |
// | |
// Created by Jacob Wilson on 4/11/12. | |
// Copyright (c) 2012 Weber State. All rights reserved. | |
// | |
#include <iostream> | |
#include <iomanip> |
This file contains hidden or 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
#include <iostream> | |
#include <stdlib.h> | |
#include <time.h> | |
using namespace std; | |
class ArraySort { | |
public: | |
ArraySort(int size); |
This file contains hidden or 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
// | |
// main.cpp | |
// Trees | |
// | |
// Created by Jacob Wilson on 3/27/12. | |
// Copyright (c) 2012 Weber State. All rights reserved. | |
// | |
#include <iostream> | |
#include <string> |
This file contains hidden or 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
// | |
// main.cpp | |
// HashMap | |
// | |
// Created by Jacob Wilson on 2/28/12. | |
// Copyright (c) 2012 Weber State. All rights reserved. | |
// | |
#include <iostream> |
This file contains hidden or 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
items = new ArrayList<Item>(); | |
for(String s : lines){ | |
String[] data = s.split("|"); | |
items.add(new Item(Integer.parseInt(data[0]), data[1],data[2], new ArrayList<Item>())); | |
} | |
for(int i =0; i< lines.size(); i++){ | |
String[] temp = lines.get(i).split("|"); | |
List<Integer> ids = new ArrayList<Integer>(); | |
String[] temp2 = temp[3].split(","); |
This file contains hidden or 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
import java.util.ArrayList; | |
import java.util.List; | |
public class Test { | |
public static void main(String args[]) { | |
System.out.println(getC(2)); | |
System.out.println(getC(3)); |
This file contains hidden or 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
public Summary summaryData; | |
AsyncHttpClient client = new AsyncHttpClient(); | |
client.get("http://i.tv/getmesomesuperawesomedata", new AsyncHttpResponseHandler() { | |
@Override | |
public void onSuccess(String response) { | |
Type listType = new TypeToken<Summary>() {}.getType(); | |
summaryData = (Summary) new Gson().fromJson(response, listType); | |
//now summary data will be in memory from a json string | |
//no more traversing json objects to get the data we need this call does all that magic |
OlderNewer