Hypothetical sportsbetting issue
bigredhoss, May 03 2015
Person A agrees to make bets for Person B at a book Person B does not have access to, in exchange for taking a share of the action. What would you consider a fair arrangement for both people? (assume Person B's bets are +EV)
interesting dream
bigredhoss, Mar 25 2015
if you know C++, click this for quick $64
bigredhoss, Jan 23 2015
i have a random $64 on paypal, if anyone can complete and send this code bug-free while following my criteria within 3 hours of posting this, it's yours. most of the code is already done.
it is a gas tank moniter. there's a constructor that creates a gas tank holding 20 gallons, which is empty upon creation. there's a function to fill it and return #gallons filled, a function to use the gas and return #gallons used, and a function telling the user how many gallons are left in the tank. there's also a function to tell when the fuel is getting low, which is when there are <= 5 gallons left.
1. basically, the switch cases are wrong/incomplete, and probably a couple bugs somewhere else in the code. there should be an output something like:
Gallons filled tank 1 -> 20
Gallons filled tank 2 -> 5
fuel OK
Low fuel light
gallons left -> 4
Gallons filled tank 1 -> 16
Gallons filled tank 2 -> 0
2. add whatever functions/variables are needed but don't change any of the class constructors/variables/functions, and don't make any of the currently private class data public. i don't care if you think it looks shitty, leave the basic structure of the program the same.
3. don't add your own comments or remove any of mine.
4. don't import any additional libraries.
sorry for the shitty formatting, idk how to get the code to format the way it appears in codeblocks.
+ Show Spoiler +
#include < iostream >
using namespace std;
class Gastank{
private:
int lowFuelLevel;
int currentFuelLevel;
int MAX_FUEL_LEVEL;
public:
Gastank(){ // Default Constructor
MAX_FUEL_LEVEL = 20;
currentFuelLevel = 0;
lowFuelLevel = (MAX_FUEL_LEVEL / 4);
}
Gastank(int userVal){ // Alt Constructor
MAX_FUEL_LEVEL = userVal;
currentFuelLevel = 0;
lowFuelLevel = (MAX_FUEL_LEVEL / 4);
}
int fillTank(int gasUp){ // Put gas in the tank, tell us how much was ACTUALLY put in the tank
if (gasUp + currentFuelLevel > MAX_FUEL_LEVEL){
int fuelMissing = MAX_FUEL_LEVEL - currentFuelLevel;
currentFuelLevel = MAX_FUEL_LEVEL;
return fuelMissing;
}
else if (currentFuelLevel == MAX_FUEL_LEVEL){ // Tank is already full
return 0;
}
else{
currentFuelLevel += gasUp; // Put gas in the tank
return gasUp;
}
}
int getTankCapacity(){
return MAX_FUEL_LEVEL;
}
int getFuelLevel(){ // Return the gas level in the tank
return currentFuelLevel;
}
int used(int gasOut){ // Take gas out of the tank
if (currentFuelLevel - gasOut <= 0){
currentFuelLevel = 0;
return 0;
}
else{
currentFuelLevel -= gasOut;
}
}
bool isFuelLow(){ // Toggle the low-fuel light
if (currentFuelLevel <= lowFuelLevel)
return true;
else
return false;
}
};
void main()
{
int gallonsUsed;
int gallonsIn;
int menuOp;
Gastank tank1; // Object to point to class function
tank1.fillTank(3);
Gastank tank2(5);
tank2.fillTank(5);
cout << "Fuel Tanks: " << endl;
cout << "Fuel Tank 1: " << tank1.getFuelLevel() << " / " << tank1.getTankCapacity();
if (tank1.isFuelLow()){
cout << " Warning: Fuel Low";
}
cout << endl;
cout << "Fuel Tank 2: " << tank2.getFuelLevel() << " / " << tank2.getTankCapacity() << endl;
cout << endl;
cout << "Menu Selections" << endl;
cout << "1) Query Tanks" << endl;
cout << "2) Fill Tanks" << endl;
cout << "3) Use Tanks" << endl;
cout << "Choose Menu Option (Integers Only): ";
cin >> menuOp;
switch (menuOp){
case 1:{
cout << "1) Query Tanks" << endl;
cout << "Current fuel level for Tank 1 is: " << tank1.getFuelLevel() << endl;
cout << "Current fuel level for Tank 2 is: " << tank2.getFuelLevel() << endl;
break;
}
case 2:{
cout << "2) Fill Tanks" << endl;
cout << "Please enter the gallons to fill :";
cin >> gallonsIn;
cout << "Gallons filled Tank 1 ->" << tank1.fillTank(gallonsIn) << endl;
cout << "Gallons filled Tank 2 ->" << tank2.fillTank(gallonsIn) << endl;
break;
}
case 3:{
cout << "3) Use Tanks" << endl;
tank1.used(gallonsUsed);
tank2.used(gallonsUsed);
cout << "Gallons out Tank 1 ->" << tank1.used(gallonsUsed) << endl;
cout << "Gallons out Tank 2 ->" << tank2.used(gallonsUsed) << ". Tank level is now " << tank2.getFuelLevel() << endl;
break;
}
system("pause") ;
}
guys i need to grind coffee beans
bigredhoss, Jan 13 2015
i went to the store and bought a bag of coffee, but when i got home i realized FUCK they're whole beans, not ground, and i don't have a coffee grinder.
so i tried crushing them with a heavy hardcover book, didn't work very well. then i tried stomping on them with a thin cloth wrapped around the bag, still didn't work. then i tried going outside and backing over them with my car, still didn't work.
starbucks and carribou coffee are closed here at this hour, i have no other options...what can i do
some friendly spam
bigredhoss, Dec 05 2014
(but really it's pretty neat imo)
disclaimer: only available to college/uni students. not sure how many uni students are on LP but i'm sure there's some who could take advantage of this and have a decent hourly doing so.
MindSumo.com is a site where companies like Microsoft, Facebook, Coca-Cola, Spotify, etc. post real world business-type problems and awards prizes to the best submissions. The prize/entry ratio is probably better than you'd think - a typical payout would be 5 x $150 first prizes and 5 x $50 second prizes for a problem that has a 40-entry cap. (so 25% of submissions make money)
One of the cool things about it is you can see all of the winning submissions for past problems. There's some thoughtful/clever ideas, but it's also pretty clear you don't have to be a genius - an ambitious 7th grader could be in the running for a lot of them.
1. register and they give you free* $30
2. paste this promo code: ER14E9AC when you sign up for another free* $5
3. there's some other crap where they show you how to make some more free* money like filling out your profile etc.
The two catches are:
1. *you need min. $100 in your account to cash out, after the initial free money the easiest way to do this is just place in one of the challenges.
2. you need a valid .edu e-mail to register (see disclaimer). if you go to a university somewhere that doesn't give you a .edu e-mail, you CAN still register but you have to contact them and they will manually verify you're a student.
+ Show Spoiler +
sample problem that's currently open from Marriott International:
"Each year, over 100 million little plastic bottles are used for bathroom amenities in Marriott properties. Though "luxurious" and sanitary, this is a huge waste of resources. The company is determined to lead the charge in the hospitality industry to reduce this type of waste."
Propose a dispenser of bathroom products (shampoo, conditioner, lotion) that is aesthetically pleasing, serviceable by room attendants, and user-friendly. Make sure to include:
1) Description of how your dispenser works (motion, levers, triggers, etc)
2) Visuals that to supplement your description (rough sketch or mockup)
Criteria:
Avoid proposing soap dispensers like you would find in a public restroom. We'd like to stay away from anything that feels industrial.
Note: If your dispenser is ideally located in the sink area or in the bath/shower, feel free to focus on a single use-case.
need help with windows language settings
bigredhoss, Aug 08 2014
alright, so i've had this problem for a while but never bothered trying to fix it because because i know some spanish and it wasn't a big deal...but lately i've been trying to teach myself some stuff, and running into more technical language in spanish can be a pain in the ass sometimes.
language setting in control panel is set to english but all the menu bars etc. show up in spanish. anyone know how to fix this?
die die die
bigredhoss, Jan 29 2014
my roommate i keeps eating these chips making maximum noise, i can hear them not just crunching but swishing and swirling inside his mouth as he loudly prepares to swallow them, then he smacks his lips, and it never stops because the second he's done lip-smacking he starts crunching, and it's so fucking loud i am going to suffocate him in h is sleep
vitamin question
bigredhoss, Jan 26 2014
can anything bad happen from taking too much vitamins?
done with spaghetti
bigredhoss, Jan 14 2014
shit is fucking impossible to eat, why do they make it so long
anyone in Peru or have advice?
bigredhoss, Dec 02 2013
hi guys, i am in Sucre, Bolivia right now but plan on going to Cusco in a couple days. My question is, with roughly 12-14 days in Peru, are there any other places i should visit (besides Machhu Pichu obviously) or should I just stick with Cusco. i'm going by bus so that time includes travel times. i am going through Arequipa on the way back to Argentina but don't know much about it or have plans to spend much time there as of now.
also does anyone have opinions on which option in Bolivia is better between Yungas Road or Lake Titicaca if i only have time to do 1?
thanks
Previous Page Next Page |