Dubbo官方文档(旧版): https://dubbo.gitbooks.io/dubbo-user-boo…
不静之心
Fedora 安装 RabbitMQ
增加端口:
|
1 2 3 4 5 6 7 8 9 10 11 12 |
firewall-cmd --permanent --zone=public --add-port=5672/tcp firewall-cmd --permanent --zone=public --add-port=5671/tcp firewall-cmd --permanent --zone=public --add-port=4369/tcp firewall-cmd --permanent --zone=public --add-port=25672/tcp firewall-cmd --permanent --zone=public --add-port=15672/tcp firewall-cmd --permanent --zone=public --add-port=61613/tcp firewall-cmd --permanent --zone=public --add-port=61614/tcp firewall-cmd --permanent --zone=public --add-port=1883/tcp firewall-cmd --permanent --zone=public --add-port=8883/tcp firewall-cmd --permanent --zone=public --add-port=15674/tcp firewall-cmd --reload firewall-cmd --list-all |
rabbitmq基…
mybatis三种动态sql
https://blog.csdn.net/wangb_java/article/details/736579…
idea无法打开springboot里面的application.properties
刚用向导创建的时候,是可以打开的,但是输入了数据之后,就无法打开, 搞了一个早上,才发现,要右键Make as…
Nodejs资料
版本号 使用NPM下载和发布代码时都会接触到版本号。NPM使用语义版本号来管理代码,这里简单介绍一下。 语义版…
CentOS 7安装fail2ban+Firewalld防止SSH爆破
CentOS 7安装fail2ban+Firewalld防止SSH爆破 http://blog.51cto.c…
Java生成不重复的随机数组的方法
原文: https://www.jianshu.com/p/79a7179f69d1 [crayon-6ab9…
shell bash判断文件或文件夹是否存在
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
#!/bin/sh #shell判断文件夹是否存在 #如果文件夹不存在,创建文件夹 if [ ! -d "/myfolder" ]; then mkdir /myfolder fi #shell判断文件,目录是否存在或者具有权限 folder="/var/www/" file="/var/www/log" # -x 参数判断 $folder 是否存在并且是否具有可执行权限 if [ ! -x "$folder"]; then mkdir "$folder" fi # -d 参数判断 $folder 是否存在 if [ ! -d "$folder"]; then mkdir "$folder" fi # -f 参数判断 $file 是否存在 if [ ! -f "$file" ]; then touch "$file" fi # -n 判断一个变量是否有值 if [ ! -n "$var" ]; then echo "$var is empty" exit 0 fi # 判断两个变量是否相等 if [ "$var1" = "$var2" ]; then echo '$var1 eq $var2' else echo '$var1 not eq $var2' fi |
EventBus使用之基础
官方 https://github.com/greenrobot/EventBus EventB…
使用Spring WebSocket实现消息推送
使用Spring WebSocket实现消息推送 https://blog.csdn.net/zmx72961…
websocket 心跳包保持连接和关闭重连
websocket 心跳包保持连接和关闭重连 https://my.oschina.net/714593351…
okhttp3 使用
okhttp3 使用 https://blog.csdn.net/xx326664162/article/de…
spring(spring mvc)整合WebSocket案例(获取请求参数)
spring(spring mvc)整合WebSocket案例(获取请求参数) https://www.cnb…
如何在安卓app中使用FontAwesome图标
如何在安卓app中使用FontAwesome图标 参考:http://www.jcodecraeer.com/…
模拟服务器返回数据
模拟服务器返回数据 https://juejin.im/post/585931621b69e60056f89e…
整合QMUI Android和Android-Bootstrap
我的手机是Android 6,版本比较低,所以整合有些问题 [crayon-6ab99bbcf08504258…
微信播放的问题
播放的时候,不全屏,除非手动点了全屏功能
|
1 |
<video preload="auto" autoplay="true" webkit-playsinline="" playsinline="" x-webkit-airplay="allow" x5-video-orientation="landscape|portrait" src="blob:http://192.168.0.223:8082/dd55024f-779a-48d3-93f6-bc80fc2e1d1c" style="width: 100%; height: 100%;"></video> |
…
春秋和战国,一统秦两汉
先有东周还是西周? https://zhidao.baidu.com/question/576496754.h…
JS录制短语音和短视频(无插件,原生js实现)
参考原文: https://zhuanlan.zhihu.com/p/25162723
似懂非懂 Comparable和 Comparator
详细参考原文: https://my.oschina.net/mengyuankan/blog/2221355
spring+mybatis+druid数据源+sharding-jdbc分库分表
最新版本官方手册: http://shardingsphere.io/document/current/cn/…
使用JavaScript将当前页面保存成PDF
原文参考: http://jerrywang-sap.iteye.com/blog/2431279 1. 遍历…
使用JavaScript给对象修改注册监听器
参考: http://jerrywang-sap.iteye.com/blog/2431034 如果windo…
Eclipse 内存分析器MAT
Eclipse 内存分析器MAT(一)–MAT安装配置 http://fengyilin.ite…
JS的节流、函数防抖 原理及使用场景
JS的节流、函数防抖 原理及使用场景 https://juejin.im/post/5b961773f265d…
对称加解密: DES和3DES的 Java 实现
Java DES 加密 解密 示例1
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
package com.techzero.des; import java.security.SecureRandom; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESKeySpec; /** * DESTest.java * * @author Techzero * @Email techzero@163.com * @Time 2013-12-12 下午2:22:58 */ public class DESTest { /** * @param args */ public static void main(String[] args) { String content = "DESTest"; // 密码长度必须是8的倍数 String password = "12345678"; System.out.println("密 钥:" + password); System.out.println("加密前:" + content); byte[] result = encrypt(content, password); System.out.println("加密后:" + new String(result)); String decryResult = decrypt(result, password); System.out.println("解密后:" + decryResult); } /** * 加密 * * @param content * 待加密内容 * @param key * 加密的密钥 * @return */ public static byte[] encrypt(String content, String key) { try { SecureRandom random = new SecureRandom(); DESKeySpec desKey = new DESKeySpec(key.getBytes()); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); SecretKey securekey = keyFactory.generateSecret(desKey); Cipher cipher = Cipher.getInstance("DES"); cipher.init(Cipher.ENCRYPT_MODE, securekey, random); byte[] result = cipher.doFinal(content.getBytes()); return result; } catch (Throwable e) { e.printStackTrace(); } return null; } /** * 解密 * * @param content * 待解密内容 * @param key * 解密的密钥 * @return */ public static String decrypt(byte[] content, String key) { try { SecureRandom random = new SecureRandom(); DESKeySpec desKey = new DESKeySpec(key.getBytes()); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); SecretKey securekey = keyFactory.generateSecret(desKey); Cipher cipher = Cipher.getInstance("DES"); cipher.init(Cipher.DECRYPT_MODE, securekey, random); byte[] result = cipher.doFinal(content); return new String(result); } catch (Throwable e) { e.printStackTrace(); } return null; } } |
&nb…
非对称加解密: RSA加密、解密以及数字签名
原文很详细 查看原文吧 https://blog.csdn.net/yangzhaomuma/article…
网站性能压力测试工具:Apache ab使用详解
网站性能压力测试工具:Apache ab使用详解 https://www.linuxidc.com/Linux…
限流器及Guava实现分析
限流器及Guava实现分析 https://juejin.im/entry/5b8cb148f265da437…
postMessage可太有用了
postMessage的定义 postMessage是html5引入的API,postMessage()方法允…
微信扫描自定义二维码关注公众号
微信扫描自定义二维码关注公众号 https://blog.csdn.net/wangpf2011/articl…
开源BI工具MetaBase-安装与使用
开源BI工具MetaBase-安装与使用 https://www.jianshu.com/p/f6b5cf74…
mysql的一些常用函数
日期 mysql类似to_char()to_date()函数mysql日期和字符相互转换方法 https://…
Fedora和CentOS下安装redash
官方帮助文档: https://redash.io/help/ redash在CentOS下的安装 https…
可视化监控: 对比了解Grafana与Kibana的关键差异
我们身处海量数据的包围之中已成众所周知的事实。即使你管理的是一个单独的Linux服务器,那么带着问题一发生就能…
