Spring Boot (十):打包部署 发表于 2017-09-20 分类于 Java springboot 打包与部署一、jar 包 进入命令行模式 ,不管linux 还是windows 都是一样的 阅读全文 »
FileReader 获取图片BASE64 代码 并预览 发表于 2017-09-12 分类于 前端 FileReader 获取图片的base64 代码 并预览FileReader ,老实说我也不怎么熟悉。在这里只是记录使用方法。 方法名 参数 描述 abort none 中断读取 readAsBinaryString file(blob) 将文件读取为二进制码 readAsDataURL file(blob) 将文件读取为 DataURL readAsText file, (blob) 将文件读取为文本 阅读全文 »
Iframe 框架的一些笔记 发表于 2017-08-25 分类于 前端 一、Iframe 的自适应方法:1234567891011121314151617181920212223<iframe name="mainFrame" id="mainBodyFrame" src="/main" frameborder="0" scrolling="no" width="100%" height="900px" onload="setIframeHeight(this)"></iframe> <script type="text/javascript"> //iframe 自适应function setIframeHeight(iframe) { if (iframe) { var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow; if (iframeWin.document.body) { iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight; } }}; //mainBodyFrame就是iframe 的id window.onload = function() { setIframeHeight(document.getElementById('mainBodyFrame'));};</script> 阅读全文 »
服务器 搭建vpn 发表于 2017-08-24 分类于 其他 在vps服务器 搭建vpn一、搭建shadowsocks(1).安装shadowsocksCentOS 安装命令:12yum install python-setuptools && easy_install pip pip install shadowsocks 阅读全文 »
RocketMQ 配置双master 发表于 2017-08-23 分类于 MQ RocketMQ 配置多master一、准备工作1、虚拟机安装两台 Centos72、jdk83、maven 3.5.04、git 阅读全文 »
安装maven 发表于 2017-08-22 分类于 开发工具 安装Maven一、linux 安装Maven 官网下载:http://apache.fayea.com/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz 阅读全文 »
位运算 发表于 2017-08-15 分类于 其他 程序中的所有数在计算机内存中都是以二进制的形式储存的。位运算就是直接对整数在内存中的二进制位进行操作 123456789101112131415161718192021Java 位运算符:& :按位与。| :按位或。^ :按位异或。~ :按位取反。<< :左位移运算符。>> :右位移运算符。>>> :无符号右移运算符。单位换算:1个二进制数据0或1 = 1bit(位)1byte(字节) = 8bit1k = 1024byte(字节)1M = 1024k1G = 1024M1T = 1024G// 一个英文字符占1个字节// 一个汉字占2个字节// 一个int 类型的十进制数占4个字节 阅读全文 »
Spring Boot (九):过滤器、拦截器、监听器 发表于 2017-08-13 分类于 Java springboot 的过滤器、监听器、拦截器 demo一、添加依赖1234<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId></dependency> 阅读全文 »
Spring Boot (八):配置Druid 连接池 发表于 2017-08-12 分类于 Java springboot 配置 Druid连接池一、添加依赖12345678910111213<!-- 驱动 --><dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope></dependency> <!-- 连接池 --><dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.1.0</version></dependency> 阅读全文 »