I have the following problem in scala. I have to find the first element in al list which satisfies a predicate function with two conditions in OR. The problem is that I would like to get the element but also know which of the two conditions has been satisfied. Here is a simple example:
val l1 = List("A", "B", "AA", "BB")
val l2 = List("...
I want to perform a find command in a directory, and exclude from the set of results all files that are .gif, .jpeg, and .class.
I was wondering if someone could help me out. I've been trying to play with the regex option, but clearly I'm not doing it properly.
...
Hi, im looking for a find command to find all files under the / files that are suid and gid.
i got, find / ???. How can i use the find command to look for files under the / that have suid and gid.
Thanks
...
Find and replace scope can be limited like this:
:16,256s/search_term/replacement/gc
I don't want to replace my search term with any other text, I just want to find them. I tried the following, but it didn't help:
:16,256/search_term # Notice that there is no 's' here
Thanks for your time!
...
I have two tables: keyword_reports and keywords (with relevant AR models).
keyword_reports has a keyword_id column, which I'm using to join the keywords table like so:
KeywordReport.find(:all, :joins => :keyword, :conditions => {:page_id => 10})
which correctly pulls back records for keyword_reports, but doesn't include the data from...
I have an application with a CRichEditView, and I'd like to find text in it. By creating a menu item "Find" with ID_EDIT_FIND, the view opens the find window and text is found by highlighting. BUT... the view is not scrolled, so if a text is found 100 lines below visible, that's where it stays. Ideas on how to make the control autoscroll...
is it possible to find all nodes that don't have a specified child node?
for example:
(xml)
<item>
<name>item 1</name>
<admin>true</admin>
</item>
<item>
<name>item 2</name>
<admin>true</admin>
</item>
<item>
<name>item 3</name>
<parent>item 1</parent>
<url></url>
<admin>false</admin>
</item>
I want...
We have a fairly large asp.net website. The images, css and javascripts are property organized in the website project but as we are changing the look and feel of the website, I would like to know if there is a tool/add-in that will help me identify which images are not being used in the website. I would like to find the same thing with ...
Here is how i run dos2unix recursively on all files:
find -exec dos2unix {} \;
What do i need to change to make it skip over files under .svn/ directories?
...
Dear Masters of The Command Line,
I have a directory tree for which I want to generate a file that contains on two entries per line: full path for each file and the corresponding privileges of said file.
For example, one line might contain:
/v1.6.0.24/lib/mylib.jar -r-xr-xr-x
The best way to generate the left hand column there appe...
Hi ,
I have a quick question about jquery ..
I want to find < a > tag witch has some text.
For ex my HTML :
<a href="#">A</a>
<a href="#">B</a>
<a href="#">C</a>
<a href="#">D</a>
And I want to find for ex the tag what has text "A" .
PS: In my logic it is something like this
$("a").text("A").css("background", ...
I have have 3 Tables of data and 2 Join Tables connecting everything. I'm trying to figure out a way to query the results based on the condition that the join table data is the same.
To explain, I have User, Interest, and Event Tables. These tables are linked through an HABTM relationship (which is fine for my needs since I dont need ...
I would like to use c++ without mfc(and not clr) in order to modify textbox's and activate a button on a form outside of my project. I don't know where to start. I've done a lot of searching but can only find information for VB. A starting point would help.
Thanks.
I tried this and it doesn't seem to work.
HWND fWindow = FindWindow(NU...
I find myself frequently doing the following:
for f in `find -foo -bar -baz`; do
process "$f"
done
This of course doesn't work for file names with spaces. How can I handle such cases?
...
I want to write a bash script which will use a list of all the directories containing specific files. I can use find to echo the path of each and every matching file. I only want to list the path to the directory containing at least one matching file.
For example, given the following directory structure:
dir1/
matches1
matches...
I have a pair of bash scripts, 1 that dumps mysql dbs, and the second to purge old backups.
I have always relied on date, so any files older than 7 days are purged, and new backups created daily. The result was a set of backups 7 days back.
Well now that I have 20+ dbs I have separated that daily job into a daily, and weekly job. If I...
class Promotion
def self.get_todays_promotions
# Promotion is a parent model, having child models e.g.
# DiscountPromotion, VoucherPromotion, etc.
# they all use a single table called promotions
# (and having 'type' field explaining which model they belong to)
promotions = self.find(:all, :conditions => [Promotion....
I have 2 forms. A main one which has a richtextbox on (aswell as other stuff) and another which is used to find text in the richtxtbox on frm1. The second form consists of a textbox for the user to enter the word they are looking for, and 2 buttons. One for Find and one for Find next.
When the find button is selected the found text is h...
I often use the find command to search through source code, delete files, whatever. Annoyingly, because Subversion stores duplicates of each file in its .svn/text-base/ directories my simple searches end up getting lots of duplicate results. For example, I want to recursively search for uint in multiple messages.h and messages.cpp files:...
So, I'm working on a project that uses the acts_as_taggable_on_steroids gem. I've installed it as a gem, and it works great and all. Here's where I'm running into problems though - I want to generate a list of the top 25 used tags, and the number of times they've been used across all taggable items.
Well, as it happens, acts_as_taggable...