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
| #/bin/bash | |
| while true; | |
| do | |
| count=`ps -p $(cat application.pid)|wc -l` | |
| if [ ${count} -lt 2 ]; then | |
| nohup jdk-11.0.11/bin/java -Xms2g -Xmx8g -jar auto-image-compose-server-0.0.1-SNAPSHOT.jar & | |
| else | |
| echo "image-compose-server is running" | |
| fi |
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
| version: "3" | |
| services: | |
| traefik: | |
| container_name: traefik | |
| image: traefik:v2.4.8 | |
| restart: always | |
| ports: | |
| - 80:80 | |
| - 443:443 | |
| networks: |
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
| dir=./$1 | |
| fileprefix=$2 | |
| for file in $dir/* | |
| do | |
| echo ${file:2} | |
| ./qshell fput mybucket $fileprefix${file:2} $file | |
| done |
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
| $('#pic1')[0].files = $('.bcpo-file input')[0].files; |
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
| /** | |
| * @param {number} n | |
| * @param {number[][]} preferences | |
| * @param {number[][]} pairs | |
| * @return {number} | |
| */ | |
| var unhappyFriends = function(n, preferences, pairs) { | |
| let arr = Array.from(Array(n), item=> new Array(n).fill(0)); | |
| for(let i=0; i<n; i++) { |
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
| import superagent from 'superagent'; | |
| import cheerio from 'cheerio'; | |
| interface Course{ | |
| title: string; | |
| count: number; | |
| } | |
| class Crowller{ |
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 Demo{ | |
| private static instance: Demo; | |
| private constructor(public name: string) {} | |
| static getInstance() { | |
| if(!this.instance) { | |
| this.instance = new Demo('dell llw'); | |
| } | |
| return this.instance; | |
| } |
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
| /** | |
| * @param {string[]} votes | |
| * @return {string} | |
| */ | |
| var rankTeams = function(votes) { | |
| if(votes.length ===1 ) { | |
| return votes[0]; | |
| } | |
| const teams = votes[0].length; | |
| const obj = {}; |
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
| /** | |
| * @param {number[]} A | |
| */ | |
| var RLEIterator = function(A) { | |
| this.data =A; | |
| this.count = this.data.shift()||0; | |
| this.num = this.data.shift(); | |
| }; | |
| /** |
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
| /** | |
| * @param {number} n | |
| * @return {number[][]} | |
| */ | |
| var generateMatrix = function(n) { | |
| let b = [0, n - 1, 0, n - 1], x = 0, y = 0, i = 0, d = '→', r = new Array(n).fill(0).map(_=>new Array(n).fill(0)) | |
| while (i++ < Math.pow(n, 2)) { | |
| d === '→' && (r[y][x++] = i, x === b[1] && (d = '↓', ++b[2])) || | |
| d === '↓' && (r[y++][x] = i, y === b[3] && (d = '←', b[1]--)) || |