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 judge | |
| import ( | |
| "bufio" | |
| "context" | |
| "fmt" | |
| "log" | |
| "os" | |
| "path" | |
| "strconv" |
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 Solution { | |
| public: | |
| int singleNumber(vector<int>& nums) { | |
| auto it = nums.begin(),end = nums.end(); | |
| int o = 0,t = 0; | |
| while(it != end){ | |
| int oo = o; | |
| o = (o^(*it))&(~(t&*it)); | |
| t = (~(t&(*it))) & (oo & (*it) | t); | |
| ++it; |
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
| FROM debian:9 | |
| RUN apt update && apt install nginx apache2-utils -y |
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
| #include<iostream> | |
| #include<fstream> | |
| #include<vector> | |
| #include<string> | |
| #include<iomanip> | |
| #include<cstdlib> | |
| using namespace std; | |
| //#define DEBUG |
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 | |
| # set -e | |
| ID=`cat /etc/os-release | grep '^ID='` | |
| VERSION_ID=`cat /etc/os-release | grep '^VERSION_ID='` | |
| installed=0 | |
| handleUbuntu() { | |
| if [[ ! $ID =~ 'ubuntu' ]]; then |
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
| case "$1" in | |
| 'install') | |
| apt update | |
| apt install git curl zsh vim htop -y | |
| chsh -s $(which zsh) | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
| ;; | |
| 'docker') | |
| apt-get update | |
| apt-get install \ |
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 print() { | |
| let start = 0; | |
| const n = [1, 3, 9]; | |
| let count = 27; | |
| while (count) { | |
| console.log(n.map(it => (Math.floor(start / it) % 3) + 1).join(' ')) | |
| start += 1; | |
| count -= 1; | |
| } | |
| } |
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
| const path = require('path') | |
| const fs = require('fs') | |
| const glob = require('glob') | |
| const { transformFileSync } = require('@babel/core') | |
| const t = require('@babel/types') | |
| const { uniq } = require('lodash') | |
| const packageJson = require('../package.json') | |
| const alias = require('../webpack.common').resolve.alias | |
| const aliasList = Object.keys(alias) |
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
| <!DOCTYPE html> | |
| <html lang="zh-cn"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
| <style> | |
| html, body { | |
| margin: 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
| package main | |
| import ( | |
| "crypto/tls" | |
| "log" | |
| "net/smtp" | |
| "io" | |
| "io/ioutil" |
NewerOlder