System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
# |
# |
class Solution: | |
def longestIncreasingPath(self, matrix: List[List[int]]) -> int: | |
''' | |
return the length of longest increasing path and its path node | |
''' | |
if len(matrix) == 0: return 0 | |
self.memo = [[-1 ] *len(matrix[0]) for j in range(len(matrix))] | |
self.path_memo = [[None] *len(matrix[0]) for j in range(len(matrix))] | |
max_path = 0 |
#!/usr/bin/python | |
import sys | |
def dependency_node_traversal(edges=[]): | |
''' | |
:param edges: a list of edge, eg. [[4, 6], [3, 4], [2, 3]] | |
''' | |
if len(edges) == 0: | |
print("Your input graph is empty") | |
return |
#!/usr/bin/python | |
edges = [[4, 6], [3, 4], [2, 3], [3, 5], [1, 2], [1, 3], [5, 6], [7, 2]] | |
result = [] | |
edge_map = {} | |
start_nodes = [] | |
# find start nodes | |
for edge in edges: | |
if edge[0] not in start_nodes: | |
# add to start_nodes | |
start_nodes.append(edge[0]) |
# full backup and crompress | |
docker exec -it [mysql_container_name] mysqldump -u[user] -p[password] --all-databases --add-drop-database --add-drop-table | gzip > /mysql_backup/db_bk_$(date +%F).gz | |
# full mysql restore with dropping table before recreating | |
docker exec -it [mysql_container_name] mysql -u[user] -p[password] < gz -d -c /mysql_backup/db_bk_$(date +%F).gz |