search

Finding all objects of type T in a tree structure C#

Hi, I need to write a tree search method which takes a type parameter T and returns all items of type T that exist in the tree. Is there any way to do this? I would prefer elegance over efficiency at this point... ...

MOSS 2007 Search Center. Altering Scope of a Search

Hello All!!! I'm creating a new Sharepoint Site Collection and as a subsite I have a Search Center. After creating a new Content Search (File Share), I can search this using the Dropdown from the Home Page. Searching "sharepoint" with Scope "All" : returns 4 items Searching "sharepoint" with Scope "ISOs and Tools" : returns 2 items ...

How do you search a database column that allows markup?

The text could be stored in the database using either markdown, bbcode, html, etc. Should I remove any allowed tags from the search terms? Does your markup parser have any method to assist in that task? I was going to use like '%searchword%' queries. Does full text search offer any advantages for such a simple text search? Update: It s...

Workaround for the MySQL 50% threshold for natural search

I have a table where I'm inserting, for instance, images and the names of the colors found in said images. The color string looks something like "white, yellow, orange, black". Since I have a lot of these, the 50% threshold is starting to drop off some colors, since they appear on most of the rows. The whole point of the table is to be...

How do you search through vim's command history?

I would like to have the following search in Vim too (reverse-i-search)`': Enter a word of your previous command, and you get the full command. I know the chronological history tool in Vim q: However, it is not that useful as the reverse search. How can you have a similar reverse search in Vim as in terminal? ...

How to design an approximate path solution?

Hello everyone. I am attempting to write (or expand on an existing) graph search algorithm that will let me find the path to get closest to destination node considering there is no guarantee that the nodes will be connected. To provide a realistic application of this, let's say I need to get from Brampton, Ontario to Hamilton, Ontario....

Back to Search Results implementation

What's the best way to implement "Back to Search Results" in an ASP.NET application? I've been letting users do the BACK button in the browser, but they always get a prompt to resubmit the form. Is there an effective way to work around this resubmit? Should I cache the search criteria/url in session and redirect them when they press '...

Visit all nodes in a graph with least repeat visits.

Hi. I have a tile based map where several tiles are walls and others are walkable. the walkable tiles make up a graph I would like to use in path planning. My question is are their any good algorithms for finding a path which visits every node in the graph, minimising repeat visits? For example: If the bottom yellow tile is the st...

How to search through all commits in the repository?

I have a git repository with few branches and dangling commits. I would like to search all such commits in repository for a specific string. I know how to get a log of all commits in history, but these don't include branches or dangling blobs, just HEAD's history. I want to get them all, to find a specific commit that got misplaced. I ...

Search Outlook directory

Hi, I'd like to know if it possible to search for people in Outlook directory via the Outlook COM component. If so, how? I've referenced the COM component and created a Microsoft.Office.Interop.Outlook.Application object in my C# code, but I don't know how to go further. What I wnat to do is have a first and last name as input, and be ...

Using SQL to determine word count stats of a text field

I've recently been working on some database search functionality and wanted to get some information like the average words per document (e.g. text field in the database). The only thing I have found so far (without processing in language of choice outside the DB) is: SELECT AVG(LENGTH(content) - LENGTH(REPLACE(content, ' ', '')) + 1) FR...

How do I subscribe to the resources of another google custom search engine

I set up a Google custom search engine that I truly love. From time to time I find other custom search engines to whose links I'd like to subscribe to. How do I do that? ...

How can I recursively search a list of lists for an item, getting the "closest" match

This may take a little explaining, so please bare with me. I have a class "Class" which has a member std::list, I want to search that list/tree for an item, specifically an item with a specific name. A basic representation of my class is as follows. #include <list> #include <string> class Class { std::string _name; std::list<C...

How to implement a Keyword Search in MySQL?

HI all, I am really a new sq l programmer, can some one help me in solving this. I have a table job where the fields are id,position,category,location,salary range, description, refno. I want to implement a keyword search from the front end. The keyword can be reside in any of the field of the said table. ...

Hibernate Search for multiple classes

There are two tables with no relation defined eg : Bugs and Comments For each bug id there are multiple comments.Suppose I am using a query like select b.bugid,b.bugtitle,c.comment from bugs b , comments c where b.bugid = c.bugid In hibernate search ,is there any method to write text queries for multifield searches ? In case, for a...

What are the best 3rd Party C# Libraries for searching HTML?

Basically what I want to do is, in C#, to take a string variable with some HTML and another with a search string in it and send them both to a method that returns whether or not it found anything and if so it returns a string variable that has the HTML with the search string highlighted in it. Are there any good libraries out there that...

School Locator by Address API ?

Does anyone know of an API or web site where if you enter in a home address, and it will return the listing of what elementary, middle/jr high, and high school that home is zoned too? I've found some for particular states and some large cities but nothing at a national listing services so that you can enter in any address (regardless of...

Implementing search on an ASP.NET MVC website

I've created a content-managed website using ASP.NET MVC. All content is stored in the 'Content' table in a SQL Server database, with the text itself stored in a column of datatype 'XML'. I want to add a search feature to the site that will search all the XML content and return a list of results, each of which links to the content item....

Using JSON in Javascript to obtain results from Google Search Ajax API

Hi! I am trying to obtain the url from the innerHTML of a web page using javascript. This is what I'm doing: var goog = newTabBrowser.contentDocument.getElementsByTagName("pre")[0].innerHTML; alert(goog.responseData.results[0].url); BUT it wont work :S I outputted goog (using alert) and copied that into my program as follows: v...

Unable to search repeated sentences in Vim

I run the following unsuccessfully in Vim's search mode ^(\1) (\2) I am trying to find lines which two first words are the same in my .vimrc. How can you search these lines in Vim? [edit after the first answer] I found the handy tool :sort u How can I compare my 1st version and the subsequent version after the command? ...