search

faster than binary search for ordered list

is there an algorithm that is faster than binary search, for searching in sorted values of array? in my case, I have a sorted values (could be any type values) in an A array, I need to return n if the value I was looking is in range of A[n] and A[n+1] ...

How does pathfinding in RTS video games work?

In a game such as Warcraft 3 or Age of Empires, the ways that an AI opponent can move about the map seem almost limitless. The maps are huge and the position of other players is constantly changing. How does the AI path-finding in games like these work? Standard graph-search methods (such as DFS, BFS or A*) seem impossible in such a s...

Using google search API services in the backend using C#

I'm trying to use the google search API services in the backend using C#. I know there is ajax api that you can use with javascript. so what is the similar thing in C# so I can use it at the backend level. I know that I can do it this way: var searchTerm = "Paris"; var web = new WebClient(); web.Headers.Add("Referrer", "http://localho...

Using PHP to search a text file.

I'm trying to create a code to download mp3 files embedded in a page. It starts out as a submit form. You input the URL and submit it, and it writes the HTML source of that page to a text file. I also set the script to search the source to see if there is an audio file embedded. I suppose I should include that it's not in the format of f...

Is there a way to only search for specific kinds of books such as textbooks with Google Book Search API?

I noticed that there are a few a classes such as CategoryFilter that can be used on the VolumeQuery in the Google Book Search Java API. Could this be used for only searching for specific kinds of books like textbooks, or is there a better approach to this kind of search? There doesn't seem to be too many examples online or details in the...

Anyone know what twitter uses for their Search Engine?

What search engine does twitter use for search.twitter.com ...

break down a complex search query in Rails 3

I have a controller which has a lot of options being sent to it via a form and I'm wondering how best to separate them out as they are not all being used simultaneously. Ie sometimes no, tags, sometimes no price specified. For prices I have a default price set so I can work around with it always being there, but the tags either need to...

Retrieve set of rectangles containing a specified point

I can't figure out how to implement this in a performing way, so I decided to ask you guys. I have a list of rectangles - actually atm only squares, but I might have to migrate to rectangles later, so let's stick to them and keep it a bit more general - in a 2 dimensional space. Each rectangle is specified by two points, rectangles can ...

how could I make a search match for similiar words

I'm working trying to automatically categorize short articles and I'm trying to figure out how to match similar words - eg, shelf shelves or painting and repaint I'm using the Porter stemming algorithm but it only helps for certain situations and only with the end of the word (both examples above don't work with it). Is there an algo...

Haystack more_like_this returns all

I am using Django, haystack, solr, to do searching. Ive am able to search and now I would like to find similar items using more_like_this. When I try to use the more_like_this functionality I get back all of the objects that are of that model type instead of just the ones that closely match it. Here is some code to show you how I am usi...

How to index a Blog as a search engine ?

I want to create a simple search engine for learning purpose. I want to know how to index a simple blog site. A blog site has many pages and in every page there is a blogpost. But in every page there are other stuff in common as well ( header, footer, category block and other stuff ). In your opinion, How can I index this blog ? The ...

Using the RESTful interface to Google's AJAX Search API for "Did you mean"?

Is it possible to get spelling/search suggestions (i.e. "Did you mean") via the RESTful interface to Google's AJAX search API? I'm trying to access this from Python, though the URL query syntax is all I really need. Thanks! ...