Guess the Output ??

Hi guys ,
Can anyone please explain me the out put of this code snippet ..
class A { }
class B extends A { }
class C extends B {
static void doSomething ( A x , A y ) {System.out.print("AA");}
static void doSomething ( A x , B y ) {System.out.print("AB");}
static void doSomething ( B x , A y ) {System.out.print("BA");}
static void doSomething ( B x , B y ) {System.out.print("BB");}
static void doSomething ( C x , C y ) { System.out.println("CC");}
public static void main(String[] args) {
doSomething(null,null);
Answer is : CC
I didnt understand how its working , please show some light .
Additional Notes : if u comment out ..static void doSomething ( C x , C y ) { System.out.println("CC");}
then it wud print "BB" and if u comment out the BB line , then it would throw error ???
Thnx
Suren

Suren_singh_khatana wrote:
Thanks for the quick turn around !! Could you please explain what do you mean by the term "more specific" here ?
How (c,c) is more specific then (B,B) because method is invoked from class C ??Like I said: "furthest" from object. The most derived class.
C is a subclass of B, so C is "more specific" or "more derived" or "further from object" than B. Likewise, B is a subclass of A, so it's more specific than A.
void foo(Object o) {}
void foo (String s) {}
Object o = new Object();
String s = "abc";
foo(o);
foo(s);In foo(o), it has to be the foo(Object) that's called, because o is not a string.
In foo(s), either one would work, since s is a String and s is also an Object. foo(String) is what gets called, because it's a more precise match than foo(Object).

Similar Messages

  • Bluetooth Speaker sometimes missing in the output list

    Hi all !
    My computer runs on the latest version of Gnome Shell, with pulseaudio as the sound manager.
    I have a bluetooth speaker (Creative D100); I can pair it with my computer without any problem, but *sometimes* after having paired it successfully, the speaker doesn't appear in the list of the output device of the Pulseaudio panel. I need to either un-pair the speaker, restart Gnome-Shell, or sometimes even reboot my computer.
    It doesn't occur every day, but when it does, that's pretty annoying.
    I've searched on the net, but so far I could only find people who simply had a library missing or so, which doesn't seem to be my current problem =/
    Does this sound familiar to somebody ?

    Hi,
    The heading are in the table pt_fcat - you don't seem to be passing that in form....
    PERFORM setup_and_display_alv_ver2
    USING
    it_out_alvp "Parameter structure
    it_output[] "Internal Data table(header table)
    it_output[]. "Dummy table for Hierarchical ALV!!(item table)
    which I guessing in in one of the includes?
    Saying that the extract pof code does not show where you are calling form it_out_alv_fieldcat_before ...which populates the headings...
    Regards
    Stu

  • Column headings are missing in the output for ALV?

    Hi all,
    i have coded a small report in ALV mode. i am getting the data but the column headings are missing.
    iam not getting the column headings in the output. it is coming as blank. Could you all please help me out in this?
    below is the code of my program:
                     Includes                                            *
    *---Standard header and footer routines
    INCLUDE zsrepthd.
    *--- ALV Routines
    INCLUDE zvsdi_alv_routines_ver3.
    *--- Authorization Check
    INCLUDE z_selection_auth_check.
                     Types Declarations                                  *
    tables : ekpo.
                     Types Declarations                                  *
    TYPES: BEGIN OF ty_ekpo,
            EBELN(18) TYPE C,
            EBELP(20) TYPE C,
            MATNR(18) TYPE C,
            WERKS(11) TYPE C,
          END OF ty_ekpo.
    *-Output field name
    TYPES: BEGIN OF ty_output,
            EBELN(18) TYPE C,
            EBELP(20) TYPE C,
            MATNR(18) TYPE C,
            WERKS(11) TYPE C,
          END OF ty_output.
    *-Output field name
    TYPES: BEGIN OF ty_fields,
            fname(60) TYPE c,
           END OF ty_fields.
                     Internal Table Declarations                         *
    DATA:it_ekpo TYPE STANDARD TABLE OF ty_ekpo,
    *--- Alv parameters
        it_out_alvp TYPE typ_alv_form_params, "for alv parameters
    *-Field catalog  for ALV display
        it_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    *-Field names for Excel column headings
    it_ekpo_fields TYPE STANDARD TABLE OF ty_fields WITH HEADER LINE.
    **--To store output for Principial Pegging data
    DATA: BEGIN OF it_output occurs 0,
            EBELN(18) TYPE C,
            EBELP(20) TYPE C,
            MATNR(18) TYPE C,
            WERKS(11) TYPE C,
          END OF it_output.
    **--To store output for 2nd
    DATA: BEGIN OF it_output1 occurs 0,
            text(2000),
           END OF it_output1.
                     Data Declarations                                   *
    data: v_ebeln TYPE ekpo-ebeln,
          v_ebelp TYPE ekpo-ebelp,
          v_matnr TYPE ekpo-matnr,
          v_werks TYPE ekpo-werks.
                     Constants Declarations                              *
    CONSTANTS:
         c_0    TYPE i     VALUE  0,
         c_x    TYPE char1 VALUE  'X',
         c_i    TYPE char1 VALUE  'I',
         c_eq   TYPE char2 VALUE  'EQ',
         c_ekpo  TYPE char4 VALUE 'EKPO',
         c_hyfn  TYPE char1 VALUE '-'.
                     Work Area Declarations                              *
    DATA: x_output_ekpo type ty_output,
          x_ekpo type ty_ekpo.
                     Selection Screen                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-f01.
    SELECT-OPTIONS:
          s_ebeln FOR v_ebeln OBLIGATORY,
          s_ebelp FOR v_ebelp,
          s_matnr FOR v_matnr,
          s_werks FOR v_werks.
    SELECTION-SCREEN END OF BLOCK b1.
                     At Selection Screen                                 *
    AT SELECTION-SCREEN.
                     Start-of-Selection                                  *
    START-OF-SELECTION.
    *--- Check Authorizations for Selection-screen
      PERFORM  z_selection_auth_check.
    *--- Fetch Purchasing Document Item data
      PERFORM  fetch_status_pp.
                     End-of-Selection                                    *
    END-OF-SELECTION.
    **-- Download data to final internal table.
      PERFORM data_output.
      IF NOT it_output[] IS INITIAL.
    *--- Fill the structure for calling the ALV form
        PERFORM initialize_alv_params.
    **-- Display ALV Report
        PERFORM setup_and_display_alv_ver2
           USING
         it_out_alvp        "Parameter structure
         it_output[]        "Internal Data table(header table)
         it_output[].       "Dummy table for Hierarchical ALV!!(item table)
        ENDIF.
      IF it_output[] IS INITIAL.
        MESSAGE i999(zi) WITH 'No data found for selection'(i02).
      ENDIF.
    *&      Form  FETCH_STATUS_PP
    Get data from ekpo table
    FORM FETCH_STATUS_PP .
    *-Fetch PP Data from ekpo table
      REFRESH it_ekpo.
      SELECT EBELN
             EBELP
             MATNR
             WERKS
             FROM ekpo
             INTO TABLE it_ekpo
             WHERE ebeln IN s_ebeln
               AND ebelp IN s_ebelp.
      IF sy-subrc = c_0.
        SORT it_ekpo BY ebeln ebelp.
      ENDIF.
    ENDFORM.                    " FETCH_STATUS_PP
    *&      Form  f_top_of_page
    *This is to write the top of page
    FORM top_of_page.
      DATA:  lt_list TYPE slis_t_listheader,
             lx_list TYPE slis_listheader.
    *--- Title name
      CLEAR lx_list.
      lx_list-typ  = 'S'.
      lx_list-key  = 'Title name'(t13).
      lx_list-info = sy-title.
      APPEND lx_list TO lt_list.
      IF NOT lt_list IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary = lt_list.
      ENDIF.
    ENDFORM.                    "top_of_page
    *&      Form  init_page_head
    Description : This subroutine initializes the fields in table BHDGD  *
                  for printing the report heading.                       *
    FORM init_page_head.
      bhdgd-line1  = 'SLA Status Report'(h04).
      bhdgd-line2  = sy-title.
      bhdgd-lines  = sy-linsz.
      bhdgd-fcpyrt = sy-uline.
      bhdgd-inifl  = '0'.
    ENDFORM.                    "init_page_head
    *&      Form  initialize_alv_params
    Description : Form to initialize ALV Params
    FORM initialize_alv_params.
      CONSTANTS: lc_alv_grid  TYPE char1 VALUE 'G',  "Grid
                 lc_u         TYPE char1 VALUE 'U'.
      MOVE 'IT_OUTPUT' TO   it_out_alvp-tablname.   "final table
      MOVE sy-repid    TO   it_out_alvp-repid.
      MOVE lc_alv_grid TO   it_out_alvp-alvtype.
      MOVE c_x         TO   it_out_alvp-bringdefaultvar.
      MOVE lc_u        TO   it_out_alvp-variantsavetype.
    ENDFORM.                    " initialize_alv_params
          FORM it_out_init_events                                       *
    -->this is form is to modify the events
    FORM it_out_init_events
          CHANGING
           alevnts TYPE slis_t_event.
      FIELD-SYMBOLS <alevnt> TYPE slis_alv_event.
      LOOP AT alevnts ASSIGNING <alevnt>.
        CASE <alevnt>-name.
          WHEN  slis_ev_top_of_page.
            MOVE 'TOP_OF_PAGE'  TO <alevnt>-form.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    "it_out_init_events
    *&      Form  DATA_OUTPUT
    Download data to final internal table
    FORM DATA_OUTPUT .
      loop at it_ekpo into x_ekpo.
        x_output_ekpo-ebeln = x_ekpo-ebeln.
        x_output_ekpo-ebelp = x_ekpo-ebelp.
        x_output_ekpo-matnr = x_ekpo-matnr.
        x_output_ekpo-werks = x_ekpo-werks.
        append x_output_ekpo to it_output.
      endloop.
    ENDFORM.                    " DATA_OUTPUT
          FORM it_out_alv_fieldcat_before                               *
    -->  PT_FCAT                                                       *
    -->  ALVP                                                          *
    FORM it_out_alv_fieldcat_before  CHANGING
        pt_fcat TYPE slis_t_fieldcat_alv
        alvp TYPE typ_alv_form_params.
      DATA: lx_fcat TYPE slis_fieldcat_alv.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUTPUT'.
      lx_fcat-fieldname      = 'EBELN'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Purchasing Doc No'(018).
      lx_fcat-seltext_m      = 'Purchasing Doc No'(018).
      lx_fcat-seltext_s      = 'Purchasing Doc No'(018).
      lx_fcat-reptext_ddic   = 'Purchasing Doc No'(018).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUTPUT'.
      lx_fcat-fieldname      = 'EBELP'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Item No Purchasing Doc'(020).
      lx_fcat-seltext_m      = 'Item No Purchasing Doc'(020).
      lx_fcat-seltext_s      = 'Item No Purchasing Doc'(020).
      lx_fcat-reptext_ddic   = 'Item No Purchasing Doc'(020).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUTPUT'.
      lx_fcat-fieldname      = 'MATNR'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Material'(010).
      lx_fcat-seltext_m      = 'Material'(010).
      lx_fcat-seltext_s      = 'Material'(010).
      lx_fcat-reptext_ddic   = 'Material'(010).
      APPEND lx_fcat TO pt_fcat.
      CLEAR lx_fcat.
      lx_fcat-tabname        = 'IT_OUTPUT'.
      lx_fcat-fieldname      = 'WERKS'.
      lx_fcat-col_pos        = '1'.
      lx_fcat-ddictxt        = 'M'.
      lx_fcat-seltext_l      = 'Supply plant'(013).
      lx_fcat-seltext_m      = 'Supply plant'(013).
      lx_fcat-seltext_s      = 'Supply plant'(013).
      lx_fcat-reptext_ddic   = 'Supply plant'(013).
      APPEND lx_fcat TO pt_fcat.
    ENDFORM.                    " it_out_alv_fieldcat_before.
    Regards,
    Shalini
    Edited by: shalini reddy on Oct 7, 2008 5:08 PM

    Hi,
    The heading are in the table pt_fcat - you don't seem to be passing that in form....
    PERFORM setup_and_display_alv_ver2
    USING
    it_out_alvp "Parameter structure
    it_output[] "Internal Data table(header table)
    it_output[]. "Dummy table for Hierarchical ALV!!(item table)
    which I guessing in in one of the includes?
    Saying that the extract pof code does not show where you are calling form it_out_alv_fieldcat_before ...which populates the headings...
    Regards
    Stu

  • What happens to the outputs when I reconfigure the 6524 card?

    I have an application where I want to recongure the card throughout my program. For example I might initially want to set a single 8 bit port, so I could use Dig_Prt_Config and Dig_Out_Prt. Then I might want to output a batch of data using buffered IO so I use DIG_Block_PG_Config and DIG_Grp_Config to configure the card again. My question is what happens to the output states when I do this. If the port is then assigned to a group what happens to the outputs at that point? Do they remain unchanged until I do a Dig_Block_Out or do they all turn off? I guess I will find out when I try it, but it would save me from throwing away code if I knew now,
    Thanks,
    David

    David,
    I assume you have the 6534 board. On the 6534 board, reconfiguring the port will not affect the output value. Well, as long as the direction map doesn't change. Anyway, hope that helps.
    Ron

  • Input file should be deleted only after the output file is successful.

    Hi Experts,
    Could you pleas solve the below issue.
                           In  a file to file scenario, the input file will be picked from a directory location and after processing output file will be placed in the output directory location specified in the receiver communication channel.
    In the sender communication channel for the scenario mentioned above, if the processing mode is given as delete, the input file will be delete as soon as the file was successfully read by the adapter, but this will not ensure that the file processing is complete and the output file is being created.
    If we have a scenario in such as way that the input file should be deleted from the input folder only if the complete process is successful and the output is generated. how can we achieve this functionality?.
    And one more thing if we got the successful output the output file should be placed in one folder. and the if the output file is having errors it should be placed in other folder.

    Hi,
    In Receiver communication channel I have used the below command in Run Operating System
    .And I have kept the processing mode of sender communication channel as test.
    cmd.exe: /C "del /Leela/test.xml"
    You are running the comman line program configured in the receiver File Adapter,but in command line you mentioned the Sender File Folder , So i guess it's not getting processed.
    Try this:
    Try to run the command line in the Sender File Adapter Side
    "Place this in " --> Run OS Command After Message Processing.
    Hope this would work and get in parrallel with u r requirement.
    regards
    Srini

  • How make "Scanner" not printing the output in a new line?

    Hi!
    I'm Jordi from Barcelona and I'm new on Java and on this Forum. I have a question to you. I'm developing a testing application that uses the "Scanner".
    Before using it, the app asks a question to the user:
    String strInput;
    Scanner sc = new Scanner(System.in);
    System.out.print("* Please, write your name: ");
    strInput = sc.next();Running this, the app asks me for the options and after pressing "Enter" prints the input string in a new line like this:
    * Please, write your name:
    Jordi
    And I would to get the next:
    * Please, write your name: Jordi
    Does anybody know how to make the "Scanner" print the output in the same line as the question?
    Thanks for your help!
    Jordi

    Running the code,
    import java.util.Scanner;
    public class Test {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            System.out.print("* Please, write your name: ");
            System.out.println("* Hi, "+sc.next());
    }results in the following output:
    * Please, write your name: Bart
    * Hi, BartWhere the first "Bart" is the input I gave.
    If this is not the case, then it has something to do with your IDE or perhaps you didn't recompile and it previously was
    System.out.println("* Please, write your name: "); // println instead of printbut it's all guesses.
    Good luck.

  • Build error 'CFURLGetFSRef failed - maybe the output directory doesn't exist?' Eclipse

    I downloaded and installed the Adobe InDesign Plug-in Editor as an Eclipse distribution, the InDesign SDK and XCode on my iBook G4 with Mac OS X 10.4.10. Creating an InDesign project works fine. I only have to drag-and-drop elements on a form and add some actions.
    Unfortunately, I can't get the Ant Build working. I followed the video-tutorials on the Adobe labs site, but I'm still getting this error:
    CFURLGetFSRef failed - maybe the output directory doesn't exist?
    The error seems to be in the "/Adobe InDesign CS3 Products SDK/devtools/bin/odfrc-cmd" file. I guess it's a SDK problem.
    Does anyone know what the reason is for this error? And maybe how I can fix it?

    This is the full output.
    "Ld "/id5sdk/build/mac/prj/build/InDesign en InCopy plug-in.build/Default/Debug.build/Objects-normal/ppc/InDesign and InCopy plug-in" normal ppc
    cd /id5sdk/build/mac/prj
    /usr/bin/g++-4.0 -o /id5sdk/build/mac/prj/build/InDesign\ and\ InCopy\ plug-in.build/Default/Debug.build/Objects-normal/ppc/InDesign\ and\ InCopy\ plug-in -L/id5sdk/build/mac/prj/../debug/sdk -L../../../build/mac/debug/packagefolder/contents/macos/libs -F/id5sdk/build/mac/prj/../debug/sdk -F../../../build/mac/debug/packagefolder/contents/macos -F../../../build/mac/debug/packagefolder/contents/Frameworks -filelist /id5sdk/build/mac/prj/build/InDesign\ and\ InCopy\ plug-in.build/Default/Debug.build/Objects-normal/ppc/InDesign\ and\ InCopy\ plug-in.LinkFileList -lPublicPlugIn -framework InDesignModelAndUI -framework Carbon -framework InDesign\ and\ InCopy\ plug-in -arch ppc -Wl,-single_module -install_name InDesign\ and\ InCopy\ plug-in.InDesignPlugin/Versions/A/InDesign\ and\ InCopy\ plug-in -Wl,-Y,1455 -dynamiclib -mmacosx-version-min=10.4 -Wl,-Sp -Wl,-executable_path -Wl,../../../build/mac/Debug/packagefolder/contents/macos -isysroot /Developer/SDKs/MacOSX10.4u.sdk
    ld: can't locate framework for: -framework InDesign en InCopy plug-in
    /usr/bin/libtool: internal link edit command failed"
    Anyone who can help me?

  • [OLAP DML] display on screen the output while the program is running

    Hi,
    I'm running a script in AWM that is quite long, and I've placed some few 'show' so that I know what the program is doing, but it won't show on the screen the outputs until the program ends. I guess it writes all the outputs in a kind of buffer and release the content of the buffer at the end of the program.
    How could I have it to release this buffer continuously?
    Thanks

    i think the relational analogy would be an anonymous pl/sql block executing a list of commands while outputting a list of useful dbms_output.put_line log statements:
    Just as with SHOW and olap worksheet cmd line, you cant see the running dbms_output log while the pl/sql program is running... you need to wait for it to complete before you can see the log.
    You can write to a file and close/exit the file each time or you can write to log table and commit each time but i guess, some such heavy lifting is needed if you want to track the long running process mid-way.
    NOTE: For regular operations like dbms_cube.build load/forecast/allocate process/steps, you can always run queries against CUBE_BUILD_LOG etc mid-way. But if it's pure olap dml actions being performed then no neat pre-built handle to check things mid-way exists.

  • Cosuming web service using consumer proxy - not getting the output

    Hello All,
    I am not getting the consumer proxy output structue filled though the web service is successfully executed. I did the following steps.
    1. Created a webservice form RFC BAPISDORDER_GETDETAILEDLIST
    2. Created a consumer proxy for the above created WSDL document.
    3. Tested the service by executing the proxy directly by feeding the input in the XML (sales document and partner view). it is working fine
    4. Created a program to access the consumer proxy by passing the input(same input as per XML). I am not getting the output in the proxy output structure ( but I can see the RFC is successfully executed and having the right values in the debugging mode).
    Is this the issue is due to the date fields (XML cannot consider a blank date )?
    Please note: the partner output table parameter in the bapi (output I am looking for ) is not having any date fields.
    Please help me to sort out this issue.
    Thanks,
    Gopi

    Hi Gopi,
    From your description, I assume you used the SE37 transaction's menu option Utilities -> More Utilities -> Create Web Service -> From the Function Module, to expose the BAPI concerned as a Web Service.
    If this is the case, then it is possible that you are falling foul of your SAP User ID not having the necessary Remote Function Call authorization to execute the BAPI.
    A prerequisite for successfully calling an RFC-enabled Function Module (which is what a BAPI is) is that the User ID used to call the function module must have the required RFC authorization (Authorization Object S_RFC).  For example, when calling function module BAPI_CUSTOMER_GET_ROOT, if the User ID lacks the requisite authorization in the target system, the following error message will be received by the Consuming application:
        User <User ID> has no RFC authorization for function group V02HBAPI.
    Notice, as you can see from the above message, RFC execution authorization is implemented at the Function Group level, not at the Function Module level.  In othere words, granting a user the authorization to a function group (authorization object S_RFC) enables the user to execute all RFC-enabled function modules contained within that function group.
    I am guessing the BAPI works for you in debug mode because you are not calling the BAPI remotely.
    Let me know if this helps.
    Best Regards,
    Andy.

  • How can one counter be sources (or gated) with the output of the other?

    I'm trying to use the counters to generate a square pulse train that contains a certain number of pulses (on 6036E). For that I need to gate counter0 with the output of counter1. The manual seems to indicate that I need to use
    GPCTR_Change_Parameter (deviceNumber, ND_COUNTER_0, ND_GATE, ND_COUNTER_1) ,
    however it makes no difference to the output; I see no gating. What am I doing wrong? Am I missing something?
    I would also like to source counter1 with the output of counter0. There's a similar function call to choose the source signal, but so far I've been unable to source a counter with anything but the internal timer.  I guess the reason for it might be the same as the gating problem.
    Petro

    Hi Petro-
    This example shows how to output a finite gated pulse train on an E Series board.  It mentions that it is a CVI example, but the main .c file does not include any CVI-specific functionality so it should work if you're using ANSI C.
    Equivalent functionality is available in NI-DAQmx for your board and is considerably more intuitive.  An example of pause-triggered pulse train generation is available in the "C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Counter\Generate Pulse\Dig Pulse Train Cont-Pause Trig" directory of your local drive.  One method to generate the "pause trigger" pulse train is shown in "C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Counter\Generate Pulse\Dig Pulse Train-Cont" .
    I'm not sure what you mean when you say "I would also like to source counter1 with the output of counter0."  What do you need to perform this operation for?  The reliance of counter 1 on counter 0 and counter 0 on counter 1 creates a type of circular reference that is almost guaranteed to be problematic.
    Hopefully this helps-
    Tom W
    National Instruments

  • Does Responsive HTML5 have an option to force the output to be lowercase?

    Using RoboHelp 11.0.3.268, I'm testing the Responsive HTML5 layout as a potential upgrade from our current WebHelp SSL. The one thing I cannot find in configuring the SSL is the option to force the output to lowercase like what is offered in WebHelp and other SSLs. This is a critical project requirement because our team authors on Windows, which is case insensitive, and we publish help output to UNIX web servers, which is case sensitive.
    Thanks,
    Alan

    Also, I should add this. As long as everyone is authoring in RoboHelp, there really shouldn't be issues because RoboHelp "has your back".
    I believe what that option is intended to prevent is a situation where someone may be using perhaps Notepad or maybe even an app such as CoffeeCup HTML Editor to edit the content. And when creating links, if you were to create a topic that was named MyTopic.hTm, if you created the link as mytopic.htm, of course it would break on a UNIX system. And I'm guessing you already know that. So the RoboHelp option just changes all the names and the links to lower case to prevent breakage. But if all are working in RoboHelp and not hand coding links, you are probably totally safe. In fact, I'd be shocked to see that RoboHelp would actually have allowed creating any broken links.
    Cheers... Rick

  • Saving the output of a .sql file in .csv format

    Hi,
    I am saving the output of a .sql file in .csv format. But the problem is , the record of few columns have "new line" character in it, so when it is getting saved in .csv format, those records are coming in multiple rows, but they should come in one single row in single block. Please advise how to overcome this problem.
    Regards,
    Niraj

    Hi Guys,
    I guess, there is a misunderstanding.
    He is talking about the issue caused as a result of the data containing a "CRLF" ( Carriage return Line feed ) .
    That is mainly a data issue.
    The query i presume, must be right.
    I guess you should be able to fix it using some string functions.
    Some thing similar to this
    CREATE TABLE ASH (NAME VARCHAR2(10))
    SELECT REPLACE(NAME, CHR(13)||CHR(10), 'ISH') FROM ASH;
    SELECT REPLACE(NAME, CHR(10), 'ISH') FROM ASH;
    SELECT REPLACE(NAME, CHR(13), 'ISH') FROM ASH;
    depending on the type of new line whether it is CR or LF. or CRLF.
    Regards
    Ashish/-

  • Sys Exec - reading the output

    I am using the System Exec.vi to send a command line to the windows command prompt:
    "command.com /c w32tm.exe /resync"
    I use this to force my PC to update the system time with a time server. When I run this command in the command prompt outside labview I get an output when the process completes that says "The command completed successfully.".
    I want to be able to display this message in LabVIEW - however when I wire a string indicator to the "standard output" terminal of the VI I don't get any feedback. Is this possible using this method? Or am I better off reading the return code to establish if the task completed? Return code doesn't seem to do anything either. It would be nice to know whether the process worked or not.
    W32tm.exe info:
    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/time_w32tm.mspx?mfr=t...
    Message Edited by russelldav on 11-26-2007 02:51 PM
    Attachments:
    resync.jpg ‏32 KB

    I just worked out how to fix this and get the output I wanted...
    I changed the command line to:
    "w32tm.exe /resync"
    and it works fine.  I'm hazarding a guess the /c before was causing the problem?
    Does anyone know what the return codes mean? I get "-1073741510" when the program executes.

  • Cannot read the output from windows command.

    Hello
    I have the following classes
    package cmd;
    import java.io.IOException;
    public class CMD {
        public CMD(){
            ProcessBuilder pb = new ProcessBuilder()
            .command("cmd.exe","/c","del *.*")
            .redirectErrorStream(false);
            Process p;
            try {
                p = pb.start();
                StreamGobbler errorGobbler = new StreamGobbler(p.getErrorStream(), "ERROR");
                // any output?
                StreamGobbler outputGobbler = new StreamGobbler(p.getInputStream(), "OUTPUT");
                // start gobblers
                outputGobbler.start();
                errorGobbler.start();
            } catch (IOException e) {
                // TODO Auto-generated catch block
            System.out.println("eee "+e.getMessage());;
        public static void main(String[] args) {
            System.out.println("x");
            new CMD();
            System.out.println("x");
    and
    package cmd;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    public class StreamGobbler extends Thread {
        InputStream is;
        String type;
        StreamGobbler(InputStream is, String type) {
            this.is = is;
            this.type = type;
        @Override
        public void run() {
            try {
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line = null;
                while ((line = br.readLine()) != null)
                    System.out.println(type + "> " + line);
            catch (IOException ioe) {
                ioe.printStackTrace();
    Please note that I cannot seee the output from wndows command : del *.* and the java class execution does not finished.
    I I will replace the above command with the dir command then the output of the command is visible.
    Would you give me a hint about how to modify the above clases in order to parse the output of the del *.* ?
    Please note that the above example is important because I am developping a tool and it is mandatory for that tool to parse the output from a windows batch command.
    Best regards,

    Please note that I cannot seee the output from wndows command : del *.* and the java class execution does not finished.
    I I will replace the above command with the dir command then the output of the command is visible.
    Would you give me a hint about how to modify the above clases in order to parse the output of the del *.* ?
    No - but I will give you a hint about ProcessBuilder and how to develop software properly.
    Hint #1: Don't try to automate something that you don't know, or understand, how to do manually.
    a. Do you know how to execute 'del *.*' manually in a command window?
    b. Did you try that manually to see what happens?
    My guess is 'no'. If you had you would know that the response to a 'del *.*' command is going to be this:
    Are you sure (Y/N)?
    And your 'java class execution' doesn't finish because the 'del' command is waiting for you to answer that question.
    Hint #2: Don't try to use ProcessBuilder for an application that requires console input unless you first know how to provide that console input via your Java code.
    Your code will wait forever since it does NOT answer that question.
    Search the net and The Java Tutorials and  you can find examples of executing command line utilities. Then try those examples first and make sure that:
    1. They work for you
    2. You understand HOW they work
    Then you can modify those examples to do what you want to do.

  • What is the best way to run two programs simulataneously using the output from one to run the other?

    I just kind of wanted to get an opinion from some people on here. I have two main VIs. The first is a DAQ system that reads 99 different sensors and feeds that data into an array. The second is a real-time processing system that is designed to take the array and do numerous calculations. Both VIs output data to the front panel that I want to see, so I don't want to just use one as a SubVI.
    Is there a simple way to run both VIs, using the output from the DAQ system to feed the processor so that you can easily see the front panels of both VIs? I had considered just copying the real-time processor code into the DAQ VI, but I'm worried the resultant VI will be very large and unsightly.
    On a side note, am I over thinking this? Excuse me if this is a rather dumb question, it's been a long week...aaaand it's Wednesday.
    Solved!
    Go to Solution.

    There are a number of ways that you can go about this, but having both front panels open isn't a problem (assuming there is screen space!). Both could be sub-vi's of another "calling" vi, with their front panels set to open when called. The data from the DAQ side can be sent to the other through a number of ways, "producer-consumer" (many threads about this topic, examples in the LabVIEW examples, etc.) is one of the more robust techniques. If created correctly it allows one to run at a different rate than the other, although if the producer is "producing" much faster than the consumer can "consume" it will end up with problems.
    I guess I type too slowly
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

Maybe you are looking for

  • How do I change the footer, but not the header?

    Hi there. I'm working with a 475 pages document (in Adobe Acrobat X Pro) which already have a header and a footer (header describes document name, footer is the current page number). I have added some new pages in the middle of the document and want

  • How can I add 1pixel border above tabs, on window name bar, like in Opera. This helps in moving FF window.

    In Opera there is a 1px line above tabs which helps in organising windows. So I can move the cursor highest on the screen, click and move the window or if I want do change window to firefox from another window i can click highest on the screen fastes

  • Can't export to PLD with CNTR_BCD_SDC PLD component.

    Hello all, I'll be brief here. I've designed a 0-99 counter with a next and reset button for a digital electronics class I'm in. However, I am not able to export the document to the PLB board (basically get the .bit file to program the FPGA board I h

  • Please help-G5 Problems

    I just recently had a new logic board put in my work computer, which is a Dual 2.3 GHz Power PC G5 with 2.5 GB of DDR2 SDRAM. The Apple certified repair company said they ran test after the installation and said it checked out o.k. Since 8:00 this mo

  • CFZIP problems - Unsupported File Format

    [I tried researching this via Google, but the terms are so generic I didn't find any relevant hits] I am working with files that originate via incoming emails as attachments.  In CF I detach them from the emails and hand them off to other jobs for pr