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
////////////////////////////////////////////////////////////// Array utilities | |
type Length<T extends any[]> = T["length"]; | |
type Head<T extends any[]> = T[0]; | |
type Tail<T extends any[]> = ((...xs: T) => any) extends ((_x: any, ...xs: infer R) => any) ? R : []; | |
type AllTrue<Ts extends any[]> = { | |
0: true, | |
1: false, | |
2: AllTrue<Tail<Ts>> | |
}[Length<Ts> extends 0 ? 0 : Head<Ts> extends false ? 1 : 2] |
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 ..... | |
const inputUploadFile: CSSProperties = { | |
display: 'none', | |
}; | |
const buttonUploadFile: CSSProperties = { | |
margin: 8, | |
}; |
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 Vertex: | |
def __init__(self, value): | |
self.value = value | |
self.adjacents = [] | |
self.state = 0 | |
class Graph: | |
def __init__(self): | |
self.vertices = [] | |
# self.edges = [] |