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
{ | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"project": "./tsconfig.json", | |
"sourceType": "module" | |
}, | |
"extends": [ | |
"plugin:@typescript-eslint/recommended", | |
"favoritemedium-typescript/config/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
import { Button, Radio } from '@material-ui/core'; | |
function renderOptions(): ReactElement[] { | |
const options: ReactElement[] = []; | |
for (let i = 0; i < 4; i += 1) { | |
const label = i === 0 ? translate('none') : `${i} ${i === 1 ? translate('time') : translate('times')}`; | |
options.push( | |
<Button | |
className={clsx(styles.card, { [styles.selected]: enteritisCount === i })} | |
key={`option-${i}`} |
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
<Progress | |
current={questionIdx + 1} | |
total={questions.length} | |
/> |
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 { Application, Router } from "https://deno.land/x/oak/mod.ts"; | |
const router = new Router(); | |
router.get("/", (context : any) => { | |
context.response.body = "Hello world!"; | |
}); | |
//getUser |
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
router.post("/addUser",(context : any) => { | |
try{ | |
const decoder = new TextDecoder("utf-8"); | |
const data = Deno.readFileSync("./users.json"); | |
console.log(decoder.decode(data)); | |
const users = JSON.parse(decoder.decode(data)); | |
console.log(Object.keys(users).length); | |
var len = Object.keys(users).length; | |
var user :any = { | |
"name":"New User", |
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
router.get("/getUser/:id",(context : any) => { | |
try{ | |
const decoder = new TextDecoder("utf-8"); | |
const data = Deno.readFileSync("./users.json"); | |
console.log(decoder.decode(data)); | |
const users = JSON.parse(decoder.decode(data)); | |
if (context.params && context.params.id && users["user"+context.params.id]) | |
{ | |
const user = users["user"+context.params.id]; | |
context.response.body = user; |
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, { useEffect, useRef, useState } from "react"; | |
import { | |
select, | |
line, | |
curveCardinal, | |
scaleLinear, | |
axisBottom, | |
axisRight | |
} from "d3"; | |
import "./App.css"; |
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
TRUNCATE TABLE users,posts,comments,favorites,friends RESTART IDENTITY; | |
insert into users (first_name,last_name,age,email) values ('Kevon','Lebsack',36,'Daniela.Lindgren42@gmail.com'); | |
insert into users (first_name,last_name,age,email) values ('Vada','Waelchi',51,'Zita.Bradtke78@hotmail.com'); | |
insert into users (first_name,last_name,age,email) values ('Virgil','Friesen',63,'Lizzie.Huels2@yahoo.com'); | |
insert into users (first_name,last_name,age,email) values ('Jerrell','Bode',20,'Reyna.Blanda@yahoo.com'); | |
insert into users (first_name,last_name,age,email) values ('Murray','Murray',85,'Joany.Kuhlman@gmail.com'); | |
insert into users (first_name,last_name,age,email) values ('Carolyn','Pacocha',19,'Mohammad_Bergnaum@yahoo.com'); | |
insert into users (first_name,last_name,age,email) values ('Rowena','Rodriguez',36,'Vincenzo.Bartell@yahoo.com'); | |
insert into users (first_name,last_name,age,email) values ('Jordan','Schneider',18,'Eryn.Olson23@hotmail.com'); | |
insert into users (first_name,last_name,age,email) values ('Camyll |
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
$primary: orange; | |
$danger: black; | |
@import "~bootstrap/scss/bootstrap"; | |
body { | |
color: white; | |
background: teal; | |
} |
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 path = require("path"); | |
module.exports = { | |
mode: "development", | |
devtool: "none", | |
entry: "./src/index.js", | |
output: { | |
path: path.resolve(__dirname, "dist"), | |
filename: "main.js" | |
} | |
}; |
NewerOlder