![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
文章平均质量分 81
curiousby
这个作者很懒,什么都没留下…
展开
-
java,mysql,hadoop,cdh,hive,spark,ntp,zookeeper,kafka,storm,redis,flume,git 安装详解
机器的 hostname3.安装jdk4.网络、hostname、hosts、防火墙、selinux、ntp等配置5. 执行重启网络服务service network restart,使修改生效6.安装ntp7.安装cloudera前奏8.生成免密钥登陆9.安装java10.创建 hadoop 用户11.安装 cloudera12.安装zookeeper13.安装mysql 14.安装hive15.安装spark16.安装kafka17. stor2016-12-06 17:15:35 · 467 阅读 · 0 评论 -
java inputstream 传递给 py 处理
ython</groupId> <artifactId>jython</artifactId> <version>2.1</version> </dependency> *</pre> * desc: ... */public class PythonByJavaInputS2017-05-24 15:42:27 · 108 阅读 · 0 评论 -
银行卡验证
2017-08-30 10:11:27 · 185 阅读 · 0 评论 -
身份证 验证
tp://blog.csdn.net/tanksyg/article/details/49927739/** * 身份证合法性校验 * --15位身份证号码:第7、8位为出生年份(两位数),第9、10位为出生月份,第11、12位代表出生日期,第15位代表性别,奇数为男,偶数为女。 * --18位身份证号码:第7、8、9、10位为出生年份(四位数),第11、第12位为出生月份,第13、14位代表出生日期,第17位代表性别,奇数为男,偶数为女。 * --最后一位为校验位 */2017-08-30 10:07:14 · 431 阅读 · 0 评论 -
手机号 电话号码 邮箱 验证
equalsIgnoreCase("null")){ return true; } return false; } public static boolean isNull(Object obj){ if(obj == null ||obj.toString().trim().equalsIgnoreCase("null")){ return true; } return false; }2017-08-30 10:21:23 · 217 阅读 · 0 评论 -
list set array map 排序问题
and the other is using sorted data structures, such as TreeMap and TreeSet. 1. Using sort() MethodIf it is a collection, use Collections.sort() method.// Collections.sortList<ObjectName> list = new ArrayList<ObjectName&2017-08-30 13:48:52 · 79 阅读 · 0 评论 -
版本验证
ersion.split("\\."); String[] appVerisonArr = appVersion.split("\\."); int result = 0; for (int i = 0; i < currentVersionArr.length; i++) { if(Integer.valueOf(appVerisonArr[i]) > Integer.valueOf(currentVersion2017-09-06 17:49:11 · 155 阅读 · 0 评论 -
java 面试 百一测评
07.test;import java.util.ArrayList;import java.util.Arrays;import java.util.HashMap;import java.util.List;import java.util.Map;public class Mainshi1 { public static void main(String[] args) { String[] a = { "a", "b&quo2017-09-18 09:56:19 · 323 阅读 · 0 评论 -
https httpclient 请求不绕过 证书
nsupportedEncodingException;import java.net.MalformedURLException;import java.net.URL;import java.security.KeyManagementException;import java.security.KeyStore;import java.security.KeyStoreException;import java.security.NoSuchAlgorithmException2017-09-21 16:39:14 · 228 阅读 · 0 评论 -
SerializeUtil 序列化 java
tOutputStream;import java.util.ArrayList;import java.util.List;import org.slf4j.Logger;import org.slf4j.LoggerFactory;/** * * @author baoy * */public class SerializeUtil { private static final Logger logger = LoggerFactory.ge2017-10-23 17:50:47 · 293 阅读 · 0 评论 -
fastjson tostring ref 问题
Created at 2017年5月23日 * * Copyright 2016 CMCC Corporation Limited. * All rights reserved. * * This software is the confidential and proprietary information of * curiousby Company. ("Confidential Information"). You shall not * disc2017-05-23 11:10:06 · 188 阅读 · 0 评论 -
linux python eclipse 安装
.0-openjdk*java -version 下载 32位 java8 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htmljdk-8u131-linux-i586.gztar xf jdk-8u131-linux-i586.gzexport JAVA_HOME=/home/baoyou/soft/jdk1.8.0_131export JRE_H2017-05-18 12:42:39 · 145 阅读 · 0 评论 -
scp ssh java 实例
lt;/version></dependency> package com.taskschedule.util;import java.io.BufferedReader;import java.io.File;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import org.apa原创 2017-01-06 17:18:37 · 148 阅读 · 0 评论 -
shell java 执行
ss instance; public static ShellProcess getInstance() { if (instance == null) { synchronized (ShellProcess.class) { if (instance == null) { instance = new ShellProcess(); }2017-01-09 14:07:49 · 120 阅读 · 0 评论 -
AES 加密 解密
javax.crypto.SecretKey;import javax.crypto.spec.SecretKeySpec;import org.apache.commons.codec.binary.Hex;/** * AES Coder<br/> * secret key length: 128bit, default: 128 bit<br/> * mode: ECB/CBC/PCBC/CTR/原创 2017-03-24 14:47:02 · 100 阅读 · 0 评论 -
NIO 详解 (尚硅谷 学习代码)
原创 2017-03-25 09:42:03 · 102 阅读 · 0 评论 -
fastdfs java 使用
<version>1.25</version> </dependency> <!-- fastdfs end --> <!-- fdfs文件系统相关配置 fdfs_client.conf--> <connect_timeout>2</connect_timeout&2017-03-28 15:12:00 · 143 阅读 · 0 评论 -
仿QQ android 实战(学习 android 先来个QQ)
ownload/knight_black_bob/9822553android stdio 版本:http://download.csdn.net/download/knight_black_bob/9822556ps :该demo 中的 .9.png 为盗图,在as中不可使,在eclispe 中可以 先看效果图 android 框架xlistview swipe badgeview slidemenu scrollerviewvolleyxutils3.2017-04-20 17:09:25 · 535 阅读 · 0 评论 -
ios apns netty java codec 防止粘包
annel>() { @Override protected void initChannel(SocketChannel ch) throws Exception { ChannelPipeline pipeline = ch.pipeline(); if (isSsl) { SSLContext sslContext = SSLU2017-04-22 21:00:05 · 140 阅读 · 0 评论 -
推送sdk (类似百度 推送 ) android mina (待优化... )
2017-04-24 10:07:58 · 128 阅读 · 0 评论 -
tomcat session 共享 redis
ht_black_bob/9821122 1.添加 redis session jar 到 tomcat中 2. 配置 tomcat context.xml <?xml version="1.0" encoding="UTF-8"?><!-- Licensed to the Apache Software Foundation (ASF) under one or more2017-04-24 10:19:32 · 70 阅读 · 0 评论 -
java 通过 list<item> 实现 json 生成
结果展示 [{"gId":0,"id":1,"name":"config_latest_version","pId":0,"type":1,"value":"1.0.43"},{"gId":0,"id":2,"name":"app_info",&qu2017-10-26 15:06:08 · 296 阅读 · 0 评论 -
java 图片转字符串 ,字符串转 图片
;import java.io.InputStream;import java.io.OutputStream;import sun.misc.BASE64Decoder;import sun.misc.BASE64Encoder;public class FileReadTest { public static boolean download(String imgStr,String imgFile) throws Exception { if2017-10-27 20:58:25 · 540 阅读 · 0 评论 -
join
原创 2018-01-26 09:42:32 · 89 阅读 · 0 评论 -
ReentrantLock,Condition
i++) { queue.put("a"); String string = queue.getString(); System.out.println(string); } } public abstract class MessageQueue<T>{ private Queue<T> queue; private List<原创 2018-01-26 09:42:11 · 88 阅读 · 0 评论 -
okhttp 使用 post
dency><dependency><groupId>com.squareup.okio</groupId><artifactId>okio</artifactId><version>1.7.0</version></dependency>2018-02-05 17:04:42 · 148 阅读 · 0 评论 -
手写 dubbo
onstructor referpublic class SocketConsumer implements RpcRefer { @Override public <T> T refer(Class<T> interfaceClass, String host, int port) { return (T) Proxy.newProxyInstance(interfaceClass.getCla2018-02-09 17:17:54 · 145 阅读 · 0 评论 -
NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang
verName 17:39:20.040 - A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost [localhost].StandardContext[]] at2018-03-03 18:38:51 · 406 阅读 · 0 评论 -
手写 reactor( netty reactor 模型)
SocketChannel; public Dispacther() throws IOException { selector=Selector.open(); serverSocketChannel=ServerSocketChannel.open(); InetSocketAddress inetSocketAddress=new InetSocketAddress(this.host,this.port); server2018-03-04 01:16:15 · 358 阅读 · 0 评论 -
java 代码混淆 proguard exception
owandshare\showandshare\showandshare.gateway\showandshare.gateway.netty.dispacther\target\classes, F:\repository\repository\org\springframework\boot\spring-boot-starter-web\1.5.8.RELEASE\spring-boot-starter-web-1.5.8.RELEASE.jar, F:\repository\repository\o2018-03-12 15:04:57 · 559 阅读 · 0 评论 -
最小栈 三种实现(面试...)
2018-04-02 12:47:15 · 185 阅读 · 0 评论 -
特定用户部署 tomcat
2018-05-23 16:45:26 · 140 阅读 · 0 评论 -
Collections,Synchronized
atic List synchronizedList(list l)////public static Map synchronizedMap(Map m)////public static Set synchronizedSet(Set s)////public static SortedMap synchronizedSortedMap(SortedMap sm)////public static SortedSet synchronizedSortedSet(Sorte原创 2018-01-26 09:53:51 · 82 阅读 · 0 评论 -
Semaphore
原创 2018-01-25 17:46:22 · 119 阅读 · 0 评论 -
java 最小栈
ck implements IMinMaxStack<Integer> { private static int maxLength = 5; private static int [] data= new int[maxLength]; private static int [] mins= new int[maxLength]; private static int [] maxs= new int[maxLength]; private static2017-10-31 21:38:07 · 119 阅读 · 0 评论 -
httpclient 解决 connection reset 问题
at java.net.SocketOutputStream.write(SocketOutputStream.java:159) atorg.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124) atorg.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutp2017-11-21 12:40:33 · 2861 阅读 · 4 评论 -
压测 httpclient 报 Cannot assign requested address
2017-12-08 11:54:18 · 745 阅读 · 0 评论 -
手写 springmvc
ceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <org.slf4j-version>1.7.9</org.slf4j-versio2018-01-16 11:15:26 · 86 阅读 · 0 评论 -
手写 tomcat (nio)
ate int port = 8080; //private ExecutorService exec = Executors.newFixedThreadPool(60); private ExecutorService exec = new ThreadPoolExecutor(60, 60, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(2000)); private Se2018-01-22 17:08:15 · 147 阅读 · 0 评论 -
遍历 jdk1.7 jdk1.8 异同点
bin\jdeps.exe false // D:\soft\Java\jdk_1.8.0.0_64\bin\jjs.exe false // D:\soft\Java\jdk_1.8.0.0_64\javafx-src.zip false // D:\soft\Java\jdk_1.8.0.0_64\jre\bin\decora_sse.dll false // D:\soft\Java\jdk_1.8.0.0_64\jre\bin\j2pkcs11.dll2018-01-23 16:04:58 · 161 阅读 · 0 评论