import React from 'react';
class ComponentWithState extends React.Component {
constructor(props) {
super(props);
this.state = {
counter: 0,
name: '',
}
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 com.teyg; | |
import java.io.IOException; | |
import java.nio.file.Paths; | |
import org.jsfml.graphics.FloatRect; | |
import org.jsfml.graphics.RenderWindow; | |
import org.jsfml.graphics.Sprite; | |
import org.jsfml.graphics.Texture; | |
import org.jsfml.system.Vector2f; |
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
<div class="products"> | |
<table class="item-list"> | |
{% for item in items %} | |
<tr> | |
<td><center>{{item.name}}</center><br><img src="{{ item.imgur }}"> | |
</tr> | |
{% endfor %} | |
</table> | |
</div> |
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
$columns: 12; | |
$grid-breakpoints: ( | |
xs: 0, | |
sm: 544px, | |
md: 768px, | |
lg: 992px, | |
xl: 1200px | |
); |
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 gulp = require('gulp'); | |
var concat = require('gulp-concat'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var uglify = require('gulp-uglify'); | |
var cssnano = require('gulp-cssnano'); | |
var sass = require('gulp-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var SOURCES = { |
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
.text-center { | |
text-align: center; | |
} | |
.text-left { | |
text-align: left; | |
} | |
.text-right { | |
text-align: right; |
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 { call, put, takeLatest } from 'redux-saga/effects' | |
import axios from 'axios' | |
export const FETCH_API_REQUEST = 'FETCH_API_REQUEST'; | |
export const FETCH_API_SUCCESS = 'FETCH_API_SUCCESS'; | |
export const FETCH_API_FAIL = 'FETCH_API_FAIL'; | |
// Moved api call into own function (for easy test swapping) | |
export function fetchFromApi(userId) { | |
return axios.get(`/users/${userId}`) |
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 java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import java.util.*; | |
public class Madlib { | |
public static void main(String a[]){ | |
String stream = "My name is NAME and I work at COMPANY"; | |
Pattern pattern = Pattern.compile("\\b[A-Z]{2,}\\b"); | |
// Pattern pattern = Pattern.compile("\\{([A-Za-z0-9]+)\\}"); // use this to replace {word} instead of CAPITALS |
import React from 'react';
class ComponentWithState extends React.Component {
constructor(props) {
super(props);
this.state = {
counter: 0,
name: '',
}
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 fetch = require("node-fetch"); | |
function baseRequest(url, options) { | |
return fetch(`https://api.cloudflare.com/client/v4/${url}`, { | |
headers: { | |
Authorization: "Bearer YOUR_TOKEN_HERE", | |
}, | |
...options, | |
}); | |
} |