Help with IMMEDIATE EXECUTION and drop

Hi all

We strive to create a procedure to do the following:

* We have in the database of the tables named as C$ _XXXXXXXXX
* We want to drop some of these tables with a common prefix (Fe C$ _1203101)

DECLARE
v_sql VARCHAR2 (300);
BEGIN
SELECT 'DROP TABLE ODISTAG.' | TABLE_NAME | « ; » IN v_sql FROM USER_TABLES WHERE TABLE_NAME LIKE ' C$ _1203101% ';
EXECUTE IMMEDIATE v_sql;
END;

But we are getting this error:


Error report:
ORA-00911: invalid character
ORA-06512: at line 5
00911 00000 - "invalid character".
* Cause: identifiers may not start with any character other than ASCII
letters and numbers. $# _ are allowed after the first
character. May contain identifiers surrounded by doublequotes
any character other than a quotation mark. Other quotes
(q' #... #') cannot use spaces, tabs or as carriage returns
delimiters. For all other settings, consult the SQL language
Reference manual.
* Action:


Any help on this please?

Thank you!

You don't need the semicolon.

Tags: Database

Similar Questions

  • Help with a Drag and Drop problem

    I design a simple drag and drop the game, ranking but I had several objects and targets, for example square shaped object cannot go to target square shape, but when I have 2 or more place then the square2, carre3 can not go to square target! I used the code as belo

    var objectoriginalX:Number;
    var objectoriginalY:Number;
    var counter: Number = 0;

    triangle_mc.buttonMode = true;
    triangle_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    triangle_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    circle_mc.buttonMode = true;
    circle_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    circle_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    square_mc.buttonMode = true;
    square_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    square_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    square2_mc.buttonMode = true;
    square2_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    square2_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    square3_mc.buttonMode = true;
    square3_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    square3_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    star_mc.buttonMode = true;
    star_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    star_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    poly_mc.buttonMode = true;
    poly_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    poly_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    function pickupObject(event:MouseEvent):void {}
    event.target.startDrag (true);
    event.target.parent.addChild (event.target);
    objectoriginalX = event.target.x;
    objectoriginalY = event.target.y;
    }
    function dropObject(event:MouseEvent):void {}
    event.target.stopDrag ();
    var matchingTargetName:String = "target" + event.target.name;
    var matchingTarget:DisplayObject = getChildByName (matchingTargetName);
    If (event.target.dropTarget! = null & & event.target.dropTarget.parent == matchingTarget) {}
    reply_txt. Text = "Good Job!"
    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropObject);
    event.target.buttonMode = false;
    Event.Target.x = matchingTarget.x;
    Event.Target.y = matchingTarget.y;
    counter ++;
    score_txt. Text = String (counter);

    } else {}
    reply_txt. Text = "Try Again!";
    Event.Target.x = objectoriginalX;
    Event.Target.y = objectoriginalY;
    -counter;
    score_txt. Text = String (counter);
    }
    }

    Thank you very much for your help!

    An easy way to handle this is to assign a variable for each target that will tell you whether or not it is still a usable lens... Let's say you name "usable", it starts as a true for each target value.  Once a target is used you change the value of this variable to false.  You use this variable as abother test in your conditional.  Something like...

    If (event.target.dropTarget! = null & event.target.dropTarget.parent == matchingTarget & event.target.dropTarget.useable ) {}

    event.target.dropTarget.useable = false;

  • Help with IMMEDIATE EXECUTION

    Hello people can help you Execute Immediate below set out? I'm a little confused on how to use it.

    #!/bin/sh
    
    sqlplus -s ${DB_USER} << EOF
    
    
    SELECT 'ALTER TABLE PANDORA.'||table_name||' DROP PARTITION '||partition_name||';'
    FROM user_tab_partitions
    WHERE TABLE_NAME IN ('SIU', 'NGME')
    AND partition_name = (SELECT MIN(partition_name) 
                          FROM user_tab_partitions
                          WHERE TABLE_NAME IN ('NGME')
                          AND partition_name <> 'DUMMY'
                          );
                                      
    SELECT 'ALTER TABLE PANDORA.'||table_name||' ADD PARTITION WEEK'||TO_CHAR(TO_NUMBER(REPLACE(partition_name,'WEEK'))+1)||';'
    FROM user_tab_partitions
    WHERE TABLE_NAME IN ('SIU', 'NGME')
    AND partition_name = (SELECT MAX(partition_name) 
                          FROM user_tab_partitions
                          WHERE TABLE_NAME IN ('NGME')
                          AND partition_name <> 'DUMMY'
                          );
       
    SELECT 'ALTER INDEX PANDORA.IDX_SERVED_IMSI MODIFY PARTITION '||partition_name||' UNUSABLE;'
    FROM user_tab_partitions
    WHERE TABLE_NAME = 'SIU'
    AND partition_name = (SELECT MAX(partition_name) 
                          FROM user_tab_partitions
                          WHERE TABLE_NAME IN ('NGME')
                          AND partition_name <> 'DUMMY'
                          );
    
    EXIT
    EOF 
    

    Thank you in advance.

    Something like

    BEGIN

    I'm IN)

    SELECT table_name, nom_partition

    Of user_tab_partitions

    WHERE TABLE_NAME IN ("SIU", "NGME")

    AND nom_partition = (SELECT MIN (partition_name)

    Of user_tab_partitions

    WHERE TABLE_NAME IN ("NGME")

    AND nom_partition <> 'DUMMY '.

    )

    ) LOOP

    RUN IMMEDIATELY "ALTER TABLE PANDORA." | i.table_name |' DROP PARTITION '. i.PARTITION_NAME;

    END OF LOOP:

    END;

    NOT TESTED.

  • Changing table via the package with immediate execution (problem)

    Hello

    I have a unusual problem. I have a package that contains the procedure that via execute immediate statement, creates a table on which he performs different actions for example:

    -alter table some_owner.dummy_table noparallel

    -create index some_owner.idx_name on some_owner.dummy_table (column)...

    But I only managed to run move and create synonym table/public via execute immediate statement. Actions as alter table and create index fails with error ORA-01031: insufficient privileges.

    Note If call these commands outside the package (a simple script) this all done OK.

    I found a way, where I set the AUTHID CURRENT_USER command create package statement. In this way all the actions executed OK.

    I wonder why I can't change the table via the package with immediate execution on a table that is in the tablespace "SOME_TABLESPACE" and the title of owner "SOME_OWNER", without putting the AUTHID command on the package.

    There must be a problem why a package cannot change the table which is owned by the user 'SOME_OWNER '.

    All useful responses would be appreciated.

    I have a unusual problem.

    No - you don't have. This question has been answered SEVERAL times on this forum and others.

    But I only managed to run move and create synonym table/public via execute immediate statement. Actions as alter table and create index fails with error ORA-01031: insufficient privileges.

    OK - your username doesn't have privileges to do these operations or only received privileges through roles.

    Roles are DISABLED in named PL/SQL blocks that use of the AUTHOR's rights.

    Note If call these commands outside the package (a simple script) this all done OK.

    I found a way, where I set the AUTHID CURRENT_USER command create package statement. In this way all the actions executed OK.

    Of course - the roles are NOT disabled in named PL/SQL blocks that use the rights of the APPELLANT or in anonymous blocks.

    I wonder why I can't change the table via the package with immediate execution on a table that is in the tablespace "SOME_TABLESPACE" and the title of owner "SOME_OWNER", without putting the AUTHID command on the package.

    Well now you know!

  • Help with check boxes and actions

    Hello

    I just downloaded a trial version of LiveCycle Designer ES2 to see if this program works for the company that I work for. I need to create order forms for our products that our customers can fill out online and then send an e-mail to our sales department.

    I have imported our current order form to LiveCycle as a work of art and have inserted check boxes on the form. I want the form to automatically add the price of the option they checked off the retail price of total at the bottom of the form. Do you have any suggestions for me?

    Thank you!

    Stefan

    Hello Stefan,

    LC Designer is a very powerful application. While you can drag and drop objects on the form, for things really move you need to put a script in objects. This allows to control the way in which the form will be according to the users actions.

    To begin with there is help. If you have a look at the Action Builder in the Tools menu, you can select an object, then use the plain instructions accumulates the desired interaction. When you click OK, LC Designer will insert the necessary script.

    Therefore, there may be a steep learning curve, so it depends on how comfortable you are to roll up your sleeves and do some scripts.

    First, you must configure your workspace. This tends to be a personal preference, but here's a basic layout.

    It is a bit small, because of the scale, but you get the idea. At any time, you should be able to see the page, the hierarchy and the script editor. The object library and the range of the object and other palette must be close to hand as well.

    I am NOT inclined to import the form existing as work. This can limit the built-in options in LC Designer later. You can save your form existing in JPEG format and then in a new form to use the image object (value size full page) to display the image of the existing form.

    [ALTERNATIVE: you can also add fields to a PDF in Acrobat].

    Regarding scripting, the following JavaScript code should work in the click event of the checkbox (on the ground that the other field is named totalPrice).

    If (this.rawValue == 1)

    {

    totalPrice.rawValue = totalPrice.rawValue + 10;

    }

    on the other

    {

    totalPrice.rawValue = totalPrice.rawValue - 10;

    }

    This should take into account if the user changes of opinion and unticks the box.

    One thing to keep in mind about forms developed in the LC Designer, it is only the functions that will be available in the form (such as submit by e-mail in PDF format) will depend on whether the user has Acrobat or Reader, and also on whether the form has been active player (and how it has been activated). There is more information here: http://assure.ly/gYyYc2.

    I highly recommend JP Terry on LC Designer which is excellent - book "create dynamic with Adobe LiveCycle Designer Forms. It starts at the beginning and clearly sets out the key learning points. In the end, there are a few good examples that you can copy anywhere in your forms.

    We have solutions and blog posts on our website http://www.assuredynamics.com.

    There are also a range of online resources. You can find these resources useful:

    http://www.Adobe.com/go/learn_lc_scriptingBasics

    http://www.Adobe.com/go/learn_lc_scriptingReference

    http://www.Adobe.com/go/learn_lc_formCalc

    http://www.Adobe.com/devnet/LiveCycle/articles/Adobe_XML_Form_Object_M odel_Refer ence.pdf

    http://www.Adobe.com/devnet/Acrobat/PDFs/lc_migrating_acrobat_xmlform. PDF

    And a very convenient resource (and even if it's for version 6, it is still very good because of the way it is presented):http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf

    The HelpFile in the LC designer can also help with the syntax and LC designer itself comes with some great models and examples.

    Finally, discover the network of the developer on http://www.adobe.com/devnet/livecycle/

    A book that does not deal with the scripts at all, but is very good on the formatting is also ""does this work " by Caroline Jarrett and Gerry Gaffney."

    The Adobe "PDF forms Bible" is OK, but focuses mainly on AcroForms.

    WindJack Solutions have a service on subscription for the scripts and solutions tohttp://www.pdfscripting.com. There a lot of AcroForm script which can be modified according to LC designer and a growing library of LC Designer solutions.

    I hope this helps,

    Niall

  • Helps with the rv180w and the Shrew soft vpn

    Hi, I'm trying to establish a vpn connection by using soft shrew for the cisco rv180w router.

    I watch and read everything I could find, but the connection drops during the opening of the tunnel.

    There were a few tuttorial here in the forum, but the links are down.

    I want Edifier is to establish communication and to be able to access my domain on the network.

    Any help with the settings would be greatly apeciated. I am new to vpn.

    Thanks in advance.

    Federico,

    Try to access the following link. It has good instructions for a similar model. The main difference is that the SA500 has double-WAN and the RV180W does not work.

    https://supportforums.Cisco.com/docs/doc-9378#comment-7216

    Here's another tutorial for the RVS4000 that can help:

    https://supportforums.Cisco.com/docs/doc-18443

    Check out the last post in the following thread, which received instructions for the RV220W (should be exactly the same as RV180W)

    https://supportforums.Cisco.com/message/4165652#4165652

    -Marty

  • Help with Hard Drive and registry

    Hey, it kinda turns out to be a long and difficult history, but I recently had a small problem that spread to a problem much bigger (and catastrophic).

    I had a problem with freezxing on my laptop (HP Pavilion Dv5 with the 64-bit version of Vista I think). I've tried a few things m ais it froze just in case. Finally I found someone who said they ran a registry cleaning program and that did the trick. I tried and I had no more freezing. Unfortunately, I connected an external hard drive and all hell broke loose. It froze and I turned off the laptop. I have it turned on and was greeted with this message:

    STOP: c000021a {Fatal System Error}
    The Session Manager failed to create protected prefixes system process terminate
    d unexpectedly with a status of 0x000003a (0x00000000 0x00000000).
    The system has been shut down.
    

    I tried to boot in safe mode and found:

    STOP: c0000218 {Registry File Failure}
    The registry cannot load the hive (file):\SystemRoot\system32\config\SOFTWARE or its log alternative.
    It is corrupt, absent, or not writable.
    

    Then, she went and made the collection of data, and that was all. After that, I tried the boot recovery option and that never worked. I searched internet and found a few people with similar, but never the same questions. Someone, somewhere, says something about execution of system restore after having access to the menu by pressing F8 at startup. I tried. It did not work. I pressed F8 at startup upward and chose the first option. It has established a list of things to try. System Restore (and other options such as checking memory and bring up the command prompt) did not work because the C drive has been used. Large. I tried to use the disks that came with my laptop and I never once found while they were actually useful because I could never the laptop to run.

    Now, I wanted to try to use the command prompt. Never really had a chance. Now, when I start the computer I'm greeted by the inspiring message of hard drive are not.

    Sweet. Now, I'm a little stuck on what to try. I tried to reset the BIOS defaults and nada. I have no idea what it must try now and would love to help anyone.

    I would be very happy and I thank you for your time.

    It depends on how much you have to pay to get the new hard drive installed and running. Get a quote for a computer shop trust you.  So I think that if the computer has been done what you wanted to do before he went wrong.  If it was enough for you and the price of the repair is not too high (maybe less), I would. If the price is more than $ 200, I would start thinking about applying your money towards a new laptop computer, but that cheaper isn't always the best deal.  Do some research and try some mobile friends to see if it is fast enough for you and you enjoy the feeling. Stop in some stores that display laptops and taste. Laptops with dedicated video card memory will do better with the games.  If the games are starting to become important to you, consider a desktop computer instead of a laptop where you can buy a killer video card. I like the new Ivy bridge to intel for laptops so look for it.  This is the new family of Intel processors. I7 Ivy bridge is the finest, then the i5, then the i3.  You really need to sit with someone who knows computers and discuss your needs for the future and how you want to use your computer.

  • How to get help with Add ons and extensions that stop working

    I have saved passwords and it has stopped working. It's so hard to get help with Moxilla

    rosemarybales said

    I still don't know why the extension button passwords saved with the key icon has stopped working.

    This button displays the saved passwords in Firefox's built-in password manager, is no separate passwords that record you in Dashlane. Can you save passwords in both places? (Well, I guess you do.)

    I have a guess on why it has stopped working. Firefox 40 has some changes to how extensions can work with the user interface, so quite a few extensions that have been more than one year must be updated for Firefox 40. It has been updated on January 10, 2012.

    Anyway, the way of 'long' to display the passwords saved in Firefox is through the Options page, the Security Panel, the saved passwords button.

  • Photosmart: Called tech support for help with my printer and got a sales pitch

    I called HP customer service today to get help with my wireless printer because it won't print wireless. What I got was a sales pitch to buy a value of $450 of virus protection! So very disappointed!

    Hello

    Thank you for using the HP forum.

    How can we help with your wireless?

    Have you tried the following:

    Please download and run the HP Print and Scan Doctor (PSDR) tool to diagnose and solve your problem

    http://h20180.www2.HP.com/apps/NAV?h_pagetype=s-926 & h_lang = on & h_client = s-h-E016-1 & h_keyword = DG - PDU

    Hope that helps.

  • Need help with the formatting and reinstalling windows

    Hi, I have a Compaq Presario C700 p/n GR598EA #ABU I got to work about 3 years ago.

    Recently, it does not load windows, even in safe mode and I can't get back either.

    I used a disc to boot from linux to access and backup of all my important files and now I want to reformat the hard drive, resintall windows and start over (or try something else which will fix it)

    The laptop has been pre-installed with Windows Vista and HP stuff had already installed on it.  I don't have a Windows disc or discs of driver with the laptop.

    How can I format and reinstall windows and drivers, if I don't have records?

    Help, please.

    Thank you.

    Hello:

    You can order a Vista recovery disk set for your laptop if they are still available. See the instructions below:

    http://support.HP.com/US-en/document/c00810334=

    If you live not in the US or the Canada, you can contact HP Support worldwide for the country you live and ask recovery disks command to your laptop

    The link to the assistance of HP WW is below:

    http://welcome.HP.com/country/us/en/wwcontact_us.html

    Paul

  • Help with conditional display and Validation

    Version 4.1.1.00.23

    Hello

    I'm having a difficult time with a conditional display and validation, I hope someone can help with.

    Requirements:

    When (Datepicker) Start Date or the end Date (Datepicker) change can display the reason for change (select list) and change Description (Textbox)
    If the page is saved without entering a reason change display an error message of validation that the reason for the change cannot be empty (NULL)

    What I tried

    Create a dynamic Action on the Start Date

    Event: Change

    Selection type: Article (s)

    Items (s): P51_START_DATE

    Condition: no

    Real Action Section:

    Action: Show

    Fire on Page load: Checked

    Display all the elements of the page on the same line: NO.

    Section of the elements concerned:

    Selection type: Article (s)

    Product (s): P51_CHANGE_REASON, P51_CHANGE_DESC

    I also created a dynamic Action with similar settings for the P51_END_DATE.

    I created a Validation for the P51_CHANGE_REASON as a function return error text:

    DECLARE
        v_start_date    work_items.start_date%TYPE;
        v_end_date      work_items.end_date%TYPE;
    BEGIN
        SELECT start_date
              ,end_date
        INTO   v_start_date
              ,v_end_date
        FROM   work_items
        WHERE  work_items_id = :P51_WORK_ITEMS_ID;
        IF ( (v_start_date != TO_DATE(:P51_START_DATE,'DD-MON-YYYY') OR v_end_date != TO_DATE(:P51_END_DATE,'DD-MON-YYYY') ) AND
              :P51_CHANGE_REASON IS NULL ) THEN
            RETURN 'Change Reason must have a value';
        END IF;
    END;
    
    
    

    The question

    I tried to create another dynamic Action to hide the P51_CHANGE_REASON and P51_CHANGE_DESC fields during the loading of the page, but when the date fields are changed and the validation is fired the P51_CHANGE_REASON and the P51_CHANGE_DESC are hidden again.

    There are two buttons to send the page: 'SAVE' will submit the page and stay on the page and 'SAVE_CHANGES' will present the page and creates a branch to the previous page (which is a relationship with the EDIT buttons to change recording).

    I can not loading the dynamic Action page for fires DO NOT when validation is triggered.

    I hope it is clear and if not what information can I provide?

    Thank you

    Joe

    Which the condition is failing and what browser? I tested it in Firefox and it works as it should. Can you confirm that?

  • Help with sum multiline and formatting «,»

    Hey guys, I need help with a question that I am struggling to solve...

    I have a multiline field in which I paste information from an excel spreadsheet. This information is in a format 1.234,56.

    I was able to have the numbers stuck on the ground in another area, by removing the ',': something like this:

    var withcoma = this.getField("Input_1").value; This is my multi-line field used to paste data from excel

    nocoma = withcoma.replace(/\,/g, ".");

    the var values = nocoma.split("\r");

    var total = 0;

    for (var i in values) total += Number(values[i]);

    this.getField("Total").value = total;


    The point is that I have to be able to change the numbers that I have to format to the format 1,234.56 1.234,56 if I choose to use a different currency than my original and also wear numbers in the field "Total" correctly updated.

    Could someone point me in the right direction?

    Thank you very much!!!

    The solution was to add another line of code to remove the periods used so that thousands separators in numbers.

  • Newbie request for assistance with several drag-and-drop &amp; multiple targets

    I know that this question has been asked a million times, but I get always very well the solution.  I know that the solution called for me the use of tables in a part of my code, but I have problems understanding how to implement it.  I use Flash CS 5.5 with AS3.

    I have a flash drag-and-drop file which is divided into 4 distinct zones on the stage.  On each box, there are 7 places, for 7 different "puzzle pieces".  The first two spaces on each quadrant have very a very specific order for the correct puzzle pieces, while the 5 additional places on each quadrant also have specific parts, but the order is not important.  I have included my code below for reference (note that I have not all instances, finished yet).

    Basically, in code that's been created, the following bodies have specific targets with specific command:

    D1_1_mc, D1_2_mc, D1_1_mc, D2_2_mc, D3_1_mc, D3_2_mc, D4_1_mc and D4_2_mc.

    All other instances, such as D1_3_mc, D2_3_mc, D2_4_mc, etc. have specific quadrants on which they need to fall, but what about the last 5 'spaces' in each quadrant, the order does not matter.  I know that I can continue to do what I do, but I would have preferred that the last 5 pieces on each quandrant do not have to be in a specific order.

    You can provide any assistance is greatly appreciated!

    var startX:Number;

    var startY: number;

    var counter: Number = 0;

    D1_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D1_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D1_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D1_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D1_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D1_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D2_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D2_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D2_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D2_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D2_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D2_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D2_4_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D2_4_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D3_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D3_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D3_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D3_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D3_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D3_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D4_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D4_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D4_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D4_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D4_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D4_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    D4_4_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    D4_4_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    function pickUp(event:MouseEvent):void {}

    event.target.startDrag (true);

    reply_txt. Text = "";

    event.target.parent.addChild (event.target);

    startX = event.target.x;

    startY = event.target.y;

    }

    function dropIt(event:MouseEvent):void {}

    event.target.stopDrag ();

    var myTargetName:String = "target_" + event.target.name;

    var myTarget:DisplayObject = getChildByName (myTargetName);

    If (event.target.dropTarget! = null & & event.target.dropTarget.parent == myTarget) {}

    reply_txt. Text = "Good Job!"

    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropIt);

    event.target.buttonMode = false;

    Event.Target.x = myTarget.x;

    Event.Target.y = myTarget.y;

    counter ++;

    } else {}

    reply_txt. Text = "Try Again!";

    Event.Target.x = startX;

    Event.Target.y = startY;

    }

    if(Counter == 5) {}

    reply_txt. Text = "congratulations, you did!"

    }

    }

    D1_1_mc.buttonMode = true;

    D1_2_mc.buttonMode = true;

    D1_3_mc.buttonMode = true;

    D2_1_mc.buttonMode = true;

    D2_2_mc.buttonMode = true;

    D2_3_mc.buttonMode = true;

    D2_4_mc.buttonMode = true;

    D3_1_mc.buttonMode = true;

    D3_2_mc.buttonMode = true;

    D3_2_mc.buttonMode = true;

    D4_1_mc.buttonMode = true;

    D4_2_mc.buttonMode = true;

    D4_3_mc.buttonMode = true;

    D4_4_mc.buttonMode = true;

    Since it seems to afew possible gaps in the code you showed, and what I offer myself in response to your questions, I spent a little time get a working model of what I guess you just using the three targets and the fall of four objects.  If you want, I can make the file available for you, but for now, here's the code that works...

    var startX:Number;
    var startY: number;
    var counter: Number = 0;

    target_D2_1_mc.allowed = new Array (D2_1_mc);
    target_D2_2_mc.allowed = new Array (D2_2_mc);
    target_D2_3_mc.allowed = new Array (D2_3_mc, D2_4_mc);

    D2_1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    D2_1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);
    D2_2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    D2_2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);
    D2_3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    D2_3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);
    D2_4_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    D2_4_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    function pickUp(event:MouseEvent):void {}

    reply_txt. Text = "Good Luck."
    event.target.startDrag (true);
    event.target.parent.addChild (event.target);
    startX = event.target.x;
    startY = event.target.y;
    }

    function dropIt(event:MouseEvent):void {}

    event.target.stopDrag ();

    If (event.target.dropTarget! = null & MovieClip (event.target.dropTarget.parent).allowed.indexOf (event.target) >-1) {}
    reply_txt. Text = "Good Job!"
    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, Pick-up);
    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropIt);
    event.target.buttonMode = false;
    Event.Target.x = MovieClip (event.target.dropTarget.parent) .x;
    Event.Target.y = there MovieClip (event.target.dropTarget.parent);
    counter ++;
    } else {}
    reply_txt. Text = "Try Again!";
    Event.Target.x = startX;
    Event.Target.y = startY;
    }

    if(Counter == 5) {}
    reply_txt. Text = "congratulations, you did!"
    }
    }

    D2_1_mc.buttonMode = true;
    D2_2_mc.buttonMode = true;
    D2_3_mc.buttonMode = true;
    D2_4_mc.buttonMode = true;

  • Need help with network inside and outside Transmittion script

    Hi, I have a problem in my script. I would get Vm net.received.average and net.transmitted.average. Somewhere, it displays the empty output for me, can I have a sample of script on obtaining transmittion of network for 7 days

    My script:

    $report = @ (get - Vm = $vms). where {$_.} PowerState - eq "Receptor"} $lastWeek = (get-date). AddDays(-7) foreach ($vm in $vms) {$vmNet = "" |} Select VmName, NetworkReceive, NetworkTransmit $statReceive is Get-Stat-entity ($vm) - start $lastWeek - finishing (Get-Date) - MaxSamples 1 - net.received.average stat. Group-object - property Instance $statTrans = Get-Stat-entity ($vm) - start $lastWeek - finishing (Get-Date) - MaxSamples 1 - net.transmitted.average stat. {Group-object - property Forum $vmNet.VmName = $vm.name $vmNet.NetworkReceive = "{0: F2}" f $statReceive.value $vmNet.NetworkTransmit = "{0: F2}" f $statTrans.value $report += $vmNet} $report | Select VmName, NetworkReceive, NetworkTransmit | Export-csv "c:\q33.csv".
    Thank you

    Both are related to the use of aggregation running on your vCenter

    Historical data interval 4 are grouped once a day, and on your vCenter this SQL task seems to be planned at 08:00.

    That is why the time stamp.

    Statistical data are aggregated to one historical interval to another.

    Since ask us the historical interval 4 (with the IntervalMins parameter), the aggregagtion to this historical interval is not yet made.

    This is why the last day 2 are not present in the report.

    You can play with the - Start and - finishing settings to have a period of 7 days which is at least two days yet at the time.

    $report = @()
    $metrics = "net.received.average","net.transmitted.average"
    $vms = Get-Vm | where {$_.PowerState -eq "PoweredOn"}
    $start = (get-date).AddDays(-7)
    $finish = $start.AddDays(7)
    
    Get-Stat -IntervalMins 1440 -Entity ($vms) -start $start -finish $finish -stat $metrics -Instance "" | `  Group-Object -Property Timestamp,EntityId | %{
        $vmNet = ""| Select VmName, Timestamp, NetworkReceive, NetworkTransmit
        $vmNet.VmName = $_.Group[0].Entity.Name
        $vmNet.Timestamp = $_.Group[0].Timestamp
        $vmNet.NetworkReceive = "{0:f2}" -f (($_.Group | where {$_.MetricId -eq "net.received.average"} | Measure-Object -Property Value -Sum).Sum)
        $vmNet.NetworkTransmit = "{0:f2}" -f (($_.Group | where {$_.MetricId -eq "net.transmitted.average"} | Measure-Object -Property Value -Sum).Sum)
        $report += $vmNet}
    $report | Export-csv "c:\q33.csv" -NoTypeInformation -UseCulture
    
  • Help with GREP search and replace

    I've never used grep before and I'm stumped.  I have a document that lists the times for different classes.  Times are variously listed as 9-10, 9-10, 9-10 or 9-10, to get examples.  The problem is that there may be no space or a space on the left or the right of the hyphen.  I want it all the time as 10:30 - 11:30, for example.  In other words, the link must have a space on each side of it.  I think that this could be accomplished with GREP search and replace, but I don't understand the syntax well enough to make it work.

    Can someone tell me how to write the search and replace expressions?  (Of course the real time could be any hours).

    Thank you!

    It is tempting to add spaces of * all numbers separated by a dash. If you don't know all time have some minutes, then it is safer to use this:

    (?<=:\d\d)>

    .. Replace with space hyphen space.

    He seeks the "settler, any digit, any digit" (which is * found * not * included *), followed by 'optional of a space, a hyphen, optional space' and must be followed by 'any number' (again, not counting this one). Since the figures before and after are * found * not * included *-which is due to the (? xxx) syntax - all that needs to be replaced is the dashboard itself. Making the space before and after the optional dashboard (using a single "?" immediately after each), no matter if it * is * a space or not, all the combinations will be found and replaced.

Maybe you are looking for