Search a word in combo & list all matching words in combo

Hi,
    In my combo box theses following items are there
         Tom John
          John Joseph
         Christopher don
          Alex baby john
         eldho
         Hareesh M
          Sithaara rao
I want to search a name that contains 'john' in any where . That means if I type 'john' in combo it will show all matching names  like tom john, john joseph, alex baby john etc in combo. I am workin with c# windows application.

Use a list as the input to the combobox, then use Linq to search list
List<string> input = new List<string>(){
"Tom John",
"John Joseph",
"Christopher don",
"Alex baby john",
"eldho",
"Hareesh M",
"Sithaara rao"
comboBox1.DataSource = input;
List<string> output = input.AsEnumerable()
.Where(x => x.ToUpper().Contains("JOHN")).ToList();
jdweng

Similar Messages

  • Searching for words in a list!

    hi
    i need some help, i have to search for three words in a list then if this list contains these three words it would do something, could anyone help me just to try and start this.

    public void checkWord() {
             String word1="1stWord";
             String word2="2ndWord";
             String word3="3rdWord";
             boolean w1,w2,w3;
             w1=false;
             w2=false;
             w3=false;
             ArrayList list=new ArrayList();
             list.add("1stWord");
             list.add("2ndWord");
             list.add("3rdWord");
             list.add("4thWord");
             Iterator i=list.iterator();
             while(i.hasNext()) {
                       String listValue=(String)i.next();
                       if(listValue.equals(word1)) w1=true;
                       else if(listValue.equals(word2)) w2=true;
                       else if(listValue.equals(word3)) w3=true;
             if(w1&&w2&&w3) {
                       System.out.println("All Matched");
    }Will it work?

  • HT204406 I purchased an album from itunes, and put it in a playlist. icloud status lists all the songs as purchased, and when I click on "Update itunes Match", this playlist will not update. There is a cloud to the right of the playlist name.

    I purchased an album from the itunes store, and put it in a playlist. icloud status listed all the songs as purchased, instead of the usual "Waiting". When I clicked on "Update itunes Match", everything updated except this playlist. There is a cloud to the right of the playlist name. This has never happened before.
    Any ideas?

    I deleted the songs from my desktop (iMac), then I used itunes match to reload the songs back on my desktop from my laptop. When they reappeared on my desktop, then I right-clicked on the songs and clicked on the option to add to icloud. This however did not work, and they just duplicated into icloud, but they were "greyed out" and unuseable. I hope I'm explaining myself clearly? In other words, the songs seem to be trying to go into the cloud, but they are greyed out in my library and cannot download. It is as if they are ghosts? My songs do play fine when I transfer them via itunes match, and everything appears normal. They just won't transfer via the cloud. As I said before, every other song in my library always work fine via the could, but only the songs off this one album that I bought from itunes in 07' will not work???

  • How can I search a word in a column and erase all the rows containing that word?

    How can I erase all the rows containing a certain word at once?
    Right now I do it manually : I search the word in a certain column with cmd+f, after that it points out where the word is in different rows. And then I manually erase every row but this takes a lot of time when you have 500 row! There must be a way to select all the rows concerned at once and erase them? Thks!

    assuming this is something you don't do very often you can simply use the search feature to identify instances of the search term, and select the row, delete the row then search again.
    The next level would be to add a new column where you identify that the search term exists in a cell of the row, then you sort by the new column:
    B1=IF(IFERROR(FIND("team", A1,1), 0)>0, "FOUND", "")
    my search term is "team" change yours as needed.
    select B1, copy,
    select Column B, paste
    Now sort:
    Inspect the rows to make sure the rows found are REALLY ones you want to remove.  select the ones you want to remove and delete those rows.

  • I've found no way to sort.  For example, if I type the group "Rush" into the search bar, I get a list of songs recorded by rush and literally thousands of other songs and artists with the word rush in them. There is; however, no way to sort the results.

    I've found no way to sort search results in itunes.  For example, if I type the group "Rush" into the search bar, I get a list of songs recorded by rush and literally thousands of other songs and artists with the word rush in them. There is; however, no way to sort the results. 

    In the Search box click on the black Arrow and UNTICK the Search Entire Library.
    Then the Search results in Songs view will be displayed in the main Grid and you can sort them by clicking on the column headers.
    You can also turn on the column browser which can help with filtering

  • ITunes Match does not list all my music before signing up. Only the ones i've purchased thru itunes and several songs of my own.  Where can I find my 400  missing songs?  Being able to store ALL music is the only reason why I signed up. Please help.

    iTunes Match does not list all the music I had on my iphone. Not on my phone or iTunes. Only shows the music I've purchased from itunes and none of my 400+ songs.  Please help. Thank you.

    Is your music in your iTunes library on your computer and has match completed its scan of this library.
    jim

  • I upload a podcast each week using Podcast Maker. When I search the iTunes Store to determine if the most recent one is listed all the podcasts are in random order. This week's is

    I upload a podcast each week using Podcast Maker. When I search the iTunes Store to determine if the most recent one is listed all the podcasts are in random order. This week's is #14; last week's is #1. Any ideas how to correct this? The odd thing is that when you try to subscribe to the podcasts, they are listed in the proper order.

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • How do I search a spreadsheet for a list of URL's | then search those URL's for keywords | save the output? (Oh yeah..., and schedule it)

    Fist, I should mention I am not a programmer but am eagerly learning powershell!
    I am looking for an automated solution to accomplish what I am currently doing manually.  I need a script that would combine the following:
    Reach out to a list of websites (probably a loop of some sort since the list will come out of a spreadsheet which could contain 1 or 100 different sites)
    Search each page for a specific word or words (not contained in the spreadsheet though that may make it more scalable)
    Save the URL of the site(s) that contained the keywords to one text file (versus the multiple .html files I am creating today)
    Have the output contain which words it found on which site.
    If not overly complicated, I would like to schedule this to recur once a week.
    A working script would be ideal, but even the resources that show me how to incorporate each element would suffice.
    I have had success pulling down the full content of the listed pages and saving them to a directory, which requires manual intervention.
    So far this works, but it's not scalable:
         Set-ExecutionPolicy RemoteSigned
         $web = New-Object Net.WebClient
         $web.DownloadString("http://sosomesite/54321.com") | Out-File "C:\savestuffhere\54321.html"
         $web.DownloadString("http://sosomesite/54321.com") | Out-File "C:\savestuffhere\65432.html"
         Get-ChildItem -Path "C:\savestuffhere\" -Include *.html -Recurse | Select-String -Pattern "Keyword 1"
    In otherwords, I have to manually replace the "http://sosomesite/54321.com" and "C:\savestuffhere\54321.html" when the URL changes to .\65432.com and the output name to match.  That works fine when it's a couple sites, but again,
    is not scalable.  
    Then, to see if any of the saved file's contain the keyword(s), I have to search the directory for the keyword which I am using:
    Get-ChildItem -Path "C:\savestuffhere\54321.html" -Include *.html -Recurse | Select-String -Pattern "Keyword 1"

    Hi Sure-man,
    Sorry for the delay reply.
    To automatically Reach out to all urls, you can list all urls in a txt file "d:\urls.txt" like this:
    http://sosomesite/54321.com
    http://sosomesite/65432.com
    Then please try the script below to save the URL of the site(s) that contained the keywords to one text file "d:\outputurls.txt":
    $urls = get-content d:\urls.txt
    foreach($url in $urls){
    $results = $web.DownloadString("$url")
    $matches = $results | Select-String -Pattern "keyword1","keyword2"
    #Extract the text of the messages, which are contained in segments that look like keyword1 or keyword2.
    if ($matches.Matches){
    $Object = New-Object PSObject
    $Object | add-member Noteproperty keyword $matches.Matches.value
    $Object | add-member Noteproperty URL $url
    $output+=$Object}
    $output|Out-File d:\outputurls.txt
    If you want to schduled this script in Task Scheduler once a week, please save the script above as .ps1 file, and follow this article:
    Weekend Scripter: Use the Windows Task Scheduler to Run a Windows PowerShell Script
    If I have any misunderstanding, please let me know.
    I hope this helps.

  • Help- trouble searching any words in PDFs!

    hi all,
    i have been having  trouble searching any words in PDFs:
    when i downloaded a PDF in my windows XP, it opened and searched fine at first with Adobe Reader. Then i zipped to to my iMac OS X, and when opening it in Preview, it would not find any text that i searched for. I re-downloaded it straight from the internet to my mac, several times, and each time still Preview could not search it.
    Then i tried downloading and installing the entire Adobe Reader to my mac, so i could open it with that. But, then it still would not search/find anything in the PDF.
    Then, I downloaded yet another PDF reader called Skim, installed and tried that on my MAC. Still, no luck. I went back to the original site where i got this PDF, and found the most updated version, deleted the former and redownloaded the latest to both my windows and my mac.  Finally this time it worked! So happy! Unfortunately, just today, a day or two later, i opened a different PDF on my mac, and it opened automatically using Adobe reader, (rather than the usual default Preview app, as i guess i might have set my prefs to change adobe reader to be the default while i was tinkering around trying to troubleshoot it all), and again i could not get the search to work at all! Then, i changed my mac prefs to have the default PDF opener be Preview. But still,Preview would not find any text in this pdf EITHER!
    Can anyone please help? I have been going crazy trying to chase after the solution to this perplexing problem! thanks!
    BTW,  i use Firefox (always the latest version) as my browser. And the PDFs i am discussing are downloaded already and opened from my OS (not the internet.)

    public void checkWord() {
             String word1="1stWord";
             String word2="2ndWord";
             String word3="3rdWord";
             boolean w1,w2,w3;
             w1=false;
             w2=false;
             w3=false;
             ArrayList list=new ArrayList();
             list.add("1stWord");
             list.add("2ndWord");
             list.add("3rdWord");
             list.add("4thWord");
             Iterator i=list.iterator();
             while(i.hasNext()) {
                       String listValue=(String)i.next();
                       if(listValue.equals(word1)) w1=true;
                       else if(listValue.equals(word2)) w2=true;
                       else if(listValue.equals(word3)) w3=true;
             if(w1&&w2&&w3) {
                       System.out.println("All Matched");
    }Will it work?

  • IPad version:how can I search a word on modules?

    Hi to everybody! How can I search a word in modules?
    I understand that I can do a search in spreadsheet, but I need to do in a module that is more efficient...so do you know?
    And why when I write on module I can't press enter and begin to write a new line??
    Thanks!

    Touch the URL field at the top of the page, type your word and a list of possible searches will be shown. Near the bottom of this list will be "On this page" which shows hits on the page (if any). Touch this and you will be taken to the first match.

  • A php search engine that only shows results that match entire serch string

    I have set up a dreamweaver search engine through php and a fulltext search (WHERE MATCH (....) AGAINST (...). However, when someone inputs more than one word into the search form, the search engine churns out results that only have one of those words. How do I get it to only show results that have all the search string words inside? (or, at least, how do I get those results to show up at the top?)
    I have seen some advice (here) that uses php code to process the search query, divide up the words, and place a BOOLEAN '+' between each of the words. By doing this, the search engine will only show results that fully match all the terms.
    My problem is that I do not know how to put this code into my Dreamweaver-created code.
    My dreamweaver created code:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $form_rsSearch = "-1";
    if (isset($_get['search'])) {
      $form_rsSearch = $_get['search'];
    mysql_select_db($database_dataConnect, $dataConnect);
    $query_rsSearch = sprintf("SELECT title, content FROM encyclopedia WHERE MATCH (title, content) AGAINST (%s)", GetSQLValueString($form_rsSearch, "text"));
    $rsSearch = mysql_query($query_rsSearch, $dataConnect) or die(mysql_error());
    $row_rsSearch = mysql_fetch_assoc($rsSearch);
    $totalRows_rsSearch = mysql_num_rows($rsSearch);
    $input_rsSearchResults = "-1";
    if (isset($_GET['search'])) {
      $input_rsSearchResults = $_GET['search'];
    mysql_select_db($database_EMdataConnect, $dataConnect);
    $query_rsSearchResults = sprintf("SELECT title, content FROM encyclopedia WHERE MATCH(title, content) AGAINST(%s)", GetSQLValueString($input_rsSearchResults, "text"));
    $rsSearchResults = mysql_query($query_rsSearchResults, $dataConnect) or die(mysql_error());
    $row_rsSearchResults = mysql_fetch_assoc($rsSearchResults);
    ?>
    and the code the website (link above) gives is:
    function search(String $search_string) {
         //strip Boolean search characters out of search string
         $search_string = string_replace($search_string,"+","");
         $search_string = string_replace($search_string,"-","");
         $search_string = string_replace($search_string,"*","");
         //split the search string up into an array of words
         Array $tokenized_search = split($search_string, " ");
         //init an empty final search string
         String $processed_search = "";
         //for each word in the search, wrap it
         //with an + and * character and then append
         //it to the processed_search variable
         foreach($tokenized_search as $token) {
              $processed_search+="+"+$token+"* ";
         //build the sql for the query and query the DB
         String $db_query = "select id, description
              from product_descriptions
              where MATCH(description)
              AGAINST ('"+$processed_search+"' IN BOOLEAN MODE)";
         Array results = execute_database_query($db_query);
         return results;
    If anyone can instruct me on the correct way to go about this, I would be very much obliged.
    Thank you,
    YWSW

    Don't use the Search bar, type the address in the Location bar.

  • How to build an ObjectName pattern to list all objs of type=ServerConnector

    Hi,
    I would like to list all the MX objects of type=ServerConnector. How to build the pattern?
    The example below doesn't work (with pattern: resin:type=ServerConnector").
    It works when I want to list all objects and use pattern ("resin:*") or when I choose a specific ("resin:type=ServerConnector,name=b");
    Thanks for any advice,
    Ala
    {code}
    Object Name pattern = new ObjectName("resin:type=ServerConnector");
    MBeanServer mBeanServer = Jmx.getGlobalMBeanServer();
    Set poolNames = mBeanServer.queryNames(pattern, null);
    {code}
    And here all listed MX objects:
    resin:type=SessionManager,Host=default,WebApp=/
    resin:type=ServerConnector,name=i
    resin:type=ServerConnector,name=h
    resin:type=ServerConnector,name=b
    resin:type=Resin
    resin:type=ServerConnector,name=j
    resin:type=ProxyCache
    resin:type=Host,name=default
    resin:type=ServerConnector,name=c
    resin:type=ServerConnector,name=e
    resin:type=Port,name=192.68.1.50-6802
    resin:type=ServerConnector,name=g
    resin:type=ServerConnector,name=a
    resin:type=ThreadPool
    resin:type=WebApp,Host=default,name=/
    resin:type=WebApp,Host=default,name=/mya
    resin:type=ConnectionPool,Host=default,WebApp=/mya,name=jdbc/mya
    resin:type=ServerConnector,name=f
    resin:type=Cluster,name=cluster1
    resin:type=ServerConnector,name=d
    resin:type=SessionManager,Host=default,WebApp=/mya
    resin:type=Server

    You need to add a comma and asterisk to your pattern:
    Object Name pattern = new ObjectName("resin:type=ServerConnector,*");The pattern you are using will only match a single MBean with that exact name. There has to be an asterisk in the string in order for it to match like-named MBeans which have key/value pairs other than those in the string.
    For more on this, search in this javadoc for the string "property pattern":
    http://java.sun.com/j2se/1.5.0/docs/api/javax/management/ObjectName.html

  • Snow Leopard finder doesn't list all files on Windows 7 volumes

    From my Macbook Pro (10.6.8), I can connect to my Mac Pro, while it is running Windows 7 in Boot Camp, in order to access the Mac Pro's 6 volumes (1 Boot Camp, 5 Mac volumes). This is using SMB via Finder's 'Connect to server…' on an Airport network.
    However, Finder never displays all the files and folders on any of the Mac volumes it connects to through Windows 7. It seems to show approximately the first 18-9 files and folders, and then nothing. The same applies when I open a nested folder — it doesn't list all of its contents.
    Any ideas as to what's causing this and how I can fix it? I have searched all over but can't find any answers yet, so I'm hoping someone here has seen this before.

    Thanks for the reply, but I do have the Restore Windows box checked (see below). And the Resume features info (cnet link) only addresses how to turn the feature off, either selectively or globally. I'm simply looking for the functionality that I had with Snow Leopard and now seems to be absent. Maybe it's a bug in my Finder.

  • I just changed my residence to the US and now I cant register my new US credit card on itunes cause the state list doesnt match to the US states, what should I do?

    I just changed my residence to the US and now I cant register my new US credit card on itunes cause the state list doesnt match to the US states, what should I do?

    Your credit card info, billing address must be the same country as the iTunes store country you registering.
    For example, you can’t have a credit card from a U.S. bank with  a U.S. billing address registered in the iTunes store for China.
    I tried to change my payment information too, but it happened the same, I can change the information but when I get to the state part, it only shows the other country states
    Remove all payment info and save it.
    Then change the iTunes store country to U.S., add a U.S. credit card with a U.S. billing address.
    As previously suggested, if this does not work, contact iTunes store support.
    -> http://www.apple.com/support/itunes/contact/

  • Itunes doesn't list all of my recent podcasts. My show is Black Tribbles and it only shows episodes through March 2013, however we do at least two shows a week and they aren't listed. The feed works because the show update to my computer. Help please.

    Itunes doesn't list all of my recent podcasts. My show is Black Tribbles and it only shows episodes through March 2013, however we do at least two shows a week and they aren't listed. The feed works because the show update to my computer. Help please.

    Your feed is at http://blacktribbles.podomatic.com/rss2.xml
    When subscribed to in iTunes the recent episodes show, but the Store hasn't updated for some time.
    There appears to be an issue with the feed. In the episode 'WRESTLING MARCH MADNESS: Final Bracket & Championship' of 31st March you will find in the 'description' tag the following line:
    4. KURT ANGLE
    At the end of this line is an invisible character which seems to be wrecking the feed - although it works OK when suscribing in iTunes it won't load in a browser (and I also found the feed very slow to load, which won't help matters with the Store)
    This sort of thing usually happens when you paste text in from a word processing application and manage to include one of the invisible control characters. I don't know how easy it will be do do it in Podomatic but you should delete that entire line and retype it to remove this charter.
    You should keep an eye on the time it takes the feed to be accessed - if there is a long enough delay (and it was quite some seconds when I tried) the Store may well timeout and fail to read it. At the moment it's showing a cached version from the last time it was able to read it.

Maybe you are looking for

  • Preview unavailable for this image

    I have a Canon 7D and just purchased a 8gb Sandisk Compact Flash Card 60MB/s (UDMA) . I couldn't download the image from the camera to Lightroom and to be backed up on my hard drive (My Pictures) - message said - unkown error occured When I downloade

  • Quando faço a sincronização ele dá um erro e fiz que não consegue fazer backup

    quando faço a sincronização ele dá um erro e fiz que não consegue fazer backup

  • DATA Write back feature

    The Write back feature working on oracle 10.2 but not working on ORACLE 9.2.0.5 With patchset 10.1.0.3 and patchset 9.2.0.6 even when i click submit button the grid shows old values will it work on this version. Pls. confirm?

  • Sleep mode and downloading

    Will my MacBook Air continue downloading if it automatically goes to sleep (or if I put it to sleep)?

  • Capturing DVCam 24p

    I shot 16:9 DVcam footage on a V1u at 24p. What setting should I use to capture and edit this? I tried "DV NSTC Anamorphic" and it looks petty bad (horizontal aliasing), and frame rate was the usual 29.97. Thanks for your help! - Andrew