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
// var songInfo = { | |
// songName: '' | |
// lyric: '', | |
// } | |
// | |
// A pseudo-genre is the artist and their related artists. | |
// | |
function getArtist(searchString) { | |
// Make API call to get the artist from the search string |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<div><h1>Testing...</h1></div> | |
<div class="card-list" id="card-list"></div> | |
</body> | |
<script type="text/template" id="card-list-item"> | |
<div class="card-list-item"> | |
<h2 class="card-title"></h2> |
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
userGuess = 'a' // Whatever | |
userGuesses = [] // Assume this is populated | |
shouldInsertGuess = true; | |
for (var i = 0; i < userGuesses.length; i++) { | |
if (userGuesseses[i] === userGuess) { | |
shouldInsertGuess = false; | |
break; | |
} | |
} |
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
from functools import singledispatch | |
class singledispatchmethod(object): | |
def __init__(self, method): | |
self.method = singledispatch(method) | |
def register(self, klass, method=None): | |
return self.method.register(klass, func=method) |