07 2020 档案

摘要:redis集群与哨兵选举原理 Redis集群 redis Cluster将所有数据分为16384个槽位,每个节点负责一部分,当客户端要查找某个key时,根据本地槽位分配信息进行定位 槽位定位算法 Cluster会对key进行crc16算法得到一个整数值,再对这个整数值进行16384取模得到具体槽位 阅读全文
posted @ 2020-07-30 23:15 JaminYe 阅读(3273) 评论(2) 推荐(1) 编辑
摘要:/** * 处理每行数据 */ @Override public void invoke(Model model, AnalysisContext analysisContext) { if (model.getName.length()>20) { throw new ExcelAnalysisE 阅读全文
posted @ 2020-07-30 21:16 JaminYe 阅读(2158) 评论(0) 推荐(0) 编辑
摘要:在导出时注册registerWriteHandler(new CustomCellWriteHandler()) /** * @author jamin * @date 2020/7/29 11:28 * 设置自适应列宽 */ public class CustomCellWriteHandler 阅读全文
posted @ 2020-07-29 23:56 JaminYe 阅读(10246) 评论(1) 推荐(0) 编辑
摘要:导出时注册registerWriteHandler(new RowWriteHandlerImpl()) /** * @author jamin * @date 2020/7/29 15:18 */ public class RowWriteHandlerImpl implements CellWr 阅读全文
posted @ 2020-07-29 23:52 JaminYe 阅读(9502) 评论(0) 推荐(0) 编辑
摘要:Redis各架构安装与服务端使用 单机 主从架构 哨兵架构 集群 单机安装 确保本机已安装wget和gcc,如未安装执行yum install gcc wget -y 下载redis.tar.gz 本次使用的redis版本为5.08wget http://download.redis.io/rele 阅读全文
posted @ 2020-07-29 23:50 JaminYe 阅读(156) 评论(0) 推荐(0) 编辑
摘要:layui文件列表上传实例 <div class="layui-inline" style="margin-left: 132px"> <label class="layui-form-label">文件上传</label> <div class="layui-upload" style="marg 阅读全文
posted @ 2020-07-28 22:23 JaminYe 阅读(1288) 评论(0) 推荐(0) 编辑
摘要:layui多表头 主要是colspan跨几列与rowspan跨几行 cols: [ [ //表头 {type: 'numbers', width: '3%', rowspan: '2', fixed: 'left'}, {field: 'cname', title: '市', align: 'cen 阅读全文
posted @ 2020-07-28 22:20 JaminYe 阅读(889) 评论(0) 推荐(0) 编辑
摘要:layui.open监听页面提交 $("#addBtn").on('click', function () { layer.open({ type: 2, content: "/add.html" area: ['750px', '400px'], title: '添加', scrollbar: f 阅读全文
posted @ 2020-07-28 22:18 JaminYe 阅读(1012) 评论(0) 推荐(0) 编辑
摘要:ztree加easyui加候选区 .resource { padding: 5px; height: 16px; border-bottom: 1px dashed #ccc; } .resource:hover { background: #f4f4f4; } .resource .left { 阅读全文
posted @ 2020-07-28 22:17 JaminYe 阅读(102) 评论(0) 推荐(0) 编辑
摘要:ajax提交form的三种方式 序列化 $.ajax({ url:url, dataType:'json', type:'post', data:$("#form").serialize(), }) json字符串 form.on('submit(infoContent)', function (d 阅读全文
posted @ 2020-07-28 22:14 JaminYe 阅读(609) 评论(0) 推荐(0) 编辑
摘要:数据类型 String 单值缓存 set user:1 json数据 多值缓存 mset user:1:name zhangsan user:1:age 18 分布式锁 setnx key value 返回0或1 防止其他人修改 删除数据 del key value 计数器 incr article 阅读全文
posted @ 2020-07-27 23:03 JaminYe 阅读(113) 评论(0) 推荐(0) 编辑
摘要:Jpa创建筛选器自动忽略nul值进行搜索 //创建一个筛选器 ExampleMatcher exampleMatcher = ExampleMatcher.matching().withMatcher("code", ExampleMatcher.GenericPropertyMatchers.co 阅读全文
posted @ 2020-07-27 22:24 JaminYe 阅读(467) 评论(0) 推荐(0) 编辑
摘要:layui单元格换行 使其能显示,如果左右列固定,在done回调中使用下方方法 .layui-table-cell { height: auto; } //固定行随单元格自动调整 function autoFixedHeight(tableElem) { // 获取表格div var $tableV 阅读全文
posted @ 2020-07-27 22:15 JaminYe 阅读(1538) 评论(0) 推荐(0) 编辑
摘要:方法不是最优解,需保证表单提交不能有空值 <form class="layui-form layui-form-pane" id="testForm" action=""> <input type="text" name="name"/> <input type="text" name="name" 阅读全文
posted @ 2020-07-27 22:14 JaminYe 阅读(1260) 评论(3) 推荐(0) 编辑
摘要:在layui初始化完成之后done回调中调用该方法,同一列中有相同值会合并,第二个值需在控制台尝试 var execRowspan = function(fieldName,index,flag){ // 1为不冻结的情况,左侧列为冻结的情况 let fixedNode = index=="1"?$ 阅读全文
posted @ 2020-07-27 22:12 JaminYe 阅读(357) 评论(0) 推荐(0) 编辑
摘要:关于jpa example使用 一个搜索匹配两个 阅读全文
posted @ 2020-07-27 22:10 JaminYe 阅读(184) 评论(0) 推荐(0) 编辑
摘要:mui下拉菜单 <div id="pullrefresh" class="mui-content mui-scroll-wrapper"> <div class="mui-scroll"> <ul class="mui-table-view mui-table-view-chevron" id="l 阅读全文
posted @ 2020-07-27 22:08 JaminYe 阅读(1078) 评论(0) 推荐(0) 编辑
摘要:img在div中居中 div{ display: flex; justify-content: center; align-items: center; } <!--外层div 加上样式--> 阅读全文
posted @ 2020-07-27 22:06 JaminYe 阅读(268) 评论(0) 推荐(0) 编辑
摘要:高德地图定位api使用 <!--<script src='https://webapi.amap.com/maps?v=2.0&key=你的key'></script>--> var amp = AMap.plugin('AMap.Geolocation', function () { geoloc 阅读全文
posted @ 2020-07-27 22:05 JaminYe 阅读(604) 评论(0) 推荐(0) 编辑
摘要:高德地图驾车导航使用 传入起点终点 返回路线长度,耗时,路线规划 function (lon, lat) { var destination = [lon, lat]; var index = layer.msg("查询中....", {time: 0, shade: 0.01}) $.ajax({ 阅读全文
posted @ 2020-07-27 22:04 JaminYe 阅读(263) 评论(0) 推荐(0) 编辑
摘要:关于jpa example使用 阅读全文
posted @ 2020-07-15 23:25 JaminYe 阅读(382) 评论(0) 推荐(0) 编辑
摘要:文件下载 public void downloadFile(String fileCd, HttpServletResponse response) { WrBuMd wrBuMd = wrBuMdRepository.findById(fileCd).orElse(null); File file 阅读全文
posted @ 2020-07-15 23:21 JaminYe 阅读(122) 评论(0) 推荐(0) 编辑
摘要:文件夹下的文件根据最后修改时间排序 /** * 文件排序 越新越靠前 * * @param filePath 文件路径 */ public static File[] fileSort(String filePath) { File file = new File(filePath); File[] 阅读全文
posted @ 2020-07-15 23:19 JaminYe 阅读(395) 评论(0) 推荐(0) 编辑
摘要:验证图片是否加载成功 //所有图片加载完成 var flag = 0; for (var i = 0; i < $(".img").length; i++) { $(".img")[i].onload = function () { flag++; if (flag == $(".img").len 阅读全文
posted @ 2020-07-15 23:17 JaminYe 阅读(239) 评论(0) 推荐(0) 编辑
摘要:使用jdk1.8的LocalDate获取当天,本月第一天,本月最后一天,今年第一天,今年最后一天 LocalDate localDate = LocalDate.now(); //今天 Date day = Date.from(localDate.atStartOfDay(ZoneId.system 阅读全文
posted @ 2020-07-15 23:16 JaminYe 阅读(3786) 评论(0) 推荐(0) 编辑
摘要:将doc转为BufferedImage 修改图片大小后合成一张图片输出 package com.jaminye.zongsu.util; import com.aspose.words.Document; import com.aspose.words.ImageSaveOptions; impor 阅读全文
posted @ 2020-07-15 23:15 JaminYe 阅读(372) 评论(0) 推荐(0) 编辑
摘要:easyui前端分页与layui前端分页 easyui前端分页 layui前端分页 阅读全文
posted @ 2020-07-15 23:13 JaminYe 阅读(482) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示