Help with these two loops

Hi I hope someone can help me?
I have these two loops, which at the moment prints out like this
addr1, id, phone, lastname, firstname
town, addr2, postcode, county, country
[7,4,2,1,0]
[9,8,6,5,3]
the first two lines is what vector vv2 holds inside it.
the second two line is what vector vv holds inside it.
my problem is how can i get it to printout like this?
[7,4,2,1,0]
addr1, id, phone, lastname, firstname
[9,8,6,5,3]
town, addr2, postcode, county, country
I hope someone can help me thanks
nicky
for (int ii2=0;ii2 < results2.size(); ii2++) {
                vv2 = (Vector)results2.elementAt(ii2);     
                      ste2 = vv2.toString();
                         stb2 = new StringBuffer(ste2);
                         stb12 = new StringBuffer();
                         int is = stb2.length();
                         int is2 = is-2;
                         int is3 = is-1;
                         stb2.replace(0,1,"");
                         stb2.replace(is2,is3,"");
                         for(int i222 = 0; i222 < vv2.size(); i222++){
                              stb12.append(",");
                              stb12.append("?");
                              stb12.replace(0,1,"");
                              System.out.println(stb2);
for (int ii = 0; ii < results.size(); ii++) {
    vv = (Vector)results.get(ii);
System.out.println(vv);
}

You are using more for loops than you need to. If you just want to print out the element of one vector after the other then just put it in the same loop. Here try this:
for (int ii2=0;ii2 < results2.size(); ii2++) {
                vv2 = (Vector)results2.elementAt(ii2);     
                      ste2 = vv2.toString();
                         stb2 = new StringBuffer(ste2);
                         stb12 = new StringBuffer();
                         int is = stb2.length();
                         int is2 = is-2;
                         int is3 = is-1;
                         stb2.replace(0,1,"");
                         stb2.replace(is2,is3,"");
                         for(int i222 = 0; i222 < vv2.size(); i222++){
                              stb12.append(",");
                              stb12.append("?");
                              stb12.replace(0,1,"");
                              System.out.println(stb2);
     vv = (Vector)results.get(ii2);
     System.out.println(vv);
      And for god sakes man use some better names for your for loop iterator. Usually it is custom to start with i and if you need an inner for loop or another for loop within the same scope move on to using j and then k, so on and so on. All those numbers in your variables make the code harder to read than it needs to be. Just a suggestion, good luck.

Similar Messages

  • I need help with these two crash IDs nsStyleContext::FindChildWithRules(nsIAtom const*, nsRuleNode*) and DFusionWebPlugin@0x86b5

    I need help with these two crashes...
    PL_DHashTableOperate | GCGraphBuilder::NoteRoot(unsigned int, void*, nsCycleCollectionParticipant*)
    DFusionWebPlugin@0x86b5
    The first one happened a couple of days ago, a few times and not on any specific website.
    The second one only happens on the site below.

    The second one indicates a problem with the DFusionWebPlugin that shows in your More system details list.
    # D'Fusion Web Plug-In for Safari 64 bits (3.00.13774.0)
    # D'Fusion Web Plug-In (3.00.13774.0)
    What you posted are crash signatures.<br />
    It might help if you post the actual crash IDs (bp-xxxxxxxx-xxxxxxxxx-xxxx-xxxxxxxxxxxx).<br />
    You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page.
    See http://kb.mozillazine.org/Breakpad (Mozilla Crash Reporter)

  • HT4528 I am trying to sync iTunes and download ringtones from Apple store.  I am not able to on my iPhone.  need help with these two issues

    I am having issues with several areas on my iPhone:
    1. When I am trying to update my iTunes on my phone from my laptop I have trouble syncing to my iPhone. How do I get my songs from iTunes transfered to my iPhone?
    2. I am not able to purchase/download ring tones to my iPhone.  Am I able to purchase ringtones?
    3. My daughter has an iPhone also, and it appears that we have to share contacts?  My phone was populated with her contacts and vice versa.  How do I seperate the contacts?

    If it's an iPhone 4S or earlier, download iTunes 10.6.3. This requires Mac OS X 10.5.8.
    If it's an iPhone 5, you need to buy a Mac OS X 10.6 DVD, run the Mac OS X 10.6.8 combo updater, and then install iTunes 11.
    (80456)

  • I need help with controlling two .swf's from third.

    Hi, thanks for reading!
    I need help with controlling two .swf's from third.
    I have a problem where I need to use a corporate designed
    .swf in a digital signage solution, but have been told by the legal
    department that it can not be modified in any way, I also can't
    have the source file yada yada. I pulled the .swfs from their
    website and I decompiled them to see what I was up against.
    The main swf that I need to control is HCIC.swf and the
    problem is it starts w/ a preloader, which after loading stops on a
    frame that requires user input (button press) on a play button,
    before the movie will proceed and play through.
    What I have done so far is to create a container swf,
    HCIC_container.swf that will act as Target for the HCIC.swf, and
    allow me to send actionscript to the file I'm not allowed to
    modify.
    I managed to get that done with the help of someone on
    another forum. It was my hope that the following script would just
    start HCIC.swf at a frame past the preloader and play button, and
    just play through.
    var container:MovieClip = createEmptyMovieClip("container",
    getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this);
    mcLoader.loadClip("MCIC.swf", container);
    function onLoadInit(mc:MovieClip) {
    mc.gotoAndPlay(14);
    But unfortunately it didn't solve my problem. Because there
    is a media-controller.swf, that is being loaded by HCIC.swf that
    has the controls including the play button to start HCIC.swf.
    Here's a link to a .zip file with all 3 .swf files, and all 3
    .fla files.
    http://www.axiscc.com/temp/HCIC.zip
    What I need to do is automatically start the HCIC.swf file
    bypassing the pre-loader and play button without editing it or the
    media-controller.swf in anyway. So all the scripting needs to be
    done in HCIC_container.swf.
    I know this is confusing, and its difficult to explain, but
    if you look at the files it should make sense.
    ActionScripting is far from my strong point, so I'm
    definitely over my head here.
    Thanks for your help.

    Got my solution on another forum.
    http://www.actionscript.org/forums/showthread.php3?t=146827

  • Sign on problems within Elements 10; plus cannot backup writing files error with file catalog.pse10db.  No indication what the problem is.  How do I get adobe help with these problems?

    Sign on problems within Elements 10; plus cannot backup, writing files error with file catalog.pse10db.  No indication what the problem is.  How do I get adobe help with these problems?

    Sign on problems within Elements 10; plus cannot backup, writing files error with file catalog.pse10db.  No indication what the problem is.  How do I get adobe help with these problems?

  • Help with these queries

    Hi all,
    I need a help with these queries, because is happening a strange problem when I try to execute it.
    This first query is executed faster than the other one, around 30 minutes faster.
    The queries are the same, but there is a single difference, I switch the hard code value '5.93218%' in a like condition by a variable P_COD_RAIZ || '%', because it can't be hard code.
    SELECT max(oh.ohipp) as mesano_ultfatura
    INTO V_MESANO_FATURA
    FROM sysadm.orderhdr_all@dl_bsc oh,
    customer_all@dl_bsc ca
    WHERE ca.custcode like '5.93218%'
    and ca.customer_id = oh.customer_id
    and oh.ohipp = (select max(yy.ohipp)
    from orderhdr_all@dl_bsc yy
    where yy.customer_id = oh.customer_id
    and oh.ohinvtype = 5);
    SELECT max(oh.ohipp) as mesano_ultfatura
    FROM sysadm.orderhdr_all@dl_bsc oh,
    customer_all@dl_bsc ca
    WHERE ca.custcode like P_COD_RAIZ || '%'
    and ca.customer_id = oh.customer_id
    and oh.ohipp = (select max(yy.ohipp)
    from orderhdr_all@dl_bsc yy
    where yy.customer_id = oh.customer_id
    and oh.ohinvtype = 5);
    What I want to know is, why the execution time of the second query is greater than the first, if the only difference between it is a variable instead of hard code?
    Thanks,
    Murilo.

    I assume column custcode is also varchar2. Then it looks like a problem with bind values and not evenly distributed data.
    When you first run the query with the parameter = '5%' you may get many values and another execution plan as with '5.93218%' on a second run. However the execution plan is saved between the first and second run and not adopted to the new values.
    There are ways out of this "bind" problem. But all have to do with providing us a good execution plan first.
    However you can start by yourself with forcing the use of the index on the column custcode.

  • It keeps trying to update but then says that the program is running and can't update then goes into a loop with these two boxes.

    I tried to Google a topic but when I clicked on the topic I wanted it posted a popup that said it had to update Firefox, followed immediately with a box that says it can't update firefox as it is running. These two boxes keep popping up as soon as you close the other one in one giant loop. I can only turn it off by shutting down the computer. I didn't have Firefox running when I tried to google the topic.

    If there are problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the disk image (dmg) file to the desktop
    *Firefox 8.0.x: http://www.mozilla.com/en-US/firefox/all.html
    *Trash the current Firefox application to do a clean (re-)install
    *Install the new version that you have downloaded
    Your profile data is stored elsewhere in the Firefox Profile Folder, so you won't lose your bookmarks and other personal data if you uninstall and (re)install Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox

  • Help with a while loop condition

    I'm trying to write to a File. I ask the user for input, then I enter a while loop and test the condition. The loop works, but it won't stop. I've tried everything. Here is my code please help!!
    thanks
    inputline = keyboard.readLine();//read the keyboard
    try{
    while( inputline != null ){
    DiskOut.println( inputline );
    DiskOut.flush();
    inputline = keyboard.readLine();//read the keyboard again
    }//end while
    }//end try
    catch (IOException e) { 
    e.printStackTrace();
    }//end catch
    also i've tried these while loop conditions:
    while(inputline != "\n" || inputline != "\r") and the sort

    while(inputline != "\n" || inputline != "\r")The condition
    X!=Y OR X!=Z (given Y != Z)
    is always true. X will always not be equal to at least one of the values. So you'll want to use:
    while(!inputline.equals("\n") && !inputline.equals("\r"))In other words, "while inputline is not equal to either of them". Note the use of && instead of ||.
    If "keyboard" is simply a BufferedReader on top of System.in (and not your own class), the trailing line feeds and carriage returns won't even be in the string returned by readLine(). Your best bet is this:
    while(null != inputline && 0 != inputline.length())Make sure you type the two parts of that AND condition in the order above. If for whatever reason there are trailing \r and \n on the strings, you'll want to accomodate for platforms that may include both characters.
    // trim the trailing newline characters
    while(inputline.endsWith("\r") ||
          inputline.endsWith("\n")) {
       inputline = inputline.substring(0,inputline.length()-1);
    // or maybe this will work if you don't mind losing
    //  the whitespace at the beginning of the string:
    inputline = inputline.trim();Hope that helps somewhat.

  • I need help with my for loop in this array

    Ok well, I can't get my code to work. Also, please remember that this is just my draft so it isnt pretty. I will fix it up later so please look at it. The thing I want to do is look into the array for a time that matches what the user entered and return the toString() of that one. I know there is something wrong with my for loop but I cant figure how to fix it. please help. here is what i have so far:
    import javax.swing.JOptionPane;
    public class Runner
        public static void main (String[] args)
            String timeStr;
            int time, again, optiStr;
            Inbound[] in = new Inbound[25];
             in[0]=new Inbound ("",0,"On Time num0");
             in[1]=new Inbound ("",2,"On Time num1");
             in[2]=new Inbound ("",3,"Delayed num2");
             in[3]=new Inbound ("",4,"On Time");
             in[4]=new Inbound ("",5,"On Time");
             in[5]=new Inbound ("",6,"Canceled");
             in[6]=new Inbound ("",1,"Canceled num6");
             in[7]=new Inbound ("",8,"On Time");
             in[8]=new Inbound ("",9,"Delayed");
             in[9]=new Inbound ("",10,"On Time");
             in[10]=new Inbound ("",11,"Delayed");
             in[11]=new Inbound ("",12,"On Time");
             in[12]=new Inbound ("",13,"Delayed");
             in[13]=new Inbound ("",14,"On Time");
             in[14]=new Inbound ("",15,"On Time");
             in[15]=new Inbound ("",16,"On Time");
             in[16]=new Inbound ("",17,"Canceled");
             in[17]=new Inbound ("",18,"On Time");
             in[18]=new Inbound ("",19,"On Time");
             in[19]=new Inbound ("",20,"Canceled");
             in[20]=new Inbound ("",21,"On Time");
             in[21]=new Inbound ("",22,"Delayed");
             in[22]=new Inbound ("",23,"On Time");
             in[23]=new Inbound ("",24,"Cancled");
             in[24]=new Inbound ("",7,"On Time num24");
            do{
                timeStr = JOptionPane.showInputDialog ("In military time, what hour do you want?");
                time = Integer.parseInt(timeStr);
                if (time<=0 || time>24)
                 JOptionPane.showMessageDialog (null, "Error");
                 optiStr = JOptionPane.showConfirmDialog (null, "If you want Incoming flights click Yes, but if not click No");
                if (optiStr==JOptionPane.YES_OPTION)
    //(ok this is the for loop i am talking about )
                    for (int index = 0; index < in.length; index++)
                      if ( time == Inbound.getTime())
                   JOptionPane.showMessageDialog (null, Inbound.tostring());  //return the time asked for
    //               else JOptionPane.showMessageDialog (null, "else");
                }//temp return else if failed to find time asked for
    //             else
    //               if (optiStr==JOptionPane.CANCEL_OPTION)
    //                 JOptionPane.showMessageDialog(null,"Canceled");
    //              else
    //                {Outbound.run();
    //                JOptionPane.showMessageDialog (null, "outbound");}//temp
                  again=JOptionPane.showConfirmDialog(null, "Try again?");
            while (again==JOptionPane.YES_OPTION);
    }any help would be greatly appriciated.

    rumble14 wrote:
    Ok well, I can't get my code to work. Also, please remember that this is just my draft so it isnt pretty. I will fix it up later so please look at it. The thing I want to do is look into the array for a time that matches what the user entered and return the toString() of that one. I know there is something wrong with my for loop but I cant figure how to fix it. please help. here is what i have so far:
    >//(ok this is the for loop i am talking about )
    for (int index = 0; index < in.length; index++)
    if ( time == Inbound.getTime())
    JOptionPane.showMessageDialog (null, Inbound.tostring());  //return the time asked for
    Inbound.getTime() is a static method of your Inbound class, that always returns the same value, I presume? As opposed to each of the 25 members of your array in, which have individual values?
    Edited by: darb on Mar 26, 2008 11:12 AM

  • Help with Merging Two Accounts....

    Hi,
    We ended up with two my Best Buy accounts.
    I called up and talked with someone, who said they would merge the accounts....
    A few hours later, when I logged in, the website said I had two accounts and to choose one to view.
    That lasted for about 4 days,
    Then, the website didn't ask anymore and just logged into one account ... which I thought meant the merge had occured.
    HOWEVER, none of the purchases on the"other" account are on the primary account, which was the point of te

    Hi scXenon,
    I used the email address you registered with the forum to review your information, and I do see that you currently have two active My Best Buy™ accounts.  If the primary information shared between the two accounts matches, then we should have no problem merging them.  That process would involve closing one account, and then moving any unused points/certificates from the closed account to the active primary account.
    I do see that you have an open case with our Account Maintenance department and I trust that they will be able to help successfully merge your accounts; however, I am going to send you a private message to see if there is anything I can help with.  To check your private messages, you would want to login to the forum and click on the yellow envelope icon located at the top of the page.
    Merging My Best Buy™ Accounts
    Thank you for posting!
    Derek|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Help with implementing two different programs

    I need help with a couple of Java programs that I downloaded. I hope someone can help me. They work great if they're on their own, but if they are both on the same page, the 2nd one works, and the 1st one stops working. I'm pretty new to Java, so I don't know how to debug it too well.. Here's the 1st program:
    Conveyor belt slideshow script-
    ? Dynamic Drive (www.dynamicdrive.com)
    For full source code, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com
    //Specify the slider's width (in pixels)
    var sliderwidth="250px"
    //Specify the slider's height
    var sliderheight="19px"
    //Specify the slider's slide speed (larger is faster 1-10)
    var slidespeed=2
    //configure background color:
    slidebgcolor=""
    //Specify the slider's images
    var leftrightslide=new Array()
    var finalslide=''
    leftrightslide[0]='<img src="images/movingwords.gif">'
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    var copyspeed=slidespeed
    leftrightslide='<nobr>'+leftrightslide.join(" ")+'</nobr>'
    var iedom=document.all||document.getElementById
    if (iedom)
    //Next line edited for readability
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">
    '+leftrightslide+'</span>')
    var actualwidth=''
    var cross_slide, ns_slide
    function fillup(){
    if (iedom){
    cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
    cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
    cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
    actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
    cross_slide2.style.left=actualwidth+20+"px"
    else if (document.layers){
    ns_slide=document.ns_slidemenu.document.ns_slidemenu2
    ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
    ns_slide.document.write(leftrightslide)
    ns_slide.document.close()
    actualwidth=ns_slide.document.width
    ns_slide2.left=actualwidth+20
    ns_slide2.document.write(leftrightslide)
    ns_slide2.document.close()
    lefttime=setInterval("slideleft()",30)
    window.onload=fillup
    function slideleft(){
    if (iedom){
    if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
    cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
    else
    cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30+"px"
    if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
    cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
    else
    cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30+"px"
    else if (document.layers){
    if (ns_slide.left>(actualwidth*(-1)+8))
    ns_slide.left-=copyspeed
    else
    ns_slide.left=ns_slide2.left+actualwidth+30
    if (ns_slide2.left>(actualwidth*(-1)+8))
    ns_slide2.left-=copyspeed
    else
    ns_slide2.left=ns_slide.left+actualwidth+30
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
    //Next line edited for readability
    write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';
    background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
    write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
    write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
    write('</div></div>')
    else if (document.layers){
    write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
    write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('</ilayer>')
    document.write('</td></table>')
    }Here's the 2nd program:
    //Fade-in image slideshow- By Dynamic Drive
    //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
    //This credit MUST stay intact for use
    var slideshow_width='305px' //SET IMAGE WIDTH
    var slideshow_height='152px' //SET IMAGE HEIGHT
    var pause=5000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
    var fadeimages=new Array()
    //SET IMAGE PATHS. Extend or contract array as needed
    fadeimages[0]="images/Computer Retail Store.jpg"
    fadeimages[1]="images/Computer S&S ad.jpg"
    fadeimages[2]="images/Computer S&S ad 2.jpg"
    fadeimages[3]="images/Phone S&S ad.jpg"
    ////NO need to edit beyond here/////////////
    var preloadedimages=new Array()
    for (p=0;p<fadeimages.length;p++){
    preloadedimages[p]=new Image()
    preloadedimages[p].src=fadeimages[p]
    var ie4=document.all
    var dom=document.getElementById
    if (ie4||dom)
    //Next line edited for readability
    document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden">
    <div  id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:
    alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';
    height:'+slideshow_height+';top:0;left:0;filter:
    alpha(opacity=10);-moz-opacity:10"></div></div>')
    else
    document.write('<img name="defaultslide" src="'+fadeimages[0]+'">')
    var curpos=10
    var degree=10
    var curcanvas="canvas0"
    var curimageindex=0
    var nextimageindex=1
    function fadepic(){
    if (curpos<100){
    curpos+=10
    if (tempobj.filters)
    tempobj.filters.alpha.opacity=curpos
    else if (tempobj.style.MozOpacity)
    tempobj.style.MozOpacity=curpos/100
    else{
    clearInterval(dropslide)
    nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
    tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
    tempobj.innerHTML='<img src="'+fadeimages[nextimageindex]+'">'
    nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
    setTimeout("rotateimage()",pause)
    function rotateimage(){
    if (ie4||dom){
    resetit(curcanvas)
    var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
    crossobj.style.zIndex++
    var temp='setInterval("fadepic()",50)'
    dropslide=eval(temp)
    curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
    else
    document.images.defaultslide.src=fadeimages[curimageindex]
    curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
    function resetit(what){
    curpos=10
    var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
    if (crossobj.filters)
    crossobj.filters.alpha.opacity=curpos
    else if (crossobj.style.MozOpacity)
    crossobj.style.MozOpacity=curpos/100
    function startit(){
    var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
    crossobj.innerHTML='<img src="'+fadeimages[curimageindex]+'">'
    rotateimage()
    if (ie4||dom)
    window.onload=startit
    else
    setInterval("rotateimage()",pause)Like I said, if the 2nd program is put the same page with the 1st, the 1st program stops working. Any ideas? I would really like to implement both of these programs.

    The code you post is javascript, NOT java ! ... but either way, maybe the scripts have variables in conflict, so if you pack each piece of code in diferent functions and then you call the functions it may work.

  • I need help with these adobe illustrator questions?

    Please help with the following questions. Thanks!!
    The keyboard short for selecting the direct selection tool is?
    The rectangle that shows the outermost dimensions of any box is called the?
    A floating panel can be placed on the panel dock by?
    The selection tool is displayed as a black arrow and is used to select, resize, or move an entire item.(true or false)
    One way to deselect an object is to click somewhere else on the document (true or false)
    A stroke is on the inside of a shape or object (true or false)
    The more text framed you use, the better your document. (true or false)
    The rectangle frame has a non printing X on it (true or false)
    To print preview a document, click on the Save icon on the standard toolbar. (true or false)

    I'm not sure if it's a good idea to go the route you go now.
    You are asking for assistance and – as I understand it – you are just trying to pass a class right now, but you don't know the answers to a lot of pretty basic questions.
    What's your purpose?
    I – as well as many people here – could answer all your questions. Also, I could provide some misleading hints which could cause serious trouble for you in case you would use them in your exam.
    You should go a different route.

  • Help with a nested loop

    basically i need to make a diamond shape out of asterisks. There should be 11 in the middle and decreasing by 2 each line above and below it, until it reaches 1. Now i've come up with a for loop that prints what i need for the top half of the diamond(but the asterisks are not centered). How would i center them and also print the bottom half of the diamond? here's what i have so far.
    import java.io.*;
    class diamond{
         public static void main(String[] args)
         int a;
         int b;
              for(a = 1; a <=11; a++)
                   for(b = 1; b <= a; b++)
                        System.out.print('*');
              System.out.println();
    }here's what it outputs:
    Press any key to continue . . .

    public class Diamond {
        private static final int MAX = 11;
        private static final int MIN = 1;
        public static void main(String[] args) throws Exception {
            for(int a = MIN; a <= MAX; a++) {
                for(int b = MAX; b >= MIN; b--) {
                    if(b <= a) {
                        System.out.print(" *");
                    } else {
                        System.out.print(" ");
                System.out.println();
            for(int a = MIN; a <= MAX; a++) {
                for(int b = MIN; b <= MAX; b++) {
                    if(b <= a) {
                        System.out.print(" ");
                    } else {
                        System.out.print(" *");
                System.out.println();
    }And here's my output:
               *

  • Please help with combining two java packages into one iteration

    Hello, I work for a pharmaceutical company and run reports for credits that we have received. Currently the packages are reported seperately from the credit reports and my job is to combine them. There are two models that handle these and I need to link the second to the first with some common entities. Please help me figure out what I need to do in order to add a credit column to the report. I have a sample of the code below and would appreciate any help you can offer.
    First, the info pulled about the boxes:
    rm = (ReportManager) ManagerFactory.getManager(ManagerFactory.REPORTS);
    items = rm.getRVSSearchResults(hvstoresid,
    hvstoregroupsid,
    String.valueOf(request.getParameter("price_type")).trim(),
    String.valueOf(report_by).trim(),
    vendor_type,
    String.valueOf(request.getParameter("vendor")).trim(),
    from_date,
                        until_date,
    debitNum,
                        processing_type,
    sort_field,
    sort_direction,
                        includeAll222s).iterator();
    Second, the page that has the data i need to transpose to the first:
    PackoutModel pm = null;
                             int iter = searchpageposition*resultPageSize;
                             while (iter < packouts.size() && iter<(searchpageposition*resultPageSize)+resultPageSize)
                             { pm = (PackoutModel) packouts.get(iter);
                                  BigDecimal invoiceAmt = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getInvoiceAmt(),"0.00");
                                  BigDecimal creditRec = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getAmtReceived(),"0.00");
                                  BigDecimal processingFee = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getProcessFeeTotal(),"0.00");
                                  BigDecimal shippingFee = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getShippingHandlingFeeTotal(),"0.00");
                                  BigDecimal balanceDue =(invoiceAmt.add(processingFee.add(shippingFee))).subtract(creditRec);
    All that I need from the second page is to get a value for:
    DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getAmtReceived(),"0.00");
    which I believe must first have the store id, etc equal to the first model. So there is the existing rvs.FOO and the needed pm.BAR but since it is in an iter loop, I can't seem to figure out how to join the two.
    Any ideas?

    could you explain your problem with a simplified schema or a more
    understandable code.
    (don't bother to write the details of your project plz)

  • Can anyone help with these annoyances

    Hi,
    I've used Logic since 2.4 and enjoyed its continued development and improvement up through Logic 7. Since the major retooling in Logic 8, I feel that it has become more buggy, less professional and genuinely less pleasurable to use. I've found work arounds (or just given up) on some things that used to be easy or even just "doable" in older version... Maybe some of you out there have some solutions to the following annoyances in Logic 9.x
    I wish it would/could;;;
    Return to last play position while in record. (worked fine on Logic 7)
    Copy Drag consistently instead of just moving the part (even though the help tag says "copy" it only drags, then often puts it a measure ahead of where I put it) (worked fine on Logic 7)
    Not Record audio while recording midi if an audio track is in "input" (worked fine on Logic 7)
    Could resize screen objects and things like I really want them to look (worked fine on Logic 7)
    Not have major lag times for things like renaming objects, deleting tracks in the arrange page, bouncing, opening 3rd party plug ins, (worked fine on Logic 7)
    Have freedom to put the loop browser anywhere I want (worked fine on Logic 7)
    Get key commands to work consistently (worked fine on Logic 7)
    Could assign record names globally instead of only on the track being recorded (worked fine on Logic 7)
    Have a visible tool bar for things like "pencil" "fade" "text" etc instead of a pull down menu (worked fine on Logic 7)
    Have visual feedback when I've armed the "Fade" tool (worked fine on Logic 7)
    Be able to choose fonts and sizes on individual score text objects (worked fine on Logic 7)
    Not have help tags constantly bugging me when I'm resizing or moving notes and objects (worked fine on Logic 7)
    Be able to create a new "audio object" in the environment (instead of having to copy something else and then reassign its purpose (worked fine on Logic 7)

    Dan,
    I can commiserate with you on most of these annoyances. Let's just say that we're kindred spirits in this regard. Hopefully I can help you alleviate some of these things that stick in your craw. I'll (try and) limit my comments to things that can be changed (as opposed to those which are "permanently broken"):
    Could resize screen objects and things like I really want them to look (worked fine on Logic 7)
    Plugin windows can be resized in L9. Aside from that, I'll (try to) stick to limiting my comments re those things that cannot be changed.
    Have a visible tool bar for things like "pencil" "fade" "text" etc instead of a pull down menu (worked fine on Logic 7)
    The variety of tools has been reduced (for your safety and well-being) to the lucky number of three, and that's only if you have the right click assigned as a tool. Otherwise you are limited to two. So it's still a palette, though compared to what we used to have it's kind of hard to swallow. In case you didn't notice, there's a pun in there. I almost missed it myself.
    I have my "V" key programmed to call up the toolbox. Its close proximity to the spacebar (play/stop) and the CMD key (for assigning a tool to) make it an ideal way to change tools without having to mouse all the way across the screen to access the unpalatable palette.
    Be able to choose fonts and sizes on individual score text objects (worked fine on Logic 7)
    This is still possible using the slow-to-appear, WYSI-not-WYG, icky-looking, way-too-small-font "Fonts" editor in the score editor. *Text > Fonts...* And because it's no longer even remotely as easy to resize text I've gotten into using the resize tool, as well as setting up various boilerplate text styles using the text styles editor. One thing that's nice though (hey, it's not all bad) is that you can import text styles from other projects.
    Not have help tags constantly bugging me when I'm resizing or moving notes and objects (worked fine on Logic 7)
    These can be disabled in the Logic prefs: *Prefs > Display > General*
    Be able to create a new "audio object" in the environment (instead of having to copy something else and then reassign its purpose (worked fine on Logic 7)
    You can still do this. Environment: *New > Channel Strip > Audio*
    The best thing about Logic 9 is flex editing. Othewise, gimme back L7 any day (minus the bugs, of course).

Maybe you are looking for

  • Memory on GNB MAX

    Hi there, i have a queestion about memory type for the GNB MAX, in the specifications it says that the type of memory should be 2100 (266), but can i use another newer? for example one memory at 2700? i know that maybe the performance is not the same

  • Just bought Ear Force Z11 - headset, can't get it to work on my iMac intel based on the Windows side

    I have used Boot Camp on my iMac 21" early 2008 to partition and set-up Windows 7 so that I could use my FSX Flight simulator, I bought EarForce Z11 headset to use with my simulator and can't get it to work, has anyone else ran in to this problem?  I

  • Actual Cost Varience

    hi, I have observed difference in actual cost of maintenance order in PM reports with Costing report. In this costing report values are correct and  PM Report and order showing incorrect value. Thanks and Regards Mohan

  • Hosting question

    What if I want to host more than 5 Adobe Muse sites - what are my options? Or, how much is it for a client to host with Adobe and maintain in-browser editing tools for 2 different sites?

  • Why does my retina display keep flickering after I get it fixed?

    Since I bought my Macbook Pro 2012 in July 16 GB the display has been flickering every once and a while. Sometimes it gets so bad that you can't even see the screen. All it does it redraw the video over and so fast to make the screen appear to flicke