Call outside function with same name in a package

I created a function as follows:
create or replace function f1 return number
is
begin
return 1;
end;
This f1 is to be called in a package created below.
Then I create a package with a function in it, as follows:
create or replace package pack1 as
function f1 return number;
end;
Now I define the package body as follows:
create or replace package body pack1 as
function f1 return number as
-- I am trying to call the first function f1 defined above here
How do I resolve the name issues here?
In other words, I want to call a function with the same signature outside a package.
Thanks for your kind help.

Hi,
Welcome to the forum!
Do you have a good reason for using the same name?
Refer to the stand-alone function with the owner name, even though it's your current schema.
That is, even if the package and the stand-alone function are owned by scott, in the package, say
x := scott.f1;

Similar Messages

  • Files with same name in different packages

    I have a file with the same name defined in two different packages.
    When I generate the javadoc, I get an error saying that
    Class com.eg.toolkit.Email already defined in com.eg.common.Email.java
    Does javadoc expect all files to be of different names acroos packages?
    Thanks
    Chintu

    You can use the same class name in different packages.
    The Java API does that (java.awt.List, java.util.List).
    This is odd. What version of javadoc are you using,
    and what command are you passing in, with what classpath setting?
    -Doug Kramer
    javadoc team

  • Mail not delivered to outside recipients with same name on server - Bug?

    Hi,
    I'm testing the mail server before telling my boss it's OK to move from our old sun "appliance". I have set up all users names and passords on our new mac mini the same as they are on that old server.
    The server will be thisdomain,com and the recipients will be thatdomain.com.
    I am off site and testing from home using mail.thisdomain,com as my outgoing server. I have all spam controls off for testing. In this example I am scott @ thisdomain.com trying to send an email to carol @ thatdomain.com.
    What's happening is that carol @ thatdomain.com is not getting the message. instead it is being dlivered to the carol on the server at carol @ thisdomain.com
    Does anybody know why this is happening and how to fix it? The log even says "orig_to=<carol @ thatdomain.com>" Here is the complete session:
    Sep 24 13:18:08 thisdomain.com postfix/postscreen[33490]: CONNECT from [50.174.118.164]:50680 to [173.164.166.20]:25
    Sep 24 13:18:14 thisdomain.com postfix/postscreen[33490]: PASS OLD [50.174.118.164]:50680
    Sep 24 13:18:14 thisdomain.com postfix/smtpd[33493]: connect from c-50-174-118-164.hsd1.ca.comcast.net[50.174.118.164]
    Sep 24 13:18:15 thisdomain.com postfix/smtpd[33493]: 9069B18C6CA: client=c-50-174-118-164.hsd1.ca.comcast.net[50.174.118.164], sasl_method=CRAM-MD5, sasl_username=scott
    Sep 24 13:18:15 thisdomain.com postfix/cleanup[33502]: sacl_check: mbr_user_name_to_uuid([email protected]) failed: No such file or directory
    Sep 24 13:18:15 thisdomain.com postfix/cleanup[33502]: 9069B18C6CA: message-id=<CE674190.1E707%[email protected]>
    Sep 24 13:18:15 thisdomain.com postfix/qmgr[33388]: 9069B18C6CA: from=<[email protected]>, size=723, nrcpt=1 (queue active)
    Sep 24 13:18:15 thisdomain.com postfix/pipe[33504]: 9069B18C6CA: to=<[email protected]>, orig_to=<[email protected]>, relay=dovecot, delay=0.59, delays=0.43/0.03/0/0.14, dsn=2.0.0, status=sent (delivered via dovecot service)
    Sep 24 13:18:15 thisdomain.com postfix/qmgr[33388]: 9069B18C6CA: removed
    Sep 24 13:18:21 thisdomain.com postfix/smtpd[33493]: disconnect from c-50-174-118-164.hsd1.ca.comcast.net[50.174.118.164]
    I also worry about the line:
    sacl_check: mbr_user_name_to_uuid(carol @ thisdomain.com) failed: No such file or directory
    This is driving me batty, so any help appreciated.
    Scott

    This is supposed to be the server for  thisdomain,com  and I have not entered anything in for  thatdomain.com. So that is really puzzling. Is there anything you can help me with in the postconf below?  Thanks!
    postconf -n
    biff = no
    command_directory = /usr/sbin
    config_directory = /Library/Server/Mail/Config/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /Library/Server/Mail/Data/mta
    debug_peer_level = 2
    debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5
    dovecot_destination_recipient_limit = 1
    html_directory = /usr/share/doc/postfix/html
    imap_submit_cred_file = /Library/Server/Mail/Config/postfix/submit.cred
    inet_interfaces = loopback-only
    inet_protocols = all
    mail_owner = _postfix
    mailbox_size_limit = 0
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    message_size_limit = 10485760
    mydomain_fallback = localhost
    mynetworks = 127.0.0.0/8, [::1]/128
    newaliases_path = /usr/bin/newaliases
    queue_directory = /Library/Server/Mail/Data/spool
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = _postdrop
    smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
    smtpd_tls_ciphers = medium
    smtpd_tls_exclude_ciphers = SSLv2, aNULL, ADH, eNULL
    tls_random_source = dev:/dev/urandom
    unknown_local_recipient_reject_code = 550
    use_sacl_cache = yes

  • Calling Standalone Proc. with same name/parameter of Private Proc.

    I have a procedure defined at Schema level
    CREATE OR REPLACE PROCEDURE abc AS
    BEGIN
         DBMS_OUTPUT.PUT_LINE ('Outside');
    END;
    I have a package named pkgtst. Specification is like following:
    CREATE OR REPLACE PACKAGE pkgtst AS
         PROCEDURE bcd;
    END;
    and body...
    CREATE OR REPLACE PACKAGE BODY pkgtst AS
         PROCEDURE bcd AS
         BEGIN
              abc; -- Here I want to call Schema level Procedure abc instead of private procedure.
         END;
         PROCEDURE abc AS
         BEGIN
              DBMS_OUTPUT.PUT_LINE ('Inside');
         END;
    END pkgtst;
    exec pkgtst.bcd;
    Output is : Inside
    how to modify this to print the output : Outside
    Note: I don't want to use Schema qualification inside package..
    Plz hlp...

    Suman Rana wrote:
    I have a procedure defined at Schema level
    CREATE OR REPLACE PROCEDURE abc AS
    BEGIN
         DBMS_OUTPUT.PUT_LINE ('Outside');
    END;
    I have a package named pkgtst. Specification is like following:
    CREATE OR REPLACE PACKAGE pkgtst AS
         PROCEDURE bcd;
    END;
    and body...
    CREATE OR REPLACE PACKAGE BODY pkgtst AS
         PROCEDURE bcd AS
         BEGIN
              abc; -- Here I want to call Schema level Procedure abc instead of private procedure.
         END;
         PROCEDURE abc AS
         BEGIN
              DBMS_OUTPUT.PUT_LINE ('Inside');
         END;
    END pkgtst;
    exec pkgtst.bcd;
    Output is : Inside
    how to modify this to print the output : Outside
    Note: I don't want to use Schema qualification inside package..
    Plz hlp...Why make life difficult for yourself? Just call them different names.

  • Import Library Error two functions with same name on different namespaces

    Im trying impor a library developed by me. In this library have two functions ShowMenu. First function be inside into a class and its declared as
    void __fastcall TTrayicon:howMenu(). The second function has declared as extern "C" __declspec(dllexport) ShowMenu(int x, int y).
    When i use de assistant to import this library i select the library and its header file. But in the next step the assistant show to me the first function.
    Anyone explain what's happen?

    I'm not sure what kind of answer you're looking for. LabVIEW's Import Library wizard does not always properly handle accessing functions in standard C++ DLLs. See this for more info.

  • Use Class with Same Name as Default Package Class

    I am upgrading a project to Flash CC and need to use the old JSON class in com.adobe.serialization.json. When I compile, I get an error, "1061: Call to a possibly undefined method decode through a reference with static type Class" because it probably is trying to use the newer default package JSON class rather than the one in com.adobe. I have the import statement in my class, "import com.adobe.serialization.json.JSON", but I guess its checking against the default package and giving me a compile error when I call "var parts:Object = JSON.decode(jsonData);"

    Thanks. I changed my publish settings to fp 10 which fixed it for now. I was hoping there might be a more elegant solution as the custom class is actually an Adobe class that would be better to not to have to rename.

  • Passing multiple URL parameters with same name

    Hi,
    I have a question which is not entirely related to Java. But although its related HTTP calls, so I thought I might get some ideas here.
    Background:
    I am making HTTP URL call from SAP ABAP code. Its pretty much similar to Java (creating URL connection, setting HTTP headers, connecting, receiving response and everything)
    For example,
    http://service_server:8080/a7/extension.services.SearchRequirements.a7x?RequestStatus=CR&RequestStatus=RR
    Now, this service_server runs a query to database where it uses both these values of "RequestStatus" to form 'OR' condition for a field.
    Issue:
    When I run this URL from browser, it shows XML response containing results for both values. In short, this is the ideal response.
    (I am using getParameterValues(string) at service_server to read multiple values for same parameter)
    But when I see response in SAP system, I see that it is returning data for only one value of 'RequestStatus'.
    I checked the logs of service_server, and I see that it has received only one parameter, not two.
    Question:
    It seems like SAP systems web server is truncating both parameters with same name and passing just one of them to outside server(??)
    Is there any configuration at Web Server side or any HTTP headers to be set so as to avoid this?
    Can anybody suggest something on this?

    I managed to resolve this issue by using HTTP 'Post' method to send the data.
    CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
        EXPORTING
          URL                = L_URL
        IMPORTING
          CLIENT             = L_HTTP_CLIENT
        EXCEPTIONS
          ARGUMENT_NOT_FOUND = 1
          PLUGIN_NOT_ACTIVE  = 2
          INTERNAL_ERROR     = 3
          OTHERS             = 4 .
    "STEP-2 :  AUTHENTICATE HTTP CLIENT
    CALL METHOD L_HTTP_CLIENT->AUTHENTICATE
      EXPORTING
        USERNAME             = 'name'
        PASSWORD             = 'password'.
    "STEP-3 :  SET HTTP HEADERS
    CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
          EXPORTING NAME  = 'Accept'
                    VALUE = 'text/xml'.
    CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
        EXPORTING NAME  = '~request_method'
                   VALUE = 'POST' .
    CALL METHOD L_HTTP_CLIENT->REQUEST->SET_CONTENT_TYPE
        EXPORTING CONTENT_TYPE  = 'application/x-www-form-urlencoded' .
    "SETTING REQUEST DATA FOR 'POST' METHOD
    IF L_PARAMS_STRING IS NOT INITIAL.
       CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
         EXPORTING
             TEXT   = L_PARAMS_STRING
         IMPORTING
               BUFFER = L_PARAMS_XSTRING
         EXCEPTIONS
            FAILED = 1
            OTHERS = 2.
    CALL METHOD L_HTTP_CLIENT->REQUEST->SET_DATA
        EXPORTING DATA  = L_PARAMS_XSTRING  .
    ENDIF.
    "STEP-4 :  SEND HTTP REQUEST
      CALL METHOD L_HTTP_CLIENT->SEND
        EXCEPTIONS
          HTTP_COMMUNICATION_FAILURE = 1
          HTTP_INVALID_STATE         = 2.
    "STEP-5 :  GET HTTP RESPONSE
        CALL METHOD L_HTTP_CLIENT->RECEIVE
          EXCEPTIONS
            HTTP_COMMUNICATION_FAILURE = 1
            HTTP_INVALID_STATE         = 2
            HTTP_PROCESSING_FAILED     = 3.
    "STEP-6 :  READ RESPONSE DATA
    CALL METHOD L_HTTP_CLIENT->RESPONSE->GET_CDATA
            RECEIVING DATA = L_RESULT .
    "STEP-7 : CLOSE CONNECTION
    CALL METHOD L_HTTP_CLIENT->CLOSE
      EXCEPTIONS
        HTTP_INVALID_STATE = 1
        OTHERS             = 2   .
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Two methods with same name but different return type?

    Can I have two methods with same name but different return type in Java? I used to do this in C++ (method overloading or function overloading)
    Here is my code:
    import java.io.*;
    public class Test{
    public static void main(String ar[]){
    try{          
    //I give an invalid file name to throw IO error.
    File file = new File("c:/invalid file name becasue of spaces");
    FileWriter writer = new FileWriter(file ,true);
    writer.write("Test");
    writer.close();     
    } catch (IOException IOe){
         System.out.println("Failure");
    //call first method - displays stack trace on screen
         showerr(NPe);
    //call second method - returns stack trace as string
            String msg = showerr(NPe);
            System.out.println(msg);
    } // end of main
    public static void showerr(Exception e){
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         e.printStackTrace(pw);
         try{
         pw.close();
         sw.close();
         catch (IOException IOe){
         IOe.printStackTrace();     
         String stackTrace = sw.toString();
         System.out.println("Null Ptr\n" +  stackTrace );
    }//end of first showerr
    public static String showerr(Exception e){
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         e.printStackTrace(pw);
         try{
         pw.close();
         sw.close();
         catch (IOException IOe){
         IOe.printStackTrace();     
         return sw.toString();
    }//end of second showerr
    } // end of class
    [\code]

    Overloading is when you have multiple methods that have the same name and the same return type but take different parameters. See example
    public class Overloader {
         public String buildError(Exception e){
              java.util.Date now = new java.util.Date() ;
              java.text.DateFormat format = java.text.DateFormat.getInstance() ;
              StringBuffer buffer = new StringBuffer() ;
              buffer.append(format.format(now))
                   .append( " : " )
                   .append( e.getClass().getName() )
                   .append( " : " )
                   .append( e.getMessage() ) ;
              return buffer.toString() ;
         public String buildError(String msg){
              java.util.Date now = new java.util.Date() ;
              java.text.DateFormat format = java.text.DateFormat.getInstance() ;
              StringBuffer buffer = new StringBuffer() ;
              buffer.append(format.format(now))
                   .append( " : " )
                   .append( msg ) ;
              return buffer.toString() ;
         public String buildErrors(int errCount){
              java.util.Date now = new java.util.Date() ;
              java.text.DateFormat format = java.text.DateFormat.getInstance() ;
              StringBuffer buffer = new StringBuffer() ;
              buffer.append(format.format(now))
                   .append( " : " )
                   .append( "There have been " )
                   .append( errCount )
                   .append( " errors encountered.")  ;
              return buffer.toString() ;
    }Make sense ???
    Regards,

  • How to call a function with pl/sql

    How does one call a function with pl/sql that uses a function?

    Hi,
    How does one call a function with pl/sql that uses a
    function?I'm not sure what you mean.
    In PL/SQL function can be used just about anywhere where an expression (with the same data type that the function returns). Arpit gave a very common example.
    Here's another example, where all the functions take a single NUMBER argument and return a NUMBER, so they can all be used in places where NUMBERs are used:
    IF  fun_a (fun_b (0)) < fun_c (1)
    THEN
        UPDATE  table_x
        SET     column_y = fun_d (2)
        WHERE   column_z = fun_e (ROUND ((fun_f (3), fun_g (4)));You call a function simply by using its name, followed by its argument list, if any.
    If the function is in a package, you must call it with the package name, like "pk_foo.bar (1, 2, 3)", unless the call comes from within the same package.
    If the function is owned by someone else, you must give the owner name, like "scott.bar (SYSDATE)" or "scott.pk_foo.bar (1, 2, 3)". You can create synonyms to avoid having to name the owner.

  • Can I run 2 different domains with same name but on 2 different machines?

    I am trying to setup 2 domains with same name (sharedcds1) on 2 different machines (Machine1 and Machine2).
              When I start the weblogic managed server 1 (sharedcds1managedserver1) on Machine2, it throws an error saying it has some conflicts with the managed server 1 running on Machine1. How did the managed server of one machine know about the other server. Can I run 2 different domains with same name but on 2 different machines?
              Here is the error in the log -
              <Jun 14, 2005 10:53:29 AM EDT> <Error> <Cluster> <BEA-000123> <Conflict start: You tried to bind an
              object under the name weblogic.transaction.coordinators.sharedcds1managedserver1 in the JNDI tree.
              The object from 4596206652609838848S:130.170.61.153:[9505,9505,-1,-1,9505,-1,-1,0,0]:sharedcds1:s
              haredcds1managedserver1 is non-clusterable, and you have tried to bind more than once from two or m
              ore servers. Such objects can only be deployed from one server.>
              <Jun 14, 2005 10:53:29 AM EDT> <Error> <Cluster> <BEA-000123> <Conflict start: You tried to bind an
              object under the name weblogic.transaction.coordinators.sharedcds1managedserver1 in the JNDI tree.
              The object from 8842351474821025197S:130.170.61.154:[9505,9505,-1,-1,9505,-1,-1,0,0]:sharedcds1:s
              haredcds1managedserver1 is non-clusterable, and you have tried to bind more than once from two or m
              ore servers. Such objects can only be deployed from one server.>
              Thanks
              Satish

    Yes you can. Make sure that domains configured to use different multicast address. WLS uses multicast for communications between nodes in domain.
              although your configuration will work, you could have troubles if you going to execute inter-domain calls between domains/servers with the same names.

  • Automator and applescript to copy new files in a folder with same name as parent folder

    I have an iMac with a pictures folder (Finder folder) containing several subfolders with pictures. As per now, all these subfolders are imported into an iPhoto library (and the structure of the Finder pictures folder is thus maintained: The iPhoto events are named the same as the Finder subfolder). I.e. I have not created any albums in iPhoto.
    I have also set up a workflow, where new iPhone photos are automatically being synced to specified Finder folders within the iMac pictures folder. So what I want to do is to make a workflow to import potential new photos from week to week into the existing iPhoto structure. I know iPhoto has this Autoimport folder, so this one is unpacked and "mapped". So, this is what I´m hoping to do:
    Automator (iCal - want to do this on a weekly basis):
    - Get specified Finder items -- set to target folder = iMac pictures folder
    - Get folder content (with subfolders)
    - Filter Finder items
         - Items from the last 7 days (which then would be any new files created last week)
    - Applescript/shell script loop(?)
         - Get folder name for each file´s (from previous step) parent folder
         - Create new folder with same name as the file´s parent folder (if not already existing) under the iPhoto Autoimport folder
         - Copy the given file into the folder from above
    - Run iPhoto application (Automator task), which then should just auto import the new photos according to the Finder folder structure
    Whith the workflow above, I aim to maintain the existing iPhoto structure, and just import new photos into the existing structure. Creating folder names under the Autoimport, similar as the existing Finder folder names / iPhoto events should make it possible to have the new files imported under the existing event, right?

    Anyone?
    I have now switched to Aperture (from iPhoto) due to Aperture´s capability to handle Finder folder structure, and due to the possibility of having the pictures within Aperture as referenced files to the pictures within the Finder folders (i.e. possibility to delete pictures from both library and Finder folder at the same time).
    So I have a superior Finder folder called "Album". Within "Album" I have several subfolders (sub albums) containing pictures. The "Album" folder with subfolders are imported into Aperture as "Projects and albums", and the pictures are uploaded within the Aperture structure as referenced files. So for now the Aperture structure is more or less a direct mirror of the Finder folder structure, whereas "Album" is the project.
    And this is my current workflow in Automator, but I´m searching help with my Applescript:
    - Get specified Finder items (target folder = the superior Finder folder "Album")
    - Get Folder content
    - Filter Finder items (to look for potential new files to import into Aperture)
         - Kind is not folder
         - Date created last X days
    The output files from this task enters an Applescript
    on run {input, parameters}
           repeat with f in input (**Loop**)
                   tell application "Finder"
                          set fileName to name of (f)
                          set parentFolder to name of container of (f)
                          tell application "Aperture"
                                 tell library 1
                                        tell project "Album"
                                               if (exists album parentFolder) then
                                                 ** I then would like to check if fileName already exist within the existing album**
                                                 ** If not existing, I would like to import file f into the existing album as a referenced file**              
                                               else if not (exists album parentFolder) then
                                                       make new album with properties {name:parentFolder}
                                                ** I then would like to import file f into the new album as a referenced file**
                                               end if
                                        end tell
                                 end tell
                          end tell
                   end tell
           end repeat
    end run

  • How to delete one existing file before uploading a file with same name?

    Hello everybody.
    I am uploading a file to Tomcat server. But, the problem is:
    i want to delete an existing file in the server, if i upload a fresh file with same name. In other words, "First check for the file with the same name in the server. If it exists, then delete existing file in the server and upload fresh one". If such file doesnot exist, then upload the file to server.
    I have given deleteonExit()
    but, for the first time when user is uploading, i want to check for the file with same name in the server.
    i am pasting the code here. please help:
    <!-- uploading the file -->
    <%
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength)
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    String contextRootPath = this.getServletContext().getRealPath("/");
    contextRootPath=contextRootPath.concat("uploaded");
    String file = new String(dataBytes);
    String saveFile = file.substring(file.indexOf("filename=\"") + 10);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
    // Create a directory; all ancestor directories must exist
    File outputFile = new File(contextRootPath, saveFile);
    var=outputFile.getPath();
    outputFile.createNewFile();
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex + 1,contentType.length());
    int pos;
    pos = file.indexOf("filename=\"");
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    FileOutputStream fileOut = new FileOutputStream(outputFile);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush();
    fileOut.close();
    outputFile.deleteOnExit();
    %>Please help. Thanks for taking time.
    Regards,
    Ashvini

    Thank you MartinHilpert,
    I have one more doubt,
    I am uploading the file to one folder called "uploaded". Before uploading a fresh file, i want to delete all existing files in that folder. IS that possible ?? If yes, can you please tell me how to do that ??
    Regards, Thanks for your time.
    Ashlvini

  • Script to find files with same names with in a folder and it sub folders.

    Looking for script to find files with same names with in a folder and it sub folders.

    Are you just looking to find if any two files underneath a folder have the same name?
    If you just want to know that a file named "whatever" exists in two folders, that's not too difficult, but you probably want to know the full path names.
    Here's one attempt:
    $ perl -MFile::Find -le 'find(\&w, "."); while (($n,$p)=each %file) {if(@{$p}>1){print join(" ",@{$p})}} sub w{push @{$file{$_}},$File::Find::name;}'That will print the pathnames on the same line of any files with the same name that appear anywhere underneath your current directory.
    It's a bit long for a "one-liner", but functional.
    Darren

  • How to call a function with event

    How do I call a function with a event inside it?
    function showTopTen(e:Event):void
        highscoreData = new XML(e.target.data);
        trace("Hiscores: " + highscoreData.item[0].name.text() + " - " + highscoreData.item[0].score.text())
    //showTopTen();  ..??

    Could you indicate why you would want to?
    The eventhandler you show here uses the properties of the event object passed as an argument.
    The way I read it it is data retrieved from a server so your app won't know anything about is untill it is loaded from the server which should be done with an URLLoader object which in it's turn calls your eventHandler when the Event.COMPLETE is triggered.
    something like:
    var urlLoader = new URLLoader();
    urlLoader.addEventListener( Event.COMPLETE, showTopTen )
    urlLoader.load( new URLRequest( "http:// etc." ) );
    to me would seem the proper method to have the function execute.

  • Bootdisk two images with same name n time

    hello,
    I have copied new image on 6509 , s2t54-adventerprisek9-mz.SPA.151-1.SY1.bin but when i do show bootdisk: it shows 2 images with same name .
    6509#show bootdisk:
    -#- --length-- -----date/time------ path
    1     33554432 Apr 19 2013 03:22:44 +00:00 sea_console.dat
    2     99168744 Apr 19 2013 03:28:42 +00:00 s2t54-adventerprisek9-mz.SPA.151-1.SY.bin
    3            0 Apr 19 2013 15:44:26 +00:00 call-home
    4         7209 Jun 11 2013 15:02:10 +00:00 startup-config.converted_vs-20130611-150121
    5         7126 Jun 11 2013 15:37:38 +00:00 startup-config.converted_vs-20130611-153738
    6     33554432 Apr 19 2013 03:46:50 +00:00 sea_log.dat
    7     28856320 Apr 19 2013 04:04:56 +00:00 c6500-fpd-pkg.151-1.SY.pkg
    8     99763688 Nov 19 2013 10:22:30 +00:00 s2t54-adventerprisek9-mz.SPA.151-1.SY1.bin
    9     99763688 Nov 19 2013 10:22:30 +00:00 s2t54-adventerprisek9-mz.SPA.151-1.SY1.bin
    729382912 bytes available (295174144 bytes used)

    Its kind of cosmetic issue. Verify the same using the command dir bootdisk:
    Thanks & Regards,
    Karthick Murugan
    CCIE#39285

Maybe you are looking for