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
interface ICommandRegistry { | |
commandAdded: ISignal<ICommandRegistry, string>; | |
commandRemoved: ISignal<ICommandRegistry, string>; | |
commandChanged: ISignal<ICommandRegistry, string>; | |
keyboardLayoutChanged: ISignal<ICommandRegistry, void>; |
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
/** | |
* A function which takes no arguments and returns a unique string ID. | |
* | |
* Requirements: | |
* - The id must be unique for the current process only | |
* - The id should avoid hashing collisions when used as a key in a map | |
* - The function must not create global variables | |
* - The value of `Math.random()` cannot be assumed to be unique | |
* - The browser `Crypto` object may not be used |
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
#include <iostream> | |
class Foo { | |
public: | |
Foo() { | |
std::cout << this->getValue(); | |
} |
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 TypedMap: | |
""" A class which implements a typed map. | |
""" | |
def __init__(key_type, value_type): | |
pass | |
# Implement the methods required | |
# for the functionality demonstrated |
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
/** | |
* A generator function which maps a function across an iterable of values. | |
*/ | |
function map(fn, items) { // Add typings to the function definition | |
// Implement the body of the function | |
} | |
interface HasLength { | |
length: number; |
OlderNewer