Code to search for URL

Hi all im using code to load in text created in notepad which
is
loadVariablesNum("j:\\Uni
work\\Resume_Website\\loads\\SiteFiles\\TextFiles\\Linker.txt", 0);
but the finished product will have to be tranported to
another computer using probably a hard drive or DVD and obviously
when I transport the Flash file any .swf files or html published
will try to load the text file "Linker.txt" using the code above
but wont be succesfull because the .txt files' URL would have
changed.
How can I change the code so that-- loadVariablesNum --will
search for the Linker.txt where ever it is. Or is there alternative
to the method im using which would be more effective

Just to explain how to use relative paths. Say you have your
flash project in ABC directory. And in that same directory, you
have your Linker.txt. In Flash, ou would only need "Linker.txt".
However, if the Linker.txt file was within a folder (DEF) located
within ABC, you would use: "DEF/Linker.txt". Basically, you are
giving the path from the .swf. And if I recall correctly, you can
use /../ to look in the above direcory.

Similar Messages

  • The PAI Event Code to search for a record in Table Control

    Logic
    1. I have a position button and entry text field (search content) for a table control in my screen. Position button has the function code 'PBUT'.
    2. Content of table control will be in an internal table. The entry text field  is to be used for positioning.
    3. I enter the search (key) field in text field & Click the position button.
    4. The PAI event of button click (Module user_command) of that screen is as under.
    Case sy_ucomm.
    When 'PBUT'.
    What will be the code to bring the row as selected in table control, that I have to write here, for this case-value.
    Endcase.
    Regards,

    Hi Alok,
    Excuse me, couldn`t catch u yesterday. Ok i`ve the code which will set the cursor on the selected entry.
    Reward points if convinced.
    *& Report  Y131_TC_TEST                                                *
    REPORT  y131_tc_test NO STANDARD PAGE HEADING.
    TABLES: vbak.
    DATA : BEGIN OF str_tc,
           vbeln LIKE vbak-vbeln,
           erdat LIKE vbak-erdat,
           END OF str_tc,
           it_tc LIKE TABLE OF str_tc WITH HEADER LINE,
           loopc LIKE sy-loopc,
           flag,
           lin TYPE i.
    CONTROLS : my_tc TYPE TABLEVIEW USING SCREEN 9000.
    CALL SCREEN 9000.
    *&      Module  STATUS_9000  OUTPUT
    *       text
    MODULE status_9000 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
      IF it_tc[] IS INITIAL.
        SELECT vbeln erdat INTO TABLE it_tc UP TO 10
        ROWS FROM vbak.
        DESCRIBE TABLE it_tc LINES lin.
        my_tc-top_line = loopc.
      ENDIF.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    *       text
    MODULE user_command_9000 INPUT.
      CASE sy-ucomm.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
       <b> WHEN 'PBUT'.</b>
    **** Now this event is triggerred when the user uses the ****Position Push button to locate the field value.
          CALL SCREEN 9001 STARTING AT 10 15.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  USER_COMMAND_9001  INPUT
    *       text
    MODULE user_command_9001 INPUT.
      CASE sy-ucomm.
        WHEN 'OKAY' OR ' ' or 'EXIT'.
    <b>**** When the user selects values from the search help on **** position button, the itab is read and index is *****assigned</b>
          READ TABLE it_tc WITH KEY vbeln = vbak-vbeln.
          IF sy-subrc = 0.
            loopc = sy-tabix.
            flag = 'X'.
    **** the cursor is set here
           <b> my_tc-top_line = loopc.</b>
             SET SCREEN 0.
          LEAVE SCREEN.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
    *       text
    MODULE status_9001 OUTPUT.
      SET PF-STATUS 'MODAL'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    Regards

  • Help to search for a string value and return the index in the arraylist

    Hello,
    I just start java programming for the last three weeks and I cannot find a solution for this problem. I have the following List with string and integer value as shown below:
    List<Empl> list= new ArrayList<Empl>();
         list.add(new Empl(1,"Jim", "Balu",88);
         list.add(new Empl(3,"Bob", "Howards",2);
         list.add(new Empl(2,"Chris", "Hup",8);
    I have no problem of sorting this arraylist either by firstname or lastname. However, I cannot think of a way to search for a firstname or lastname and returing the whole row. I do not want to use index since I am asking user to enter the name to search. Here is my code to search for an empl based on index.
    System.out.print("Please enter index to search or (q)uit: ");
              String ans = sc.next();
              System.out.println();
              int ians = Integer(ans);
              if (ans.equalsIgnoreCase("q"))
                        choice = "n";
              else
              System.out.println("index " + list.get(ians)); //this will print out the whole row based on the index
    Since the user will never seen the contents of the arraylist, is there a way that I can search by string last/first name and will get the index location in int if the result is met?
    Please advice and thank you.
    Bob.

    user11191663 wrote:
    Since the user will never seen the contents of the arraylist, is there a way that I can search by string last/first name and will get the index location in int if the result is met?Another possibility is to set up an ArrayList for each thing you want to search on and then every time you add an employee, add the piece of data you want as well, viz:
    Empl e = new Empl(1,"Jim", "Balu",88);
    list.add(e);
    firstNames.add(e.firstName());As long as you always add them in the same order, the indexes will match, so you could do something like
    ians = firstNames.indexOf(nameToFind);to return the index of the name, if it's there (if not, it will return -1).
    I wouldn't recommend this as standard practise, but it should be OK for the level you're at.
    NOTE: indexOf() returns the index of the FIRST matching item. You may want to think about what you want to do if there are more than 1.
    Winston

  • Search for a String in a list of files

    Could anyone please send me a java sample code which searches for a string from a list of files and returns me the filename and the line in which the Search String was found ?
    Thanks in advance
    RR

    Simple solution would be -
    1. Traverse a directory for each file.
    2. Read each file using Buffered Reader.
    3. Use readLine() method to read a line.
    4. Use String.indexOf to see if the data which you are looking for is there in the line or not.
    5. If its there then store the line number and file name.
    6. When the loop will end you will have list of file name and line number where the data which you are looking for is present.

  • Go to source code after search

    I went to reports\plsql\search source code and searched for a text and it found the value in few packages but when I right click and click on GO TO package it does nothing.

    Sure we're talking about the same thing; Data Dictionary Reports - Reports - PLSQL - Search Source Code.
    I don't get any exceptions, here's the dump:
    INFO: MouseClicked with 0 children
    08/06/2007 13:13:22 oracle.dbtools.db.DBUtil executeOracleQuery
    INFO: Prepared:SELECT OBJECT_NAME, OBJECT_ID,
    DECODE(STATUS, 'INVALID', 'TRUE', 'FALSE') INVALID,
    'TRUE' runnable,
    NVL( b.HAS_BODY, 'FALSE') HAS_BODY
    FROM SYS.DBA_OBJECTS a,
    (SELECT 'TRUE' HAS_BODY, object_name tmp_name FROM SYS.DBA_OBJECTS WHERE OW
    NER = :SCHEMA AND OBJECT_TYPE = 'PACKAGE BODY') b
    WHERE OWNER = :SCHEMA
    AND OBJECT_TYPE = 'PACKAGE'
    AND object_name = tmp_name (+)
    AND SUBOBJECT_NAME IS NULL
    AND OBJECT_ID NOT IN ( SELECT PURGE_OBJECT FROM RECYCLEBIN )
    AND UPPER(OBJECT_NAME) IN UPPER(:OBJECT_NAME)
    08/06/2007 13:13:22 oracle.dbtools.db.DBUtil bind
    INFO: Bind:OBJECT_NAME:LNK_REDDIS_SME
    08/06/2007 13:13:22 oracle.dbtools.db.DBUtil bind
    INFO: Bind:SCHEMA:EXPL
    08/06/2007 13:13:22 oracle.dbtools.raptor.navigator.ObjectQueryInstance executeQ
    uery
    FINER: Loaded:LNK_REDDIS_SME
    08/06/2007 13:13:22 oracle.dbtools.raptor.navigator.ObjectQueryInstance executeQ
    uery
    INFO: Elapsed Time:40
    08/06/2007 13:13:22 oracle.dbtools.db.DBUtil executeOracleQuery
    INFO: Prepared:SELECT OBJECT_NAME, OBJECT_ID,
    DECODE(STATUS, 'INVALID', 'TRUE', 'FALSE') INVALID,
    'FALSE' runnable
    FROM SYS.DBA_OBJECTS
    WHERE OWNER =:SCHEMA
    AND OBJECT_NAME = :PARENT_NAME
    AND OBJECT_TYPE = 'PACKAGE BODY'
    08/06/2007 13:13:22 oracle.dbtools.db.DBUtil bind
    INFO: Bind:SCHEMA:EXPL
    08/06/2007 13:13:22 oracle.dbtools.db.DBUtil bind
    INFO: Bind:PARENT_NAME:LNK_REDDIS_SME
    08/06/2007 13:13:22 oracle.dbtools.raptor.navigator.ObjectQueryInstance executeQ
    uery
    FINER: Loaded:LNK_REDDIS_SME
    08/06/2007 13:13:22 oracle.dbtools.raptor.navigator.ObjectQueryInstance executeQ
    uery
    INFO: Elapsed Time:10
    08/06/2007 13:13:22 oracle.report.addin.ReportEditor updateContent
    INFO: ReportEditor.updateContent()
    The only thing that happens are the log entries...
    Thanks,
    K.

  • Search for Emails and place them on a array

    I have the following asp/vbscript code that search for the
    content of a folder with text files. I need someone to help me out
    to modify the code to automatically search for email addresses on
    each text file and place them on an array.

    Passwords are stored in the password files (encrypted).
    Bookmarks are stored in the bookmarks file.
    These can't get your data back, but will help in the future.
    These add-ons can be a great help by backing up and restoring Firefox
    '''[https://addons.mozilla.org/en-US/firefox/addon/febe/ FEBE (Firefox Environment Backup Extension)]''' {web link}
    FEBE allows you to quickly and easily backup your
    Firefox extensions, history, passwords, and more.
    In fact, it goes beyond just backing up -- It will actually rebuild
    your saved files individually into installable .xpi files.
    It will also make backup of files that you choose.
    '''[https://addons.mozilla.org/en-US/firefox/addon/opie/ OPIE]''' {web link}
    Import/Export extension preferences

  • Java.io.IOException: Server returned HTTP response code: 405 for URL

    I'm trying write to a file using a combination of CGI and Java. I am following this website:
    http://www.webdeveloper.com/java/java_jj_read_write.html
    However, when I try to write out to the file, I keep getting the error in the title: HTTP response code: 405 for URL: .....
    I was wondering if anyone knew what this mean? I searched the forum and found a post from 2 years ago that was exactly the same problem I was having, only thing is that there were no responses to it. Hopefully I'll have a bit more luck.

    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

  • Any way to search for casts in java source code?

    Anyone know of a decent way to search your java source files to find all the casts?
    I ended up doing a simple text search for
         " = ("(quote marks not included) which works for my code because I am strict about writing my casts with spaces like
         String s = (String) iterator.next();Unfortunately, the above search has all kinds of problems with both false positives and negatives. It picks up lots of irrelevant lines like
         int index = (number > 0) ? 0 : 1;as well as misses casts that appear nested inside expressions like
         ((String) iter.next()).charAt(...)I suppose that one could do a regular expression search for any pair of open and close parens which bound non-blank text, but that would pick up even more non-cast expressions in typical java code.
    I think that the only way to properly do this is to have a tool which understands java syntax.
    Anyone know of an IDE which will do this? Does IntelliJ or Netbeans support this kind of search?
    In case you are wondering why I am interested in this, it is because I am refactoring some code to fully use generics, and searching for casts is one source of identifying candidates for genericity.

    cliffblob wrote:
    Better late than never?Yes!
    cliffblob wrote:
    ...The answer I found to ID unnecessary casts was, using Eclipse IDE, In compiler error and warning preferences to warn on unnecessary casts.Thanks for pointing IDEs out. I just opened IntelliJ, and going back to at least version 7.04 (maybe earlier) they have an inspection for "Redundant type cast".
    cliffblob wrote:
    I would still be interested to know if there is a way to identify casts in general in your source, perhaps now four years later there is a way?The only solutions that I can think of are either a complicated regex search, or you must use some tool like an IDE that understand Java syntax and can determine if a cast is happening.

  • How do I search for a specific word in the code using Dreamweaver?

    I need to search for a specific word in the code for all of my website pages. How can I do that using Dreamweaver?

    To search local files of a Defined Site in DW...
    Open the Find & Replace tool with Ctrl + F
    Change the Find In dropdown to Entire Current Local Site
    Change the Search dropdown to Text or Source code
    Add the text to find in the Find field
    Add the text to replace in the Replace field (or nothing if you just want to delete the text)
    Hit Replace All

  • BP search for General and Company Code roles

    Hi
    On the modify Money Market Transactions (TM_52) (and some similar to it for other products TS02, TM32, TO02), if i go to the Partner Assignment Tab and I try to assign a bp for the General or the Company Code roles, the bp search program give me no results.
    If i try to do the search for the Counterparty role it gives me the results I expect.
    Is there any reason for do not give any result when these roles are the primary roles that, of course, the bp I choose has? Is it a program problem (this program has returned me some dumps and I implemented some Notes on it before)? If so, is there any solution?
    I want to assign these roles because I hope that these assignments with these roles modify the payment data or the master data of the transaction.
    Thanks

    Hi
    This is a very common topic.
    look at this thread:
    Authorization in reports
    Here's a starting point ...
    http://help.sap.com/saphelp_bw33/helpdata/en/72/eeb23b94c6e54be10000000a11402f/frameset.htm
    Outline steps...
    In RSSM:
    Create authorization object
    Make authorization object applicable to relevant InfoProviders
    In PFCG:
    Add authorization object to new or existing Roles with appropriate field assignments
    Make User/Role assignments
    Reg's
    Edan

  • How to search for a string in ALL Function Modules source code

    Hello,
    I want to search for the string "HELLO" in all FUNCTION MODULES source code(FM, no reports/programs).
    Is this possible? How?
    Cheers,
    Andy

    hi,
    Execute RPR_ABAP_SOURCE_SCAN to search for a string in the code ... Press where-used-list button on the program which takes to the function group or the function module where it is used ..
    Regards,
    Santosh

  • Search for users in a particular LDAP through Web Dynpro code...

    Hi Experts,
    Let me try explaining my problem. In my project we are using two ADAM LDAPs. One for storing internal users and the other for storing external users. I have configured the portal to connect to both the LDAPs. I am able to search for the users created in both the LDAPs through portal Indentity Management.
    I am trying to search for the users in a specific LDAP through Web Dynpro coding... I am not lucky enough to get it done. Let me explain you what I did.
    I created a custom attribute for UME through config tool. Gave a physical mapping for the custom attribute in dataSourceConfig_xxx.xml to the LDAP attribute distinguishedName which returns the distinguished Name for the user in ADAM LDAP.
    For Example: Custom attribute in UME is ldapuser which is mapped to distinguishedName attribute in ADAM LDAP in dataSourceConfig_xxx.xml.
    When I do a search for the users in a particular LDAP, I am trying to put a filter to the newly created ldapuser attribute to distinguish between the two LDAPs.
    The search will result if I pass the value as '*'. If I try to specify the user path for the LDAP in this attribute it doesnt result any data.
    For example:
    userSearchFilter.setSearchAttribute(
         "com.sap.com.cust.admn",
          "ldapuser",
         "OU=16482515,OU=Members",
         ISearchAttribute.LIKE_OPERATOR,
         false);
    The above code will not return the data, whereas
    userSearchFilter.setSearchAttribute(
         "com.sap.com.cust.admn",
          "ldapuser",
         ISearchAttribute.LIKE_OPERATOR,
         false);
    Will result with user list from both the LDAPs.
    If anyone tried searching for users in a particular LDAP through code, please help me with this issue.
    Thank you in advance.
    Regards,
    Rekha Malavathu

    I just figured it out. Under "group-policy GroupPolicy_COMPANY_SSL_VPN attributes", I had to add "vpn-simultaneous-logins 15". Apparently, it was using the value "vpn-simultaneous-logins 0" under the NOACCESS group policy.

  • How to search for the url in a hyperlink.

    Is it possible to search a PDF and find the url in a hyperlink? According to Adobe, no! But is there some third party software?
    We are attempting to find a url in many PDF's but the hyperlink could have many different naming styles. Is there a way to search for something like referral=4320 where that is in the url http://www.example.com?referral=4320&test=1

    If this url is a part of the running text of the PDF (by that I mean that
    you can actually see it in when opening the file), then yes, it's quite
    possible to write a script that will find it.
    If it's a part of a link (meaning it's not visible on the PDF), then it can
    only be achieved with a plugin or an external application.

  • Searching for KB's directly with a URL containing the TID.

    I have an application that gives me the TID of a support bulletin. I'd like a way to get a link directly to the bulletin on Novell's site.
    For instance I see a Bulletin for apache2 for SLES 11 SP1 and it covers:
    CVE-2011-3192,CVE-2011-3348,CVE-2011-3368
    I'd like a way to search automatically by TID in a URL. My provider does not always provide the support ID for the bulletin, but the TID is always there.
    I do notice if I goto:
    NOVELL: Support
    and search for the TID I get hits for the bulletin I'm looking for. Is there a way for me to use the URL itself with my search criteria in it?
    So I could add something like:
    274b1ea87316767c995b46d30d848997
    To the URL in some particular string format?
    Other search criteria may help as well if you cannot with the TID. I typically have a CVE, or bugzilla number too. The TID seems to be the most consistent though.
    Thanks in advance for your time.
    K

    Something like this: http://www.novell.com/support/search...String=7920481
    Is that what you're looking for? The actual URL to the TID directly is very long and complicated so the shortened search string above is generally used.

  • IOException  :server returned http response code:505 for url url

    hi,
    my program creates IOException server returned http response code:505 for url <some url>
    I close the i/p stream.I dont know ,where is the problem.plz let me know.Thanks in advance.
    Here is the code:
    public class CallApplicationURL
    private static final String className = "[CallApplicationURL] ";
    private MailAlert ma = new MailAlert();
    public String callURL(String purl, RequestObject ro, Debug log)
         URL url = null;
         String URLResponse = "No response from Provider";
         ProxySetter ps = new ProxySetter();
         try
              ps.setProxy(ro, log);
              url = new URL (purl);
         catch (Exception e)
         URLResponse = className+"Exception while URL assignment \n"+purl+"\n, Exception is "+e;
         return (URLResponse);
         try
         HttpURLConnection h = (HttpURLConnection) url.openConnection();
         h.connect();
         BufferedReader br = new BufferedReader( new InputStreamReader( h.getInputStream() ) );
         URLResponse = br.readLine();
         br.close();
         catch (Exception e)
              URLResponse = className+"Exception while calling URL "+purl+", Exception is "+e;
         return (URLResponse);
         return (URLResponse);
    }

    http response 505: http://libraries.ucsd.edu/about/tools/http-response-codes.html
    This would indicate nothing is wrong with your applet but with your http server (not supporting http 1.1??)
    A full trace might help:
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    When you catch the exception you should print the stacktrace: (e.printStackTrace()).

Maybe you are looking for

  • How do I write an OutputStream to a String?

    I'm using an ObjectOutputStream to serialize a LinkedList. I tried using a ByteArrayOutputStream and invoking the toString() method thereof, but it changes the first two entries in the array and throws off the readObject() method of the ObjectInputSt

  • Can i eligibal for Microsoft MVP ,contributing since last three year on various forums

    Can i eligible for Microsoft MVP ,contributing since last three year on various forums,my questions are what are the Dates when I apply for MVP ? I am contributing since last three year on various forums. I am actively contributing on http://www.c-sh

  • Watermark Palette Forgets

    I've installed the newest version of the watermark palette into Photoshop CC. The palette works fine, but I have two problems that reocurr after relaunching Photoshop: 1) It always asks, "Would you like to see the help video for Watermark now?" 2) It

  • Setting Application Item On New Instance problem

    Trying to set several application items using application computations set to fire On New Instance (ie. new login). None of them are firing on a new login. I did successfully fire them when I made page rendering computations after the header, but whe

  • Upload BW favorites on Portal

    Hi All, Using 'Role Upload' option in Portal, I have uploaded all BW roles on Portal. Is there any way that I can upload BW favorites on Portal for a particular user. Thanks, Shiraz