`
文章列表

java中的IO整理

    博客分类:
  • java
写在前面:本文章基本覆盖了java IO的全部内容,java新IO没有涉及,因为我想和这个分开,以突出那个的重要性,新IO哪一篇文章还没有开始写,估计很快就能和大家见面。照旧,文章 依旧以例子为主,因为讲解内容的java书很多了,我觉的学以致用才是真。代码是写出来的,不是看出来的。 最后欢迎大家提出意见和建议。 【案例1】创建一个新文件 1 2 3 4 5 6 7 8 9 10 11 import java.io.*; class hello{     public static void main(String[] ar ...
          《大学》全文及翻译       原文:   大学之道,在明明德,在亲民,在止于至善。知止而后有定,定而后能静,静而后能安,安而后能虑,虑而后能得。物有本末,事有终始,知所先后,则近道矣。   ...
对于共享资源,有一个很著名的设计模式:资源池 (Resource Pool)。该模式正是为了解决资源的频繁分配﹑释放所造成的问题。为解决我们的问题,可以采用数据库连接池技术。数据库连接池的基本思想就是为数据库连 接建立一 ...
DBCP连接池配置          <bean id="dbcpDataSource" abstract="true">              <property name="maxActive" value="100" /><!-- 连接池的最大数据库连接数。设为0表示无限制。 -->              <property name="initialSize" value="1" /><!-- 初始化连接 ...

js 防止重复提交

  <input type="button" value="审核" onclick="checkSubmit()" class="dialog_link ui-state-default ui-corner-all" id="subBtn"/>     $("#subBtn").attr("disabled",true);   <a href="javascript:addPoints();" id=" ...

触发器

--账户表 DROP TRIGGER IF EXISTS trig_pa_point_account_00_ai;DELIMITER $$CREATE    TRIGGER `froadpoints`.`trig_pa_point_account_00_ai` AFTER INSERT    ON `froadpoints`.`pa_point_account_00`    FOR EACH ROW BEGIN            INSERT INTO `froadpoints`.`pa_point_account_all`(    ...
/** * f-road.com Inc. * Copyright (c) 2014 All Rights Reserved. */package cn.com.froad.thread;import java.util.concurrent.CountDownLatch;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;/** * <pre> *  积分池加计数器使用 * </pre> * * @author xueyunlong * @create 2 ...
    CountDownLatch的介绍和使用 本文由包小卷发表于2年前 | Java基础 | 评论数 2 |  被围观 11,494 views+ 1、类介绍 java.util.concurrent 类 CountDownLatch java.lang.Object java.util.concurrent.CountDownLatch 一个同步辅助类,在完成一组正在其他线程中执行的操作之前,它允许一个或多个线程一直等待。 用给定的计数 初始化 CountDownLatch。由于调用了 countDown() 方法,所以在当前计数到达零之前,await ...

mysql 增加列

alter table froadpoints.points_withdraw_audit  add column taxation varchar(32) DEFAULT NULL COMMENT '税费' after fee;   mysql修改表名,列名,列类型,添加表列,删除表列 修改表名(设表明为testtable,将其命名为newtablename) alter table  testtable rename newtablename; 添加表列: alter table testtable add  column name varchar(40); 删除列: a ...
 破解   1.  把loadrunner相关程序全部退出;   2.  用LR8.0中的mlr5lprg.dll、lm70.dll覆盖LR9.5安装目录下“bin”文件夹中的对应文件;一般是C:\Program Files\Mercury\LoadRunner\bin.或 E:\Program Files (x86)\HP\LoadRunner\bin\tulip\bin 先用替换两个文件 lm70.dll文件,覆盖x:\Program Files\Mercury\LoadRunner\bin下文件即可。   mlr5lprg.dll文件,分别要覆盖以下两个文件夹:    x ...
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns:aop="http://www.springframework.org/schema/aop"    xmlns:tx="http://www.s ...
show full processlist SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Query'  order by time desc   找出运行时间超过10秒的process的ID。SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Query' AND TIME > 10;
    nohup java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -DPROJECTDIR=/usr/local/tomcat/froad_points -cp /usr/local/tomcat/froad_points/lib/spring-tx-3.0.6.RELEASE.jar:/usr/local/tomcat/froad_points/lib/spring-aop-3.0.6.RELEASE.jar:/usr/local/tomcat/froad_points/froad-Points-0.0.1.jar com.froad.points ...

mybatis in

<select id="selectAccountByPKeysAndOtherCondition" resultType="AccountEntity"     resultMap="accountResultMap">          select 'false' as QUERYID,        <include refid="Base_Column_List" />        from points_account         where status=#{status} ...

测试并发 锁表

  先锁定 lock tables froadpoints.points_account read 发多个请求解锁 unlock tables 事务处理方法用事务加数据库锁处理。   查看死锁语句   show engine innodb status LOCK TABLES `t_account_info` WRITE; INSERT INTO `t_account_info` VALUES UNLOCK TABLES;  
Global site tag (gtag.js) - Google Analytics