docker tag 882db3a24154 registry.cn-hangzhou.aliyuncs.com/wqzcir/circles:v1.0.0
This file contains hidden or 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
(function() { | |
'use strict'; | |
var t = window.xxxxx // 指定 window 对象 | |
Object.defineProperty(window, 'xxxxx', { | |
get: function(){ | |
console.log("Get window property"); | |
return t; | |
}, | |
set: function(val){ |
This file contains hidden or 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
# Definition for singly-linked list. | |
# class ListNode: | |
# def __init__(self, x): | |
# self.val = x | |
# self.next = None | |
class Solution: | |
def reverseList(self, head: ListNode) -> ListNode: | |
prev = None | |
current = head |
This file contains hidden or 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 TreeNode: | |
def __init__(self, val): | |
self.val = val | |
self.left, self.right = None, None | |
# 二叉树前中后序遍历 | |
class Solution: | |
def __init__(self): | |
self.traverse = [] | |
# 前序遍历组合 |
This file contains hidden or 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
# 将零移动到末尾,要求在原数组操作且尽可能减少操作次数 | |
source = [0, 3, 5, 0, 2, 1, 0, 9] | |
def solution(source): | |
j = 0 | |
for k, i in enumerate(source): | |
if i != 0: | |
source[j], source[k] = i, 0 | |
j += 1 | |
return source |
This file contains hidden or 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 ( | |
"errors" | |
"fmt" | |
"sync" | |
"time" | |
) | |
const ( |
在 docker 里安装 gitlab runner,并将 runner 注册到 gitlab 中
gitlab-runner register \
--non-interactive \
--executor "docker" \
--docker-image alpine:latest \
--url "http://121.36.22.204/" \
--registration-token "zHkqsD2ffFHNioqkG5r4" \
This file contains hidden or 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
/* 判断两个数组是否相同 */ | |
func ArrayEqual(a, b []string) bool { | |
if (a == nil) != (b == nil) { | |
return false | |
} | |
if len(a) != len(b) { | |
return false | |
} |
backup:
$ sudo su
$ cd /
$ tar cvpzf backup.tgz –exclude=/proc –exclude=/lost+found –exclude=/backup.tgz –exclude=/mnt –exclude=/sys /
根目录生成的 backup.tgz 就是备份结果
sudo nano /usr/share/applications/Pycharm.desktop
[Desktop Entry]
Name=Pycharm
Comment=Pycharm:The Python IDE
Exec=/usr/lib/pycharm-community/bin/pycharm.sh
Icon=/usr/lib/pycharm-community/bin/pycharm.png
Terminal=false
Type=Application