Skip to content

Instantly share code, notes, and snippets.

View ding-co's full-sized avatar
🐢

Aaron ding-co

🐢
View GitHub Profile
@ding-co
ding-co / form-hooks.ts
Last active March 29, 2022 10:11
form-hooks.ts
// form-hooks.ts
import React, { useCallback, useState } from 'react';
export interface IuseInputProps {
type: string;
defValue: string | number;
}
const useInput = ({ type, defValue }: IuseInputProps) => {
const [value, setValue] = useState(defValue);
@ding-co
ding-co / measure_time.py
Last active December 18, 2021 04:14
Measure Performance Time
import time
start_time = time.time() # Start Measure
# ** Source Code **
end_time = time.time() # End Measure
print("time: ", end_time - start_time) # print performance time