`
文章列表

安装redis

1、下载路径: https://redis.io/download 2、解压,编译安装: $ sudo make $ sudo make install 3、启动: $ redis-server 4、客户端访问: redis-cli 5、更改密码: 在配置文件中配置requirepass的密码(当redis重启时密码依然有效)。 # requirepass foobared 如  修改成 : requirepass  123456 6、带密码登录: $ redis-cli -p 6379 -a 123456 7、停止服务: $ redis-cli -p 6379 -a 123456 shutd ...

MySQL

    博客分类:
  • SQL
group by限制列,不适用group by查询时间最小的订单 select user_id,req_money,loan_term,`status`,created_at from renrenhua.order_request a where not exists (select b.id from renrenhua.order_request b inner join renrenhua.order_request c on b.user_id=c.user_id and b.created_at>c.created_at where a.id=b.id) ...
1、读取properties //props.load(new FileInputStream(ClassUtils.getDefaultClassLoader().getResource("").getPath() + File.separator + "email.properties")); props.load(EmailService.class.getClassLoader().getResourceAsStream("email.properties")); 2、生成Excel //获取cla ...
1、pom.xml依赖包引入 <dependency> <groupId>net.sourceforge.jexcelapi</groupId> <artifactId>jxl</artifactId> <version>2.6.12</version> </dependency> 2、具体代码 //创建excel String fileName = getExcelFileName(list.get(0)); File ...
1、pom.xml依赖包引入 <dependency> <groupId>com.sun.mail</groupId> <artifactId>javax.mail</artifactId> <version>1.5.5</version> </dependency> 2、email.properties文件 #email mail.smtp.host=smtp.mxhichina.com mail.smtp.socketFactory.port=465 ...

Highcharts使用例子

    博客分类:
  • JS
1、引用文件 <script type="text/javascript" th:src="@{../../highcharts/highcharts.js}"></script> <script type="text/javascript" th:src="@{../../highcharts/exporting.js}"></script> <script type="text/javascript" th:src="@{ ...
oracle树查询 SELECT R.RESOURCE_ID,R.RESOURCE_NAME,R.RESOURCE_URL,R.RESOURCE_TYPE,R.CREATE_TIME,R.STATUS ,RS.RESOURCE_STRUCTURE_ID,RS.RESOURCE_LEVEL,RS.PARENT_RESOURCE_ID,RS.RESOURCE_SORTNUMBER FROM T_SYS_RESOURCE_STRUCTURE RS JOIN T_SYS_RESOURCE R ON R.RESOURCE_ID = RS.RESOURCE_ID STAR ...

mysql批量操作

mysql批量语句执行语法错误解决: jdbc:mysql://localhost:3306/dbname?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true 1、批量删除 Mapper.java public void deleteCommunityRelUser(@Param("communityId") String communityId,@Param("userIdList") List<String> userIdList) throws E ...
1、后台代码Websocket.java package com.sinosoft.tyoa.websocket; import java.io.IOException; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import javax.websocket.OnClose; import javax.websocket.OnError; import javax.websocket.OnMessage; import javax.websocket.OnOpe ...
一、按时间点恢复 1、赋予Flash存储的权限: ALTER TABLE GM_USER.T_SHSJGL_AREL ENABLE ROW MOVEMENT; 2、表数据还原到指定时间点 FLASHBACK TABLE GM_USER.T_SHSJGL_AREL TO TIMESTAMP TO_TIMESTAMP('2014-11-21 11:00:00','yyyy-mm-dd hh24:mi:ss'); 二、按SCN点恢复 1、获得当前SCN SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL; 2、如果能够确切知道删除之前 ...
启动参数配置: -Xmx3000M -Xms3000M -Xmn600M -XX:PermSize=500M -XX:MaxPermSize=500M -Xss256K -XX:+DisableExplicitGC -XX:SurvivorRatio=1 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:+CMSClassUnloadingEnabled -XX: ...

SQL优化

    博客分类:
  • SQL
1、WHERE子句中的连接顺序: ORACLE采用自下而上的顺序解析WHERE子句,根据这个原理,表之间的连接必须写在其他WHERE条件之前, 那些可以过滤掉最大数量记录的条件必须写在WHERE子句的末尾。 2、SELECT子句中避免使用'*'。 3、最高效的删除重复记录方法: DELETE FROM FROM T_SHSJGL_AR A WHERE A.ROWID > (SELECT MIN(B.ROWID) FROM T_SHSJGL_AR B WHERE A.ZJHM = B.ZJHM AND A. ...
前台页面: <form id="fileUpload" action="<%=basePath%>shsjgl-person/PersonAction!importExcel.action" enctype="multipart/form-data" method="post"> <input id="excel" name="excel" type="file"/> <input type=&quo ...
查询输入区段时间内数据,包含两端。 1、起始日期、终止日期必须同时填写,或者同时不填写: var csrqStart = document.getElementById("arVO.csrqStart").value; var csrqEnd = document.getElementById("arVO.csrqEnd").value; var t1 =(csrqStart != null && csrqStart != ''); var t2 =(csrqEnd != null && csrqEnd != ...

sql---两个查询

    博客分类:
  • SQL
1.SELECT D.WGMC, D.JDMC, D.HS, COUNT(6) ZS FROM (SELECT C.WGMC WGMC,C.WGBM WGBM,C.JDMC JDMC,C.HS HS FROM (SELECT COUNT(2) HS,WG.WGMC,WG.WGBM,JD.JDMC FROM T_SHSJGL_GH H, T_SHSJGL_WG WG,T_SHSJGL_SQ SQ,T_SHSJGL_JD JD WHERE H.GRID_ID = WG.ID AND WG.SQID = SQ.ID AND SQ.JDID = JD.ID GROUP BY WG.WG ...
Global site tag (gtag.js) - Google Analytics