search

mark all the instances of a word (Delphi, RichText)

OK, this is a problem that's been nagging and I can't see to find a definitive answer. How do you find and mark all instances of a word? What I mean is, I search for a word (say: Person). If the word exists the I mark (using red or whatever color) all instances of that word in the richedit. If I press Esc then it gets deselected. Any i...

Drupal search - alternative ways of doing it?

3rd Drupal question in a day.. guess what I'm doing! OK, I've got the default Drupal search block, but I really need to find a way of restricting it to just searching one particular content type which is called "recipes" (guess what that one contains!) Does anyone have any ideas on how I can restrict the search and then go about contro...

Criteria building nhibernate

Hi, I was wondering if someone could help with an example criteria for nhibernate. I think I've got my head around fairly basic things, like finding records in a given table who's field matches a certain value etc. Where I'm currently tripping up is where you have a table with a foreign key for another table, and attempting to find rows ...

Search for accentuated char in mysql

I need to find occurences of é ou è in a mysql table. First tried : SELECT "LéL" like "%é%"; which doesn't work : it returns word containing e or é or è. I also tried with regex without results (using the the letter L): SELECT "Lbc" REGEXP ".*L.*"; -- works : it finds L in the string LBC SELECT "Lbc" REGEXP ".*\u4C.*"; -- does...

Fulltext Search with InnoDB

I'm developing a high-volume web application, where part of it is a MySQL database of discussion posts that will need to grow to 20M+ rows, smoothly. I was originally planning on using MyISAM for the tables (for the built-in fulltext search capabilities), but the thought of the entire table being locked due to a single write operation m...

Google search results API usage?

My question is regarding the google AJAX search api. I have been trying to figure this out by exploring their site with no luck. How can I use this API on my site but have the results only be the google results from within my site (i.e. only shows the site:mydomain.com results and NOT the results from a standard google.com search)? Is ...

Any free ajax poll script?

Hello, do you guys know any free php ajax poll script with an admin panel? i cant find one, i have googled for ages. ...

"Search within distance" API for OpenStreetMap

Is there any API for OpenStreetMap which allows me to obtain a list of POIs within a certain distance (e.g. 10 miles) from a reference location? ...

Ternary search in C

I want to do a ternary search for integers in C ... I have tried it...but it's not working well for particular cases. Please help me to remove the bugs from the following program-- My attempt: #include<stdio.h> #include<conio.h> void tsearch(int *a,int i,int j,int k); main() { int a[30],n,i,k; printf("\nEnter n:"); scanf("...

What's wrong with my Lucene query?

Hey SO, I'm running Zend_Search_Lucene, which is almost exactly the same as normal Lucene. I'm keeping stores in my Lucene index, and they're holding this: id of store for sql - 'store_id' of field type keyword name of store - 'name' of field type text latitude of store - 'lat' of field type keyword longitude of store - 'lng' of fi...

Search in :normal vim command misbehaves

This popped-up while writing a script for vim. Using the well-documented ':normal' command: :normal /abc does not search for the string abc. Instead, the previous search string is still active (i.e highlighted, jumped to with n, etc.). Even stranger: the abc appears as the newest pattern in the / history (i.e. hitting / and then ...

How do I select all elements in a list that are out-of-order?

This question arose from the discussion in the comments of this answer. First, let's say it's quite difficult to define what out-of-order is. Taking the example Pavel Shved gave, in the list [1,5,10,2,3,4,5,6,7,8,9,10,11] we can "clearly" see that 5 and 10 (indices 1 and 2) are out of order. But a naïve algorithm that simply checks some...

ASP.NET : Reading form variable values in the action page of search form

I have a website where i want to implement search functionality.So i added the below code to have a search box in my html page <form id="search" method="post" action="Results.aspx"> <input id="txtSearchKey" type="text" name="txtSearchKey" /> <input id="Submit1" type="submit" value="submit" /><br /> <br /> </form> in Res...

Best way to search for R packages?

Related question how to search for r materials Part of the reason why the R community has been attracted to a tag based service like StackOverflow---I think---is that information on R is fundamentally difficult to find online. Services like RSeek have made this slightly less painful, however, I often find the search results scatte...

Search and remove item from listbox

Is there a way to remove an item from a listbox based on a string? I have been playing around for a few minutes and here is what i have so far but its not working foreach(string file in LB_upload.Items) { ftp.Upload(file); int x = LB_upload.Items.IndexOf(file); LB_upload.Items.RemoveAt(x); } I could just loop through each...

How to extract phrases and then words in a string of text?

I have a search method that takes in a user-entered string, splits it at each space character and then proceeds to find matches based on the list of separated terms: string[] terms = searchTerms.ToLower().Trim().Split( ' ' ); Now I have been given a further requirement: to be able to search for phrases via double quote delimiters a la...

mySQL LIKE query

Hello, I am trying to search my db for a string. But it should be able to match any word and not the whole phrase. Suppose table data has text like "a b c d e f g". Then if I search for "d c b" it should be able to show the results. field LIKE '%d c b%' does not work like that Can someone suggest a more robust way to search, possible...

Batch file to find all files in a directory containing an HTML string then output list to a text file

Hi, I've made several attempts at this but get nothing but "can't open..." errors, so I'm asking here: I want to find all instances of the string "SOME TEXT" within a directory full of HTML files. Then the search results should be output to a file in that same directory (D:\myfiles) ...

Can I access MS Search/SharePoint Search results programmatically in ASP.NET?

We would like to be able to search uploaded pdf's for keywords from out public website. I have sucessfully configured a VS for a proof-of-concept that is crawling and indexing our (scanned and OCR'd) pdf's! This was a pain, but it's working in a full 64-bit implementation, both with uploaded files (to SQL Server) and from a file share ...

ASP.NET : How to do IIS Indexing search feature for my website

I want to implement a search feature to my webapplication which has 50 + static files which are rich in meta tag contents. I want to add one ASP.NET page to the application which would show the searchresults when someone go for a search. Can anyone guide me how to go ahead ? ...