[Description] A queue is a collection that implements the first-in-first-out protocal. This means that the only accessiable object in the collection in the first one that was inserted. The most common example of a queue is a waiting line. [Interface]…
[Description] At ree is a nonlinear data structure that models a hierarchical organization. The characteristic eatures are that each element may have several successors (called its "children") and every element except one (called the "root&…
Statements: This blog was written by me, but most of content  is quoted from book[Data Structure with Java Hubbard] [Description] This simulationillustrates objectoriented programming(OOP). Java objects are instantiated to represent all the interacti…
The Java Connections FrameWork is a group of class or method and interfacs in the java.util package. Its main purpose is to provide a unified framework for implementing common data structure. A collections is a object that contains other objects,whic…
In an attempt to remove duplicate elements from list, I go to the lengths to take advantage of  methods in the java api. After investiagting the document of java api, the result is so satisfying that I speak hightly of wisdom of developer of java lan…
threading python程序默认是单线程的,也就是说在前一句语句执行完之前后面的语句不能继续执行(不知道我理解得对不对) 先感受一下线程,一般情况下: def testa(): sleep(1) print "a" def testb(): sleep(1) print "b" testa() testb() #先隔出一秒打印出a,再过一秒打出b 但是如果用了threading的话: ta = threading.Thread(target=testa) t…
简单的FIFO队列实现,非线程安全! 1.queue.h : abstract data type queue #ifndef CUR_QUEUE_H #define CUR_QUEUE_H #include<stdlib.h> struct node{ int value; struct node * next; }; typedef struct queue{ int max,cur; struct node * head, * tail; }queue; extern queue* em…
http://blog.xcodev.com/blog/2013/10/28/operation-queue-intro/ 随着移动设备的更新换代,移动设备的性能也不断提高,现在流行的CPU已经进入双核.甚至四核时代.如何充分发挥这些CPU的性能,会变得越来越重要.在iOS中如果想要充分利用多核心CPU的优势,就要采用并发编程,提高CPU的利用率.iOS中并发编程中主要有2种方式Operation Queue和GCD(Grand Central Dispatch).下面就来先来说一下Operat…
<?xml version="1.0" ?> <project default="test"> <description> description element and attribute <!--description单词勿拼错--> </description> <target name="test" description="demo description el…
进程queue底层用线程传输数据 import threading import multiprocessing def main(): queue = multiprocessing.Queue() print(threading.active_count()) queue.put('start thread') print(threading.active_count()) if __name__ == '__main__': main() # 1 # 2…