Help with a construct like this: find | parallel function [SOLVED]

I'd like to use a find | parallel function combo to:
1) Find all directories
2) Enter the directories and run a predefined function
#!/bin/bash
bcue() {
shntool cue *.flac > foo.cue
shntool join *.flac
find -type d | parallel cd {} ; bcue
Running this doesn't work as expected.  It simply runs the bcue function from the dir from which I run the script.  How can I call the function after I cd into the directory using parallel?
Last edited by graysky (2012-07-03 23:32:34)

Yes, but -execdir won't do the operations in parallel...
However, you could instead do something like
find -type d -execdir sh -c "cd {}; bcue &" \;
which will start the operations represented by 'bcue' in the background, which may or may not be exactly the same thing as the original version with parallel. But you still can't use it as written because the new "inner" shell doesn't know anything about the bcue function. Consider making a script out of it. Better yet, consider making it a script that takes a directory name as an argument; then you could just do
find -type d | parallel $script {}
(making some guesses about the correct invocation of parallel based on what you wrote; I don't use it myself.)

Similar Messages

  • I want to place an image in my InDesign document that can work with an address like this (\Resources\Thumb) rather than this (C:\Users\JSmith\Desktop\InDesign thumbnail Test\001\Resources\Thumb) is this possible?

    I want to place an image in my InDesign document that can work with an address like this (\Resources\Thumb) rather than this (C:\Users\JSmith\Desktop\InDesign thumbnail Test\001\Resources\Thumb) is this possible? In a nutshell I want to point the link to an image in a directory that uses just part of the address.

    I know this is something you can do in Maya with linked files. I guess InDesign just isn't there yet.
    MW Design -  Yeah I think "Relative paths" is the right term! I want to create a Layout with an image in the center of the page - and then duplicate my folder structure with that file. With that, I want to replace the Linked image file with a diferent image file of the same name. In effect having multiple files of the same layout with different images.  I hope that made sense.  

  • TS2551 I have problem opening this file. It just take hours and hours incircle but nothing happen. Please help ! I would like this app to be reinstall.

    I have problem opening this file. It just take hours and hours incircle but nothing happen. Please help ! I would like this app to be reinstall

    What file? Does this involve iPhoto somehow?

  • Itunes asking me my billing verification again and again on the same computer. I don't know why it behave like this. Anyone can solve my problem?

    Itunes asking me my billing verification again and again on the same computer. I don't know why it behave like this. Anyone can solve my problem?
    I already provided my 3 digit CVV number but Itunes again need to confirm the code whereas on my Office Computer I am purchasing Apps on Itunes without verifying my billing information again and again except once at the time of creation of account.
    Please help me as I am charging by my Credit Card bank by US$ 1 each time when I give verification code.
    Thanks
    Talat Khatri

    Try the following steps,
    Sign into your computer and removal of credit card information. Here are the steps:
    1) Open iTunes and sign in to the iTunes Store.
    2) Select "View My Account" from the Store menu.
    3) Enter your password and click the View Account button.
    4) Click the Edit Payment Information button.
    5) Select "None" as the payment type.
    6) Click the Done button at the bottom of the page.
    Reset your account password from the following link:
    http://iforgot.apple.com
    Phase 3:
    Download a free content on to get recognized in iTunes.
    To ensure your account is functioning, try downloading a free item from the iTunes Store. To do this, navigate to the iTunes Store main page by clicking the Home icon near the upper-left corner of the window. Scroll down and click the "FREE ON iTunes" link near the bottom of the main page, then select an item to download.
    After you are able to download the free App try updating the billing information as usual.

  • Need help with Windows on Bootcamp vs. Parallels

    Hello,
    I installed windows 7 on a boot camp partition of my hard drive. I also installed windows 7 on Parallels with the same activation key (afterwards).
    The activation key is legit, or at least should be, I bought it online.
    The issue I'm having after 30 days of use is this: The parallels version of windows is telling me my version of windows isn't 'genuine', I get a black background, but can still use windows and parallels fine.
    The boot camp version of windows... (the version I installed first) is running fine, no 'not genuine' messages.
    Here are my questions:
    1. Am I getting the error because I have 2 versions installed with the same key?
    2. The software I need to run is running better on parallels than on boot camp (the interface and resolution look more appropriate and it's just easier to use). I'd like to just delete the entire boot camp partition. Will doing so solve my issue with windows, or should I deactivate windows on that side first?
    3. If I should deactivate windows 7 on my boot camp partition, how do I do that?
    Thanks for any help.

    Thanks for the reply.
    I'm not running bootcamp through paralells so I have installed two copies.
    Can you tell me what the M$ IVR line is, do you just mean customer service?
    Something interesting is that when I checked my code with Microsoft it said that "The product ID number that you entered is not supported in the country that you have selected." Does this ring bells or mean anything to anyone? Does it mean the key was pirated, or just intended for sale in a different country? I bought it from a software retailer online, and I'm assuming it's legit because it runs fine on the bootcamp side. So I'm wondering if this error message could be related to the double install or what?
    Can someone provide me a link instructing how to delete the bootcamp partition? Is that a pretty straight forward process?
    Thanks

  • Combining APEX help with a frame-like TOC html help system (I used DITA)

    Problem:
    The APEX page-oriented help system is bad at helping users find how to do something. I prefer to use a task-oriented help system for that, with a table of contents that users can browse around in. I like the DITA (Darwin Information Typing Architecture) system's topic based help with its ideas of tasks, concepts and references. But, I also like the context-based feel of a page-based help system and the way that the APEX help system automatically aggregates all of the item-based help on a page for you.
    My Solution:
    I'm no html genius, so this may be totally wrong, but what I did was to create a task oriented html user guide that also included a page based help TOC entry for each page. I then used iframes in the APEX help page to allow me to have a TOC always showing with links that controlled a content "pane," but still also display the automatically-generated item help for the page help is called from.
    * Downloaded the DITA open toolkit (http://sourceforge.net/projects/dita-ot ), full package distribution and installed using the user guide (http://dita-ot.sourceforge.net/doc/ot-userguide131/xhtml/ )
    * Downloaded and installed XMLmind XML editor free personal edition version ([http://www.xmlmind.com/xmleditor/download.shtml]). I'm not endorsing this thing, but it's free and it works great out of the box for editing DITA files.
    * Created an html user guide by modifying the garage sample that's included with the DITA open toolkit and publishing to xhtml (I also published to pdf2, by the way, to provide a printable user guide for my users to download...one of the nice things about DITA). I set up my files so that they would all be in a topics subfolder, rather than the standard task, concept, and reference folders of the example. I did this so that I wouldn't have to worry about linking to a different folder from APEX (more on that later). I made a concept topic for each page of my application with the filename "Concept_About_page_X.dita," where X is the APEX page number.
    * I run APEX using Oracle Application Server 10g, so I uploaded the files to a subdirectory of their own in the i/ folder on the OAS server. In my case this was APPSERVER_HOME/apache/apache/images/doc/MyAppHelp/
    * The DITA toolkit generates html pages that look for a CSS called commonltr.css, located at the same level as the index.html file. I copied my APEX theme's CSS file to that same place and renamed it commonltr.css (in my case that was APPSERVER_HOME/apache/apache/images/themes/theme_13/theme_V3.css). Now, the proper thing to do would be to configure DITA to point at the real location of the theme's CSS, I guess. But I didn't want to figure out how to do that at this point.
    * Now, in APEX, I deleted all of the page-level help text from my pages, since I had now duplicated this information into the DITA page concept topics. Instead, on each page I put
    * On the help page (the page that you create when you're first setting up Help in APEX, mine is page 50), I added the following iframe tags in the header text of the page: \\      <iframe src="../../i/doc/gradevalhelp/index.html" width="40%" height="50%" align="left"></iframe><iframe name="contentwin" src="../../i/doc/gradevalhelp/topics/Concept_About_page_&REQUEST..html" width="60%" height="50%" align="right"></iframe><br> \\      Note the <br> at the end. I had to put that in to prevent the item level help from printing over my content iframe. Again, someone who knows something about html could probably tell you the right way to do that. The DITA toolkit generates a base tag (<base target="contentwin"/>) in the head section of the index.html file, to make the target of the TOC links be the content frame. Notice how I use it to map the links in the first iframe to the second iframe on the APEX help page, by naming the second frame "contentwin". Notice how the &REQUEST. Substitution string is used to present the proper DITA html file. I also tried setting it up to use a calculated hidden item that looks up the page alias for the requesting page; this had the advantage of allowing me to name my DITA files using page alias instead of page number, but it was too slow.

    Look at all the apdiv's you have.  Those are absolutely positioned layers.  I'm assuming by your post that you are very new to Dreamweaver and HTML and CSS.  I would highly recommend not using absolutely positioned layers until you have a better grasp on HTML and CSS.
    Looking at your code I would suggest that you consider using one of Dreamweaver's built in, or downloadable templates as a starting point and work from there. 
    http://www.adobe.com/devnet/dreamweaver/articles/dreamweaver_custom_templates.html

  • Search with regular expression like this "[^\(]+mytype"

    I tried regular expression which find me line which has "mytype" but does not precede with "("
    I wrote it like this:    [^\(]+mytype
    It works perfectly with python reg exp. But it does not work in MSVC 2013 search(ctrl+shift+f). Do you know why? Is it bug?
    Is there a way to find variable definition with search function through whole project

    Hi Vit,
    According to your description, you mean that when you use the
    ctrl+shift+f shortcut key to search which line has "mytype" word in the whole project from VS2013 IDE like the following screen shot, but it does not work
    in VS2013 IDE, am I right?
    If yes, could you please provide me a screen shot about how you search the
    mytype?
    Generally, when we used the
    ctrl+shift+f shortcut key to search, it works fine in VS IDE. Therefore, to check if you install some third-party Add-ins impact your VS IDE, I suggest you can search
    the mytype in VS safe mode check if you get same issue.
    Reference:
    http://msdn.microsoft.com/en-us/library/ms241278.aspx
    (1)If you did not get same issue, I doubt that you may be install some Add-ins impact the VS IDE, so I suggest
    you can try to disable or un-install them and then check this issue again.
    (2)If you still get same issue, I suggest you can try to reset the VS setting file or you can try to repair your
    VS check this issue again.
    In addition, I suggest you can try to use Ctrl + F shortcut key to search the mytype word.
    If I misunderstand your issue, please provide me more detail message about your issue.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Powaur - an AUR helper with a pacman-like interface

    Hi guys,
    I've just written this minimalistic AUR helper called powaur, with an interface like pacman / yaourt, so
    there's no need to learn an addition set of commands. C is the only language I'm really really comfortable
    with, so powaur is written in C.
    Links
    Github - https://github.com/yanhan/powaur
    AUR - http://aur.archlinux.org/packages.php?ID=49296
    Updates
    24 Jan 2012:  - Updated to work with pacman 4 (!!)
    10 July 2011:  - allow uppercase answers for questions
    28 June 2011: - --noconfirm option added
                           - --list-aur option added; lists installed AUR packages and their version
                           - only resolve dependencies for new / outdated AUR packages
    26 June 2011: - allow installing of packages as root
                           - add per-user directory in form of /tmp/powaur-username, please comment out
                             "TmpDir" section of your powaur.conf for this to take effect
                           - print immediate dependencies for -S
                           - only print dependency graph for -S when --debug is supplied
    10 June 2011: -S supports dependency resolution
                           -Su available to update outdated AUR packages
                           --crawl to output topological order of packages
                           -G --deps uses similar dependency resolution algorithm with -S
    31 May 2011: Colorized output is now available!
    26 May 2011: Multithreaded downloading is now supported!
    Features
    Currently, powaur offers the following feature set:
    -G, --getpkgbuild Downloads PKGBUILDS of listed packages from the AUR
    --deps Resolve dependencies for packages. This is turned off by default.
    --threads <N> Limits the maximum number of threads to N (max of 10)
    -S, --sync When used alone, installs packages from the AUR without dependency resolution.
    --check Only meaningful with -u. Checks for outdated AUR packages without upgrading them
    -i, --info Similar to that of pacman
    -s, --search Searches the AUR for a single package
    -u, --upgrade Updates outdated AUR packages
    --vote Used with -s, orders search results by vote count (highest first) instead of alphabetical order
    -Q, --query Queries installed packages
    -i, --info Similar to that of pacman
    -s, --search Similar to that of pacman
    --crawl <package(s)> Shows a valid topological order of given packages
    -B, --backup [dir] Backup the pacman local database in <dir>, or the current directory if unspecified
    -M, --maintainer Searches the AUR for a maintainer
    --vote Orders the maintainer's packages by vote count (highest first) instead of alphabetical order
    --color Enable colorized output
    --nocolor Turn off colorized output
    --debug Displays debug information
    -h, --help Displays help
    -V, --version Displays version
    Credits
    Many thanks to Dave Reisner (falconindy) for allowing me to use code in cower for json parsing.
    I also referred to source code from pacman and git.
    Finally
    Feature requests are welcome!
    Last edited by yanhan (2012-01-24 11:27:33)

    Hey there, yanhan. I just switched over from Gentoo to Arch simply for my love of Gnome 3. Maybe when Gentoo jumps on their Gnome support, I'll switch back... but for now, I'm loving Arch.
    I downloaded powaur because I like pacman and I wanted to handle the AUR as seamlessly as emerge handles its overlays. I've got a super newb question for you, though, as per I don't quite know pacman's in's and out's yet.
    So, as I'd like the 64-bit flash binary. I go about doing this as root:
    [root@laptop patrick]# powaur -S flashplugin-prerelease
    Syncing:
    flashplugin-prerelease
    ==> Do you wish to proceed? [Y/n]
    ==> y
    Resolving dependencies... Please wait
    ==> Dependency graph:
    xineramaproto (installed) -> randrproto (installed) -> inputproto (installed) -> xextproto (installed) -> renderproto (installed) -> iana-etc (installed) -> xcb-proto (installed) -> kbproto (installed) -> xproto (installed) -> fixesproto (installed) -> compositeproto (installed) -> damageproto (installed) -> tzdata (installed) -> linux-api-headers (installed) -> glibc (installed) -> libice (installed) -> libdatrie (installed) -> libthai (installed) -> pixman (installed) -> libdaemon (installed) -> expat (installed) -> libjpeg-turbo (installed) -> libxdmcp (installed) -> libxau (installed) -> libxcb (installed) -> libx11 (installed) -> libxext (installed) -> libxinerama (installed) -> libxi (installed) -> libxfixes (installed) -> libxcomposite (installed) -> libxdamage (installed) -> libxrender (installed) -> libxcursor (installed) -> libxrandr (installed) -> nspr (installed) -> run-parts (installed) -> gcc-libs (installed) -> pcre (installed) -> glib2 (installed) -> atk (installed) -> attr (installed) -> acl (installed) -> libcap (installed) -> ncurses (installed) -> readline (installed) -> sqlite3 (installed) -> bash (installed) -> gzip (installed) -> libgpg-error (installed) -> libgcrypt (installed) -> keyutils (installed) -> findutils (installed) -> texinfo (installed) -> libtasn1 (installed) -> sed (installed) -> gdbm (installed) -> db (installed) -> libsasl (installed) -> gmp (installed) -> zlib (installed) -> libxml2 (installed) -> shared-mime-info (installed) -> freetype2 (installed) -> fontconfig (installed) -> libxft (installed) -> gnutls (installed) -> libpng (installed) -> cairo (installed) -> pango (installed) -> libtiff (installed) -> gdk-pixbuf2 (installed) -> gtk-update-icon-cache (installed) -> cracklib (installed) -> pam (installed) -> shadow (installed) -> coreutils (installed) -> filesystem (installed) -> util-linux (installed) -> libsm (installed) -> e2fsprogs (installed) -> dbus-core (installed) -> dbus (installed) -> avahi (installed) -> perl (installed) -> openssl (installed) -> libldap (installed) -> krb5 (installed) -> libcups (installed) -> ca-certificates (installed) -> libssh2 (installed) -> curl (installed) -> nss (installed) -> gtk2 (installed) -> libxt (installed) -> mozilla-common (installed) -> flashplugin-prerelease (AUR target)
    ==> Upgrading:
    flashplugin-prerelease
    ==> Edit PKGBUILD for flashplugin-prerelease? [Y/n/a]
    ==> n
    ==> Continue installing flashplugin-prerelease? [Y/n]
    ==> y
    ==> ERROR: Running makepkg as root is a BAD idea and can cause
    permanent, catastrophic damage to your system. If you
    wish to run as root, please use the --asroot option.
    Ok, fair enough.
    So, as _not_ root.
    [patrick@laptop powaur]$ powaur -S flashplugin-prerelease
    Syncing:
    flashplugin-prerelease
    ==> Do you wish to proceed? [Y/n]
    ==> y
    Resolving dependencies... Please wait
    Segmentation fault
    So... what's my silly noob mistake that isn't allowing me to use your wonderful helper?

  • Help with a matrix-like report

    i want to produce a report with the following format:-
    7/JUL 8/JUL 9/JUL 10/JUL 11/JUL
    Employee Mon Tue Wed Thu Fri
    Alan x x
    Corby x
    i have a table with leave records that looks like this:-
    NAME FROM_DATE TO_DATE
    Alan 07-JUL-2003 08-JUL-2003
    Corby 10-JUL-2003 10-JUL-2003
    any suggestion is appreciated, thank you

    give it a try
    rem create table T_TEST
    rem (NAME varchar2(10)
    rem ,DATE_FROM date
    rem ,DATE_TO date
    rem )
    rem ;
    rem insert into T_TEST values ('Alpha', trunc(sysdate-2), trunc(sysdate) ) ;
    rem insert into T_TEST values ('Bravo', trunc(sysdate-1), trunc(sysdate+2) ) ;
    rem commit ;
    rem
    rem create table T_CAL
    rem (WEEK_ISO varchar2(10)
    rem ,DAY date
    rem );
    rem
    rem declare
    rem l_day date ;
    rem begin
    rem l_day := to_date('01012003','ddmmyyyy') ;
    rem
    rem LOOP
    rem insert into T_CAL values ( to_char(l_day,'IYYYIW'), l_day ) ;
    rem
    rem l_day := l_day + 1 ;
    rem
    rem exit when trunc(l_day) > to_date('31122003','ddmmyyyy') ;
    rem
    rem END LOOP ;
    rem
    rem commit ;
    rem end ;
    rem /
    rem create or replace
    rem function fff_status (p_name varchar2, p_day date) return varchar2 is
    rem l_result varchar2(10) ;
    rem begin
    rem
    rem select decode(count(*) ,0,null,'x')
    rem into l_result
    rem from t_test
    rem where name=p_name
    rem and date_from <= p_day and date_to >= p_day
    rem ;
    rem return l_result ;
    rem
    rem end fff_status ;
    rem /
    rem show error
    rem
    rem clear col
    rem column x format A5
    rem
    rem alter session set nls_date_format = 'DD/MM' ;
    rem
    rem select distinct
    rem A.week_iso
    rem ,decode(C.name, '-1', '----------', C.name) name
    rem ,decode(C.name,'-1',to_char(B.day1,'dd.mm'),fff_status(C.name,B.day1))x
    rem ,decode(C.name,'-1',to_char(B.day2,'dd.mm'),fff_status(C.name,B.day2))x
    rem ,decode(C.name,'-1',to_char(B.day3,'dd.mm'),fff_status(C.name,B.day3))x
    rem ,decode(C.name,'-1',to_char(B.day4,'dd.mm'),fff_status(C.name,B.day4))x
    rem ,decode(C.name,'-1',to_char(B.day5,'dd.mm'),fff_status(C.name,B.day5))x
    rem ,decode(C.name,'-1',to_char(B.day6,'dd.mm'),fff_status(C.name,B.day6))x
    rem ,decode(C.name,'-1',to_char(B.day7,'dd.mm'),fff_status(C.name,B.day7))x
    rem from
    rem (select '-1' name , 'A' sort_aux
    rem from t_cal
    rem UNION
    rem select distinct name , 'B' sort_aux
    rem from t_test
    rem order by 2, 1
    rem ) C
    rem ,(select
    rem max(decode(to_char(day,'D'), '2',day,null)) DAY1
    rem ,max(decode(to_char(day,'D'), '3',day,null)) DAY2
    rem ,max(decode(to_char(day,'D'), '4',day,null)) DAY3
    rem ,max(decode(to_char(day,'D'), '5',day,null)) DAY4
    rem ,max(decode(to_char(day,'D'), '6',day,null)) DAY5
    rem ,max(decode(to_char(day,'D'), '7',day,null)) DAY6
    rem ,max(decode(to_char(day,'D'), '1',day,null)) DAY7
    rem ,week_iso
    rem from
    rem T_CAL
    rem group by
    rem week_iso
    rem ) B
    rem ,T_CAL A
    rem where
    rem A.week_iso = B.week_iso
    rem and A.week_iso between '200327' and '200330'
    rem order by
    rem A.week_iso
    rem ;
    rem
    WEEK_ISO NAME X X X X X X X
    200327 ---------- 30.06 01.07 02.07 03.07 04.07 05.07 06.07
    200327 Alpha
    200327 Bravo
    200328 ---------- 07.07 08.07 09.07 10.07 11.07 12.07 13.07
    200328 Alpha x x x
    200328 Bravo x x x x
    200329 ---------- 14.07 15.07 16.07 17.07 18.07 19.07 20.07
    200329 Alpha
    200329 Bravo
    200330 ---------- 21.07 22.07 23.07 24.07 25.07 26.07 27.07
    200330 Alpha
    200330 Bravo
    12 rows selected.

  • How to find the records using contains with the word like this 'some text-some text'?

    Hi,
    How to find the records using the full text contains keyword and that column contains ‘some text-some text’
    In the above some text can be anything.
    Does anybody know please let me know.
    Thanks,

    Hello,
    You can try to create a Full Text Index on the table and use CONTAINS() to get the record which contains the specify words.
    For example:
    SELECT * FROM TABLE WHERE CONTAINS(column_name, 'some text')
    Reference:
    Full-Text Search (SQL Server)
    Creating Full Text Catalog and Full Text Search
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Anybody help to create something like this?

    HI, I was wondering if any of you Flash Gurus can help me with this.
    I found this lovely website @  http://www.studio28couture.com/v2/designyourowndress_COTTON.html
    and I was wondering how to achieve something like it, not the flash movie clip or any graphic but more like the script behind to
    handle the dress making selection.
    Anyone ideas? or Something similar?
    Thanks!

    HI, I was wondering if any of you Flash Gurus can help me with this.
    I found this lovely website @  http://www.studio28couture.com/v2/designyourowndress_COTTON.html
    and I was wondering how to achieve something like it, not the flash movie clip or any graphic but more like the script behind to
    handle the dress making selection.
    Anyone ideas? or Something similar?
    Thanks!

  • Help with an error message: This edit cannot be done...

    "This edit cannot be done because a transition would be cut or an item to one side of a transition would become too short."
    Can someone please help me understand this one? I have a project with self made lower thirds from a .tif graphic on V2 and a text track on V3. Each track has a 15 frame Edge Wipe on both ends. Within the sequence I have no problem either drag copying both tracks together or even copy/pasting them further down the sequence.
    The error pops up when I try to copy/paste to a different sequence. Regardless of whether I try to paste it above my video on V1 or past the video's end I still get that error message.
    If I delete the transitions, I can copy/paste just fine and re-add them, but it's so frustrating. I really just want to understand what's going on here. Could someone explain this in layman's terms?
    Edit: I should also add that if I Option-Click the Toggle Auto Select for track two, I can paste just fine. Which might lead me to believe that it's trying to paste to track V1 where video is already laid down, except that even if I try to paste after the video it still won't work. If I'm copying track V2 and V3, shouldn't paste automatically past to V2 and V3?
    Message was edited by: The Bundok

    I had this problem before. I like to disable extra services to speed up my computer and I disabled the Apple Mobile Device service and had to re-enable this.
    You can do that by going Control Panel>Administrative Tools>Services. Once you have gone to the services window, look for Apple Mobile Device and right-click. Select "Properties". There should be some information about the service as well as the label "Startup Type" with a drop-down menu beside it. If it says "disabled", that is your problem; Change the selection to anything except disabled (Automatic is easier and ensures that you can sync as soon as itunes opens).
    If this doesn't work, I would look into your anti-virus' settings. Good Luck!

  • Need help with class info and cannot find symbol error.

    I having problems with a cannot find symbol error. I cant seem to figure it out.
    I have about 12 of them in a program I am trying to do. I was wondering if anyone could help me out?
    Here is some code I am working on:
    // This will test the invoice class application.
    // This program involves a hardware store's invoice.
    //import java.util.*;
    public class InvoiceTest
         public static void main( String args[] )
         Invoice invoice1 = new Invoice( "1234", "Hammer", 2, 14.95 );
    // display invoice1
         System.out.println("Original invoice information" );
         System.out.println("Part number: ", invoice1.getPartNumber() );
         System.out.println("Description: ", invoice1.getPartDescription() );
         System.out.println("Quantity: ", invoice1.getQuantity() );
         System.out.println("Price: ", invoice1.getPricePerItem() );
         System.out.println("Invoice amount: ", invoice1.getInvoiceAmount() );
    // change invoice1's data
         invoice1.setPartNumber( "001234" );
         invoice1.setPartDescription( "Yellow Hammer" );
         invoice1.setQuantity( 3 );
         invoice1.setPricePerItem( 19.49 );
    // display invoice1 with new data
         System.out.println("Updated invoice information" );
         System.out.println("Part number: ", invoice1.getPartNumber() );
         System.out.println("Description: ", invoice1.getPartDescription() );
         System.out.println("Quantity: ", invoice1.getQuantity() );
         System.out.println("Price: ", invoice1.getPricePerItem() );
         System.out.println("Invoice amount: ", invoice1.getInvoiceAmount() );
    and that uses this class file:
    public class Invoice
    private String partNumber;
    private String partDescription;
    private int quantityPurchased;
    private double pricePerItem;
         public Invoice( String ID, String desc, int purchased, double price )
              partNumber = ID;
         partDescription = desc;
         if ( purchased >= 0 )
         quantityPurchased = purchased;
         if ( price > 0 )
         pricePerItem = price;
    public double getInvoiceAmount()
         return quantityPurchased * pricePerItem;
    public void setPartNumber( String newNumber )
         partNumber = newNumber;
         System.out.println(partDescription+" has changed to part "+newNumber);
    public String getPartNumber()
         return partNumber;
    public void setDescription( String newDescription )
         System.out.printf("%s now refers to %s, not %s.\n",
    partNumber, newDescription, partDescription);
         partDescription = newDescription;
    public String getDescription()
         return partDescription;
    public void setPricePerItem( double newPrice )
         if ( newPrice > 0 )
    pricePerItem = newPrice;
    public double getPricePerItem()
    return pricePerItem;
    Any tips for helping me out?

    System.out.println("Part number:
    "+invoice1.getPartNumber;
    The + sign will concatenate invoice1.getPartNumber()
    after "Part number: " forming only one String.I added the plus sign and it gives me more errors:
    C:\>javac InvoiceTest.java
    InvoiceTest.java:16: operator + cannot be applied to java.lang.String
            System.out.println("Part number: ",   + invoice1.getPartNumber() );
                                                  ^
    InvoiceTest.java:17: cannot find symbol
    symbol  : method getPartDescription()
    location: class Invoice
            System.out.println("Description: ", + invoice1.getPartDescription() );
                                                          ^
    InvoiceTest.java:17: cannot find symbol
    symbol  : method println(java.lang.String,int)
    location: class java.io.PrintStream
            System.out.println("Description: ", + invoice1.getPartDescription() );
                      ^
    InvoiceTest.java:18: cannot find symbol
    symbol  : method getQuantity()
    location: class Invoice
            System.out.println("Quantity: ", + invoice1.getQuantity() );
                                                       ^
    InvoiceTest.java:18: cannot find symbol
    symbol  : method println(java.lang.String,int)
    location: class java.io.PrintStream
            System.out.println("Quantity: ", + invoice1.getQuantity() );
                      ^
    InvoiceTest.java:19: cannot find symbol
    symbol  : method println(java.lang.String,double)
    location: class java.io.PrintStream
            System.out.println("Price: ", + invoice1.getPricePerItem() );
                      ^
    InvoiceTest.java:20: cannot find symbol
    symbol  : method println(java.lang.String,double)
    location: class java.io.PrintStream
            System.out.println("Invoice amount: ", + invoice1.getInvoiceAmount() );
                      ^
    InvoiceTest.java:24: cannot find symbol
    symbol  : method setPartDescription(java.lang.String)
    location: class Invoice
            invoice1.setPartDescription( "Yellow Hammer" );
                    ^
    InvoiceTest.java:25: cannot find symbol
    symbol  : method setQuantity(int)
    location: class Invoice
            invoice1.setQuantity( 3 );
                    ^
    InvoiceTest.java:30: operator + cannot be applied to java.lang.String
            System.out.println("Part number: ", + invoice1.getPartNumber() );
                                                ^
    InvoiceTest.java:31: cannot find symbol
    symbol  : method getPartDescription()
    location: class Invoice
            System.out.println("Description: ", + invoice1.getPartDescription() );
                                                          ^
    InvoiceTest.java:31: cannot find symbol
    symbol  : method println(java.lang.String,int)
    location: class java.io.PrintStream
            System.out.println("Description: ", + invoice1.getPartDescription() );
                      ^
    InvoiceTest.java:32: cannot find symbol
    symbol  : method getQuantity()
    location: class Invoice
            System.out.println("Quantity: ", + invoice1.getQuantity() );
                                                       ^
    InvoiceTest.java:32: cannot find symbol
    symbol  : method println(java.lang.String,int)
    location: class java.io.PrintStream
            System.out.println("Quantity: ", + invoice1.getQuantity() );
                      ^
    InvoiceTest.java:33: cannot find symbol
    symbol  : method println(java.lang.String,double)
    location: class java.io.PrintStream
            System.out.println("Price: ", + invoice1.getPricePerItem() );
                      ^
    InvoiceTest.java:34: cannot find symbol
    symbol  : method println(java.lang.String,double)
    location: class java.io.PrintStream
            System.out.println("Invoice amount: ", + invoice1.getInvoiceAmount() );
                      ^
    16 errors

  • Help with drag picture like google map

    Hi all,
    I would like to create on my web page a architectural blue
    print of a house that people can see everything but inside a small
    800pixel x 500pixel. My picture is 10 times bigger so I would like
    to do the same process as Google Map, you click and drag your mouse
    to move the map with the zoom thing. Is they a way to do it ? a
    program that exist or could Dreamweaver can do it ?
    I'm not a expert and not also a god but I have a base in
    Dreamweaver
    Can someone highlight/help me on this one ?
    thanks in advance !

    If you have Photoshop CS3, there is a program, "Zoomify",
    that allows you to create exactly what you need. It's under
    "export".

  • Help with TYPE and LIKE statements

    HI guys,
    I know this is really novice stuff, but I am a little confused.
    Can anyone please explain the exact difference between TYPE and like with the help of a program, to understand it.
    What situation would demand the use of each of the LIKE statement, since I can do all these things using the TYPE ?

    Hi Akhil,
    I summarized the info in SDN posts and SAP Help, to make it easier for you to understand. I also included some code snippets. Hope these prove to be helpful to you.
    The following is from SAP Help:
    The Additions TYPE and LIKE
    The additions TYPE type and LIKE dobj are used in various ABAP statements. The additions can have various meanings, depending on the syntax and context.
    ·        Definition of local types in a program
    ·        Declaration of data objects
    ·        Dynamic creation of data objects
    ·        Specification of the type of formal parameters in subroutines
    ·        Specification of the type of formal parameters in methods
    ·        Specification of the type of field symbols
    A known data type can be any of the following:
    ·        A predefined ABAP type to which you refer using the TYPE addition
    ·        An existing local data type in the program to which you refer using the TYPE addition
    ·        The data type of a local data object in the program to which you refer using the LIKE addition
    ·        A data type in the ABAP Dictionary to which you refer using the TYPE addition. To ensure compatibility with earlier releases, it is still possible to use the LIKE addition to refer to database tables and flat structures in the ABAP Dictionary. However, you should use the TYPE addition in new programs.
    The LIKE addition takes its technical attributes from a visible data object. As a rule, you can use LIKE to refer to any object that has been declared using DATA or a similar statement, and is visible in the current context.  The data object only has to have been declared. It is irrelevant whether the data object already exists in memory when you make the LIKE reference.
    ·        In principle, the local data objects in the same program are visible. As with local data types, there is a difference between local data objects in procedures and global data objects. Data objects defined in a procedure obscure other objects with the same name that are declared in the global declarations of the program.
    ·        You can also refer to the data objects of other visible ABAP programs. These might be, for example, the visible attributes of global classes in class pools. If a global class cl_lobal has a public instance attribute or static attribute attr, you can refer to it as follows in any ABAP program:
    DATA dref TYPE REF TO cl_global.
    DATA:  f1 LIKE cl_global=>attr,
           f2 LIKE dref->attr.
    You can access the technical properties of an instance attribute using the class name and a reference variable without first having to create an object. The properties of the attributes of a class are not instance-specific and belong to the static properties of the class.
    Example
    TYPES: BEGIN OF struct,
             number_1 TYPE i,
             number_2 TYPE p DECIMALS 2,
           END OF struct.
    DATA:  wa_struct TYPE struct,
           number    LIKE wa_struct-number_2,
           date      LIKE sy-datum,
           time      TYPE t,
           text      TYPE string,
           company   TYPE s_carr_id.
    This example declares variables with reference to the internal type STRUCT in the program, a component of an existing data object wa_struct, the predefined data object SY-DATUM, the predefined ABAP type t and STRING, and the data element S_CARR_ID from the ABAP Dictionary.
    The following info is from various posts:
    --> Type: It is used when userdefined object link with SAP system data type.
    Local types mask global types that have the same names. When typing the interface parameters or field symbols, a reference is also possible to generic types ANY, ANY TABLE,INDEX TABLE, TABLE or STANDARD TABLE, SORTED TABLE and HASHED TABLE.
    --> Like: It is when data object link with the other data object.
    --> TYPE, you assign datatype directly to the data object while declaring.
    --> LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
    you can refer to all visible data objects at the ABAP program's positon in question. Only the declaration of the data object must be known. In this case it is totally irrelevant whether the data object already exists physically in
    memory during the LIKE reference. Local data objects mask global data objects that have the same name.
    --> Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.
    Types: var1(20) type c.
    data: var2 type var1. ( type is used bcoz var1 is defined with TYPES and it
    does not occupy any memory spce.
    data: var3 like var2. ( like is used here bcoz var2 is defined with DATA
    so it does occupy space in memory ).
    data: material like mara-matnr. ( like is used here bcoz mara-matnr is stored in memory)
    --> Type refers the existing data type
    --> Like refers the existing data object
    Please Reward Points if any of the above points are helpful to you.
    Regards,
    Kalyan Chakravarthy

Maybe you are looking for

  • About getting the values from a FM

    Hi experts,                  I have used the function module 'HR_READ_INFOTYPE' to get all the field values of the infotype 0008 (Basic Pay). I have given the infty as 0008 in exporting and infty_tab as p0008 in tables. But it shows a run time error

  • Updating Credit Card details for a customer site

    Hi, I need to update our credit card details for our sites but the person who set these sites up no longer works with us and I cant access the Site Billing pages on the Admins or my Partner Portal to update the credit card details. How do I sort this

  • [b]Help in calling web services method[/b]

    i doing at client side now. iwish to call the method which provide by axis. here is my code.... import hotel.*; //normal servlet package import import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; import java.text

  • Lightroom Slideshow is Blurry

    Both the preview and play option render a beautiful slide show on my monitor.  However, when I export it to even a 1080p video the image and especially the text is blurry.  Why is this?  I would really like a method to produce really nice crisp looki

  • Flash Player Doesn't Show Or Work

    The Flash Player doesn't show or work in either MySpace or YouTube. I've tried uninstalling and reinstalling it, but no use. It worked fine the other day. How can this be resolved?