roddy的博客
roddy · 共 38 篇文章
Maven install problem: Unexpected end of ZLIB input stream。
Maven install problem: Unexpected end of ZLIB input stream。 Set Maven run properties and to do rebuilt. goals: dependency:purge-local-repository
2018-03-08 12:58 · Java · 评论(0)
Image Process
import javax.imageio.ImageIO; public class CreateImageUtils { /** * * @Title: 构造图片 * @Description: 生成水印并返回java.awt.image.BufferedImage * @param file * 源文件(图片) * @param waterFile * 水印文件(图片) * @param x * 距离右下角的X偏移量 * @param y * 距离右下角的Y偏移量 * @param alpha * 透明度, 选择值从0.0~1.0: 完全透明~完全不透明 * @return Buffer…
2017-10-31 09:08 · Java · 评论(0)
Directory short link for Linux
ln -sv [source] [targe] ln -sv /opt/soft/test/test3 /opt/soft/test/test5 Reference URL: http://www.cnblogs.com/peida/archive/2012/12/11/2812294.html
2017-01-04 16:49 · Linux · 评论(0)
How to start a program automatic
Reference URL: http://unix.stackexchange.com/questions/20357/how-can-i-make-a-script-in-etc-init-d-start-at-boot 試過 It's work. 注意 Script 内容格式,按下面写,如果发现not work 就检查script是否有错。名字可不加.sh, 如:tomcat都ok If you are on a Red Hat based system, as you mentioned, you can do the following: Create a script and p…
2016-11-01 09:46 · Linux · 评论(0)
SVN
Reference as: https://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/ https://docs.fedoraproject.org/en-US/Fedora/13/html/Managing_Confined_Services/sect-Managing_Confined_Services-Configuration_examples-Changing_port_numbers.html
2016-10-05 09:30 · Linux · 评论(0)
Cockpit Error
Permission denied Error: use root to login Cockpit in fedora First use command to look service's status: systemctl status cockpit.service -l vi /etc/security/limits.conf then do remark : #root hard nofile 65535 # Need these two lines because the wildcards (above) #root soft nofile 65535 # are not a…
2016-10-04 16:47 · Linux · 评论(0)
mysql 存入 blob类型数据
String content = new String(blob.getBytes((long)1, (int)blob.length())); refrence as : http://knight-black-bob.iteye.com/blog/2213090
2016-09-30 14:25 · Java · 评论(0)
Fedora turn off firewall
24 down vote accepted If you are using Fedora >= 18, the server is probably running firewalld , which you can disable by running systemctl stop firewalld.service as root. You might also want to read man firewall-cmd to find out more about adding firewall rules. If you are running an older version o…
2016-09-07 09:49 · Linux · 评论(0)
java send email
static int port = 25; //smtp端口 static String server = "smtp.163.com"; //smtp服务器地址 static String from = "XXX@163.com"; //发送者 static String user = "XXXX@163.com"; //发送者地址 static String password = "XXXX"; //密码 public static void sendEmail(String email, String subject, String body) { try { Properties p…
2016-08-08 00:47 · Java · 评论(0)
phantomjs & casperjs install in l Fedora
phantomjs install in Fedora: if you can not extract phantomjs.tar.bz2 in Fedora, you can extract it in Window and then do copy. and then to do in Fedora, like that as below: cp phantomjs/bin/phantomjs /usr/bin verify install is work: phantomjs --version casperjs install in Fedora: cp casperjs/bin/c…
2016-08-06 22:33 · Java · 评论(0)
Json String to Bean
Gson g = new Gson(); FolderArray folders = g.fromJson("{\"folders\":[{\"status\":100,\"b\":200},{\"status\":100,\"b\":200}]}", FolderArray.class);
2016-08-03 18:10 · Java · 评论(0)
Run command then close the terminal(Linux)
Depending on what you are wanting, just add a & to the end of the command script.sh & command & If you are running it in a terminal, and you want to then close the terminal, use nohup or disown nohup nohup script.sh & disown script & disown
2016-08-03 14:57 · Linux · 评论(0)
Java Read Html
Need Jar: jsoup-1.8.1.jar public static void main(String[] args) { String content=""; try { content = executeGet("qq.com","t.qq.com","pgv_pvi=2633264128; RK=AWkaEwm4WM; ptcz=b94a87c80a0a85ceec47cd63566d582d7110bb329e378f2ef066185e9b957333; pt2gguin=o0002442254; ts_refer=url.cn/sorry; wbilang_10000=…
2016-07-28 14:37 · Java · 评论(0)