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
function testManaTransferFrom() public { | |
address mana = collectorContract.MANA(); | |
(uint256 initialQty, , , , , ) = collectorContract.assets(mana); | |
console.log(MANAToken(mana).balanceOf(AaveV2Ethereum.COLLECTOR)); | |
console.log("allowance before"); | |
console.log(MANAToken(mana).allowance(AaveV2Ethereum.COLLECTOR, address(this))); | |
vm.prank(AaveV2Ethereum.COLLECTOR); |
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
class ComputerGuess | |
def play | |
possible_digits = [0,1,2,3,4,5,6,7,8,9] | |
good_digits = [] | |
bad_digits = [] | |
playing = true | |
while playing | |
initial_guess = generate_number(possible_digits) | |
clues = get_clues(initial_guess) | |
running = did_we_guess?(clues) |
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
class HumanGuessing | |
def play: | |
guessme = get_number_to_guess | |
until endgame | |
guess = get_user_guess | |
if !valid?(guess) | |
# Ask user to guess again | |
else | |
check_versus_generated_number(guessme, guess) |
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
import random | |
MAX_TEAMS = 5 | |
back_end = ['Evan Reisman', 'Cort Lyons', 'Rogerio da Silva', 'Bruno Coelho', 'Alireza Golkar', 'Rodrigo Quaresma', | |
'Dimitri Vassiliev', 'Ozan Ackin', 'Josh Brickner', 'Benjamin Matthews'] | |
front_end = ['Paul Parker', 'Noah Drabinsky', 'Balinder Singh', 'Mohammed Alsaid', 'Pouya Sanoeei', 'Angel Garbarino'] | |
qa = ['Jacek Adamczyk', 'Greg McAlpine', 'Justin Siples', 'Warren Tom', 'Paul Ripley', 'Maria Luisa Chau', 'Anna Prokofyev'] |
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
def fibs(n) | |
first_fib = 1 | |
second_fib = 1 | |
result = [first_fib, second_fib] | |
if n < 1 | |
return "Please enter a valid number, it has to be greater than or equal to 1." | |
end | |
while second_fib < n |
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
CSS file | |
.error { | |
color: red; | |
} | |
JavaScript/jQuery file | |
$(function() { |
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
# Author: piscu Carranza | |
# January 19, 2015 | |
# Week Two - Wyncode | |
# Profile | |
module WyncodeMethods | |
# Problems With Floats | |
puts "Here's a calculator to give the check with tip included." |
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
# Author: piscu Carranza | |
# January 19, 2015 | |
# Week Two - Wyncode | |
# Profile | |
# Problems With Floats | |
puts <<END | |
Using floats can be a pain. Therefore, | |
here is an idea on how to make sure no |
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
#Profile | |
# Problems With Floats | |
puts <<END | |
Using floats can be a pain. Therefore, | |
here is an idea on how to make sure no | |
random digits are added (stupid binary!). | |
END |