Skip to content

Instantly share code, notes, and snippets.

View coffeejay's full-sized avatar
🤡
clowning around

Jay Deuskar coffeejay

🤡
clowning around
View GitHub Profile
<!DOCTYPE html>
<head>
<!-- Standard Meta -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<!-- Site Properities -->
<title>Feed Example - Semantic</title>
/*******************************
Global
*******************************/
html,
body {
font-size: 15px;
height: 100%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Market news</title>
<!DOCTYPE html>
<html>
<head>
<title>PennyWhale</title>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" /><meta charset="utf-8" /><meta content="width=1000" name="viewport" /><meta content="loaM7YOJ7ZcjFGtSEk_OZnrRynDHqQWtja2hHbCkOoo" name="google-site-verification" /><meta content="Hull is a social infrastructure as a service. <br/>We take the pain away from adding social features to your apps." name="description" /><meta content="Hull: build social apps in minutes, not weeks" property="og:title" /><link href="style.css" media="screen" rel="stylesheet" type="text/css" /><!--[if IE]><link href="/stylesheets/ie.css?1381501236" media="screen" rel="stylesheet" type="text/css" /><![endif]--></head><body class="home"></body><div class="page"><header class="dark-section" id="header" role="banner"><section class="topbar"><div class="row"><div class="cell-12"><nav class="nav" id="primary-nav" role="navigation"><a href="/" itemprop="url" style="float:left;margin-top:-10px;margin-right:-20px"><img al
public int getFrequencyOf(T anEntry){
int counter = 0;
for (int i = 0; i < this.getCurrentSize(); i++){
if (anEntry.equals(bag.get(i))){
counter ++;
}
}
return counter;
}
/**
* A class representation of a Bag type using ArrayList
* which implements BagInterface.
*
* @author Jay Deuskar
*/
import java.util.ArrayList;
public class ArrayListBag<T> implements BagInterface<T>{
System.out.print("Which candidate would you like to search for: ");
String name = scanner.next();
Ballot ballot = new Ballot(name, 0.0);
int counter = ballotbox.getFrequencyOf(ballot);
System.out.println("That candidate shows up " + counter + " time(s).");
/**
* A class representation of a BallotBox using an ArrayListBag.
*
* @author Jay Deuskar
*/
public class BallotBox{
private BagInterface<Ballot> ballots;
require 'pismo'
doc = Pismo::Document.new('http://money.cnn.com/2014/02/27/investing/jc-penney/index.html?iid=HP_LN')
puts doc.title
puts doc.author
puts doc.body
I logged onto my investment portfolio on a Tuesday evening to see losses of almost 500 dollars. Apparently Tesla stock had dipped a significant amount due to some news about a Model S spontaneously setting on fire. I was angry at myself for not watching the news - how could I avoid this again in the future?
Thats when I started playing with the idea of building a service to notify me anytime news would affect my stock portfolio. I wanted instant alerts only when a measurable price change was going to occur. So a friend and I spent the next three nights after class coding PennyWhale, a passive service that notifies you anytime your stock portfolio is about to see a gain or loss.
Not only did we come out with a clean, polished, and functional application, I was able to learn more about Ruby on Rails and architecting a "service oriented architecture” in that span of time than I ever had. The challenges we faced from implementing machine learning algorithms to designing a clean user experience were difficult,