I have started using ack which is much faster than grep. However using ack I want to search for file name rather than file contents. Is there a way to do that?
I need to search for lines in a CSV file that end in an unterminated, double-quoted string.
For example:
1,2,a,b,"dog","rabbit
would match whereas
1,2,a,b,"dog","rabbit","cat bird"
1,2,a,b,"dog",rabbit
would not.
I have very limited experience with regular expressions, and the only thing I could think of is something like
"[^"]*$
However, that matches the last quote to the end of the line.
How would this be done?
I'm trying to use Google Analytics API to query internal searches that happen on my site.
I'd like to be able to query the keywords and the number of times that keyword was used in internal search, based on URL of a page on the site. The idea is to find out which keywords direct the user to a particular page.
Does anyone know which dimensions and metrics must use to query that information?
Using Zend Lucene I cannot search numbers in description fields
Added it like this:
$doc->addField(Zend_Search_Lucene_Field::Text('description', $current_item['item_short_description'], 'utf-8'));
Googling for this showed that applying following code should solve the problem, but it did not..:
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());
any thougts?
I've tried everything (every method that shows up on a SO search), but I can't get it to work.
I'm trying to parse this:
questions = (
{
owner = {
"display_name" = "Neil";
};
title = "Initialising ";
"up" = 11;
"view" = 92;
}
);
I'm trying to get the display_name under owner.
Hi all,
I'm using the following code for my search on my table:
- (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope
{
[searchParent removeAllObjects];
for(NSString *a in parent)
{
NSComparisonResult result = [a compare:searchText options:(NSCaseInsensitiveSearch) range:NSMakeRange(0, [searchText length])];
if(result == NSOrderedSame){
[searchParent addObject:a];
}
}
}
It's working fine, however, only for one character.
I get the following in the console:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)'
Any help is appreciated greatly!
Thanks
Trying to implement a web service which should have exactly the same function as http://www.google.com/finance the search quotes box
when user type the stock name or company name, the right stock name is suggested while typing.
my service will using historical information from google finance, so get proper quote name from google is a must!
anyone knows where i could find this quote list through google finance api? better with python.
or anyone can suggest some ideas please?
many thanks
The Twitter Search api returns results in ATOM/XML format which look like this:
<author>
<name>username (Friendly Name)</name>
<uri>http://twitter.com/username</uri>
</author>
In my PHP I can get the name field as a variable, so it would look like this:
$names = "username (Friendly Name)"
But I want to use PHP to extract them as seperate variables, like this:
$username = "username"
$friendlyName = "Friendly Name" (without parantheses)
TIA!
I've got a string:
doCall(valA, valB);
Using a regex in GVIM I would like to change this to:
valA = doCall(valA, valB);
How would I go about doing this? I use %s for basic regex search and replace in GVIM, but this a bit different from my normal usages.
Thanks
hi
how can i find a word position in google search in my site (e.g there are several tool available which input as keyword and siteurl and display the keyword position in google)
is there any api to fetch the position ?
Thanks
Hello,
Got nothing better to do this Christmas holiday, so I decided to try out making a binary search tree. I'm stuck with the print function. How should the logic behind it work? Since the tree is already inserting it in a somewhat sorted order, and I want to print the tree from smallest values to the biggest.
So I need to travel to the furthest left branch of the tree to print the first value. Right, so after that how do I remember the way back up, do I need to save the previous node? A search in wikipedia gave me an solution which they used stack. And other solutions I couldn't quite understand how they've made it, so I'm asking here instead hoping someone can enlight me.
I also wonder my insert function is OK. I've seen other's solution being smaller.
void treenode::insert(int i)
{
if(root == 0)
{
cout << "root" << endl;
root = new node(i,root);
}
else
{
node* travel = root;
node* prev;
while(travel)
{
if(travel->value > i)
{
cout << "travel left" << endl;
prev = travel;
travel = travel->left;
}
else
{
cout << "travel right" << endl;
prev = travel;
travel = travel->right;
}
}
//insert
if(prev->value > i)
{
cout << "left" << endl;
prev->left = new node(i);
}
else
{
cout << "right" << endl;
prev->right = new node(i);
}
}
}
void treenode::print()
{
node* travel = root;
while(travel)
{
cout << travel->value << endl;
travel = travel->left;
}
}
I owns a website which is doing lots of searches per day. these search results are stored in my MySQL databse. what I want is I want retrieve today's top searches from MySQL limit to 20 and display in my website. how do I do this with PHP & MySQL??
Thanks
Mathew
I am developing an app ( A database file system ). I am using WPF treeview in its GUI.The treeview items are directly extracted from my apps database.
I want to search and highlight the treeview items as I type.(e.g. keyword results shown in browsers)
How do I achieve that?
We got "No Index Attribute" error when we try to indexing Oracle Portal from SharePoint Server 2007 Search crawler. The content source is added sucessfully. The error messages appeare in the crawler log.
I want to build a website where you can search by entering the postcode (UK). I know that RoyalMail owns the Database to do this (it's only very expensive, $100K). What are my options?
I have the following code:
$query = "select * from customer where Surname like \"%$trimmed%\" OR TitleName like \"%$trimmed%\" OR PostCode like \"%$trimmed%\"
order by Surname";
However, I have another table which I want to search from with the same paramaters(variables) as that. I know that something like "select * from customer,othertable" might not be possible, Is there a way to do it?
Hi ,
when i try to start Moss Osearch service , iv'e got the following message ,
Services
Could not start the Office SharePoint Server Search service on Local Computer.
Error 126: The specified module could not be found
I tried everything , try to add permissions to dcom config , nothing help .
Can i reinstall this Service ?
Any idea ?
I'm being asked to display a binary search tree in sorted order. The nodes of the tree contain strings.
I'm not exactly sure what the best way is to attack this problem. Should I be traversing the tree and displaying as I go? Should I flatten the tree into an array and then use a sorting algorithm before I display?
I'm not looking for the actual code, just a guide where to go next.
I have text that looks like:
My name is (Richard) and I cannot do
[whatever (Jack) can't do] and
(Robert) is the same way [unlike
(Betty)] thanks (Jill)
The goal is to search using a regular expression to find all parenthesized names that occur anywhere in the text BUT in-between any brackets.
So in the text above, the result I am looking for is:
Richard
Robert
Jill
hi friends
I use the following command to find under /var some param in my script
grep -R "param" /var/* 2/dev/null |grep -wq "param"
my problem is that: after grep find the param in file
grep continue to search until all searches under /var/* will completed
How to perform stop immediately after grep match the param word
For example when I run the:
grep -R "param" /var/* 2/dev/null |grep -wq "param"
grep find the param after one second.
But grep continue to sears other same param and its take almost 30 seconds
How to stop the grep immediately after param match?
THX
Say I want to look for open source iphone/Android tower defense game on sourceforge/google code/git hub. Directly searching by these keywords seems not easily getting desired result. Is there any way to search project on these sites? Thanks.
I am messing around with one of my databases.. is there away for me to search for a string in ALL the tables.. and replace it with another everywhere it occurs?
I am looking for SQL
Short of SQL-dumping my entire database to text and searching that, is there a way to search for a specific substring in all tables of a MySQL database if you are not sure which table/record/field that substring actually occurs?