How can I more quickly get the interchangeable variables in a function?

Let’s say I have an expression like a b + c d e. This is equal to: a b + c d e, a b + c e d, a b + d c e, a b + d e c, a b + e c d, a b + e d c, b a + c d e, b a + c e d, b a + d c e, b a + d e c, b a + e c d, and b a + e d c

As you can see, swapping a and b will always result in an expression equal to the original expression and swapping c, d, and e will always result in an expression equal to the original expression.


The following code is too slow for more complicated expressions. Is there a speedier way to get Mathematica to give me all equivalence classes of swappable variables such that f[a b + c d e] == {{a, b}, {c, d, e}} for some f?

SwapVariables[expr_, variable1_, variable2_] := expr /. variable1 -> replacedInSwapVariablesFunction /. variable2 -> variable1 /. replacedInSwapVariablesFunction -> variable2;  VariablesIn[expr_] := Integrate`getAllVariables[{expr}, {}];  SwappableVariablesIn[expr_] := (   vars = VariablesIn[expr];   originalVars = vars;   results = {};   While[Length[vars] > 0, (     var = First[vars];     vars = Rest[vars];     swappable = Map[TrueQ[ForAll[originalVars, SwapVariables[expr, var, #] == expr]] &, vars];     results = Append[results, Prepend[Pick[vars, swappable], var]];     vars = Pick[vars, swappable, False];   )];   results );  SwappableVariablesIn[a b + c d e]  (* {{a,b},{c,d,e}} *) 

A function which can be used for a complicated expression to test timing:

DetNByN[n_] := Det[Table[Table[Indexed[x, {i, j}], {j, 1, n}], {i, 1, n}]];  First[Timing[SwappableVariablesIn[DetNByN[6]]]]  (* 10.7118 *) 

Add a functionality to quickly filter custom posts in Admin Area

I am creating a website for a doggie rescue, basically configuring the backend so they can manage dogs, volunteers, etc.

The legacy system had a feature where the user could start typing into an input field and all matching results would be displayed as you typed, most likely making ajax calls.

They would like to have this feature in WordPress. I tried using Admin Columns but you have to create the filter, modify the value and then click the Filter button and wait for it to load the results. I want to avoid the "click filter button and wait for page to come back with results" part.

One of the CPT that I am creating, volunteers, apparently has 40K records, and they would like to filter through them by using this "filter as you type" idea.

Is this possible from WPAdmin? I mean, adding a text input field that would filter all the posts using AJAX?

Thanks!

How quickly must a creature respond to the spell Sending?

Sending (PHB.274): (emphasis mine)

Casting Time: 1 action […]

Duration: 1 round […]

You send a short Message of twenty-five words or less to a creature with you are familiar. The creature hears the Message in its mind, recognizes you as the sender if it knows you, and can answer in a like manner immediately. The spell enables creatures with Intelligence scores of at least 1 to understand the meaning of your Message. […]

What constitutes immediately? The spell has a casting time of 1 action, and a duration of 1 round. Does the 1 round make up how long the caster has to send the message after the spell has been cast? Does that same time restriction apply to the receiver? Do both messages have to fit within the same round? Or does the 1 round represent the time it takes for the spell to arrive at the receiver?

How can I quickly get a player back into a session after their character dies?

As a GM, what kind of techniques could I use to help a player re-join the gaming session after their character dies? I want to avoid any major interruptions to the flow of the adventure. I would also like to avoid having to end the session immediately or making them sit on the side-lines for the rest of the session.

Is There Data on How Quickly Roleplaying Groups Move through Published Modules?

Obviously there are huge variations in how different groups approach adventures in tabletop games, different preferences and styles for DMs, and other factors that affect how much time (measured in sessions or hours) gaming groups spend playing through specific adventure modules.

In trying to assess the pacing of campaigns in which I’m involved (as a DM or player), I became curious about what others’ experiences have been playing through published modules – the published content is the same for everybody, so play style seems like it would drive most of the differences in play time. I’ve looked around a bit but have mostly found things like isolated Reddit threads where two or three people (at most) describe their singular experiences, and not always containing useful information about time.

Is there any data on typical time spent playing specific adventure modules in 5e?

Ideally this would be survey data describing completed campaigns, with some standardized way of estimating the amount of "off-book" content that was added (though I’d be surprised to see a survey that would try to gather that last one, as it’s hard to operationalize). Even more ideal would be data that includes player feelings about the length (such as 100 hours of play for 60% of respondents, and among those 30% of players would have preferred more play hours in the module).

If such data exists, I’m interested in any published module. My intended use is to compare the information to the length of the adventures as described in the source books, to set some loose bounds on how I might calibrate my own campaign pacing. Online or offline play, I’m interested in whatever is available.

How to quickly find out what the threat nature of a password protected archive without getting infected?

I have recently received an e-mail from an existing support group e-mail box with the following characteristics:

  • written in the language used in company’s HQ (different from English which is the primary communication language)
  • had a zip attachment
  • provides a clear password for the attachment
  • is a reply of a legitimate e-mail I have received from a colleague a few months ago

This seems to be similar to what is described here, so there is very high chance to have received an infected file. After a couple of hours, our security department sent an e-mail related to similar cases happening inside the company.

I am wondering about how to find out the exact nature of the threat in a secure way. I have tried the following (only the first step inside the company, the rest within a VM):

  • checked on VirusTotal, but received 0% detection which makes sense since the engines cannot scan the encrypted archive
  • Checked with the Nanoav which boast about scanning password protected archives, but it does not allow to input the password
  • opened the archive with 7zip and saw a document inside
  • extracted the file using 7zip and uploaded the document to VirusTotal => 13+ engines detected something weird.

Do previewing and extracting the archive impose any security risk or is it only the document inside that can be infected? (in this case it seems to employ a macro).

Question: How to quickly find out what exactly the threat nature of a password protected archive without getting infected?

How quickly do goblins/orcs grow? [closed]

In the Lord of the Rings movies and books, Saruman the white was able to breed an orc army within 6 months. He doesnt start until Gandalf visits him, and is finished went the Ents go to town on his tower. So by this source its like they come into being fully grown?

When I visited the fandom fact pages, there was nothing about them having to grow.

Even in the core rules there is nothing about them having to grow up from children.

Hello i have this code thats not written out in the write form can someone rearrange it for me quickly Thank you [closed]

.file 1 “” .section .mdebug.abi32 .previous .nan legacy .module fp=32 .module nooddspreg .abicalls .rdata .align 2 $ LC0: .ascii “Enter number of elements in array0” .align 2 $ LC1: .ascii “%d0” .align 2 $ LC2: .ascii “Enter %d integers20” .align 2 $ LC3: .ascii “Minimum element is present at location %d and its value ” .ascii “is %d.20” .text .align 2 .globl main .set nomips16 .set nomicromips .ent main .type main, @function main: .frame $ fp,448,$ 31 # vars= 416, regs= 2/0, args= 16, gp= 8 .mask 0xc0000000,-4 .fmask 0x00000000,0 .set noreorder .cpload $ 25 .set nomacro addiu $ sp,$ sp,-448 sw $ 31,444($ sp) sw $ fp,440($ sp) move $ fp,$ sp .cprestore 16 movz $ 31,$ 31,$ 0 li $ 2,1 # 0x1 sw $ 2,32($ fp) lw $ 2,%got($ LC0)($ 28) nop addiu $ 4,$ 2,%lo($ LC0) lw $ 2,%call16(puts)($ 28) nop move $ 25,$ 2 .reloc 1f,R_MIPS_JALR,puts 1: jalr $ 25 nop lw $ 28,16($ fp) addiu $ 2,$ fp,436 move $ 5,$ 2 lw $ 2,%got($ LC1)($ 28) nop addiu $ 4,$ 2,%lo($ LC1) lw $ 2,%call16(__isoc99_scanf)($ 28) nop move $ 25,$ 2 .reloc 1f,R_MIPS_JALR,__isoc99_scanf 1: jalr $ 25 nop lw $ 28,16($ fp) lw $ 2,436($ fp) nop move $ 5,$ 2 lw $ 2,%got($ LC2)($ 28) nop addiu $ 4,$ 2,%lo($ LC2) lw $ 2,%call16(printf)($ 28) nop move $ 25,$ 2 .reloc 1f,R_MIPS_JALR,printf 1: jalr $ 25 nop lw $ 28,16($ fp) sw $ 0,28($ fp) b $ L2 nop $ L3: addiu $ 3,$ fp,36 lw $ 2,28($ fp) nop sll $ 2,$ 2,2 addu $ 2,$ 3,$ 2 move $ 5,$ 2 lw $ 2,%got($ LC1)($ 28) nop addiu $ 4,$ 2,%lo($ LC1) lw $ 2,%call16(__isoc99_scanf)($ 28) nop move $ 25,$ 2 .reloc 1f,R_MIPS_JALR,__isoc99_scanf 1: jalr $ 25 nop lw $ 28,16($ fp) lw $ 2,28($ fp) nop addiu $ 2,$ 2,1 sw $ 2,28($ fp) $ L2: lw $ 2,436($ fp) lw $ 3,28($ fp) nop slt $ 2,$ 3,$ 2 bne $ 2,$ 0,$ L3 nop lw $ 2,36($ fp) nop sw $ 2,24($ fp) li $ 2,1 # 0x1 sw $ 2,28($ fp) b $ L4 nop $ L6: lw $ 2,28($ fp) nop sll $ 2,$ 2,2 addiu $ 3,$ fp,24 addu $ 2,$ 3,$ 2 lw $ 3,12($ 2) lw $ 2,24($ fp) nop slt $ 2,$ 3,$ 2 beq $ 2,$ 0,$ L5 nop lw $ 2,28($ fp) nop sll $ 2,$ 2,2 addiu $ 3,$ fp,24 addu $ 2,$ 3,$ 2 lw $ 2,12($ 2) nop sw $ 2,24($ fp) lw $ 2,28($ fp) nop addiu $ 2,$ 2,1 sw $ 2,32($ fp) $ L5: lw $ 2,28($ fp) nop addiu $ 2,$ 2,1 sw $ 2,28($ fp) $ L4: lw $ 2,436($ fp) lw $ 3,28($ fp) nop slt $ 2,$ 3,$ 2 bne $ 2,$ 0,$ L6 nop lw $ 6,24($ fp) lw $ 5,32($ fp) lw $ 2,%got($ LC3)($ 28) nop addiu $ 4,$ 2,%lo($ LC3) lw $ 2,%call16(printf)($ 28) nop move $ 25,$ 2 .reloc 1f,R_MIPS_JALR,printf 1: jalr $ 25 nop lw $ 28,16($ fp) move $ 2,$ 0 move $ sp,$ fp lw $ 31,444($ sp) lw $ fp,440($ sp) addiu $ sp,$ sp,448 j $ 31 nop .set macro .set reorder .end main .size main, .-main .ident “GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609”

How can PCs keep up when maneuver DCs increase so quickly?

Lots of maneuvers call for a DC of [some number]+2×[the ship’s tier]. Yet as your character levels up (and your ship’s tier with it), your max ranks in a given skill only increase by 1/level.

Thus, as you gain experience and get to know your ship better and modify it to suit you, it actually becomes harder to get it to do anything not in the base specs.

Coming off of 5e’s bounded accuracy, this is a bit of a shock. Am I reading this right? Am I missing something? I know there are ASIs, but those don’t happen that often — is there an assumption of assistive gear that would make maneuvers easier over time, or at least not harder?