Display or array values all on one line

This is my code it gives a strange out come!!!, how do I display the values of the array?
System.out.println("hi " + array2[0] + array2[1] + array2[2] + array2[3] + array2[4]);

Lemme help you out
         '-.\|':':' `"` ':':'|/.-'
         `-./`. .-=-. .-=-. .`\.-`
           /=- /     |     \ -=\
          ;   |      |      |   ;
          |=-.|______|______|.-=|
          |==  \  0 /_\ 0  /  ==|
          |=   /'---( )---'\   =|
            `\= '--`   `--' =/'
              `-=._     _.=-'
                   `"""` 

Similar Messages

  • How to put grouped results all on one line.

    I amt trying to get Principal, Interest, Principal YTD, Interest YTD from a transaction table to get them all on one line, but I can't seem to get it. I have a script here that can run without modification to see what I have here. The very last query is
    incorrect, as it puts each value on a separate line, but it demonstrates what I am getting so far. What I want is one account number with 4 columns, as above mentioned. Keep in mind, in this illustration, YTD is last year and forward:
    CREATE TABLE #a
    PMT_ID INT IDENTITY(1,1),ACCT_NO INT, PMT_TYPE CHAR(1), PMT_AMT MONEY, PMT_DATE DATE)
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 351, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 352, '2012-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 353, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 850, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 200, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 880, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 201, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 855, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 203, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 352, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 101, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 353, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 103, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 354, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 103, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 851, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 199, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 881, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 201, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 854, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 205, '2013-12-01')
    SELECT PMT_ID, ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE
    FROM #a
    SELECT ACCT_NO, SUM(PMT_AMT) TOT_PRINCIPAL_PAID
    FROM #a
    WHERE PMT_TYPE = 'P'
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID
    FROM #a
    WHERE PMT_TYPE = 'I'
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_PRINCIPAL_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    SELECT ACCT_NO
    ,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID
    ,NULL AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL AS TOTAL_PRINCIPAL_PAID
    ,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL AS TOTAL_PRINCIPAL_PAID
    ,NULL AS TOTAL_INTEREST_PAID
    ,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL AS TOTAL_PRINCIPAL_PAID
    ,NULL AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    -- Query to put this all these 4 columns on the same line, ending up with 3 lines.
    DROP TABLE #a

    Try the below query
    CREATE TABLE #a
     PMT_ID INT IDENTITY(1,1),ACCT_NO INT, PMT_TYPE CHAR(1), PMT_AMT MONEY, PMT_DATE DATE)
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 450, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 100, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 450, '2012-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 100, '2012-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 450, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 100, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 351, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 102, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 352, '2012-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 102, '2012-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 353, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 102, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 850, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 200, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 880, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 201, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 855, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 203, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 451, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 99, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 451, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 99, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 451, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 99, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 352, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 101, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 353, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 103, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 354, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 103, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 851, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 199, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 881, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 201, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 854, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 205, '2013-12-01')
    SELECT PMT_ID, ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE 
    FROM #a
    SELECT ACCT_NO, SUM(PMT_AMT) TOT_PRINCIPAL_PAID
    FROM #a
    WHERE PMT_TYPE = 'P'
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID
    FROM #a
    WHERE PMT_TYPE = 'I'
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_PRINCIPAL_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I' 
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    select 
    T123.ANO,
    SUM(TOTAL_PRINCIPAL_PAID) TOTAL_PRINCIPAL_PAID,
    SUM(TOTAL_INTEREST_PAID) TOTAL_INTEREST_PAID ,
    SUM(TOTAL_PRINCIPAL_PAID_YTD) TOTAL_PRINCIPAL_PAID_YTD,
    SUM(TOTAL_INTEREST_PAID_YTD) TOTAL_INTEREST_PAID_YTD
    from
    SELECT ACCT_NO ANO
    ,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID
    ,NULL AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL AS TOTAL_PRINCIPAL_PAID
    ,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL         AS TOTAL_PRINCIPAL_PAID
    ,NULL         AS TOTAL_INTEREST_PAID
    ,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL         AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL         AS TOTAL_PRINCIPAL_PAID
    ,NULL         AS TOTAL_INTEREST_PAID
    ,NULL         AS TOTAL_PRINCIPAL_PAID_YTD
    ,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO)T123
    Group by T123.ANO 
    DROP TABLE #a

  • Problems with sending emails from my Blackberry BIS account - all on one line

    I am using a BB Storm 9500 and have been trying to use the BIS email account.
    However, whenever I reply or forward emails from my device, the email comes out all on one line regardless of the punctuation I put in.
    My signature also appears on one line despite having formatted it differently.
    I've seen some post on this problem before but I wondered whether anyone has resolved it now. It's a pain because when responding to work emails it looks completely unprofessional.
    Cheers
    TJE

    anyone try it? any use?
    dc

  • 'Calendar UI' which will display current month's calendar in one line

    Hi Experts,
    I have to create a calendar in following way. Here I have to display calendar of current month for the employee. The entire month detail has to appear in one line. In fact it is needed for Leave Overview iView.
    Manager needs to view the Leave details of all employees working in his department
       1                 2                  3              4           5         6                 7              8            9               10   11     12     13     14     15  16 17 18 19  20 21  22 23  24  25  26  27  28  29 30 31
       Mon    Tues    Wed    Thurs   Friday  Sat            Sun
    Smith  
    Marteen
    Thomas
    I am not sure how to do it? Do we have any ready made UI element which we can use. I can see Date navigator. However it
    displays the calendar in 4 rows.
    Please help.
    Regards,
    Gary

    Hi Abhinav, Experts
    Thanks. The design of my RFC will be like this:
    1) Input Org Unit, Month, Year
    2) Output
    Pernr (datatype number 8)
    Name (datatype string)
    Day1 (datatype string)
    Day2 (datatype string)
    Day3 (datatype string)
    Day4 (datatype string)
    Day29 (datatype string)
    Day30 (datatype string)
    Day31 (datatype string)
    3) The default value Day1, Day2  etc will be null
    4) I will find out Leave Details. If Leave has been approved for say Day5 then I will populate Day5 = 'AP'.
    5) I will write another logic to make the color of cell as 'Green' for Day5.
    6) In Feb 2011, there are 28 days. There will be another logic to make the Day29, Day30, Day31 invisible for months like Feb 2011.
    Please let me know if this approach is correct.
    Please also let me know how to display day i.e. 01.04.2011 is Friday. In Calendar I have to display
                     1.4.2011  2.4.2011   3.4.2011
                     Friday      Saturday   Sunday
    Smith
    Tony
    I did small Proof of Concept. The table does not look good although displays the information.
    Please help.
    Regards,
    Gary

  • Display Javascript array value OnChange instead of Bean value

    I intially loop through a collection of employees display the values within the employee loop I have a select statement that i loop through a collection of programs that has on OnChange. I want to display the javascript value instead of the bean value onChange. The following code displays the bean value initally and onChange it displays both because the if is never false?
    *<c:if test="${programs[programIndex] != emps.department}">${emps.department}</c:if>*
    * <div id="programText"> </div>*
    * <input name="department" type="hidden" id="department">*
    JSP page
    <jsp:useBean id="programs" scope="request" class="java.util.Collection"/>
    <jsp:useBean id="employeeList" scope="request" class="java.util.Collection"/>
    <script language="JavaScript" type="text/javascript">
    var programs = new Array();
    function setProgramFields() {
    nameField = document.getElementById("programList");
    idx = nameField.selectedIndex;
    emField = document.getElementById("programText");
    emHiddenField = document.getElementById("department");
    emField.innerHTML = programs[idx];
    emHiddenField.value = programs[idx];
    <c:forEach var="emps" items="${employeeList}">
    <td width="170px">
    *<c:if test="${programs[programIndex] != emps.department}">${emps.department}</c:if>*
    * <div id="programText"> </div>*
    * <input name="department" type="hidden" id="department">*
    </td>
    <td width="275px">
    <div class="selectBorder">
    <select name="programName" type="text" class="searchProgram" id="programList" onChange="setProgramFields()">
    <c:set var="programIndex" value="0"/>
    <c:forEach var="sp" items="${programs}">
    <c:if test="${sp.programName == emps.programName}">
    <option value="${emps.programName}" selected="selected">${emps.programName}</option>
    </c:if>
    <c:if test="${sp.programName != emps.programName}">
    <option value="${sp.programName}">${sp.programName}</option>
    </c:if>
    <script language="JavaScript" type="text/javascript">
    programs[${programIndex}] = "${sp.department}";
    </script>
    <c:set var="programIndex" value="${programIndex + 1}"/>
    </c:forEach>
    </select>
    </div>
    </td>
    </c:forEach>
    Edited by: kmb_ms on Sep 15, 2008 2:38 PM

    Apologize for not formatting the code. I used the status.index the code as suggested. The code if more efficient but the results are the same and I still have the same problem.
    <select name="programName" type="text" class="searchProgram" id="programList" onChange="setProgramFields()">
    <c:forEach var="sp" items="${programs}" varStatus="status">
    <c:if test="${sp.programName == emps.programName}">
    <option value="${emps.programName}" selected="selected">${emps.programName}</option>
    </c:if>
    <c:if test="${sp.programName != emps.programName}">
    <option value="${sp.programName}">${sp.programName}</option>
    </c:if>
    <script language="JavaScript" type="text/javascript">
    departments[${status.index}] = "${sp.department}";
    </script>
    </c:forEach>
    </select> How can I access the value of the array to compare with the value of the bean.
    <script language="JavaScript" type="text/javascript">
    var departments = new Array();
    function setProgramFields() {
    nameField = document.getElementById("programList");
    idx = nameField.selectedIndex;
    emField = document.getElementById("departmentText");
    emHiddenField = document.getElementById("department");
    emField.innerHTML = departments[idx];
    emHiddenField.value = departments[idx];
    </script>The following code displays both the value of the bean and the value of the array onChange b/c the if statement is always true???? This is where I need help.
    <td width="170px">
         <c:if test="${departments[idx] != emps.department}">${emps.department}</c:if>
         <div id="departmentText"> </div>
         <input name="department" type="hidden" id="department">
    </td>

  • Will my bill increase if I cancel all but one line on my family plan?

    I would like to keep one line (a smartphone) on my family plan and cancel the other 3 lines (2 smartphones and one basic phone). The contract is up on the 3 lines I want to cancel at the end of October, but the contract isn't up for the one line I want to keep until December. If I cancel all but the one, will my bill go up/change to a single personal plan on the single line for the remainder of its contract length? I tried calling customer service and doing the online chat and couldn't get through to talk to an actual person. I'm getting ready to just jump ship and not keep any lines at this point.

        Don't jump, rilobilly. We don't want to see you go! We do offer a Single Line Plan http://vz.to/1d0wrWV for only $60 per month with 2GB if you do decide to leave only one smartphone on your plan. What plan do you have now? What has you wanting to cancel so many of your lines? We want to help.
    JenniferH_VZW
    Follow us on Twitter www.twitter.com/vzwsupport

  • Why is my entire XML file all on one line?

    I am createing a XML file using DOM. The file is started as a new document and I add child nodes using the appendChild() function. I am also using the transformer class to write the file. The file output is as follows:
    <?xml version="1.0" encoding="UTF-8"?><TestSystems><department>Tape<program>T10000A</program></department></TestSystems>
    and I want it to be:
    <?xml version="1.0" encoding="UTF-8"?>
    <TestSystems>
    <department>Tape
    <program>T10000A</program>
    </department>
    </TestSystems>
    How can I get a nicely formated file?
    Here is my code:
    import java.io.*;
    import javax.xml.parsers.*;
    import javax.xml.xpath.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.dom.DOMSource;
    public class XMLTestClass {
        DocumentBuilderFactory domFactory;
        DocumentBuilder domBuilder;
        Document xmlDoc;
        String xmlFile = "c:\\test.xml";
        /** Creates a new instance of XMLTestClass */
        public XMLTestClass() {
            try{
                domFactory = DocumentBuilderFactory.newInstance();
                domBuilder = domFactory.newDocumentBuilder();
                //xmlDoc = domBuilder.parse(new File(xmlFile));
            //    xpath = XPathFactory.newInstance().newXPath();
            }//try
            catch (ParserConfigurationException e) {
                System.err.println("ParserConfigurationException caught...");
                e.printStackTrace();
        public void run(){
            System.out.println("Test");
            xmlDoc = domBuilder.newDocument();
            Element rootElement = xmlDoc.createElement("TestSystems");
            xmlDoc.appendChild(rootElement);
            Element deptElement = xmlDoc.createElement("department");
            deptElement.appendChild(xmlDoc.createTextNode("Tape"));
            rootElement.appendChild(deptElement);
            Element progElement = xmlDoc.createElement("program");
            progElement.appendChild(xmlDoc.createTextNode("T10000A"));      
            deptElement.appendChild(progElement);   
            try{
                TransformerFactory tf = TransformerFactory.newInstance();
                Transformer transform = tf.newTransformer();
                Source src = new DOMSource(xmlDoc);
                Result dest = new StreamResult(new File(xmlFile));
                transform.transform(src, dest);
            catch(Exception exp){}
        public static void main(String[] args){
            XMLTestClass xml = new XMLTestClass();
            xml.run();
    }

    Thanks for the tip. The code sort of works now but the funny thing is that the file output does not indent, but is no longer on one line. The out put is now (no indents):
    <?xml version="1.0" encoding="UTF-8"?>
    <TestSystems>
    <department>Tape<program>T10000A</program>
    </department>
    </TestSystems>
    Also the line
    transform.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    [\code]
    does not seem to have any affect.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to display more than 30 columns in one line?

    Hi,
    I want to display some 30 columns in the report.
    I dont want to split it into sub reports.
    How can i do.
    In that i have 3 groups.
    For each group i need one total.
    For example.
    after group 3 i need sub-total
    after group 2 i need total
    after group 1 i need Grand-total.
    Please help me to solve this issue.
    Thanks in advance,
    Saravanakumar.

    Sorry about that,
    Ill tell you clearly.
    Actualy I am having 12 columns, under each column, i have 5 sub-columns.
    I couldn't accomodate all the columns in a single horizontal line(I tried in A2 paper size).
    So i decided to have cross tab. Because top 5 columns can be dinamic.
    How can have subtotals inside cross tab after each group.
    Thanks ,
    Saravanakumar

  • Display dynamic array values

    Hi !
    All I just want to do is to look for a bean value stored into an array, dynamically.
    The final code should be something like :
    <% for( int i = 0; i < 10; i++ ) { %>
        <h:outputText value="#{foo.bar[<%=i%>]}" />
    <% } %>Obviously this doesn't work, but how is it possible to make it work ? ^^
    10 Duke Dollars for the first one who answers :)

    Ok, actually it doesn't work at all...
    From Oracle ADF Faces FAQ :
    ADF Faces tags can be used inside of the < af:forEach > tag (it is, unfortunately, not possible to support standard tags inside < af:forEach > ).
    It appears it's the same issue as with JSTL...
    Does anybody know another way to do that ?
    Is it really impossible to include code like <%= i %> ??
    Is it simply impossible to do what i want...

  • What is the best way to display different array values to appropriate indicators?

    I am using DAQmx Read vi and its output is an array. I need a way to pass each value to an appropriate front panel indicator, so I can monitor each sensor. I tried using "Index Array" and passing the array element to the indicators but it looks sloppy. Is there a more professional way? Thanks!
    Attachments:
    Mole.vi ‏215 KB

    Try using the Array to Cluster function in the Cluster subpallet. If you put all of your indicators in the same cluster on your front panel, you can then pass the array data to this function and then pass it directly to the cluster without having to index the array.
    criag

  • Show Top n Values on One Line

    I have my SSRS report to show the top 3 volumes by physician. My problem is it shows them in three lines going down, even though the code is in one cell. Such as:
    Dr Smith
    Dr Johnson
    Dr James
    I need it to show as Dr Smith, Dr Johnson, Dr James (all on one line separated by commas). Here is what I have tried:
    =Switch(RunningValue(Fields!Attending_Pract_Name.Value,CountDistinct,Nothing)=1,
    Fields!Attending_Pract_Name.Value) & ", " &
    Switch(RunningValue(Fields!Attending_Pract_Name.Value,CountDistinct,Nothing)=2,
    Fields!Attending_Pract_Name.Value) & ", " &
    Switch(RunningValue(Fields!Attending_Pract_Name.Value,CountDistinct,Nothing)=3,
    Fields!Attending_Pract_Name.Value)
    But it still puts the list going down instead of side by side. Any ideas?

    Hi cpemtp1,
    Based on my understanding, there is a column with a lot of rows. Now, you want to combine data of top three rows into one line, right?
    In Reporting Services, when generating each detail row, it only pass one value of data field into expression. So we can never simply using expression to combine three values within one data field together. Regarding your expression, for each row, if this
    value meets requirement, the expression returns this value, otherwise it returns null value. In your scenario, if you only want to display those top three values in your tablix, I would recommend you create another dataset and combine data of top three rows
    to one line on query level. Please refer to screenshots below:
    Reference:
    Use PATH Mode with FOR XML
    How to combine values from multiple rows of a single column (T-SQL, Microsoft SQL Server, FOR XML PATH, CSV ).
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • How do I display array values in a text field?

    Hi there-
    I have a small Flash movie I'm trying to complete, it's my
    first go around with Flash 8 so I appreciate your patience:
    I built an array with some actionscript which seems to work
    fine (I can trace it and all is well in the trace window). Now I'm
    simply trying to display it to my Flash movie screen and I've built
    a dynamic text window which is working, except that I only ever get
    the last array element to appear in the dynamic text window. I've
    traced the code and see all of my array values, but when I use
    "myResults_txt.text=picker_array;" I only see the last position's
    value in my array. I tried playing with the "multiline" attribute
    for the text field, it didn't seem to make any difference.
    I'm sure it's probably something silly that I've missed, but
    how do you display an array, with all of it's values to a dynamic
    text field (I even tried using the textArea component but ran into
    the same problem).
    Thanks in advance for any help-
    rich

    Thanks for your input. I tried just about everything but
    ended up re-writing the contents of the array to a var and looping
    through the var. Not my first choice but it got me to done.
    Thanks again,
    Rich

  • HTML code displays on one line in browser view source

    Hi,
    In Dreamweaver, my HTML code displays returns, spaces, etc. However, in the view source option in a browser (Firefox in particular), all the code is displayed on one single line. I only found about this because I was having problems with my Google Ads not displaying. (A Google customer service person helped me to find a workaround for this since I still haven't figured how to get my code to display correctly.) So I have gone to Preferences in DW and changed my Code Format Line Break type. The result is the same with each of the three options: the code is all on one line when you check it under view source in a browser. (The server is Linux.)
    Does anyone know how to fix this? Also, I think I know how this happened in the first place. I copied my code to TextEdit for a quick backup the other day, and then I pasted it back to DW. Bad idea? Is the only way to get the code back to normal to re-write it in a new HTML file in DW?

    Pssh. Problem solved, but I'm not quite sure how. I did go back and try to clean up some redundant CSS and other things, but the HTML/CSS validator still shows that I have this one invalid <header> tag (www.nextmontenegro.com), but since that was written as part of the DW template, I just left it. Weird. Anyway, the code flows down the page now.
    Thanks for the quick replies and helpful hints:-)

  • Please help me decide on an all-in-one

    Hoping to buy an all-in-one soon mainly for uni work. Will also be using it for general web browsing, youtube, watching movies, etc. No gaming. 
    These are my options so far. If anyone could please help me decide it would be much appreciated as I am just a student and don't have that muh money.
    Just thought I'd also add that I'm located in Australia and the prices below are in AUD. 
    Lenovo E73z 20" All-In-One $899 (directly from Lenovo Australia)
    http://shopap.lenovo.com/au/en/desktops/thinkcentre/all-in-ones/e73z/]ThinkCentre 
    Processor
    Intel® Core™ i5-4430S Processor (6M Cache, up to 3.20 GHz)
    Operating system
    Windows 8 64 bit
    Display type
    20.0" All In One HD+ 1600x900
    System Graphics
    Integrated Intel HD Graphics
    Total memory
    4GB DDR3 1600MHz SDRAM
    Hard drive device
    500GB / 8GB SSHD
    Optical device
    DVD Recordable
    Bluetooth
    Bluetooth 4.0 (included with WiFi module)
    Lenovo m92z 20" All-In-One $899 on eBay
    http://www.ebay.com.au/itm/Lenovo-ThinkCentre-M92z-All-in-One-20-Desktop-PC-Intel-i5-500GB-4GB-Win-7...
    Processor
    3rd Generation Intel® Core™ i5
    Operating System
    Windows 7 Professional 64
    Memory
    4GB (DDR3)
    Storage
    500GB (7,200 rpm) SATA
    Form Factor 20.0"W AIO
    Display
    20.0" wide LED 16:9 (1600x900) – non-Touch only
    Graphics
    Intel® HD graphics
    Webcam
    2.0MP HD
    Audio
    2 3W Integrated Speakers
    Digital Array Microphone
    Optical Drive
    Slim DVD-ROM/Slim DVD Recordable
    I/O (INPUT/OUTPUT) Ports
    Side
    2 USB 3.0
    Microphone jack
    Headphone jack
    Rear
    4 USB 2.0
    1 PS/2 and COM Port(optional)
    1 Display (input)
    1 Display (output)
    WiFi Connectivity
    IEEE 802.11a (5GHz)†
    IEEE 802.11b/g/n (2.4 GHz)
    Bluetooth® 4.0
    Keyboard
    Ultra Slim Plus Wireless Keyboard (optional)
    Lenovo Preferred Pro Full Size Keyboard
    Lenovo Preferred Pro Fingerprint Keyboard† (optional)
    Mouse
    Ultra Slim Plus Wireless Mouse (optional)
    Enhanced Optical Wheel Mouse (USB)
    Physical Security
    Kensington Lock
    Cable Lock
    Intrusion Switch
    Ethernet
    Integrated 10M/100M/1000M Gigabit Ethernet†
    Lenovo m92z $600 + $30 shipping (SSD included)
    http://www.ebay.com.au/itm/New-Lenovo-All-in-One-ThinkCentre-M92z-20-i3-3240-4GB-RAM-128GB-SSD-Windo...
    Operating system: Windows 7
    Processor: Intel® Core™ i3-3240
    Chipset: Intel Q77 chipset
    Memory: 4 GB RAM
    Display: 20.0" wide LED 16:9 (1600x900)
    Graphics: Intel® HD graphics
    Webcam: 2.0MP HD
    Internal Drive: 128 GB SSD
    Power Supply: 150W 85 plus
    Optical Drive: Slim DVD-ROM/Slim DVD Recordable
    Standard I/O Ports: 2 x High speed USB 2.0 (Front)
    4 x high speed USB 2.0 (back)
    2 x audio connectors (microphone and headphone) on front panel
    1 x integrated VGA port
    2 x audio connectors (audio line in and audio line out) on rear panel
    1 x RJ45 connector
    Pretty good price I think. Not sure how much of a difference the SSD will make. 
    Last option: Lenovo C560 (Import from the US) $700 + $77.42 intl shipping
    http://www.ebay.com.au/itm/Lenovo-C560-All-in-one-Computer-Intel-Core-I3-I3-4150t-3-Ghz-57327365-/39...
    BTS 2014 - Lenovo C560; Mainstream AIO; 23" 16:9 LCD w/ LED backlight 1920x1080 (FHD); Intel Core i3-4150T 2 cores 3.0GHz 4 threads 3M cache H81 chipset 35W; 6GB 1600MHz DDR3 SoDIMM; 1TB 3.5" 7200rpm; Intel HD Graphics 4400; DVD Rambo; Windows 8.1 64bit; 802.11BGN 10/100/1000M Bluetooth 4.0; 2x 3W speakers Dolby Advanced Audio V2; USB Keyboard Black; USB Optical Mouse Black; 4x USB 2.0 2x USB 3.0 HDMI out 6 in 1 card reader (SD SHC SDXC MMC MS MS-Pro) Kensington lock headphone jack microphone jack; Black w/ Graphite Stand
    Biggest screen out of the 4, not so great i3 processor (don't know if it makes much of a difference), plus risk of shipping from US and the product potentially having probems working in Australia in terms of compatabiliy, or for whatever reason.. 

    Toruk_Makto wrote:
    If you want peace of mind I vote against imported C560. I am not sure C560 has worldwide warranty as first. It seems Idea and value AiO are not sold in Australia, so spare parts availability might be an issue in any case.
    It looks nice, but overall engineering, cooling and (mechanical) parts quality is way behind ThinkCentre (M and E series).
    If you are student, you can buy E73z at educational pricing directly from lenovo - the first option costs 863 or so then, not 899. If you will use it just for "normal" work, then i3 might be just fine (it is 100$ cheaper). Any M92z is also good choice (just CPUs are one generation old)
    The M92z is now on sale on ebay for the next three days for $539.   That is a heck of a deal assuming it is not refurbished.  The only negative as Toruk mentioned is the processor is one generation old.  But I have an i5 processor in an M90z and I use it for the exact same things mentioned in the original post in this thread.  I don't have any issues. 
    The E73z is on sale on the Australian Lenovo website right now for $799.  It comes with everything probably neede including an i3 processor.
    http://shopap.lenovo.com/au/en/desktops/thinkcentre/all-in-ones/e73z/
    Machine Type: M90z AIO ; Product: 3091CTO (Custom), CPU: i5-650, Video Card: Intel(R) HD Graphics, Memory: 4.00 GB,
    Network Card: Intel(R) WiFi Link 1000 BGN, OS: Windows 7 Professional 64-bit

  • One line, one bar conky...

    Can anyone help me? Have a look at this screen:
    The bottom bar of the three is conky. I want it to show the time, gmail status and rhythmbox status all in one line across the screen, but it keeps trying to seperate it into lines.
    Here's my .conkyrc:
    # conky configuration
    # edited by kaivalagi
    # set to yes if you want Conky to be forked in the background
    background no
    # Use Xft?
    use_xft yes
    # Xft font when Xft is enabled
    xftfont Terminus:size=9
    # Text alpha when using Xft
    xftalpha 0.8
    # Update interval in seconds
    update_interval 1.0
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    # Create own window instead of using desktop (required in nautilus)
    own_window no
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    # Minimum size of text area
    minimum_size 1680 0
    # Draw shades?
    draw_shades yes
    # Draw outlines?
    draw_outline no
    # Draw borders around text
    draw_borders no
    draw_graph_borders yes
    # Stippled borders?
    stippled_borders 0
    # border margins
    border_margin 0
    # border width
    border_width 0
    # Default colors and also border colors
    default_color white
    default_shade_color black
    default_outline_color white
    # own window options
    own_window yes
    own_window_transparent no
    own_window_type widget
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    # Text alignment, other possible values are commented
    alignment top_left
    #alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 0
    gap_y 80
    # Subtract file system buffers from used memory?
    no_buffers yes
    # set to yes if you want all text to be in uppercase
    uppercase no
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale no
    # Add spaces to keep things from moving about? This only affects certain objects.
    use_spacer no
    # colours
    color1 white
    # light blue
    color2 6892C6
    # orange
    color3 E77320
    # green
    color4 78BF39
    # red
    color5 CC0000
    # variable is given either in format $variable or in ${variable}. Latter
    # allows characters right after the variable and must be used in network
    # stuff because of an argument
    # stuff after 'TEXT' will be formatted on screen
    TEXT
    ${font Droid Sans:size=8}${color1}${execpi 300 python ~/.scripts/gmail_parser.py <edited email and password> 3}{font Droid Sans:size=8}${color1}${time %H}:${time %M}${time %A}${color1}${font Droid Sans:size=10}${exec conkyRhythmbox --datatype=TI}${color1}${font Droid Sans:size=8} // ${color1}${font Droid Sans:size=8}${exec conkyRhythmbox --datatype=AR}${color1}${font Droid Sans:size=8} // ${color1}${font Droid Sans:Italic:size=8}${exec conkyRhythmbox --datatype=AL}${color1}${font Droid Sans:size=8} // ${color1}${font Droid Sans:size=7 com}${exec conkyRhythmbox --datatype=PT}/${exec conkyRhythmbox --datatype=LE}
    What am I doing wrong, O' Wise Ones?
    /izo\
    Last edited by Izobalax (2009-06-18 20:14:31)

    brisbin33 wrote:
    Izobalax wrote:For some reason the gmail checker forces a new line. Any ideas?
    i think we'd have to see gmailparser.py to help on that.
    ## check-gmail.py -- A command line util to check GMail -*- Python -*-
    ## modified to display mailbox summary for conky
    # ======================================================================
    # Copyright (C) 2006 Baishampayan Ghose <[email protected]>
    # Modified 2008 Hunter Loftis <[email protected]>
    # Time-stamp: Mon Jul 31, 2006 20:45+0530
    # This program is free software; you can redistribute it and/or modify
    # it under the terms of the GNU General Public License version 2 as
    # published by the Free Software Foundation.
    # ======================================================================
    import sys
    import urllib # For BasicHTTPAuthentication
    import feedparser # For parsing the feed
    from textwrap import wrap
    _URL = "https://mail.google.com/gmail/feed/atom"
    uname = sys.argv[1]
    password = sys.argv[2]
    maxlen = sys.argv[3]
    urllib.FancyURLopener.prompt_user_passwd = lambda self, host, realm: (uname, password)
    def auth():
    '''The method to do HTTPBasicAuthentication'''
    opener = urllib.FancyURLopener()
    f = opener.open(_URL)
    feed = f.read()
    return feed
    def readmail(feed, maxlen):
    '''Parse the Atom feed and print a summary'''
    atom = feedparser.parse(feed)
    print '${color1} %s new email(s)\n' % (len(atom.entries))
    # for i in range(min(len(atom.entries), maxlen)):
    # print ' ${color2}%s' % atom.entries[i].title
    #uncomment the following line if you want to show the name of the sender
    # print ' ${color2}%s' % atom.entries[i].author
    # if len(atom.entries) > maxlen:
    # print ' ${color}more...'
    if __name__ == "__main__":
    f = auth() # Do auth and then get the feed
    readmail(f, int(maxlen)) # Let the feed be chewed by feedparser
    /izo\

Maybe you are looking for

  • What's wrong with iTunes Canada?

    What's wrong with iTunes Canada? It's becoming archaic. While the UK store is selling TV programs and now has the iPhone, the neighboring country to the United States has nothing new since iTunes U came out. No movies, no TV programs, no iPhone... An

  • How to stop AdobeReader (or Acrobat) to open in Safari?

    Hi, I'm running OS 10.4.5 and Safari 2.0.3. Recently I updated Adobe Reader as well as Acrobat to v. 7.0.7 (On and off I still need them). Before that, when downloading a .PDF, I had set it to be viewed with Preview within Safari. Now it's always Acr

  • Snow Leopard language question

    Hi I have a Macbook with Leopard in english, I bought Snow Leopard in the Mexico online Apple Store because I live in the border and it was easier for me, and my order says MAC OS X 10.6 SNOW LEOPARD RETAIL-SPA, my question is, am I gonna have Snow L

  • Elements 3.0 help

    I had Elements 3.0 installed on my home computer. My computer crashed and everything had to be re-installed. I can not put my hands on the disc for 3.0 but I do have my serial number. I downloaded PSE 10.0 and every time I try to use it, it shuts dow

  • Error in Manual BRS

    Dear Experts,           I am stuck up with one issue regarding manual BRS, my end user entered statement in FF67 and run it in FEBA closing balance is matching with bank balance. But one transaction still  showing in open item although BRS was succes