Search Results

Search found 19563 results on 783 pages for 'binary search'.

Page 209/783 | < Previous Page | 205 206 207 208 209 210 211 212 213 214 215 216  | Next Page >

  • Linq to SQL Where clause based on field selected at runtime

    - by robasaurus
    I'm trying to create a simple reusable search using LINQ to SQL. I pass in a list of words entered in a search box. The results are then filtered based on this criteria. private IQueryable<User> BasicNameSearch(IQueryable<User> usersToSearch, ICollection<string> individualWordsFromSearch) { return usersToSearch .Where(user => individualWordsFromSearch.Contains(user.Forename.ToLower()) || individualWordsFromSearch.Contains(user.Surname.ToLower())); } Now I want this same search functionality on a different datasource and want to dynamically select the fields to apply the search to. For instance instead of IQueryable of Users I may have an IQueryable of Cars and instead of firstname and surname the search goes off Make and Model. Basically the goal is to reuse the search logic by dynamically selecting what to search on at runtime.

    Read the article

  • Apache loads any file that begins with the same string as used in url. How to prevent this?

    - by MarshallBananas
    If I point to: mywebsite.com/search and there is a file called search.php or search.html or search.inc.php or search.whatthehell.php in website's directory, Apache will point to that file instead of 404'ing. What is even more annoying is that if I point to: mywebsite.com/search/string?also=whatever Apache will still display any file with filename that begins with "search.". Also, all RewriteRules with patterns containing filenames existing in directory are ignored/useless. I'm using Apache 2 on Mac, unmodified httpd.conf. How do I prevent it from redirecting my urls so freely?

    Read the article

  • some examples for using specific searchalgorithm

    - by Robert
    I could understand the following search algorithms: Constraint Satisfaction with Arc Consistency, Uninformed search A* Search MinMax I would understand the definition and working principles of the above algorithm,but could you please give me some real world examples that the above algorithms will be suitable?My idea would be: For CSP with Arc Consistency,assign students to groups that each group must contain both technical and management students,and no 2 technical students in a same group. Uniformed Search: search for a file under UNIX directoy. A* Search: search a way (staring from home) to go to mulitple stores to buy things then get back home with minimum total travelling time. MinMax:Go or other Chess. Please correct me if I am wrong.

    Read the article

  • Same html file for different topics on Help Files

    - by Gpoy Gwapo
    I have a problem with the help files. For example i have this html file named search.html and there are 2 topics on my table of contents namely Name Search and Account Search. The same search.html will be used for the 2 topics. Now, i want to open the help file and point it to Name Search but instead, the treeview item that is opened on the table of contents is for the Account Search. How can i set it so that the the Name Search will be the one selected on the table of contents?

    Read the article

  • Add RESTful Action

    - by Drew Rush
    The source of my information is section 2.9 here: [http://guides.rubyonrails.org/routing.html#connecting-urls-to-code][1] What I'm trying to do is add a custom action "search" and corresponding view. So, as it says to do in the documentation, I've added this code in my config/routes.rb file: resources :dimensions do collection do get "search" end end I've also defined in the dimensions_controller file: def search @dimensions = Dimension.all respond_to do |format| format.html # search.html.erb format.json { render json: @dimensions } end end I then stopped and restarted the rails server, but when I navigate to /dimensions/home, I'm still getting this error message: Couldn't find Dimension with id=search Also showing that my parameter is: {"id"=>"search"} So am I just missing another bit of code that gives the instruction to interpret /dimension/search as a collection action as opposed to the show action? Thanks for your time.

    Read the article

  • Searching in Rails 3

    - by cbarton
    Here is the situation: I have the need to search for specifics or generals, much like expedia.com or your local library catalog search. In that there are fields that may or may not be filled out based on the individual need. It acts much like an "advanced search page". I have all of that code done for the models/controller and such and have it setup with a Searches controller along with matching model and views. The question that I have is there a way to cut down the amount of parameters posted to GET so that the url isn't search?search[:a]=""+search[:b]=""+search[:c]="x"... plus the unicode checkmark. I only want the filled out fields to be shown in the response link especially minus the checkmark. cbarton

    Read the article

  • nhibernate3 weaknesses

    - by Adrakadabra
    from the moment we've migrated from hibernate 2 to hibernate3 ,around 30% of queries can not execute anymore,while there were not any problem with the previous version. does anybody have such problems? for example some of errors we see r like these Specified cast is not valid: Repository<CountrySubdivision>.Find(p => p.Parent.Id == parentId); specified method is not supported: public JsonResult AllEducationDegree(string search) { var data = Repository<EducationDegree> .FindBySpecification(new EducationDegreeSpecification().Search(search)) .Take(10) .Select(p => new NameValue(p.Title, (int)p.Id)) .ToList(); // .AsDropdown(" "); return Json(data, JsonRequestBehavior.AllowGet); } public class EducationDegreeSpecification : FluentSpecification<EducationDegree> { public EducationDegreeSpecification Search(string EducationDegreeSearch) { if (!String.IsNullOrEmpty(EducationDegreeSearch)) { string[] searchs = EducationDegreeSearch.Split(' '); foreach (string search in searchs) { if (!String.IsNullOrEmpty(search)) { AddExpression(p => p.Title.Contains(search)); } } } return this; } }

    Read the article

  • mod_rewrite with GET requests

    - by iMaster
    I have mod_rewrite working on most of my site. Right now I have a search that normally would point to search.php?keyword=KEYWORD And I'm trying to rewrite that to search/?keyword=KEYWORD Just to make it a little bit cleaner. So here's my mod_rewrite. (There are other rules I'm just posting the one that isn't working.) RewriteRule ^search/?keyword=([^/\.]+)/?$ search.php?search=$1 When I type a search in the address bar way I want it to be, I get a page telling me its a "broken link" (I'm guessing that that's Chrome's equivalent of a 404 error). So what am I doing wrong? I think that the problem is the '=' or the '?' sign in the rule (the first part) because when I take the ?keyword= part out, it works. Does that make sense?

    Read the article

  • zend like mysql problem

    - by pradeep
    hi, I am trying to use like in zend switch($filter2) { case 'name': switch($filter1) { case 'start_with': $search = "\"pd_name like ?\", '$patient_search_name%'"; break; case 'contains': $search = "'pd_name like ?', '%$patient_search_name%'"; break; case 'exact_match': $search = "'pd_name = ?', $patient_search_name"; break; } break; case 'phone': switch($filter1) { case 'start_with': $search = "'pd_phone like ?', '$patient_search_name%'"; break; case 'contains': $search = "'pd_phone like ?', '%$patient_search_name%'"; break; case 'exact_match': $search = "'pd_phone = ?', $patient_search_name"; break; } break; } $select = $this->getDbTable()->select() ->from("patient_data", array('*')) ->where("$search"); but when i see the query log its like SELECT `patient_data`.* FROM `patient_data` WHERE ("pd_name like ?", 'bhas%') where as the ? should have been replaced by the value ....how to solve this??

    Read the article

  • Google Ajax Search results differ from "normal" Google Results ?

    - by jAndy
    Hi Folks, I guess anything important you might have to know is within the title. If I use the Google Ajax WebSearch API with, for instance, "Dummy Search" as phrase, my resultset is a different one than if I perform the same phrase over google.com. How can that be? My querystring paramter options are exactly the same, language etc. Thanks in Advance & Kind Regards

    Read the article

  • Does WF4 have the ability to search for instances?

    - by racingcow
    Hello, I have a WF4 workflow service deployed in AppFabric. Is there any built-in way to do a generic search across all currently active workflow instances? For example, "get me a list of all active instances that have variable x = 5"? If someone could point me in the right direction on this it would be much appreciated.

    Read the article

  • Any ideas on How to search a 2D array quickly?

    - by Tattat
    I jave a 2D array like this, just like a matrix: {{1, 2, 4, 5, 3, 6}, {8, 3, 4, 4, 5, 2}, {8, 3, 4, 2, 6, 2}, //code skips... ... } I want to get all the "4" position, instead of searching the array one by way, and return the position, how can I search it faster / more efficient? thz in advance.

    Read the article

  • MYSQL: how to search for fields that hold values sep. by commas?

    - by andufo
    hi. i have 2 tables: tags (id_tag,name) news (id,title,data,tags) The field newstags is a varchar(255). Im planning to put data like this in that field: "1,7,34" That means that a particular row in news is linked to tags 1, 7 and 34 from the tags table. Then, how can i search for ALL news records that have the 34 value (among others) in the tags field? Is there a better way to do this?

    Read the article

  • To Search Only title tag for &raquo; using visual studio 2008

    - by Kuldeep Kumar
    i need to update only title tag of my website having around 3000 web pages. i have to replace » with Dash if it is present only in title tag. Please help if there is any way in visual studio 2008 to find a Standard HTML (DOM) Tag. i've done this using dreamweaver Advance text search. but on development machine, only visual studio 2008 is available.

    Read the article

  • How can I search on a list of values using Solr/Lucene?

    - by Mike
    Given the following query: (field:value1 OR field:value2 OR field:value3 OR ... OR field:value50) Can this be broken down into something less verbose? Basically I have hundreds of category IDs, and I need to search for items under large groups of category IDs (20-50 at a time). In MySQL, I'd just use field IN(value1, value2, value3) rather than (field = value1 OR field = value2 etc...). Is there a simpler way for Solr/Lucene?

    Read the article

  • How can I search for a text and fill/click on a link with Selenium?

    - by Shady
    Here's the deal: Is there a way to search for an input name or type witch is not precise and fill it? For example, I want to fill any input with the name email with my email, but I maybe have some inputs named email-123, emailemail, emails etc... Is there a way to do something like * email * ? And how can I click on a link verifying some text that could be on the link, or above the link, or close, or at class etc ? ps: I'm using selenium ide with firefox

    Read the article

< Previous Page | 205 206 207 208 209 210 211 212 213 214 215 216  | Next Page >