1 using System; 2 public class PrimeFilter{ 3 public static void Main( string [] args ){ 4 int N = 100; 5 bool [] a = new bool[N+1]; 6 for( int i=2; i... ...
分类:
其他好文 时间:
2017-03-11 22:00:06
阅读次数:
119
一 RabbitMQ的介绍 RabbitMQ是消息中间件的一种,消息中间件即分布式系统中完成消息的发送和接收的基础软件.这些软件有很多,包括ActiveMQ(apache公司的),RocketMQ(阿里巴巴公司的,现已经转让给apache). 消息中间件的工作过程可以用生产者消费者模型来表示.即,生 ...
分类:
编程语言 时间:
2017-03-11 18:35:18
阅读次数:
506
Enumeration 接口是 Iterator 迭代器的古老版本(一般不用,作了解)public class TestEnumeration { public static void main(String[] args) { Enumeration enu = new StringTokeniz... ...
分类:
编程语言 时间:
2017-03-11 18:30:45
阅读次数:
157
在C11的新特性中,新增加了宏定义 __func__ 用来描述直接得到当函数的名称。 如: const char* hello() {return __func__;} //返回hello. 也可作为初始化参数传递如: struct TestStruct { TestStruct (): name( ...
分类:
编程语言 时间:
2017-03-10 23:38:32
阅读次数:
205
1.radiobuttonlist 通过RepeatDirection属性控制改控件的显示方向是纵向还是横向。 2.radiobuttonlist有一个重要的时间叫OnSelectedIndexChanged事件,该事件必须配合着属性AutoPostBack使用。 3.应用: 首先可以将前台代码上面 ...
分类:
Web程序 时间:
2017-03-10 17:56:12
阅读次数:
219
生产者和消费者模型,是多线程中的典型模型,这里使用Java完成该模型 ServerTest.java 生产者代码 ClientTest.java 消费者代码 ModelClient.java 测试模型代码 测试结果: ...
分类:
编程语言 时间:
2017-03-10 17:35:16
阅读次数:
177
最近遇到一个棘手的问题,微信公众平台的前端站点session老是丢失,我们是走的微信网页授权,授权后获取用户openid,丢失后没有openid后续的操作全白搭了,因为没了openid只能判断为客户不是在微信端访问进行提示, 然后接连收到客服中心回馈问题,不过全是安卓客户端的ios的完全没有(真邪门 ...
分类:
其他好文 时间:
2017-03-10 17:31:45
阅读次数:
395
import java.util.Scanner; public class Sizeyunsun { public static void main(String args[]){ System.out.println("请输入您想要的题的数量"); Scanner input = new Sca ...
分类:
其他好文 时间:
2017-03-10 16:47:45
阅读次数:
173
1 import java.text.SimpleDateFormat; 2 import java.util.Calendar; 3 import java.util.Scanner; 4 5 public class MyDate { 6 public static String nextdat... ...
分类:
其他好文 时间:
2017-03-10 14:59:56
阅读次数:
160
public static void main(String[] args) { int b; for (int i = 0; i <= 300; i++) { int a = (int) (Math.random() * 100); b = (int) (Math.random() * 100); ...
分类:
其他好文 时间:
2017-03-10 13:09:07
阅读次数:
112