- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
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
https://gist.github.com/avastamin/a254506a97374c921d9bd4e086ff7ef2 | |
/** | |
* In this short assessment, the following code tries to implement the React Suspense API, | |
* but does so incorrectly. There are 3 core issues with how these components utilize Suspense and concurrent mode -- can you find them? | |
* | |
* In your submission, be sure to: | |
* 1) Clearly identify what the 3 core issues are, and how they violate the principles of React Suspense; | |
* 2) Write and submit the code to fix the core issues you have identified in a gist of your own | |
* |
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
const mongoose = require("mongoose"); | |
const Schema = mongoose.Schema; | |
//https://groups.google.com/forum/#!topic/mongodb-user/AdlvRy1AC_I | |
//https://stackoverflow.com/questions/45293832/simple-questionnaire-app-design-in-mongodb | |
// https://stackoverflow.com/questions/19672260/mongodb-schema-for-dynamic-questions-and-answers | |
// https://talk.birmingham.io/t/questionnaire-database-schema-help/1464 | |
//https://stackoverflow.com/questions/9127174/why-does-mongoose-have-both-schemas-and-models | |
const QuestionSchema = new Schema({ | |
name: 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
import React, { useState, useEffect } from "react"; | |
import Button from "@material-ui/core/Button"; | |
import { makeStyles } from "@material-ui/core"; | |
import Dialog from "@material-ui/core/Dialog"; | |
import DialogActions from "@material-ui/core/DialogActions"; | |
import DialogContent from "@material-ui/core/DialogContent"; | |
import DialogTitle from "@material-ui/core/DialogTitle"; | |
import TextField from "@material-ui/core/TextField"; | |
import CancelIcon from "@material-ui/icons/Cancel"; |
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
export const authenticateWithTwilio = () => (dispatch) => { | |
dispatch(fetchTwilioRequest()); | |
return API.getTwilioToken() | |
.then((response) => { | |
dispatch(authenticateWithTwilioSuccess(response)); | |
Client.create(response.token).then((chatClient) => { | |
twilioChat.chatClient = chatClient; | |
dispatch(initChat(chatClient)); | |
chatClient.on('messageAdded', message => dispatch(sendNewMessageSuccess(message))); | |
}); |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
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
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Open (or create) the database | |
var open = indexedDB.open("MyDatabase", 1); | |
// Create the schema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
Standard Braking Distance (Geschwindigkeit / 10) * (Geschwindigkeit / 10)
Evasive (Emergency) Braking Distance ((Geschwindigkeit / 10) * (Geschwindigkeit / 10)) / 2
Examples:
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
<html> | |
<head> | |
<title>Pardot Example Form Handler Submit</title> | |
<!-- Include jQuery --> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<!-- Post to Pardot function --> | |
<script type="text/javascript"> | |
// set the pardot form handler url and form element id |
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
/* | |
* Programming Quiz: Make An Iterable Object | |
* | |
* Turn the `james` object into an iterable object. | |
* | |
* Each call to iterator.next should log out an object with the following info: | |
* - key: the key from the `james` object | |
* - value: the value of the key from the `james` object | |
* - done: true or false if there are more keys/values | |
* |
NewerOlder