search

Find and replace a particular term in multiple files

How can I replace a particular term in multiple files in Linux? For instance, I have a number of files in my directory: file1.txt file2.txt file3.txt And I need to find a word "searchword" and replace it with "replaceword". ...

Use vim to search by hex code

I need to clean up a file. We have an xml parser that runs on it that is failing due to an escape character (0x1B) in the file. How do I use vim to find where in the file that character is so I can remove it? Example file: <?php echo "Hello, world.\n"; ?> After conversion: 0000000: 0a3c 3f70 6870 0a65 63...

ldap search filter with java

Hi all. I'm having problems with ldap search filters. I want to search through all the children of a root node. I want the users where the username of the email contains the query string. for example, if I have [email protected] foobar@foo_l.c_bar and the search query is "l.c" I want only [email protected] the following co...

Yahoo! BOSS: Include duplicate results

I can easily get the results I want from Yahoo! BOSS. However, for the particular data I'm trying to get, it's important that "duplicate" results be included. I know Yahoo! has them, since when I search for the query manually, it offers me a link to see these similar results. Is there any way to request these deeper results with the Ya...

Storing search result for paging and sorting

I've been implementing MS Search Server 2010 and so far its really good. Im doing the search queries via their web service, but due to the inconsistent results, im thinking about caching the result instead. The site is a small intranet (500 employees), so it shouldnt be any problems, but im curious what approach you would take if it was...

How do you avoid an invalid search space in a genetic algorithm?

I am developing a GA for a school project and I've noticed that upon evaluating my functions for fitness, an individual is equivalent to its inverse. For example, the set (1, 1, -1, 1) is equivalent to (-1, -1, 1, -1). To shrink my search space and reach a solution more efficiently, how can I avoid my crossovers from searching in thi...

Search in multiple tables

Let's say I have tree tables: [ news ] id title text date [ posts ] id title text date [ gallery ] id title text date How can I perform a FULLTEXT search in these tree tables with one query? I just want to run the search on the title and text fields and get the id, title, date and the...

Is it possible to search websites within the links of a website?

I am looking for a tool or a service that will search not only a website, like Google Custom Search, but also the content of any websites that are links in that website. eg Imagine a website www.mysite.com which contained a link to www.stackoverflow.com. Searching www.mysite.com would search the content of www.mysite.com as well as www...

VS 2008, is there a way to search properties like the old vb6/EVB? CTRL+SHIFT?

I really miss the CTRL+SHIFT+CHAR searching of a property in VS 2008 that older IDE's had... typing CTRL+SHIFT+T got you to "tabindex" then Tag when pressed again. They dropped it in VS 2002 I believe, and the closest I could find to restoring any functionality like it was acorn's property window filter, which isn't exactly functional. ...

MySQL fulltext query: search:ipod (DONT want tripod) but search:dg43nb (DO want box43nb)

Heya I need help with my MySQL product search query. Overall I'd appreciate any critique / tweak suggestions, more importantly though I have an issue.. I implemented this to stop people searching: "ipod" & getting "tripod" at the top of the list.. now my issue.. search for "dg43nb" I get 0 results but should get title:"BOXd43nb" So ...

Searching in a subhash with Ruby on Rails

I have a hash of hashes like so: Parameters: {"order"=>{"items_attributes"=>{"0"=>{"product_name"=>"FOOBAR"}}}} Given that the depth and names of the keys may change, I need to be able to extract the value of 'product_name' (in this example "FOOBAR") with some sort of search or select method, but I cannot seem to figure it out. An ad...

what this python code trying to do

Hi, The following python code is to traverse a 2D grid of (c, g) in some special order, which is stored in "jobs" and "job_queue". But I am not sure which kind of order it is after trying to understand the code. Is someone able to tell about the order and give some explanation for the purpose of each function? Thanks and regards! impo...

How to pass a parameter from a form in Symfony and PHP?

I am trying to implement a very simple search function with PHP in symfony. Basically I have a form that posts a query and I want to retrieve the items in the database that match the query. If I have a User table with columns first_name and last_name, I want to be able to retrieve all items that contain a query. For example, if I submi...

Drupal search module has suddenly stopped working, how do I fix this problem?

Drupal 6.15 search has stopped working. how can I fix it? I've run the cron and re-indexed, but it still does nothing when searching. Any ideas? I can see the tables that the items have been indexed, but search results show a blank white page. ...

How do you dynamically access attributes of a JSON Object

I have a two level JSON object EX: var regexDefs = { "alpha": { "regex" : /^[A-Z]+$/, "errMsg" : "Alpha Only" } } I want to do something akin to searching an array for a key. (using jQuery's inArray) var key = "alpha"; alert($.inArray(key,regexDefs)); if the key is in the array then I want to ...

N-ary search tree in java with Comparable userObject?

So let's say I'm building a Tree using javax.swing.tree.DefaultMutableTreeNode and I add N children to a particular node. I want the children to be in a particular order (based on Comparable/a custom Comparator) like a search tree, even if I insert them out of order, like this: node.insert(child2); node.insert(child3); node.insert(child...

sphinx cuts symbol

I have a music collection and use sphinx for searching in it. Search mode is SPH_MATCH_PHRASE, but when I search f.e. for "B'Day" album - sphinx cuts "'" and searching by "Day" query. How can I force sphinx to search by exact phrase without filtering any symbols? ...

What's happened with SO search?

Move this question to meta-site, if you wish, I don't know how to do that. ...

How do you solve the "lag" problem of a live search?

hi i am implementing a live search (=search as you type) feature in my webapp. currently i am using the keyup event to send the search request via ajax post e.g. $('#SearchField').keyup(function(e) { $.post( ... ); }); but this leads to some kind of lag problem, in some cases when i search, for example after...

Search EWS CalendarItems with last modified time

I'm searching CalendarItems with ExchangeWebServices..In msdn document there is a field as LastModifiedTime. How do I query CalendarItems by LastModifiedTime with ExchangeServerBindings ? ...