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
# Create Dictionary | |
## 1. dict(key=value,...) | |
family_age_a = dict(Dad=55, Mom=54, Bro=23) | |
## 2. {key:value,...} | |
family_age_b = {'Dad': 55, 'Mom': 54, 'Bro': 23} | |
## 3. dict([(key,value),...]) | |
family_age_c= dict([('Dad', 55), ('Mom', 54), ('Bro', 23)]) | |
## 4. dict({key:value,...}) | |
family_age_d = dict({'Dad': 55, 'Mom': 54, 'Bro': 23}) |
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
# creat branch | |
git branch <branch name> | |
# delete a branch (not merge yet) | |
git branch -d <brannch name> | |
# delete a branch( no matter) | |
git branch -D <branch name> | |
# swithc to the branch | |
git checkout <branch nane> | |
# create the branch and swithc to the one | |
git checkout -b <branch name> |
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
let completed = true; | |
let learnJS = new Promise(function (resolve, reject) { | |
if (completed) { | |
resolve("I have completed learning JS."); | |
} else { | |
reject("I haven't completed learning JS yet."); | |
} | |
}); |
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,useState}from 'react'; | |
import Modal from '../../components/UI/Modal/Modal' | |
import Aux from '../Auxiliary/Auxiliary' | |
const withErrorHandler = (WrappedComponent,axios) => { | |
return (props)=>{ | |
const [state, setstate] = useState({error:null}) |
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
{ | |
"python.pythonPath": "C:\\Anaconda3\\envs\\kedro-practice\\python.exe", | |
"python.terminal.activateEnvironment": true, | |
"python.condaPath":"C:\\Anaconda3\\Scripts\\conda.exe" | |
} |
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
{ | |
"python.pythonPath": "C:\\Anaconda3\\envs\\kedro-practice\\python.exe", | |
"python.terminal.activateEnvironment": true, | |
"python.condaPath":"C:\\Anaconda3\\Scripts\\conda.exe" | |
} |
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" | |
"fmt" | |
"runtime" | |
"time" | |
) | |
func main() { |
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 ChineseChessTable = ({Size,CarPos}) => { | |
let tableTD =[] | |
let table = [] | |
let tdOfCar = [] | |
for (let y = 0;y<=Size.y;y++){ | |
tableTD.push(<td></td>) | |
} | |
for (let y = 0;y<=Size.y;y++){ |
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,{useState} from 'react' | |
import classes from './Promotion.module.css' | |
import ChineseChessTable from './ChineseChessTable/ChineseChessTable' | |
const ChineseChess = () => { | |
const [carPosition, setCarPosition] = useState({x:0,y:0}) | |
const [carInputX, setCarInputX] = useState(0) | |
const [carInputY, setCarInputY] = useState(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
visited = set() | |
def depth_first_search(graph,node): | |
if (node in visited): return | |
visited.add(node) | |
print(node) | |
for adjacent_node in graph[node]: | |
depth_first_search(graph,adjacent_node) | |
graph = dict() | |
graph["1"] = ["2","3"] |
OlderNewer