The only printer in the computer science students’ union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs in the printe ...
分类:
其他好文 时间:
2016-03-30 00:09:15
阅读次数:
241
最近在重新整理学习Java的多线程。首先,考虑一下什么时候需要用到多线程。 通常是一些异步处理,后台任务,要尽量使资源最大化使用如CPU,I/O,Printer等等。可以参考以下 http://www.cnblogs.com/kenshinobiy/p/4671314.html 学习tutorial
分类:
编程语言 时间:
2016-03-20 00:45:09
阅读次数:
224
前段时间在知乎上看到了一个打字机的效果,所以,心血来潮,自己也来写了一个打字机的效果。 比较简单,但还有待优化的地方,因为自己感觉这个效果不够炫,等哪天想出好的点子了。再来更新…… 代码效果预览地址:http://code.w3ctech.com/detail/2525 html: 1 <div c
分类:
其他好文 时间:
2016-02-14 23:41:44
阅读次数:
446
package com.btp.t2;/* * 接口应用的举例 */public class TestUSB { public static void main(String[] args) { new Computer().doWork(new Printer()); ...
分类:
编程语言 时间:
2016-01-23 23:16:55
阅读次数:
412
Ancient PrinterTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1511Accepted Submission(s): 748Pro...
分类:
其他好文 时间:
2015-12-09 23:16:18
阅读次数:
203
乍一看这个题好像可以二分优先度搞搞。。。实际上能不能这么搞呢。。。?我反正不会。。。于是开始讲我的乱搞算法:首先肯定要把任务按照优先度排序。用一棵在线建点的线段树维护一个时刻是否在工作。然后就依次插入任务,记为 i,具体而言就是二分其右端点,然后令这整个区间都变成 “工作” 的状态。在 i 被插入之...
分类:
其他好文 时间:
2015-11-29 22:53:50
阅读次数:
324
'; } // some more function below // ...}//这是一个文印处理店,只文印,卖纸,不照相class TextShop{ private $printer; public function __construct(Printer $pr...
分类:
其他好文 时间:
2015-11-26 18:44:46
阅读次数:
87
# -*- coding: utf-8 -*-#python 27#xiaodeng#模块的创建#任何的.py文件都可以被认为是一个模块,在模块的顶层指定的所有变量名都会变成其属性,并可以导出供客户端使用#module1.pydef printer(x): print x'''import m...
分类:
其他好文 时间:
2015-10-27 23:27:15
阅读次数:
222
# -*- coding: utf-8 -*-#python 27#xiaodeng#如何通过from语句调用模块的变量名?#my.pydef printer(x): print x#如何通过from语句调用模块的变量名?#方法一:from my import printer#方法二#from...
分类:
其他好文 时间:
2015-10-27 23:19:10
阅读次数:
122
OAuth协议致力于使网站和应用程序(统称为消费方)能够在无须用户透露其认证证书的情况下,通过API访问某个web服务(统称为服务提供方)的受保护资源。更一般地说,OAuth为API认证提供了一个可自由实现且通用的方法。 一个典型的例子是某打印服务提供商printer.example.com(消费方...
分类:
其他好文 时间:
2015-10-15 14:31:13
阅读次数:
228