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> | |
| using namespace std; | |
| int main() | |
| { | |
| int input_number, temp_number, display_number = 0, ten_power = 1; | |
| cout << "please input a positive integer:" << endl; | |
| cin >> input_number; | |
| temp_number = input_number; | |
| while (temp_number > 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
| REM https://blog.nediiii.com/jdk-windows-setup/ | |
| @echo off | |
| :start | |
| echo current JDK version: | |
| java -version | |
| echo. | |
| echo ============================================= | |
| echo available JDK version: |
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
| REM proxy script for windows cmd/powershell | |
| @echo off | |
| SET proxy_addr=http://127.0.0.1:1080 | |
| SETX>nul http_proxy "%proxy_addr%" | |
| SETX>nul https_proxy "%proxy_addr%" | |
| SETX>nul all_proxy "%proxy_addr%" | |
| SET http_proxy=%proxy_addr% | |
| SET https_proxy=%proxy_addr% |
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
| @echo off | |
| SETX>nul http_proxy "" | |
| SETX>nul https_proxy "" | |
| SETX>nul all_proxy "" | |
| SET http_proxy= | |
| SET https_proxy= | |
| SET all_proxy= | |
| echo From now on directly connect to network | |
| @echo on |
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
| user nginx; | |
| worker_processes auto; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; |
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
| # CUSTOM MIRRORS | |
| export HOST_IP=$(grep -oP '(?<=nameserver\ ).*' /etc/resolv.conf) | |
| export PORXY_ADDR="http://$HOST_IP:1080" | |
| # PROXY FOR APT | |
| function proxy_apt() { | |
| # make sure apt.conf existed | |
| sudo touch /etc/apt/apt.conf | |
| sudo sed -i '/^Acquire::https\?::Proxy/d' /etc/apt/apt.conf |
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 os import listdir | |
| from os import walk | |
| from os.path import isfile,isdir,join | |
| from chardet.universaldetector import UniversalDetector | |
| # may need to `pip3 install chardet` | |
| import codecs | |
| detector = UniversalDetector() | |
| # change the targetPath to your path |
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 <vector> | |
| #include <string> | |
| template <typename T> | |
| void combineInner(const std::vector<T> &data, int start, int m, int depth, std::vector<T> &temp, std::vector<std::vector<T>> &result) | |
| { | |
| if (depth > m - 1) | |
| return; | |
| if (depth == m - 1) |