Incrementing numbers in title

In iCal I'd like to set a repeating monthly event but show an incrementing number in the title - e.g. 'Mortgage Payment 010', then next month 'Mortgage Payment 011' - is this possible?

Pad out the sort values with leading zeros so the sort names become:
Triple J Like A Version 02
Triple J Like A Version 03
Triple J Like A Version 09
Triple J Like A Version 10
tt2

Similar Messages

  • Increment numbers in XML files

    My code is
    public class Main
        private static File fileTmp;
        private static BufferedReader br;
        private static BufferedWriter bw;
        private static String line;
        /** Creates a new instance of Main */
        public Main()
        public static void main(String args[])
            File xmlFile = new File(args[0]);
            File parentPath=new File(xmlFile.getParent(),"files");
            File [] files = parentPath.listFiles();
            for(int i=0;i<files.length;i++)
                File f = new File(files.getAbsolutePath());               
    if(!(f.isDirectory()))
    try
    fileTmp = File.createTempFile(f.getName(), "tmp");           
    br = new BufferedReader(new FileReader(f));
    bw = new BufferedWriter(new FileWriter(fileTmp));
    while((line = br.readLine()) != null)
    if(line.contains("<citation citation-type=\"book\" id=\"\">"))
    line = FunctionToIncrement(line);
    bw.write(line);
    bw.newLine();
    catch(NullPointerException n)
    n.printStackTrace();
    catch(IOException ioe)
    System.out.println("IOException.."+ioe.getMessage());
    finally
    try
    br.close();
    catch(Exception e)
    try
    bw.close();
    catch(Exception e)
    if(f.delete())
    fileTmp.renameTo(f);
    private static String FunctionToIncrement(String line)
    String res = "";
    int num=1;
         res = line.replace("<citation citation-type=\"book\" id=\"\">","<citation citation-type=\"book\" id=\""+num+"\">");          
    System.out.println("res:"+res);
    num++;
    return res;
    Input XML files are
    XML file 1
    <citation citation-type="book" id="">
    <citation citation-type="book" id="">
    <citation citation-type="book" id="">
    <citation citation-type="book" id="">
    XML file 2
    <citation citation-type="book" id="">
    <citation citation-type="book" id="">
    XML file 3
    <citation citation-type="book" id="">
    From the code my Output XML files contain
    XML file 1
    <citation citation-type="book" id="1">
    <citation citation-type="book" id="1">
    <citation citation-type="book" id="1">
    <citation citation-type="book" id="1">
    XML file 2
    <citation citation-type="book" id="1">
    <citation citation-type="book" id="1">
    XML file 3
    <citation citation-type="book" id="1">
    But Ouput XML files should contain incremented numbers as
    XML file 1
    <citation citation-type="book" id="1">
    <citation citation-type="book" id="2">
    <citation citation-type="book" id="3">
    <citation citation-type="book" id="4">
    XML file 2
    <citation citation-type="book" id="1">
    <citation citation-type="book" id="2">
    XML file 3
    <citation citation-type="book" id="3">Could anyone please help me to update my code.

    int cntr=1;   // everytime the for loops goes around, we create cntr = 1
    fileTmp = File.createTempFile(f.getName(), "tmp");                          
    br = new BufferedReader(new FileReader(f));
    bw = new BufferedWriter(new FileWriter(fileTmp));
    while((line = br.readLine()) != null)
      if(line.contains("><citation citation-type=\"book\" id=\"\">"))
           line = FunctionToIncrement(line, cntr);
           cntr++;
      bw.write(line);
      bw.newLine();
    private static String FunctionToIncrement(String line, int cntr)
            String res = "";
         res = line.replace("<citation citation-type=\"book\" id=\"\">","<citation citation-type=\"book\" id=\""+cntr+"\">");          
            System.out.println("res:"+res);
            return res;
    } Or simply make cntr variable global to the class.
    Another way to think about it this:
    Your approach is fine because you are doing the increments and writing on the fly. If your XML was bigger, it wouldn't be all that great.
    Count the number of instances that line occurs (DOM or SAX). Then you already know how much you need to increment. You can then write a function to take that node tree and run it in a loop to do the increment. This way there would be no need for a global counter variable, or passing a counter in.

  • Why are all virtual host files named "0000_" instead of incrementing numbers?

    I've created several virtual hosts using Lion Server's Server app.  Each .conf file that is created is prefixed with 0000_.  On SL Server, each vhost file was incrementally numbered, like 0001_, 0002_, etc.
    Is this a bug?  Or by design? 

    That can be caused by a problem with the HTTP response headers.
    Did it work before with a Firefox 8 version?
    Maybe something similar as this problem with Outlook Web Access:
    *[[/questions/894442]] OWA 2010/Firefox 8 and ASHX Attachments
    *[[/questions/895024]]

  • How do I select a field and between selected rows insert auto-incremented numbers?

    I have a spreadsheet in Numbers '09 and I want to number the rows so that I can sort by the original order after I've already sorted by different items. In Excel this is fairly easy, but how do you do this in Numbers? How do I select a series of rows in a column and tell it to automatically insert numbers incremented from one to the total number of rows?
    Thanks,
    Philip

    Hi Philip,
    As an alternative to the method Yvan pointed out, you could use a formula.
    (NOTE: This takes longer to write than to do.
    (CAUTION: Make sure you use Copy/Paste Values to replace the formulas with the calculated numbers before sorting.))
    Choose a column in which to place the numbers.
    In the first non-header cell in the column enter the formula:
       =ROW()
    Select the whole column by clicking its column reference tab.
    Then use command-click to deselect the header cells above the one where you placed the formula.
    With the cell containing the formula and all of the column below it selected, go:
       Insert (menu) > Fill > Fill Down
    The formula will be filled into the rest of the column and the numbers calculated.
    With the cells still selected, COPY, then go Edit > Paste Values.
    This replaces the 'live' formulas with the numbers themselves, and prevents the numbers being recalculated when the rows are sorted.
    Regards,
    Barry

  • Photos with numbers and titles.

    I have transferred folders of photos from my PC to my iPad and found that the order of the images the Album has changed despite the fact that they were numbered in the original file folder.   Also on iPad Albums they loose any titles.
    What I would really like in a photo App is one that maintains the order of the images whether being viewed as a 'SlideShow' or just viewed one at a time. In addition, when the photos are being displayed in full screen I would like to be able, by the touch of a finger, be able to see the title of the photo overlaid at the bottom of the screen, and equally as simply, removed from the screen when read.
    My questions are
         Will iPhoto do this for me?  I don't really need all the image processing that iPhoto offers because I do all that work on my PC before downloading images to my iPad.
         Does anyone know of an App. that does?        

    The iPhoto for iOS forum is here
    https://discussions.apple.com/community/app_store/iphoto_for_ios
    Regards
    TD

  • ITunes 12 - Sort album with numbers in title by natural order

    Hi All
    Searched but cannot find a solution to this.
    Now I've got iTunes 12, I noticed that when I added a new album titled "Triple J Like A Version 10", it sorts this album at the beginning of the sequential list of albums. i.e.:
    Triple J Like A Version
    Triple J Like A Version 10
    Triple J Like A Version 2
    Triple J Like A Version 3
    etc
    It should appear after Triple J Like A Version 9.
    My other albums added on earlier versions of iTunes are fine. For example Triple J Hottest 100 Volume 10 comes after 9 & before 11 where it should be; Volume 20 comes after 19 & before 21.
    Is there any way to change the sort order to sort numbers in their natural order?
    Thanks
    Craig

    Pad out the sort values with leading zeros so the sort names become:
    Triple J Like A Version 02
    Triple J Like A Version 03
    Triple J Like A Version 09
    Triple J Like A Version 10
    tt2

  • Add an auto incremental value to TITLE field.

    Hi, i am currently working on a custom list in SharePoint 2010 and there is a title field. I would like to append an auto incremental variable to "Request" to make it look like:
    Request 1
    Request 2
    Request 3
    and so on...
    As you can see below, i tried to use the calculated value Request+ID, but it didn't work out. So is there anyway to solve this problem?
    <input name="ctl00$m$g_0bb0fcf5_65ea_4af9_ba76_7c0babad1a82$ctl00$ctl05$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$TextField"
    type="text" value="[Request-]&amp;[ID]"
    maxlength="50" id="ctl00_m_g_0bb0fcf5_65ea_4af9_ba76_7c0babad1a82_ctl00_ctl05_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField"
    title="Title" class="ms-long ms-spellcheck-true" /><br />

    Hi andylow,
    You can also accomplish this without using a workflow but with a custom form on your list. To do this take the following steps:
    Make sure that the title field of your list is not a required value
    When you're in the list, click on the List tab in the ribbon
    There select "Customize Form"
    Your form will now open in InfoPath. In the right hand menu you will see all your data fields.
    Make the Title number field "Read Only". To do this right click the field, select properties, click on the second tab and select Read Only
    In the menu bar, click on Manage Rules
    Now click the Data tab in the menu and select Sumit Options
    In the menu that opens select the option to run rules before submit
    Now there will be a button available in the menu for Submit Options, click on that
    Now you can add rules and actions on the submit action
    Create a new Action rule and call it Initial Save
    As condition for the rule, set the condition that the Title field must be blank
    The first action of the rule will be to Submit the form. When the form is submitted it will be assigned an ID, before that will be blank
    Now add an Action to set a fields value.
    Select the Title field as the field to set
    You can set a hard coded value for the value to set but you can also click the function button, click on that
    Now another window opens where you can add fields, functions etc.
    Now first select the concat function from the function menu
    Then double click the first link in the resulting function and type Request
    Now double click the second link and select the ID field
    Now get rid of the last remaining arguments in the concat function
    Click OK until you're back in InfoPath
    Now set one more action to submit the form again
    Now ad a second rule and call that Edit
    As condition for the rule, set the condition that the Title field must be not blank
    Add the Submit Form action for this rule
    Now you can publish your form with the Quick Publish button. This is a Blue circle with a white upward arrow and a lightning bolt next to the save button in the top menu bar.
    Now when you add a new item and save it, the title will be set to Request&ID. When you edit the form no changes will be made.
    Cheers,
    Eduard Spelier

  • Problem Sorting on Artist Name with numbers in title

    I just upgraded to iTunes 7.7 and when I sort by artist, all the artists with numbers in their name (3 doors down, 10,000 Maniacs) appear after the "Z's" at the very end of my library, I want them before the "A's" as the first block of songs in my library, can't firgure out how to do that, it was always that way in my previous iTune versions, but with the upgrade it changed by itself
    Can anyone help, I am sure this should be easy as I never had to do anything before to get this sorting behavior

    This was changed in version 7.3.
    See this -> iTunes 7.3: Changes in music sort order

  • Auto increment numbers in Oracle 8i

    Hi all,
    How to have an auto increment number as a primary key of a table in Oracel 8i(8.1.7) ?. Is it possible to specify to use a sequence as a column ?
    Antony Paul

    You can create a BEFORE INSERT trigger that uses the sequence to populate the primary key column. If you are coming from SQL Server, that's the closest approximation to an IDENTITY column.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Incremental Numbering for File Names

    I've been trying to wrap my head around this problem all day. So I've found two very helpful scripts on this forum: here and here. The second one works, but I'd like to be able to direct where the files are saving to and I'd like to save them as .tifs. It seems like the first script is exactly the one I want, but when I run it I get the following error (I have CS 5):
    I'm trying to use this as a learning exercise, but man, it's a steep curve.
    Thanks
    jonathan.

    I got the script working. Took out some of the superfluous steps. Here it is in case anyone is curious:
    // This script will save the active document to a folder with an incremental sufix
    // Change the options below to match your needs
    var saveFolder = new Folder( '/D/Civil War/Process/Screen Caps' );
    var saveExt = 'tif';
    var saveSufixStart = '_';
    var saveSufixLength = 3;
    tifOpts = new TiffSaveOptions();
    tifOpts.embedColorProfile = true;
    tifOpts.imageCompression = TIFFEncoding.NONE;
    tifOpts.alphaChannels = false;
    tifOpts.layers = false;
    // End of user options
    //==========================================
    function zeroPad ( num, digit ){
       var tmp = num.toString();
       while (tmp.length < digit) { tmp = "0" + tmp;}
       return tmp;
    var docName = decodeURI ( activeDocument.name );
    docName = docName.match( /(.*)(\.[^\.]+)/ ) ? docName = docName.match( /(.*)(\.[^\.]+)/ ) : docName = [ docName, docName, undefined ];
    var saveName = docName[ 1 ]; // activeDocument name with out ext
    var files = saveFolder.getFiles( saveName + '*.' + saveExt );// get an array of files matching doc name prefix
    var saveNumber = files.length + 1;
    alert("New file number: " + zeroPad( saveNumber, saveSufixLength ));
    var saveFile = new File( saveFolder + '/' + saveName + '_' + zeroPad( saveNumber, saveSufixLength ) + '.' + saveExt );
    activeDocument.saveAs( saveFile, tifOpts ,true ,Extension.LOWERCASE);

  • Renaming photos and numbering similar titles while or during import to Elements 8?

    Hi, I now have several hundred photos on my hard drive in folders in My Pictures on Windows 7. I have not yet imported in Elements 8. They all have titles like JPEG 2112, etc. Would it be possible to give them real names like Disneyworld and if there are twenty from Disney World have them labeled Disneyword 1, Disneyworld 2, etc before or during importing to Elements 8? Thanks.

    It is not possible to rename the images while importing. But once imported you can select all the images and rename them
    through File->Rename. You can give the basename and it will rename the images with the number as the post-fix.

  • Downloaded new numbers app.  Now no table headings.  Solution?  Also in table headings/title want to add current date as did in old numbers.  How do I do it?  Thanks

    Down loaded new numbers app.  Now no table headings.  Solution?  Also. How do I include current date as part of new table heading, I had this included in old numbers spreadsheet title?

    Hi,
    Do you mean no table name?
    Or table header row?
    You can get the current date in a table heading with NOW, which in the formula editor now looks like this:
    Which you can format this way:
    SG

  • What's with these appended numbers in front or back of titles?

    What about those appended numbers (01 or 01-09 or whatever) in front of song titles or at the end so iTunes doesn't find these as duplicates? You can't even sort them because it reads those numbers as titles. I didn't put them there. If they are dupes why didn't iTunes recognize them as such and ask me if I wanted to keep or discard? All I am trying to do is consolidate all my music into ONE "music" file on my HD. It adds them from the "add to library" option but leaves these numbers on the titles so I can't sort. I also can't sort the "!" marks, music which actually exists but for some reason I have to find them manually. Now If I could really sort these "!"'s I could put them into an untitled folder on my desktop and do a better search instead of going through thousands of titles for hours if not days.
    ITunes needs a "tune-up" ASAP! Please spend the money you saved in off-shore tax shelters to update and really do some innovative iTunes upgrades.
    I thank all you iTunes geeks in advance.

    Hi,
    Have a look at this thread especially Limnos's post.
    https://discussions.apple.com/thread/4329199?start=0&tstart=0
    I think that you are encountering problems with "!" Because you are not letting iTunes manage your library.
    Jim

  • Figure titles and numbering do not display in PDF

    when I convert my ditamap into a FM book to get the PDF, figures loose their numbering and titles.
    In addition, this generates a number of broken x-refs (those that point to the figure titles)
    Txs
    Arianna

    Hi Arianna...
    What version of FM are you using?
    When I do this in FM9 using a test file with the default DITA-Topic-FM structure application, it seems to be working fine. Have you modified the structure application or are you using a custom structure app? In general the default Save Map to PDF process should give you exactly what you see in the topic files.
    If you close and reopen the topic file with the xref to the figure, is the xref still there in FM?
    Note that in general you should be making a figure cross-ref to the fig element not the title element (just like when you cross-ref a topic you point to the topic not the title).
    Tell me more about what you're doing and what you're seeing and I can try to help.
    ...scott

  • Numbering of subsequent chapters

    hi. I am learning FM12.  I learned how to create a chapter title with numbering for the first chapter by creating this new format C:Chapter <$chapnum>
    This formatted the first chapter correctly as Chapter 1.  However, I am not sure how to apply incremental numbering for chapter 2, etc.  When I attempted to apply my newly created chapter format (which i named Chapter Title) to my second chapter, it numbered it as Chapter 1.  What am I missing here?  Thanks,

    Each chapter should be a new FM file. Use the Book file to keep the chapter files together in the desired sequence. Set all of the numbering and pagination properties at the Book level.
    Hint: Don't use file names like Chap1.fm, Chap2,fm etc. because inevitably, some of them will move around. Use semantic naming like Introduction.fm, Overview.fm, Maintenance.fm, etc.

Maybe you are looking for