`
elan1986
  • 浏览: 164200 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表

iptables

1、安装iptables防火墙 CentOS执行:yum install iptables Debian/Ubuntu执行:apt-get install iptables 2、清除已有iptables规则 iptables -F iptables -X iptables -Z 3、开放指定的端口 #允许本地回环接口(即运行本机访问本机) iptables -A INPUT -s 127.0.0.1 -d 127.0. ...
package com.lch.find; import java.io.IOException; import java.util.Iterator; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.FloatWritable; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.LongWritable; import ...
被Serializable接口声明的类的对象的内容都将被序列化,如果现在用户希望自己指定序列化的内容,则可以让一个类实现Externalizable接口,此接口定义如下: public interface Externalizable extends Serializable {      public void writeExternal(ObjectOutput  out) throws IOException ;      public void readExternal(ObjectInput in)  throws IOException,  ClassNot FoundExce ...

maven 资源

1、maven包查询:    http://mvnrepository.com/ 2、maven公共仓库    http://mirrors.ibiblio.org/pub/mirrors/maven2/    http://gradle.artifactoryonline.com/gradle/libs    http://gradle.artifactoryonline.com/gradle/plugins    http://google-maven-repository.googlecode.com/svn/repository    http://maven.spring ...
Mysql为了安全性,在默认情况下用户只允许在本地登录,可是在有此情况下,还是需要使用用户进行远程连接,因此为了使其可以远程需要进行如下操作: 一、允许root用户在任何地方进行远程登录,并具有所有库任何操作权限 ...

linux 常用命令

1. man 对你熟悉或不熟悉的命令提供帮助解释 eg:man ls 就可以查看ls相关的用法 注:按q键或者ctrl+c退出,在linux下可以使用ctrl+c终止当前程序运行。 2. ls 查看目录或者文件的属*,列举出任一目录下面的文件 eg: ls /usr/man ls -l a.d表示目录(directory),如果是一个"-"表示是文件,如果是l则表示是一个连接文件(link) b.表示文件或者目录许可权限.分别用可读(r),可写(w),可运行(x)。 3. cp 拷贝文件 eg: cp filename1 filename2 //把filename1拷贝成fi ...
在向表中插入数据的时候,经常遇到这样的情况:1. 首先判断数据是否存在; 2. 如果不存在,则插入;3.如果存在,则更新。 在 SQL Server 中可以这样处理:    if not exists (select 1 from t where id = 1)       insert into t(id, update_time) values(1, getdate())    else       update t set update_time = getdate() where id = 1 那么 MySQL 中如何实现这样的逻辑呢?别着急!MySQL 中有更简单的方法: replac ...
查看文件权限的语句: 在终端输入: ls -l xxx.xxx (xxx.xxx是文件名) 那么就会出现相类似的信息,主要都是这些: -rw-rw-r-- 一共有10位数 其中: 最前面那个 - 代表的是类型       中间那三个 rw- 代表的是所有者(user)      ...
昨天在VMware Player中安装了ubuntu系统,今天想通过xshell连接ubuntu,结果显示 Connecting to 10.7.100.182:22... Could not connect to '10.7.100.182' (port 22): Connection failed. VM中网络连接设置了Bridge模式。 网络查找解决办法如下: xshell连接不了ubuntu,原因没有安装openssh-server,解决方法: $:sudo apt-get install openssh-server 查看server是否启动: $:ps -ef |grep ...

memcache

在单台服务器下开启多个memcached服务 32bit下 memcached只支持最大4G内存 Because a 32-bit process can only address 4GB of virtual memory (usually significantly less, depending on your operating system), if you have a 32-bit server with 4-64GB of memory using PAE you can just run multiple processes on the machine, each usin ...
windows系统下mysql出现Error 1045(28000) Access Denied for user 'root'@'localhost' (Using password:NO)错误解决方法       在windows操作系统安装mysql数据库,碰到Error 1045(28000) Access Denied for user 'root'@'localhost' (Using password:NO)错误时,你需要重新设置密码。       具体方法是:       1.先在安装目录找到my.ini配置文件,打开配置文件,找到[mysqld]一行,在下面添加skip-gr ...
/** * @Title: DynamicClient.java * @Package demo.hw.server.client * @Description: TODO * @author lilc * @date 2012-6-6 上午10:03:10 * @version V1.0 */ package demo.hw.server.client; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; /** * @ClassName: D ...
package myproject.javatest; public enum SingletonEnum { INSTANCE; public static SingletonEnum getInstance(){ return INSTANCE; } private Object o; public Object testObject(){ if(o == null){ o = new Object(); } return o; } public static void main(String[] ...
POM文件报错maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e., 在</build>标签前添加如下内容 <pluginManagement> <plugins> <!-- Ignore/Execute plugin execution --> <plugin> <groupId>org ...
http://m2eclipse.sonatype.org/sites/m2e(http://m2eclipse.sonatype.org/update/ 旧地址)         (maven插件地址更新了) http://m2eclipse.sonatype.org/sites/m2e-extras/  (http://m2eclipse.sonatype.org/update-dev/旧地址)          (maven插件额外附件地址) http://subclipse.tigris.org/update_1.6.x                (svn plugin) http: ...
Global site tag (gtag.js) - Google Analytics