Tokenizer headaches and displaying output - Help!!

Hi all,
I am writing a program that inputs a line of text, converting each word into Pig Latin
(I know it's crazy , but that's what the book wants me to do).... now I am converting
the words ( hello = ellohay, turnip = urniptay, etc etc) just fine... The problem I am experiencing is when I display the whole string of tokens, only the last word is displaying, I am counting the tokens and the count reflects the correct number of words (tokens)... I know it's something stupid ...... I'm sure it's in the "while" logic.....
Thanks in advance
Mike
// Exercise 10.11:
// Pig Latin word creation
// Java core packages
import java.util.*;
import java.awt.*;
import java.awt.event.*;
// Java extension packages
import javax.swing.*;
public class Ex10pt11 extends JFrame {
private JLabel promptLabel;
private JTextField inputField;
private JTextArea outputArea;
// set up GUI and event handling
public Ex10pt11()
super( "Pig Latin Translator" );
Container container = getContentPane();
container.setLayout( new FlowLayout() );
promptLabel =
new JLabel( "Enter a sentence" );
container.add( promptLabel );
inputField = new JTextField( 20 );
inputField.addActionListener(
// anonymous inner class
new ActionListener() {
// handle text field event
public void actionPerformed( ActionEvent event )
String myString = event.getActionCommand();
String singleWord = new String();
StringBuffer bigBuffer = new StringBuffer();
StringTokenizer myTokens = new StringTokenizer( myString );
myTokens.countTokens() ;
outputArea.setText( "Number of elements: " +
myTokens.countTokens() + "\nThe tokens are:\n" );
while ( myTokens.hasMoreTokens() )
singleWord = myTokens.nextToken() ;
StringBuffer modBuffer = new StringBuffer(singleWord) ;
char charArray[] = new char[modBuffer.length() ] ;
modBuffer.getChars( 0, 1, charArray, 0 ) ;
modBuffer.append( charArray[0] ) ;
modBuffer.append("ay ") ;
modBuffer.deleteCharAt( 0 ) ;
outputArea.append(modBuffer + "\n") ;
} // end anonymous inner class
); // end call to addActionListener
container.add( inputField );
outputArea = new JTextArea( 10, 20 );
outputArea.setEditable( false );
container.add( new JScrollPane( outputArea ) );
setSize( 275, 260 ); // set the window size
show(); // show the window
// execute application
public static void main( String args[] )
Ex10pt11 application = new Ex10pt11();
application.addWindowListener(
// anonymous inner class
new WindowAdapter() {
// handle event when user closes window
public void windowClosing( WindowEvent windowEvent )
System.exit( 0 );
} // end anonymous inner class
); // end call to addWindowListener
} // end method main
} // end class

You for got to put the block that folows the while loop in a block...... change it to like this
while (myTokens.hasMoreTokens() ){
     singleWord = myTokens.nextToken() ;
     StringBuffer modBuffer = new StringBuffer(singleWord) ;
     char charArray[] = new char[modBuffer.length() ] ;
     modBuffer.getChars(     0, 1, charArray, 0 ) ;
     modBuffer.append( charArray[0] ) ;
     modBuffer.append("ay ")     ;
     modBuffer.deleteCharAt(     0 )     ;
     outputArea.append(modBuffer     + "\n")     ;
appu

Similar Messages

  • Rows to columns/Transpose the records Query and Display output

    hi ,
    can anyone help me query this and transpose it to this format?
    i am still a beginner in sql.
    thanks for help!
    Rows to columns/Transpose the records Query and Display output
    id     startdate     endate                    
    1111     1/2/2001     11/3/2001                    
    1111     2/5/2002     4/3/2002                    
    1111     2/6/2000     2/5/2001                    
    3333     5/2/2003     11/3/2003                    
    3333     6/2/2003     12/3/2003                    
    3333     2/6/2005     2/5/2005                    
    desired output     
    id     startdate1     endate1     startdate2     endate2     startdate3     endate3
    1111     1/2/2001     11/3/2001     2/5/2002     4/3/2002     2/6/2000     2/5/2001
    3333     5/2/2003     11/3/2003     6/2/2003     12/3/2003     2/6/2005     2/5/2005

    Have you only 3 dates for each id ?
    So, try :
    SQL> l
      1  with tbl as
      2  (select 1111 as id, to_date('01/02/2001','DD/MM/YYYY') startdate, to_date('11/03/2001','DD/MM/YYYY') enddate from dual union all
      3  select 1111 as id, to_date('02/05/2002','DD/MM/YYYY') startdate, to_date('04/03/2002','DD/MM/YYYY') enddate from dual union all
      4  select 1111 as id, to_date('02/06/2000','DD/MM/YYYY') startdate, to_date('02/05/2001','DD/MM/YYYY') enddate from dual union all
      5  select 3333 as id, to_date('05/02/2003','DD/MM/YYYY') startdate, to_date('11/03/2003','DD/MM/YYYY') enddate from dual union all
      6  select 3333 as id, to_date('06/02/2003','DD/MM/YYYY') startdate, to_date('12/03/2003','DD/MM/YYYY') enddate from dual union all
      7  select 3333 as id, to_date('02/06/2005','DD/MM/YYYY') startdate, to_date('02/05/2005','DD/MM/YYYY') enddate from dual )
      8  select id, max(decode(dr,1,startdate)) start1,
      9             max(decode(dr,1,enddate)) end1,
    10             max(decode(dr,2,startdate)) start2,
    11             max(decode(dr,2,enddate)) end2,
    12             max(decode(dr,3,startdate)) start3,
    13             max(decode(dr,3,enddate)) end3
    14  from (select id, startdate,enddate, dense_rank() over (partition by id order by startdate) dr from tbl)
    15* group by id
    SQL> /
                                                    ID START1   END1     START2   END2     START3   END3
                                                  1111 02/06/00 02/05/01 01/02/01 11/03/01 02/05/02 04/03/02
                                                  3333 05/02/03 11/03/03 06/02/03 12/03/03 02/06/05 02/05/05
    SQL> HTH,
    Nicolas.

  • Help! one to many relationship table and display output as exists

    I have two tables:
    Table1: LOCATION with field locn_id
    Table2: TRACKING with field from_locn and to_locn
    Example
    locn_id from_locn to_locn
    26001A 26001A 26002A
    26002A 26001A 26001B
    26001B 26001A 26001C
    26001C
    I am linking locn_id to from_locn.
    I want to display output as:
    If locn_id exists in from_locn (I dont care how many records), display Y. If locn_id does not exist then display N.
    So in above case, output should be
    26001A Y
    26002A N
    26001B N
    26001C N

    Here is my try:
    create table LOCATION(locn_id   VARCHAR2(10));
    create table TRACKING(locn_id   VARCHAR2(10), from_locn  VARCHAR2(10), to_locn  VARCHAR2(10));
    insert into LOCATION values('26001A');
    insert into LOCATION values('26002A');
    insert into LOCATION values('26001B');
    insert into LOCATION values('26001C');
    insert into TRACKING values('26001A', '26001A', '26002A');
    insert into TRACKING values('26002A', '26001A', '26001B');
    insert into TRACKING values('26001B', '26001A', '26001C');
    insert into TRACKING values('26001C', '',       ''      );
    select l.locn_id,
    (select decode(count(*), 0, 'N', 'Y') from tracking t where l.locn_id = t.from_locn ) exists_flag
    from   location l
    LOCN_ID    E
    26001A     Y
    26002A     N
    26001B     N
    26001C     N
    4 rows selected.Edited by: Thomas Morgan on May 31, 2013 3:43 PM

  • How to retreive and display output list from BAPI

    Hello
    I am making an applcation using SUP 2.0, and this application make an user to get leave history using a Mobile System from SUP.
    I've created the MBO as Attributes using the BAPI: BAPI_LEAVE_HISTORY.
    This BAPI has some parameters IN and OUT.
    Input parameters are Employee Id and date.
    The parameter OUT is a List that retreives the employee leave history.
    Anyone has an Idea or example how to retreive the output from BAPI and displaying the output on a screen.
    Any tips or blogs that can help me?
    Thanks all!
    Satish

    Hi David Brandow,
    I have tried your solution where I just created a MBO for my 'operation' and I'm using sync parameters to execute the RFC.
    The problem I'm facing is, for example, if I create a record it gets saved in the MBO table and the record successfully gets created in SAP as well after a sync. But when I create another record and sync, the previously saved record in MBO table also gets executed so I'm getting duplicate entries in SAP.
    Have you or anyone faced this problem?
    Any response is appreciated. Please let me know if I'm not clear, I realized its a complicated scenario.
    Thanks,
    Sandeep

  • Reading Contents of File and displaying output

    I'm trying to read the contents of a file, then loop through the contents, perform some formatting, and display the output. Should I read the file into an array? What is the best approach? Thanks in advance.

    Depends. Is it a text file? Can you format each line independent of others? If so, you can just read one line at a time (BufferedReader) and pass it to wherever the display is. If you need to work on the file as a whole, then you need read it all at once.

  • How to run and displaying output of java file in jsp page ???

    Hai,
    I am going to develop a website which would have everything about java.
    Example code displayed for all methods.Next to every Example i shoud have *"Run"* button.
    Click at Run button should compile the example and show the output or even error.
    Ex:If the user clicks the vector link then all the examples will be shown..
    import java.util.*;
    etc...
    Run button-onclick it shoud compile the code above and shoud show the output....
    I don't know how to get the console error and output..
    kindly help me out....Thanks.

    Check java.lang.Runtime API.

  • MAC Mini Performance and display quality help needed!

    I am new to the mac, having used pcs for what feels like hundreds of years.
    I am enjoying the experience, but my MAC mini is so slow. Its a 2014 i5 2.6 Ghz with 8GB of RAM.
    For example starting safari takes 20+ seconds from clicking the icon to being able to type a web address.
    Also the display is not brilliant the text is blurred. I am using a LG HD Monitor running at 1920 x 1080 and 60 Hz.
    I have a Dell PC with very similar specs connected to the same monitor and it does not suffer blurred display.
    Thanks for your help

    EtreCheck version: 2.2 (132)
    Report generated 5/4/15, 11:26 AM
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        Mac mini (Late 2014) (Technical Specifications)
        Mac mini - model: Macmini7,1
        1 2.6 GHz Intel Core i5 CPU: 2-core
        8 GB RAM Not upgradeable
            BANK 0/DIMM0
                4 GB DDR3 1600 MHz ok
            BANK 1/DIMM0
                4 GB DDR3 1600 MHz ok
        Bluetooth: Good - Handoff/Airdrop2 supported
        Wireless:  en1: 802.11 a/b/g/n/ac
    Video Information: ℹ️
        Intel Iris
            IPS237 1920 x 1080
    System Software: ℹ️
        OS X 10.10.3 (14D136) - Time since boot: 0:9:48
    Disk Information: ℹ️
        APPLE HDD HTS541010A9E662 disk0 : (1 TB)
            EFI (disk0s1) <not mounted> : 210 MB
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
            Macintosh HD (disk1) / : 998.98 GB (641.30 GB free)
                Core Storage: disk0s2 999.35 GB Online
    USB Information: ℹ️
        Apple, Inc. IR Receiver
        Apple Inc. BRCM20702 Hub
            Apple Inc. Bluetooth USB Host Controller
        Microsoft Microsoft® LifeCam Cinema(TM)
        Hercules Rocksmith USB Guitar Adapter
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
        Anywhere
    Kernel Extensions: ℹ️
            /Library/Application Support/VirtualBox
        [loaded]    org.virtualbox.kext.VBoxDrv (4.3.26) [Click for support]
        [loaded]    org.virtualbox.kext.VBoxNetAdp (4.3.26) [Click for support]
        [loaded]    org.virtualbox.kext.VBoxNetFlt (4.3.26) [Click for support]
        [loaded]    org.virtualbox.kext.VBoxUSB (4.3.26) [Click for support]
            /Library/Extensions
        [loaded]    com.sophos.kext.sav (9.2.50 - SDK 10.8) [Click for support]
        [loaded]    com.sophos.nke.swi (9.2.50 - SDK 10.8) [Click for support]
            /System/Library/Extensions
        [not loaded]    com.motorola-mobility.driver.MotMobileUSB (1.2.2 - SDK 10.5) [Click for support]
            /System/Library/Extensions/MotMobileUSB.kext/Contents/PlugIns
        [not loaded]    com.motorola-mobility.driver.MotMobileMS (1.0.0 - SDK 10.5) [Click for support]
        [not loaded]    com.motorola-mobility.driver.MotMobileMTP (1.2.2 - SDK 10.5) [Click for support]
        [not loaded]    com.motorola-mobility.driver.MotMobileUSBLAN (1.2.2 - SDK 10.5) [Click for support]
        [not loaded]    com.motorola-mobility.driver.MotMobileUSBLANMerge (1.2.2 - SDK 10.5) [Click for support]
        [not loaded]    com.motorola-mobility.driver.MotMobileUSBSwch (1.2.2 - SDK 10.5) [Click for support]
    Launch Agents: ℹ️
        [not loaded]    com.adobe.AAM.Updater-1.0.plist [Click for support]
        [loaded]    com.mokafive.m5tray.plist [Click for support]
        [failed]    com.motorola.MDMUpdater.plist [Click for support] [Click for details]
        [running]    com.motorola.motohelper.plist [Click for support]
        [loaded]    com.motorola.motohelperUpdater.plist [Click for support]
        [loaded]    com.oracle.java.Java-Updater.plist [Click for support]
        [running]    com.sophos.uiserver.plist [Click for support]
        [failed]    net.juniper.pulsetray.plist [Click for support] [Click for details]
    Launch Daemons: ℹ️
        [loaded]    com.adobe.fpsaud.plist [Click for support]
        [loaded]    com.ea.origin.ESHelper.plist [Click for support]
        [loaded]    com.microsoft.office.licensing.helper.plist [Click for support]
        [running]    com.motorola-mobility.mmcfgd.plist [Click for support]
        [loaded]    com.oracle.java.Helper-Tool.plist [Click for support]
        [loaded]    com.oracle.java.JavaUpdateHelper.plist [Click for support]
        [running]    com.sophos.common.servicemanager.plist [Click for support]
        [loaded]    jp.co.canon.IJNetworkToolHelper.plist [Click for support]
        [failed]    net.juniper.AccessService.plist [Click for support]
        [not loaded]    net.juniper.UninstallPulse.plist [Click for support]
        [not loaded]    org.virtualbox.startup.plist [Click for support]
    User Launch Agents: ℹ️
        [loaded]    com.google.keystone.agent.plist [Click for support]
        [failed]    com.lastpass.LastPassHelper.plist [Click for support] [Click for details]
        [running]    com.spotify.webhelper.plist [Click for support]
        [loaded]    com.valvesoftware.steamclean.plist [Click for support]
        [not loaded]    org.virtualbox.vboxwebsrv.plist [Click for support]
    User Login Items: ℹ️
        iTunesHelper    Application  (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
        Dropbox    Application  (/Applications/Dropbox.app)
        Google Chrome    Application  (/Applications/Google Chrome.app)
        Canon IJ Network Scanner Selector2    Application Hidden (/Library/Printers/Canon/IJScanner/Utilities/Canon IJ Network Scanner Selector2.app)
        Skype    Application Hidden (/Applications/Skype.app)
    Internet Plug-ins: ℹ️
        FlashPlayer-10.6: Version: 17.0.0.169 - SDK 10.6 [Click for support]
        EPPEX Plugin: Version: 10.0 [Click for support]
        Flash Player: Version: 17.0.0.169 - SDK 10.6 [Click for support]
        Default Browser: Version: 600 - SDK 10.10
        QuickTime Plugin: Version: 7.7.3
        SharePointBrowserPlugin: Version: 14.4.9 - SDK 10.6 [Click for support]
        nplastpass: Version: 3.1.89 - SDK 10.10 [Click for support]
        Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Click for support]
        MeetingJoinPlugin: Version: Unknown - SDK 10.6 [Click for support]
        JavaAppletPlugin: Version: Java 8 Update 40 Check version
    Safari Extensions: ℹ️
        Evernote Web Clipper
        PasswordBox
    3rd Party Preference Panes: ℹ️
        Flash Player  [Click for support]
        FUSE for OS X (OSXFUSE)  [Click for support]
        Java  [Click for support]
        MusicManager  [Click for support]
    Time Machine: ℹ️
        Time Machine not configured!
    Top Processes by CPU: ℹ️
             4%    WindowServer
             1%    fontd
             1%    loginwindow
             1%    Google Chrome Helper(13)
             0%    taskgated
    Top Processes by Memory: ℹ️
        909 MB    Google Chrome Helper(13)
        674 MB    kernel_task
        467 MB    mdworker(12)
        401 MB    com.apple.WebKit.WebContent(5)
        180 MB    SophosScanD
    Virtual Memory Information: ℹ️
        1.24 GB    Free RAM
        6.76 GB    Used RAM
        0 B    Swap Used
    Diagnostics Information: ℹ️
        May 4, 2015, 10:08:53 AM    /Users/[redacted]/Library/Logs/DiagnosticReports/Google Chrome_2015-05-04-100853_[redacted].crash
        May 2, 2015, 07:47:11 AM    /Users/[redacted]/Library/Logs/DiagnosticReports/EvernoteHelper_2015-05-02-0747 11_[redacted].crash
        May 4, 2015, 11:13:54 AM    Self test - passed
        May 4, 2015, 10:02:56 AM    /Library/Logs/DiagnosticReports/Microsoft AutoUpdate_2015-05-04-100256_[redacted].cpu_resource.diag [Click for details]
        May 2, 2015, 09:13:07 AM    /Library/Logs/DiagnosticReports/Microsoft AutoUpdate_2015-05-02-091307_[redacted].cpu_resource.diag [Click for details]

  • PL/SQL...Unsure how to loop thru multiple questions and display output?

    This is my first pl/sql program, I've written psudocode on paper, but not sure what to do for two parts.
    What I'm trying to do is write pl/sql that will check a row based on an employee id #.
    declare
    cursor cur is
    select *
    from employee
    where employee_id = foo;What we are checking are the results the employee answered. They have answered 180 questions and I want to find when the answer a 0, 7, and 9.
    Basically the pl/sql has to loop thru the 180 questions
    loop
    v_count := vcount + 1
    select *
    from employee
    where q1 thru q180 in (0, 7, 9);
    end loop;
    dbms_output.put_line ('Employee ID' || employee_id);
    dbms_output.put_line ('Q1 - Q180' || q1 - q180); I'm not sure how to write the pl/sql to loop thur all 180 questions.
    I'm not sure how to display the output to show what question they scored a 0, 7, and/or a 9 on.
    thanks
    Message was edited by:
    cmmiller

    536 columns in one table? Yowsa. Without a normalized table, you are going to need dynamic pl/sql and a messy solution.
    I would rethink your design, and come up with something more like so:
    employee
    questions
    employee_responses
    So that would you could easily do something like this:
    declare
      cursor c1 is
        select ers.question_id,
               que.question_name,
               ers.rating
          from employee emp,
               questions que,
               employee_responses ers
         where emp.employee_id = ers.employee_id and
               que.question_id = ers.question_id and
               emp.employee_id = v_employee_id and
               ers.rating in (0, 7, 9) and
               que.enabled_flag = 'Y';
    begin
      for r1 in c1 loop
        dbms_output.put_line('Question: '||r1.question_name);
        dbms_output.put_line('Employee Rated this: '||r1.rating);
      end loop;
    end;Thats how I would do it - I think you are going down the wrong path. What happens if you need to create a new question or delete one? You constantly have to modify the table. Hope this helps

  • Adding field in selection sreen and display output

    Hi,
    i got an requirement that to add a field in selection screen i have done that but abgru is reason for rejection if u give in selection screen that reason for rej : Z5 it should come only Z5 related sales orders only but here all the sales orders are displaying ,can any one check this code and correct it ans send me plz.
    select-options: s_abgru for vbap-abgru.
    DATA:  lv_vbtyp LIKE vbak-vbtyp,
             lv_bsark LIKE vbak-bsark,
             lv_matnr LIKE vbap-matnr,
             lv_abgru LIKE vbap-abgru.---->reason for rej
      IF NOT s_abgru IS INITIAL.
        SELECT SINGLE abgru INTO lv_abgru FROM vbap WHERE abgru IN s_abgru.
        IF sy-subrc NE 0.
          MESSAGE e000 WITH 'Invalid Reason for Rejection '.
        ENDIF.
      ENDIF.
    i have written this above code .plz correct it and send me /
    Thanks in advance,

    Hi
    You need to use the field in your select statement in the where condition.
    like
    REPORT  ytest.
    TABLES: vbak, vbap.
    TYPES: BEGIN OF ty_itab,
           vbtyp TYPE vbtyp,
           bsark TYPE bsark,
           matnr TYPE matnr_d,
           END OF ty_itab.
    DATA: itab TYPE STANDARD TABLE OF ty_itab WITH HEADER LINE.
    SELECT-OPTIONS: s_augru FOR vbak-augru.
    START-OF-SELECTION.
      SELECT k~vbtyp
             k~bsark
             p~matnr
             INTO TABLE itab
             FROM vbak AS k INNER JOIN
                  vbap AS p ON
                  kvbeln = pvbeln
             WHERE augru IN s_augru.
    Regards
    Raj

  • Get input and display output on same screen for report

    Hi frnds,
    two params
    that is mat.no,desc.
    enter the mat.no and also display the description of that mat.no in same input screen for the report.
    How can i archieve .
    Thanks in advance.

    Hi,
    It is not possible in Dialog Programming too. But there is an alternative. You can make the material number field as drop down. Assign a function code to that. Now in PAI you can code accordingly to display the description.
    In TOP.
    TABLES: mara, makt.
    DATA  gv_maktx TYPE makt-maktx.
    In PAI.
    CASE sy-ucomm.
    WHEN 'F_MATNO'        "function code assigned to the material number drop down field
         SELECT SINGLE maktx
          FROM makt
          INTO gv_maktx
          WHERE matnr = mara-matnr. " mara-matnr is the dictionary reference to the material number drop down field in the screen.
          makt-maktx = gv_maktx.    " makt-maktx is the dictionary reference to the material description field in the screen.
    ENDCASE.
    Thanks,
    Sri.

  • Powershell script for pinging computers from a text file and displaying output with ip address

    i am currently using the following script to display the computers that are pinging, i also want the script to display the
    ipaddress along with the results but the results are displayed not properly, i want the result to be displayed in a table or list format, what am i missing?
    $ServerName = Get-Content "C:\scripts\computers.txt"
    foreach ($Server in $ServerName) {
    if (test-Connection -ComputerName $Server -Count 2 -Quiet) {
    "$Server is Pinging "
    } else
    {"$Server not pinging"
    foreach ($server in $servername) {
    Get-WmiObject -class "Win32_NetworkAdapterConfiguration"|Select-Object IPAddress|Format-List

    Not sure I completely understand your question but looking at the code you posted I see one fairly simple change that may be what you are missing...your Get-WMIObject statement never passes a server name to the command.  You loop through the list
    you obtained but never actually pass that to anything.  So the simple change would be to just do the following...
    foreach($server in $servername)
    Get-WMIObject -class win32_NetworkAdapterConfiguration -computername $server
    | select IPAddress | FT -auto
    you could also tuck that command into the previous foreach/if/else statement and just do each one that actually responds. 

  • WD Compoenent - Non -Interactive form- Not displaying output

    Hi,
    I am practicing this adobe form session [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/a3e2f018-0b01-0010-c7a8-89deb6e63e97] from SDN.Unfortunately this session was not complete so I am trying to complete it.
    In brief : this WD component accepts CARRID and displays output in PDF format.
    I was able to capture selection and get respective entries for that selection in my internal table but my display is blank.Here is what I coded in Search Button..
    method ONACTIONSEARCH .
        data: isflight type table of sflight.
        DATA lo_nd_adobe_data TYPE REF TO if_wd_context_node.
        DATA lo_el_adobe_data TYPE REF TO if_wd_context_element.
        DATA lo_nd_data_selections TYPE REF TO if_wd_context_node.
        DATA lo_el_data_selections TYPE REF TO if_wd_context_element.
        DATA ls_data_selections TYPE wd_this->element_data_selections.
    * navigate from <CONTEXT> to <DATA_SELECTIONS> via lead selection
        lo_nd_data_selections = wd_context->get_child_node( name = wd_this->wdctx_data_selections ).
    * get element via lead selection
        lo_el_data_selections = lo_nd_data_selections->get_element(  ).
    * get all declared attributes
        lo_el_data_selections->get_static_attributes(
          IMPORTING
            static_attributes = ls_data_selections ).
    * Retrieve that data from the database. Normally it is suggested to
    * encapsulate the data retrieval in a separate class.
    * For simplicity, the SELECT statement has been implemented here.
        clear isflight. refresh isflight.
        select * into corresponding fields of table isflight from sflight
        where carrid =  ls_data_selections.
    * navigate from <CONTEXT> to <ADOBE_DATA> via lead selection
        lo_nd_adobe_data = wd_context->get_child_node( name = `ADOBE_DATA` ).
        lo_nd_adobe_data->bind_elements( isflight ).
    endmethod.
    endclass.
    Anything wrong with my code..I am getting my data in  isflight internal table.
    FYI..I am throwing output as text field in adobe form.
    rgds
    vara
    Edited by: Vara K on Jan 19, 2009 9:51 PM
    Edited by: Vara K on Jan 19, 2009 10:02 PM

    Hi Vara,
    Try this:
    method ONACTIONSEARCH .
        data: isflight type table of sflight.
        DATA lo_nd_adobe_data TYPE REF TO if_wd_context_node.
        DATA lo_el_adobe_data TYPE REF TO if_wd_context_element.
        DATA lo_nd_data_selections TYPE REF TO if_wd_context_node.
        DATA lo_el_data_selections TYPE REF TO if_wd_context_element.
        DATA ls_data_selections TYPE wd_this->element_data_selections.
    * navigate from <CONTEXT> to <DATA_SELECTIONS> via lead selection
        lo_nd_data_selections = wd_context->get_child_node( name = wd_this->wdctx_data_selections ).
    * get element via lead selection
        lo_el_data_selections = lo_nd_data_selections->get_element(  ).
    * get all declared attributes
        lo_el_data_selections->get_static_attributes(
          IMPORTING
            static_attributes = ls_data_selections ).
    * Retrieve that data from the database. Normally it is suggested to
    * encapsulate the data retrieval in a separate class.
    * For simplicity, the SELECT statement has been implemented here.
    *    clear isflight. refresh isflight.
        select * into corresponding fields of table isflight from sflight
        where carrid =  ls_data_selections-carrid.
    * navigate from <CONTEXT> to <ADOBE_DATA> via lead selection
        lo_nd_adobe_data = wd_context->get_child_node( name = `ADOBE_DATA` ).
        lo_nd_adobe_data->bind_elements( isflight ).
    endmethod.
    I hope it helps.
    Regards
    Arjun

  • T520 Display Output

    We're currently looking for a new Demonstration Laptop, and the T520 and W520 look like being contenders. Ok they're not as portable as some, but that isn't the main factor for us. Our primary considerations are performance and Display Output.
    We require a machine that is capable of outputting at SXGA (1280x1024), which basically limits us to higher-end displays. Could anyone confirm if this setting is available on the T520/W520 1920x1080?
    Thanks in advance
    Solved!
    Go to Solution.

    I don't suppose the Extend option is a viable option? PowerPoint has a presentation mode where it presents you with your slide + notes on the laptop screen while the projector is all slide.
    W520: i7-2720QM, Q2000M at 1080/688/1376, 21GB RAM, 500GB + 750GB HDD, FHD screen
    X61T: L7500, 3GB RAM, 500GB HDD, XGA screen, Ultrabase
    Y3P: 5Y70, 8GB RAM, 256GB SSD, QHD+ screen

  • // Code Help need .. in Reading CSV file and display the Output.

    Hi All,
    I am a new Bee in code and started learning code, I have stared with Console application and need your advice and suggestion.
    I want to write a code which read the input from the CSV file and display the output in console application combination of first name and lastname append with the name of the collage in village
    The example of CSV file is 
    Firstname,LastName
    Happy,Coding
    Learn,C#
    I want to display the output as
    HappyCodingXYZCollage
    LearnC#XYXCollage
    The below is the code I have tried so far.
     // .Reading a CSV
                var reader = new StreamReader(File.OpenRead(@"D:\Users\RajaVill\Desktop\C#\input.csv"));
                List<string> listA = new List<string>();
                            while (!reader.EndOfStream)
                    var line = reader.ReadLine();
                    string[] values = line.Split(',');
                    listA.Add(values[0]);
                    listA.Add(values[1]);
                    listA.Add(values[2]);          
                    // listB.Add(values[1]);
                foreach (string str in listA)
                    //StreamWriter writer = new StreamWriter(File.OpenWrite(@"D:\\suman.txt"));
                    Console.WriteLine("the value is {0}", str);
                    Console.ReadLine();
    Kindly advice and let me know, How to read the column header of the CSV file. so I can apply my logic the display combination of firstname,lastname and name of the collage
    Best Regards,
    Raja Village Sync
    Beginer Coder

    Very simple example:
    var column1 = new List<string>();
    var column2 = new List<string>();
    using (var rd = new StreamReader("filename.csv"))
    while (!rd.EndOfStream)
    var splits = rd.ReadLine().Split(';');
    column1.Add(splits[0]);
    column2.Add(splits[1]);
    // print column1
    Console.WriteLine("Column 1:");
    foreach (var element in column1)
    Console.WriteLine(element);
    // print column2
    Console.WriteLine("Column 2:");
    foreach (var element in column2)
    Console.WriteLine(element);
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

Maybe you are looking for

  • Internal speakers don't work

    My husband uses the dual USB late 2001 iBook more than I do, mainly with Toast and a Griffin iMic to copy our old vinyl records to CDs, and to run VirtualPC for his PC model railroad design app. He does all this in OS 9.2.2. I used the iBook yesterda

  • Inbound IDoc incurs FI/CO interface error: Line item entered several times

    We encountered an error in an attempt to post a financial transaction document with multiple line items. The Paid In/Paid Out IDoc 210266 was created in the transaction WPUF as follows: Customer: 711 Transaction Date: 08/22/2008 Transaction Type: ZPO

  • A730 keyboard and mouse compatibility with other machines

    I would like to have a USB keyboard mouse with the machine.  Unfortunately there is not an option for that with this machine.  I would like to sell the k/m that comes with the machine. What machines including ones not made my Lenovo would the k/m be

  • HT4914 how can i cancel my itunes match

    Hi, good evening. I have a question last year I suscribed on itunes match, but I want to cancel it, how can i make it? Thank You.

  • Installing anc configuring Mysql 4.0.x or 4.1.x

    Hi ive got Solaris 10 installed and configured however im having major dramas with the installation of Mysql 4.0.21 which i downloaded from sunfreeware, ive installed using pkgadd and all seems well, but when i try to start the mysql service or mysql