private void btnQUEUE_Click(object sender, EventArgs e) //QUEUE BUTTON { //Declaring a new instance of Queue and displaying properties to the Windows Form Queue1 queue = new Queue1(); richTextBox2.AppendText(queue.AccessTime + " "); richTextBox2.AppendText(queue.SearchTime + "\n"); richTextBox2.AppendText(queue.InsertTime + " "); richTextBox2.AppendText(queue.DeleteTime + "\n"); richTextBox2.AppendText(queue.SpaceComplexity + "\n"); richTextBox2.AppendText("*All Big-O values represent worst-case scenarios unless otherwise noted"); //Displaying the Advantages and Disadvantages of Queue to the Windows Form richTextBox1.AppendText("QUEUE: \n"); richTextBox1.AppendText(queue.Advantages("A queue deals with temporary data elegantly, " + "and it is like a stack in that it is an array with restrictions. " + "A queue implements FIFO (First-in first-out) ordering. It uses the following operations:\n" + " -add(item): Add an item to the end of the list.\n" + " -remove(): Remove the first item in the list.\n" + " -peek(): Return the top of the queue. \n" + " -isEmpty(): Return true if and only if the queue is empty.\n" + "A queue can also be implemented with a linked list. In fact, they are essentially " + "the same thing, as long as items are added and removed from opposite sides.Queues are " + "often used in breadth - first search or in implementing a cache.")); richTextBox1.AppendText("\n\n"); richTextBox1.AppendText(queue.Disadvantages("The disadvantages of Queues: \n" + " -A queue is not readily searchable.\n" + " -Adding or deleting from the middle of the queue is complex as well.\n")); //Displaying extra notes from a rich text file in the bin using (StreamReader Reader = new StreamReader(@"C:\Users\Clayt\source\repos\CSC205\CSC205_StudyProject\CSC205_StudyProject\bin\Queue.rtf")) { while (!Reader.EndOfStream) { richTextBox5.AppendText(Reader.ReadLine()); } } }
public StorageService() { CloudStorageAccount storageAccount = CloudStorageAccount.Parse(@"DefaultEndpointsProtocol=https;AccountName=tymko;AccountKey=jj/AT7NPx6l5Oms+PLvrMkyM6YM6zI8hBTML78yTVwHqzQIcxxvR4XdmcZtVucRNppSERij/HEkSCjLsTgyJUg==;EndpointSuffix=core.windows.net"); //CloudStorageAccount storageAccount = CloudStorageAccount.Parse(@"DefaultEndpointsProtocol=https;AccountName=itstep1511gen;AccountKey=dRV5C8hAj+QpKYW+7My5xzpd1C5ZLSmWs6Wgnj/sQnaUR670ofKPcOFOXs7EEh0GUyXgrnHgpPFUqKeBBhYkhA==;BlobEndpoint=https://itstep1511gen.blob.core.windows.net/;QueueEndpoint=https://itstep1511gen.queue.core.windows.net/;TableEndpoint=https://itstep1511gen.table.core.windows.net/;FileEndpoint=https://itstep1511gen.file.core.windows.net/;"); #if CONSUMER CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient(); Queue1 = queueClient.GetQueueReference("queue1"); var queueCreationTask = Queue1.CreateIfNotExistsAsync(); #endif CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); Table1 = tableClient.GetTableReference("table1"); var tableCreationTask = Table1.CreateIfNotExistsAsync(); Task.WaitAll( #if CONSUMER queueCreationTask, #endif tableCreationTask); ConditionalMethod(); }
public override int GetHashCode() { return(HashCode.Combine(Queue1.GetHashCode(), Queue2.GetHashCode())); }