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> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div class="container"> |
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
<!-- table tennis king --> | |
import './App.css'; | |
import { Table,Button,Layout,Input} from 'antd'; | |
import React, { useState,useRef } from 'react'; | |
import ReactToPrint from "react-to-print"; | |
import { PrinterOutlined } from '@ant-design/icons'; | |
const { Header, Content, Footer } = Layout; | |
function App() { |
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
REF: https://kentcdodds.com/blog/stop-being-a-junior |
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
class TrieNode: | |
def __init__(self): | |
self.childen = {} | |
self.isEnd = False | |
self.refs = 0 | |
def addWord(self,word): | |
cur = self | |
# cur.ref += 1 | |
for w in word: |
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
// npm install react-csv --save; | |
// npm install papaparse | |
import React, { useState } from "react"; | |
import { CSVLink } from "react-csv"; | |
import Papa from "papaparse"; | |
const App = () => { | |
const [tableRows, setTableRows] = useState([]); |
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
# V Read every line in application.config | |
# V split each line using equal operator | |
# --- | |
# write to excel: | |
# Put key value to excel specified field | |
# & default value already wriien in excel | |
# --- | |
# [Note] | |
# Check it ... |
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 sys | |
import os | |
import time | |
import platform | |
try: | |
name = sys.argv[1] | |
except: | |
print('Type python3 dancing_bob.py [Name]') | |
exit(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 mycat; | |
public class Cat { | |
private String name; | |
private String weight; | |
// Getter | |
public String getName() { | |
return 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
exports.addNewClass = async (req, reply) => { | |
try { | |
let classname = new class_name(req.body) | |
const className = req.body | |
console.log(className.class_name) | |
const duplicateData = await class_name.findOne({"class_name":className.class_name}) | |
console.log("duplicateData:"+duplicateData) | |
if(!duplicateData){ | |
let newclass = await classname.save() | |
return newclass |
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 forLoop = async _ => { | |
console.log('start'); | |
for (let index = 0; index < fruitsToGet.length; index ++) { | |
const fruit = fruitsToGet[index]; | |
const numFruit = await getNumFruit(fruit); | |
console.log(numFruit); | |
} | |
console.log('End') | |
} |
NewerOlder