This file contains 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
sudo rm -rf ~/.cache/ibus/libpinyin/ | |
sudo ibus-daemon --restart |
This file contains 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
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); |
This file contains 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 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; |
This file contains 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
git clone https://github.com/carnellj/spmia-chapter1 | |
git clone https://github.com/carnellj/spmia-chapter2 | |
git clone https://github.com/carnellj/spmia-chapter3 | |
git clone https://github.com/carnellj/spmia-chapter4 | |
git clone https://github.com/carnellj/spmia-chapter5 |
This file contains 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
public class Test { | |
public static void main(String[] args) { | |
System.out.println("Hello DS"); | |
} | |
} |
This file contains 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 org.apache.commons.exec.CommandLine; | |
import org.apache.commons.exec.DefaultExecutor; | |
import org.apache.commons.exec.ExecuteException; | |
import org.apache.commons.exec.ExecuteWatchdog; | |
import org.apache.commons.exec.Executor; | |
import org.apache.commons.exec.LogOutputStream; | |
import org.apache.commons.exec.PumpStreamHandler; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
This file contains 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/sh | |
# | |
# pptpd installation script on my own CentOS 7 box. | |
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7 | |
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules | |
# | |
# Author: 2015 Steve Yang <[email protected]> | |
# The script comes with ABSOLUTELY NO WARRANTY. | |
This file contains 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
sub stockinfo1{ | |
# 使用腾讯的接口 | |
my $stockid = shift; | |
my $url1="http://qt.gtimg.cn/q=$stockid"; | |
my $ua = Mojo::UserAgent->new(); | |
my $res = $ua->get($url1)->res->body; | |
$res = encode("utf8",decode("gbk",$res)); | |
This file contains 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
use Webqq::Client; | |
use Digest::MD5 qw(md5_hex); | |
my $qq = 171214273; | |
my $pwd = md5_hex('XXXXXXXX'); | |
#通过new来初始化一个客户端对象 | |
##debug=>1来打印debug信息方便调试 | |
my $client = Webqq::Client->new(debug=>0); | |
# | |
# #通过login进行登录 |
This file contains 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
--- /usr/include/dbm.h 2009-02-21 14:52:33.000000000 +0800 | |
+++ /usr/include/dbm.h.pacthed 2014-12-01 20:35:59.000000000 +0800 | |
@@ -59,4 +59,4 @@ | |
extern datum nextkey __P((datum key)); | |
-extern int dbmclose __P((DBM *)); | |
+extern int dbmclose __P((void)); |