Need to add a additional blank space in output

In the following outputs a line of numbers like: 5 43 12 23 10 29 etc. I would like to add a extra blank space between each number. What and where do I need to change or add in the following code to make this happen?
Code:
import java.util.Arrays;
import java.util.List;
import java.util.Collections;
public class onetime {   
public static void main( String [] args ) {       
final int DOMAIN = 36 * 2;
char [] characters = new char[DOMAIN];
Integer [] numbers = new Integer[DOMAIN];
char ch = 'a';
int j = 0;
for ( j = 0; ch <= 'z'; ++ch, ++j )
characters[j] = ch;
for ( ch = 'A'; ch <= 'Z'; ++ch, ++j )
characters[j] = ch;
for ( j = 0; j < DOMAIN; ++j )
numbers[j] = new Integer( j );
List list = Arrays.asList( numbers );
Collections.shuffle( list );
Arrays.sort( characters );
String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZaBcDeFgHiJkLmN";
int [] encodedValue = new int[str.length()];
int pos = 0;
final int max = str.length();
System.out.print("\nFirst number is a, second is b and so on. After z you start with A then B and so on. After Z you start with 0 then 1 till 9. After 9 the next four are ? . , !\n");
for ( j = 0; j < max; ++j ) {           
ch = str.charAt( j );
pos = Arrays.binarySearch( characters, ch );
encodedValue[j] = numbers[pos].intValue();
System.out.print( encodedValue[j] );
System.out.print( ' ' );
System.out.print("\n");
System.out.print("\n\n\n");
System.out.print("\nSee readme for more detailed instructions\n\n");

System.out.print( encodedValue[j] ); replace the above line of code with the following:
   System.out.print( encodedValue[j] + "  " );i am not quite sure what r u asking. but i wish this would bring u a bit helps.
System.out.print( ' ' );
System.out.print("\n");
System.out.print("\n\n\n");
System.out.print("\nSee readme for more detailed
ed instructions\n\n");

Similar Messages

  • How to use OMJX transaction? Need to add an additional field on MIGO item

    hi guys
    we need to add a new field on the MIGO screen at the item level. We are trying to explore OMJX to add custom fields.
    We have used append structutre to enhance the GOITEM structure but are not clear on how to use OMJX.
    ANy idea how to use the transaction OMJX.
    Thanks in advance

    With the Business Add-In (BAdI) MB_MIGO_BADI, you can extend the              
    interface of the goods movements transaction (MIGO) with additional           
    tabstrip controls for the detailed information (detail tabstrips) and         
    header information (header tabstrips). It is possible for an external         
    application                                                                   
    o  to display an additional detail tabstrip with own subscreen (max. 10       
       lines) in MIGO                                                             
    o  to display an additional header tabstrip with own subscreen (max. 3        
       lines) in MIGO                                                                               
    The program name, screen number and tab page text can be determined           
    dynamically. Different screens can therefore be controlled according to       
    the mode (for example, change mode, display mode, goods receipt, goods        
    issue).                                                                               
    Pushbuttons                                                                   
    It is not possible to implement pushbuttons in the MIGO menu, but you         
    can, however, implement pushbuttons directly on the external subscreen.       
    The OK code from MIGO is forwarded to the external application so it can      
    react.                                                                               
    Cursor Control                                                                
    So that the cursor stays on the same subscreen after you press Continue,      
    if it was positioned there before, the external application in the own        
    PAI must hold the cursor positioning (on the same screen 'yes'/'no'; if       
    'yes', on which field), to set the cursor in PBO again.                                                                               
    Requirements                                                                               
    If you use the BAdI MB_MIGO_BADI in MIGO to update customer-own data, in      
    addition to the material document, to the database, you should note the       
    following:                                                                    
    o  The BAdI MB_MIGO_BADI is only active in transaction MIGO.                  
    o  If you post goods movements with other transactions (for example, with     
       MB01, MB1C, VL02N), you must ensure that customer data is also             
       updated, if necessary.                                                     
       You can do this by using the BAdI MB_DOCUMENT_BADI (Creating a             
       material document) to post the goods movements with the transactions       
       mentioned above.                                                           
    o  Note that otherwise, posting the goods movements will lead to              
       inconsistencies between SAP system data (for example, in stocks,           
       material documents, FI documents) and customer data.

  • Reg : blank spaces

    hi all ,
    the reuqirement is that i need to have blank spaces and that needs to be concatenated into another variable ..so how define a constant if the size is 20 type c and i need to have to twenty blank spaces ...

    hi,
    try to code like this.
    data: lv_c(20) type c value '0'.  " i think character takes by default value as '0', if so than dont define character value.
    loop at itab.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                      input = lv_c
              importing
                     output = lv_c.
    concatenate lv_c   var1 into var2.
    endloop.

  • How do you add additional fields in infotypes?i want to leave blank space

    how do you add additional fields in infotypes?i want to leave blank space in front of the field?

    Hi,
    To add new fields go to PM01 and select Enhance Infotype option and then follow the steps in sequence.
    I am not getting blank space in front of the field. please elaborate it.
    Regards,
    Raja.D

  • My HD is almost full. I need to add space. Can I use an external HD to continue using my startup disc as it is?

    My HD is almost full. I need to add space. Can I use an external HD to continue using my startup disc as it is?
    I create music and have run out of space. the message says 'your startup disc is almost full', and i just thought maybe buying an external hard drive and using it as the startup disc or whatever would do the trick. Does anyone know? Thanks!

    External hard drives are relatively inexpensive...see some of those on OWC, www.macsales.com
    You can use a large external drive to provide additional space by simply saving material to that volume instead of the startup disk.  You can also partition the external drive to use part for Time Machine backups, and another partition for extended space.  Or a third partition for a clone of the boot system made by Carbon Copy Cloner or SuperDuper, both free downloads, so should the internal drive have problems you could always boot from the external partition.
    All of that can be done from Disk Utility.
    Keep in mind that Mac OS X gets very unhappy when there is less than 15% of the startup disk space free.

  • How to add extra blank space in xml

    I open the xml file in notepad I get this
    <XXON_EXT_BANK_ACCOUNT_NAME>創名聯合會計師事務所                                        </XXON_EXT_BANK_ACCOUNT_NAME>
    But when I open the xml file in html format the blank space is gone.
    How can I add extra blank space in xml?

    Hi
    Why do you need the extra space for?
    This difference in display that you see between your browser and notepad/notepad++
    will not affect your generated report.
    Bogdan 

  • I need to add fields in additional fields B the sales order line item

    i  need to add fields in additional fields B beside the field (icon_val_quantity_ structure) in the sales order line item, How to achicve this? please help me..

    Please fined the below solution for achieving your requirement.
    1. Add new filed "B" in table VBAP.
      a) T.code  SE11 --> Enter structure name VBAP --> display
      b) Goto --> Append Structure --> Enter Structure name and new field "B"
    2. request your basis team and take the access key for modification of stabdard program SAPMV45A & Screen: 8459
       a) After receiving access key for standard program then got o SE51 --> enter program name  SAPMV45A & Screen: 8459
       b) click change Button
       c) click layout button
       d) add new field "B" below of the screen (F6 -> enter table name : VBAP --> get from dictionary --> selet new field and past in screen )
    3) write below code in flow logic
    PROCESS BEFORE OUTPUT.
                               Verarbeitung vor der Ausgabe
      MODULE ZZPB_INITIALIZE_8459.
      MODULE ZZPB_OUTPUT_8459.
    PROCESS AFTER INPUT.
      CHAIN.
        FIELD VBAP-New field name "B".
        FIELD ZVC_SALES_EXPORT-ZZAPLHENKO.
      ENDCHAIN.
      MODULE ZZPA_OUTPUT_8459.
    4. functin Module code
    module ZZPB_OUTPUT_8459 output.
      Data: l_v_actve type ale_active,
            l_v_ttyp  type c.
      Data: l_v_tragr type tragr.
    l_v_ttyp = t180-trtyp.
      if l_v_actve is initial.
        l_v_ttyp = 'A'.
      endif.
      LOOP AT SCREEN.
        CASE l_v_ttyp.
          WHEN 'A' OR 'C'.
            SCREEN-INPUT = 0.
        ENDCASE.
      ENDLOOP.

  • I need a powershell command to replace unicode chars in a file name to a blank space

    Can anyone provide me with a powershell command which will search and replace a specific unicode character in a file name to just a blank space?
    Thanks

    Hi Roadster198,
    In addition, if you want to search and rename the text files under a folder, please also check this script:
    Get-ChildItem -Path d:\test1\1\*.txt -Recurse| where{$_.name -like "*ф*"}|rename-item -newname { $_.name -replace "ф"," " }
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    TechNet Community Support

  • We have a complete CC business membership and currently have the programs installed on 2 computers but need to add them onto a 3rd. Can we add a licence to our membership or do we need to purchase an additional membership?

    We have a complete CC business membership and currently have the programs installed on 2 computers but need to add them onto a 3rd. Can we add a licence to our membership or do we need to purchase an additional membership?

    If you have Creative Cloud for teams, and you bought the licenses through Adobe direct (via Adobe.com), you can add licenses yourself, and they will be invoiced automatically as you get invoiced for the other two licenses.
    Log into adobe.com with your team admin Adobe ID and password.
    Once logged in you should be able to access a Manage Team option from the menu.
    In the top-right corner there should be an Add Licenses button, that lets you purchase any number of additional licenses.
    If you've not purchased through Adobe direct, but through a reseller, you'd need to contact your reseller to add the additional license.
    Hope this helps,
    Cari

  • Issues in exporting SSRS report to PDF format in Report Server - Blank spaces are deleted

    Hi Gurus,
    I have a problem in exporting SSRS report to PDF format. It deletes all the blank spaces when I use bullet in a Text box and try to export to PDF formt in Report Server . For example
    •             Project submitted to the TRC
    Result in PDF format:
         • ProjectsubmittedtotheTRC
    I also noted that when I try to export to PDF in Visual Stuio 2005 (Business Intelligence development studio), it does not delete any blank spaces and shows the correct aligned Data in PDF format.
    Please help me as it is frustrating a lot
    I would highly appreciate for your quick response 

    Was there ever a solution found for this as i have the same issue.
    When bullet point is entered in a field all the spaces are removed when exported to PDF
    i tried exporting to excel and it does not remove spaces, however this is no use to me as it needs to be in PDF
    Using IE 7 (Don't think the browser has anything to do with it as this happened via a subscription)
    Didn't know SSRS had specific Service Packs, i though they came as patches to SQL Server (SQL Server is on Service Pack 3)
    This should be easy to replicate all you need to do is copy text containing a bullet point into a sql server database field and then add this field to a report export to pdf and the spaces are gone
    Thanks in advance,
    Mark Brunton
    brunzire

  • How to insert  blank spaces at end of a record

    Hi All,
    i need to write 10 records each of 80 char size. of these 10 records, each record might have different data and the last field will be a filler field which only has space.
    for example:
    DATA : BEGIN OF gs_mrecord        ,
             id(1)         VALUE'M'     ,
             accno(12)                  ,
             refid(2)      VALUE 'RR'   ,
             sec_cd(4)     VALUE '2437' ,
             sub_typ(1)    VALUE '6'    ,
             sub_dt(5)                  ,
             sub_seq_no(1)              ,
             sec_cd1(4)    VALUE '2437' ,
             sub_dt1(6)                 ,
             record_no(6)  TYPE n       ,
             ext_ind(1)                 ,
             plat_id(1)                 ,
             filler_1(1)               ,
             clear_code(3)              ,
             ex_merc_no(16)             ,
             filler_4(4)               , fill blank spaces
             mech_bin_no(6)             ,
             filler(6)             ,  " fill blank spaces
             END OF gs_mrecord .
    like this there are 10 types with 80 char size, however the last field is a filler, in which we need to fill only blank spaces.
    when i wrtie this data to the application server file i can't see the spaces and when download(to .TXT file) also i can't see the spaces.
    is there anyway that i can keep the spaces at the end of the record.
    Please note, in the middle of the record, we can keep the spaces as there is some data after that.
    Any hint would be of great help.
    Cheers,
    SR.

    Hi Srinivas
    Just a thought, try as below:
    Declare a text variable of length 80 characters. Before transferring the record to Output file, move the work area to the text field and add a New Line character at 80th position. Now tranfer this text field to file with length specification.
    Eg:
    DATA: l_cr(1) TYPE c VALUE cl_abap_char_utilities=>cr_lf,
          l_text(80) TYPE c.
    OPEN DATASET ....
    IF sy-subrc EQ 0.
       LOOP AT <itab> INTO <wa>.
          MOVE <wa> TO l_text.
          l_text+80 = l_cr.
          TRANSFER l_text TO <dsn>.
       ENDLOOP.
    ENDIF.
    Hope that helps, also check the codepage in which you download the file from Application server before Viewing. Maybe checking the file contents via AL11.
    Hope it helps.
    Regards
    Eswar

  • Pass parameter with blank space for report ver 6

    Hi,
    I face a problem that i willing to pass the acno where it's value with blank space, for example ' 9' as parameter into my report, and assign it as v_acno. Inside the report query i add a where condition, acno >= :v_acno. When i run the report and pass acno without ' , it do not show any record. But when i run the report and pass acno with ' then able to show the records.
    for example the value i key in
    with ' = ' 9'
    without ' = 9
    So how i can solve it by pass the acno without ' but the record still able to show?
    thks
    Message was edited by:
    user569740
    Message was edited by:
    user569740

    Hi Nick,
    It occurs because an argument of the DTExec commands must be enclosed in quotation marks if it contains a space. From the dtexe (SSIS Tool): Syntax Rules section of the
    dtexec Utility (SSIS Tool) document, we can see:
    All options must start with a slash (/) or a minus sign (-). The options that are shown here start with a slash (/), but the minus sign (-) can be substituted.
    An argument must be enclosed in quotation marks if it contains a space. If the argument is not enclosed in quotation marks, the argument cannot contain white space.
    Doubled quotation marks within quoted strings represent escaped single quotation marks.
    Options and arguments are not case-sensitive, except for passwords.
    So, you need to make the value of the variable @QUERY_STRING within double quotes in the value of the variable @Cmd or remove the space within the @QUERY_STRING value.
    Regards,
    Mike Yin
    TechNet Community Support

  • Simple??? Want "INSERT" function to return blank space after a field, how?

    All,
    Am I just having a brain fart? I have a situation where I have a field that needs to return just one space, or a value that has a space before and after it.
    Example:
    In the text ==> I am<field>going to the office. <-- notice no space between am, <field> and going
    I want it to say if FALSE, then "I am *not* going to the office."
    If true, then "I am going to the office."
    If true, I'm simply RETURN(""); <-- This returns a blank space
    If FALSE, I have tried:
    ret="not"
    RETURN(" " & ret & " ");
    This returns "I am notgoing to the office". <-- Notice no blank space after "not"?
    I've tried
    ret="not";
    ret2=(" " & ret);
    RETURN(Insert(ret2, 3, " "));
    Still the same result. What's strange is, if I do a RETURN(Insert(ret2, *2*, " "));, then it returns "I am no tgoing to the office" <-- Notice the space between the "o" and the "t"?
    Ideas?

    Trailing spaces are often removed from data. In your case, the easiest thing to do will be to use what is called the "hard space" character instead of a "real" space. This is key code ALT+0160. For all intent and purposes, it looks like a space and will print as a space, but since it is not technically the space (0032) character, it will not be trimmed from your projects. Just open the quotes, turn off the NUMLOCK and hold down the ALT key and type 0160 and then release the ALT key. This will add the hard space into your string. Then if you are like me, you will have to remember to turn the NUMLOCK back on.
    " not "
    I'm not sure how this will post into this message, but the example above is using hard space characters.
    Edited by: user9976634 on Dec 5, 2012 12:52 PM

  • Blank Spaces in the report

    <p>Hi </p><p>My Report has some columns which has the option as "Can Grow" so that when the returned value from the database is more that one line it can accomdate the data in the field.</p><p>The problem i am facing is that when the records are printed in the pages and when the next record is unable to fit in the remaning section of the report it automatically pushes to the next page.<br />In this scenario the previous page has blank space after the next record is printed.</p><p>Is there way that i can suppress this balnk space and force teh record to be printed in the same page and when the page is over it follows in the next page.</p><p>Thanks in Advance<br />Moa</p>

    <p>My problem was that I wanted to display several lines in a total field: order amount, minimum charge, delivery charge and tax. When any of them was zero, I needed to hide it without leaving a big gap. </p><p>Here was the solution: </p><p>Create a textbox. Set the textbox&#39;s "Suppress blank lines in embeded fields" property. <br />Instead of using database field (for example, table.fieldValue) and a label, create a formula that says:  </p><blockquote><p>If isNull{table.fieldValue} then </p><p>    "" </p><p>else </p><p>"Value:" + Chr(9) + ToText({table.fieldValue})   </p></blockquote><p>I placed a tab in this formula to space it out. Add tab stops (one left-aligned, one decimal) to your textbox, and drag the formula into it (embed) instead of the database field. Add the other fields to the textbox as well, separating fields by adding carriage returns. Bingo. The field and the line will disappear when there is no data.</p><p> I hope this helps.</p>

  • Text item with a blank space

    I am trying to save a blank space in a text item but everytime i do, the item is getting trimmed.
    if i put in " " then it trims to null.
    If i put in "P " then it rtrims to "P"
    What am i doing wrong?

    I dont think i have been clear on what we are trying to achieve. They will not always need a blank space but could need one if they choose to do so.
    The form concatenates a set of values. So we have a set of information that is exported by the form.
    i.e.
    ONE
    TWO
    THREE
    FOUR.
    on button press turns into ONETWOTHREEFOUR
    they then have a custom seperator text item to specify what seperator is used to seperate the values. So this is where i want the user to be able to specify anything they want, including a blank space or anything else they require like comma etc so if they entered ", "
    on button press turns into ONE, TWO, THREE, FOUR
    at present it trims it turning it into ONE,TWO,THREE,FOUR
    Hope this makes sense as to why i want the blank space.
    I can add it as a list item and concatenate it on save but this this is a little OTT for what is a simple task

Maybe you are looking for