1
голосов
1ответов
797 просмотров

PHP & MySQL & forms -- flexible search? (ex: X ingredients can make Y recipes)

I'm just getting started with PHP/MySQL, so please forgive the rather simplistic question: As a practice example, I want to create a small dbase of recipes. Each recipe has X different ingredients. The table is simple enough I think - each row represents a recipe and each column after the first(...

13
голосов
13ответов
18598 просмотров

How to find k nearest neighbors to the median of n distinct numbers in O(n) time?

I can use the median of medians selection algorithm to find the median in O(n). Also, I know that after the algorithm is done, all the elements to the left of the median are less that the median and all the elements to the right are greater than the median. But how do I find the k nearest neighbo...

1
голосов
2ответов
728 просмотров

SQl Server 2008 FILESTREAM, Indexing Services, and FTS

I need to implement a service to search PDFs. Initially I started using SQL Server 2008 FTS, but soon realized that my PDFs would have to be stored in the DB itself. I was then pointed to Indexing Services as well as to the SQL 2008 FILESTREAM data type so that I can store PDFs in the file syst...

6
голосов
4ответов
5175 просмотров

What is the fastest way to find all occurrences of a substring?

This is purely out of curiosity. I was browsing through an article comparing various string search algorithms and noticed they were all designed to find the first matching substring. This got me thinking... What if I wanted to find all occurrences of a substring? I'm sure I could create a loop t...

11
голосов
5ответов
2582 просмотров

Algorithm that searches for related items based on common tags

Lets take StackOverflow questions as example. Each of them has multiple tags assigned. How to build an algorithm that would find related questions based on how many common tags they have (sorted by number of common tags)? For now I can't think about anything better than just selecting all questi...

4
голосов
5ответов
434 просмотров

Google search algorithm for wrongly spelled search keywords

I wonder how Google find the exact word, even if we mistyped it in search box. I want to know if such open source algorithm is available?

0
голосов
3ответов
124 просмотров

Searching SQL Server

I've been asked to put together a search for one of our databases. The criteria is the user types into a search box, SQL then needs to split up all the words in the search and search for each of them across multiple fields (Probably 2 or 3), it then needs to weight the results for example the re...

38
голосов
3ответов
19047 просмотров

Exact string match in vim? (Like 'regex-off' mode in less.)

In vim, I often want to search on a string with finicky characters which need escaping. Is there a way I can turn off the meaning of all special characters, kind of like regex-off mode in less, or fgrep? I am dealing with particularly hairy strings; here's an example: ((N/N)/(N/N))/N Not havi...

2
голосов
1ответов
295 просмотров

How to perform search on MySQL table for a website

How do I perform a search similar to that of Wikipedia on a MySQL table (or several tables at a time) without crawling the database first? (Search on wikipedia used to show you the relevancy in percentage). What I'm looking for here is how to determine relevancy of the results and sort them acco...

2
голосов
2ответов
2010 просмотров

Search and replace strings in PDF with Perl, Ruby, or PHP

Is there a way to script replacing strings in PDF documents? I can use either Perl, Ruby or PHP. If possible, a regular expression would be a great.

1
голосов
4ответов
855 просмотров

how to get autocomplete response in 100ms (milliseconds)

I am trying to build an auto-complete text box which will give results in about 100ms. I have checked Google with firebug it is 74ms, stackoverflow has 500ms. I am using drupal6 and it is taking 800ms for auto complete which is not useful at all. Can anybody suggest to me how I can build an au...

1
голосов
2ответов
229 просмотров

Search for rails that does ranking of results according to field

I want to add search functionality to my Rails website. The search has to rank results according to relevancy. By this I mean if the search occurs in the post title it should be given higher score than post body and post comments. Also, it would be nice to rank a post higher if the phrase occurre...

0
голосов
2ответов
12939 просмотров

Simple Database Viewer and Search Tool

I've exported all the old orders out of our old store into a mySQL DB. Anyone know of a simple project or web based app that will let you search all fields with a wildcard? So if I type in sha automatically any results with those letters would popup. This would be similar to dbman but with mys...

2
голосов
2ответов
4980 просмотров

Search and Replace of text in a memorystream in C# .NET

I have loaded a memorystream with a word document and I want to be able to alter specific text within the memorystream and save it back to the word document, like search and replace functionality. Please can anyone help me with this as I don't want to use the Word Interop libraries. I have the ...

0
голосов
1ответов
67 просмотров

How to best deal with photos passed to IFilter?

I'm implementing an IFilter for indexing image formats. One problem is photos - many users have tons of photos, photos are huge and loading and searching for text on them is time consuming. Yes, sometimes people use cameras instead of scanners for digitizing documents, but the potential problems...

0
голосов
1ответов
1903 просмотров

Stored procedure search using entity framework

I want to implement a search logic that I have seen and use. It works like this: There is stored procedure that is loaded in entity framework and it is used as a method in C#, it takes parameters in order to perform search. That method is returning list of views (DB View). The views in list ha...

0
голосов
1ответов
1684 просмотров

widget for implementing auto complete for search engine

I'm putting together a search engine. I need a text field (with autocomplete) and a Search button. (Clicking the Search button submits the form.) There are many javascript autocomplete solutions out there (some are listed at http://webtecker.com/2008/03/10/10-auto-complete-ajax-scripts), but I...

1
голосов
1ответов
5513 просмотров

JQGrid Search form behind the transparent modal overlay window

This has got to be a stupid mistake but for the life of me I can't figure it out. I am trying to use the search feature from the navigator of jqgrid. When I click the search icon the form displays above the grid but then the entire area (grid and search form above it) are covered by a transparent...

25
голосов
5ответов
3649 просмотров

search functionality on multi-language django site

I'm building a multi-language Django site, and I'm using django-transmeta for my model data translations. Now I'm wondering if there is a Django search app that works with multi-language models. I've played with Haystack and it works fine for single-language sites, but I can't get it to work with...

0
голосов
3ответов
230 просмотров

searching a List<>

I have a List<Order> public int OrderID { get; set; } public string CustID { get; set; } public string Details { get; set; } I want to write a method that accepts a ID, then searches this List for matching records that have same CustID and returns ORderID and Details in a List<>

2
голосов
1ответов
2795 просмотров

WPF - Filtering/Searching multiple collection views within a treeview

I have a treeview that is bound to a collection and each item in the collection is bound to another collection. (using hierachle data templates) I would like to use the collection view .Filter event handler to search the tree. The problem is that I need multiple collection views. What would be ...

4
голосов
2ответов
378 просмотров

Search is only matching words at the beginning

In one of the code examples from Apple, they give an example of searching: for (Person *person in personsOfInterest) { NSComparisonResult nameResult = [person.name compare:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch) range:NSMakeRange(0, [...

0
голосов
2ответов
849 просмотров

Need some help with binary chop search

I am trying to work ahead in my algorithms class this year :D and I am doing the class work (so its not marked or assessed as such but just for practice I suppose leading up to a piece of coursework) Anyway - we have been given a list of names as a textfile that take the following format "surna...

0
голосов
1ответов
483 просмотров

JQuery $( returning null

I am having problems with my JQuery returning null. Here is my JQuery (which is contained in a .js).... $(document).ready(function() { var chkBox = $("#gvEntryPoints input[id$='cbxIncludeAll']"); chkBox.click(function() { $("#gvEntryPoints input[type='checkb...

1
голосов
2ответов
58 просмотров

Skip the .xsd when searching

We use the built in table adapter wizard in VS2005 to build a portion of our app, resulting in an enormous .xsd file being generated. It's never interesting to have this .xsd included when searching through code, so I would like to be able to skip it when using Visual Studio Find. Is this possib...

1
голосов
1ответов
118 просмотров

What's a good strategy for exposing fatal IFilter problems to the user?

How do I expose errors that occur inside an IFilter to the user? The IFilter can be loaded by a variety of Microsoft products, server products like SharePoint included. It will be separated into modules one of which is an NT service for handling indexing huge files, connection will be performed ...

3
голосов
2ответов
4614 просмотров

Python module search path problem

I am trying to work on a dev environment but am find problems in that python seems to be using modules from the site-packages directory. I want it to be using the modules from my dev directory. sys.path returns a bunch of dirs, like this ['', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr...

2
голосов
1ответов
1048 просмотров

Zend_Search_Lucene query parsing problem

Here's the setup, I have a Lucene Index and it works well with the 2,000 documents I have indexed. I have been using Luke (Lucene Index Toolbox, v.0.9.2) to debug queries, and am using ZF 1.9. The layout for my Lucene Index is as follows: I = Indexed T = Tokenized S = Stored Fields: author - I...

1
голосов
2ответов
328 просмотров

iPhone : parse Lengthy XML file on the Base of Key Field

i want to parse the xml File. xml File structure is following <?xml version="1.0" encoding="utf-8"?> <Level> <p id='327'> <Item> <Id>5877</Id> <Type>0</Type> <Icon>---</Icon> <Title>Btn1Item1</Title&g...

1
голосов
1ответов
66 просмотров

Is there enough information to know what this regex is searching and replacing?

Could anyone explain what's being replaced here? I don't know if enough information is present to understand what's being searched and what's being replaced: regEx.Pattern = "(\s) *(\S)" regEx.Global = True that = regEx.Replace(that, "$1$2")