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
typealias Key = String | |
protocol StorageProtocol { | |
func integer(for key: Key) -> Int | |
func bool(for key: Key) -> Bool | |
func object<T: Codable>(type: T.Type, for key: Key) -> T? | |
func set(_ newValue: Bool, for key: Key) | |
func set(_ newValue: Int, for key: Key) | |
func set<T: Codable>(_ newValue: T?, for key: Key) |
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 React from 'react'; | |
import PropTypes from 'prop-types'; | |
import deburr from 'lodash/deburr'; | |
import keycode from 'keycode'; | |
import Downshift from 'downshift'; | |
import { withStyles } from '@material-ui/core'; | |
import TextField from '@material-ui/core/TextField'; | |
import Paper from '@material-ui/core/Paper'; | |
import MenuItem from '@material-ui/core/MenuItem'; | |
import Chip from '@material-ui/core/Chip'; |
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
{ | |
"name": "create-react-app", | |
"version": "0.0.0", | |
"private": true, | |
"dependencies": { | |
"@date-io/date-fns": "1.1.0", | |
"@material-ui/core": "3.9.2", | |
"@material-ui/icons": "3.0.2", | |
"auth0-lock": "11.14.1", | |
"autosuggest-highlight": "3.1.1", |
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 React, {useState, Component} from 'react'; | |
import PropTypes from 'prop-types'; | |
import deburr from 'lodash/deburr'; | |
import Autosuggest from 'react-autosuggest'; | |
import match from 'autosuggest-highlight/match'; | |
import parse from 'autosuggest-highlight/parse'; | |
import TextField from '@material-ui/core/TextField'; | |
import Paper from '@material-ui/core/Paper'; | |
import MenuItem from '@material-ui/core/MenuItem'; | |
import { withStyles } from '@material-ui/core/styles'; |
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 Eureka | |
open class _NetworkSearchSelectorViewController<Row: SelectableRowType, OptionsRow: OptionsProviderRow>: SelectorViewController<OptionsRow>, UISearchResultsUpdating where Row.Cell.Value: SearchItem { | |
let searchController = UISearchController(searchResultsController: nil) | |
var originalOptions = [ListCheckRow<Row.Cell.Value>]() | |
var currentOptions = [ListCheckRow<Row.Cell.Value>]() | |
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
package lect; | |
public class MemoryUsage { | |
private static final long MEGABYTE = 1024L * 1024L; | |
private static final long KILOBYTE = 1024L; | |
public static long bytesToKilobytes(long bytes) { | |
return bytes / KILOBYTE; | |
} |
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
package lect; | |
public class MyArrayList<E> extends MyAbstractList<E> { | |
public static final int INITIAL_CAPACITY = 16; | |
private E[] data = (E[])new Object[INITIAL_CAPACITY]; | |
/** Create a default list */ | |
public MyArrayList() { | |
} |
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
package lect; | |
import java.util.Comparator; | |
import java.util.Iterator; | |
public class MyLinkedList<E> extends MyAbstractList<E> { | |
public Node<E> head; | |
private Node<E> tail; | |
Node<E> sorted; |