sharepoint online – MS flow to calculate the count of email data

I have an Excel sheet on Sharepoint which has email information for all the campaign data we do every month.

I need to send different emails to users based on the count of email address of particular employee.

The data in Excel sheet -:

abc@gmail.com

abc@gmail.com

edf@gmail.com

cdc@gmail.com

cdc@gmail.com

cdc@gmail.com

I want to create a another column excel sheet with below data cunt of email address

abc@gmail.com 2

edf@gmail.comcom 1

cdc@gmail.com 3

Any help as to how can I do it in MS flow.

array – count number of previous elements greater than its element at present index

suppose i have a vector containing n elements. I want to find out the number of previous elements greater than its element at present index i . I mean i want to find A(i)>A(j) && i

constraints : 1<=t <=1000 , 1<=n <=10^5 , 1<=A(i)<=10^5

My code:

  #include<bits/stdc++.h>
 using namespace std;
 int main()
 {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;

while(t--)
{
    int n,a,i,j;
    cin >> n;

    vector<int>v1;

    for(i=0;i<n;i++)
    {
        cin >> a;
        v1.push_back(a);
    }
   int cnt=0,sum=0;

    for(i=0;i<n;i++)
    {
        if( i!=0)
        {
            for(j=0;j<i;j++)
            {
                if(v1(i)<v1(j))
                {
                        cnt++;
                }
            }
        }
      //  cout << cnt << " ";
        sum=sum+cnt;
        cnt=0;

    }

    cout << sum << 'n';
}
}

This code is running fine for all the test cases except only one. It is showing the Time limit exceeded for one of the test cases.Can anyone help me?

python – Count “Word Order” with further optimization

Question:
You are given n words. Some words may repeat. For each word, print its number of occurrences. The output order should correspond with the input order of appearance of the word.

Sample Input:

4
bcdef
abcdefg
bcde
bcdef

Sample Output

3
2 1 1

Here’s what I cam up with:

n = int(input())
array = ()
elements = {}
for index in range(n):
    value = input()
    if value not in array:
        array.append(value)
        elements(value) = 1
    else:
        elements(value) += 1

print(len(elements))
print(*(i for i in elements.values()), end=' ')

I stress tested it on Try it Online with the random string generator and found the runtime to be around 1.98s. But I’m getting TLE on the coding platform. How do I improve the speed?

Drupal 8, Views: Count how many children have a reference to the parent

Explanations:

1) I have a node “parent”

2) I have 2 nodes “child”

3) Each child has a reference field (filled with a reference to the node “parent”)

Now, I’m trying to create a list with the Views module.

First problem: This list is a list of “parent” nodes AND should include a column with the following result: COUNT(child with a reference to the parent).

Second problem: The count result should include only published children.

Example 1 with 2 children published (2 children have a reference to the parent):

Title of parent node | 2

Example 2 with 1 child published (2 children have a reference to the parent):

Title of parent node | 1

Sorry if it’s not totally clear, it’s hard to explain

Above all of this, if the result could be sortable it will be a good news but I don’t think it will be possible…

Thank you

full node – Mempool count is too low

I’m running a full node. I wanted to get a list of all mempool txs (using getrawmempool false), and found that it only came back with around 3000, where all the block explorers are currently showing around 12000. I understand that mempools will differ between nodes, but this seems like a very big difference. Can I do anything about this?

Edit: Here is getmempoolinfo:

"size": 1985,
"bytes": 3458091,
"usage": 10785216,
"maxmempool": 300000000,
"mempoolminfee": 0.00001000,
"minrelaytxfee": 0.00001000

8 – View only displays nodes that has comments when adding comment count field

On drupal 8 I am facing an issue with views.
I created a view listing all nodes of a certain content type.
I added basic fields, Title, Date content was created, and a read more link.
The view works fine with these fields, but when i add Comment Statistics: Comment count, all nodes that don’t have any comment don’t show up in the view.
It only lists nodes that received comments.

Any idea on how to fix this ? Am I doing something wrong ?

Thanks

What is the probability of having forks in PoW given different network size (miners count)?

Given a network of k miners, what is the impact of k on the probability of having forks in Bitcoin or any PoW-based blockchain?

It is clear for me that a network with fewer miners will have less probability of having a fork than a network with higher number of miners.

Is there any mathematical formula that shows this relation?

worksheet function – Count mismatches between rows in google sheet

Need some help on this cause I’m getting an issue

I’ve this three columns (Time, R1 and R2) and I’m trying to count the mismatches between R1 and R2 but for each month (on the time column)

I already used a formula but I’m having an issue to add 1.

=iferror(if(EOMONTH($A64,0)=$A64,SUMPRODUCT(month(Database!$C$2:$C) = month($A64),--(Database!G$2:G <> Database!H$2:H)),""),"Error")

This part “month(Database!$C$4:$C) = month($A5)” is where I compare the information of the months, ( but I’m having an issue cause cause “month(Database!$C$4:$C)” only retrieves 4 that is the month of april)

This part “(Database!G$4:G <> Database!H$4:H)” is where I compare the columns R1 and R2

The part “EOMONTH($A5,0)=$A5” is where I take the month to based myself

Time R1 R2

2020-04-30  BA  BU

2020-04-30  BU  BA

2020-04-29  BA  BU

2020-04-29  BU  BA

2020-04-28  BA  BU

2020-04-28  AA  BA

2020-04-25  AA  BA

2020-04-22  BU  BA

2020-04-19  AA  BU

2020-04-19  AA  BA

2020-03-27  BA  AA

2020-03-27  BA  AA

2020-03-26  BU  AA

2020-03-18  BA  AA

2020-03-18  AA  BU

sql server – Different scan count and logical read, which one is best?

I have a SQL Server table, I created an exact copy of the table (including indexes, Pk, data, etc.)

In one of the table I have created partition.

I ran the same query in both the table and the IO stats were like this:

‘table_without_partitioning’. Scan count 53, logical reads 13489

‘table_with_partitioning’. Scan count 12, logical reads 27973

Which one is better?