- 浏览: 126182 次
- 性别:
- 来自: 南京
-
最新评论
-
duanwenping520:
这也太省事了把!
sj22
文章列表
url 二级域名匹配
- 博客分类:
- java
private static void urlMatche(String websiteAddress, String refererAddr) throws BusinessException {
String[] websites = websiteAddress.split(",");
for (String website : websites) {
String mwebsite = website.toLowerCase().replaceAll("\\.", "\\\\.").replace("ww ...
sbt 配置:镜像,配置完成后 运行 sbt,需要5-10分初始化
f:/sbt/conf/repo.properties/repo.properties
[repositories]
local
oschina: http://maven.oschina.net/content/groups/public/
jcenter: http://jcenter.bintray.com/
typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[r ...
spring mvc theme
- 博客分类:
- spring
http://tieba.baidu.com/p/3201822159
http://starscream.iteye.com/blog/1075855
java package
com.abc.themes
//
abc.properties
abc_en.properties
abc_zh_CN.properties
<bean id="themeSource" class="org.springframework.ui.context.support.ResourceBundleThemeSource">
&l ...
count查询 统计子表和主表数据
- 博客分类:
- mysql
1. 查询 子表中,不同的类型统计,
主表 几千条,子表60万数据,下面查询花了 40秒。
select
su.* ,
( select count(*) from dtl e where e.check_stat='EQ' and e.batch_no=su.batch_No) EQ,
( select count(*) from dtl w where w.check_stat !='EQ' and w.batch_no=su.batch_No) notEQ
from t_SUM su
where 1=1
经过 ...
lzo
./configure --enable-shared
make && sudo make install
hadoop-lzo
mvn clean test 失败,虽然/usr/local/lib 已经有了,还是报错,最后经过大神指导
把 usr/local/lib/liblzo2.*复制到/usr/lib下就可以 了
sudo cp liblzo2.* /usr/lib
Running com.hadoop.compression.lzo.TestLzopInputStream
2016-05-16 06:30:26,192 INFO lzo.GPLN ...
websocket 不同的聊天框显示
- 博客分类:
- JS
easui tab 打开相同的表单,生成动态的 div,根据div id 提交不同的界面。
1.Open.jsp 选择聊天成员后,动态生成组,传给后台
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.web.po.User" %>
<%
String path = ...
hadoop fs -put 失败
- 博客分类:
- hadoop
使用hadoop 启动之后,无法进行put ,发现datanode是0,
error :
hadoop fs -put could only be replicated to 0 nodes, instead of
找了好久原因,发现 /etc/hosts文件下 映射配置了 2个 host映射。。小菜了。哈哈
127.0.0.1 wei
192.168.85.130 wei
使用netstat -ntpl 查看竟然使用的是 127.0.0.1
去掉 了 hosts文件的 本地配置之后,删除127.0.0.1 之后,重新启动,
datanode 已经启动。
hadoop namenode ...
有时候我们需要某种类型的文件,如:*.jsp、*.java等
导航栏window-->preferences
打开"首选项"对话框,左侧导航树,导航到 Genera-->Content Types
在右边把Encoding设置为ISO 10646/Unicode(UTF-8),点击OK就完成了所有设置啦,新建一个jsp类型的文件,发现默认的字符编码已经变为了UTF-8 (*^__^*).
hadoop
- 博客分类:
- name node 无法启动
http://blog.csdn.net/bychjzh/article/details/7830508
最近遇到了一个问题,执行start-all.sh的时候发现JPS一下namenode没有启动
每次开机都得重新格式化一下namenode才可以
其实问题就出在tmp文件,默认的tmp文件每次重新开机会被清空,与此同时namenode的格式化信息就会丢失
于是我们得重新配置一个tmp文件目录
首先在home目录下建立一个hadoop_tmp目录
sudo mkdir ~/hadoop_tmp
...
Https Basic Auth
- 博客分类:
- java
最近测试 Https 连接,遇到了些问题。
1. Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
对方使用的是JDK 1.8,他们默认的是TLSV1.2, 我使用的是1.7, 我这边是1.0 的。
造成一直认证失败,开始以为要导入证书。设置请求默认1.2,就可以了。
System.setProperty("https.protocols", "TLSv1.1,TLSv1.2");
System.setProperty("jsse.ena ...
分组取最大值统计,过滤
- 博客分类:
- Oracle
汇率保存,千分之5以内的,按照日期,币种,汇率,汇率浮动分组。
首先分组,按照日期,币种,汇率,汇率浮动,然后分组统计(日期,币种,汇率)= 1的并且,
浮动范围在千分5以内。
如果有2条汇率,一条记录大于千分之5,一条记录小于千分之5,分组统计数目就大于1,就过滤掉。
如果汇率正常的且有多条,然后取max 最大值。
select c.trans_date, c.import_rate , c.settle_currency,c.txn_currency from (
select b.trans_date, max(b.import_rate) import_rate , ...
http://blog.csdn.net/lovejavaydj/article/details/7635848
Spring框架的事务基础架构代码将默认地 只 在抛出运行时和unchecked exceptions时才标识事务回滚。 也就是说,当抛出一个 RuntimeException 或其子类例的实例时。(Errors 也一样 - 默认地 - 标识事务回滚。)从事务方法中抛出的Checked exceptions将 不 被标识进行事务回滚
app.use(express.static(path.join(__dirname, 'public')));
app.use(app.router);
//some code
app.get('/',function(req,res)..............
app.get('/api',function(req,res)..............
//最后再重定向到首页
app.all('/*',function(req,res){
res.render('index')
}
同样在angular中也要设定html5模式:
app.config(function($l ...
OVal
- 博客分类:
- OVAL validate
http://blog.csdn.net/neweastsun/article/details/49154337
3.1 定义注解
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.PARAMETER,ElementType.METHOD})
@Constraint(checkWith = CPastCheck.class)
public @interface CPast {
Stringmessage() default "日期 ...
Redis save
- 博客分类:
- redis
http://www.cnblogs.com/siqi/p/4245821.html