help with loop

Hi hope someone can help me

"' How can I achieve this without getting the" undefined "at the beginning of each element, as I tried to splice but always get a comma at the beginning

var letters: Array = ["a", "b", "c"];

var asd:Array = new Array();

for (var i: int = 0; i < letters.length; i ++) {}

ASD letters [i] += [i]

ASD [i] is asd [i] .split ("undefined");.

}

trace (ASD);

output - undefineda, undefinedb, undefinedc

use:

var letters: Array = ["a", "b", "c"];

var asd:Array = new Array();

for (var i: int = 0; i< letters.length;="" i++)="">

ASD.push (Letters [i]);

ASD [i] is asd [i] .split ("undefined");.

}

or even better use:

var letters: Array = ["a", "b", "c"];

var asd:Array = letters.slice ();

Tags: Adobe Animate

Similar Questions

  • Help with loop of Liquid web app

    Hello

    I need help with a list of web app for a custom blog items.  Rather than having to categorize each post using the 'Actions' box (which they often forget), I think it would be much more user-friendly for our customers to have just a dropdown categories menu.  Can someone help out me this code, or to provide a more elegant solution?  The loop and the work of IF statement, but I'm having problems with rendering of the element in the IF statement.  When I copy the code of the object model in the IF statement, it restores.  However, I had much rather use a template because it is better - and I would like to know what I'm doing wrong.

    {module_webapps id = filter 'Blog' = 'all' render = "collection" collection = "messages" sortType = 'date' template =""}
    {% for section in posts.items %}
    {% If item.category contains 'Food' %}
    {module_webapps id = filter 'Blog' = 'item' itemID = "{{item.itemid}}" template="/Layouts/WebApps/Blog/list.html" "}
    {% endif %}

    {% endfor %}

    Thank you!

    Jeff

    Hi Jeff, what's going to happen with what you do is your make a collection of all the web of elements app and if you match foods your rendering module of a single element.

    First of all who will soon use your deduction limit to 75 module upward on this page/model until you know.
    Second, think about why you need to make the module again? You have the item data because you can get the itemid, then why you not only made the rest?

    Finally...

    If you make collection = "" which means that you use the collection that you have you don't need not make = 'collection. " "If you have deleted the template =" "and collection =" ' make = 'collection' means that it will be available in your layout to the list as a collection, rather then one.

  • Need help with loops

    Hi all

    I am a beginner in Labview. If need help in loops. Please check the attached vi and suggest me the procedure I followed is effective or not. If this is not the case, correct me.

    Waiting for answer

    According to the commentary of diagram, table sizes are all 16, then here is everything you need:

    (Hmm, clips chiseled Booleans in the constant diagram, just ignore that)

    "Elements of an array AND" checks if all a real (upper thread)

    'The GOLD table elements' check if at least one is true. (all others)

  • help with looping equation

    I'm really bad here with this (apparently) pretty simple problem of labview.  I have a set of equations that rely on the response of the other previous formula and so on.  I can do that easily enough in excel.  I tried to recreate this function in labview and were really struggling to make it work.  I tried to use while loops and for loops, I think that's what I have to do here, but I have a lot of success.  in any case, I've attached the worksheet with two formulas, a .png showing the relationship between the formulas in the worksheet and my .VI.  Thank you for your help in advance.

    You need both a loop and a shift register.

    Lynn

  • Help with loops and the fi

    Hi, im quite new to action scripts but the use of pascal a lot. Im stuck with a loop. What I want to happen, is when it gets to a certain range, not stop there and do some things visible on the frame when I press the specific letters on my keyboard. I had:

    Stop();
    {if (Key.isDown (85))}
    Statements
    }

    but I found that it would apply only if I held the button when I walked into the frame.
    I did try using some different loops, but in vain
    any suggestions would help!
    Alex

    Try to use a listener...

    var keyListener:Object = new Object();
    Key.addListener (keyListener);

    function keyDownF() {}
    If (Key.GetCode () == 85) {}
    Statements

    }
    }

    keyListener.onKeyDown = keyDownF;

  • Need help with loop and variable

    Hi all.

    I'm almost there with this, but I'm stuck on one last question.

    I am a loop in XML to choose the images to display, with the title and ID (which is used in the link).
    Everything works now except the itemID. This used to work, but now the ID is the same for all containers/links on the page.

    Code is attached below, and the function is the image.addEventListener.
    The itemID variable is that doesn't change is not to reflect the individual elements.

    Please please help.

    Thank you very much


    Hello

    You can try to use logic you used in your posted previous sample. Use the event.currentTarget.id to get the ID of the Image.

    image.addEventListener (MouseEvent.CLICK, function(e:Event):void
    {
    var imgId:String = e.currentTarget.id;
    var url: URLRequest = new URLRequest (" http://localhost/youtubeDownloader-debug/index.cfm?video=" + imgID).
    navigateToURL (url, "_blank");

    });

    You can also use the property 'data' of the Image to store the value you want and use the same property to get the value in the event listener.

    I hope this helps.

  • Need help with loop removeChild! for (var i = 0; i &lt; 10; i ++)

    Hello! Im working on a game project and having problem when a loop to add more enemys.
    What I want to do is like, so time exhaustion and player failing to the chassis, I want that child to get removed. but I can't access the var in the loop. I know it's an easy way...
    but wil be prefect if someon have any help.

    public void enemysLvl1() {}

    for (var i = 0; i < 10; i ++) {}

    var frukt1:Frukt = new Frukt;

    addChild (frukt1);

    }

    I am grateful for!

    Add every instance of frukt1 in a table, as Ned said, or make one enemy container - a Sprite and then only add enemies to the container. You can then he empty of any call removeChildAt (0) while container.numChildren > 0

    I tend to use Sprite containers a lot...

  • HELP with LOOPING!

    : D any help coding will save me!

    need to loop once, then stops on the last image...

    Thank you!
    Jane

    Check out David Stiller's blog on this subject:
    http://www.quip.net/blog/2006/Flash/how-to-loop-three-times

    It only will give you the code... He'll tell you why, if you know how to modify it according to your needs.

  • Need help with network home using Airport extreme

    I need help with my home network.  I'm not very aware when it comes to all things network.  Here's how my network is currently set up.

    Cable modem to Airport Extreme for Gigabit Switch.  Cables come out of the switch to all areas of the House.  I have 2 other extreme airport connected in other rooms of the House directly on the wall that dates back to the switch.  I hope I am explaining that properly.

    My problem is that this seems to have caused some of my connections cable does not work.  When everything is configured, it has worked well.  All connections in the House worked.  Then we have disconnected one of the extreme airport and moved to another location in the House to have the best wifi coverage.  Since that time, a lot of the ethernet wall plugs are not working.  For example, when I plug in my Macbook Pro in making ethernet in my kitchen, it says connected but it has an assigned ip address and cannot connect to the internet.

    Any help you can provide would be great.

    I would like to get the return tech to help you to...

    But it is likely that something (or someone) has tampered with the settings.

    The layout is fine... but you can cause problems with the network by creating a loop.

    This can happen because the AE you moved is connected wrongly... somewhere in the network it is connected to the switch again.

    Or AE is set to expand wireless... It's FAKE... It will loop the network on the back main EI wireless.

    Unplug the two AE you have that function as extensions...

    Turning off everything else... then it works again...

    Do it in this order.

    Modem... Wait 2 min

    AE... Wait 2 min

    Switch.

    Now check that the network is working properly... power of customers in various locations and make sure everything is good.

    If so, then manually reset the two AE of factory and redo their installation.

  • [Error number: 0x8024400A] Need help with this error... I reinstalled XP SP1 and I can't get an auto update that's simple to install, just get this error every time

    [Error number: 0x8024400A] Need help with this error... I reinstalled XP SP1 and I can't get an automatic update that's simple to install, just get this error at each time HHHHEEEELLLPPPPP! Thank you

    I had the same problem.  But finally found a solution.  If your listing is similar to mine, then keep.  XP Media Center Edition 2005 (sp2).  AMD Athlon 64 x 2 Dual-Core, HP a1630n desktop computer.

    Go to the HP website, search for sp37394-XP sp3 Upgrade utility Microsoft for systems equipped with AMD processors.

    I had the same 0 x 80240036, 0x8024400a error, but realize my problem was really get manually downloaded sp3 and installed without continue loop crashing and not error messages.

  • Need help with Sql Tunning

    Under Update taking 2 h complete 3000 sets.

    UPDATE ARR_TRANSACTIONS ARR

    SET = NUMBER99

    (SELECT ARR_1.NUMBER99

    OF ARR_TRANSACTIONS ARR_1, ARR_HEADER BH

    WHERE ARR_1.ARR_ID = BH. ARR_ID

    AND BH. FLAG = "Y".

    AND ARR_1.LINE_ID = ARR. ORIG_INV_LINE_ID

    AND ARR_1.NUMBER9 IS NOT NULL

    AND ROWNUM = 1)

    WHERE ARR BATCH_ID = 26219

    AND ARR. NUMBER99 IS NULL

    I added more some condition where to reduce cost and its working fine. But I need to rise more than performance on SQL.

    Please help with SQL.

    I do not see the number of 3000 lines in the plan - so I guess that the optimizer does not compute with the correct numbers. Could generate the plan with dbms_xplan.display_cursor? This could tell us something about filter predicates and access.

    In the given situation, I would check:

    • is the access to the index in step 1 (filtered by the relevant conditions: this could be BATCH_ID = 26219) return actually 248 entries (or something similar)?
    • Access table in step 2 returning 204 lines (or something similar) after applying the filters given? If the number of lines is much bigger then a Nested Loops is perhaps not a good idea.

    To make this much simpler check, you could create a plan with statistics of content (RowSource) given that the plan containing the real and the number of estimated rows.

    If the estimated cardinalities are not plausible the next question would be if the statistics are strong and up to date.

  • Help with displaying a URL in the body of the email

    Version: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    Hello

    I hope I could get help with displaying a URL embedded in an email. "The URL < a href ="http://projectstatus"> click here to connect to status tool < /a >, appears what looks like text. .

    If it's important the e-mail client is Outlook 2010.

    The procedure will query a table to send reminders to project managers to update their project status each week.

    The application must include a link to the application, so they can access the e-mail application without having to go through their browser etc.

    FOR email_recipients_rec IN email_recipients_cur
    LOOP
        v_recipient := 'email_recipients_rec.resource_email';
        v_subject   := NVL(email_recipients_rec.proj_name||' Status Needs To Be Updated', '(no subject)');
        v_message   := 'The Status for '||email_recipients_rec.proj_name||' on the '||email_recipients_rec.report_date||' '||email_recipients_rec.dashboard_name||
                       ' was not updated as of '||TRUNC(email_recipients_rec.last_updated)||'.'|| utl_tcp.crlf
                        ||'Please update the Status on this Project.'||utl_tcp.crlf||utl_tcp.crlf
                        ||'<a href="http://projectstatus">Click Here to Log into the Status Tool</a>';
    
        sendmail( p_recipient      => v_recipient
                 ,p_subject        => v_subject
                 ,p_message        => v_message
                                );
    END LOOP;
    
    PROCEDURE sendmail( p_recipient      IN VARCHAR2
                       ,p_subject        IN VARCHAR2
                       ,p_message        IN VARCHAR2
                      ) IS
    
        l_mail_conn     utl_smtp.connection;
        v_sender        VARCHAR2(40) := c_default_mail;
    BEGIN
        l_mail_conn := utl_smtp.open_connection(c_mailhost, 25);
        utl_smtp.helo(l_mail_conn, c_mailhost);
        utl_smtp.mail(l_mail_conn, v_sender);
        utl_smtp.rcpt(l_mail_conn, p_recipient);
    
        utl_smtp.open_data(l_mail_conn);
    
        utl_smtp.write_data(l_mail_conn, 'From: ' || nvl(v_sender, 'SendMail Procedure') || utl_tcp.crlf);
        utl_smtp.write_data(l_mail_conn, 'To: ' || nvl(p_recipient, c_default_mail) || utl_tcp.crlf);
        utl_smtp.write_data(l_mail_conn, 'Subject: ' || nvl(p_subject, '(no subject)') || utl_tcp.crlf || utl_tcp.crlf);
    
        utl_smtp.write_data(l_mail_conn, p_message);
        utl_smtp.write_data(l_mail_conn, utl_tcp.crlf || utl_tcp.crlf);
    
        utl_smtp.close_data(l_mail_conn);
        utl_smtp.quit(l_mail_conn);
    
        EXCEPTION
        WHEN OTHERS THEN
          -- catches all errors
          RAISE_APPLICATION_ERROR(-20001, 'SENDMAIL: ' || SQLERRM);
    END sendmail;
    
    
    
    
    
    
    
    
    
    

    I hope it's clear. If not, please let me know what is not clear.

    Can what information I provide?

    Thank you

    Joe

    See the link now, but now the message is not displayed. Only the link.

    Of course.

    Your e-mail client displays only the HTML part.

    It is the purpose of MIME multipart/alternative type, if HTML is not supported, the customer returns to the plain text version.

    Today, most of the mail clients Enterprise supports HTML content (Outlook is of of them), just so place all the message in the HTML part and add the link according to your rules.

  • Help with packages and functions that it

    Hello, I need help with the package.
    I have two tables of the employee base (id, firstname, lastname, etc..) T1 and T2.
    What I need, it's a package and two features inside. First function reads the data from T1 and passes to the second function, where second function reads data from T2 and concatenates the data just read with data from function1 and data T1 + T2 function2 goes on the main program that displays this data.

    So far, I have:
    create or replace type emp_type as object
    (id number,
    firstname varchar(20),
    lastname varchar(20),
    salary number(9,2));
    
    create or replace type emp_type_table as table of emp_type;
    
    create or replace package my_package
    is emp_table emp_type_table:= emp_type_table();      -- *not sure if this line is correct*
    function get_T1_emp return emp_type_table;
    function get_T2_emp (T1_emp in emp_type_table) return emp_type_table;
    end my_package;
    
    -- *confusion begins*
    
    create or replace package body my_package as 
    function get_T1_emp
    return  emp_type_table as 
      emp_table emp_type_table:= emp_type_table();
    begin
         for i in (select * from T1) loop
             emp_table.extend;
             emp_table(emp_table.count):= (emp_type(i.id, i.firstname, i.lastname, i.salary));
          end loop;
        return emp_table; 
    end get_T1_emp; 
    - get_T1_emp function seems to be quite beautiful. At least it works separately
    function get_T2_emp (T1_emp in emp_type_table)
    return  emp_type_table  
      emp_table emp_type_table:= emp_type_table();
    begin
         for i in (select * from T2) loop
             T1_emp.extend;
             T1_emp(T1_emp.count):= (emp_type(i.id, i.firstname, i.lastname, i.salary));
          end loop;
        return T1_emp; 
    end get_T2_emp;
    end my_package;
    
    
    DECLARE
      v_Return emp_type_table;
      v_Return2 emp_type_table;
    BEGIN
      v_Return := get_T1_emp;
      v_Return2 := get_T2_emp(v_Return);
      for i in 1..2 loop
        DBMS_OUTPUT.PUT_LINE(v_Return2(i).id || ', ' || v_Return2(i).firstname || ', ' || v_Return2(i).lastname 
        || ', ' || v_Return2(i).salary || 'EUR');
      end loop;
    END;
    So basically I don't know about my tax package.
    Most important, I don't know how to write the get_T2_emp function. And also not very sure of my main function. Please can someone help my with my problem

    Published by: dber November 6, 2011 21:22

    Published by: dber November 6, 2011 23:38 added
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    Hello

    Here you go

    SQL> DROP TABLE t1;
    
    Table dropped.
    
    SQL> DROP TABLE t2;
    
    Table dropped.
    
    SQL> CREATE TABLE t1 (id NUMBER,
      2                   firstname VARCHAR2(100),
      3                   lastname VARCHAR2(100) );
    
    Table created.
    
    SQL> CREATE TABLE t2 (id NUMBER,
      2                   firstname VARCHAR2(100),
      3                   lastname VARCHAR2(100) );
    
    Table created.
    
    SQL> INSERT INTO t1  (SELECT 1,'SURI','DAMA' FROM dual
      2                     UNION ALL
      3                     SELECT 2,'SRINU','DAMA' FROM dual);
    
    2 rows created.
    
    SQL> INSERT INTO t2  (SELECT 3,'ABC','XYZ' FROM dual
      2                     UNION ALL
      3                     SELECT 4,'DEF','PQR' FROM dual);
    
    2 rows created.
    

    Package code

    
    SQL> CREATE OR REPLACE PACKAGE test_array_pkg
      2  AS
      3    TYPE test_array1 IS TABLE OF t1%rowtype  INDEX BY PLS_INTEGER;
      4    TYPE test_array2 IS TABLE OF t2%rowtype  INDEX BY PLS_INTEGER;
      5
      6    FUNCTION get_t1 RETURN test_array1;
      7    FUNCTION get_t2(p_t1 IN test_array1)
      8    RETURN test_array2;
      9
     10  END test_array_pkg;
     11  /
    
    Package created.
    

    Package body

     SQL> CREATE OR REPLACE PACKAGE BODY test_array_pkg
      2  AS
      3    t1_array1 test_array1;
      4    t2_array2 test_array2;
      5
      6    FUNCTION get_t1
      7    RETURN test_array1
      8    IS
      9
     10      n NUMBER :=0;
     11
     12    BEGIN
     13
     14     FOR i IN (SELECT * FROM t1)
     15     LOOP
     16
     17       t1_array1(n).id:= i.id;
     18       t1_array1(n).firstname := i.firstname;
     19       t1_array1(n).lastname := i.lastname;
     20
     21       n:=n+1;
     22
     23     END LOOP;
     24
     25     RETURN t1_array1;
     26
     27    END get_t1;
     28
     29    FUNCTION get_t2(p_t1 IN test_array1)
     30    RETURN test_array2
     31    IS
     32
     33      n NUMBER:=0;
     34
     35    BEGIN
     36
     37     FOR i IN p_t1.FIRST..p_t1.LAST
     38     LOOP
     39
     40       t2_array2(n).id:=p_t1(i).id;
     41       t2_array2(n).firstname:= p_t1(i).firstname;
     42       t2_array2(n).lastname := p_t1(i).lastname;
     43
     44       n:=n+1;
     45
     46     END LOOP;
     47
     48     FOR i IN (SELECT * FROM t2)
     49     LOOP
     50
     51       t2_array2(n).id:=i.id;
     52       t2_array2(n).firstname:= i.firstname;
     53       t2_array2(n).lastname := i.lastname;
     54
     55       n:=n+1;
     56
     57     END LOOP;
     58
     59     RETURN t2_array2;
     60
     61    END get_t2;
     62
     63
     64  END test_array_pkg;
     65  /
    
    Package body created.
    

    Main script

     SQL> declare
      2
      3     t1_result test_array_pkg.test_array1;
      4     t2_result test_array_pkg.test_array2;
      5
      6  begin
      7
      8    t1_result:= test_array_pkg.get_t1;
      9    t2_result:= test_array_pkg.get_t2(t1_result);
     10
     11    FOR i IN t2_result.first..t2_result.last
     12    LOOP
     13
     14      dbms_output.put_line(t2_result(i).id||' '||t2_result(i).firstname||' '||t2_result(i).lastname);
     15
     16    END LOOP;
     17
     18  end;
     19  /
    1 SURI DAMA
    2 SRINU DAMA
    3 ABC XYZ
    4 DEF PQR
    
    PL/SQL procedure successfully completed.
    
  • 1st time scripter... needs help with conditional step 2

    Never write the script in any form. JavaScript can be Cuniform as far as I know.

    Really want to understand such things.

    Download all guides... they make my head ache. Would like any suggestions on a good starting book. entry level stuff.

    Should I go to learn Javascript, then it'll all be easier?

    This is the purpose of the script that I want to write.

    I have a folder folders containing main/artist name/backup / retouched / * this is the lie of the images *.

    also / intact / * this is the lie of the images *.

    I would like to write a script that sends Photoshop thanks to all subfolders looking for files.

    Open the file.

    Determine if the file is grayscale.

    If this isn't the case, close the file.

    If grayscale determine the longest side of the image and resize it to 300 DPI maintaining proportions making long side 10 inches.

    Save the file in the folder '_8x10' file name added

    Save the file in "' C: / getty /" add "_8x10" file name "

    Close the file without saving changes

    OTHER IMPORTANT FACTS

    Emphasizing the need that the originals should not be harmed in any way.

    99% of the files are .tiffs others would jpg - I can't ignore jpg files in order to remove a variable.

    I worked on it for 2 days, trying to teach me, and it is not just by clicking. I can't pick it up quickly.

    Here's what I wrote and tried to patch all of the other scripts on the web in the hope that I understood why I was picking up this code.

    I'm short on time and would like advice on this.

    Here is my code:

    GrayscaleThenLandOrPortTo10Inches300dpi.jsx

    Copyright 2012

    Written by Brian Shupe steal shamelessly on the net

    /*

    Description:

    This script finds the folder and all subfolders for images.

    Check to see if they are grayscale

    If so, he trims the long side at 10 inches at 300 dpi

    */

    turn on double click of the

    Macintosh Finder or Windows Explorer

    #target photoshop

    Make Photoshop the frontmost application

    where we double clicked on the file

    app.bringToFront ();

    ///////////////////////////

    //       SET-UP          //

    ///////////////////////////

    Close all open documents

    so that {(app.documents.length)

    app.activeDocument.close)

    }

    Create the dialog select parent folder

    var imageFolder is Folder.selectDialog ("select a folder with images to treat");.

    Set variables naming for easier coding

    var doc = app.activeDocument;

    set the units to inches

    Save current preferences

    var strtRulerUnits = app.preferences.rulerUnits;

    var strtTypeUnits = app.preferences.typeUnits;

    Adobe Photoshop CS4 use pixels and display without the value dialog boxes

    app.preferences.rulerUnits = Units.INCHES

    app.preferences.typeUnits = TypeUnits.INCHES

    app.displayDialogs = DialogModes.NO

    Recursively process all subfolders

    If (image! = null) processFolder (imageFolder);

    function processFolder (folder) {}

    List of files of the var = folder.getFiles)

    for (var i = 0; i < fileList.length; i ++) {}

    var file = list of files [i];

    }}

    Check if the active document isn't in grayscale. If this is true do nothing

    If (doc.mode! = DocumentMode.GRAYSCALE) {}

    } else

    Check if the document is higher than it is wide

    If (doc.height > doc.width)

    {

    Perform this action if the IF statement is true. Action of sizes both height to 10 inches and 300 DPI

    doAction ("Port", "Getty");

    }

    on the other

    {

    Perform this action if the IF statement is false. Action sizes two length of 10 inches and DPI to 300

    doAction ("Land", "Getty");

    }

    Create a folder to contain a file duplicate

    myFolder var = new Folder("c:/Getty/");

    myFolder. Create();

    saveFile = new file ("C: / Getty /' + imgName +"_"+"8 x 10")

    var CurrentFolder = activeDocument.path;

    var ParentFolder = decodeURI (activeDocument.path.parent);

    saveFile = new file (parentFolder + ' /' + 'CONTAINER BACKUP' + ' /' + imgName + "_" + "8 x 10")

    app.activeDocument.close (SaveOptions.DONOTSAVECHANGES)

    I think that, right now, the problem is when it gets to the point where he seeks an image open... There are jumps to zero and it.

    Anyone can see that for my clumsy attempt and course correct me?

    would be happy to discuss tutoring services.

    This is a full version that could help with all of the necessary steps...

    #target photoshop
    app.bringToFront();
    main(); //call the main function
    function main(){
    var folders =[];
    var topLevel = Folder.selectDialog("Please select top level folder");
    if(topLevel == null) return; //if cancelled quit
    folders = FindAllFolders(topLevel, folders);
    folders.unshift(topLevel);
    var outputFolder = Folder("/c/Getty/");
    //create output folder if it does not exist
    if(!outputFolder.exists) outputFolder.create();
    for(var z in folders){// loop through all subfolders
    var fileList = folders[z].getFiles("*.tif"); //get a list of all tifs in this folder
    for(var a in fileList){//loop through all files in folder
        app.open(fileList[a]);//open file
        var doc = activeDocument;
        if(doc.mode != DocumentMode.GRAYSCALE){//if not greyscale close and get next doc.
            doc.close(SaveOptions.DONOTSAVECHANGES);
            continue;
            }
        if(doc.width > doc.height){//landscape
            //resize document, only one value is required otherwise it might distort the document.
            doc.resizeImage(new UnitValue(10,'in'), undefined, 300, ResampleMethod.BICUBIC);
            }else{//portrait
                doc.resizeImage(undefined, new UnitValue(10,'in'), 300, ResampleMethod.BICUBIC);
                }//end resize
            //get the name without the .tif extension
            var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');
            //create the output file path and name
            var saveFile = File(outputFolder + "/" + Name + "_8x10.tif");
            //save and close
            SaveTIFF(saveFile);
            doc.close(SaveOptions.DONOTSAVECHANGES);
        }//end filelist
    }//end folders
    }//end main function
    function FindAllFolders( srcFolderStr, destArray) {
     var fileFolderArray = Folder( srcFolderStr ).getFiles();
     for ( var i = 0; i < fileFolderArray.length; i++ ) {
      var fileFoldObj = fileFolderArray[i];
      if ( fileFoldObj instanceof File ) {
      } else {
             destArray.push( Folder(fileFoldObj) );
      FindAllFolders( fileFoldObj.toString(), destArray );
      }
     }
     return destArray;
    }
    function SaveTIFF(saveFile){
    tiffSaveOptions = new TiffSaveOptions();
    tiffSaveOptions.embedColorProfile = true;
    tiffSaveOptions.alphaChannels = true;
    tiffSaveOptions.layers = true;
    tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
    activeDocument.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);
    }
    
  • Need help with the procedure variable

    Hi guys,.

    I try to get the list of the TableName of a specific table and store it in a variable and use this variable to LOOP and remove specific data in the table. Here is my code, maybe that will be clearer...

    This procedure within a package

    PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    AS
    v_TableName CMSR_MAPPING. TABLE_NAME % TYPE;

    BEGIN
    Extract the names of the tables
    SELECT TABLE_NAME
    IN v_TableName
    OF CMSR_MAPPING
    WHERE TABLE_TYPE <>'W '.
    AND ORDER_SEQ <>' 0'
    ORDER BY ORDER_SEQ DESC
    ;

    -Loop on the name of the table
    FOR v_Index in 1... v_TableName.Count LOOP
    -Check that the table name and remove from the respectable table -.
    CASE v_TableName (v_Index)
    WHEN "CMSW_CONTR" THEN
    REMOVE FROM CMSW_CONTR
    WHERE CONTR_NBR = parCONTR_NBR;
    WHEN "CMSW_AMNDS" THEN
    REMOVE FROM CMSW_AMNDS
    WHERE CONTR_NBR = parCONTR_NBR;

    END CASE;

    END LOOP;

    END;

    When I run it, I get the following compile on this line error of TO v_Index IN 1.. v_TableName.COUNT LOOP:
    PLS-00487: Invalid reference to the variable 'V_TABLENAME '.

    Can someone help with this? What I'm doing wrong here?

    Like this?

    /* Formatted on 5/20/2011 12:37:05 PM (QP5 v5.149.1003.31008) */
    CREATE OR REPLACE PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    IS
    BEGIN
       FOR c IN (  SELECT TABLE_NAME v_TableName
                     FROM CMSR_MAPPING
                    WHERE TABLE_TYPE != 'W' AND ORDER_SEQ != '0'
                 ORDER BY ORDER_SEQ DESC)
       LOOP
          -- Verify the table name and delete in respectable table --
          --( I always hate when my tables aren't respectable !)
          CASE c.v_TableName
             WHEN 'CMSW_CONTR'
             THEN
                DELETE FROM CMSW_CONTR
                      WHERE CONTR_NBR = parCONTR_NBR;
             WHEN 'CMSW_AMNDS'
             THEN
                DELETE FROM CMSW_AMNDS
                      WHERE CONTR_NBR = parCONTR_NBR;
          END CASE;
       END LOOP;
    END;
    

    Obviously I don't have your data and do not know exactly what is the whole procedure
    but you could not do?

    /* Formatted on 5/20/2011 12:49:07 PM (QP5 v5.149.1003.31008) */
    CREATE OR REPLACE PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    IS
    BEGIN
       DELETE FROM CMSW_CONTR
             WHERE CONTR_NBR = parCONTR_NBR
                   AND EXISTS
                          (SELECT 1
                             FROM CMSR_MAPPING
                            WHERE     TABLE_TYPE != 'W'
                                  AND ORDER_SEQ != '0'
                                  AND table_name = 'CMSW_CONTR');
    
       DELETE FROM CMSW_AMNDS
             WHERE CONTR_NBR = parCONTR_NBR
                   AND EXISTS
                          (SELECT 1
                             FROM CMSR_MAPPING
                            WHERE     TABLE_TYPE != 'W'
                                  AND ORDER_SEQ != '0'
                                  AND table_name = 'CMSW_AMNDS');
    END;
    

    Published by: pollywog may 20, 2011 12:49

Maybe you are looking for

  • iPad storage being quickly exhausted Air

    When I did a recent sync between my iPad and iTunes, it showed that since the upgrade to 9.3.2 somewhere in the region of 60 GB had been exhausted and is displayed under 'Documents and data.  I don't have any idea what used this because only the last

  • How to disable safe mode

    Hi, im on one machine 12.10 Linux ubuntu, and I need help on how to disable the mode without failure of firefox!I want to disable safe mode because I need my content filter activated all the time and I do not know how...I have read many threads sayin

  • Problem webcam with Skype and MSN messanger on Satellite A300

    Hello. Well. The Australia contacted Toshiba. and got some information.Well, the person I spoke to said that he would try to find the drivers on the European site of Toshiba, which he did. And he said to uninstall the software from my camera assist.S

  • PROBLEM/QUESTIONS of Lenovo TAB A7 - 30 (A3300-HV) touchscreen

    Hi, I recently got a TAB Lenovo A7-30 as a gift. It came in a box delivered with Earbud Headphones JBL and a sleeve of Samsonite. I've updated immediately after loading, and as I used it, I noticed erratic behavior of the touch screen: 1. registered

  • Why I can't install update KB2494113 on Windows XP?

    Each update time that kb2494113 try to install on my laptop to Windows XP Professional, facilities fails.