How would you perform following SQL (from Oracle) in ABAP

SELECT DISTINCT
m.matnr,t.maktx,m.umrez,m.umren,
(select max(a.ean11)       
FROM sapr3.marm a
WHERE a.matnr=m.matnr) as ean11,p.prodh
FROM sapr3.makt t
     sapr3.marm m,
     sapr3.m_mat1p p
WHERE m.matnr=t.matnr AND m.matnr=p.matnr AND m.meinh='L';

Try:
SELECT DISTINCT mmatnr tmaktx mumrez mumren pprodh MAX( mean11 ) INTO TABLE itab
           FROM marm AS m INNER JOIN makt AS t ON tmatnr = mmatnr
                          INNER JOIN mvke AS p ON pmatnr = mmatnr
                          WHERE m~meinh = 'L'
                          GROUP BY mmatnr tmaktx mumrez mumren p~prodh.
Regards
Sridhar

Similar Messages

  • How to get connected MS SQL from Oracle

    I need to connect MS SQL Server (MSDE exactly) to Oracle 8.1.7
    and operate it from Oracle side (some clever data imports from
    client's sql server machine to bigger Oracle server). I tried to
    use ODBC from client to oracle and works fine, but I need "the
    other way". Any Ideas?
    Please help,
    yours HG

    http://asktom.oracle.com/pls/ask/f?p=4950:8:442320::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1139834557335,%7Bodbc%7D

  • How to run @d:\emp.sql  from Oracle Procedure

    Dear All experts
    Help me in executing a sql file containing simple insert statements. This file is being run on SQL prompt
    by the flowing command.
    @d:\emp.sql;
    But i want run it through procedure.
    @d:\emp.sql
    Thanks.

    A stored procedure does not normally invoke external SQL scripts. Stored procedures run on the database server and should only be calling objects created in the database. So I would strongly suspect that you need to rethink your architecture.
    If you are determined, however, you could potentailly
    - Put the .SQL file on the database server
    - Create a Java stored procedure that calls out to the operating system
    - Have that Java stored procedure invoke SQL*Plus and pass SQL*Plus the name of your .SQL file
    - Call that Java stored procedure from your stored procedure
    This would, of course, be a highly convoluted architecture, which is why the right answer is probably to rethink things.
    Justin

  • How would you reference respective video from diff class?

    Hi. I wanted to get a couple of points of view (if you're willing to look ) on how others would do this because Im not sure where to even start.
    I have a buttons class that puts 9 pictures on the stage and each one represents a different movie and leads to that movie when clicked (or will lead there once I figure out how to reference it to the specific movie).
    I have 9 movies referenced through XML. And I am using flvPlayer. Currenly I can only have one movie loading. I am not sure how to get each one to play upon click of the respective btn.
    Here is some of the code I think is pertinent if figuring how to go about this:
    ProjectOneButtons class
    //I have each picture loaded through an array and each button is waiting for the right code through a Switch statement:
    public function onButtonClick(e:MouseEvent):void {
         var releventImageAray:Array = this["rowOfImages" + MovieClip(e.currentTarget).row];
         var imageWanted:String = relaventImageArray[MovieClip(e.currentTarget).column];
         switch (imageWanted) {
              case "Video1" :
                   //Have not figured out the specific video code in class below
                   //This switch statement continues for the rest of the buttons.
                   //this code works but it just loads one movie and so I don't think this is what I need.
                   projectOneVideos = new projectOneVideos();
                   addChild(projectOneVideos);
                   projectOneVideos.x = 0;
                   projectOneVideos.y = 0;
    Here is the ProjectOneVideos class where the videos are loaded and played:
    package asFiles.projectOne{
         //import statments taken out for post
         public class ProjectOneVideos extends Sprite {
              public var videoX:Number;
              public var videoY:Number;
              public var projectOneVideos:XMLList;
              public var projectOneTotal:Number;
              public var projectOneXML:XML;
              public var xmlLoader:URLLoader;
              public var player:FLVPlayback;
              public var playBtn:VideoPlayBtn;
              public var pauseBtn:VideoPauseBtn;
              public var videoContainer:MovieClip = new MovieClip;
              public function ProjectOneVideos() {
                   xmlLoader = new URLLoader();
                   xmlLoader.load(new URLRequest("projectOneVideos.xml"));
                   xmlLoader.addEventListener(Event.COMPLETE, processXML);
              public function processXML(e:Event):void {
                   projectOneXML = new XML(e.target.data);
                   projectOneVideos = projectOneXML.VIDEO;
                   projectOneTotal = projectOneXML.length();
                   makePlayer();
                   addButtons();
              public function makePlayer():void {
                   player = new FLVPlayback();
                   player.skinBackgroundColor = 0x47ABCB;
                   player.skinBackgroundAlpha = .85;
                   player.x = 40.3;
                   player.y = 220;
                   player.width = 1200;
                   player.height = 594.2;
                   videoContainer.addChild(player);
                   player.addEventListener("complete", backToVideoMenu);
              public function addButtons():void {
                   trace("addButtons initiated");
                   playBtn = new VideoPlayBtn();
                   videoContainer.addChild(playBtn);
                   playBtn.x = 625.6;
                   playBtn.y = 930;
                   pauseBtn = new VideoPauseBtn();
                   videoContainer.addChild(pauseBtn);
                   pauseBtn.x = 625.6;
                   pauseBtn.y = 930;
                   pauseBtn.visible = false;
                   addChild(videoContainer);
                   videoContainer.x = 0;
                   videoContainer.y = 0;
                   playBtn.addEventListener(MouseEvent.CLICK, playVideo);
                   pauseBtn.addEventListener(MouseEvent.CLICK, playVideo);
              public function playVideo(event:MouseEvent):void {
              // this is where I have the video referenced to play.
                   trace("play/pause button clicked");
                   if (player.playing || player.paused) {
                        if (player.paused) {
                             player.play();
                        } else {
                             player.pause();
                        playBtn.visible = player.paused;
                        pauseBtn.visible = ! player.paused;
                   } else if (player.stopped) {
                        player.play();
                        playBtn.visible = false;
                        pauseBtn.visible = true;
                   } else {
                                    //this will obviously not work because then its just this one movie referenced
                        player.play("videos/projectOneVideos/videoOne.f4v", 0, false);
                        pauseBtn.visible = true;
                        playBtn.visible = false;
    The reason I included a bunch of code is to show that there is a play/pause button that is supposed to play the movie. But the thing is I only have the one movie referenced and I am not sure how to have it variable as to which movie is played and make it depend on the button that is clicked from the button class above.
    thanks for any input you can give!!! 
    Note: All of this code works as it is and I am getting no errors.

    Ok, how about this:
    After reviewing my code again, this is what I find.
    I process the xml and then never use it when playing the video. To play the video I had just put the path straight to the video and not even used the xml. In the xml.
    So I guess my question is how to I refer to the xml to load the video and then when dealing with the buttons lead to the right video from the xml.
    kglad: Now I think I see why you were saying define a method of the ProjectOneVideos class that accepts a path/name string to the load target.
    I think the code I need to change is:
         if (player.playing || player.paused) {
                        if (player.paused) {
                             player.play();
                        } else {
                             player.pause();
                        playBtn.visible = player.paused;
                        pauseBtn.visible = ! player.paused;
                   } else if (player.stopped) {
                        player.play();
                        playBtn.visible = false;
                        pauseBtn.visible = true;
                   } else {
               //this is the part that needs to be changed to recognize from the xml
                        player.play("videos/projectOneVideos/videoOne.f4v", 0, false);
                        pauseBtn.visible = true;
                        playBtn.visible = false;
    But then I have to be able to pull the right video when I hit the button.
    So, what tools should I be using?

  • How would you get Microsoft office from apple laptop to Ipad?

    Im having difficulty getting my Microsoft office from my apple laptop to my new Ipad. If anyone has any ideas PLEASE I would really appreciate the help. Thank You!!

    No can do. sorry.  There are apps in the App Store you can buy, such as Pages (for word documents) and numbers (for excel spreadsheets), but there is no way to move your Microsoft software on to your iPad, even if you have it on an Apple Laptop.  They are totally different operating systems..

  • How would you approach this SQL prob?

    Suppose we have an accounts system
    An account is simplistically defined by its ID
    All spends of money are logged with that ID, on a date
    ID, Date, Spend
    1, 01-jan-2007, 200
    1, 01-feb-2007, 200
    1, 01-mar-2007, 200
    1, 01-apr-2007, 200
    1, 01-may-2007, 200
    1, 01-jun-2007, 200
    Marketing want to see a report that looks like:
    ID, Opened, DateSpendReached500, DateSpendReached1000
    So for account 1, the first time spend went over 500 was in 01 march, when their total spend to date was 600, and they reached 1000 spend in may.
    I was thinking of doing this pseudocode:
    SELECT
      ID,
      date_acc_opened,
      MIN(When RunningTotal >= 500 Then date_of_spend Else 01 Jan 2099) as Reached500,
      MIN(When RunningTotal >= 1000 Then date_of_spend Else 01 Jan 2099) as Reached1000
    FROM
      SELECT ID, date_acc_opened, Date_of_spend, Sum(spend) OVER(prt by id, order by date asc) as RunningTotal
    ) tots
    GROUP BY ID, date_acc_openedYour thoughts?

    Another way all as one query...
    SQL> With T as (select 1 as id, to_date('01-jan-2007','dd-mon-yyyy') as dt, 200 as spend from dual union all
      2             select 1, to_date('01-feb-2007','dd-mon-yyyy'), 200 from dual union all
      3             select 1, to_date('01-mar-2007','dd-mon-yyyy'), 200 from dual union all
      4             select 1, to_date('01-apr-2007','dd-mon-yyyy'), 200 from dual union all
      5             select 1, to_date('01-may-2007','dd-mon-yyyy'), 200 from dual union all
      6             select 1, to_date('01-jun-2007','dd-mon-yyyy'), 200 from dual union all
      7             select 2, to_date('01-feb-2007','dd-mon-yyyy'), 50 from dual union all
      8             select 2, to_date('01-mar-2007','dd-mon-yyyy'), 100 from dual union all
      9             select 2, to_date('01-apr-2007','dd-mon-yyyy'), 100 from dual union all
    10             select 2, to_date('01-may-2007','dd-mon-yyyy'), 75 from dual union all
    11             select 2, to_date('01-jun-2007','dd-mon-yyyy'), 100 from dual union all
    12             select 2, to_date('01-jul-2007','dd-mon-yyyy'), 70 from dual union all
    13             select 2, to_date('01-aug-2007','dd-mon-yyyy'), 75 from dual union all
    14             select 2, to_date('01-sep-2007','dd-mon-yyyy'), 100 from dual)
    15  -- end of test data
    16       select id
    17             ,acc_opened
    18             ,max(decode(fh_plus, 1, dt)) as spend_500_plus
    19             ,max(decode(th_plus, 1, dt)) as spend_1000_plus
    20       from (
    21             select id, acc_opened, dt
    22                   ,CASE WHEN lag(tot) over (partition by id order by dt) < 500 AND tot >= 500 THEN 1 ELSE 0 END AS fh_plus
    23                   ,CASE WHEN lag(tot) over (partition by id order by dt) < 1000 AND tot >= 1000 THEN 1 ELSE 0 END AS th_plus
    24             from (
    25                   select id
    26                         ,min(dt) over (partition by id order by id) as acc_opened
    27                         ,dt
    28                         ,sum(spend) over (partition by id order by dt) as tot
    29                   from t
    30                  )
    31            )
    32       group by id, acc_opened
    33       order by id
    34  /
            ID ACC_OPENED  SPEND_500_P SPEND_1000_
             1 01-jan-2007 01-mar-2007 01-may-2007
             2 01-feb-2007 01-aug-2007
    SQL>

  • In Security, clicking on the "Saved Password" button displays your current saved password for each site. It does not allow you to change a password. How would you do that?

    In Security, clicking on the "Saved Password" button displays your current saved password for each site. It only allows you to view and delete site passwords. It does not allow you to change a password. How would you do that?

    If you enter a new password Firefox should offer to change the password.
    *You may not need to delete the old password. Try "Refreshing" the page, entering the site again, you may need to let Firefox fill in the old password, then enter the new password, and Firefox should ask to save the new password. See:
    **http://kb.mozillazine.org/Deleting_autocomplete_entries
    *If you delete the old password, you may need to "Refresh" the site after deleting the old password.
    If you want to delete the password that has been saved do the following:
    #In the Tools menu select Options to open the options window
    #Go to the Security panel
    #Click the "Saved Passwords" button to open the passwords manager
    #Select the site in the list, then click Remove
    <br />
    <br />
    '''You need to update the following.''' The Plugin version(s) shown below was/were submitted with your question and is/are out of date. You should update to avoid known security issues with the version(s) you have installed. Click on "More system info..." to the right of your question to see what was included with your question.
    *Adobe PDF Plug-In For Firefox and Netscape 8.3.0 (''Note: this is a very old version and installing the current version may not delete it or overwrite it. To avoid possible problems with having 2 versions installed on your system, you may want to remove the old version in Windows Control Panel > Add or Remove Programs before installing the new version'').
    *Shockwave Flash 10.3 r181 (''this may be current but a new version was released on 2011-06-14 with a ".26" after the "181". You can use the Plugin Check below and/or look in Add-ons > Plugins for the version of Shockwave Flash that you have installed. The newest version will be shown in Add-ons > Plugins as "Shockwave Flash 10.3.181.26"'').
    *Next Generation Java Plug-in 1.6.0_24 for Mozilla browsers
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**SAVE the installer to your hard drive (save to your Desktop so that you can find it after the download). Exit/Close Firefox. Run the installer you just downloaded.
    #**Use either of the links below:
    #***https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox ''(click on "Installing and updating Adobe Reader")''
    #***''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #**'''''Be sure to <u>un-check the Yahoo Toolbar</u> option during the install if you do not want it installed.
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • How would you configure your database?

    How would you configure your disks with those specifications?
    General Database Characteristics:
    os is Oracle Enterprise Linux 64 bit
    Enterprise Edition
    180GIG size database.
    High "oltp" environment.
    Estimated growth of 40 to 60GIG/year
    20GIG of archivelogs/Day
    Flashback time is 24 hours:120GIG of flashback space in avg
    Local backup. Full database copy, then incremental is the preferred method.
    That way, if a datafile goes bezerk, replace with backup datafile then recover.
    Or if only a few corrupt block, block recover with rman.
    BTW: Backup is done locally first, then send to another server, than on tape.
    Archivelogs is duplexed on another server.
    General Hardware Info:
    Server Platform: Dell PowerEdge 1950
    16 GIG RAM
    2 * 64 bit CPU's
    2 * local 300G/15rpm disks
    Storage: Dell PowerVault MD3000
    15 * 300G/15rpm Disks
    Possibility for 17 disks here.
    Here is my configuration so far:
    OS+ oracle binary + Online Redo Logs Copy 1 + Control File Copy 1: 2 disks raid 1
    flashback + backup + Online Redo Logs Copy 2 + Control File Copy 2: 4 disks raid 1 or 10
    archivelogs: 2 disks raid 1
    Temporary Datafiles: 1 disk no raid
    UNDO Datafiles: 2 disks raid 1
    Datafiles 6 disk raid10
    total 17 disks: + spare disks on the side of one ever fails
    1) How would you configure it with those specs?
    2) Is there missing info to make a particular decision?

    Here is my reply concerning data separate from index files:
    See http://www.dizwell.com/prod/node/751 for the complete article.
    "Why wouldn't you keep indexes separate from their tables?! Because doing so makes no difference to performance... and I patiently explained that a table and its index are never accessed simultaneously by a single user so that contention between them cannot arise. And yes, in a multi-user system, of course the two could be accessed simultaneously -but so could two tables, or two indexes. "

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How would YOU retype these old XM08 types for use in an ABAP OO method?

    The XM08 function group has the following type declarations:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr LIKE drseg_cr    OCCURS 0,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    TYPES: mmcr_tdrseg TYPE mmcr_drseg OCCURS 0,
    TYPES: BEGIN OF mmcr_drseg.
            INCLUDE STRUCTURE drseg.
    TYPES: cr LIKE drseg_cr OCCURS 0,
           co TYPE mmcr_drseg_co OCCURS 0,
           sm LIKE drseg_sm OCCURS 0,
           charact TYPE rbcharact_instance OCCURS 3,
                                           "instances of characteristics
           uebgmat  TYPE matnr,
           uebrblgp TYPE rblgp,
           selkz_db TYPE selkz,
           rblgp_old TYPE rblgp,           "rblgp before aggregation
           END OF mmcr_drseg.
    How would YOU redeclare these types so that they work in an ABAP Objects class?  
    Some of the "fixes" are easy, like replacing "LIKE" with "TYPE:".
    But what about the "INCLUDE STRUCTURE" and the "occurs 0" specifications?
    The reason I'm asking this is that I have to call a method from ZXM08U16 and I'd like to be able to pass this method exactly what XXM08U16 gets from SAP, i.e. the table E_TDRSEG of type  MMCR_TDRSEG

    David,
    I wonder it can be directly in ABAP (I would like to hear opinions from others as well!), I needed to use Data Dictionary as well:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr TYPE z_tt_drseg_cr,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    z_tt_drseg_cr is a table type created in SE11, based on structure drseg_cr.
    the way to create internal table and work area, based on the above:
    DATA : gt_... TYPE TABLE OF mmcr_drseg_co.
    DATA : gw_... TYPE mmcr_drseg_co.
    hope this helps some
    ec
    UPDATE : Rich is right, it is possible to do it only in ABAP with the DEFAULT KEY addition.

  • How would you split a 10 GB root partition? Would you?

    The system seems to be booting a little slow lately (been using Arch for more than a year now) and I was thinking of splitting the root partition to improve performance.
    Right now the entire OS is on a single partition. I don't have a /home partition but I can see it's usefulness:
    - files on /home are, in general, more frequently written (browser cache especially), which means less fragmentation for the root partition
    - having a noexec flag for /home so no potentially dangerous software will run from there (and why would you need to run software from /home?)
    - my /var folder takes up 102 MB, 9.706 files in 4.846 folders. Is there a filesystem that will deal well with many small files ? ReiserFS maybe ?
    So how would you split (gigabyte-wise) a 10 GB partition into /, /home and /var ? And would you ? I've been told from the IRC channel that it makes zero sense. At least not for desktop use.
    PS: I'm also switching from i686 to x86_64, so please take that into account as well. For instance I noticed that 64 bit software usually takes up more space than 32 bit.
    Last edited by DSpider (2011-05-29 11:32:04)

    Here is what's happening on my Arch box:
    . 2,1TiB [##########] /mnt
    . 61,0GiB [ ] /home
    5,2GiB [ ] /usr
    . 2,9GiB [ ] /var
    126,0MiB [ ] /opt
    83,1MiB [ ] /lib
    . 14,1MiB [ ] /boot
    10,0MiB [ ] /sbin
    . 7,3MiB [ ] /etc
    5,3MiB [ ] /bin
    . 3,0MiB [ ] /tmp
    192,0kiB [ ] /run
    20,0kiB [ ] /srv
    ! 16,0kiB [ ] /lost+found
    4,0kiB [ ] /dev
    4,0kiB [ ] /lib64
    ! 4,0kiB [ ] /root
    . 0,0 B [ ] /proc
    0,0 B [ ] /sys
    < 0,0 B [ ] /media
    Generated with ncdu.
    I have big stuff installed like a full texlive and libreoffice and I never clean my package cache. This is /var:
    . 2,6GiB [##########] /cache
    . 153,2MiB [ ] /lib
    57,1MiB [ ] /abs
    . 31,3MiB [ ] /log
    7,4MiB [ ] /tmp
    . 592,0kiB [ ] /spool
    . 132,0kiB [ ] /run
    8,0kiB [ ] /lock
    e 4,0kiB [ ] /opt
    e 4,0kiB [ ] /local
    e 4,0kiB [ ] /games
    ! 4,0kiB [ ] /enigma
    4,0kiB [ ] /empty
    @ 0,0 B [ ] mail
    And this is /var/cache
    2,6GiB [##########] /pacman
    10,9MiB [ ] /pkgtools
    3,0MiB [ ] /man
    320,0kiB [ ] /cups
    280,0kiB [ ] /fontconfig
    252,0kiB [ ] /samba
    ! 4,0kiB [ ] /ldconfig
    e 4,0kiB [ ] /hald
    /usr
    2,8GiB [##########] /share
    1,7GiB [###### ] /lib
    415,2MiB [# ] /bin
    153,9MiB [ ] /include
    149,8MiB [ ] /lib32
    15,3MiB [ ] /src
    13,7MiB [ ] /sbin
    104,0kiB [ ] /local
    I think I have a very typical desktop here: Mostly web/office stuff and some multimedia.

  • How would you read in each line of data and display them to message box?

    How would you read in each line of data from the _.txt file_ and display the whole data using an information-type message box?
    I know how to display each line of the .txt file data, but I do not know how to display the whole thing.
    Here is how I did to display each line of data using the message box:
    import javax.swing.JOptionPane;          // Needed for the JOptionPane class
    import java.io.*;                         // Needed for file classes
    public class problem3
         public static void main(String[] args) throws IOException
              String filename;          // Needed to read the file
              String categories;          // Needed to read the categories
              // Get the filename.
              filename = JOptionPane.showInputDialog("Enter the filname.");
              // Open the file.
              FileReader freader = new FileReader(filename);
              BufferedReader inputFile = new BufferedReader(freader);
              // Read the categories from the file.
              categories = inputFile.readLine();
              // If a category was read, display it and
              // read the remainig categories.
              while(categories != null)
                   // Display the last category read.
                   JOptionPane.showMessageDialog(categories);
                   // Read the next category.
                   categories = inputFile.readLine();
              // Close the file.
              inputFile.close();
    }I think I need to change here:
    // If a category was read, display it and
              // read the remainig categories.
              while(categories != null)
                   // Display the last category read.
                   JOptionPane.showMessageDialog(categories);
                   // Read the next category.
                   categories = inputFile.readLine();
              }but I don't know how to.
    Could you please help me?
    Thank you.

    kyorochan wrote:
    jverd wrote:
    What is not understood about your question is which part of "read a bunch of lines and display them in a textbox" do you not understand.
    First thing's first though: You do recognize that "read a bunch of lines and display them in a textbox" has a few distinct and completely independent parts, right?I'm sorry. I'm not good at English, so I do not understand what you said...
    What I was trying to say is "How to display the whole lines of .txt file in single dialog box."We know that.
    Do you understand that any problem can be broken down into smaller pieces?
    Do you understand that your problem has the following pieces?
    1. Read lines from the file.
    2. Put the lines together into one String.
    3. Put the String into the message box.
    and maybe
    4. Make sure the message box contents are split into lines exactly as the file was.
    (You didn't make it clear if that last one is a requirement.)
    Do you understand that 1-4 are completely independent problems and can be solved separately from each other?
    Do you understand that you have stated that you already know how to do 1 and 3?
    Therefore, you are NOT asking "How to display the whole lines of .txt file in single dialog box." Rather, you ARE asking either #2 or #4 or both.
    If you say once more "display all the lines of the file in one dialog box," then it is clear that we are unable to communicate with you and we cannot help you.

  • How do you launch an app from a shell?

    how do you launch an app from a shell?  how about an example... say, launch the texteditor app.

    To open an app from the terminal use the command open followed by the fullpath pf the command.
    So for TextEdit you would enter
    open /Applications/TextEdit.app

  • How would you find the pitch period of a sound signal?

    Hi
    I have a few questions and i would like if somebody could help me even with the smallest comment on this.
    How would someone be successfully estimate the pitch period (fundamental frequency) of a 5 second sound file?How would you successfully distinguish the voiced from the unvoiced parts and how would you make sure you dont mix voiced/unvoiced sections? Finally how can you find the exact points where the pitch is at its peak throughout the signal?
    Any help/comment/suggesion would be much appreciated

    Hello Madgreek,
    After some thought I think I may have come up with an algorithm for what we have discussed. Basically, you are interested in knowing the time intervals over which you can observe any given frequency in your signal. As you had suggested, you can examine small windows of your signal and perform FFTs on each of the small windows to determine what frequency content is contained in that window. By examining all of the windows, you will see when particular frequencies are prevalent in the original signal. You'd want to use the smallest allowable window to give you the most resolution, but one that is large enough to cover an entire period of the lowest frequency (so that you don't miss this frequency).
    I have attached an example program that performs this operation. The example performs this analysis on an array that represents audio data. I am basically performing multiple FFTs (for each window) and stacking these FFTs in time to form a 3D plot. By examining the 3D plot, I can then see when in time my frequencies of interest are at their peaks. Rather than graphing these plots, you may work out a different algorithm for programmatically determining and logging these peaks and times. I hope this is what you were looking for!
    Attachments:
    Time Variable FFT.vi ‏250 KB

  • How do you transfer voice memos from your phone to computer

    How do you transfer voice memos from your phone to computer

    Is it possible to transfer a voice memo to my computer and then convert that to text that can be printed?
    Here is my problem. I study harbor seals and have always taken hand written notes that then must be typed into the computer when I get home from an observation. Is there any way I can dictate what I see to a voice memo and then have that translated to text. If there is which would do it best an iphone or ipad (I have neither, just a tracphone for an emergency).
    Perhaps this is asking too much from the technology available but it would be a great help if I could do this.
    Thanks for any help you can give!

Maybe you are looking for

  • Open/save dialog boxes stuck at (too small) default size

    I've been having a relatively small issue with Mountain Lion that has become a big hassle. In past versions of OS X, whenever I'd resize an open/save dialog box in an application, it would be that size the next time I went to open/save. In Mountain L

  • Need to do a clean install after firmware update

    i have to reinstall os x after the firmware update. it wont boot up just sticks on the grey logo and sinny thing.... grrrr will it be ok just to archive and install just leopard instead of tiger, then disc 2(the apps) then leopard??

  • Internal error in the communication with the IGS (charts)

    Hello to all, I have a problem when visualizing the graphics of the reports in BW 3.5 (WAD)  the connection RFC IGS_RFC_DEST has never worked however me same the graphics are visualized, but now I am not able to make that the graphics appear in the W

  • Anyone know of any killer countdown web widgets?

    New to iweb, just now figuring out the use of web widgets and they sure seem cool but a bit hard to navigate as to what is what out there. I'd like to know if anyone an point me to their favorites, in particular I am looking for a countdown widget, w

  • ITunes keeps saying the server could not be contacted when trying to restore my iPhone 5

    I'm trying to restore my iPhone 5 using iTunes, because my battery life has greatly decreased, and I believe it to be a software problem. Therefore I'm wanting to wipe the software completely, and update it again, but when I hit restore, it extracts