Questions tagged [find]
This tag has multiple meanings. Please DO NOT use this tag if you're just trying to find something.
find
11,254
questions
0
votes
2
answers
21
views
How do I use the find() method to query a mongoose schema with an enum field (can hold multiple values (array)) that includes a particular value?
I have this schema:
const User = new Schema({
firstName: {
type: String,
required: true
},
lastName: {
type: String,
required: true
},
mobile: {
...
-1
votes
1
answer
46
views
How to merge two array using .map and .find by avoiding iterating twice
I have two arrays below. I am trying to merge conditions array based on customerLOB.code match. The problem is, I am getting the results added twice because the loop gets iterated twice. How can I ...
1
vote
1
answer
37
views
(standart input) shown instead file name with grep -iHn "ERROR" and a second grep -vH "filter" shows (standard input) and no longer the file name
What I try to do:
Find all log files from this day
Then grep "ERROR" in the files
Then grep -v "Not this line containing the filter" as Filter in result of the first grep command
...
1
vote
1
answer
41
views
VBA Backreferencing using Regular Expressions Find and Replace
I want to standardize the formatting of some text within a Word document using VBA and regEx. For example, my document would contain text strings such as "Qty #", "Qty (#)", "...
1
vote
1
answer
32
views
Beautiful Soup ".find" not working running from windows terminal
i'm trying to automate a program to scrap periodically some prices from amazon and other pages. (I'm starting with amazon)
The problem is when i do the soup.find method with PyCharm, it finds his ...
0
votes
1
answer
31
views
Bash command substitution issues
I'm writing a Python script to parse various logs across different hosts.
I can successfully run bash scripts via Python's subprocess module, however, I want to minimize the number of ssh calls, so I'...
0
votes
1
answer
45
views
Find/Replace Row number within Formula
I have an Excel formula where I wish to change range row number found in a specific cell.
=SORT(UNIQUE(FILTER(CHECKLIST!K7:K120180,(CHECKLIST!B7:B120180=INVENTORY!H5)*(CHECKLIST!C7:C120180=INVENTORY!...
1
vote
2
answers
28
views
How to put the same character in the beginning of all rows using regex?
I have a list of 10 digit numbers in a txt file.
I want to put the same character in the beginning of all rows using regex, without changing the numbers.
I also want to put the character at the end of ...
1
vote
2
answers
49
views
`find` behaves unintuitively when pruning directories
I have few files under the current directory,
./a.txt
./b.txt
./dir1/c.txt
./dir1/d.txt
When I execute find . -path './dir1' -prune -o -name "*.txt",
as expected, it excludes everything ...
1
vote
0
answers
6
views
Is there an R function that minimise a bivariate function f
I need to write a code that using the R function constrOptim, minimise an bivariate function. Please tell me what is wrong in the constrOptim , went i run the code i have this warning message
"...
1
vote
0
answers
48
views
Request help marrying two VBA scripts together (Find/Replace)
Attempting to add Find/Replace to existing code
Starting with this piece of code which works to convert a .CSV to an .XLS File:
Sub CSVtoXLS()
'UpdatebyExtendoffice20170814
Dim xFd As FileDialog
...
0
votes
1
answer
32
views
Find and replace n-th occurrence in VS Code
I have a large data set that I'd like to convert into a workable csv file.
The dataset currently looks like this:
[att1]; [att2]; [att3]; [att1]; (...)
To make this a workable csv-file, I'd need to ...
1
vote
1
answer
79
views
How to find file names with non-printable characters using `find` on macOS?
Some folders on macOS have custom icons that are stored in a file named Icon?, where the ? is actually a CR character, and only prints as "?" in most cases (in Terminal and Finder).
But when ...
0
votes
4
answers
119
views
Create an array using item from different array
I need to create a new array of objects with 12 item (months & value) on it but it must check if the month exist on other array. If it exist it will push onto the array if not it will have a value ...
0
votes
2
answers
83
views
How to remove certain line numbers from a file and save the file using the inputfilename in batch
I'm trying to edit a txt file by removing certain line numbers from it.
i would like to search for all files in the folder containing .txt, remove some lines and than save the file using the ...
0
votes
0
answers
32
views
Trouble with hashdeep, fed by find, and unusual characters
I'm using hashdeep to calculate checksums, recursively for files. However, I need to exclude certain directories and so the solution would seem to be to use find to feed a file list to hashdeep. This ...
0
votes
1
answer
25
views
Find the string (or most common string) associated with user-input reference numeral within a document
PROBLEM
I'm trying to make a macro which allows me to enter in a reference numeral (e.g., 102) and have the entire document be scanned for instances of that reference numeral. I want the code to ...
0
votes
1
answer
33
views
Edit VBA to scan a document and pick out the reference numeral that corresponds to a string, e.g. output "102" for "dog 102" in the document
My current code to do this works when all instances of the string in the document are accompanied by the associated numeral. However, where some instances of "dog" arent followed by "...
0
votes
1
answer
54
views
Using find, match and filter with reactive array in VueJS - how do I?
Thought I understood .value but apparently not! :)
This is using VueJS v3 and Composition API. I'm attempting to find the first matching value in a reactive array of people. In reality my array is ...
-1
votes
1
answer
57
views
Using git bash "find" and "sed" correctly. Do I have the best solution? [closed]
I am using git bash on Windows.
I have a large set (thousands) of c/c++ files with autogenerated headers that I want to replace. My plan is first to strip the headers then apply new ones.
These ...
-1
votes
3
answers
76
views
Search for all directories that are smaller than 4MB
I want to display all directories that are smaller than 4MB using find command.
Already tried find / type d -size -4000000c(same with a dot instead of/`) but both combinations display files too. What ...
1
vote
1
answer
38
views
Selenium returns looked up element unreliably
I got stuck.. so many hours.. looked up hundreds of questions & answers here..
I want to grep data from a banks product website, e.g. "Delta" from:
https://wertpapiere.ing.de/Investieren/...
0
votes
3
answers
83
views
VBA | Find all "text" and change their font color Red
I want to find all the cells with text "Not Found", and make their font Red.
Any advise on how to do so?
String NotFound = "Not Found"
My program will call the subprocedure ...
0
votes
0
answers
12
views
Find string in data
I am reading out an API interface to get an average price of a specific material.
The response of the API gives me a database including several different materials with a min and high price.
First I ...
-2
votes
2
answers
57
views
Javascript Nested JSON get parent results from child [duplicate]
I have a nested JSON and I'm getting the "variants" results from API. And I'm trying to get this variants parent names.
Here is the json:
{
"active": true,
"main":...
-1
votes
3
answers
111
views
Multiple substrings in string python within variable check [duplicate]
I have the following code:
check = "red" in string_to_explore
How can I replicate it for multiple substrings?
I tried with:
check = "red|blue" in string_to_explore
but doesn't ...
0
votes
1
answer
70
views
Find value in sheet1, copy offset value, find offset value in sheet 2, paste text in offset cell
I have looked at a lot of different ways to do this and tried to incorporate their ideas into this sub but I keep getting different errors every time I run it. I am searching for "0" in the ...
0
votes
3
answers
111
views
Can find_if be used to find a key in std::map/std::unordered_map?
This is a simple program consisting of adding an element into the std::unordered_map. But before it's added, first check if the key already exists, if it does then don't add it.
My problem is that ...
1
vote
1
answer
70
views
How to find an element in a vector of class objects, based on one of the class members, and delete it
I have a vector of classes. Each class has two member variables, a name (string) and time spent working (integer).
My goal is simply delete an element of an array that contains a specific name.
I know ...
0
votes
1
answer
17
views
I'm trying to replace text in all files using FIND
$i%2==0 ? $color="$c[color7]" : $color="$c[color7]";
I'm trying to change all files like this.
$i%2==0 ? $color="$c['color7']" : $color="$c['color7']";
find . -...