How to match the words in one document with several other documents and get the count in perl? [closed] - perl

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have a document with words as
spring
season
bank
Now I want to check if these words for present in several documents, lets say 10 documents. Input and the list of documents should be user defined. can anyone suggest me how to proceed?

what about grep?
grep -REic 'spring|season|bank' file1.txt file2.txt ...
check out man grep for more options.

Related

How can I store massive amounts of text in PostgreSQL? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to store massive amounts of data, specifically the amount of text equivalent to a book. How can I go about this? Is there a type of data storage that makes this process faster/easier (aka is fit) for this type of operation?
There are limits, but not that much. A single database can have (with default configurations) over a billion tables and each table can be 32TB in size.

Perl convert string to numeric number [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to convert a string ordinal to a number in perl
I have searched but not get exact answer.
Example: if the input is
one it should be 1.
five hundred it should be 500.
three hundred it should be 300.
Is there any module to do this?
One of the best parts of Perl is CPAN and, sure enough, a couple minutes of poking around on metacpan turned up the Lingua::EN::Words2Nums module:
use Lingua::EN::Words2Nums;
$num=words2nums("two thousand and one");
$num=words2nums("twenty-second");
$num=words2nums("15 billion, 6 million, and ninteen");

sap hana - select top expression [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
I have a problem with a stored procedure.
The procedure gets as an argument the number of rows needed, but the following does not work in HANA:
SELECT TOP :NUM_OF_ROWS * FROM TABLE_NAME
I read that TOP in HANA only receives a number, not an expression. Is there another way to do this? My solution for the moment is to select everything and delete the unneeded records on the service, but it's not very efficient.
Instead of TOP n you can use the LIMIT n option.
That one can bind variables.

Custom UUID's as primary keys [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I noticed that Slack uses ID's of the form U023BECGF, and not the standard f3a7a018-02da-4cdb-944c-44d073536648 you often see
What is the reasoning for this?
The code you put in your question (U023BECGF) is not a valid or complete UUID. UUIDs are 16 bytes (octets) which are represented as 32 characters of hexadcimal as standard: RFC: https://www.ietf.org/rfc/rfc4122.txt
Under no encoding is U023BECGF a representation of a 16 bytes; it's too short.
It is plausable that these keys could be incorperated into a UUID but they are not one in themselvs.
The usual reason for smaller fields is storing less data.

How does an Antivirus with thousands of signatures scan a file in a very short time? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
What speed optimization techniques do antiviruses use today to scan a file, provided they have to check for all the signatures + the behavioral scan?
I'm not a antivirus programmer, but I think the scan engine scans through a file searching for known pattern inside. The greater number of patterns it can identify, the longer it will take to scan.
Optimization maybe similar to database optimization, with patterns indexing.
Identification Methods