WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

Sorting and Searching an ArrayList | Loop and Break

Sorting and Searching an ArrayList

An ArrayList can be sorted by Sort( ). Once sorted, it can be efficiently searched by BinarySearch( ). The following program demonstrates these methods:

Example

using System;
using System.IO;
using System.Collections;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            // Create an array list.
            ArrayList al = new ArrayList();
            // Add elements to the array list.
            al.Add(55);
            al.Add(43);
            al.Add(-4);
            al.Add(88);
            al.Add(3);
            al.Add(19);
            Console.Write("Original contents: ");
            foreach (int i in al)
                Console.Write(i + " ");
            Console.WriteLine("\n");
            // Sort
            al.Sort();
            // Use foreach loop to display the list.
            Console.Write("Contents after sorting: ");
            foreach (int i in al)
                Console.Write(i + " ");
            Console.WriteLine("\n");
            Console.WriteLine("Index of 43 is " +
            al.BinarySearch(43));
            Console.Read();
        }
    }
}
Share

You may also like...