不愿回首
neverforget · 共 22 篇文章
MySQL数据库设置主从同步
主: Enter password: ******* Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.1.73-community-log MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle…
2015-03-14 22:43 · 评论(0)
CentOS 7安装Mysql
今天在VM上打算配个Mysql主从的服务,用RPM方式安装MYSQL-server时冲突, 原来是Centos7上面默认安装有Mariadb-lib了,果断 yum remove mariadb后安装成功! Using username "root". Last login: Sat Mar 14 17:01:13 2015 from 192.168.230.1 [root@localhost ~]# cd /ford/mysql [root@localhost mysql]# ls MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar […
2015-03-14 21:33 · 评论(0)
Red Hat 7+ 设置无桌面模式
CentOS 7 之前的版本是通过 /etc/inittab 文件来定义系统运行级别: # # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target # # systemd uses 'targets' instead of runlevels. By default, there are two main targets: # # multi-user.target: ana…
2015-03-04 15:41 · 评论(0)
运维开源软件
gerrit capistrano zibbix http://blog.csdn.net/vshuang/article/details/5423604 http://www.cnblogs.com/lovebread/archive/2009/11/23/1609122.html arrList.splice(jQuery.inArray('b',arrList),1); https://git.oschina.net/alexgaoyh/alexgaoyh http://blog.csdn.net/exceptional_derek/article/details/11713255 S…
2014-09-20 22:56 · 评论(0)
a sample of maven xdoclet hibernate
/** * Client POJO. * * @hibernate.class table = "client" * @hibernate.cache usage = "read-write" */ public class Client implements Serializable { private static final long serialVersionUID = -8361595011677919387L; /** * * @hibernate.id generator-class = "increment" * column = "clientid" */ private …
2013-04-07 09:55 · 评论(0)
Springmvc : Failed to convert property value of type 'java.lang.String' to int
Failed to convert property value of type 'java.lang.String' to required type 'int' for property org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 8 errors Fixed: Change int to Integer.
2013-03-21 23:31 · 评论(0)
tomcat 启动报APR based Apache Tomcat Native library not found
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_43/jre/lib/i386/client:/usr/java/jdk1.6.0_43/jre/lib/i386:/usr/java/jdk1.6.0_43/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/u…
2013-03-11 21:54 · 评论(0)
myeclise project 加入maven后运行java文件出错
个人在Maven工程中运行Java文件时莫名其妙的不能执行,报如下错误 Java代码 Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/M ain Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.Main at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Nativ…
2013-03-02 18:06 · 评论(0)
使用PowerMock来Mock静态函数
EasyMock和Mockito等框架,对static, final, private方法均是不能mock的。 这些框架普遍是通过创建Proxy的方式来实现的mock。 而PowerMock是使用CGLib来操纵字节码而实现的mock,所以它能实现对上面方法的mock。今天先来看一个简单的例子吧: 第一个注解是指定Runner 第二个是你要测试的类,这个里面调用了静态类 下面我结合EasyMock给一个简单的例子: Java代码 import java.io.IOException; public class SystemPropertyMockDemo { public String ge…
2012-11-06 10:27 · 评论(0)
10进制转36进制
public static string C10_36(long i) { string s = ""; int j = 0; while (i > 36) { j = i % 36; if (j < 10) s += j.ToString(); else s += Convert.ToChar(j + 87); i = i \ 36; } if (i < 10) s += i.ToString(); else s += Convert.ToChar(i + 87); Char c = s.ToCharArray(); Array.Reverse(c); return new string(…
2012-09-12 16:36 · 10进制转36进制 · 评论(0)
class TooManyFieldsRule
View Javadoc 1 /** 2 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 */ 4 package net.sourceforge.pmd.lang.java.rule.codesize; 5 6 import java.util.HashMap; 7 import java.util.List; 8 import java.util.Map; 9 10 import net.sourceforge.pmd.lang.ast.Node; 11 import net…
2012-05-10 15:43 · dd · 评论(0)
How to write a PMD rule
Last Published: 2012-01-31 | SourceForge > PMD SourceForge.net Project Page | Hosted by SourceForge Overview Download PMD 5.0 Alpha What's new in PMD 5.0 Alpha PMD in the news PMD-related products and books Best practices Future directions Similar projects Credits License What does 'PMD' mean? Usag…
2012-05-09 09:52 · sfsdf · 评论(0)