Rotating Through Alphabetical List - In Order

Maybe I haven't had enough coffee or I'm just tired from
getting up in the middle of the night for my 1 year old, teething
daughter, but I just can't seem to think of a simple way to rotate
through a list in order. Here's what I'm trying to do... I have an
alphabetical list of companies displayed on my site (advertisers).
The companies at the bottom of the list are getting annoyed that
they're always at the bottom. So, I want to make the list of
companies start at a new position each time (in order). So, it
would start outputting in this order: a-z, then coufput "b-z" /
cfoutput "a" (two cfoutputs), then "c-z" / "a-b", etc.. But, I
don't want it to start at a-z for each new visitor to the page, I
want it to remember the last display, say d-z / a-c and start with
e-z for the next visitor.
One of my ideas relate to saving a variable in the database
each time the page is viewed and doing a plus one to figure out the
starting position. And, when it gets to the total number of records
in the list starting back to 1. Isn't that too complicated. What am
I forgetting?
Hopefully, someone can help me. Maybe I'll go get another cup
of coffee and see if that helps....

Assuming your list of names comes from a db, there is another
approach. If your db supports it, get the minimum length of the
company name (trimmed of course) each time you run the query. Then
generate a random number between 1 and that value. Let's call it n.
Sort your query by the nth character. That should make it different
each time.

Similar Messages

  • Convert menu list to alphabetical or numbered (ordered) menu

    I'm working with a catalog site with a flyout navigation menu.  Things have been entered in the order they appear in the catalog.  Is there an easy way to sort these listing alphabetically and numerically?  I know about the up and down arrows but was hoping there was a quicker way.

    Once the items are in the menu list, I am unaware of a quick and easy way to sort them (or rearrange them) other than the up and down arrows.
    You could, of course, go into Code View and drag the list items around physically in code, but I am not aware of any kind of "automatic" list re-ordering system.
    If your menus are quite extensive, and you don't want to do the sort 'one at a time,' you could copy each list (in code view) to a separate file, put it in a table, and sort it there in Design View. You could probably work out "find and replace" combos that would make the translation from list to table and back again easier, but again, it's not a one-button solution to sorting a menu.
    Beth

  • I keep track of family totals for fundraising at a school, I want a family name and totals for each fundraiser and then at the end of the year I would like an alphabetized list.  Can I do this in numbers?

    in numbers, how would I make a line for each family (100+)  a column for each fundraiser. and at mid year, and year end be able to print an alphabetical listing?
    example:     entertainment books          Chip Shoppe       Yankee Candle
    Smith          $350                                   $245                    $100
    Total at the end of the line, but I could live without.  I am just trying to lose the paperwork, and have it in the ipad for when parents approach me at meetings.
    Help!

    HI m,
    Using Numbers '09 (the Mac version), I'd use a table with one header row and two header columns.
    Family     Total     Ent.Books     Chip S.     Y. Candle
    Smith, J      $695        350            245             100
    Jones, T      $765        250            445               70
    An ascending sort on column A will put the families in alphabetical order (and carry the rest of the row along with them).
    The formula =SUM(2) in B2, and filled down from there, keeps the total for each family right beside the family name.
    You could add a Footer row at the bottom to keep totals for each column. Formula for column B: =SUM(B)
    I would leave the currency signs ($) off the amounts—they just clutter up the table.
    This assumes that the features listed are all supported on Numbers for iOS, the version running on your iPad.
    Regards,
    Barry

  • How can I sort the words in a document into an alphabetical list?

    How can I sort the words in a document into an alphabetical list? Thanks!

    writer888 wrote:
    How can I sort the words in a document into an alphabetical list? Thanks!
    Copy the words to the Mac's clipboard (Edit menu> Copy)
    Paste into TextEdit 
    Next open the Edit > Find > Find window in Text Edit.
    Highlight a space between two words and Edit menu > copy, paste into the Find field
    Next create a return in the middle of your text and copy that and paste into the Replace field
    Click Replace All.
    Now Edit > Select All and Edit > Copy
    Open a Spreadsheet program with Sort ability and paste into the second column cell from the top
    place a "a" into the top column cell, select the entire colum
    Sort desending order
    Now if you need it out of spreadsheet format, then your going to need to copy just the data cells (not the entire column to avoid problems) and Paste "Special" as unformatted text into a word processing program
    If you need to get rid of the Returns, do the opposite you did in Text Edit, replace the Returns with Spaces
    A chore, but it's rare one needs to sort words into alaphabetical order.
    FYI, I used TextEdit and the free LibreOffice (Spreadsheet and Word Processing) for the above effects.

  • List View order

    What dictates the order of list view items after the chosen one?
    I use labels (colors) for the primary list view order, the secondary order appear to be reverse alphabetical.
    I want the secondary order to be normal alphabetical.
    Can I set his somehow?

    HI,
    In the Finder window in List view at the top you will see: Name / Modified / Size etc...
    Click Name. You can toggle back and forth.
    Carolyn

  • Step Through a List of .p12 Certificates and Their Passwords to Extract Property Data

    This is a follow-up question to my previous thread:
    http://social.technet.microsoft.com/Forums/en-US/58ca3098-e06d-419a-9465-1ae7973e1c04/extract-p12-property-information-via-powershell?forum=ITCG
    I understand how to extract the information for a certificate one-by-one, but I am wanting to write a powershell script that will step through a list of certificates and a list of their corresponding network passwords in order to extract their property
    data (i.e. expiration date, etc). Any suggestions?
    jrv helped me with the first part of my question by providing this script:
    PS C:\> $filename='c:\temp2\certs\jpd.cer'
    PS C:\> $cert=[System.Security.Cryptography.X509Certificates.X509Certificate2]::CreateFromSignedFile($filename)
    PS C:\scripts> $cert|fl
    Happy Hunting!

    HINT:
    dir *.cer | %{ [System.Security.Cryptography.X509Certificates.X509Certificate2]::CreateFromSignedFile($_)}
    ¯\_(ツ)_/¯

  • Alphabetic Listing of Songs

    How do I list the songs in iTunes in the normal alphabetical listing?
    As they are lsited now, included in the list of all song names starting with "A" would be song names like "The Apple" or "The Archies".
    How would I change the listing to have "The Apple" and "The Archies" under song names starting with "T"?

    This sorting issue was the source of much frustration for myself for a long time as I wanted the albums on my iPod to show up in the order that they were released, not alphabeticaly. (yeah I'm anal!)Easy enough task in iTunes, but difficult on your iPod.The way I did it was to go into the sort menu of the first song of an album and under 'album name' insert the year of release BEFORE the title. eg, 1983 Texas Flood. (And here is where it relates to you,) The next step is to select the entire album, right click, and instead of selecting 'get info', click on 'apply sort field'. Another drop box appears,you then click on whichever is appropriate, in my case, 'same album'. The same technique can be used to sort artists. In this example, under 'sort artist name',I entered 'Vaughn Stevie Ray', he is now listed under V instead of S. You can do all the sort changes you like for an album in one hit and when you click on 'apply sort field', select the option 'all matching fields'. You can sort the artist name on all of the albums by one artist in one hit using this method, just be sure to only choose the 'same artist' option when doing it or you'll stuff up album titles as well. Also be aware that when applying sort fields to multple tracks, that the track at the top of the list is dominate and all those below will be made to match it. If you sort the artist by their surname and it begins with a letter that is closer to Z than their first name is, eg: Ben Harper, the first track you change will drop below the rest (if your library is set to display albums by artist)because it is now by Harper Ben, not Ben Harper. To combat this you will need to go to the column heading where it says 'album by artist' and click on it. This should reverse the order and put the newly altered track back at the top where you need it.(Hint It helps to isolate artists or albums you are sorting by locating them via the search menu in the top right hand corner of your library before you start, so you don't have your entire library jumping all over the place at once.) Good luck, hours of 'fun',I can assure you.

  • Mailbox Alphabetical Listing Not Working

    In the past, when I would create a new email Mailbox, it would line up alphabetically with the existing Mailboxes.  Now when I create a new Mailbox, it shows up at the bottom of the existing list. How do I make the new ones become part of the alphabetical list?

    I don't want a workaround either. I went to the Apple Store, and the Genius said there is no solution to this right now and to post feedback on apple.com. There may be a complex solution, but I wanted a simple one (i.e., defaulting to sort the mailboxes in ascending order, alphabetically). For now, you'll have to drag them into the right order. Or you could switch to a third-party email client (Thunderbird) or a web app (gmail or Google Inbox).
    I use Google Inbox in beta, and it's working great! I'll send you an invite, if you like. I think web apps for mail are where we are going in the future of email management.
    I've applied for an AppleCare representative position. See how good I could be? :-)

  • Text is not being displayed in sync on a label when looping through a list -- how to fix?

    I have a list of states (50 states).  I loop through this list (in a winform app -- VS2012) and want to display the current state ID that is being processed in the loop in the text property of a label.  I precede the label.Text = StateID line with
    Application.DoEvents() but I am also (in Debug mode) writing the same text to the console.  The console displays correctly, but there appears to be a lag in the label.Text property
    List<string> StateList = new List<string> { "al", "ak", "az","ar","ca","co","ct","de","fl","ga",...};
    foreach (string stateID in StateList)
        Application.DoEvents();
        lblStateID.Text = "State is " + stateID;  //--there is a lag here
    I vaguely recollect something about a NotifyPropertyChanged event.  I know this is common in WPF, but is there something similar in winform?  Or is there a way to make the desired text to be displayed in the label.Text property in synchronization
    with the loop?
    Rich P

    Thank you.  This is way simpler than implementing the INotifyPropertyChanged Interface.  Although, here is an article on the INotifyPropertyChanged Interface and event
    http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
    Rich P

  • Break Up of Actual Costs in a report for list of orders

    Hi All,
    SAP standard reports displays only the total planned & total actual costs.
    Is there any standard report available which can display break up of planned & actual costs along with total costs, for list of orders (e.g: time, material and external resources consumption).
    Thanks in advance
    JK

    hi
    you can find the material cost,external service etc in the standard cost report itself select the change layout and select the items you want to display ,you can get the result
    regards
    thyagarajan

  • Report  showing list of order confirmations and open/close reservations?

    Hi
    Can we have any standard report having list of  order confirmations and open/close reservations in SAP PM ?
    Regards
    Pooja

    Hi Pooja,
    Try IW12, Display Document flow, if you are looking for a combined report of Order confirmations and Material status.There are various other reports related to order confirmations and Material status seperately. For material status you can use IWBK.
    Better place to post PM questions is in Enterprise Asset management Forum.
    Warm regards,
    Srinivas Potluri

  • List of orders with Dangerous goods error

    Hi All,
    How can I find the list of orders which are incomplete due to Dangerous goods checks. Is there any table available for that.
    Another thing, for testing, I need to create a Sales order with Dangerous goods check error. So I have selected a material for which is maintained in DGP1.
    Also I have selected a Order type which is maintained in table TDGB9. But still the sales order doesn't have Dangerous goods block.
    How to create a sales order with Dangerous goods check error.
    Kindly clarify.
    Regards,
    Raja Durai

    Hi All,
    Any hints for the post?
    Kindly provide.
    Regards,
    Raja Durai

  • How to list Sales Order with credit block

    Hi, Gurus,
    I really don't know how to list sales orders with credit block?
    Is there any way for end user to do it?
    If so, is it possible to list SO with credit block for certain period of time such as one month?
    Any help would be appreciated.

    HI
    Check T-Code VKM2 (Released documents)
    You need to check VKM1 (Blocked Documents)
    Sorry before i gave wrong information , myself i corrected VKM2 for released not for blocked list (Due to non Availability of SAP access )
    Regards,
    Prasanna
    Edited by: prasanna_sap on Feb 7, 2012 7:12 AM

  • How to get list of orders for current date.

    Hi,
    My requirement is to get list of orders for the date on which order was created such that I don't have to change the date in my application.
    Every time I run my application it should generate orders created on that current date without manually giving current date.
    This has to be done directly using BAPI and without creating a RFC. 
    I tried with bapi " BAPI_ALM_ORDERHEAD_GET_LIST " using parameter OPTIONS_FOR_START_DATE  but there I can't enter sy-datum and hence, every time I hence to change the date.
    Please tell me if there is any possible way to get fulfil above requirement.
    Thanks.
    Shilpi Agarwal.

    Hi Shilpi,
    This looks simple to me.
    Just create a variant in IW38 with U_your UserId as shown in the picture (Dynamic date selection for Created On set to Current Date)
    The status settings obviously would be
    Jogeswara Rao K

  • Address book - mailing list - sorting order of names

    Generally difficult to edit mailing lists - alter order of names in the list - add email/names in middle of list - drop names from list - copy parts of list to another list - how can you edit a mailing list?

    1 at a time? I don't think so.
    Here is a bonus lesson in selecting multiple items.
    select item 1. Press control+a to select all
    select item1. move up or down several items and hold the shift key while clicking item 2. This selects items 1 and 2 and all items in between.
    hold the control key while clicking random items. This selects any item that is clicked on.
    hold the control key while clicking a selected item. This will deselect that item.
    You cannot drag and drop from a list though. This will only work in the address book itself.
    A contact must exist in the address book that the list is created in to be added to that list.
    You can move or copy contact between address books using drag and drop.
    Drag and drop to move. Hold the control key before dropping to copy. You will see a + sign appear to indicate a copy.
    There operations are universal and not a Thunderbird thing. It has been a part of computer shortcuts since the early 90's.

Maybe you are looking for

  • Flash for mac vs pc

    I just purchased an imac and am using the trial version of flashcs3 has crashed a bit on me and the QT and swf's dont come out so great. Can anyone advise if they think flash cs3 works better on a mac or a pc? thanks

  • Stored Procedure basic timing questions

    If I have the following statements in one stored procedure, what happens if a user does an update, insert, or select to the MAIN_TABLE during the procedure (assume the procedure takes a few seconds)? MY_PROCEDURE: INSERT INTO BACKUP_TABLE (COL1, COL2

  • HT1212 any way to get pictures off a disabled iphone?

    My daughter's iphone4 is disabled after too many attempts to enter her password.  Before we reset it, is there any way to get pictures/videos off the phone first?  The phone has never been connected to iTunes.

  • Cannot open mpg files with Audition 6.0

    Says they are corrupt, but Adobe Premier has no problem with opening them. I was able to only open one real small file. Any ideas?

  • In solution manage4.0

    hello friends . In solution manger4.0.there are two tables DNOD_NOTIF_S and DNOD_NOTIF. Now based upon the notifaction no.(numb) in dnof_notif we get the  installation no. in DNOD_NOTIF_S so i created a program .. DATA : BEGIN OF it_sys OCCURS 0,  (I