* using System;
* using System.Collections.Generic;
* using System.Linq;
* using System.Text;
* using System.Threading;
*
* namespace  aggregate
* {
*     class  queue
*     {
*         public static void Main()
*         { 
*             // queue :  A collection of elements processed in a first in, first out fashion (FIFO-First In First Out) First , First roll
*             // example : Aircraft registration queue , The first one is going to fly , But the queue has priority , Such as business warehouse team and economic warehouse team , It's two different teams , Business first
*             
// stay .Net In technology ,      using System.Collections.Generic.Queue<T> Is a generic version implementation of queues
*             // System.Collections.Queue Implementation of yes no generics , Parameter is Object
*             
//public class Queue<T> : IEnumerable<T>, ICollection, IEnumerable
*             
// As can be seen from the definition of queue , It has realized the decline of generations , Collection interface  , It doesn't work ICollection<T> This interface , Because it defines Add Remove Method will destroy the queue
*             // The main difference between queues and lists is that , It doesn't work IList Interface
*             
// therefore , Queue cannot be accessed with indexer , Queues only allow elements to be added , This element can only be placed at the end of the queue (Enqueue()), And take the elements from the beginning Dequeue()
*             
//Enqueue Insert elements from the back of the queue , and  Dequeue While taking an element , Elements removed before the meeting , If it is called again , Delete the next element
*             
*             // Method introduction  :
*             // Enqueue()  Insert element at one end
*             
// Dequeue()  Read and delete an element from the header , If a method is called , No elements in queue , Planing out InvalidOperationException abnormal
*             // Peek()  Reading an element in the queue header , however , Don't delete it
*             // Count  Number of return queue elements
*             
// TrimExcess()  Reset queue capacity ,Dequeue method , It is possible to delete an object , however , No capacity reset , This wastes free space  , This method , Clear empty space from head
*             // Contains()  Determine if an element is in the queue , If it is , return true
*             // CopyTo()  Copy elements from the queue to an existing array  
*             // ToArray()  Returns a new array containing queue elements
*
*             //  Let's start with an example of a queue ,  Use a thread to add documents to the queue , Read queue with another thread , And deal with them
*             
//  The type of storage queue is Document, Let's define a document class first , Then define a document processing class DocumentManager, It includes adding and reading methods , There is also a property to determine if the queue is empty
*             //  Then we define a  ProcessDocuments To process threads , Operation documents
*            
*             DocumentManager mg = new DocumentManager();
*             ProcessDocuments prcess = new ProcessDocuments( mg );
*             // Start read thread , But there's no content right now , After joining , You can read it
*             ProcessDocuments.Start(mg);
*
*             Document doc = null;
*
*             for (int i = 0; i < 500; i++)
*             {
*                 doc = new Document("Aladdin:" + i, "Hello,Nihao!");
*                 mg.AddDocument( doc );
*                 // Sleep , Let other threads play
*                 //Thread.Sleep(20);
*             }
*
*             Console.ReadLine();
*         }
*     }
*     
*     //  Document class , Describes the title and content of the document
*     class Document
*     {
*         public string title;
*         public string content;
*
*         public Document(string title, string content)
*         {
*             this.title = title;
*             this.content = content;
*         }
*     }
*
*     class DocumentManager
*     {
*         // Define queue collection
*         private readonly Queue<Document> docQueue = new Queue<Document>();
*         
*         // Add document
*         public void AddDocument(Document doc)
*         {
*             lock (this)
*             {
*                 // Insert content from one end of the queue
*                 docQueue.Enqueue(doc);
*                 Console.WriteLine( " Successfully inserted document :" + doc.title);
*             }
*         }
*         
*         // Read document
*         public Document GetDocument()
*         {
*             Document doc = null;
*
*             lock (this)
*             {
*                 doc = docQueue.Dequeue();
*                 return doc;
*             }
*         }
*
*         // Read only properties , Determine if there are any elements in the queue
*         public bool IsDocumentAvailable
*         {
*             get
*             {
*                 return docQueue.Count > 0;
*             }
*         }
*     }
*
*     //  work with documents
*     class ProcessDocuments
*     {
*         private DocumentManager dm;
*
*         public ProcessDocuments( DocumentManager dm )
*         {
*             this.dm = dm;
*         }
*
*         public static void Start(DocumentManager manager)
*         { 
*             //  parameter  : public delegate void ThreadStart();
*             new Thread(new ProcessDocuments(manager).DoThreadFunc).Start() ;
*         }
*
*         public void DoThreadFunc()
*         { 
*             // Infinite loop read , As long as there is content in the queue , This thread reads
*
*             while (true)
*             {
*                 if (this.dm.IsDocumentAvailable)
*                 {
*                     Document doc = this.dm.GetDocument() ;
*                     Console.WriteLine(" Read from queue to read and delete document   title :{0}    content : {1}"
, doc.title, doc.content );
*                 }
*             }
*         }
*     }
* }
*

Technology
©2019-2020 Toolsou All rights reserved,
Paging tool class PageResult The project followed for a year , The customer finally said no el-select At the same time label and value value ELementUI select Multi select drop-down box to get all properties of the selected item mybatis Return result mapping of series ( Essence 2020 year 6 month 3 Daily update ) TypeScript Detailed explanation of Chinese interface 【Python- data fetch 】 read txt Each line of file generates a list of data vue obtain el-select Of the selected item label value Forbes China Auto rich list : He xiaopengdi 11 Li Xiangdi 14 Li Bindi 15 A guess number of small games , use JavaScript realization