- 博客(30)
- 收藏
- 关注
原创 指定列去重
PARTITION BY : 在分区内(如tasknumber列和userid列)进行计算。查询相同tasknumber、且相同userid的其中一个task的taskid。ROW_NUMBER() OVER :从1开始,为每条分组记录返回一个数字。
2023-09-06 16:20:41
95
原创 QueryPhaseExecutionException[Result window is too large
Failed to execute phase [query]
2022-08-10 18:30:58
283
原创 poi 获取formula计算结果
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();cell.setCellFormula("SUM(K2:K6)");double result= evaluator.evaluate(cell).getNumberValue();
2022-05-26 16:56:41
837
原创 在liferay中通过代码更改DL文件夹的权限
Folder tempFolder = dlAppLocalService.getFolder(groupId, parentFolderId, "temp");Role guestRole = roleLocalService.getRole(companyId, RoleConstants.GUEST);resourcePermissionLocalService.setResourcePermissions(companyId, DLFolder.class.getName(), Resourc
2022-05-19 11:52:09
163
转载 elasticsearch update failed问题
ES数据库发现磁盘将要写满之后,会尝试将所有的index设置index.blocks.read_only_allow_delete为true,会导致数据无法写入。可以通过以下命令将所有的index配置改为false,来恢复。curl -XPUT -H "Content-Type: application/json" \ http://localhost:9200/_all/_settings \ -d '{"index.blocks.read_only_allow_delete": fals
2022-03-21 10:29:29
950
转载 poi: 根据行号获取cell在excel表格中对应的字母
String columnStr = CellReference.convertNumToColString(cellIndex);
2022-01-04 17:59:54
519
原创 portlet id is already in use
gogo shelllb -s | grep $portletNameuninstall $ID
2021-09-26 18:00:48
141
转载 DBeaver导入csv中文乱码
把csv文件后缀名强制改成.txt格式,然后打开txt文件另存为txt的时候指定utf-8编码,然后再把txt后缀名强制改成.csvDBeaver导入csv中文乱码问题解决
2021-09-01 16:17:07
3677
原创 cell.getNumericCellValue 判断“%“
if (cell != null) { final CellType cellTypeEnum = cell.getCellTypeEnum(); if ("NUMERIC".equals(cellTypeEnum.toString())) { value = cell.getNumericCellValue(); } if (!cell.getCellStyl...
2021-08-24 17:19:25
872
原创 判断long数组是否包含某个元素
long[] userIds = {1, 2, 3};ArrayUtils.contains(userIds, 1);
2021-08-05 17:23:48
2088
2
原创 使用css隐藏滚动条
火狐浏览器scrollbar-width: none; /* Firefox */ie浏览器-ms-overflow-style: none; /* IE 10+ */Chrome和Safari浏览器html::-webkit-scrollbar { display: none; /* Chrome Safari */}如何使用css隐藏滚动条
2021-07-19 17:07:45
103
原创 table固定表头 其他行列可拖动
.report-table { overflow-x: auto; max-width: 600px;}.header-table { overflow: hidden; /* 隐藏第一列滚动条*/ max-width: 300px;}.table-body { overflow-y: auto; max-height: 400px;}.d-block { display: block;}分为第一列和其他列两个表: .
2021-07-09 15:58:51
350
原创 通过ajax调用update方法后跳转页面数据未更新
原因 :ajax无法跳转网页,仅用于获取数据。解决:在回调函数里执行刷新success: function(data) { location.reload(true);}
2021-06-24 15:47:26
174
原创 java.time.month使用
Month month = Month.valueOf("January".toUpperCase());LocalDate localDate1 = Year.now().atMonth(month).atDay(1).with(TemporalAdjusters.lastDayOfMonth(); //2021-01-31LocalDate localDate2 = Year.now().atMonth(month).atDay(1).with(TemporalAdjusters.firstInMo
2021-06-21 17:43:53
265
原创 根据某一属性创建list
List<String> names = users.stream().map(User::getName).collect(Collectors.toList());
2021-05-27 15:47:07
79
原创 jsp格式化日期
引入JSTL库<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>格式化日期<fmt:formatDate value="${danger.createTime}" pattern="yyyy年MM月dd日 HH点mm分ss秒" />
2021-04-28 10:04:00
63
原创 jsp中获取数组列表的大小
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>${fn:length(collection)}
2021-03-31 09:32:16
550
原创 js 遍历name相同的input
var names= $("input[name='name']"); for(var i=0;i<names.length;i++) { console.log(names[i].value); }
2021-03-05 17:44:31
530
转载 JS通过身份证号码获取出生年月日
getBirthdayFromIdCard : function(idCard) { var birthday = ""; if(idCard != null && idCard != ""){ if(idCard.length == 15){ birthday = "19"+idCard.substr(6,6); } else if(idCard.length
2021-01-20 11:21:46
1342
原创 poi导出excel文件并下载
File tempFile = File.createTempFile("信息", ".xlsx"); FileOutputStream fos = new FileOutputStream(tempFile); workbook.write(fos); tempFile.deleteOnExit(); try(FileInputStream fis = new FileInputStream(tempFile)) { ServletResponseUtil.sendFile(httpServ.
2021-01-13 15:58:07
225
原创 解决js页面跳转后setinterval变快问题
解决js页面跳转后setinterval变快的问题。定义全局变量 var timer; window.clearInterval(timer); timer = setInterval(autoScrollLine,30);特定条件时清除计时器 if(box.scrollTop%box.offsetHeight==0) { clearInterval(timer); setTimeout(()=>{ timer = setInterval(autoScrollL
2020-12-28 15:45:40
484
原创 Liferay SearchContainer分页
ServiceContext serviceContext = null; String redirect = ParamUtil.getString(renderRequest, "redirect"); RenderURL renderURL = renderResponse.createRenderURL(); renderURL.setParameter("mvcRenderCommandName", "/uploadCustomers"); renderURL.setPara.
2020-12-08 15:45:38
111
翻译 Liferay URL
使用standard taglib创建URL:<%@ taglib uri=“http://java.sun.com/portlet_2_0” prefix=“portlet” %>Render URL :<portlet:renderURL var=“simpleDialogIframeExample”windowState="<%=LiferayWindowState.POP_UP.toString()%>"><portlet:param name=
2020-08-13 14:39:45
205
翻译 Integrate with Portal Search
Registering Entries with the Search Framework创建EntrySearchRegistrar.java1.实现activate(BundleContext bundleContext)和deactivate() @Activate protected void activate(BundleContext bundleContext) { _serviceRegistration = modelSearchRegistrarHe
2020-08-12 11:59:44
289
原创 liferay-asset renderer
Asset Renderer为资产创建标题和摘要 public String getSummary public String getTitle如果要为asset提供唯一的URL,则可以指定URL标题。URL标题是用于直接访问asset的URL(例如localhost:8080 /-/ this-is-my-blog-asset) public String getUrlTitle()如果asset受权限保护,则可以通过asset renderer设置asset的权限。@Overridep
2020-08-11 17:29:56
150
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人