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; |
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
#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
/** | |
* 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
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
interface ISlot<T, U> { | |
(sender: T, args: U): void; | |
} | |
class Signal<T, U> { | |
connect(slot: ISlot<T, U>): 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
interface ISignal { | |
_ISignalStructuralProperty: void; | |
} | |
interface ISignal1<T1> { | |
_ISignal1StructuralPropertyT1: T1; | |
} |
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
collections | |
----------- | |
phosphor-arrays | |
phosphor-queue | |
phosphor-sectionlist | |
core | |
---- | |
phosphor-disposable | |
phosphor-messaging |
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
Ss-MacBook-Pro:phosphorjs Chris$ mkdir foo | |
Ss-MacBook-Pro:phosphorjs Chris$ cd foo | |
Ss-MacBook-Pro:foo Chris$ git clone https://github.com/phosphorjs/phosphor-gridpanel.git | |
Cloning into 'phosphor-gridpanel'... | |
remote: Counting objects: 87, done. | |
remote: Compressing objects: 100% (58/58), done. | |
remote: Total 87 (delta 20), reused 87 (delta 20), pack-reused 0 | |
Unpacking objects: 100% (87/87), done. | |
Checking connectivity... done. | |
Ss-MacBook-Pro:foo Chris$ cd phosphor-gridpanel/ |
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
Ss-MacBook-Pro:phosphorjs Chris$ mkdir foo | |
Ss-MacBook-Pro:phosphorjs Chris$ cd foo | |
Ss-MacBook-Pro:foo Chris$ npm install phosphor-gridpanel | |
| | |
> [email protected] postinstall /Users/Chris/Development/phosphorjs/foo/node_modules/phosphor-gridpanel/node_modules/phosphor-widget | |
> npm dedupe | |
> [email protected] postinstall /Users/Chris/Development/phosphorjs/foo/node_modules/phosphor-gridpanel | |
> npm dedupe |
NewerOlder