## dnd 5e – When using the Template variant rule from Xanathar’s Guide to Everything, do 5 foot wide Lines actually affect a 10 foot wide row of grid squares?

Xanathar’s Guide to Everything has a few variant options for playing on a Grid.

XGtE, Page 86:

… Choose an intersection of squares as the point of origin of an area of effect …

… If any part of a square is under the template, that square is included in the area of effect. …

Diagrams 2.1 & 2.2 show this, with the Cone’s origin being on the intersection. Its shadow clearly covers small sections of both squares just after the intersection.

PHB, Page 205:

A line extends from its point of origin in a straight path up to its length and covers an area defined by its width.

My interpretation is that this means using templates on grids increases the average Area of Effect size notably for Cones & Lines particularly.

Does that seem correct?

Visual example:

Which would affect all 4 enemies labeled 1 if the caster is the one labeled 2.

## What do these lines from Reverse Gravity mean?

The spell Reverse Gravity includes this section (emphasis mine):

Once an object or creature reaches the top of the area, it floats, caught between the normal and reversed gravity. The creature can move along the plane where the two forms of gravity meet. Creatures that can levitate or fly can use those abilities to mitigate the effects of reverse gravity.

What does the bolded sentence mean? It sounds like you can ‘walk’ on the top of the effect, but that doesn’t make a lot of sense to me (lacking traction) so I was wondering if that’s the case (because magic) or if there is another interpretation that is more accurate.

## spells – What does this lines from Reverse Gravity mean?

Reverse Gravity includes that

Once an object or creature reaches the top of the area, it floats, caught between the normal and reversed gravity. The creature can move along the plane where the two forms of gravity meet. Creatures that can levitate or fly can use those abilities to mitigate the effects of reverse gravity.

What does the bolded sentence mean? It sounds like you can ‘walk’ on the top of the effect, but that doesn’t make a lot of sense to me (lacking traction) so I was wondering if that’s the case (because magic) or if there is another interpretation that is more accurate.

## beginner – Count characters, words, and lines in files (wc in rust)

I wrote a barebones version of `wc` in rust. `wc` is a program that counts the number of characters, words, and lines in a file and outputs those values to the command line. Here is an example of the output:

``````   9   25  246 Cargo.toml
52  163 1284 src/main.rs
61  188 1530 total
``````

My version currently lacks the proper output alignment, and it doesn’t print the total (it also lacks the command line options, and it panics when fed a directory). But I would like to get some feedback before I go any further.

``````use std::env;

struct InputFile {
words: u32,
lines: u32,
characters: u32,
name: String,
}

impl InputFile {
fn new(name: &String) -> Self {
let (mut characters, mut words, mut lines) = (0, 0, 0);
let mut spaced: bool = false;
for c in content.chars() {
if c as u8 != 0 {
characters += 1;
}
if c != ' ' && c != 'n' {
spaced = false
}
if c == 'n' {
lines += 1;
if !spaced {
words += 1;
spaced = true;
}
}
if c == ' ' && !spaced {
words += 1;
spaced = true;
}
}
Self { lines, words, characters, name: name.to_string() }
}
}

impl std::fmt::Display for InputFile {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{} {} {} {}",
self.lines, self.words, self.characters, self.name
)
}
}

fn main() {
let files: Vec<String> = env::args().collect();
for f in &files(1..) {
println!("{}", InputFile::new(f));
}
}
``````

## windows – Can the -replace option replace multiple lines?

I’m attempting to create shortcuts to launch particular games through DOSBox for my son, and I’m attempting this by dynamically changing the “(autoexec)” portion of the DOSBox “.conf” file with this script:

``````((Get-Content -path C:UsersskewbAppDataLocalDOSBoxdosbox-0.74-3.conf -Raw) -replace "(autoexec)*", "`(autoexec`)`nMOUNT C`r`nE:GamesDOSGames`r`nC:`r`ncd SSGG`r`nssg`r`n") | Set-Content -Path C:UsersskewbAppDataLocalDOSBoxdosbox-0.74-3.conf
start-process "D:Program Files (x86)DOSBox-0.74-3DOSBox.exe"
``````

I’ve almost gotten it to work but now every time I run the script, it’s appending to the end of the autoexec portion (well… technically the beginning of the portion but w/e) like this:

Original:

``````(autoexec)
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
``````

Expected output:

``````(autoexec)
MOUNT C
E:GamesDOSGames
C:
cd SSGG
ssg
``````

Actual Output:

``````(autoexec)
MOUNT C
E:GamesDOSGames
C:
cd SSGG
ssg

MOUNT C
E:GamesDOSGames
C:
cd SSGG
ssg

MOUNT C
E:GamesDOSGames
C:
cd SSGG
ssg

MOUNT C
E:GamesDOSGames
C:
cd SSGG
ssg

MOUNT C
E:GamesDOSGames
C:
cd SSGG
ssg
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
``````

It appears to identify the `(autoexec)` portion correctly, but then stops at the newline I guess?
I’ve also tried identifying the newlines in the “find” like this (to no avail of course):

``````((Get-Content -path C:UsersskewbAppDataLocalDOSBoxdosbox-0.74-3.conf -Raw) -replace "(autoexec)(`r`n)(*)", "`(autoexec`)`nMOUNT C`r`nE:GamesDOSGames`r`nC:`r`ncd SSGG`r`nssg`r`n") | Set-Content -Path C:UsersskewbAppDataLocalDOSBoxdosbox-0.74-3.conf
``````

## geometry – Problem understanding angle between two lines

I’ve tried to sovle this pyramid problem from some Chinese contest, but can’t understand how the provided angle from the question exists and how to uitlize it. Here’s the problem and the soltuion:

How do AB and CD form an angle? They don’t intersect, right? And how can we find the angle ECD then? Thanks.

## Hamburger menu icons – Recent trend of moving away from three full-width lines to having two full-width lines and a shortened line?

Some examples in various iOS apps:

1. US Bank

2. RentCafe

3. Uber

The first two kinda reminds me of the icon for aligning text justified left.

I’m quite curious about the reason for this change. I couldn’t really find anything about it online. Could someone provide some insight and perhaps some online resources that talk about this?

## What is the meaning of this lines of code?

def init(self, lemma_lookup: Dict(str, str) = None, lemma_rules: Dict(str, List(str)) = None,
pronoun_set: Set(str) = None, word_set: Set(str) = None):

## How can I rotate the two endpoints of a line around the line’s center in 3d?

The object is a capsule. I have the position of the object vector3, and the orientation of the object, a quaternion. I want to construct a line which goes through the middle of the capsule with the two endpoints of the line being the top and bottom.

The capsule can be rotated in all 3 dimensions.

## Just started writing javascript to test APIs and below code is to test multiple steps in Json response.Is there a way to clean up and have fewer lines

TC1 is Code to verify data 1st item of the list in json Response, TC2 Code to verify data 2nd item of the list in json Response and so on. Can this be cleaned up to have fewer lines

``````pm.test("E13_TC1",function() {pm.expect(responseJson.runnerNodeResults(5).filterTemplateId).eql(18);});
pm.test("E13_TC2",function(){pm.expect(responseJson.runnerNodeResults(5).steps(0).step).eql(0);
pm.expect(responseJson.runnerNodeResults(5).steps(0).definition.id).eql(18);
pm.expect(responseJson.runnerNodeResults(5).steps(0).definition.type).eql("FilterTemplate");
pm.test("E13_TC3",function() {pm.expect(responseJson.runnerNodeResults(5).steps(1).step).eql(1);
pm.expect(responseJson.runnerNodeResults(5).steps(1).definition.id).eql(114);
pm.expect(responseJson.runnerNodeResults(5).steps(1).definition.type).eql("Condition");
pm.expect(responseJson.runnerNodeResults(5).steps(1).definition.name).eql("Condition::114");