Shifting positions of values in arrays

I need to replicate some functionality in existing IDL (Interactive Data Language) code. This language has some very high level constructs for moving values in arrays. This statement:
shifted_array = shift(my_array, xshift, yshift)shift all the values in my_array in the x direction by xshift and all the values in the y direction by yshift (and wraps the values around) and puts them in shifted_array.
How would I best implement this in Java? That is, do it row-by-row / column-by-column / element-element? If so, does anybody have such code already? If not, is there some 'higher-level' way to do this? or use some other data structure?
Message was edited by:
allelopath

Most of the functionality you describe is in
arraycopy(Object, int, Object, int, int) - Static method in class java.lang.System
Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.
You need to handle the wraparound.

Similar Messages

  • Change value if array data is repeated

    Hello,
    I am trying to write a tuning algorithm that changes the calculated tune value after the program sees the same calculated value as before.  My tuning algorithm gets hung up on the extremes (5000 and 10000) and just goes back and forth and does not get out of that mode.  I wanted to adjust the calculated tune value up or down (depending which limit is hit), so that the program can continue working and converge to the correct tuned value.
    In the attached VI, the Calc Tune Value array simulates the calculated tune value from my program that is derived within a while loop. In each iteration of the while loop, a tune value is generated (the index array in the attached VI simulates the tune value generated on each iteration of my actual program).  As shown in the array, entry 3 is the same as entry 1.  How can I modify the program such that when entry 3 shows up again, I modify the value.  How can I keep a running check of the same value appearing again?   
    Thanks,
    hiNI.
    Attachments:
    tuning algorithm.vi ‏31 KB

    You can use a shift register and build an array by using the Tune values you generate. Then you can compare the tune value generated out of index array primitive with the shift register array and check if it has be already generated (When you cmpare you will get array of boolean output, perform an Arrya OR operation and find if the value is already present). Then you can perform action depending on the status.
    I have attached an example.
    The best solution is the one you find it by yourself

  • I need sorting VI that returns the sorted array element's positions in the unsorted array

    I need a VI that will very quickly (n log n) sort a 1D array of doubles.  This VI should not only output the sorted array, but for each of the sorted array elements, it should also output that sorted array element's position in the unsorted array.  So for example if the input array were:
    unsorted_array
    4.1
    2.3
    7.0
    5.6
    10.2
    Then the output arrays would be:
    sorted_array
    2.3
    4.1
    5.6
    7.0
    10.2
    indices_array
    1 (the value 2.3 is located at position 1 in the unsorted_array)
    0 (the value 4.1 is located at position 0 in the unsorted_array)
    3 (the value 5.6 is located at position 3 in the unsorted_array)
    2 (the value 7.0 is located at position 2 in the unsorted_array)
    4 (the value 10.2 is located at position 4 in the unsorted_array)
    This way I could generate the sorted_array using just the indices_array and the unsorted_array.  Has anyone written a nifty piece of code to do this?  I did some research on (n log n) sorting algorithms but most of them use recursion which I don't know how to do in LabVIEW.  It would also be nice to have an algorithm like this that could sort an array of strings.
    cheers,
    Richard

    Try something like the attached example (LabVIEW 7.0). I think it does what you need.
    (To understand the code, it is important to know that arrays of clusters are sorted by the first element in the cluster).
    Sort array itself sorts also array of strings, so you could just substitute, keeping the rest of the code the same.
    Sort array uses a variation of quicksort, so it should have about NlogN complexity.
    (If you think you only need the array of indices to later generate the sorted array, it does not make much sense to even do it. To get the indices, you need to sort the array anyway. You should just sort the plain array directly.
    Message Edited by altenbach on 07-13-2005 03:47 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    SortAndIndex.vi ‏26 KB

  • How to print out the position of 2 dimension arrays?

    there are 2 dimension arrays, how can print out the position of value than 4?
    for example
    0 2 3 2 2 2
    0 1 1 2 5 3
    1 2 3 3 2 1
    print out:
    The pos is ( 5,2).

    Hello
    If I understand your question correctly, you are trying to print out the indexes where the value in your matrix is greater than 4
    If this is the case, then what you need to use is nested for loops e.g.
    for (int i = 0; i< array[0].length; i++)
    for (int j = 0; j< array[].length; j++)
    int value = array[i][j];
    if (value > 4)
    System.out.println("The pos is (" + i + "," + j + ")" );
    Regarding the syntax I have used to get the size of the array, I am not sure if this is correct, but you should have an idea of what I am doing.
    Sajid

  • How to compare 3 values in array

    Hi all
    This is my first post so please be tolerant
    I need to find "bad values" in array, it will be easier to explain it using example so:
    I have array like this: 0 0 0 0 0 0 0 0 5 0 0 0 0  <- so "5" is the bad value, my method is to check two of nearby values so x(i-1) = 0, x(i)=5 x(i+1)=0, and if checked value is more than 25% bigger or smaller it should be replaced by average of neighborhood.
    next example: 0 1 2 3 4 9 6 7 8 <- bad value is 9, and result of my filter should be (4+6)/2 = 5
    I've done it using formula node (not 20% and not average, but the point is the same) and it's working but now I want to do it without C and I had lots of problems with memory cause the size of array is 10000.
    I attached vi and signal thah you can check that it's working fine
    Thanks
    Mike
    Solved!
    Go to Solution.
    Attachments:
    vi+signal.zip ‏62 KB

    MeeHow wrote:
    next example: 0 1 2 3 4 9 6 7 8 <- bad value is 9, and result of my filter should be (4+6)/2 = 5
    Shouldn't e.g. the value 4 be outside too, because the average of 3 and 9 (=5.5) is more that 25% different to 4?
    Here is a quick draft comparing three versions (LabVIEW 8.2):
    Your formula node version
    the same algorithm in G
    Something along the lines you are proposing here.
    As you can see, the new idea is not quite satisfactory. It needs more thought. Still, these drafts should give you some ideas how to do it. Modify as needed.
    Also your data is similar to a square wave and has these large step functions where the value changes dramatically. These should probably be ignored. Maybe you should look at the first derivative and replace parts where a large positive slope is immediately followed by a negative slope of similar size, for example.
    You should also look at absolute steps instead of percentages. If you use percentages and the value is zero, everything is outside, because even 5000% of zero is still zero, right?
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    filter testMOD.vi ‏41 KB

  • Assigning values to array in soa 10.1.3

    Dear team,
    I am working on soa10.1.3 server. we have a complex element of string array.we created a varaible of that element. In while loop we need to pass values to array elements.How can we do that..we tried with indexvaraible..but getting error.
    Regards,
    Radha

    schema is
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/BPELProcess4"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="BPELProcess4ProcessRequest">
              <complexType>
                   <sequence>
                        <element name="input" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="BPELProcess4ProcessResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
    <element name="element5">
    <complexType>
    <sequence>
    <element name="result" minOccurs="0" maxOccurs="unbounded"
    type="string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    wdsl is
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="BPELProcess4"
    targetNamespace="http://xmlns.oracle.com/BPELProcess4"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:client="http://xmlns.oracle.com/BPELProcess4"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         TYPE DEFINITION - List of services participating in this BPEL process
         The default output of the BPEL designer uses strings as input and
         output to the BPEL Process. But you can define or import any XML
         Schema type and use them as part of the message types.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <types>
              <schema xmlns="http://www.w3.org/2001/XMLSchema">
                   <import namespace="http://xmlns.oracle.com/BPELProcess4" schemaLocation="BPELProcess4.xsd" />
              </schema>
         </types>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         MESSAGE TYPE DEFINITION - Definition of the message types used as
         part of the port type defintions
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <message name="BPELProcess4RequestMessage">
              <part name="payload" element="client:BPELProcess4ProcessRequest"/>
         </message>
         <message name="BPELProcess4ResponseMessage">
              <part name="payload" element="client:BPELProcess4ProcessResponse"/>
         </message>
    <message name="BPELProcessMessage">
              <part name="payload" element="client:element5"/>
         </message>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PORT TYPE DEFINITION - A port type groups a set of operations into
         a logical service unit.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- portType implemented by the BPELProcess4 BPEL process -->
         <portType name="BPELProcess4">
              <operation name="initiate">
                   <input message="client:BPELProcess4RequestMessage"/>
              </operation>
         </portType>
         <!-- portType implemented by the requester of BPELProcess4 BPEL process
         for asynchronous callback purposes
         -->
         <portType name="BPELProcess4Callback">
              <operation name="onResult">
                   <input message="client:BPELProcess4ResponseMessage"/>
              </operation>
         </portType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PARTNER LINK TYPE DEFINITION
         the BPELProcess4 partnerLinkType binds the provider and
         requester portType into an asynchronous conversation.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <plnk:partnerLinkType name="BPELProcess4">
              <plnk:role name="BPELProcess4Provider">
                   <plnk:portType name="client:BPELProcess4"/>
              </plnk:role>
              <plnk:role name="BPELProcess4Requester">
                   <plnk:portType name="client:BPELProcess4Callback"/>
              </plnk:role>
         </plnk:partnerLinkType>
    </definitions>
    bpel file is
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Fri Aug 27 10:01:38 IST 2010
    Author: ruck
    Purpose: Asynchronous BPEL Process
    -->
    <process name="BPELProcess4"
    targetNamespace="http://xmlns.oracle.com/BPELProcess4"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ns4="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:ns1="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns3="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:ns2="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:client="http://xmlns.oracle.com/BPELProcess4"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:BPELProcess4"
    myRole="BPELProcess4Provider"
    partnerRole="BPELProcess4Requester"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable"
    messageType="client:BPELProcess4RequestMessage"/>
    <!-- Reference to the message that will be sent back to the requester during callback -->
    <variable name="outputVariable"
    messageType="client:BPELProcess4ResponseMessage"/>
    <variable name="elementMessage"
    messageType="client:BPELProcessMessage"/>
    <variable name="count" type="xsd:int"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess4.wsdl) -->
    <receive name="receiveInput" partnerLink="client"
    portType="client:BPELProcess4" operation="initiate"
    variable="inputVariable" createInstance="yes"/>
    <!--
    Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
    -->
    <assign name="Assign_1">
    <copy>
    <from expression="number(1)"/>
    <to variable="count"/>
    </copy>
    </assign>
    <while name="While_1"
    condition="bpws:getVariableData('count') &lt;= number(5)">
    <assign name="Assign_2">
    <copy>
    <from expression="'value'"/>
    <to variable="elementMessage" part="payload"
    query="/client:element5/client:result[bpws:getVariableData('count')]"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('count')+number(1)"/>
    <to variable="count"/>
    </copy>
    </assign>
    </while>
    <invoke name="callbackClient" partnerLink="client"
    portType="client:BPELProcess4Callback" operation="onResult"
    inputVariable="outputVariable"/>
    </sequence>
    </process>
    For the count 1 code is working fine.. for count=2 thrwoing exception
    <while>
    Assign_2
    [2010/08/27 10:23:20] Updated variable "elementMessage" less
    -<elementMessage>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    -<element5 xmlns="http://xmlns.oracle.com/BPELProcess4">
    <result>value
    </result>
    </element5>
    </part>
    </elementMessage>
    [2010/08/27 10:23:20] Updated variable "count" More...
    <count>2
    </count>
    Assign_2
    [2010/08/27 10:23:20] Error in <assign> expression: <to> value is empty at line "86". The XPath expression : "" returns zero node, when applied to document shown below: More...
    [2010/08/27 10:23:20] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown. More...
    </while>
    </sequence>
    [2010/08/27 10:23:20] "BPELFault" has not been caught by a catch block.
    [2010/08/27 10:23:20] There is a system exception while performing the BPEL instance, the reason is "faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} messageType: {} parts: {{summary=XPath query string returns zero node. According to BPEL4WS spec 1.1 section 14.3, The assign activity &lt;to&gt; part query should not return zero node. Please check the BPEL source at line number "86" and verify the &lt;to&gt; part xpath query. Possible reasons behind this problems are: some xml elements/attributes are optional or the xml data is invalid according to XML Schema. To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page. }} ". Please check the error log file for more infromation. Please try to use bpel fault handlers to catch the faults in your bpel process. If this is a system exception, please report this to your system administrator. Administrator could perform manual recovery of the instance from last non-idempotent activity or dehydration point. More...
    [2010/08/27 10:23:20] BPEL process instance #"60002" cancelled

  • How to pass value in array to another procedure?

    Hello.
    I have created application by Developer form9i.
    And I have some problem about passing value in array to another procedure.
    My code is :
    PROCEDURE p_add_array (col_no in number,
    col_val in varchar2) IS     
    type xrecord is record(col number,vcol varchar2(1000));
    xrec xrecord;
    type varraytype is varying array(42) of xrecord;     
    xvartab varraytype := varraytype();
    alert number;
    BEGIN
    set_application_property(cursor_style,'busy');
    xrec.col := col_no;
    xrec.vcol := col_val;
    xvartab.extend(1);
    xvartab(col) := xrec;
    EXCEPTION
    when others then
    set_application_property(cursor_style,'default');
    alert := f_show_alert('!Error ORA-'||
    to_char(DBMS_ERROR_CODE)||' '||
    substr(DBMS_ERROR_TEXT,1,240),
    'al_stop');          
    END;
    And I want to have
    PROCEDURE p_print_arrey is
    BEGIN
    END;
    So how to bring value of xvartab( ) in p_add_array to use in p_print_array?
    Anybody please help me solve this ploblem.

    Hi,
    Instead of declaring the array locally within the procedure (i.e. p_add_array), define it in the package specification (i.e. Under Program Units).
    -- Shailender Mehta --

  • Checking a position in a 2D array

    I am making a minesweeper game and the mineCheckUpLeft function works perfectly but the mineCheckUpRight doesn't work half the time I'm hoping one of you can figure out what is wrong with the code. And the only thing on my Form is  label1 and the Form1_Load
    event.
    public int checkMineUpLeft(Button clicked,int cGot,int rGot)
    int mineCounter=0;
    if ((rGot > 0 && rGot <= 7) && (cGot > 0 && cGot <= 9))
    if (arrayName[cGot-1, rGot-1].Name.Contains("mine")==true)
    mineCounter++;
    return mineCounter;
    public int checkMineUpRight(Button clicked,int cGot,int rGot)
    int mineCounter = 0;
    if ((rGot > 0 && rGot <= 7) && (cGot >= 0 && cGot < 9))
    if (arrayName[cGot + 1, rGot - 1].Name.Contains("mine") == true)
    mineCounter++;
    return mineCounter;
    And Here is the full code I have so far:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    namespace MineSweeper
    public partial class Form1 : Form
    Button[,] arrayName = new Button[10, 8];
    int randNum;
    public Form1()
    InitializeComponent();
    public void generateForm()
    foreach (Button btn in arrayName)
    this.Controls.Remove(btn);
    int xPos = 0;
    int yPos = 30;
    Random gen = new Random();
    for (int row = 0; row <= arrayName.GetUpperBound(1); row++)
    xPos = 30;
    for (int col = 0; col <= arrayName.GetUpperBound(0); col++)
    Button button1 = new Button();
    randNum = gen.Next(0, 2);
    switch (randNum)
    // 0 is a safe box
    // 1 is a mine
    case 0:
    button1.Size = new Size(30, 30);
    button1.BackColor = SystemColors.Control;
    button1.Location = new Point(xPos, yPos);
    button1.Click += button1_Click;
    this.Controls.Add(button1);
    arrayName[col, row] = button1; ;
    button1.Name = String.Format("safeButton{0}{1}", col, row);
    break;
    case 1:
    button1.Size = new Size(30, 30);
    button1.BackColor = System.Drawing.Color.Red;
    button1.Location = new Point(xPos, yPos);
    button1.Click += minebutton_Click;
    this.Controls.Add(button1);
    arrayName[col, row] = button1; ;
    button1.Name = String.Format("mineButton{0}{1}", col, row);
    break;
    xPos += 30;
    yPos += 30;
    //Mine Button Click
    private void minebutton_Click(object sender, EventArgs e)
    //CheckMines
    public int checkMineUp(Button clicked, int cGot, int rGot)
    int clickedMineCounter=0;
    if (rGot<=7&&rGot>0)
    if (arrayName[cGot, rGot - 1].Name.Contains("mine") == true)
    clickedMineCounter++;
    return clickedMineCounter;
    public int checkMineUpLeft(Button clicked,int cGot,int rGot)
    int mineCounter=0;
    if ((rGot > 0 && rGot <= 7) && (cGot > 0 && cGot <= 9))
    if (arrayName[cGot-1, rGot-1].Name.Contains("mine")==true)
    mineCounter++;
    return mineCounter;
    public int checkMineUpRight(Button clicked,int cGot,int rGot)
    int mineCounter = 0;
    if ((rGot > 0 && rGot <= 7) && (cGot >= 0 && cGot < 9))
    if (arrayName[cGot + 1, rGot - 1].Name.Contains("mine") == true)
    mineCounter++;
    return mineCounter;
    public int checkMineRight(Button clicked, int cGot, int rGot)
    int clickedMineCounter = 0;
    if (cGot < 9 && cGot >= 0)
    if (arrayName[cGot + 1, rGot].Name.Contains("mine") == true)
    clickedMineCounter++;
    return clickedMineCounter;
    public int checkMineLeft(Button clicked, int cGot, int rGot)
    int clickedMineCounter = 0;
    if(cGot>0&&cGot<=9)
    if (arrayName[cGot - 1, rGot].Name.Contains("mine") == true)
    clickedMineCounter++;
    return clickedMineCounter;
    public int checkMineDown(Button clicked, int cGot, int rGot)
    int clickedMineCounter = 0;
    if (rGot<7&& rGot>=0)
    if (arrayName[cGot, rGot + 1].Name.Contains("mine") == true)
    clickedMineCounter++;
    return clickedMineCounter;
    //Button Click
    private void button1_Click(object sender, EventArgs e)
    int mineCounter=0;
    Button clicked = new Button();
    string itemID = "";
    Button btn = (Button)sender;
    int btnID = Int32.Parse(btn.Name.Replace("safeButton", ""));
    foreach (Button item in arrayName)
    if (item.Name.Equals(btn.Name))
    itemID = item.Name.Replace("safeButton", "");
    clicked = item;
    string itemC = itemID.Remove(1, 1);
    string itemR = itemID.Remove(0, 1);
    int cGot = Int32.Parse(itemC);
    int rGot = Int32.Parse(itemR);
    mineCounter += checkMineUp(clicked, cGot, rGot);
    mineCounter += checkMineDown(clicked, cGot, rGot);
    mineCounter += checkMineRight(clicked, cGot, rGot);
    mineCounter += checkMineLeft(clicked, cGot, rGot);
    mineCounter += checkMineUpLeft(clicked, cGot, rGot);
    mineCounter += checkMineUpRight(clicked, rGot, cGot);
    clicked.Text = mineCounter.ToString();
    this.Controls.Add(clicked);
    label1.Text = clicked.Name;
    private void Form1_Load(object sender, EventArgs e)
    generateForm();

    I have the code set up to where mineButtons backcolor is red so that i can make sure everything works.
    So i know where the mines are and i know what the number should be but sometimes the checkMineUpRight function doesn't report a mine being there when i know there is one there.But some times it does. And other times it detects mines that are 2 buttons above
    it and 2 to the right. It doesn'tmake sense to me and if my logic is right in the checkMineUpRight function it should check the button that is 1 up and 1 to the right. And if i were to take the if statement away that checks the cGot and rGot (which when combined
    are the button you click on's position in the 2D array)  I get an out of Range exception when I click on any of the buttons in the 0 column but it should be increasing the column to 1 which is in range.

  • Acrobat X - Images edited in PhotoShop shift position

    In A9 and previous, I would use TouchUp Object Tool, edit the pic in PhotoShop, attach a profile, save the file, and the image would update in the PDF.
    When I do this now, the image shifts position. It seems to be scaling itself to fill a frame that is supposed to be cropped with a clipping path. I can't tell for sure though exactly what is going on.
    I don't see a preference setting that would be causing this.
    If there is no work-around for this I will have to go back to A9. I don't have access to the native files that create these PDFs and I need to be able to adjust the color.
    Mac OS 10.6.8, CS 6
    Sorry if there is already a thread for this but I can't see one.
    Thanks
    JK

    Thank you for replying as nobody else did.
    I've already switched back to A9.
    I shouldn't have to upgrade again - I should be able to use the software I just paid for.
    Sorry if that sounds rude but I can't be the only person who had that issue.
    JK

  • Div box shifted position when previewed on browsers??

    Hi,
    Can anyone please advise why one of my div boxes (the third one) in Dreamweaver shifted position when previewed on Firefox and IE?  My other two div boxes have no problem when previewed on browsers.
    #textBoxForDesignTitle {
        height: 40px;
        width: 372px;
        font-size: 15px;
        color: #C9B042;
        background-color: #0E103E;
        text-align: center;
        margin-left: 414px;
        border-collapse: collapse;
        border-spacing: 20px 0px;
        font-style: normal;
        font-weight: lighter;
        border-radius: 20px;
        -webkit-box-shadow: 2px 2px 9px 1px #000000;
        box-shadow: 2px 2px 9px 1px #000000;
        border: medium ridge #C9B042;
        padding-top: 1px;
        margin-top: -4px;
    #textBoxTwoForDesignTitle {
        height: 40px;
        width: 372px;
        font-size: 15px;
        color: #C9B042;
        background-color: #0E103E;
        text-align: center;
        border-collapse: collapse;
        border-spacing: 20px 0px;
        font-style: normal;
        font-weight: lighter;
        border-radius: 20px;
        -webkit-box-shadow: 2px 2px 9px 1px #000000;
        box-shadow: 2px 2px 9px 1px #000000;
        border: medium ridge #C9B042;
        padding-top: 1px;
        float: left;
        position: relative;
        left: 35px;
    #textBoxThreeForDesignTitle {
        height: 40px;
        width: 372px;
        font-size: 15px;
        color: #C9B042;
        background-color: #0E103E;
        text-align: center;
        border-collapse: collapse;
        border-spacing: 20px 0px;
        font-style: normal;
        font-weight: lighter;
        border-radius: 20px;
        -webkit-box-shadow: 2px 2px 9px 1px #000000;
        box-shadow: 2px 2px 9px 1px #000000;
        border: medium ridge #C9B042;
        padding-top: 1px;
        position: relative;
        left: 166px;
        float: left;
    Thanks very much!!
    mykw123

    Hi Preran,
    Sure, I can share with other users but I am not sure this solution was the best, but it works for me.   Somehow something about Dreamweaver is very complicated to use and understand- just in my opinion.  All I did was to add another div box outside of the 3rd text box which I created as div box (also did it for the 2nd text box since they aligned close to each other).  I know it shouldn't be needed since the text box is already a div box itself and my 1st and 2nd text boxes were okay.
    Preran- please see my other question posted and maybe you can help?  Thank you.
    http://forums.adobe.com/message/6172302#6172302
    Thanks,
    mykw123

  • Why does my pages shift position?

    I have built a site (kensdigitalart.com).  On the local machine I built the site on the pages always display in the same position.  Once uploaded and viewed on other machines some of the pages shift position slightly.  What is the best way to prevent this from happening? 
    Eveything is in a table.  I originally set the page properties so the table would be centered.  This resulted in some page shifting on the local machine.  I adjusted the margins on a number of pages to make the site display properly on the local machine.  I realize it will be necessary to put all settings back to zero to fix the problem.  Since the table width is the same on all pages and it's set to center the table why is the table moving on some pages?
    I am relatively new to working with Dreamweaver and apologize for asking what may be a simple question.  Thanks for any input.

    Keith Goodwin wrote:
    The only CSS I used was to format the text.  I know very little code.  Can you be a little more specific about where or how I might add this code?
    You haven't given us a link to your site so it is impossible to be specific.  The ideal place to put the code is in your style sheet so that it propages to all your pages assuming the same style sheet is used for all.  However, for a single page to test, enter the code in the HEAD section of your page.  It should look something like this:
    <!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>Untitled 1</title>
    <style type="text/css" media="all">
    html { overflow-y:scroll; }
    </style>
    </head>
    <body>
    </body>
    </html>
    The emphasized text is all you need to enter.

  • Subpicture Highlight shifts position on button when a shadow is applied in PS.

    Hi all,
    I created a menu in PS CS4 with text (some with drop shadows) that i assigned as buttons in Encore CS4. When i converted the text into buttons, I discovered that the ones with drop shadows caused the subpicture highlight to shift position up and to the right of the button.
    Can someone verify this?

    Jim,
    I'm not sure why you are having troubles with your converted to DV-AVI files. I get handed MPEG-2 material in several delivery schemes, and just do the conversion with DigitalMedia Converter, before I Import into PrPro. I seldom have any issues with these. The only issue is that with a very few, PrPro does not see the proper Duration. I have found that with these, I just open them in PrElements (they always show correct Duration), and then just do an Export as DV-AVI Type II (same exact format/CODEC and settings as what I Imported), and these "processed" files work 100% in PrPro. I've never been able to find any difference between the DMC converted DV-AVI's, and those run through PrE, but there has to be something different.
    As for the quality, you have to remember that the source footage was first compressed to MPEG-2, and to get it onto DVD, you'll be recompressing it again. Now, for light editing, there are NLE programs that do "smart rendering," where the Exported MPEG-2 will NOT be re-compressed, except for the exact areas that were changed. PrPro does not have smart rendering.
    Exporting to DV-AVI Type II, and Importing those into Encore, will give you quality as good as it will get. You CAN Export as MPEG-2 (DVD-compliant) from PrPro and can adjust your bit-rate (controls quality), but you are likely to not do better than Encore will on Automatic.
    Working from perviously compressed material will never yield results as good as going back to the original camera footage. Those compressions/re-compressions destroy quality.
    Good luck,
    Hunt
    PS - globally replacing Assets in PrPro is not really possible. Unless CS4.2 (coming soon) has a new feature in the Project Panel, I only know of one way - Offline Media, the Link Media. As there are no Actions, or Scripting in PrPro, like in Photoshop, it's a manual, and often tedious process.

  • Stage keeps shifting position

    I'm using Captivate 7 on a Mac (10.7.5) and sometimes (quite often actually) when I make a change on the stage (move something, resize something, etc.) the stage will suddenly shift position so that much of it will be out of view. Then I have to scroll the stage back into position. It also seems that, after the stage has moved out of position, the item I had selected will then be in the middle of the window. Is there a fix for this problem?

    Know that phenomenon, I'm using CTRL-0 to have it back to Best Fit, or CTRL-1 to 100%. Never could find out what is the cause, and mentioned it several times to the team.

  • Error while assigning values to Array using Copy operation

    Hi,
    I am using the following code to copy a string value 'Text' and 'UDFTypeTitle' to the 1st and 2nd position of an array:-
    <assign name="Assign1">
    <copy>
    <from expression="string('Text')"/>
    <to variable="Invoke1_ReadUDFValues_InputVariable" part="params"
    query="/ns1:ReadUDFValues/ns1:Field[position()=1]"/>
    </copy>
    <copy>
    <from expression="string('UDFTypeTitle')"/>
    <to variable="Invoke1_ReadUDFValues_InputVariable" part="params"
    query="/ns1:ReadUDFValues/ns1:Field[position()=2]"/>
    </copy>
    </assign>
    I am getting the following error for the 2nd copy:-
    XPath query string returns zero node.
    The assign activity of the to node query is returning zero node.
    Either the to node data or the xpath query in the to node was invalid.
    According to BPEL4WS spec 1.1 section 14.3, verify the to node value at line number 103 in the BPEL source
    If I am removing the 2nd copy I am not getting any error.
    The structure of ns1:*ReadUDFValues* is as follows:-
    - <xsd:complexType name="ReadUDFValues">
    - <xsd:sequence>
    <xsd:element maxOccurs="unbounded" name="Field" type="tns:UDFValueFieldType" />
    <xsd:element minOccurs="0" name="Filter" type="xsd:string" />
    <xsd:element minOccurs="0" name="OrderBy" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>
    The structure of ns1:ReadUDFValues/ns1:*Field* is as follows:-
    xsd:simpleType name="UDFValueFieldType">
    - <xsd:restriction base="xsd:string">
    <xsd:enumeration value="CodeValue" />
    <xsd:enumeration value="ConditionalIndicator" />
    <xsd:enumeration value="Cost" />
    <xsd:enumeration value="CreateDate" />
    <xsd:enumeration value="CreateUser" />
    <xsd:enumeration value="Description" />
    <xsd:enumeration value="Double" />
    <xsd:enumeration value="FinishDate" />
    <xsd:enumeration value="ForeignObjectId" />
    <xsd:enumeration value="Indicator" />
    <xsd:enumeration value="Integer" />
    <xsd:enumeration value="IsBaseline" />
    <xsd:enumeration value="IsTemplate" />
    <xsd:enumeration value="IsUDFTypeCalculated" />
    <xsd:enumeration value="IsUDFTypeConditional" />
    <xsd:enumeration value="LastUpdateDate" />
    <xsd:enumeration value="LastUpdateUser" />
    <xsd:enumeration value="ProjectObjectId" />
    <xsd:enumeration value="StartDate" />
    <xsd:enumeration value="Text"/>
    <xsd:enumeration value="UDFCodeObjectId" />
    <xsd:enumeration value="UDFTypeDataType" />
    <xsd:enumeration value="UDFTypeObjectId" />
    <xsd:enumeration value="UDFTypeSubjectArea" />
    <xsd:enumeration value="UDFTypeTitle"/>
    </xsd:restriction>
    </xsd:simpleType>
    Could you please suggest a solution?
    I also tried with position 0, 1 . still the same error.
    Regards,
    Sam

    Hi Naresh,
    The structure of ReadUDFValues is as follows:-
    - <xsd:complexType name="ReadUDFValues">
    - <xsd:sequence>
    <xsd:element maxOccurs="unbounded" name="Field" type="tns:UDFValueFieldType" />
    <xsd:element minOccurs="0" name="Filter" type="xsd:string" />
    <xsd:element minOccurs="0" name="OrderBy" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>
    The structure of ns1:ReadUDFValues/ns1:Field is as follows:-
    xsd:simpleType name="UDFValueFieldType">
    - <xsd:restriction base="xsd:string">
    <xsd:enumeration value="CodeValue" />
    <xsd:enumeration value="ConditionalIndicator" />
    <xsd:enumeration value="Cost" />
    <xsd:enumeration value="CreateDate" />
    <xsd:enumeration value="CreateUser" />
    <xsd:enumeration value="Description" />
    <xsd:enumeration value="Double" />
    <xsd:enumeration value="FinishDate" />
    <xsd:enumeration value="ForeignObjectId" />
    <xsd:enumeration value="Indicator" />
    <xsd:enumeration value="Integer" />
    <xsd:enumeration value="IsBaseline" />
    <xsd:enumeration value="IsTemplate" />
    <xsd:enumeration value="IsUDFTypeCalculated" />
    <xsd:enumeration value="IsUDFTypeConditional" />
    <xsd:enumeration value="LastUpdateDate" />
    <xsd:enumeration value="LastUpdateUser" />
    <xsd:enumeration value="ProjectObjectId" />
    <xsd:enumeration value="StartDate" />
    <xsd:enumeration value="Text"/>
    <xsd:enumeration value="UDFCodeObjectId" />
    <xsd:enumeration value="UDFTypeDataType" />
    <xsd:enumeration value="UDFTypeObjectId" />
    <xsd:enumeration value="UDFTypeSubjectArea" />
    <xsd:enumeration value="UDFTypeTitle"/>
    </xsd:restriction>
    </xsd:simpleType>

  • Clear array and take average of values in array continuously

    I have a continuous signal that I am acquiring with hardware (sampling at 1000Hz).  I want to be able to insert the data into a 1D array for 5 seconds, and then take the average of these 5000 samples.  So basically, every 5 seconds I need to take the average of a 1D array and create a new array for the next 5000 samples.

    There is no reason to accumulate the data into an array if all you need is the average.
    Simply add the values into a shift register. Every 5000 points devide the sum by 5000, output the average, and zero the shift register for the next series of data..
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for