is there something like a “foreach” mode from the command line? Like in perl?

With perl we can run perl -p . That wraps a foreach loop around the code and executes the code on the file. What I’m looking for is something like

StringReplace[filename,”\t”->”,”]

and then I get a new file in which the string replace happened (the above would convert a .tsv to a .csv). Doesn’t have to be StringReplace, can be anything that takes a line of stuff as input. Total[filename] would total all numbers in the rows of the file.

That is like “scripting” the M command line-by-line (during MS-DOS we used to call that “batch mode” — really means line-by-line).

Can a player split up attacks like they can movement?

I didn’t think so, but I’ve read a couple postings elsewhere that make me think otherwise.

Ex. A fighter with ‘Extra Attack’ from the PHB:

Beginning at 5th level, you can attack twice, instead of once, whenever you take the Attack action on your turn.

To me, both attacks would be during the same attack action, so the fighter could move 10′, attack twice, then keep moving, since you can split up movement.

But, could they move, attack once, let’s say the opponent goes down, then move to another opponent and use their second attack?

Is there something like DynDNS for a DNS service?

I run a small DNS server (pihole) at home behind a firewall, with some custom filtering. I have an IPv4 address (not fixed) with my ISP and could use DynDNS for HTTP traffic to my home.

Now I would like to use my home-based DNS server on my mobile phone when traveling. How could I possibly do that?

Since the IP is not fixed, I will not be able to provide a fixed IP for DNS resolution. I would need something that gets the IP first. Like DynDNS for DNS.

Does such a dynamic IP resolution for DNS exists?

Note: I would like to not use a VPN connection since I do not need to re-route the subsequent traffic to my home, I just want to use my DNS server.

What category does questions like “Given n points on 2D plane find …” belong to

Not after a specific answer, do following questions belong to same set of problem types?

Given n points in on 2D plane, find 4 or 5 , or m subset of points with less total distant to each other than all other points.

Or

Given n points in on 2D plane, count the number of triangles, squares etc. that they form.

Or

Given n points in on 2D plane, find a point that is closeses to most number of points as possible.

are these optimisation questions? or is there another name for above type of questions, or there can be no category for all the questions of type

Given n points in on 2D plane, find $ \cdots$

This question did not seem to be fit for SO or Software engineering, so I am asking it here, if there is better SE to ask this question I’ll delete this question and ask it there ( in reverse order ).

Calculate occluded parts for planet like object

enter image description here

So I have camera position, planet position, radius and coordinates for every side (node) corners and I want to hide side that is beyond horizon (with some safety margins). I think I could easily calculate in 2D using trigonometry, but in 3D have no idea right now. I found some code online:

TileNode.prototype.isWithinHorizon = function () {   var r = this.master.getRadius();   var camToTile = this.master.getCamToTile(this);   var camToCenter = this.master.getCamToCenter();    var camDistToCenter = camToCenter.length();   var dotCtCc = camToTile.dot(camToCenter.divideScalar(camDistToCenter));    return dotCtCc - this.scale*0.5 < (camDistToCenter - r*r/camDistToCenter); }; 

but can’t make sense of it, as it is not commented. Any help appreciated!

P.S. i hope i use the term “occluded” right here

What does Eldritch Blast look like?

The eldritch blast spell description says:

A beam of crackling energy streaks toward a creature within range. Make a ranged spell attack against the target. On a hit, the target takes 1d10 force damage.

It is hard to me to visualize what a ‘beam’ looks like.

These beams are ‘crackling’; does that mean they make sounds? And in darkness, is it possible to know where they come from?

Also, these beams are of ‘energy’ that cause force damage, so are these beams visible to normal creatures?

How to bypass what seems like a MAC-Adress ban?

So my problem here is I got banned in this online mmorpg because of some reasons. They first banned me on my laptop and then also on my computer because i was dumb enough to use an account which i created on my laptop and they could track it down that its the same owner. So my question here is how can i bypass this MAC ban? An moderator told me that they are working with encrypted MAC adresses and sent me mine (i dont know if i can trust him if its really mine) I already tried to change my MAC adress with a software called “Technitium” but i still couldnt get access to the game. Does someone knows what the solution for this problem could be? I tried to use also a virtual machine but they can track that down and block all kind of access from virtual machine. I would be really thankful if someone can help me with this.

Identifying non-edible potions like Oil of Sharpness

Potions identification can be usually made by tasting a bit of a potion and the drinker can fully know the properties of the potion. However it’s not rational to be able to tell the properties of a non-edible potion like “Oil of Sharpness” that is supposed to be applied on a weapon in order to work.

So I’m asking, how is one supposed to quickly understand the properties of said type of potion? I know that maintaining focus in a short rest is a possible way to find the properties, but trying to see if anyone else has a quicker way of identification similar to that of tasting a potion.