OptionValue doesn’t work if a local variable has the same name as the function itself

The following innocent-looking code results in error.

Options[add] = {number -> 1}; add[x_, OptionsPattern[]] := Module[{add},    x + OptionValue[number] ]; add[1] 

The error is

OptionValue::optnf: Option name number not found in defaults for add$  2832. 

What triggers the error is the fact that a local variable declared by Module has the same name as the function, add. (For simplicity, I’ve shown an example where this local variable isn’t actually used in the code, but this doesn’t make a difference.)

Is this a bug in Mathematica, or some known quirk of OptionValue[]?

Linked server only works if I am on the machine itself. I can’t use it from my local computer. what is missing?

I have a few queries that I use to monitor log shipping. Sometimes I want to run those queries on a different server. I usually do that through a linked server.

I have a server called SQLDEV4-TS that has a linked server to MY_SERVER\DEVELOPMENT

ON SQLDEV4-TS I have setup Kerberos as per the picture below:

enter image description here

I have this query below that I use to test the connectivity to the linked server.

DECLARE @server_name sysname = @@servername SELECT @server_name=N'MY_SERVER\DEVELOPMENT'   DECLARE @sql NVARCHAR(MAX) = N'SELECT * FROM OPENQUERY([' + @server_name +'],        ''SELECT ''''Radhe'''' AS Radhe'');'  BEGIN TRY     EXEC sp_testlinkedserver @server_name      EXEC sp_executesql @sql=@sql  END TRY BEGIN CATCH     SELECT [error_number]=ERROR_NUMBER(), [error_message]=ERROR_MESSAGE(); END CATCH;  PRINT 'We got past the Catch block!'; 

When I am on the server itself – SQLDEV4-TS – and I run the above script I get the following result:

enter image description here

All good – it works as expected – no problem.

However, when I connect to SQLDEV4-TS from my local machine, and run the script (on my machine) I get the following result:

Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’.

enter image description here

What is missing in this linked server setting, that I have to be on the machine itself for it to work?

Does the Fire Elementa’s Touch attack’s ongoing damage stack with itself? [duplicate]

If a fire elemental uses the Touch attack:

Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 10 (2d6 + 3) fire damage. If the target is a creature or a flammable object, it ignites. Until a creature takes an action to douse the fire, the target takes 5 (1d10) fire damage at the start of each of its turns.

And then hits a creature twice, how would the emphasized text work? Would the creature have two instances of it and take 2d10 damage at the start of the turn or only one? If they would have it twice would they be able to put both out by dousing the fire?

Does a UA Dhampir Cleric Turn Itself? What does that look like?

Dhampir have two types tags in the new Unearth Arcana, they are both humanoid and undead. There is even a nice rules reminder in D&D Beyond that points out:

If an effect works on at least one of a creature’s types, that effect can work on that creature. For example, if you are both a Humanoid and an Undead, cure wounds works on you, since the spell works on a Humanoid.

Everything so far is peachy keen. I was going to introduce an NPC that is a Dhampir Cleric, but ran across an odd edge case. If the cleric uses Channel Divinity: Turn Undead I’m not sure what happens:

Channel Divinity: Turn Undead As an action, you present your holy symbol and speak a prayer censuring the undead. Each undead that can see or hear you within 30 feet of you must make a WIS saving throw (DC 14). If the creature fails its saving throw, it is turned for 1 minute or until it takes any damage. A turned creature must spend its turns trying to move as far away from you as it can, and it can’t willingly move to a space within 30 feet of you. It also can’t take reactions. For its action, it can use only the Dash action or try to escape from an effect that prevents it from moving. If there’s nowhere to move, the creature can use the Dodge action.

I know it is play test material and will have weird edge cases like this not hammered out. I also know at my table I will have to make a call if it comes up. However, as it stands, the NPC is an undead within 30 feet who can see and hear itself, so RAW would have to make the roll, right? And what would it mean if you failed it and became turned and had to move away from itself? What would that look like?

What can an Animated Undead do to Defend Itself? [duplicate]

From the spell Animate Undead,

If you issue no commands, the creature only defends itself against hostile creatures.

A zombie is as smart as a mastiff while a skeleton is as smart as an ape.

What are some actions the animated undead might take in order to defend itself? Does it ready an attack? Does it move towards the hostiles to engage? I suggest these actions because animals of similar intelligence might do the same.

How does an Animated Undead Determine Hostility, and how does it Defend Itself?

From the spell Animate Undead,

If you issue no commands, the creature only defends itself against hostile creatures.

There are two troubling terms here, for me. One is defends, and the other is hostile.

Defends is not to my knowledge a keyword. Does the undead only take the Dodge action against hostile creatures, or does it also attempt to eliminate the threat?

Hostile is a keyword, but I’m not positive it is being used as a keyword in this situation. The keyword states

A hostile creature opposes the adventurers and their goals but doesn’t necessarily attack them on sight.

Is this the definition the animated undead is using? Must the hostility be directed towards the undead itself? Must the hostility involve an attack for the undead to take action?

The implications: An undead frequently may not need to receive a command if it plays loosely with the definitions of defends and hostile.

Is there any mundane way to travel from the Border Ethereal of a plane to the plane itself?

Say a commoner with no spells, class features, or magic items is Plane Shifted from the Material Plane to the Border Ethereal.

The DMG makes mention of "curtains" that allow travel from the Deep Etheral to the Border Ethereal, but nothing of any portals in the Ethereal plane itself.

Is there any way for this individual to return to the Material Plane?

Can a Legendary with the Nature/Oceans/Sky Aura summon itself?

In the Blessed and the Damned, Legendary Pokémon are given auras that grant special abilities to make them even more formidable. Three of these allow the user to summon a combatant of a level equal to their own (Or half their level if the combatant is a trainer).

I can not find any limitations to these combatants other than the level. Could this aura be used to summon an exact duplicate of the Legendary in question? I understand that in many cases this makes no sense, but it could be a way to explain Celebi’s gimmick where dozens of it from different times appear: One summons one other. Next turn, both summon one more each- Etcetera.

Is it possible to make a common PC bluetooth card identify itself as headset? [closed]

My objective would be to make an application that makes the computer identify as a headset, so I can connect my phone to it and route the audio of the calls to the computer.

I think this is highly related to security. I’m talking about the ability to make a device identify as something else, think about the USB rubber ducky, now replace "USB" with "Bluetooth".

That’s why I posted here. The purpose of doing this would not be anything malicious, I just want to connect my phone to the PC so I can hear the voice of the person calling me on my phone, through the headset connected to my PC:

Phone -> Bluetooth -> Computer -> Headset

Why do all metals corrode when attacking a Rust Monster, yet it itself can only target ferrous metals

When you attack a rust monster, the following may apply:

Rust Metal. Any nonmagical weapon made of metal that hits the rust monster corrodes. […]

So, bronze for example being a metal would corrode.

But the rust monster has the following action:

Antennae. The rust monster corrodes a nonmagical ferrous metal object it can see within 5 feet of it. […]

But seeing as bronze is not ferrous, it cannot be targeted.

What is the lore reason behind this?