-
public class Server extends Thread { Client client int counter public Server(Cli...
public class Server extends Thread { Client client int counter public Server(Client _client) { this.client = _client this.counter = 0 } public void run() { while (counter < 10) { this.client.queue.addElement(new Integer(counter)) counter++ } throw new RuntimeException("counter >= 10") } public static void main(String[] args) { Client c = new Client() Server s = new Server(c) c.start() s.start() } } class Client extends Thread { Vector queue public Client() { this.queue = new Vector() } public void run() { while (true) { if (! (queue.size() == 0)) { processNextElement() } } } private void processNextElement() { Object next = queue.elementAt(0) queue.removeElementAt(0) System.out.println(next)-public class Server extends Thread { Client client int counter public Server(Client _client) { this.client = _client this.counter = 0 } public void run() { while (counter lt; 10) { this.client.queue.addElement(new Integer(counter)) counter++ } throw new RuntimeException("counter gt;= 10") } p
- 2022-02-21 05:44:37下载
- 积分:1
-
CHyperlink:
如果想在C++编写的Windows程序中实现hyperlink,试一试这个类吧,只需要几行代码就可以实现超链接控制,可以启动浏览器和...
CHyperlink:
如果想在C++编写的Windows程序中实现hyperlink,试一试这个类吧,只需要几行代码就可以实现超链接控制,可以启动浏览器和电子邮件的客户端程序。其他特性包括:设置前景色,设置背景色,设置高亮色,设置字体,设置字体大小,定制光标,透明效果等-CHyperlink : If you want to prepare for Windows C procedures to achieve hyperlink, to test this type bar, need only a few lines of code can be achieved hyperlink control, can be activated browser and e-mail client program. Other features include : Setting up the foreground color, background color set, set high Luminance, installed fonts, font sizes set up, customized cursor. transparent effects
- 2022-06-22 05:26:03下载
- 积分:1
-
在该..x
嗨
hi im kyk..x
your mname ooxos is oosuchecking your files
- 2022-02-15 01:57:01下载
- 积分:1
-
冰点网吧p tkh这种玩家会死人的。。。知道不。 管理员救命啊。...
冰点网吧p tkh这种玩家会死人的。。。知道不。 管理员救命啊。-cafes p frozen tkh such players will be dead. . . Do not know. Administrators save ah.
- 2022-01-31 22:09:16下载
- 积分:1
-
CStatic文本的外观
首先在单击1行中调用CTestWindow::Create函数。它是CFrameWnd对象的Create函数,因为CTestWin...
CStatic文本的外观
首先在单击1行中调用CTestWindow::Create函数。它是CFrameWnd对象的Create函数,因为CTestWindow从CFrameWnd继承了其行为。所以第一行中的代码指定了窗口大小应该为200×200个象素,窗口的左上角被初始化在屏幕的0,0位置处。常数rectDefault可用CRect参数来替代。-CStatic text the appearance of the first line in one click call CTestWindow:: Create function. It is a CFrameWnd object Create function, because CTestWindow inherited from CFrameWnd their behavior. So the first line of code specifies the window size should be 200 × 200 pixel, the window has been initialized in the upper left corner of the screen position 0,0. CRect parameter rectDefault constants can be used as substitutes.
- 2023-06-06 03:15:03下载
- 积分:1
-
一个滚动的文字类的例子,推荐下载
一个滚动的文字类的例子,推荐下载--A class of rolling fonts, recommend download
- 2022-02-10 10:22:12下载
- 积分:1
-
算法――分离集合的实现
算法――分离集合的实现-algorithm-- the realization of separation pool
- 2022-08-16 21:28:16下载
- 积分:1
-
模拟液晶显示时钟
模拟液晶显示时钟-analog LCD Clock
- 2022-02-25 14:11:30下载
- 积分:1
-
用HOOK DLL查看下的密码
用HOOK DLL查看下的密码-with HOOK View DLL under the password
- 2022-03-24 12:06:25下载
- 积分:1
-
two timer first timer in the window to retain a clock running when the clock alw...
两个计时器第一个计时器在窗口中保留一个时钟,程序运行时该时钟始终运行。另外一个计时器可配成用户指定的时间间隔触发。-two timer first timer in the window to retain a clock running when the clock always running. Another timer can be dubbed a user-specified time interval trigger.
- 2022-03-18 02:15:38下载
- 积分:1