Archive search - just as in Winamp

I have made an archive of my mp3-songs.
When I for example search for an artist "Elvis",
the program return all song of Elvis.
ex! (artist.equals(a))
Then I want another fuction which is when
I type in "lvi", all artist with those letters
in the name will appear, and of course
Elvis will appear.
I use
(artist.indexOf(a) != -1)
: this work's!!!
But my question is why do I have to use -1?
is it because the value of boolean is either 0 or 1?
Bare with me, I am just an amatuer in java, but
I do wanna learn?
Thanks!

1) Please read the javadoc of java.lang.String for the definition of indexOf. In short, if the string sought is not found, the return of indexOf is -1.
2) The boolean type in Java can assume only the following values: false and true/b]. 0 and 1 (in C) or 0 and -1 (in Visual Basic) are common numerical representations of the values "false" and "true", but Java can not use 0 and 1, only false and true.
3) The operator != returns "false" or "true".

Similar Messages

  • Something is wrong with Searching - Just Hangs 7AM UTC

    Something is wrong with Searching - Just Hangs 7AM UTC

    Paul,
    Something is wrong with your posting. I have no idea what you're searching for on what system. Many more details are needed.
    Joel

  • Enhance Standard Info Structure SAP_CRM_ACT to add custom fields in CRM Activity archive Search

    Hi All,
    We have a requirement where we need to enhance CRM UI archive search with custom fields for CRM activity Object CRM_ACT_ON. As per my analysis Standard Archive Search for activity Uses info structure SAP_CRM_ACT for searching archived data.
    But when we are trying to add custom fields into above field catalog, it is treated as modification. But Modification is not allowed in our landscape.
    Standard infostructure is harcoded in SAP standard method ARCHIVING_READ of class CL_CRM_REPORT_ACC_DYNAMIC which is called as part of the process. So we are not able to go ahead with custom info structure.
    Can you please le me know if there are any alternative way to meet above requirement or I have missed any steps.
    Thanks & Regards,
         Sujit

    Hello Thomas,
    Maybe this link can help.
    add new field to search criteria and result.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0747ac2-ffd9-2910-de9a-8a3dc44da8b4?QuickLink=index&overridelayout=true&12966506314316
    Search Options - Knowledge Management - SAP Library
    regards,
    Grace

  • [SOLVED] search just package name (not description) with yaourt

    Is there a way to search just package names (not package descriptions) with yaourt or pacman?  I'm imagining something like this:
    $ yaourt  -Ss  --pkgname-only  xterm
    Thanks!
    Last edited by partner55083777 (2010-02-03 16:30:43)

    My question still stands as to how I can search just package names.  If it is using another program other than yaourt or pacman, that is okay.
    "yaourt -Ss SEARCH_STRING" has been working as stated in the documentation for me (with yaourt-0.9.2.6).  It will return all packages that have SEARCH_STRING in either the package name or package description.
    Here are the first three results when running this command:
    $ yaourt -Ss emacs
    extra/emacs 23.1-3 [installed]
         The Emacs Editor
    extra/snd 10.1-1
         Snd is the emacs of sound editor
    extra/texmacs 1.0.7-3
         GNU TeXmacs is a free scientific text editor, which was both inspired by TeX
         and GNU Emacs. WYSIWYG editor TeX-fonts and CAS-interface (Giac, GTybalt,
         Macaulay 2, Maxima, Octave, Pari, Qcl, R and Yacas) in one.
    $
    It looks like it works as specified in the man pages:
    -s, --search <'regexp'>
               This will search each package in the sync databases for names or descriptions that match regexp.
               When you include multiple search terms, only packages with descriptions matching ALL of those terms will be returned.
    Last edited by partner55083777 (2010-02-02 22:10:24)

  • Use Finder to search just certain directories?

    Is it possible to use Finder or Spotlight to do a search for files that are just in a certain directory or subtree, rather than searching the whole disk?
    Or if not that, is it possible to sort search results by the directory where they are found?
    Thanks, and sorry for the newbie question. I did look around quite a bit myself before asking.

    mitchgrrt wrote:
    I see. It sort of, partly, does what I want. It seems like you can limit the search to one of the "places" that show up on the left side of Finder. So on my Mac I can choose to limit the search to Desktop, mitch, Applications, or Documents in my case (my username is mitch).
    That's an improvement, but can I limit the search to subdirectory mitch/dir1/dir2? That's what I would really like.
    of course. as I told you open mitch/dir1/dir2 in finder and start the search from there. the search will default to searching the whole mac but in the search toolbar you can switch to searching just this directory. and if you want you can save the result as a smart search and put in the the sideebar for quick access if you do this particular search often.
    Or can I sort the search results by where they are in subdirectories?
    no, you can't do that.
    Thanks.
    Message was edited by: V.K.

  • How do I search just the Dreamweaver forums?

    Hi all,
    I must be crazy but I can't seem to see how to search just the Dreamweaver forums. Two search fields, one for all adobe.com and one for searching all forums but no option to search only this one?
    David

    Hi,
    sorry, I misunderstood. Now, what I do is when I want to search in the DW forum only, I start my search with the word "dreamweaver" an let it follow with the searched terms.
    If you cannot live with that, you could your  "link in that group that said "Search this forum" might be ..." serve as suggestion to
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform, where you can "Use this form to request new features or suggest modifications to existing features."
    Hans-Günter

  • Online Archive Search Does Not Search Folders

    Outlook 2010 (14.0.7113.5000) SP2 MSO (14.0.7140.5002). We have multiple user that can search the archive and get results, but if the mail item is in a folder in the online archive it will not find it. Seems to be the same situation on OWA. Any guidance
    or help would be appreciated.

    Hi,
    What’s you Exchange server version? Please confirm if the issue happens to all users when searching the Online Archive folder in both OWA and Outlook client.
    If that is the case, the issue may be related to the Search feature in Exchange server. Please restart
    the Microsoft Exchange Search Service or rebuild the Full-Text Index Catalog to have a try:
    http://technet.microsoft.com/en-us/library/aa995966(v=exchg.80).aspx
    If it doesn’t work, please collect more event log and ask a question in Exchange forum for further troubleshooting.
    Regards,
    Winnie Liang
    TechNet Community Support

  • HT204266 My App Store keeps struggling to load up. Requests frequently time out and searches just don't do anything. If it does load up a search, the iPad closes down App Store, returns to home screen and, upon re-opening, the search has been deleted. Hel

    I've had my iPad (retina display) since last year. Over the last few weeks the App Store struggles to load on occasion and times out completely. When searches do rarely complete, the App Store closes down and returns my iPad to the home screen and, when I open the App Store again, it has just reset the store, forcing it to load all over again. I've tried closing all running background applications, with no difference being made. Any help would be greatly appreciated.

    1. Double-click the Home button to reveal Task Bar
    2. Hold the App Store app down for a second or two until you see the minus sign
    3. Tap the minus sign to close app
    4. Re-launch the app and test
    Note: If necessary close all apps in the Task Bar

  • I've just downloaded Firefox 4, with Google as my Homepage.When I start a search, I get a page of results but can't open any of the links. The search just stops.

    I've reset my firewall, re-booted and made sure that it was a 'clean' Download all with no result.

    Are you using Internet Explorer 8 at present ? <br/>
    Does Firefox actually work or can you not even use this messageboard with Firefox ?
    You have a search bar (by default) on the top right of the screen, that will include an option to use google, does that work ?
    Your ordinary location bar where you type addresses also (by default) uses google, is that working ok ? <br/>
    What happens if you type in "firefox", I would expect you to get a google search page with mozilla.com towards the top of the list.
    Try firefox in [[Safe Mode]], but on the first dialogue window do not make changes, just click the continue button.
    *See also [[firefox does not work]] and the articles linked from that
    What is the actual address of the google home page you are using ?
    What happens if you use this link: http://www.google.com/
    If Firefox does not work with the google pages, also try those pages with IE8 do the pages and searches work in IE8.

  • ITunes 11 Search Just Doesn't Work

    I have used iTunes since its inception and have never had an issue with search. Now, all of a sudden it is just not working properly. Basically, songs/artists that I know are in my library (as I can locate them manually) do not appear in a search. For instance, I just downloaded a track by "John Williams" from the iTunes Music Store. I use the search function in iTunes (with "Search Entire Library" and Filter By: All" enabled) while clicked on the "Songs" & "Music" tabs and the track does not appear. If I go to my "Purchased" playlist, the track is right there, same exact artist name. Then, if I search within that playlist iTunes will find it. I've even tried turning off the Search Entire Library option to no avail. It seems as if my purchased/new content is just not being added to my search index (or whatever).
    Is this a bug, or something wrong with my index?

    When searching by song title things work. When you go by artist/composer if the song is in a compilation album search usually does not work...I think composer is ignored and the problem arises when album artist is not blank i.e. various

  • Youtube search just keeps on searching...

    Hi all, having trouble with you tube search. When I first set it up I was able to look for and found things easy. The wife finally sat down with me so I could show her how it works and then it didn't. I can enter the search mode, type in something, and the gear just keeps spinning round and round. The same thing happens when I'm looking for top hits. The history of what I had accessed is still there, and it is the only content I can accdess. I don't have a youtube account and did not need one to bring stuff up the first time I used it. The other apple tv features seem to work ok.
    Thanks for any suggestions!

    I did that simple reset only with no effect.
    However, here is what I did and everything came back to normal. Just do not ask what magic is this or what this really did to Apple TV system. The outcome was however that YouTube started showing back while I did not notice other effects.
    I did simple reset and it did not help. Then I pulled power cable from Apple TV and i have left it for 30 minutes. I was frustrated so I went for a beer and few calming moments in backyard Then after comming back I plugged the cool box back to power. Guess what. I checked YouTube and all content from web side was back right away - no long searches. That was surprize. I cannot explain this, but perhaps something got stuck in wrong state and after longer period being powered down and out of any network the functionality "rebuilt" itself somehow. Sounds like wizardry to me as well and I am not going to start any theory on what happend. I am satisfied, but I still think that ATV is not as reliable (or servicable with menus) as it should be.
    Thanks,
    Maciek

  • Cisco Prime 2.1 Archive Search

    in past versions of CiscoWorks I was able to search configuration archives.  
    Config MgmtArchive MgmtSearch Archive
    Can I do that with Cisco Prime 2.1???

    You can thin provision. Trying to change the overall profile though will most likely result in issues sooner or later. When you run out of disk space it will fail in ungraceful ways.

  • IPhone and iPod on one account (issue not answered from archive search)

    I have searched previous forum posts for this topic, but I haven't found an appropriate answer to my specific query.
    A few weeks ago I bought an iPod nano 8G Gen5 and today I have picked up a 16G 3G iPhone (new). I am new to these products and have heard itunes doing weird things with erasing files etc.
    Before I do too much syncing and regret what I do and cause no end of hassles, I just want to get this clarified.
    So.... the music I have copied to the computer is synced and stored on my ipod. Can I sync that same music to the iPhone without it affecting the iPod?
    Basically, can you sync the same content on itunes to both an ipod and an iphone connected on the same account? (obviously iphone applications can't be synced on iPod, but music and photos can be played and viewed on both of course)
    I hope I've explained my issue well enough?
    Thanks

    Yes. I have multiple iPods on multiple computers all synced to the same account. Enjoy.

  • TS2634 Why does my apple iPod touch just automatically stop playing songs and it also when I am doing a google search just goes back to the home screen

    My iPod touch just stops playing songs automatically.
    When doing a google search it sometimes times goes back to the home screen.
    Also it sometimes takes several goes before it will accept the charger!
    Would appreciate any help, thanks

    - The charging issue could be due to a poor connection or a problem with the iPod. Try another cable first
    - Try the following, it is mainly for the not playing and other problems:
    Reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory defaults/new iPod
    If still problem time for an appointment at the Genius Bar of an Apple store.

  • I cannot run the 13.0r0 flashplayer with the 28.0 firefox. I have tried EVERYTHING! I also can no longer run an archived player just tell me to update.

    running firefox 28, trying to run flashplayer 13.0r0, have windows vista. At this point I can't even pull up the logo to disable the acceleration - that is the only thing I have not been able to try. All I ever get is that the flashplayer has stopped and windows is searching for a solution..... I also did the firefox reset which did not work. Is this fixable or do I need to purchase a new modem????

    You can check for problems with current Shockwave Flash plugin versions and try this:
    *disable protected mode in the Flash plugin (Flash 11.3+ on Windows Vista and later)
    *disable hardware acceleration in the Flash plugin
    See also:
    *http://kb.mozillazine.org/Flash#Troubleshooting

Maybe you are looking for

  • Will iTunes 10.6.1 on a 2005 iMac be able to home-share with iTunes 7 on a 2008 iMac and a new iPhone 5?

    On the iPhone page I was told the iPhone 5 will work with iTunes 10.7, so maybe I shouldn't upgrade to iTunes 11 since a lot of people don't like it. Nobody here seems to know how to combine my two iTunes libraries on the same account but different-a

  • Black background in viewer and canvas

    Hello I applied blue/green filter to my clip, it is showing a black background when I play it in viewer but white background when I just view it? ANy ideas?

  • Get Idoc structure and contents from Shipment Number

    Hi all, We have a 3rd Party Logistics company who wants to send us back minimal shipment data to enable us to update our shipment details.  They want to send us the shipment number, and vehicle information.  My tests (and SAP's documentation) have in

  • Offline backup failing when scheduled using DB13

    Hi,            We have done our backup schedule of our BI 7 system running on AIX 5.3 and Oracle 10.2 using DB13.The activities like online backup and datbase check is executing correctly but offline backup is failing with status unknown. If i check

  • Ipad mini ? it will not turn on

    I went to turn on ipad mini yesterday and it was extremely warm and did not respond even after trying to reboot by holding down both the ON button and the sleep button simultaneously. Should I even bother taking it to an apple repair dealer? I had do