Skip to content

Instantly share code, notes, and snippets.

View slaxeea's full-sized avatar
💻

simon slaxeea

💻
View GitHub Profile
@slaxeea
slaxeea / PrivateRoute.js
Created January 12, 2022 12:48
Private route for react
import React from 'react'
import { Route, Redirect } from 'react-router-dom'
import { useAuth } from '../Auth'
export function PrivateRoute({ component: Component, ...rest }) {
const { user } = useAuth()
return (
<Route
import 'dart:developer';
import 'dart:html';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(const MyApp());
}
@slaxeea
slaxeea / canvas.html
Last active September 15, 2021 15:05
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
<h:selectOneMenu value="#{character.haircolor}">
<f:selectItem itemValue="Blond" itemLabel="Blonde Haare" />
<f:selectItem itemValue="Schwarz" itemLabel="Schwarze Haare" />
</h:selectOneMenu>
$continue = "True"
$newNums = "True"
while($continue -eq "True"){
Clear-Host
if($newNums -eq "True"){
$chosenOnes = [Object[]]::new(6)
#include <Servo.h>
int pos = 0;
Servo servo_9;
void setup()
{
servo_9.attach(9);
pinMode(A0, INPUT);
package com.mycompany.versuch2; // package
import java.util.Scanner; import java.util.concurrent.ThreadLocalRandom; // import
public class versuch3 { static void game2() { // class & function
Scanner scanner = new Scanner(System.in); // scanner
int guessInt = 0; int tries = 0; boolean guessing = true; // variables
double rnd = Math.ceil(ThreadLocalRandom.current().nextInt(1, 100 + 1)); // random int
System.out.println("PC chose a number between 1 and 100\nHave a guess:"); // output
while (guessing) { boolean wrongInput = true; tries++; // guessing loop
while (wrongInput) { // wrong input loop
try { guessInt = Integer.parseInt(scanner.nextLine())
package com.mycompany.versuch2;
import java.util.Scanner;
import java.util.concurrent.ThreadLocalRandom;
public class versuch {
// Main function
public static void main(String[] args) {
// Initialize game function
spielerDran = 0
weiter="true"
win="false"
i=0
j=0
weiter="true"
feld= ["_","_","_","_","_","_","_","_","_"]
fill="|"