How to find out if there are repeated characters in a string

hey guys
well i kinda have a little problem figuring out how to find out
if there are repeated characters in a string.
if anyone can help, would appreciate it.
thanks
milos

Try using the StringTokenizer class. if u already know which character to trace. this could do the job.
eg. String str = "here and there its everywhere";
StringTokenizer st = new StringTokenizer(str, "e");
int rep = st.countTokens();

Similar Messages

  • How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?

    Hi there,
    How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?
    Thanks.

    You need to enable auditing on SharePoint server and it will let you know, if someone makes any critical changes for the same.
    Please walk through this informative KB to enable auditing on SharePoint :https://support.office.com/en-za/article/Configure-audit-settings-for-a-site-collection-f5a346d0-ee0f-4412-a5e6-d9b5abaa1012
    Here is one more resource :
    https://support.office.com/en-in/article/View-audit-log-reports-4293e8d5-4e7d-4201-b8ac-c8e63a100131
    Moreover, if you wish to audit such critical changes automatically, you may consider on this comprehensive application (http://www.sharepointauditing.com/) that helps to track every changes on SharePoint into
    real time and provides the captured data at granular level.

  • How to find out which lists are using email enabled feature in my SP 2010? Any script? Anything else?

    Hi there,
    How to find out which lists are email enabled in my SP 2010?
    Any script? Anything else?
    Thank you.

    Hi frob,
    check this script that is stated on this link
    $SPwebApp = Get-SPWebApplication "http://migration.Company.com"
    <# If it is MOSS 2007, You can use:
    $SPWebApp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup(http://sharepoint.com)
    To get SPWebApplication Object
    #>
    #create a CSV file
    "E-Mail,List,Site" > "EMail-Enabled.txt" #Write the Headers in to a text file
    foreach ($SPsite in $SPwebApp.Sites) # get the collection of site collections
    foreach($SPweb in $SPsite.AllWebs) # get the collection of sub sites
    foreach ($SPList list in $SPweb.Lists)
    if ( ($splist.CanReceiveEmail) -and ($SPlist.EmailAlias) )
    # WRITE-HOST "E-Mail -" $SPList.EmailAlias "is configured for the list "$SPlist.Title "in "$SPweb.Url
    $SPList.EmailAlias + "," + $SPlist.Title +"," + $SPweb.Url >> EMail-Enabled.txt #append the data
    http://www.sharepointdiary.com/2011/06/find-all-incoming-email-enabled-lists.html
    Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation. Please remember to mark the reply as answer if it helps.

  • How To  Find out Which Adapters Are Installed

    Hi Experts,
    We Installed SAP PI 7.0 Just Now .
    How To Find out Which Adapters are Installed ????
    Please Help me in this....
    Regards
    Khanna

    <i>And the Other thing is Some Adapters Are in the Green Color And Some Are in the Grey Color. Is there Any Difference Between these ??????</i>
    CCMS status:
    Green: Working
    Grey: <i>Status Unknown</i>
    Red: Problem with the component
    ref:
    http://help.sap.com/saphelp_nw04s/helpdata/en/9b/f12541c3d3f323e10000000a155106/content.htm
    Regards
    krishna
    Message was edited by:
            Krishnamoorthy Ramakrishnan

  • How to find out which objects are at the end of the datafiles

    My Scenario is having a tablespace of 65G but the data is 5G and that is at the end of datafile for that we are not able to resize the datafile our though is to find out what are the objects at that end of datafiles and will either alter move <owner.tablename> move or alter index <owner.index> rebuld online.
    For that how to find out which objects are at the end of the datafiles.

    >
    My Scenario is having a tablespace of 65G but the data is 5G and that is at the end of datafile for that we are not able to resize the datafile our though is to find out what are the objects at that end of datafiles and will either alter move <owner.tablename> move or alter index <owner.index> rebuld online.
    For that how to find out which objects are at the end of the datafiles.
    >
    You may want to copy this and add it to your toolkit
    See 'What's at the End of the File?' in this Tom Kyte article from the Sept 2004 Oracle Magazine
    http://www.oracle.com/technetwork/issue-archive/o54asktom-086284.html
    And this AskTom blog shows you how to generate a script containing ALTER statements toresize your datafiles to the smallest possible. You can 'pick and choose' from the ALTER statements to do what you want.
    Then of course, you can use techniques from this article by Oracle ACE, and noted author, Jonathan Lewis
    http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/

  • Is there a way to find out if there are songs in my library that do not belong to a playlist?

    Is there a way to find out if there are songs in my library that do not belong to a playlist?

    http://dougscripts.com/itunes/scripts/ss.php?sp=notinanyplaylist  and related links in this one

  • Way to find out of there are pending updates

    Is there a way in Oracle 8.1.6 to find out if there are any uncomitted inserts, updates, or deletes on the current transaction?
    I do not need to know what they are, only if there are any at all.
    WHY?
    I have a piece of architecture in my client that runs on a timer and will sometimes perform updates. I want to skip the timer code if there are any pending updates so that the timer's updates do not get intermixed with updates from the main application.
    I tried putting the updates into a package function that used an autonomous transaction, but when it got into production the DBAs complained that the database was generating strange errors that they were told are dangerous, and I had to turn off this functionality.
    Thanks for your help,
    Chris Elvart
    SBC Public Communications

    Chris, there is not any method to see if row are locked before you try to access then so on an 8.1.6 version you could change your routine to use a select for update. If the cursor returns one of the requested rows is waiting on a commit. You can trap the error that indicates a row is in use, rollback, sleep, and then try again.
    The problem with this is a select for update must retrieve all the rows before you can process any of them so unless the target set is small this may not be practical. Also you can commit only at the end.
    You could select all the target rows in a cursor then perform a select for update on each row. With error trapping this would allow you to skip pending rows.
    Just some ideas for you to consider.
    HTH -- Mark D Powell --

  • How to find out which jobs are connected to the user

    Hello, i have a question, but i was unable to find the answer. The problem is that our internal consultant left the company, and there are certain jobs that run under his account. We want now to switch this jobs to other accounts. The problem we are facing is how to find out what jobs, or job steps are connected with his account, so we can safely demote his account, so that no other jobs will be run under his account. Thank you very much
    Sincerely,
    Luka Prijic

    the only reliable way to do this is by scanning table TBTCP using the person's userID in field AUTHCKNAM and filtering by job statuses: scheduled, released, ready and active (sorry I can't remember the code#'s off top of my head, something like P=scheduled, S=scheduled...you have to look it up).   When you search SM37 it only permits you to scan by the userID who created the job, but it won't tell you if a different userID is defined in a job step.  That's why you need to scan TBTCP.  Don't forget that you should also check for a user's open Workflow items before deletion.
    I noticed some posts in this forum that suggest a userID should never be deleted, only locked, added to a special user group, and all role assignments removed.  However I've never worked somewhere that does this.

  • How to find out which queries are being used ?

    We have a number of InfoSet Queries which the users are calling from SQ00. Some of them are very old.
    I would like to find out which queries are being used, so we can have the idle queries decommissioned.
    How can this be done ?
    Best regards,
    Peter

    Hi,
    It's been a while since I've done this but one method is to use ST03N & look for the execution of programs with an AQ* prefix.  The general structure is AQZZ/<query user group><query name>.
    You could probably get the same info from the audit log but I've not checked that.
    Cheers,

  • How to find out which BADIs are used

    Hi Experts,
    Is there any tcode where I can give the transaction or program name and find out which BADIs are used in that transaction.
    thanks
    sankar

    Dear Sankar,
    You can first check available BAdis and then go to SE19 to see what all have been implemented.
    Please check this sample program from other thread to find BADI and enhancement for a given transaction code. You just need to create a custom program in your system by cut and paste below codes.
    REPORT ZTEST.
    TABLES: TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA: JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA: FIELD1(30).
    DATA: V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS: P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA: WA_TADIR TYPE TADIR.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    ENDCASE.
    Alternatively, you can do the following:
    1. For what ever transaction u want the enhancement .. just check for the System-->status (menu) and find out the PROGRAM name....
    2. Double click on to the program name and go inside the program (Abap editor)
    3. Search for "Call Customer-function " ... and u'll get some search results .. If u get results then u have enhancement in that tcode .....
    4. Then it actually calls a Function module .... copy the Function module name .... go to SE80 (object navigator) click on "Repository Information system" then Customer Enhancements .... Give the Function module name in the "Components" field and click Execute ....
    ull get a list of Enhancements related to that Componene....
    5. Choose which ever enhancement will suit ur business need ..
    6. Go to CMOD... create a project .... assign ur enhancement ... and then code ur logic.... activate ur enhancement in CMOD ....... Ur Buisness need will be solved...
    For a user exit......
    Finding whether there is any User Exit or not for tcode VA42
    1. For what ever transaction u want the user exit .. just check for the System-->status (menu) and find out the PROGRAM name.... ( The program name would be for our scenario "SAPMV45A" )
    2. Double click on to the program name and go inside the program (Abap editor)
    3. Search for the word "USEREXIT" .... u ll find all the user exits in the search result .. and find ur's then ...
    Hope this will help.
    Regards,
    Naveen.

  • How can I find out if there are any masters (not referenced) in my library?

    Hi!
    I've been using Aperture for a while (most masters are on different hard drives, but maybe some are in my library by mistake when I imported them), now want to consolidate all my photo-masters on a separate "photo" hard drive and leave in my Aperture Library only the previews and the adjustments.
    I have some projects in my library, and my library is 12 GB. Is there a quick way to find out if any of my masters are in the library so I can "take them out" and put them on my separate HD?
    If there was a way to sort by "badge" and see the ones not referenced that would be nice.
    In the future I will be more careful when importing to make sure my photos are always in the right place and referenced.
    Thanks for any help!

    Easy. Add Rule "File Status" = "Managed".
    Make a Smart Album, store it in your top level Smart Albums folder (I put all my Library administration Albums there), and check it before doing a full back-up, or regularly. I keep recent shots on my MBP internal drive so I can work on them wherever I am. After a month or so I relocate the Masters to my big external drive.
    Note that Managed Masters/Versions are likely already differentiated by badge. Referenced images have a "link arrow" badge. Managed images do not.

  • How do I find out when there are pending update for ipad2 model A1396

    Hello,
    How and where would I go within my ipad2 model A1396 to find out if it's pending system automatic updates.

    How to update your iPhone, iPad, or iPod touch

  • How to find out what applications are consuming a service in SR

    Hi,
    How can one find out what or which all applications are consuming a particular service from Service Registry?
    There is tab called Used By when we select a service from service registry. But it always shows empty.
    Any help is much appreciated.
    Best Regards,
    Shiva

    Problem got resolved by myself.
    It will be reflected in Used By tab once an application is consumed from SR,
    Thanks.
    Best Regards,
    Shiva

  • How to find out the objects are behind(not hidden) an image?

    Could you please advise me is it possible to find out if the texts (or) objects are behind (not hidden) an image (or) any tinted boxes using scripting via "illustrator cs3".
    Thanks for looking into this.

    Hi Maria,
    if an text or object are behind an another object, i think you need to test position of this text and his layer.
    for exemple:
    layers[0] a rectangular pathItems [100,100,200,200]
    if there is text or other object, it should be on layer[1] or [2] [3] ...[0+x] ( i didn't talk about sublayer, but it's same thing) and it should have same position than rectangular pathItems or included (x>100 && x<200 && y>100 && y<200) and it should have color.
    But in some cases, we will see the text if object is hollow / concave, and script will return "hidden"
    art.chrome

  • How to find out System properties are available

    Hello,
    Is there a way to get a list of the properties that are available 'out-of-the-box' on Netweaver via the System.getProperty("xxx") method?
    In other words, can I get a list of the possible values for "xxx"?
    I know I can add my own properties but I'm more interested in finding out what is available to me by default. What I'm looking for may already be there. Plus, this list would tell me what constant NOT to use if I'm adding my own property.
    Thanks in advance for any help.
    David.

    David, System class has method getProperties which returns instance of Properties (http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html). Iterate through it using propertyNames() and you will get all system properties available.
    Best regards, Maksim Rashchynski.

Maybe you are looking for