Skip to content

Commit

Permalink
Fixed, cleaned and tested lists examples.
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Estrella <Lucas Estrella>
  • Loading branch information
Lucas Estrella authored and Lucas Estrella committed Feb 26, 2017
1 parent 8c08cb6 commit 94a6bae
Show file tree
Hide file tree
Showing 23 changed files with 147 additions and 795 deletions.
4 changes: 2 additions & 2 deletions Hello_World_Tutorials/Java_CDLL.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ <h3>Here's the final code:</h3>
<div class="panel-body">
<div class="tab-content">
<div class="tab-pane fade in active" id="tab1">
<pre w3-include-html="tutorial-source-code/cdllist.java" class="prettyprint"></pre>
<pre w3-include-html="tutorial-source-code/Java_CDLL/cdllist.java" class="prettyprint"></pre>
</div>

<div class="tab-pane fade" id="tab2">
<pre w3-include-html="tutorial-source-code/Student.java" class="prettyprint"></pre>
<pre w3-include-html="tutorial-source-code/Java_CDLL/Student.java" class="prettyprint"></pre>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions Hello_World_Tutorials/Java_CSLL.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ <h3>Here's the final code:</h3>
<div class="panel-body">
<div class="tab-content">
<div class="tab-pane fade in active" id="tab1">
<pre w3-include-html="tutorial-source-code/csllist.java" class="prettyprint"></pre>
<pre w3-include-html="tutorial-source-code/Java_CSLL/csllist.java" class="prettyprint"></pre>
</div>

<div class="tab-pane fade" id="tab2">
<pre w3-include-html="tutorial-source-code/Student.java" class="prettyprint"></pre>
<pre w3-include-html="tutorial-source-code/Java_CSLL/Student.java" class="prettyprint"></pre>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions Hello_World_Tutorials/Java_DLL.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ <h3>Here's the final code:</h3>
<div class="panel-body">
<div class="tab-content">
<div class="tab-pane fade in active" id="tab1">
<pre w3-include-html="tutorial-source-code/dllist.java" class="prettyprint"></pre>
<pre w3-include-html="tutorial-source-code/Java_DLL/dllist.java" class="prettyprint"></pre>
</div>

<div class="tab-pane fade" id="tab2">
<pre w3-include-html="tutorial-source-code/Student.java" class="prettyprint"></pre>
<pre w3-include-html="tutorial-source-code/Java_DLL/Student.java" class="prettyprint"></pre>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions Hello_World_Tutorials/Java_SLL.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ <h3>Here's the final code:</h3>
<div class="panel-body">
<div class="tab-content">
<div class="tab-pane fade in active" id="tab1">
<pre w3-include-html="tutorial-source-code/sllist.java" class="prettyprint"></pre>
<pre w3-include-html="tutorial-source-code/Java_SLL/sllist.java" class="prettyprint"></pre>
</div>

<div class="tab-pane fade" id="tab2">
<pre w3-include-html="tutorial-source-code/StudentInfo.java" class="prettyprint"></pre>
<pre w3-include-html="tutorial-source-code/Java_SLL/StudentInfo.java" class="prettyprint"></pre>
</div>
</div>
</div>
Expand Down
Binary file modified Hello_World_Tutorials/tutorial-source-code/Java_CDLL.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package Java_CDLL;

/**
* Created by Lucas Estrella on 1/31/2017.
*/
Expand Down Expand Up @@ -151,7 +153,7 @@ public String getStudentLabel() {
"Favorite Color: " + favoriteColor + "\n";

if(avatar != null)
$label += "&lt;img width='100' src='" + avatar + "'/&gt;";
$label += "<img width='100' src='" + avatar + "'/>";


return $label;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
* Created by Lucas Estrella on 1/31/2017.
*/
package Java_CDLL;

import bridges.base.CircDLelement;
import bridges.connect.Bridges;
import model.Student;

public class Main {
public class cdllist {

public static void main(String[] args) throws , ParseException {
public static void main(String[] args) throws Exception{

Bridges<String, Student> bridge = new Bridges<String, Student>(6, "YOUR_API_KEY", "YOUR_USER_ID");
final String YOUR_API_KEY = "";
final String YOUR_USER_ID = "";
Bridges<String, Student> bridge = new Bridges<String, Student>(6, YOUR_API_KEY, YOUR_USER_ID);

Student[] students = {
new Student(
Expand Down
Binary file modified Hello_World_Tutorials/tutorial-source-code/Java_CSLL.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package Java_CSLL;

/**
* Created by Lucas Estrella on 1/31/2017.
*/
Expand Down Expand Up @@ -151,7 +153,7 @@ public String getStudentLabel() {
"Favorite Color: " + favoriteColor + "\n";

if(avatar != null)
$label += "&lt;img width='100' src='" + avatar + "'/&gt;";
$label += "<img width='100' src='" + avatar + "'/>";


return $label;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
* Created by Lucas Estrella on 1/31/2017.
*/
import bridges.base.CircDLelement;
package Java_CSLL;

import bridges.base.CircSLelement;
import bridges.connect.Bridges;
import model.Student;

public class Main {
public class csllist {

public static void main(String[] args) throws , ParseException {
public static void main(String[] args) throws Exception {

Bridges<String, Student> bridge = new Bridges<String, Student>(5, "YOUR_API_KEY", "YOUR_USER_ID");
final String YOUR_API_KEY = "";
final String YOUR_USER_ID = "";
Bridges<String, Student> bridge = new Bridges<String, Student>(5, YOUR_API_KEY, YOUR_USER_ID);

Student[] students = {
new Student(
Expand Down
Binary file modified Hello_World_Tutorials/tutorial-source-code/Java_DLL.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/**
package Java_DLL;

/**
* Created by Lucas Estrella on 1/31/2017.
*/
public class Student {
Expand Down Expand Up @@ -151,7 +153,7 @@ public String getStudentLabel() {
"Favorite Color: " + favoriteColor + "\n";

if(avatar != null)
$label += "&lt;img width='100' src='" + avatar + "'/&gt;";
$label += "<img width='100' src='" + avatar + "'/>";


return $label;
Expand Down
13 changes: 8 additions & 5 deletions Hello_World_Tutorials/tutorial-source-code/Java_DLL/dllist.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import bridges.base.CircDLelement;
package Java_DLL;

import bridges.base.DLelement;
import bridges.connect.Bridges;
import model.Student;

public class Main {
public class dllist {

public static void main(String[] args) throws , ParseException {
public static void main(String[] args) throws Exception {

Bridges<String, Student> bridge = new Bridges<String, Student>(4, "YOUR_API_KEY", "YOUR_USER_ID");
final String YOUR_API_KEY = "";
final String YOUR_USER_ID = "";
Bridges<String, Student> bridge = new Bridges<String, Student>(4, YOUR_API_KEY, YOUR_USER_ID);

Student[] students = {
new Student(
Expand Down
Binary file modified Hello_World_Tutorials/tutorial-source-code/Java_SLL.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
package Java_SLL;

public class StudentInfo {
private String studentID, fullName, program, email, dislikeColor, favoriteColor, avatar;
private String studentID,
fullName,
program,
email,
dislikeColor,
favoriteColor,
avatar;

private boolean visited;

public boolean isVisited() {
return visited;
}

public void setVisited(boolean visited) {
this.visited = visited;
}

private double studentCreditHours;

public StudentInfo(String studentID, String fullName, String program, String email, String dislikeColor,
String favoriteColor, double studentCreditHours, String avatar) {
/**
* @param studentID
* @param fullName
* @param program
* @param email
*/
public StudentInfo(String studentID,
String fullName,
String program,
String email,
String dislikeColor,
String favoriteColor,
double studentCreditHours,
String avatar) {
this.studentID = studentID;
this.fullName = fullName;
this.program = program;
Expand All @@ -13,53 +44,115 @@ public StudentInfo(String studentID, String fullName, String program, String ema
this.studentCreditHours = studentCreditHours;
this.avatar = avatar;
}

/**
* @return studentID
*/
public String getStudentID() {
return studentID;
}

/**
* @param studentID
*/
public void setStudentID(String studentID) {
this.studentID = studentID;
}

/**
* @return fullName
*/
public String getFullName() {
return fullName;
}

/**
* @param fullName
*/
public void setFullName(String fullName) {
this.fullName = fullName;
}

/**
* @return program
*/
public String getProgram() {
return program;
}

/**
* @param program
*/
public void setProgram(String program) {
this.program = program;
}

/**
* @return email
*/
public String getEmail() {
return email;
}

/**
* @param email
*/
public void setEmail(String email) {
this.email = email;
}


/**
* @return favoriteColor
*/
public String getFavoriteColor() {
return favoriteColor;
}

/**
* @param favoriteColor
*/
public void setFavoriteColor(String favoriteColor) {
this.favoriteColor = favoriteColor;
}


public String getAvatar() {
return avatar;
}

public void setAvatar(String avatar) {
this.avatar = avatar;
}

public String getDislikeColor() {
return dislikeColor;
}

public void setDislikeColor(String dislikeColor) {
this.dislikeColor = dislikeColor;
}

public double getStudentCreditHours() {
return studentCreditHours;
}

public void setStudentCreditHours(double studentCreditHours) {
this.studentCreditHours = studentCreditHours;
}

public String getStudentLabel() {
String $label =
fullName + "\n" +
"Email: " + email + "\n" +
"Program: " + program + "\n" +
"Student ID: " + studentID + "\n" +
"Favorite Color: " + favoriteColor + "\n";

if(avatar != null)
$label += "<img width='100' src='" + avatar + "'/>";


return $label;
}
}
25 changes: 10 additions & 15 deletions Hello_World_Tutorials/tutorial-source-code/Java_SLL/sllist.java
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
/**
package Java_SLL;
/**
* Created by Lucas Estrella on 1/31/2017.
* [email protected]
*/
import bridges.connect.Bridges;
import bridges.base.SLelement;
import com.google.gson.JsonObject;
import model.Student;
import org.json.simple.parser.ParseException;
import provider.StudentProvider;
import util.Auth;

import java.io.FileNotFoundException;
public class sllist {

public class Main {
public static void main(String[] args) throws Exception {

public static void main(String[] args) throws FileNotFoundException, ParseException {


Bridges<String, StudentInfo> bridges = new <String, StudentInfo>(1, "YOUR_API_KEY", "YOUR_USER_ID");
final String YOUR_API_KEY = "";
final String YOUR_USER_ID = "";
Bridges<String, StudentInfo> bridges = new Bridges<String, StudentInfo>(3, YOUR_API_KEY, YOUR_USER_ID);


/**
Expand Down Expand Up @@ -86,7 +81,7 @@ public static void main(String[] args) throws FileNotFoundException, ParseExcept
el2.setNext(el3);
el3.setNext(el4);

SLelement<Student> currentElement = el0;
SLelement<StudentInfo> currentElement = el0;

while(currentElement != null){
currentElement.getVisualizer().setColor(currentElement.getValue().getFavoriteColor());
Expand All @@ -108,8 +103,8 @@ public static void main(String[] args) throws FileNotFoundException, ParseExcept
currentElement = currentElement.getNext();
}

bridge.setDataStructure(el0);
bridge.visualize();
bridges.setDataStructure(el0);
bridges.visualize();


}
Expand Down
Loading

0 comments on commit 94a6bae

Please sign in to comment.