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, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import CounterControl from '../../components/CounterControl/CounterControl'; | |
import CounterOutput from '../../components/CounterOutput/CounterOutput'; | |
class Counter extends Component { | |
state = { | |
counter: 0 | |
} |
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 initialState = { | |
counter: 0 | |
} | |
const reducer = (state = initialState, action) => { | |
if (action.type === 'INCREMENT') { | |
return { | |
counter: state.counter + 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, { Component } from "react"; | |
import "./App.css"; | |
import EasyTimer from "easytimer"; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { timer: null, timeValues: "" }; | |
} |
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
/* | |
Before using make sure you have: | |
npm install --save-dev gulp gulp-minify-css gulp-concat gulp-uglify gulp-autoprefixer gulp-sass | |
Make sure to change the directory names in the default watch function to the CSS/SCSS/SASS directories you are using so it reloads | |
*/ | |
var gulp = require('gulp'), | |
minifyCSS = require('gulp-minify-css'), | |
concat = require('gulp-concat') |
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
React = require 'react' | |
PropTypes = require 'prop-types' | |
CreateReactClass = require 'create-react-class' | |
ReactCountdownClock = CreateReactClass | |
_seconds: 0 | |
_radius: null | |
_fraction: null | |
_content: null | |
_canvas: null |
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, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
class ReactCountdownClock extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
seconds: 0, | |
radius: null, |
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
/* | |
* decaffeinate suggestions: | |
* DS101: Remove unnecessary use of Array.from | |
* DS102: Remove unnecessary code created because of implicit returns | |
* DS104: Avoid inline assignments | |
* DS205: Consider reworking code to avoid use of IIFEs | |
* DS207: Consider shorter variations of null checks | |
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md | |
*/ | |
const React = require("react"); |
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
var renderPage = true; | |
if(navigator.userAgent.indexOf('MSIE')!==-1 | |
|| navigator.appVersion.indexOf('Trident/') > 0){ | |
/* Microsoft Internet Explorer detected in. */ | |
alert("Please view this in a modern browser such as Chrome or Microsoft Edge."); | |
renderPage = false; | |
} |
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
<script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this in a modern browser such as latest version of Chrome or Microsoft Edge.");</script> |
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
public class PhotoAdapter extends RecyclerView.Adapter<PhotoAdapter.PhotoViewHolder> implements View.OnClickListener { | |
private ArrayList<Photo> photos; | |
public ArrayList<Photo> photosToRemove; | |
private OnItemClickListener onItemClickListener; | |
private Context context; | |
public PhotoAdapter(Context context, ArrayList<Photo> photos, Map<Integer, String> authors, int colHeigth) { |