Skip to content

Instantly share code, notes, and snippets.

Quinn Sheng a1exlism

Block or report user

Report or block a1exlism

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View symbols
SYMBOLS = """ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] ^_`abcdefghijklmnopqrstuvwxyz{|}~"""
@a1exlism
a1exlism / Run_commands_standalone.sh
Created Oct 9, 2019
[Run_commands_standalone] #bash
View Run_commands_standalone.sh
nohup `CMD` &
# Link:
# https://unix.stackexchange.com/questions/4004/how-can-i-run-a-command-which-will-survive-terminal-close
View large_file_read.py
# LINK https://segmentfault.com/a/1190000005356779
#!/usr/bin/env python
# coding=utf-8
import sys
import time
start = time.time()
lines = 0
for each_line in sys.stdin:
View ES6_Assign at once.js
class Test {
constructor() {
this.data = {
name: null,
age: -1,
attr: null
}
}
init() {
this.data = {
View java_exceptions.java
public class ThrowException {
public static void main(String args[]) {
try {
process1();
} catch (Exception e) {
e.printStackTrace();
}
}
static void process1() {
View EllipticCurveAdd.js
// Refer1: https://cloud.tencent.com/developer/news/250117
// 2: http://book.51cto.com/art/200901/106008.htm
// 3: https://jianshu.com/p/2e6031ac3d50
// E(p)(A,B) => y^2 = x^3 + Ax + B mod p;
/*
FUNCTION: Cal culate the R = P + Q or NG
if (P≠Q)
// 斜率 slope
λ = (Yq - Yp)/(Xq - Xp) mod p
View random_numbers.cpp
/*
* 生成在[a, b]范围内的随机数据
* Random numbers in the range of [a,b]
*/
#include <cstdio>
#include <cstdlib>
#include <ctime>
const int MAXN = 1000;
int main() {
int arr[MAXN];
View binary_sarch.cpp
/*
* INPUT: 100 \n
* TIPS: 输入必须有序, 否则pos无意义
* 1 10 11 11 12 12 13 15 16 18 2 2 20 20 20 20 21 21 21 22 22 22 23 23 23 23 24 24 24 24 24 27 27 28 32 35 4 40 40 40 41 42 44 44 46 47 47 5 5 52 53 54 57 58 6 60 61 62 62 63 63 64 65 65 65 69 7 70 70 71 71 72 75 75 76 77 8 8 82 84 84 85 86 86 87 89 9 9 91 91 93 93 95 95 96 97 97 98 98 99
* Search X \n
* OUTPUT: position of X
*/
#include <cstdio>
#include <algorithm>
using namespace std;
View NQueens.cpp
/*
* N 皇后问题 - Recursion 方案
* 实质也是排列组合Permutation问题
*/
#include <cstdio>
#include <cmath>
using namespace std;
const int MAXN = 10; // 最多8*8 八皇后
int n = 0; // n 皇后
View Docker_Quick_starter.md

workflow

0?. docker search image

  1. docker pull image
  2. docker images
  3. docker run container
  4. docker ps -a
  5. docker stop container
  6. docker rm dockerID
You can’t perform that action at this time.