Skip to content

Instantly share code, notes, and snippets.

View SproutSeeds's full-sized avatar
🌌
Starry Code

Cody Mitchell SproutSeeds

🌌
Starry Code
  • Pensacola, FL
View GitHub Profile
#include <iostream>
#include <ctime>
using namespace std;
void fillArray(int arr[], int length){
for(int i = 0; i < length; ++i){
arr[i] = rand()%10; //0-9
}
}
// Cody Mitchell
// cs162 30179
// This program will load all songs from songs.txt then show a menu selection that lets the user add, remove and search for songs by artist name.
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
const int STRING_SIZE = 256;
const int LINE_SIZE = 256;
const int DATABASE_SIZE = 256;
int addSong(struct Song songArray);
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
const int STRING_SIZE = 256;
const int LINE_SIZE = 256;
const int DATABASE_SIZE = 256;
int addSong(struct Song songArray);
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
const int STRING_SIZE = 256;
const int LINE_SIZE = 256;
const int DATABASE_SIZE = 256;
int addSong(struct Song songArray);
@SproutSeeds
SproutSeeds / EMA_cross.pine
Created December 6, 2019 03:09
EMA Cross Strat
//@version=3
study("Fibonacci EMAs", overlay=true)
sLen= input(title="Short EMA Length", defval=13)
mLen= input(title='Middle EMA Length', defval=55)
lLen= input(title='Long EMA Length', defval=89)
sSMAlen = input(title="Short SMA length", defval=50)
lSMAlen = input(title="Long SMA length", defval=200)
// Required Packages
const fetch = require('node-fetch');
const fs = require('fs');
// Defining my API Key
const key = 'key';
// Defining myData array that will be filled with objects with the design shown above.
let pairs = [
{ base: 'AUD', compared: ['CAD', 'CHF', 'JPY', 'NZD', 'USD'] },
public class CoffeeShopMain {
public static void testCase1() {
System.out.println("Test Case 1:");
CoffeeShop shop = new CoffeeShop();
for (int i = 0; i < 20; i++) {
shop.processOrder(new Order(13, 13, 3, 2));
}
System.out.println(shop);
}
import java.text.NumberFormat;
public class CoffeeShop {
private int milk;
private int coffee;
private int bagels;
private int muffins;
int capCount = 0;
public class Order {
public static final double CAPPUCCINO_COST = 3.95;
public static final double ESPRESSO_COST = 1.45;
public static final double BAGEL_COST = 1.25;
public static final double MUFFIN_COST = 1.95;
int cappuccinoCount;
int espressoCount;
int bagelCount;