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
function narcissism (name) { | |
const narcissisticMessage = name + "is the best in the world!"; | |
return narcissisticMessage; | |
} | |
narcissism(Alex); // Alex is the best in the world! |
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
from sys import exit | |
def chocolate_room(): | |
print "This room is full of chocolate. How much do you take?" | |
choice = raw_input("> ") | |
if "0" in choice or "1" in choice: | |
how_much == int(choice) | |
else: | |
dead("Man, learn to type a number.") |
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 express = require("express"); | |
const bodyParser = require("body-parser"); | |
const axios = require("axios"); | |
const app = express(); | |
const IMPORT_API_BASE_URL = "https://api.iamport.kr"; | |
const MY_BASE_URL = "https://www.myawesomeservice.com"; | |
async function validate(imp_uid, response) { |
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
# -*- coding: utf-8 -*- | |
from flask import Flask, request, jsonify # flask 사용 | |
import json | |
import requests # requests 사용 | |
app = Flask(__name__) | |
def validate(imp_uid): | |
# 1. 인증 토큰 발급 받기 | |
access_token = "" | |
try: |
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”; | |
import { render } from “react-dom”; | |
import { BrowserRouter as Router } from “react-router-dom”; | |
const App = () => ( | |
<Router> | |
</Router> | |
); | |
render(<App />, document.getElementById(“root”)); |
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"; | |
import styled from "styled-components"; | |
import { Link } from "react-router-dom"; | |
function Header() { | |
return ( | |
<Wrapper> | |
<ul> | |
<li> | |
<Link to="/">Home</Link> |
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"; | |
import styled from "styled-components"; | |
import { Switch, Route } from "react-router-dom"; | |
function Container() { | |
return ( | |
<Wrapper> | |
<Switch> | |
<Route exact path="/" component={() => <div>homepage</div>} /> | |
<Route path="/first" component={() => <div>first</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
import React from "react"; | |
import { render } from "react-dom"; | |
import { BrowserRouter as Router } from "react-router-dom"; | |
import Header from "./components/Header"; | |
import Container from "./components/Container"; | |
const App = () => ( | |
<Router> | |
<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
import React from "react"; | |
import styled from "styled-components"; | |
function Home() { | |
return ( | |
<Wrapper> | |
<div className="title">Welcome to Page Transition App!</div> | |
<section> | |
<p>Click the links on header to change routes!</p> | |
</section> |
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"; | |
import styled from "styled-components"; | |
function First() { | |
return ( | |
<Wrapper> | |
<span>First</span> | |
<section> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do |