Skip to content

Instantly share code, notes, and snippets.

Marcus Zierke marcuszierke

Block or report user

Report or block marcuszierke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marcuszierke
marcuszierke / contactForm.js
Created Oct 16, 2019
React Contact Form without using state
View contactForm.js
import React, { useState } from 'react';
const ContactForm = () => {
const [newsletterValue, setNewsletterValue] = useState(false);
function changeNewsletterValue() {
setNewsletterValue(!newsletterValue);
}
function handleSubmit(event) {
@marcuszierke
marcuszierke / contactForm2.js
Last active Oct 16, 2019
React Contact Form without using state
View contactForm2.js
import React, { useState } from 'react';
const ContactForm = () => {
const [newsletterValue, setNewsletterValue] = useState(false);
function changeNewsletterValue() {
setNewsletterValue(!newsletterValue);
}
...
@marcuszierke
marcuszierke / contactForm1.js
Created Oct 16, 2019
React Contact Form without using state
View contactForm1.js
import React from 'react';
const ContactForm = () => {
function handleSubmit(event) {
event.preventDefault();
const data = {};
const formElements = Array.from(event.target);
formElements.map(input => (data[input.name] = input.value));
}
View lotto.py
import unittest
def bn(draws=None, balls=None):
#error message for missing input
if draws == None or balls == None: return "Missing Input"
#error message for negative input
if draws < 0 or balls < 0: return "Input has to be a number >= 0"
#error message if draws > balls
if balls<draws: return "Input number for draws has to be <= input number for balls"
#defining the factorial function
@marcuszierke
marcuszierke / ticTacToe.html
Created Oct 31, 2017
Another Free Code Camp challenge to code the Tic Tac Toe game
View ticTacToe.html
<html>
<head>
<meta charset="utf-8">
<title>Free Code Camp - Tic Tac Toe Game</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.12/themes/redmond/jquery-ui.css">
<style type="text/css"><
body {
background-color: white;
View simonGame.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FCC Simon Game</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<style type="text/css">
body {
background-color: beige;
@marcuszierke
marcuszierke / twitchTV.html
Last active Oct 19, 2017
Free Code Camp - TwitchTV
View twitchTV.html
<html>
<head>
<meta charset="utf-8">
<title>Twitch.tv - Viewer</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style type="text/css">
<link href="https://fonts.googleapis.com/css?family=Catamaran" rel="stylesheet">
@marcuszierke
marcuszierke / pomodora.html
Last active Oct 21, 2017
Free Code Camp Pomodora Clock
View pomodora.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Free Code Camp Pomodora Clock</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<audio id="buzzer" src="http://codingtutorials360.com/14244764.mp3" type="audio/mpeg"></audio>
<audio id="buzzer2" src="paused.wav" type="audio/mpeg"></audio>
<style type="text/css">
@marcuszierke
marcuszierke / calculator.html
Last active Oct 19, 2017
HTML code for a JS Calculator
View calculator.html
<html>
<head>
<meta charset="utf-8">
<title>Free Code Camp Calculator</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=OswaldPrompt" rel="stylesheet">
<style type="text/css">
body {
background-image: url("http://www.marvelbuilding.com/wp-content/uploads/2012/11/version-37-of-Artistic-Wallpaper-in-Unrepeated-Raw-Concrete-Pattern.jpg");
@marcuszierke
marcuszierke / wikipediaViewer.html
Last active Oct 19, 2017
As part of the FreeCodeCamp (FCC) I was suppose to create a wikipedia viewer with Ajax and jQuery.
View wikipediaViewer.html
<!DOCTYPE html>
<html>
<head>
<title>Wikipedia Viewer</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Cinzel" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet">
<style>
You can’t perform that action at this time.