`
AAries
  • 浏览: 38949 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论
文章列表
环境搭建好以后。就可以在Ext中调用controller中的方法了。 第一步 页面上的引入 <script type="text/javascript" src="dispatcher/api-debug.js?groupe=reg"></script> 1. dispatcher/api-debug.js中的dispatcherw为web.xml中配置的映射     groupe=reg 为组 用来区分是哪个action的哪个方法 2. 在js文件中需要引入Ext.direct.Manager.addProvider(Ext ...
6.配置ExtDirectSpring的过程: 1. 配置spring3MVC . 需要在web.xml中加入spring的配置信息大致如下: <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </ser ...
    jdk5.0以上的for-each也是利用内部的iterator来遍历集合的(跟以前的iterator一样)获得的Iterator是一个内部类产生的迭代器,这个迭代器在调用next方法时,会检查列表是否被修改过,如果被修改过,就会抛出ConcurrentModificationException异常。     进一步说,当使用 fail-fast iterator 对 Collection 或 Map 进行迭代操作过程中尝试直接修改 Collection / Map 的内容时,即使是在单线程下运行,java.util.ConcurrentModificationException 异常也 ...
引用 public class DataFormatConvertUtil { /** * Static method, a long type data into a byte array of specified length * * @return byte[] */ public static byte[] intToByteArray(long res, int length) { byte[] byteArray = new byte[length]; for (int i = 0; i < byteArray.length; i++) { ...
最近项目分给我一个任务模拟写RTU的客户端程序,和一个产品的用户手册,所以没怎么更新。现在对这 段时间接触到的东西做个总结。 1. 打开页面时显示为下载页面。看到一个同事出这个错误。结果是头文件没写好 <%@page contentType="text/html" pageEncoding="GB2312"%>少了分号。 2. 设置JTable的列数。 DefaultTableModel tableModel = (DefaultTableModel) Table.getModel();         tableModel.setR ...
1.SocketChannel 客户端与 ServerSocketChannel 服务器端通信 2.客户端使用SocketChannel的connect方法连接服务器时,服务器会收到一个可接受的包。建立连接,同时在此时设置下一次的包是可读或是可写等等。 3.如果服务器端指定为可读,而客户端指定为可写,会出异常。反之亦然。 4.如果在服务器端为指定下次接受的包的读写性,则既不会读也不会写。 5.在读buffer前必须flip(); 遍历一个selectionkey集合。 e.g. SocketChannel sk = (SocketChannel)SelectionKey.channe ...
1.服务器端while(true) 一直等待client端来连接。   基本步骤为: ServerSocketChannel server = ServerSocketChannel.open(); server.configureBlocking(false); server.socket().bind(new InetSocketAddress(5200)); Selector select = Selector.open(); server.register(select, Selectio ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package mailclass; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; imp ...
package mailclass; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.nio.channels.SocketChannel; import java.nio.charset.Charset; import java.util.Iterator; /** * * @author AAries zyz! */ ...

Java题

1. public class LastLaugh{ public static void main(String[] args) { System.out.print("H" + "a"); System.out.print('H' + 'a'); } } 注释:开始以为是+号当string处理的考点,就答了HaHa。失策啊。忘记了 + 是String 类重载的方法。当一个String类的对象和另外一个非String类的对象 + 时。非String类的对象会装换成String类对象来处理。所以本题的答案是Ha169。a的ASK码为97,9 ...
package threadpooltest; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package blockingqueuetest; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; import java.util.concurrent.ArrayBlockingQue ...
I am not happy. God bless me. 1.线程。新建一个线程的方法是extends Thread类。重写run方法。或者implements Runable接口。实现run方法。线程的方法: a.void join() //等待终止指定的线程 b.void join(long millis) c.Tread.State getState() d.void setPrority(int new Prority) e.static int MIN_PRIORITY d.static void yield; 2.锁机制。java.util.concurrent.l ...
How are you doing? 比较正式的说法!最近怎么样。 what's happening? 发生了什么事情。 1. comparable<T> :接口。implements comparable接口的话,则必须实现compareTo方法。将这个对象 this与另一个对象进行比较! java.util.Comparator<T> 接口下有一个Compara(T a, T b),将对象a和对 象b进行比较。 2. 队列与双端队列:队列可以有效的在尾部添加一个元素,在头部删除一个元素!有两个断头的队列成为 双端队列! 3.优先级队列PriorityQu& ...
good luck!i hope wyp can love me than I love her! now pratice the english. happiness lies not in the mere possession money, it lies in the joy of achievement, in the thrill of creative effort. hinder:打扰,阻扰。 hinred:继承 genic:泛型,通常。一般 1. Modifier,java语言的 ...
Global site tag (gtag.js) - Google Analytics