`
someoneneedsme
  • 浏览: 4833 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
1.页面显示中文乱码 <%page pageEncoding="utf-8"%> 2.传递中文参数乱码 修改server.xml <Connector port="8080" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000"   redirectPort="8443" URIEncoding="UTF-8"/>
<html> <head> <title> </title> <script type="text/javascript"> function move() { var fDiv = document.getElementById("d1"); var xpos = parseInt(fDiv.style.left); xpos+=50; fDiv.style.left = xpos+"px"; } </script& ...
线程1 打印  abcdef 线程2 打印  1234 让线程1,2轮流执行 打印出a1b2c3d4ef public class TwoThreadTakeTurnsToExecute { public static void main(String[] args) { Task task = new Task(); new MyThread<String>(1, task).start(); new MyThread<Integer>(2, task).start(); } } class MyThread<E&g ...
本帖最后由 kamanda 于 2012-7-30 09:32 编辑 如题 已知结果集如下(与实际nba数据不符请见谅,只为了测试用)        TEAM    YEAR 1    活塞    1990 2    公牛    1991 3    公牛    1992 4    公牛    1993 5    火箭    1994 6    火箭    1995 7    公牛    1996 8    公牛    1997 9    公牛    1998 10    马刺    1999 11    湖人    2000 12    湖人    2001 13    湖人    2002 ...
输出 * ** *** **** ***** **** *** ** * public class PrintAsterisk { public static void main(String[] args) { print(1); } public static void printAsteriskInline(int number){ for (int i = 0; i <number; i++) { System.out.print("*"); } System.out.println(); } ...
public class DD { public static void main(String[] args) { new Carrier(2); } } class Carrier{ public static C c1 = new C(1); public C c2 = new C(3); public Carrier(int number) { new C(number); } } class C{ public C(int number){ System.out.println(num ...
package com.jibx_maven; import java.util.Random; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class SingleThreadExecutor { public static void main(String[] args) { ExecutorService executorService = Executors.newSingleThreadExecutor(); ...
package com.jibx_maven; import java.util.Random; import java.util.concurrent.CountDownLatch; /** * * <li>The first is a start signal that prevents any worker from proceeding until the driver is ready for them to proceed; </li> *<li>The second is a completion signal tha ...
package com.jibx_maven; import java.util.Random; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; public class BarrierTest { public static void main(String[] args) { CyclicBarrier barrier = new CyclicBarrier(4, new Runnable() { @Over ...
Global site tag (gtag.js) - Google Analytics