Skip to content

Instantly share code, notes, and snippets.

@zhangzhiqiangcs
zhangzhiqiangcs / cloudSettings
Created August 12, 2020 07:56 — forked from yetone/cloudSettings
vscode-settings-public
{"lastUpload":"2020-05-13T10:46:00.823Z","extensionVersion":"v3.4.3"}
@zhangzhiqiangcs
zhangzhiqiangcs / solution.txt
Created October 19, 2018 07:16
ubuntu修改默认python为python3
rm /user/bin/python
ln -s /usr/bin/python3.5 /usr/bin/python
@zhangzhiqiangcs
zhangzhiqiangcs / resolution.txt
Created October 19, 2018 07:04
apt-get update fails to fetch files, “Temporary failure resolving …” error
First, temporarily add a known DNS server to your system.
echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null
Then run sudo apt-get update.
If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you
(or just contact your ISP) - or you can permanently add a DNS server to your system:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
8.8.8.8 is Google's own DNS server
@zhangzhiqiangcs
zhangzhiqiangcs / zzu
Created August 22, 2017 10:15
zzu远程教育刷题
__author__ = 'zhangzhiqiang'
import requests
import re
from collections import defaultdict
from pprint import pprint
from urllib.parse import quote, urlencode, urlparse, urlunparse
from bs4 import BeautifulSoup as bs
login_url = "http://vls3.zzu.edu.cn/vls2s/zzjlogin.dll/login"
# Unofficial Windows Binaries for Python Extension Packages
http://www.lfd.uci.edu/~gohlke/pythonlibs
@zhangzhiqiangcs
zhangzhiqiangcs / 升级JDK
Last active August 8, 2017 08:00
JDK版本从1.7升级到1.8
# Ubuntu
# add-apt-repository: command not found
# 查看Ubuntu版本
cat /etc/issue
# For Ubuntu 14.04 or 16.04 you need another package:
apt-get install software-properties-common
# If you are using an older release of Ubuntu, ie before 12.10, it is necessary to install the package python-software-properties
sudo apt-get install python-software-properties
add-apt-repository ppa:webupd8team/java
@zhangzhiqiangcs
zhangzhiqiangcs / PS1
Created August 8, 2017 06:13
ubuntu 命令行提示符配置
export PS1="\u@\h:# "
int getSum(int a, int b) {
int sum = a;
while (b != 0)
{
sum = a ^ b;//calculate sum of a and b without thinking the carry
b = (a & b) << 1;//calculate the carry
a = sum;//add sum(without carry) and carry
}
return sum;
}
http://www.infoq.com/cn/articles/c-language-2016
http://eli.thegreenplace.net/