## Can the Dual-Balanced weapon modification be applied to double weapons?

The Dual-Balanced weapon mod description says,

https://www.d20pfsrd.com/equipment/weapons/weapon-modifications/dual-balanced/

Price +2,000 gp; Weight —

Dual-balanced weapons are balanced to be wielded in tandem.

Only melee weapons can be dual-balanced. When wielding two weapons with the dual-balanced modification, reduce any two-weapon fighting penalties by 1 for both weapons. The weapons do not need to be the same type, but both must have the dual-balanced modification.

Can I apply this mod to double weapons, such as a staff? I suspect there may be a problem with it RAW—if so, would it cause problems to allow it?

## Is WhatsApp end-to-end encryption applied to images?

I know that for text, WhatsApp messages are encrypted in a way no “man in the middle” could read them. But what about images?

Imagine you received some private image on your smartphone. Then you open WhatsApp Web on your PC, which uses an employer VPN.

## Why do Amdahl’s law and Gustafson’s law give us different speedups, when applied on the same task?

I am given a task, where exactly 50% of the work is parallelizable. When applying Amdahl’s law to calculate speedup when using 2 processing units instead of one, I get a different result than the one I get when calculating the same speedup using Gustafson’s law. I don’t understand why is that.

## Rank 1 kakita applied to damage

Following what it is said on the book of fourth edition, rank 1 kakita bushi “The way of the crane”:

You gain a bonus of +1k1 plus your School Rank to the total of all attack and Focus rolls while assuming the Center Stance.

Does this mean that it gets a +1k1 to only hit, or to hit and damage rolls?

## What kind of JavaScript protection is usually applied on password fields to prevent value injection? [closed]

There is a certain website with a certain login form which includes two fields; username and password.

I can successfully inject data with vanilla JavaScript to the first field:

``document.querySelector("#username").value = "USERNAME"; ``

But when I try to inject a password:

``document.querySelector("#password").value = "PASSWORD"; ``

I get an error:

VM1766:1 Uncaught TypeError: Cannot set property ‘value’ of null at :1:45

## My problem

I double checked if the field exists as is and it is indeed existing in DOM;
I further ran a code like `console.log(document.querySelector("#password"));` and got lots of output which I purposely evade pasting here due to legal reasons.

## My question

What kind of JavaScript protection is usually applied on password fields to prevent value injection?

## What kind of smoothing was applied to these bigrams probabilities?

A certain program computes bigrams probabilities applying a smoothing factor of K=1 given the corpus `12 1 13 12 15 234 2526`. It does the following operations; first computes an “unnormalized bigrams”:

`{'12': {'1': 2.0, '15': 2.0}, '1': {'13': 2.0}, '13': {'12': 2.0}, '15': {'234': 2.0}, '234': {'2526': 2.0}}`. All of those 2.0 values are from doing k+1.

Then shows the “normalized bigrams”:

`{'12': {'1': 0.2, '15': 0.2}, '1': {'13': 0.25}, '13': {'12': 0.25}, '15': {'234': 0.25}, '234': {'2526': 0.25}}`.
The operations are:

P(1|12)=2/(2+2+6)=0.2
P(15|12)=2/(2+2+6)=0.2
P(13|1)=2/(2+6)=0.25
P(12|13)=2/(2+6)=0.25
P(234|15)=2/(2+6)=0.25
P(2526|234)=2/(2+6)=0.25

I don’t know the logic behind these operations, Laplace smoothing would be for example, given P(1|12)=1/2, smoothed; (1+1)/(2+6)=0.25 then, shouldn’t be 0.25 instead of 0.2?
This is the stripped down code from the original one:

``from __future__ import print_function from __future__ import division import re class LanguageModel:     "unigram/bigram LM, add-k smoothing"     def __init__(self, corpus):          words=re.findall('[0123456789]+', corpus)         uniqueWords=list(set(words)) # make unique         self.numWords=len(words)         self.numUniqueWords=len(uniqueWords)         self.addK=1.0          # create unigrams         self.unigrams={}         for w in words:             w=w.lower()             if w not in self.unigrams:                 self.unigrams[w]=0             self.unigrams[w]+=1/self.numWords          # create unnormalized bigrams         bigrams={}         for i in range(len(words)-1):             w1=words[i].lower()             w2=words[i+1].lower()             if w1 not in bigrams:                 bigrams[w1]={}             if w2 not in bigrams[w1]:                 bigrams[w1][w2]=self.addK # add-K             bigrams[w1][w2]+=1          #normalize bigrams          for w1 in bigrams.keys():             # sum up             probSum=self.numUniqueWords*self.addK # add-K smoothing             for w2 in bigrams[w1].keys():                 probSum+=bigrams[w1][w2]             # and divide             for w2 in bigrams[w1].keys():                 bigrams[w1][w2]/=probSum         self.bigrams=bigrams         print('Unigrams : ')              print(self.unigrams)         print('Bigrams : ')         print(self.bigrams)         if __name__=='__main__':      LanguageModel('12 1 13 12 15 234 2526') ``

## What are the practical usage of Linear Programming, when and where can it be applied

I am a student of Federal Polytechnic, Ilaro studying Computer Science. I did statistics as a borrowed course and in there, we were taught Linear Programming such transportation, simplex method, dual simplex, duality principles etc

I will like to know the exact place where these theory can be applied in real life scenarios.

## Is a Bugbear’s Long Limbed reach also applied to shoves and grapples?

In this question, I have been told the difference between a “melee attack” (which, if I understand correctly, Shoves and Grapples are) and a “melee weapon attack” (which they are not).

A Bugbear’s Long Limbed feature gives him 5 feet of extra reach for melee attacks made on his turn.

So, is a Bugbear’s Long Limbed reach also applied to special attacks (Shoves & Grapples)?

## How can ideas like Lagrange Multipliers and Penalty Method be applied for solving algorithms?

I have a programming assignment which I was told that is solvable with some DP algorithm. The question involves some $$k$$ which is essentially a constraint. In particular the question is a variant of LIS problem where at most $$k$$ exceptions (restarts) are allowed.

But I know that there is a better solution. My professor mentioned Lagrange Multipliers and giving a penalty for each restart. But after googling these terms I wasn’t able to find out something related to algorithms. I read about them on Wikipedia but I can’t figure out how to use them. Also every article is related to Calculus and function optimization.

Is there a keyword that can describe better what I want to read about?

## If you cast Blindness/Deafness on the same creature twice, what conditions are applied?

After researching into how spell effects stack, I find some ambiguity regarding certain spells that have multiple possible effects.

Notably, this answer regarding stacking spell effects contains updated information from the DMG errata:

Combining Game Effects (p. 252). This is a new subsection at the end of the “Combat” section:

Different game features can affect a target at the same time. But when two or more game features have the same name, only the effects of one of them—the most potent one—apply while the durations of the effects overlap. For example, if a target is ignited by a fire elemental’s Fire Form trait, the ongoing fire damage doesn’t increase if the burning target is subjected to that trait again. Game features include spells, class features, feats, racial traits, monster abilities, and magic items. See the related rule in the ‘Combining Magical Effects’ section of chapter 10 in the Player’s Handbook.

There are, however, no references in deciding how to determine what “the most potent one” may be when not using raw numbers (such as with paladin auras).

This is also applicable to spells like contagion, which inflicts a “natural disease” (and you can be afflicted by multiple natural diseases).

If both effects of blindness/deafness cannot influence a character at the same time, how do you determine which one takes effect (assuming both casts are at the same spell level)?