search

Problem with description of my site and google search

My HTML page : http://www.faressoft.com <meta name="description" content="فارس سوفت الاسم الرائد في عالم البرمجيات العربية" /> When I search for my site name "فارس سوفت" using google, the description contains my description and the error message of my contact form. why ? ...

How to search text usign php if ($text contains "world")

How to search text usign php ? I means : <?php $text ="hello World!"; if ($text contains "world") { echo "True"; } ?> ...

C Programming: limited time to search

I'm creating a C program to play Gomoku. It uses Minimax search to decide on the best move. However, it can only search for the best move for 10 seconds. How to I determine when my search function has spent 10 seconds searching. If you could provide me with either an example or a link to the documentation that would be much appreciated. ...

How to replace the first occurrence of a regular expression in Python?

I want to replace just the first occurrence of a regular expression in a string. Is there a convenient way to do this? Thanks, ...

Search an Array Android

I have a textbox and search button, now all I need is the code to implement searching an array. The array I have is called Facts_Array (consists of strings). Comment if you need any more information. ...

How do I hook the hardware search button on WP7

I have a WP7 app that has a search page. I would prefer to hook the hardware search button rather than having to add search icons to the menu bar. Has anyone figured out how to do this? ...

Efficiently Search Nearest Geographic Locations

I searched on SO and didn't really find an answer to this but it seems like a common problem. I have several hundred thousand locations in a database, each having the geocode (lat/long). If it matters, they are spread out across the U.S. Now, I have a client app in which I want users to give me their lat/long and a radius (say 5mi, 10mi...

Searching Color Similarity

I'm working on a project that involves scanning in colors to RGB then searching through a database of more RGB data to see what is most similar to the scanned in color. I've decided that the easiest way to determine what "similar" means in this case is to represent the colors in three dimensional space and then find the distance between ...

Calling search gurus: Numeric range search performance with Lucene?

I'm working on a system that performs matching on large sets of records based on strings and numeric ranges, and date ranges. The String matches are mostly exact matches as far as I can tell, as opposed to less exact full text search type results that I understand lucene is generally designed for. Numeric precision is important as the da...

Search array for values from database

I have a database filled with employee ID's and corresponding employee names for each employee ID. Is there a way I can search an array for employee ID's from the database? Google is not helping me, I think because I'm not sure how to word my search. My idea is to have something like, array_search($empID, $currentArray). And then loop t...

Basic Python file searching and I/O

Hello, I'm trying to complete a simple task in Python and I'm new to the language (I'm C++). I hope someone might be able to point me in the right direction. Problem: I have an XML file (12mb) full of data and within the file there are start tags 'xmltag' and end tags '/xmltag' that represent the start and end of the data sections I w...

Redirecting to search params in lift

I have a search box that sends an ajax request to a snippet. When the snipped function gets called I would like the search query to get added to the URL via a anchor hash (ala: http://localhost/search#param) so I can recreate the search request if the user copies the URL and comes back later. Obviously the other side to this is pulling t...

Visual Similarity Algorithms (for CBIR)

I am trying to build a collection of Visual similarity between images, being size, angle, color, rotation invariant for Content Based Image Retrieval.Quite agnostic about the platform but .NET, Java or Python are preferred. But if others are available, pls. suggest away. I am quite familiar with OpenCV Match template and Match shapes. I...

Using substring-after to search text in XPath query

I trying to parse a string in an XML node by using an XPath query which requires that I strip out a substring and read the remaining value. The substring may have a dynamic amount of whitespace before and after it before I can get to the value, so it would be helpful to have some sort of a indexOf function to use in the XPath. I'm tryi...

Drupal 6: Search index and custom content types

Sorry, if question is too obvious — does Drupal 6 index nodes with custom content types, not only story, page, etc.? ...

PHP - Search for variable in array()

If I had this code: $result = 1; $square = array( "00" => -1, "0" => 0, "1" => 1, ); And wanted to know whether $result is equal to ANY of the array VALUES of $square (-1, 0 or 1). I´m am guessing there should be a function that compares a variable to all the array´s values and returs TRUE or FALSE accordingly. If there isn´t suc...

Search a text with single quote

For example I have a list of words: men's package, moment, immensely How can I search in mysql sample text: "men's" and return only "men's package" I'm using this $str = str_replace("s", "%s", $str); If I search for "men's", it will only show: men's package but when I search for "mens" it will also show: men's package, moment, immense...

Two searchable.xml activities in one AndroidManifest.xml

I have an Android app which has a few different activities for browsing articles and images downloaded from RSS. I'd like to be able to offer to hook up the search button to the Search dialog, using the a searchable.xml file. I've managed to do this with one search, using: <activity android:name=".search.SearchResultsActivity" ...

How to rank items that match keywords by similarity

I have a table of items linked to a table of keywords. I want to list all items that share keywords and I want to rank the results so that items that are most similar appear highest. So, I figure items that match all keywords will come highest with items that match only one keyword appearing lower in the list. Where items match the sa...

PHP - Get part of string by searching for characters, instead of counting them?

With the substr() function i must enter where i want to cut the string by numbers, is there any way of cutting a string by passing words or characters? Something like this: <?php $string = "Hey there world!"; magic_substr($string, "there ", "!"); // returns "world" ?> Is there a function like that? If so, i've missed something ...