Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"files.associations": {
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"fstream": "cpp",
"functional": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"ostream": "cpp",
"numeric": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"typeinfo": "cpp",
"algorithm": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"optional": "cpp",
"random": "cpp",
"string": "cpp",
"string_view": "cpp"
}
}
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CC = g++

all:
$(CC) -std=c++11 -o a.exe main.cpp
CFLAGS = -Iinc -Idep -w -std=c++11 -lboost_system -lboost_filesystem -lpthread
_DEPS = main.h
clean:
rm -f a.exe

Binary file added assets/background1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/background2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/background3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon_frog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo_hackmercedV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pfpurple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/untitled1.mp3
Binary file not shown.
Binary file added assets/untitled2.mp3
Binary file not shown.
Binary file added assets/untitled3.mp3
Binary file not shown.
9 changes: 9 additions & 0 deletions hackmerced/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CC = g++

all:
$(CC) -std=c++11 -o a.exe main.cpp
CFLAGS = -Iinc -Idep -w -std=c++11 -lboost_system -lboost_filesystem -lpthread
_DEPS = main.h
clean:
rm -f a.exe

1 change: 1 addition & 0 deletions hackmerced/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# hackmerced
Binary file added hackmerced/assets/background1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackmerced/assets/background2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackmerced/assets/background3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackmerced/assets/icon_frog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackmerced/assets/logo_hackmercedV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackmerced/assets/pfpurple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackmerced/assets/untitled1.mp3
Binary file not shown.
Binary file added hackmerced/assets/untitled2.mp3
Binary file not shown.
Binary file added hackmerced/assets/untitled3.mp3
Binary file not shown.
6 changes: 6 additions & 0 deletions hackmerced/inc/main.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CFLAGS = -Iinc -Idep -w -std=c++11 -lboost_system -lboost_filesystem -lpthread
#ifndef MYLIB
#define MYLIB
#include <string>
int percentCalc(Resource * entry);
#endif
214 changes: 214 additions & 0 deletions hackmerced/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
<!DOCTYPE html>

<html lang="en" style="padding-top: 80px;">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Quid</title> <!--INSERT TITLE-->

<link rel="stylesheet" href="static/style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="static/main.js"></script>
<script src="static/chart.js"></script>

<script language = "javascript">
function clickAddRow(){
$.get("/addRow"),{},function(response){
//Implement images/design last
//1
var table = document.getElementById("myTable");
var x = table.insertRow(0);
var a = table.rows.length-1;
var l = table.rows[a].cells.length;

for(var c = 0, m = 1; c < m; c++)
{
table.rows[0].insertCell(c);
table.rows[0].cells[c].innerHTML = "&nbsp;&nbsp";

}
//2
$(table).find('tbody').append("<tr><td>aaaa</td></tr>");
//3
tableRef.insertRow(tableRef.rows.length);
//4
var tableRef = document.getElementById('myTable').getElementsByTagName('tbody')[0];

var newRow = tableRef.insertRow();
}
}
</script>

<style>
div.fixed {
position: fixed;
bottom: 0;
left: 0;
width: 275px;
}
#background {
background-image: url('assets/background1.png'), url('assets/background2.png'), url('assets/background3.png');
background-attachment: fixed;
background-repeat: no-repeat, repeat;
background-size: cover;
}


.body {
background-image: url('assets/background1.png'), url('assets/background2.png'), url('assets/background3.png');
background-color: lightblue;
align-content: center;
}

.header{
text-align: center;
}

.main{
text-align: center;
}
.button {
background-color: rgb(107, 161, 152);
border: none;
color: black;
display:block;
padding: 15px 32px;
text-align: center;
align-items: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-family: "Varela Round";
margin: 4px 2px;
cursor: pointer;
border-radius: 50%;
border: 2px solid #4CAF50;
transition-duration: 0.4s;
}
.button:hover{
background-color: rgb(51, 71, 68);
}
.container img{
width: 100%;
height: auto;
text-align: center;
}
.column{
float: left;
width: 25%;
padding: 10px;
}

.row:after{
content: "";
display: table;
clear: both;
}
</style>
</head>

<body class = "body">

<div class = "container">
<h1 class = "header"> <img src = "assets/logo_hackmercedV.png" style="width:528px;height:220px;" > </h1> <!--INSERT APPLICATION NAME-->
<h2 class = "month" id = "month"> </h2>
<main class = "main">
<div class = "container">
<div class = "row">
<div class = "column">
<h4>Name</h4>
<input name = "name_input" id = "myName" value = "name">
</div>
<div class = "column">
<h4>Price</h4>
<input price = "price_input" id = "myPrice" value = "21">
</div>
<div class = "column">
<h4>Quantity</h4>
<input quantity = "quantity_input" id = myQuantity value = "21">
</div>
<div class = "column">
<h4>Category</h4>
<select category = "category_selection">
<option None = "none">None</option>
<option option1 = "food">Food</option> <!--PLACEHOLDERS-->>
<option option2 = "material">Material</option>
</select> <!-- <div category = "category_area"></td>-->
</div>
</div>
<br></br>
<!--<button class = "button" onclick = "clickAddRow()">Add Row</button>
<button class = "button" onclick = "clickAddMonth()">Add Month</button> -->
<button class = "button" onclick = "clickFinish()">Finish</button><br></br>
</div>
</div>
<p id="demo"></p>


<!--<script>
function clickFinish() {
var x = document.getElementById("myName").value;
document.getElementById("demo").innerHTML = x;
var y = document.getElementById("myPrice").value;
document.getElementById("demo").innerHTML = y;
var z = document.getElementById("myQuantity").value;
document.getElementById("demo").innerHTML = z;
}
</script>-->

<canvas id="myChart" style="position: relative; height:40vh; width:80vw"></canvas>
<script>
function clickFinish(){
var ctx = document.getElementById('myChart');
var myChart = new Chart(ctx, {
type: 'pie',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
datasets: [{
label: 'Total Spendings',
data: [5, 2, 20, 14, 7, 9, 17, 11, 12, 12,13, 3],
backgroundColor: [
"#3e95cd", "#3cc7b0", "#37cc6b", "#52cc37", "#cede21", "#e8b320",
"#fc953a", "#ed4426", "#2629ed", "#ae26ed", "#ed26cc","#a12228"
],


}]
},
options: {
scales: {
xAxes: [{
scaleLabel: true,
}],
yAxes: [{
ticks: {
scaleLabel: true,
beginAtZero: true
}
}]
}
}
});
}
</script>

<div class="fixed">
<audio id="myaudio" controls autoplay src="assets/untitled1.mp3" type="audio/mpeg">
</audio>
<audio id="myaudio" controls autoplay src="assets/untitled2.mp3" type="audio/mpeg">
</audio>
<audio id="myaudio" controls autoplay src="assets/untitled3.mp3" type="audio/mpeg">
</audio>
</div>

</main>

</body>

<footer></footer> <!--INSERT SOCIAL MEDIA LINKS/ICONS-->

</html>
19 changes: 19 additions & 0 deletions hackmerced/prepseudocode.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
box inputs: (constructors?)
input color?
input price
input amount
input category

data calculations here:
make calculations for graphs
calculate percentages based on price and/or amounts
if statements to determine which messages to output (return/send strings)

simulation:
text based retro?
for each day, week, or other passage of time{
add funding
consume by set amounts (random preferred)
speed/progress bonuses
hinder progress w/ a lack of resources
}
54 changes: 54 additions & 0 deletions hackmerced/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#include <iostream>
#include <algorithm>
#include <random>
#include <unordered_map>
#include <main.h>
#define MAX_NAME_LENGTH = 128;

using namespace std;

class Resource{
int percent, price, quantity, category;
char * name;
public:
void Struct(char * name, int price, int quantity, int category){


}

char * setName(){
name = "sample";
}
void setPrice(int a, int b, int c){
price = a;
quantity = b;
category = c;
}

double foodMaterial(){
if (category == 1){
return 1.5;
}
return 1;
}

};

int percentCalc(Resource * entry){
return 0;
}


int main(int argc,char **argv) {
Resource * entry;

//resource array

//Insert function to store input variables
percentCalc(entry);
//Insert function to calculate percent on a monthly basis? (store values into array)



}

Loading