I wrote this for self education. How does it look? (It passes all my junit tests.)
/**
* find needle in haystack
* @param haystack a sorted list
* @param needle
* @return i such that <code>haystack[i] == needle</code>, or -1 if it is not found
*/
public static int find(char[] haystack, char needle) {
int minWindow = 0; // lower ...
Hi,
how do I limit the search in a boost::multi_index by the result of a previous search?
As an example: suppose I have a rectangle class with an internal value like this:
class MyRect
{
public:
int width;
int height;
double value;
}
and I need a data structure of such object to answ...
Hello,
I'm trying to search into Rapidshare files, but I don't know what syntax should I use. how can I send a word to search to Rapidshare API URL and get the result back??
http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=listfiles%5Fv1&type=col&login=mazzikatv&password=123456&term=Word%5FTo%5FSearch
Thanks
...
Hi Guys,
I'm trying to design a program in PHP that would allow me to find files with specific file extensions (example .jpg, .shp etc) in a known directory which consists of multiple folders.
Sample code, documentation or information about what methods I will be required to use will be much appreciated.
...
In Delphi 2010 a new Find bar has been added beneath the source editor.
Though I sounds like a good idea I find it prettry anoying when F3 should be pressed multiple times for finding next matches. It works from time to time for me.
How I can switch it off and use the old search fnctionality?
...
What tools are out on the market that can index documents and text?
Ideally they need to fall into these categories.....
Be able to work within medium trust
Be open sourced
Be able to analyse and strip out the text from documents (pdf/office docs/docx)
Be able to create snippets and highlight from search terms
Be able to search fuzzy...
I made some searches in google and only uncompressed things i fond are ajax apis (jquery, mootools and etc). So probably there isn't uncompressed version of the search API, but if I'm wrong please tell me :).
...
Google is unfriendly to searching for verbatim strings with characters like $ and #. Is there a search engine that supports searching for verbatim strings?
I'm aware of this question that was asked a while ago, but didn't get any good answers. I'm ready to put a bounty if I still can't get an answer. Of course it's entirely possible tha...
I've been googling but haven't found any good info on building a good search function in a ASP.NET MVC project.
Off the top of my head, a search feature for searching authors and books would look like this:
char[] delimiterChars = { ' ', ','};
string[] searchterms = SearchBox.Split(delimiterChars);
IQueryable<SearchResult> SR = _db.Boo...
Hi,
I have to use proximity search with postcode for Australia. Going through some links like
http://www.randommouse.com/rms/about/product/FNDRY/docs/tutorial/08/how-to-add-google-maps-to-your-review-site-intro.html
I found that I have to manage the the post codes with latitude and longitude if I am not mistaken. But i could not fin...
I want to open a screen when use click @ search button on the handset... how can i know that search button is pressed over the handset ??
...
First, it seems this question is not program related, however I still make up my mind to post this question here since there is opaque definition on it. If you think it is wrong feel free to delete it.
I am curious about how Google and other search engines determine keywords? Do they just find keywords like we do by using CTRL+F and cou...
I'm supposed to write a web crawler in Java. The crawling part is easy, but the indexing part is difficult. I need to be able to query the indexer and have it return matches (multiple word queries). What would be the best data structure for doing such a thing?
...
Hey I have a program that will allow me to find and display specific file types, but it won't work for files located in a network drive.
How do I get around this problem? here's the code:
<?php
clearstatcache();
$sourcepath = "C:/Inetpub/wwwroot/IMS/n_test";
// Replace \ by / and remove the final / if any
$root = ereg_replace( "...
Google/GMail/etc. doesn't offer partial or prefix search (e.g. stuff*) though it could be very useful. Often I don't find a mail in GMail, because I don't remember the exact expression.
I know there is stemming and such, but it's not the same, especially if we talk about languages other than English.
Why doesn't Google add such a featu...
I am using a GCS engine on a site. I don't want a custom search, just a regular google search with the Adsense linking. If I use the main google.com site to search for "gallerykunst" the expected result shows up as #1, in the CSE it does not exist at all.
Any ideas!?
...
Hi all,
I have an eclipse project with a number of sql queries here and there.
I wonder if I can perform a search on eclipse for all insert statements in the project, and have eclipse pipe the output into stdout or a file printed in a list format; the file should contain only the search matches and not the project hierarchy
...
Hi,
My site needs postcodes display with given post code and distance (miles or km). I have to implement it using google api. Is it possible to do so? The country for which i need to use this is Australia. I am trying to find out the solution for two days. Can anyone help me out.
Thanks in advance
...
Various incarnations of this question have been asked here before, but I thought I'd give it another shot.
I had a terrible database layout. A single entity (widget) was split into two tables:
CREATE TABLE widgets (widget_id int(10) NOT NULL auto_increment)
CREATE TABLE widget_data (
widget_id int(10),
field ENUM('name','size','color...
Years ago I programmed a magazine-style site in ColdFusion. It had a site search function to full-text search (using SQL Server) the articles and blog posts. It worked fine, but then we were hit with a SQL injection attack (my fault). The site owner decided to take down the search, and only recently asked me to make it live again.
I kno...