Array position problem

HI everyone I am looking for some help on an array problem.
I am reading in a text file that is in a line by line format eg.
apple
orange
pear
etc
The problem is that I want my array to increment each line. However each time a new line is read from the text file the array postion goes back to zero. Im assuming theres something wrong with my loop. Somebody please help!!!
String line;
String[] words;
int i;
try { 
BufferedReader reader = new BufferedReader(new FileReader("wordlist.txt"));
while((line = reader.readLine()) != null){
words = line.split(" ");
for(i = 0; i < words.length; i++){
Arrays.sort(words);
//System.out.println(words);
if(findWord.equals(words[i])) {
Cap = "the word was found at position " + Arrays.binarySearch(words, words[i]);
test=true;
checkString();
reader.close();
I I read in
apple orange pear
carrot cucumber tomato
then apple[0] orange[1] pear[2]
but then this resets to 0 on new line i.e
carrot[0] cucumber[1] tomato[2]

Correct me if Im wrong but I think I have created the
array out side the loop.Your original code declares the array outsid of the loop, but it doesn't create it. It just allocates a reference variable that will point to the aray.
Inside the loop, where you do words = split you're creating a new array each time. (And like I said, if there's only one word on a line, you don't need to spilt.)
As for putting the next
lines word into the array on each loop pass I do not
understand how to do this. Any help would be
appreciated?
for (int ix = 0; ix < numLines; ix++) {
    arrar[ix] = the line that you just read
} Of course, if you're using the standard while (line != null) for loop control, then you can just skip the for part and create an index variable that you increment inside the body of the loop.

Similar Messages

  • Problem in displaying Array Position?

    hi,
    I am having a problem in displaying the array position of a sorted Array
    for ex:
    int[] a = {4,3,1,7}for sorting the array i am using Arrays.sort(a); then the output will be
    a = {1,3,4,7}now according to this i need to display the array position of a before sorting like a should have the output {2,1,0,3} which should be the array position of the sorted array. Any help will be appreciated.
    Thanks.

    for (int i = 0 ; i < unsortedArray.length ; i++)
       for (int j = 0 ; j < sortedArray.length ; j++)
           if (unsortedArray[i] == sortedArray[j]) {
                 System.out.println("position for element "+i+" is "+j);
                 break;
           }notice that if you have duplicate values, the position of the duplicate will always be considered as the first occurence of this value

  • MMM1061: Corrupted array: position mismatch at 0

    Hello
    We got severes errors on Parent Mappings with Pluggable Mappings inside. We can Analyze and Deploy the Parent Mappings without any error, but we get errors on syncrhonizing the Parent Mappings.
    1. Error on Synchronize a Parent Mapping (Pluggable Mappings inside)
    Msg Box:
    MMM1061: Corrupted array: position mismatch at 0.
    MMM1061: Corrupted array: position mismatch at 0.
    2. Error on closing the previously syncrhonized Parent Mapping
    Msg Box:
    INTERNAL ERROR: in MapGenerationLanguageValidator.validate(GENERATION_LANGUAGE, PLSQL)
    3. Error on opening this or any other mapping:
    Msg Box:
    Repository Usage Error: Start nested transaction while already in one. Please contact Oracle Support with the stack trace and details on how to reproduce it.
    All 3 msg boxes have a Detail button with a lot of Java function calls (too much to post it here).
    What we tried so far (but all didn't help so far)
    - Copy existing Pluggable Mapping and use this one in existing Parent Mapping
    - Removing Pluggable Mapping from Parent Mapping and the include it again
    - Recreating Pluggable Mapping from scratch and include it in Parent Mapping
    - Rebuidling new Pluggable Mapping from scratch and also new Parent Mapping, using the newly created Pluggable Mapping
    - Making sure all developers accessing the OWB Repository have the same language settings (English)
    The only thing that helped so far was creating a dummy Pluggable Mapping/Parent Mapping NOT using (including) any other existing objects from this Repository (like tables, etc.)
    The sync strategy (merge, update) has no influence whether we can sync successfully or not.
    My conclusion so far is:
    a) We have a severe internal Repository problem
    or
    b) This OWB version doesn't properly support Pluggable Mappings/Parent Mappings.
    Any1 already had the same problems? We are working with OWB Client 10.2.0.1.31 and Warehouse Builder Repository: 10.2.0.1.0
    Any hint are welcome
    Thank you

    Hi,
    I recommend using the latest OWB Patch 10.2.0.4. The first release of 10.2 was quite buggy concerning pluggable mappings. we did not use them in that version.
    Regards,
    Carsten.

  • Displaying Array Position not working in case of descending Order?

    Hi,
    I need to display the array position of the sorted array in Descending order. Here is my code.
         int[] in = {5,3,2,7};
              int[] newArr = new int[in.length];
              int[] na = new int[in.length];
              //copying into a new array
              for(int i=0;i<in.length;i++){               
                   newArr[i] = in;     
              // code for descending order
              for(int j=0;j<in.length;j++){
              Arrays.sort(in);
              na[j] = in[in.length-(1+j)];
              }the sorted array will be will be {7,5,3,2} now according to this i need to display the array position of the sorted array which should be {3,0,1,2} i tried to compare newArr[i] with na[j] but am not gettin the result that i should be getting the same comparison is working in case of Ascending Order but not descending. Any suggestions or help will be appreciated.
    Thanks and regards.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    hi,
    what you are doing is correct only, do not put sort method inside the for loop
    and postion is correct also
    int[] in = {5,3,2,7};
            int[] newArr = new int[in.length];
            int[] na = new int[in.length];
            //copying into a new array
            for(int i=0;i<in.length;i++){
                newArr[i] = in;
    Arrays.sort(in);
    // code for descending order
    for(int j=0;j<in.length;j++){
    na[j] = in[(in.length-1)-j];
    System.out.println("Val --> "+na[j]);
    System.out.println("Position --> "+j);

  • Offset div / positioning problem in IE

    I've posted this problem in another thread but it was a sub question. Anyway, the problem I'm having is positioning a div over all other divs. I've managed to get it to work perfectly fine on Firefox and Chrome the way I wanted. The problem is usually when it comes to internet explorer. I just want the image or div placed on the right side of the site but changing the properties always has the same result, internet explorer places is far beyond where it's suppose to be. I'll add images, the code, and the live site below. Any help would be appreciated.
    Chrome View:
    Firefox View:
    *IE View (Wrong):
    Website: http://emergencyclean-up.com
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Emergency Clean Up Homepage</title>
    <style type="text/css">
    body {
              background-color: #333333;
    #entireSite #sidebar #spacer {
              height: 300px;
              width: 350px;
    #entireSite #sidebar #newsletter {
              background-image: url(../Images/NewsLetterBackground.png);
              height: 165px;
              width: 350px;
              color: #FFF;
    </style>
    <link href="main.css" rel="stylesheet" type="text/css" />
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script type="text/javascript">
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    </script>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    </head>
    <body onload="MM_preloadImages('../Images/Buttons/buttonOver_01.gif','../Images/WaterDamageOver .png','../Images/FireDamageOver.png','../Images/MoldRemediationOver.png','../Images/SootRe movalOver.png','../Images/OdorControlOver.png','../Images/facebook-logoOver.png','../Image s/yelp-logoOver.png','../Images/LinkedIn_logoOver.png','../Images/twitter-logoOver.png')">
    <!-- This begins the coding for centering the entire webpage -->
    <div style="width:100%;">
    <div style="width:900px; margin-left:auto; margin-right:auto;">
      <div style="width:100%; float:left;background-color:#333333;">
    <!-- This begins the background layer for the navbarArea -->
    <div id="navbarArea">
    <!-- This begins the container div for the navbar -->
    <div align="center">
      <div id="navbar">
      <ul id="MenuBar1" class="MenuBarHorizontal">
        <li><strong><a href="index.html">Home Page</a> </strong></li>
        <li><strong><a href="About Us.html">About Us</a></strong></li>
        <li><strong><a href="Services.html">Services</a> </strong></li>
        <li><strong><a href="Testimonials.html">Testimonials</a></strong></li>
        <li><strong><a href="Contact Us.html">Contact us</a></strong></li>
        <li><strong><a href="Special Offers.html">Special Offers</a></strong></li>
      </ul>
    </div></div>
    <!--- This ends the container div for the navbar -->
    </div>
    <!-- This ends the background layer for the navbarArea -->
    <!--This begins the entireSite area *excludes navbar* -->
    <div id="entireSite">
    <!-- This begins the container for the sidebar image -->
    <div id= "sidebar">
    <!-- This begins a spacer div -->
    <div id= "spacer">
    </div>
    <!-- This ends a spacer div -->
    <!--This begins newsletter div -->
    <div id= "newsletter">
    <center><font size="5">Subscribe to Our Newsletter</font></center>
    <form action="subscriptionform.php" method="post" id="Newsletter">
    <table width="100%" border="0" cellpadding="3">
      <tr>
        <td>Name:</td>
        <td><input name="News Letter Name" type="text" size="30" maxlength="40" /></td>
      </tr>
      <tr>
        <td>Email:</td>
        <td><input name="News Letter Email" type="text" size="30" maxlength="40" /></td>
      </tr>
      <tr>
        <td>Zip Code:</td>
        <td><input name=" News Letter Postal Code" type="text" size="10" maxlength="12" /></td>
      </tr>
    </table>
    <center><input name="Subscribe" type="Submit" id="Subscribe" /></center>
    </form>
    </div>
    <!-- This ends newsletter div -->
      </div>
    <!-- This ends the sidebar image area-->
    <!-- This begins the maintext area -->
    <div id= "maintext">
    <!-- This begins the titlebar inside the maintext area-->
    <div id= "titlebar">
    <br />
    </div>
    <!-- This ends the titlebar of maintext area -->
    <br  />
    <center><img src="../Images/Logo.png" width="500" height="160" alt="Logo" />
    <br />
    <br />
    <center>Choose from one our various services offered here at Emergency Clean-up.</center>
    <br />
    <table width="100%" border="0" cellpadding="0">
      <tr>
        <td><center><a href="Water Damage.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('WD','','../Images/WaterDamageOver.png',1)"><img src="../Images/WaterDamage.png" alt="Water Damage" name="WD" width="75" height="75" border="0" id="WD" /></a>
        <br />
        Water Damage</center></td>
        <td><center><a href="Fire Damage.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('FD','','../Images/FireDamageOver.png',1)"><img src="../Images/FireDamage.png" alt="Fire Damage" name="FD" width="75" height="75" border="0" id="FD" /></a>
        <br />
        Fire Damage</center></td>
        <td><center><a href="Mold Remediation.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('MR','','../Images/MoldRemediationOver.png',1)"><img src="../Images/MoldRemediation.png" alt="Mold Remediation" name="MR" width="75" height="75" border="0" id="MR" /></a>
        <br />
        Mold Remediation</center></td>
        <td><center><a href="Soot Removal.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('SR','','../Images/SootRemovalOver.png',1)"><img src="../Images/SootRemoval.png" alt="Soot Removal" name="SR" width="75" height="75" border="0" id="SR" /></a>
        <br />
        Soot Removal</center></td>
        <td><center><a href="Odor Control.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('OC','','../Images/OdorControlOver.png',1)"><img src="../Images/OdorControl.png" alt="Odor Control" name="OC" width="75" height="75" border="0" id="OC" /></a>
        <br />
        Odor Control</center></td>
      </tr>
    </table>
    <br />
    <center> For more services please click <a href="Services.html">here</a>. </center>
    </div>
    <!-- This ends the maintext area -->
    <!-- This begins the bottombar image -->
    <div id= "bottombar">
      <img src="../Images/bottomBar.png" width="900" height="25" alt="bottombar" /></div>
    <!-- This ends the bottom bar image -->
    <!-- This begins the hotlinks area -->
    <div id= "hotlinks">
    <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('FB','','../Images/facebook-logoOver.png',1)"><img src="../Images/facebook-logo.png" alt="Facebook" name="FB" width="25" height="25" border="0" id="FB" / align="left"></a>
    <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('YP','','../Images/yelp-logoOver.png',1)"><img src="../Images/yelp-logo.png" alt="Yelp" name="YP" width="25" height="25" border="0" id="YP" / align="left"></a>
    <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('TR','','../Images/twitter-logoOver.png',1)"><img src="../Images/twitter-logo.png" alt="Twitter" name="TR" width="25" height="25" border="0" id="TR" / align="left"></a>
    <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('LI','','../Images/LinkedIn_logoOver.png',1)"><img src="../Images/LinkedIn_logo.png" alt="Linked In" name="LI" width="25" height="25" border="0" id="LI" / align="left"></a>
    </div>
    <!--This ends the hotlinks area -->
    <!-- This begins the copyright area -->
    <div id= "copyright">
    <br />
    <p align="right">Content copyright 2012. EMERGENCYCLEAN-UP.COM. All rights reserved.</p>
    </div>
    <!-- This ends the copyright area -->
    </div>
    <!-- This ends the entireSite container-->
    <div id="containerEmergency"><img src="../Images/emergency contact.png" width="220" height="220" />
    </div>  
      </div>
    </div>
    </div>
    <!-- This ends the coding for centering the entire webpage *excludes navbar* -->
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>

    I often find that differences between FF and IE often boil down to errors in closing page element tags... like not closing <div> or <script> tags. So first validate and fix any of those issues:
    http://validator.w3.org/
    a number of those 35 errors relate to closing tags.
    Then to review z-indexing (stacking order) from an older post:
    Maybe this will help clear up any misunderstanding you have about declared positioning as well as the use of z-indexing:
    The actual display of a positioned element will depend on whether or not it's parent element also has a declared position or not.
    z-indexing ONLY works with elements that have a declared position.
    Using a declared position like absolute tells and browser to take that element out of the natural flow and do something different with it. So you've got the browser parsing in order from top to bottom, then throwing in some elements that are completely out of the flow.... they can be very hard to control, because there are special rules that apply to elements with declared positions.
    The least understood of those rules is what I call the "Parent Rule". Giving an element a declared position like relative or absolute can have huge differences in how that element is actually displayed depending on whether or not the PARENT of that element also has a declared position.
    So a div which is position:absolute for example will display one way if it's parent also has a declared position and it will display in a completely different manner if it's parent does NOT have a declared position... to review:
    If a div's parent container DOES NOT also have a declared position, the child <div> will do 1 of 2 things.
    If position:relative, it will position as desired but space will be left as though that element was still in the natural flow. So you may move the 500 X 100 element down and over, but a 500 X 100 space will be left, as though it was still there.
    If position:absolute, child is positioned relative to browser window and that position does not change even if window contracts or expands.
    So be sure to give a declared position to both the parent and the child <div>.
    Neglecting to follow this rule is the main reason why the use of declared positioning fails.
    And just one more point, almost never is it necessary to use a declared position, and that method certainly should not be used for general page layout.
    But if and when a special situation comes up that you really do need z-indexing... then of course you will also have to use a declared position. Understanding the "Parent Rule" will make working with z-indexing and declared positions much easier and more successful.
    Best wishes,
    Adninjastrator

  • Dxf to xyz arrays positions

    NI Motion assistant 
    Version 2.6
    Labview full development system 2012
    I need to read a CAD file and export the XYZ coordinates.
    Problem :
    It's possible with Motion assistant to enter a dxf file and to export XML file.
    After this I can to work with the xml file to export the array of xyz position.
    The problem is, without Motion Assistant it's not possible to create the xml file.
    how can i in block diagram of labview export XML file from DXF?

    unclebump wrote:
    Send me a pm, I have a cad program that can read dxf files and spit out the coordinates. Is this a one time thing or do you need to do it over and over?
    Or you could look at something like this
    http://www.ransen.com/pointor/DXF-to-XYZ.htm
    Another post by unclebump that came up in a different search... This is getting strange.
    unclebump, I have a need for the functionality to output labview x/y coordinates to a DXF. The current method is to print out the coordinates and have another engineer plot them in SolidWorks. I would like to streamline this by outputting the DXF in LabVIEW. Is there a way to do this?
    Thanks,
    James
    LabVIEW Professional 2014

  • Mixed Signal Graph, Selected Cursors, and Cursor Position Problems

    I'm trying to work around an issue with a single multiplot cursor on a mixed-signal graph (doesn't work right, R&D bug report #100830) by grabbing the selected cursor x-position and updating that position across all four cursors, as seen below:
    However, I'm having two problems. 
    One, the selected cursor is not always the actual selected cursor.  Quite often, especially when selecting and dragging cursors 3 & 4 (indexed 2 & 3), the selected cursor shows up as 0 or 1.
    Two, and the one I'm more concerned about, is the fact that the four cursors X-positions never completely line up.  In every case, whichever cursor is deemed to be "selected", the other three will align to some point (the same for all three) that is offset from the actual value.  Please note that the X-values in my demonstration are identical (1000 points from 0.001 to 1) so I don't see this as being some snap issue where the value is offsetting to the closest available on the other arrays.
    I've attached my scratchpad demo.vi as an illustration. 
    Any help or insight is appreciated.
    Thanks,
    Mike Webster
    Attachments:
    demo.vi ‏47 KB

    I believe I found where the issue resides at least and a workaround.  This is a problem with XY graphs in general when trying to programmatically control the cursor position.  Somehow, the software goes looking for the nearest point instead of the identical point and has some sort of issue with its search algorithm.  Switching from attempting to match position to copying the cursor 'index' completely cleared up the problem I was having.  In the particular application I'm working on, the four graphs have identically spaced data on the X-axis, so this solution should work fine for me.

  • Array Copy Problem

    ARRAY COPY DOESN'T WORK. DO NOT ATTEMPT TO USE IT IN YOUR REPLY TO THIS TOPIC. array copy says that you need the same type of object in the arrays. I'm making a method in a class called SUPERARRAYUTIL where this isn't the case. They all extend from a class i made called SUPERARRAY (in javacase caps tho, i just like to use upper case), but that doesnt help me. I'm short on time and i want to post this right now, so i won have any code right away but here is how i'm gonna do it:
    1) Static method takes parameters superArray array, superArray newelements, and int start
    2) Make a temp array that would be big enough to fit array, and the newelements at postion start in array
    3) copy over array using a for loop, starting at 0 in temp.
    4) copy over newelements using a for loop, starting at start in temp.
    Then i will make non-static methods for superArrayUtil that will use the static methods in superArrayUtil. I will also make a method like System.arraycopy but will call a method called cut to trim the array of new elements and then call this arraycopy to copy it into the dest array, and then another non-static method for that method too.
    Basically i just need ideas or comments cause so far i ran into some weird problems or any suggestions if there's a better way to copy arrays in the general way of array1 into array2 at a starting position.

    Deo_Favente wrote:
    ARRAY COPY DOESN'T WORK.
    YES. YES IT DOES. WHY DO YOU THINK THAT IT DOESNT WORK? WHY DON'T YOU POST WHATEVER CODE THAT YOU DO HAVE THAT IS CAUSING YOU PROBLEMS AND THEN MAYBE WE COULD WORK WITH IT. I THINK THAT'S A BETTER IDEA PERSONALLY, AT LEAST OPPOSED TO WHAT YOU DID HERE._+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Writing random array positions to file

    Hi all.
    I have an array of 1000 positions each consisting of a String.
    I want to write the strings equally to two seperate text files which i have managed without any probs.
    The problem is i want to write these strings in a total random order so each time its run different strings would end up in different files and in total different order.
    i know how to generate a random number but not sure how to access all positions of the array but in random order.
    Any help would be appreciated.
    thanks

    The Random class has methods that generate random ints.
    You can use those ints to index the array and get the String from that position.
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Random.html

  • Associative Array (Object) problems

    Here is the function i'm dealing with
    i'm reading in a delimited string and using indexed arrays to
    break them up and assign the keys and values to an associative
    array in a loop.
    i'm using variables in the loop and the array loads as
    expected in the loop
    but outside the loop, the only key is the variable name and
    the value is undefined
    this is true using dot or array notation, as well as literal
    strings for the keys
    any help is appreciated
    watchSuspendData = function (id, oldval, newval):String {
    //the incoming suspendData string is delimited by the
    semicolon;
    //newval is: firstValue=Yes;captivateKey=1
    var listSuspendData:Array = newval.split(";"); // convert it
    to a list of key/value pairs
    if (listSuspendData.length > 0){
    //line 123: listSuspendData.length is: 2
    for (i=0; i < listSuspendData.length; i++){ //for each
    key/value pair
    var keyValArray:Array = new Array();
    var myNameValue:String = listSuspendData
    //line 127: listSuspendData is: firstValue=Yes
    keyValArray = myNameValue.split("="); // split 'em on the
    equal sign
    var myKey:String = keyValArray[0];
    var myVal:String = keyValArray[1];
    //keyValArray[0] is: firstValue
    //keyValArray[1] is: Yes
    // store the key and the value in associative array
    suspendDataArray.myKey = myVal;
    trace("line 134: suspendDataArray is: " +
    suspendDataArray.myKey);
    // trace is line 134: suspendDataArray is: Yes on the first
    pass and 1 on the second
    //the below loop always returns one array key: myKey and the
    value as undefined
    for(x in suspendDataArray){
    trace("x is: " + x); //x is: myKey
    trace("the val is: " + suspendDataArray.x); //the val is:
    undefined
    } //end for
    return newval;

    on lines 12-13 i assign the key=value pair to string
    variables
    then on lines 17-18 i assign those values to the associative
    array using dot notation
    the trace seems to work there
    the problem is that when the procedure exits the for loop,
    the associative array only has one key (myKey) and no value
    (undefined)
    all the documentation i've read shows using these types of
    arrays with either non-quoted property names like:
    myAssocArray.myKey = "somevalue";
    or
    myAssocArray[myKey] = "somevalue";
    i tried assigning the key/value pairs directly from the
    indexed arrays, but the result was always undefined
    like this:
    suspendDataArray.keyValArray[0] = keyValArray[1]
    or
    suspendDataArray[keyValArray[0]] = keyValArray[1]
    i even tried building a string in the loop and trying to
    assign all the pairs at once using the curly brace
    this is pretty wierd behavior for actionscript or i'm missing
    something basic here
    thanks for looking

  • Spry Menu Bar Positioning Problem in IE

    I have a Dreamweaver-created Spry Menu Bar drop down menu which works perfectly in every browser on my Mac and on my PC . . . EXCEPT Internet Explorer (who woulda thunk it?!!)
    In all browsers except for IE, the 3 submenu items under "Door Systems" and "Gallery" appear exactly as they should in a vertical row, positioned just below the brown line below the navigation links and all the same width. But in IE they appear higher up and with different widths. IE is ignoring the rules for width and position.
      <ul id="MenuBar2" class="MenuBarHorizontal">
        <li><a class="MenuBarItemSubmenu" href="closet_doors_gallery.html">DOOR SYSTEMS</a>
          <ul>
            <li><a href="sliding_doors_nyc_nj.html">DOOR PROFILES</a></li>
            <li><a href="bifold_doors_nyc_nj.html">PANELS COLORS</a></li>
            <li><a href="room_dividers_nyc_nj.html">DOOR SYSTEM TYPES</a></li>
          </ul>
        </li>
      </ul>
    <ul id="MenuBar3" class="MenuBarHorizontal">
        <li><a class="MenuBarItemSubmenu" href="#">GALLERY </a>
          <ul>
            <li><a href="#">SLIDING DOORS</a></li>
            <li><a href="#">BI-FOLD DOORS</a></li>
            <li><a href="#">ROOM DIVIDERS</a></li>
          </ul>
        </li>
      </ul>
    Here is the page where you can see the problem if you view it with IE, and see that it's  fine in Safari, and Firefox,    Chrome and Opera, Mac or PC:
    http://2113web.com/indeco/index.html
    I have a feeling it's a simple fix of the css, but I can't figure it out - I would really appreciate anyone's help with it - thank you!
    Below is the CSS:
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        font-weight:bold;
        cursor: default;
        width: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: auto;
        float: left;
        white-space: nowrap;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        z-index: 1020;
        cursor: default;
        width: auto;
        position: absolute;
        left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto;
        top: 63px; /*THIS POSITIONS THE SUBMENU BELOW THE TOP MENU*/
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
        float: none;
        background-color:#f5f5e8;
        height:25px; /*THIS POSITIONS THE SUBMENUS HEIGHT*/
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position: absolute;
        margin-top: -5%;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border:none;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
        display: block;
        cursor: pointer;
        background-color: transparent;
        padding: 0.5em 0.75em;
        color: #59330d;
        text-decoration: none;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
        background-color: transparent;
        color: #afa06f;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        background-color: transparent;
        color: #afa06f;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%)
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarDown.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%)
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarRight.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%)
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarDownHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%)
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarRightHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FFF;
    Perry

    Hi and thank you very much. It was a little confusing as to whether you meant to add the rules you suggested or to replace them, or a combination of both, but I puzzled it out. I created a new MenuBarHorizontal.css file in a blank page and then made the changes you suggested and it works! Yay! I had to do a bit of tweaking to get it to look just the way I wanted, but it now works correctly in ie 7 and 8 and still works fine in everything else.
    Interestingly enough, I had to change the margin-top: 63px; rule in "ul.MenuBarHorizontal ul.MenuBarSubmenuVisible" to 40px to get it positioned properly vertically, and I had to get rid of the "border-bottom: solid 1px #EEE;" in "ul.MenuBarHorizontal ul li", which caused the submenu items to have quite a lot of vertical space between them - I'm not sure why!
    I also had to get rid of all the syling rules in the "SUBMENU INDICATION: styles if there is a submenu under a given menu item" section, as well as the one you added: "ul.MenuBarHorizontal a.MenuBarItemSubmenu {
        padding: 0.5em 2em 0.5em 0.75em;"
    With that done, it works great in both ie7 and ie8, so thank you for the help. Below is the new css that works, in total.
    Not being as familiar with the subtleties of CSS as you and many others obviously are, I'm REALLY curious as to exactly what is different that causes this to work now, and would be happy to hear your expanation, if you feel like taking the time to explain. If not, no problem - it works and that is the most important thing! So, thank you again -
    Perry
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        cursor: default;
        width: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: auto;
        float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        z-index: 1020;
        cursor: default;
        width: auto;
        position: absolute;
        left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto;
        margin-top: 40px;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
        display: block;
        float: none !important;
        width: auto;
        white-space: nowrap;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position: absolute;
        margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
        display: block;
        cursor: pointer;
        background-color: #f5f5e8;
        padding: 0.5em 0.75em;
        color: #333;
        text-decoration: none;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
          background-color: #f5f5e8;
        color: #afa06f;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
          background-color: #f5f5e8;
        color: #afa06f;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
        background: transparent;
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FFF;

  • Photo Gallery: 2 positioning problems

    hey, first i'd like to say, great photo gallery, it's exactly
    what i needed for my site :)
    now, as for the problems i'm having..
    i need to place the gallery into part of a table, but i am
    have 2 issues with this.
    1. the main images resize the table automatically, depending
    on the size of the image. however, it only changes the height of
    the table. it does not alter the width of it.
    --i do not want this to happen, i would like the table to
    stay one fixed size.
    2. the thumbnails, regardless of what position i move them
    to, when moused over they move back to the original top left corner
    position.
    --again, i would like them to remain fixed at wherever i
    place them at.
    i've looked through the css code and am having a bit of
    trouble trying to figure out just what to edit to make this doable.
    though, i'm not even sure if it's something that's part of the css
    code or if it's another part of the site that needs altered
    instead.
    any suggestions?

    problem resolved.. was a rather easy fix.. not sure how i
    screwed it up the first time though..but either way, it works
    fine.

  • Font Smoothing + Relative Positioning = Problem

    Hello,
    I ran across a strange inconsistency while designing a relative position based layout.
    My page has two divs, both relative positioned for height. They do not overlap. The page renders excellent in Firefox 3.5, and not bad in Chrome (though a little different from FF). Safari however pushes my second div down too far.
    I found that by disabling font smoothing (or rather switching it to anything besides "windows standard") fixes this issue. However there isn't even any actual text on the site, at all. There's 4 images, a couple input fields and a submit button.
    I can post some of the code, or example screenshots of what's happening. I've tried a couple css hacks to target safari (without targeting chrome) with no success. Anybody have any advice?
    Thanks,
    Tom

    Please disreard...
    I got it figured out. I just moved the paragraph tag outside
    of the table
    and changed the position from bottom:50% to top:50%
    once the <p> was moved out of the table, it's normal
    position would be at
    the very top. So, I moved it 50% down from the top using
    relative
    positioning. Being inside the table caused it to not work in
    Gecko? I
    wonder why?
    "-D-" <[email protected]> wrote in message
    news:f7fr0d$jb8$[email protected]..
    > I'm using relative positioning for an <p> tag that
    is positioned normally
    > at the bottom of a table cell "valign="bottom".
    >
    > I set the paragraph tag to <p
    >
    style="position:relative;bottom:50%;text-align:center;line-height:1.6em;">
    >
    > so, the text will position itself 50% from the bottom
    positioning. This
    > works fine in IE, but Mozilla and Netscape still
    position the text at the
    > bottom of the table cell.
    >
    > Here is the test page to see what is happening:
    >
    http://www.dwayneepps.com/contact.aspx
    >
    > fill out the form and click send to see the problem.
    >
    > Thanks for any help.
    >

  • Positioning problems develop with template

    I have been developing a template or templates for a site in order to make child pages, there will be some variations in these pages but would like them to remain as similar as possible and use the same style sheet if possible.  The overall page is simple and works OK but as the content variations solidify as does the css to accommodate it problems arise.  It starts as a body, wrapper, header (includes logo, and navigation table) left col, right col and a footer. I wanted to be able to have more than 12 thumbs and keep the page at 600px height so a scroll bar was needed. I put an AP div in the left column the full width of the col and the height of four thumb frames and the problems start, The heading over it cannot scroll with the content so it must be outside the AP div.  In a browser it drops under the table and its div. I went through all css rules for the assoc. divs  zeroing margins & padding, but it didn't work so I nested this AP div in another the full side of the left col. while that worked I don't Know why it moved in the first place, or why all the margin zeroing for the #leftColumn a  link, the #leftColumn and #content did nothing.  Is the Nested AP divs the way to go, and should I go back and take out all the margin and padding changes that did nothing?  the pages are athttp://www.thunderbirdtrading.ca/Test-1.dwt this is the page with the shift, and uses the first style sheet, the corrected page is Test-2 using the second sheet and the odd thing is that Test-3 views correctly using the third style sheet which doesn't have nested AP divs 
    http://www.thunderbirdtrading.ca/css/apparelHomeAP.css
    http://www.thunderbirdtrading.ca/css/apparelHomeAPNest.css
    http://www.thunderbirdtrading.ca/css/apparelItemsAP.css
    I would like to be able to change the left column table to 3 4 & 6 row tables (they are library items) to make different pages, also the right column block of text in Test-1 and Test-2 for the two column table in Test-3, is it advisable or possible to write css rules for different content appearing in the same div? That is one template making many templates by changing library items all using the same style sheet? Are there guidelines as to when to attach a second sheet?
    Thanks hope someone can shed a little light.
    CH

    Using APDivsions as your primary layout method is going to drive you crazy.
    http://apptools.com/examples/pagelayout101.php
    Try changing top value to provide some extra room between your logo and scrolling division:
    #apDivLeftCol {
        position:absolute;
        width:240px;
        height:405px;
        z-index:8;
       top: 250px;
        overflow: auto;
        left: 0;
        text-align: center;
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Position problem with four zoom areas at a slide

    Hi to all,
    my problem, i've made a slide, containing a single picture (periodic table). Then, i added four zoom areas at the elements C, H, S and N. Source areas are 45 by 45 px, target areas are 180 to 180 px. I try to set fixed postions for the targets (Target || position X || Position Y):
    Target 1
    90
    330
    Target 2
    290
    330
    Target 3
    490
    330
    Target 4
    690
    330
    The result looks really ugly, size and positions went totally wrong. This is just an examples, sometimes, the target areas are overlap each other, looks like a silly randomizer at work...
    Maybe anyone can give me a idea/solution to fix this?
    Thanks in advance
    Marc

    If you use CP5 or CP5.5 I would use Effects in this case: a combination of a motion path and scaling. Try to find the correct combination, save as a custom effect and apply to all the elements where you want the Zoom.
    Lilybiri

Maybe you are looking for

  • ContactItem.StoreEntryId supported in Office 365?

    I use Exchange Webservices Managed API to connect with Office365. Per Contact I retrieve the contact.ItemId.UniqueId and contact.StoreEntryId. However contact.StoreEntryId = null? Is this supported in Office365? My goal is to pop-up/display the conta

  • Tables in memory (Nested tables ?)

    For performance reasons, I would like to insert, update, etc... a table in memory. Can I use a nested table as if it was a normal table ? Can I do updates on nested tables with values from normal database tables ?? Statement like : Update <nested-tab

  • Large Disk I/O for small number of users

    Hi Guys, I'm trying to figure out why my Outlook 2010 Clients are having a bad experience with their connections to the server often timing out.  You know the popup message in the system tray that says "Outlook is trying to communicate with server" I

  • Bridge Collections CS4 Windows XP

    I've made a smart collection from items highlighted in a folder, but when I want to see the contents of the collection I get no criteria match message. I can't figure out where to drag and drop items from different files into a collection. So far eve

  • Forcing utf8 encoding on viewing sent messages

    Hi. I have forced Mail.app to send all my messages as UTF-8 by using the well-known command: defaults write com.apple.mail NSPreferredMailCharset "UTF-8" That's working fine and my messages are received and viewed as UTF-8. But in Leopard, Mail exhib