摘要:
$( "#members li a" ).bind( "click", function( e ) {} ); $( document ).live( "click", "#members li a", function( e ) {} ); $("#info_table").delegate("td","click",function(){/*显示更多信息*/}); $("table").f... 阅读全文
摘要:
安装配置 将其bin目录添加到path ssh -keygen -t rsa -C 自己的邮箱(获取ssh远程连接秘钥) 使用: 进入项目目录 右击进入git bash 执行git init github上new一个新仓库复制生成的例如:git@github.com:qinyios/mygitproject.git 然后执行git remote add origin git@githu... 阅读全文
摘要:
创建线程方法1、 class mythread extends Thread{ 重写run方法 } mythread m=new mythread () 启动:m.start() 创建线程方法2、 class mythread implements Runnable{ 重写run方法 } mythread m=new mythread () Thread t=new Th... 阅读全文
摘要:
可见性 一个线程对共享变量的修改 能够被其他线程看到 共享数据的访问权限都必须定义为private —————————————————————————————————————— ---工作内存1(拷贝x的副本)--线程1 主内存(共享变量x存放) ---工作内存2(拷贝x的副本)--线程2 —————————————————————————————————————— sync... 阅读全文
摘要:
1)SingleThreadExecutor:单个后台线程 (其缓冲队列是无界的) public static ExecutorService newSingleThreadExecutor() { return new FinalizableDelegatedExecutorService ( new ThreadPoolExecutor(1, 1, ... 阅读全文
摘要:
(1)Callable接口更像是Runnable接口的增强版,相比较Runable接口,Call()方法新增捕获和抛出异常的功能;Call()方法可以返回值 (2)Future接口提供了一个实现类FutureTask实现类,FutureTaks类用来保存Call()方法的返回值,并作为Thread类的target。 (3)调用FutureTask的get()方法来获取返回值 import j... 阅读全文