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
// first file is layout.js | |
// authapp/components/layout.js | |
import styles from "./../../styles/Layout.module.css" | |
export default function Layout({children}) { | |
return ( | |
<div className="flex h-screen bg-blue-400"> | |
<div className="m-auto bg-slate-50 rounded-md w-3/5 h-3/4 grid lg:grid-cols-2"> | |
<div className={styles.imgStyle}> | |
<div className={styles.cartoonImg}></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
// Package auth provides authentication and authorization support. | |
package auth | |
import ( | |
"crypto/rsa" | |
"github.com/dgrijalva/jwt-go" | |
// "github.com/dgrijalva/jwt-go/v4" | |
"github.com/pkg/errors" | |
) |
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
// model | |
// FilterProduct defines what information may be provided to make a request to get Products and filter the results. | |
// All fields are optional so clients can send just the fields they want changed. | |
// It uses pointer fields so we can differentiate between a field that was not provided and a field that was provided as explicitly blank. | |
// Normally we do not want to use pointers to basic types but we make exceptions around marshalling/unmarshalling. | |
type FilterProduct struct { | |
Name *string `json:"name"` | |
Cost *int `json:"cost" validate:"omitempty,gte=0"` | |
Quantity *int `json:"quantity" validate:"omitempty,gte=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
package main | |
import ( | |
"context" | |
"crypto/rsa" | |
_ "expvar" // Register the expvar handlers | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" |
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" | |
const cardStyles = { | |
display: "flex", | |
flexDirection: "column", | |
justifyContent: "space-around", | |
alignItems: "flex-start", | |
padding: "1rem", | |
marginBottom: "1rem", | |
boxShadow: "5px 5px 25px 0 rgba(46,61,73,.2)", | |
backgroundColor: "#fff", |
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 { graphql, StaticQuery } from "gatsby" | |
import SkuCard from "./SkuCard" | |
const containerStyles = { | |
display: "flex", | |
flexDirection: "row", | |
flexWrap: "wrap", | |
justifyContent: "space-between", | |
padding: "1rem 0 1rem 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
/* This code sample exemplifies an important aspect of your coding philosophy for many reasons. | |
* In most cases it's not a good idea to nest for loops. | |
* In this unique case it's ok because the object(s) being looped will always have a length of 4. | |
* My coding philosophy is similar to my life philosophy, everything depends on the event it's applied to. | |
* There are few hard and fast rules. Read the room and make a decision. | |
* Another way in which this code sample exemplifies my coding philosophy is that the function rewards the player for effort. | |
* This code is part of a game that asks the player to guess a four letter word. The player may receive points for wrong answers. | |
* | |
* | |
*/ |
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, { useReducer } from "react"; | |
import * as actionTypes from "./actionTypes"; | |
export const matchInitialState = { | |
currentUser: {}, | |
endpoint: "localhost:4001", | |
// endpoint: "http://192.168.0.4:4001", | |
match: { | |
scoreKeeper: "", | |
homeTeam: "5c9a9ef3e6814f122a1af324", |
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 { | |
UPDATE_MATCH, | |
INCREMENT_HOME_SCORE, | |
INCREMENT_AWAY_SCORE, | |
INCREMENT_BALLS, | |
INCREMENT_STRIKES, | |
INCREMENT_FOULS, | |
INCREMENT_OUTS, | |
INCREMENT_CURRENT_INNING, | |
CREATE_NEW_MATCH, |
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.intraedge.project.prok.controllers; | |
import java.util.List; | |
import javax.validation.Valid; | |
import org.bson.types.ObjectId; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.web.bind.annotation.PathVariable; | |
import org.springframework.web.bind.annotation.RequestBody; |
NewerOlder