Search Results

Search found 47335 results on 1894 pages for 'find'.

Page 4/1894 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Prevent find from printing .git folders

    - by Nathan Neff
    I have a find command that I run, to find files named 'foo' in a directory. I want to skip the ".git" directory. The command below works except it prints an annoying ".git" any time it skips a .git directory: find . ( -name .git ) -prune -o -name '*foo*' How can I prevent the skipped ".git" directories from printing to stdout?

    Read the article

  • Override browser "Find" feature

    - by Trevor Burnham
    I'm wondering whether it's possible to use JavaScript to intercept or prevent the user from using the browser's "Find" feature to find text on the page. (Trust me, I have a good reason!) I'm guessing the answer is "no," beyond the obvious intercepting Cmd/Ctrl+F. A second-best solution would be to intercept the text highlighting that the browser performs during a Find. Is there any way to do this, in any browser?

    Read the article

  • find: Prevent .git folders from printing to STDOUT

    - by Nathan Neff
    Hello, I have a find command that I run, to find files named 'foo' in a directory. I want to skip the ".git" directory. The command below works, EXCEPT, it prints an annoying ".git" any time it skips a .git directory find . ( -name .git ) -prune -o -name 'foo' How can I prevent the skipped ".git" directories from printing to STDOUT? Thanks, --Nate

    Read the article

  • Rails - Find Condition of two model fields

    - by ChrisWesAllen
    I'm trying to find the results of a model where it queries as the result of two conditions. I have a search tag that looks for Model.find(:all, :conditions => "name LIKE params[search]") but I'd like for the search to find all records where "name LIKE params[search] or description LIKE params[search] . Is there any way to add an OR into a condition in rails? or should I make an if statement?

    Read the article

  • C++ STL map.find() not finding my stuff

    - by Joe
    Hello, I have constructed a map and loaded it with data. If I iterate over all the elements I see they are all valid. However, the find method doesn't find my item. I'm sure it's something stupid I am doing. Here is snippet: // definitions // I am inserting a person class and using the firstname as the key typedef std::map<char*,Person *> mapType; mapType _myMap; mapType::iterator _mapIter; ... Person *pers = new Person(FirstName, LastName, Address, Phone); _myMap.insert(make_pair(pers->firstName, pers); ... ...later.... _mapIter = _myMap.find(firstName); // returns map.end _mapIter = _myMap.find("joe"); // returns map.end and I have no idea why :(

    Read the article

  • c# Find value in a range using lambda

    - by n4rzul
    I'm trying to find an item in a list of values based on another value using a lambda expression using the Find method. In this example I'm expecting to get back -1000, but for the life of me, I just can't come up with the proper lamda expression. If that sounds confusing I hope the code and comments below explain it better. TIA. using System; using System.Collections.Generic; namespace TestingStuff { class Program { static void Main(string[] args) { double amount = -200; //The Range of values List<MyValue> values = new List<MyValue>(); values.Add(new MyValue(-1000)); values.Add(new MyValue(-100)); values.Add(new MyValue(-10)); values.Add(new MyValue(0)); values.Add(new MyValue(100)); values.Add(new MyValue(1000)); //Find it!!! MyValue fVal = values.Find(x => (x.Value > amount) && (x.Value < amount)); //Expecting -1000 as a result here since -200 falls between -1000 and -100 //if it were -90 I'd expect -100 since it falls between -100 and 0 if (fVal != null) Console.WriteLine(fVal.Value); Console.ReadKey(); } } public class MyValue { public double Value { get; set; } public MyValue(double value) { Value = value; } } }

    Read the article

  • Using ed to manipulate files matched by find

    - by TheOsp
    Following the bash-hackers wiki's recommendation, I want to edit files using ed. In particular I want to do the following with ed instead of sed: find . -type f -exec sed -i -e 's/a/b/g' {} \; I see that ed doesn't have opt like sed's -e, so as far as I know, pipes and io redirections are the only way to work with it non-interactively. So, using ed from a bash script to do the same as the above sed command would look like: ed file_name <<<$'g/a/s//b/g\nw' Or echo $'g/a/s//b/g\nw' | ed file_name But as far as I know it is impossible to involve pipes or io redirections within find's -exec. Do I miss something? or is the only way to overcome this is to use loops? for file in $(find . -type f -print); do ed $file <<<$'g/a/s//b/g\nw'; done;

    Read the article

  • browser ctrl-f find and non-visible text

    - by David Pilling
    Can the browser feature of contrl+F to find text be integrated with text in popup windows. I'd like to have some scientific reference information given when someone hovers over a species name in a web page. Generating the popup, tooltip style text is no problem, the problem is that anyone using Ctrl+F won't be able to find it, or if I position the text out of view when not required, it will be found but be invisible. The same sort of effect applies to "accordion" style expanding text areas. I'm looking for some sort of event generated when find is highlighting a result.

    Read the article

  • PowerShell Script to Find and Replace for all Files with a Specific Extension

    - by Brandon
    I have several configuration files on Windows Server 2008 nested like such: C:\Projects\Project_1\project1.config C:\Projects\Project_2\project2.config In my configuration I need to do a string replace like such: <add key="Environment" value="Dev"/> will become: <add key="Environment" value="Demo"/> I thought about using batch scripting, but there was no good way to do this, and I heard that with PowerShell scripting you can easily perform this. I have found examples of find/replace, but I was hoping for a way that would traverse all folders within my C:\Projects directory and find any files that end with the '.config' extension. When it finds one, I want it to replace my string values. Any good resources to find out how to do this or any PowerShell gurus that can offer some insight?

    Read the article

  • Rails find by *all* associated tags.id in

    - by mark
    Hi Say I have a model Taggable has_many tags, how may I find all taggables by their associated tag's taggable_id field? Taggable.find(:all, :joins => :tags, :conditions => {:tags => {:taggable_id => [1,2,3]}}) results in this: SELECT `taggables`.* FROM `taggables` INNER JOIN `tags` ON tags.taggable_id = taggables.id WHERE (`tag`.`taggable_id` IN (1,2,3)) The syntax is incredible but does not fit my needs in that the resulting sql returns any taggable that has any, some or all of the tags. How can I find taggables with related tags of field taggable_id valued 1, 2 and 3? Thanks for any advice. :)

    Read the article

  • How to find text in images with the browser control+F

    - by Riga
    Have HTML pages with many sections and each section has a section title displayed as an image (to use nice font). The problem is that even if I specify an 'alt' and 'title' text on each image/title the Ctrl+F browser functionality does not find the text. Thought two possible solutions but not very happy about them 1) Use embed fonts. Problem: Can not find the font required by client to use and not sure about copyrights. 2) Have the text in the image in DIV near the image but hidden from user view. Problem: Can search engines consider this keyword stuffing? Will browser find text if display:none Does anybody has a better solution? Thanks Riga

    Read the article

  • how to use a bash function defined in your .bashrc with find -exec

    - by sharrajesh
    my .bashrc has the following function function myfile { file $1 } export -f myfile it works fine when i call it directly rajesh@rajesh-desktop:~$ myfile out.ogv out.ogv: Ogg data, Skeleton v3.0 it does not work when i try to invoke it through exec rajesh@rajesh-desktop:~$ find ./ -name *.ogv -exec myfile {} \; find: `myfile': No such file or directory is there a way to call bash script functions with exec? Any help is greatly appreciated. Thanks, sharrajesh

    Read the article

  • Find an asp:Button in VB.NET

    - by Andrew
    I'm trying to code a section for my website in VB but VB can't seem to find a button. Is there a way for the code to find it? I know where it is. Loginview Login LoginTemplate. How do I get VB.NET to point to that location?

    Read the article

  • grails find first

    - by srinath
    I know this is simple question but taking more time How to find first record from table in grails . I need to get only the first record with out knowing the id number . Is there any method like find :first in grails ? thanks in advance .

    Read the article

  • find: What's up with basename and dirname?

    - by temp2290
    I'm using find for a task and I noticed that when I do something like this: find `pwd` -name "file.ext" -exec echo $(dirname {}) \; it will give you dots only for each match. When you s/dirname/basename in that command you get the full pathnames. Am I screwing something up here or is this expected behavior? I'm used to basename giving you the name of the file (in this case "file.ext") and dirname giving you the rest of the path.

    Read the article

  • script to find "deny" ACE in ACLs, and remove it

    - by Tom
    On my 100TB cluster, I need to find dirs and files that have a "deny" ACE within their ACL, then remove that ACE on each instance. I'm using the following: # find . -print0 | xargs -0 ls -led | grep deny -B4 and get this output (partial, for example only) -r--rw---- 1 chris GroupOne 4096 Mar 6 18:12 ./directoryA/fileX.txt OWNER: user:chris GROUP: group:GroupOne 0: user:chris allow file_gen_read,std_write_dac,file_write_attr 1: user:chris deny file_write,append,file_write_ext_attr,execute -- -r--rwxrwx 1 chris GroupOne 14728221 Mar 6 18:12 ./directoryA/subdirA/fileZ.txt OWNER: user:chris GROUP: group:GroupOne 0: user:chris allow file_gen_read,std_write_dac,file_write_attr 1: user:chris deny file_write,append,file_write_ext_attr,execute -- OWNER: user:bob GROUP: group:GroupTwo 0: user:bob allow dir_gen_read,dir_gen_write,dir_gen_execute,std_write_dac,delete_child,object_inherit,container_inherit 1: group:GroupTwo allow std_read_dac,std_write_dac,std_synchronize,dir_read_attr,dir_write_attr,object_inherit,container_inherit 2: group:GroupTwo deny list,add_file,add_subdir,dir_read_ext_attr,dir_write_ext_attr,traverse,delete_child,object_inherit,container_inherit -- As you can see, depending on where the "deny" ACE is, I can see/not-see the path. I could increase the -B value (I've seen up to 8 ACEs on a file) but then I would get more output to distill from... What I need to do next is extract $ACENUMBER and $PATHTOFILE so that I can execute this command: chmod -a# $ACENUMBER $PATHTOFILE Additional issue is that the find command (above) gives a relative path, whereas I need the full path. I guess that would need to be edited somehow. Any guidance on how to accomplish this?

    Read the article

  • How to std::find using a Compare object?

    - by dehmann
    I am confused about the interface of std::find. Why doesn't it take a Compare object that tells it how to compare two objects? If I could pass a Compare object I could make the following code work, where I would like to compare by value, instead of just comparing the pointer values directly: typedef std::vector<std::string*> Vec; Vec vec; std::string* s1 = new std::string("foo"); std::string* s2 = new std::string("foo"); vec.push_back(s1); Vec::const_iterator found = std::find(vec.begin(), vec.end(), s2); // not found, obviously, because I can't tell it to compare by value delete s1; delete s2; Is the following the recommended way to do it? template<class T> struct MyEqualsByVal { const T& x_; MyEqualsByVal(const T& x) : x_(x) {} bool operator()(const T& y) const { return *x_ == *y; } }; // ... vec.push_back(s1); Vec::const_iterator found = std::find_if(vec.begin(), vec.end(), MyEqualsByVal<std::string*>(s2)); // OK, will find "foo"

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >