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 apispec import APISpec | |
from apispec.ext.flask import FlaskPlugin | |
from apispec.ext.marshmallow import MarshmallowPlugin | |
from flask import jsonify | |
import marshmallow | |
spec = APISpec( | |
title='ttang me', | |
version='1.0.0', | |
openapi_version='2.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
var numbers = [1,2,3,4,5] | |
var squares = numbers.map(function (x) { | |
return x * x; | |
}); | |
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
... | |
List<int> numbers = new List<int>() { 1,2,3,4,5 }; | |
List<int> squares = numbers | |
.Select(x => x * x) | |
.ToList(); | |
... | |
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
... | |
List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5); | |
List<Integer> squares = numbers.stream() | |
.map(n -> n * n) | |
.collect(Collectors.toList()); | |
... |
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
data = [...] | |
# without lambda | |
def square_plus_one(x): | |
return x * x + 1 | |
map(square_plus_one, data) | |
# with lambda |
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
<script src='javascript'> | |
<!-- | |
console.log('Hello, script') | |
--> | |
</script> |
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
--> what is this? | |
--> console.log('hi') | |
console.log('hello') | |
<!-- and, what is this? | |
<!-- console.log('hi') |
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 | |
const kim = { | |
name: 'Kim', | |
hello: function() { | |
console.log(`hi, ${this.name}`) | |
} | |
} | |
// arrow function | |
const lee = { |
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 widget = { | |
debug: "on", | |
window: { | |
title: "Sample Konfabulator Widget", | |
name: "main_window", | |
width: 500, | |
height: 500 | |
}, | |
image: { | |
src: "Images/Sun.png", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>React 1</title> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js'></script> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js'></script> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.14.0/babel.min.js'></script> | |
</head> | |
<body> |
NewerOlder