This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Corrects grammar | |
string q_gram = (quarters == 1) ? "quarter" : "quarters"; | |
string d_gram = (dimes == 1) ? "dime" : "dimes"; | |
string n_gram = (nickels == 1) ? "nickel" : "nickels"; | |
string p_gram = (pennies == 1) ? "penny" : "pennies"; | |
// Outputs the change | |
printf("Your change is: "); | |
if (quarters != 0) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* bmp.h | |
* | |
* Computer Science 50 | |
* Problem Set 4 | |
* | |
* BMP-related data types based on Microsoft's own. | |
*/ | |
#include <stdint.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm following the book instructions to try and get their repo set up. My current GHC version is 8.0.2. | |
Here's what I did, as per the instructions: | |
$ cabal update | |
$ cabal get hid-examples | |
-- seems to work OK, I get the package in its own directory. | |
$ cabal sandbox init | |
-- seems to work OK, I have a cabal.sandbox.config and a .cabal-sandbox file in my directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
'jest/globals': true | |
}, | |
extends: [ | |
'eslint:recommended', | |
'hardcore', | |
'plugin:jest/recommended', |