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 { TweenMax } from 'gsap'; | |
export default class Box extends React.Component { | |
componentWillEnter(callback) { | |
const el = this.container; | |
TweenMax.fromTo(el, 0.3, { y: 100, opacity: 0 }, { y: 0, opacity: 1, onComplete: callback }); | |
} |
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
#Analysis of Dutch Language Vocabulary | |
#Sjors van Heuveln 28-10-2017 | |
#Analyze triplet occurrences in the Dutch Language. This script can easily source another vocab file to do new analysis. | |
#Functions | |
trimWord <- function(rawWord) { | |
return(unlist(strsplit(rawWord,'/'))[1]); #trims off ID | |
} | |
wordTriplets <- function(word, size) { | |
if (grepl(' ', word)) { return(); } #break if word contains spaces |
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 { Link } from 'react-router-dom'; | |
import { TweenMax } from 'gsap'; | |
import { Button, Card, CardBlock, CardHeader, Col } from 'reactstrap'; | |
export default class StoryBlock extends React.Component { | |
componentWillEnter(callback) { | |
const el = this.container; | |
TweenMax.fromTo(el, 0.4, { x: 500, opacity: 0 }, { x: 0, opacity: 1, onComplete: callback }); | |
} |
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 { Fraction, toTex } from 'algebra.js'; | |
import { Node, Context } from 'react-mathjax'; | |
function Formula(props) { | |
return ( | |
<Context input="tex"> | |
<Node inline>{props.tex}</Node> | |
</Context> | |
); |
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 function Time(hours, minutes) { | |
this.h = hours; | |
this.m = minutes; | |
this.add = (h, m) => { | |
this.h = (this.h + h) % 24; | |
this.h = this.h + Math.floor((this.m + m) / 60); | |
this.m = (this.m + m) % 60; | |
return this; // for method chaining | |
}; |