Parallelize import of many files

I’m trying to speed up the import of a large number of files, using ParallelTable to store them in a indexed variable, eqDump. The files are in the folder “Frames” and are named “Conf_Run.1000”, “Conf_Run.2000”, … Here is what I’ve tried,

    Clear[eqDump];         SetSharedFunction[eqDump];     ParallelTable[       eqDump[t] = Import["Frames/Conf_Run." <> ToString[t]                     ,"Table"                     ,HeaderLines -> 9]     ,{t, 5000, 1000000, 5000}]; 

But the execution doesn’t even seems to start, the kernels remain idle. I don’t know whats happening, since I think it should work in the same way as here for example. I’ve tried also to SetSharedVariable[t] since I supposed each kernel should know the current t value, but doesn’t seem to help.

Thank you very much!

Count how many posts have a specified tag AND category

I know how to count how many posts has a certain tag, or category

For example:

$  term_slug = 'some-post-tag'; $  term = get_term_by('slug', $  term_slug, $  post_tag); echo $  term->count; 

BUT! Is there anyway to count how many posts that have a tag AND a specified category?

I want to count how many posts that have the tag(slug) “cats” and the category slug “allow-list”

Is this even possible?

How many times is taking mfcuk to find a key

I would like to copy a VIGIK RFID badge. It’s MIFARE type badge. I’ve an ARC122 USB reader / writer and my OS is Linux like. I compiled mfoc and mfcuk successfully. First I tried to copy the badge with mfoc using this command:

mfoc  -P 500 -O Matrice.dmp 

And I’ve got this error :

    Found Mifare Classic 1k tag ISO/IEC 14443A (106 kbps) target:     ATQA (SENS_RES): 00  04   * UID size: single * bit frame anticollision supported        UID (NFCID1): 63  0e  43  bc         SAK (SEL_RES): 08   * Not compliant with ISO/IEC 14443-4 * Not compliant with ISO/IEC 18092 .../... mfoc: ERROR:  No sector encrypted with the default key has been found, exiting.. 

After a search on the web, I found I’ve to use mfcuk tool like this for find a key :

mfcuk -C -O Matrice.dmp -R 0:A -s 250 -S 250 -v 3 

But it’s taking hour without result. How to do that quicker ?

If I cast Thunderous Smite and Booming Blade, hit, and use Destructive Wrath to maximize damage, how many uses of Channel Divinity are expended?

How many uses of channel divinity should be expended in the following example?


  • A character is using that a weapon that deals 2d6 thunder damage on a hit.
  • They cast Thunderous Smite, using a bonus action.
  • Then cast Booming Blade (at 5th level), making a melee attack as an action.
  • On a hit, the weapon does an additional 1d8 + 2d6 + 2d6 thunder damage.

Thunderous Smite:

The first time you hit with a melee weapon attack during this spell’s duration, your weapon rings with thunder that is audible within 300 feet of you, and the attack deals an extra 2d6 thunder damage to the target.

Booming Blade:

At 5th level, the melee attack deals an extra 1d8 thunder damage to the target, and the damage the target takes for moving increases to 2d8.

Destructive Wrath:

When you roll lightning or thunder damage, you can use your Channel Divinity to deal maximum damage, instead of rolling.

I’m interpreting this as three separate rolls for thunder damage, each requiring a use of Channel Divinity to maximize. Instead of one use of Channel Divinity to maximize all of them at once.

One of the main reasons I’m thinking this, is because another use of Channel Divinity needs to be expended to maximize the secondary damage from Booming Blade, as it’s a completely separate roll.

Inserting many documents in collection, but only unique elements, based on specific field. MongoDB

I cannot seem to find an answer on this anywhere. I need the following:

Given an array of objects with the structure:

{    link: 'some-link',    rating: 25,    otherFields: '..',    ... }  I want to insert them into my collection. So I would just do insertMany... But I only want to insert those elements of the array that are unique, meaning that I do not want to insert objects with the field "link" being something that is already in my collection.  Meaning if my collection has the following documents:  {   _id: 'aldnsajsndasd',   link: 'bob',   rating: 34, } {    _id: 'annn',    link: 'ann',    rating: 45 } 

And I do the “update/insert” with the following array:

[{   link: 'joe',    rating: 10 },{   link: 'ann',   rating: 45 }, {   link: 'bob',   rating: 34 }, {   link: 'frank',   rating: 100 }] 

Only documents:

{   link: 'frank',   rating: 100 } {    link: 'joe',   rating: 10 } 

Would be inserted in my collection