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
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
backup:
$ sudo su
$ cd /
$ tar cvpzf backup.tgz –exclude=/proc –exclude=/lost+found –exclude=/backup.tgz –exclude=/mnt –exclude=/sys /
根目录生成的 backup.tgz 就是备份结果
| /* 判断两个数组是否相同 */ | |
| func ArrayEqual(a, b []string) bool { | |
| if (a == nil) != (b == nil) { | |
| return false | |
| } | |
| if len(a) != len(b) { | |
| return false | |
| } |
在 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" \
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| const ( |
| # 将零移动到末尾,要求在原数组操作且尽可能减少操作次数 | |
| 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 |
| class TreeNode: | |
| def __init__(self, val): | |
| self.val = val | |
| self.left, self.right = None, None | |
| # 二叉树前中后序遍历 | |
| class Solution: | |
| def __init__(self): | |
| self.traverse = [] | |
| # 前序遍历组合 |
| # 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 |
| (function() { | |
| 'use strict'; | |
| var t = window.xxxxx // 指定 window 对象 | |
| Object.defineProperty(window, 'xxxxx', { | |
| get: function(){ | |
| console.log("Get window property"); | |
| return t; | |
| }, | |
| set: function(val){ |
docker tag 882db3a24154 registry.cn-hangzhou.aliyuncs.com/wqzcir/circles:v1.0.0