Skip to content

Instantly share code, notes, and snippets.

View shalk's full-sized avatar
🎯
Focusing

shalk(xiao kun) shalk

🎯
Focusing
View GitHub Profile
import java.io.*;
import java.util.*;
public class Add {
public static void main(String[] args) throws IOException {
BufferedReader reader1 = new BufferedReader(new FileReader("1.txt"));
BufferedReader reader2 = new BufferedReader(new FileReader("2.txt"));
//BufferedWriter writer = new BufferedWriter(new FileOutputStream("3.txt"));
while(true) {
int sum = 0;
try {
InetAddress addr = InetAddress.getLocalHost();
if (addr.isSiteLocalAddress()
&& !addr.isLoopbackAddress()
&& !(addr instanceof Inet6Address)
) {
return addr.getHostAddress();
}
} catch (Throwable e) {
LOGGER.warn("InetAddress.getLocalHost() fail", e);
sudo rm -rf ~/.cache/ibus/libpinyin/
sudo ibus-daemon --restart
sudo rm -rf ~/.cache/ibus/libpinyin/
sudo ibus-daemon --restart
@shalk
shalk / Coin.java
Last active March 25, 2019 10:12
Coin4j
import java.util.Random;
import java.util.concurrent.TimeUnit;
public class Coin {
public static void main(String[] args) throws InterruptedException {
String[] candidates = new String[]{"🌝", "🌖", "🌗", "🌘", "🌚", "🌒", "🌓", "🌔"};
Random r = new Random();
for (int i = 0; i < 3; i++) {
for (String s : candidates) {
System.out.print(s);
//import org.apache.http.conn.ssl.SSLSocketFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
public class Test {
public static void main(String[] args) throws Exception {
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, null, null);
@shalk
shalk / xmind.desktop
Created May 9, 2019 02:56
/usr/share/applications/xmind.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=XMind
Path=/opt/xmind-8u8/XMind_amd64
Exec=/opt/xmind-8u8/XMind_amd64/XMind
Icon=/opt/xmind-8u8/XMind_amd64/xmind.256.png
Categooptries=Appu8lication
Terminal=false
@shalk
shalk / gist:591c02f5db3bd01eb8434a0859800bf1
Created May 23, 2019 08:34
fix ubuntu 18.04 network limited to 10Mb
ethtool -s enp0s31f6 speed 100 duplex full

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.