Will green-flame blade damage bonus apply to multiple attacks made in the same turn?

Question: One can only cast 1 cantrip per turn (at least, as a warlock). But does the bonus damage rolled by Green-Flame Blade apply to multiple attacks, such as those coming from Improved Pact Weapon?
Comment: Related: [If your fighter casts Green-Flame Blade or Booming Blade, do you still get extra Attacks?](https://rpg.stackexchange.com/questions/114006/if-your-fighter-casts-green-flame-blade-or-booming-blade-do-you-still-get-extra)
Comment: Related: "[Does Green Flame Blade and Sweeping Attack combo cause the bonus effect of GFB to hit again?](https://rpg.stackexchange.com/q/172357)" and "[If I cast Green-Flame Blade but my attack misses, and I use an extra action from Haste to attack again, does GFB's effect apply if that attack hits?](https://rpg.stackexchange.com/q/196126)"
Comment: Improved Pact Weapon doesn't seem to do anything relating to multiple attacks, where you thinking of Thirsting Weapon perchance?
Answer: It will only apply damage once
Green-Flame Blade says:

You brandish the weapon used in the spell's casting and make a melee attack with it against one creature within 5 feet of you. On a hit, (damage effects are described)

The spell allows you to take only a melee attack, not on a full attack action, or multiple attacks, and the extra damage and effects apply to a hit with that attack.
Making that melee attack is part of the spell's effect. Additional attacks, even if you can take them separately, are not part of its effect, and do not benefit from its additional damage.
Comment: I think you are saying that when you cast green flame blade you get a single strike, empowered with the green flame magic, and that if you have a way of making 2 attacks (such as extra attack, or something from a pact) you can still only take one, but I don't think it is as clear in this answer as it could be. I read this as saying the first attack benefits from green flame blade, but the other attacks can still be taken, and I don't think that is what you are trying to say.
Comment: @SeriousBri Thank you, yes, that is what I mean. I rephrased it to (hopefully) make it clearer.
Answer: When you use GFB, you are taking the cast a spell action.  As such, any ability that requires you use the Attack action (like extra attack) can't be used.  If you cast GFB you only get a single melee attack as a part of that action.
You could get additional attacks during the same turn if you quicken GFB, but the single melee attack you take and the resulting damage are both part of the spell, the cantrip would have no effect on any other actions you might take.


Method of Frobenius Why is There a Logartihmic Solution?

Question: When solving a problem with the method of Frobenius, if the difference of the roots of the indicial equation differ by a natural number, the smaller root of the indicial equation does not produce a solution because there is no value of its $N$th term that will work where N is the natural number difference between the roots. However, there is another solution in the form
$$y_2(x) = u(x) -b_N y_1(x)\log x$$ where $y_1$ is the first solution, $u(x)$ is a Frobenius series with obtained with the smaller root, and $b_N$ is the Nth term of $u(x)$. (Ordinary Differential Equation by Morris Tenenbaum and Harry Pollard). I tried to use Reduction of Order, but couldn't figure out how that would work.
Answer: A good way to understand this (and indeed the actual method that Frobenius employed, rather than the watered-down modern version) is to consider the expansion with a more general power in it than the one that satisfies the indicial equation.
The simplest example is the Euler–Cauchy equation
$$ x^2 y'' + pxy'+qy = 0, $$
where $p,q$ are constants. This has a regular singular point at $x=0$. If we try a solution of the form $y_{\alpha} = x^{\alpha}$, we find
$$ x^2 y_{\alpha}'' + pxy_{\alpha}'+q y_{\alpha} = f(\alpha)x^{\alpha}, \tag{1} $$
where $f(\alpha) = \alpha(\alpha-1)+p\alpha+q$. So a solution occurs when $f(\alpha)=0$. If $f$ has two roots $\sigma_{\pm}$, then $x^{\sigma_{\pm}}$ are linearly independent solutions. On the other hand, if $f$ has only one root $\sigma$, it can be written in the form $f(\alpha) = (\alpha-\sigma)^2$. Since differentiating this with respect to $\alpha$ and evaluating it at $\sigma$ still gives a root, this suggests that we can find a second solution by looking at $\partial y_{\alpha}/\partial \alpha$. Indeed, since the differential operator does not depend on $\alpha$, we can differentiate $(1)$ and change the order of differentiation, which gives
$$ \left(x^2 \frac{d^2}{dx^2} + px \frac{d}{dx} +q \right) \left.\frac{\partial y_{\alpha}}{\partial \alpha} \right|_{\alpha=\sigma} = (f(\sigma)\log{x}+f'(\sigma))x^{\sigma} = 0. $$
Of course
$$  \left.\frac{\partial y_{\alpha}}{\partial \alpha} \right|_{\alpha=\sigma} = x^{\sigma}\log{x}. $$

The same idea can be used for equations where $p$ and $q$ are not constant. Given the differential equation
$$ Ly = x^2 y'' + p(x)xy'+q(x)y = 0, $$
where $p,q$ have power series expansions $\sum_{k=0}^{\infty} p_k x^k$ and $\sum_{k=0}^{\infty} q_k x^k$ respectively, the action on a general power is
$$ L x^{\alpha} = f(\alpha,x)x^{\alpha}, $$
where $f$ is analytic in $x$: it has an expansion
$$ f(\alpha,x) =  \sum_{k=0}^{\infty} f_k(\alpha)x^{k}. $$
In particular, $f_0(\alpha) = \alpha(\alpha-1)+p_0\alpha+q_0$ and $f_k(\alpha) = p_k\alpha+q_k$ for $k>0$. We now insert the Frobenius series $y_{\alpha}(x) = \sum_{k=0}^{\infty} a_k x^{k+\alpha}$, and find
$$ Ly_{\alpha}(x) = \sum_{k=0}^{\infty} f(k+\alpha)a_k x^{k+\alpha} = \sum_{k=0}^{\infty} \Big( f_0(k+\alpha)a_k + f_1(k+\alpha-1)a_{k-1} + \dotsb + f_k(\alpha)a_0 \Big)x^{k+\alpha}. $$
For this to be satisfied over a whole region, we need every coefficient of $x$ to be zero, which gives the system
$$ f_0(\alpha)a_0 = 0 \\
f_0(\alpha+1)a_1 + f_1(\alpha)a_0 = 0 \\
f_0(\alpha+2)a_2 + f_1(\alpha+1)a_1 + f_2(\alpha)a_0 = 0 \\ \vdots $$
The first of these is of course the indicial equation. Satisfying it means picking a root, and hence an exponent $\sigma$. But we can see that if $f_0(\sigma+s)=0$ for a positive integer $s$, the recurrence relations may break down.
Suppose that all but the first equation are satisfied, but we still have a general $\alpha$. Then the coefficients are now rational functions of $\alpha$, $a_k = a_k(\alpha)$, and
$$ Ly_{\alpha} = f_0(\alpha)a_0 x^{\alpha}. $$
We now have the well-known three cases:

$f_0(\alpha)$ has two roots that do not differ by an integer. Both ordinary Frobenius solutions work fine.
$f_0(\alpha)$ has a double root $\sigma$. One solution is $y_{\sigma}(x)$. The same trick as before works to find the other: by differentiating with respect to $\alpha$, we find by the same argument as before
$$ L \left. \frac{\partial y_{\alpha}}{\partial \alpha} \right|_{\alpha=\sigma} = (f_0(\sigma)(a_0'(\sigma)+a_0(\sigma)\log{x})+f_0'(\sigma))x^{\sigma} = 0, $$
so a second solution is given by
$$ \left. \frac{\partial y_{\alpha}}{\partial \alpha} \right|_{\alpha=\sigma} = \sum_{k=0}^{\infty} (a_k(\sigma)\log{x}+a_k'(\sigma))x^{k+\sigma} = y_{\sigma}(x)\log{x} + \sum_{k=0}^{\infty} a_k'(\sigma) x^{k+\sigma}. $$
$f_0(\alpha)$ has two roots $\sigma$ and $\sigma-s$, $s \in \{1,2,3,\dotsc\}$. $y_{\sigma}(x)$ is one solution. The other is found in a similar manner to the previous one, but we have to come up with a way for the recurrence relation $$f_0(\alpha-s+s)a_s + f_1(\alpha-s+s-1)a_{s-1}+\dotsb+f_s(\sigma)a_0 = 0 \tag{2} $$
to be satisfied. A way to do this is to choose $a_0 = f_0(\alpha+1)f_0(\alpha+2)\dotsm f_0(\alpha+s)a$, where $a$ is constant. Then $(2)$ will be satisfied. A side effect of this that one can prove is that with this $a_0$, $y_{\sigma-s}$ is proportional to $y_{\sigma}$, so is not an independent solution. But we have
$$ Ly_{\alpha} = f_0(\alpha)a_0(\alpha)x^{\alpha} = (\alpha-\sigma)(\alpha-\sigma+s)^2 g(\alpha)x^{\alpha}, $$
where $g(\sigma-s) \neq 0$. Then differentiating with respect to $\alpha$ gives
$$ L\left. \frac{\partial y_{\alpha}}{\partial \alpha} \right|_{\alpha=\sigma-s} = \left. (\alpha-\sigma+s)(\dots)x^{\alpha} \right|_{\alpha=\sigma-s}, $$
where the second bracket is analytic in $\alpha$, and hence the right-hand side vanishes and
$$\left. \frac{\partial y_{\alpha}}{\partial \alpha} \right|_{\alpha=\sigma-s} = \dotsb = Ay_{\sigma}(x)\log{x} + \sum_{k=0}^{\infty} a_k'(\sigma-s) x^{k+\sigma-s}$$ is a second linearly independent solution; $A$ is the constant of proportionality between $y_{\sigma-s}$ and $y_{\sigma}$. We stress again that in this case, $a_0(\alpha)$ has been chosen to have a particular form so that $a_0(\sigma-s)=0$; the form chosen normally makes the calculations simplest. Choosing a different function of $\alpha$  that vanishes at $\sigma-s$ will give a different series that is proportional to this one.)

Once one knows what form the series can take, it is normally easier to actually just substitute the appropriate form in to derive conditions on the coefficients, rather than actually doing the differentiation, but I think this is a good theoretical reason for the forms that occur. (In the last case, if we look for a series of the form $\sum_{k\geq 0} (A_k\log{x}+B_k)x^{k-\sigma+s}$,  an ambiguity occurs in the recurrence relation for $B_s$ since it vanishes identically; this amounts to the freedom to add on a multiple of $y_{\sigma}$.) This exposition can be found, with examples, in Forsyth's Theory of Differential Equations, pp. 243–258.
Comment: The book is available in full here: https://archive.org/details/treatiseondiffer032528mbp
Comment: The series with a specific $a_0(\alpha)$ is a well-defined function of $\alpha$ for $\alpha \neq \sigma-s$. If $a_0(\alpha)=0$, it extends to be well-defined at $\alpha = \sigma-s$ by taking the limit, so that $a_0(\alpha)/f_0(\alpha)$ converges to a finite limit. (If we do this, we find that it becomes a known multiple of $y_{\sigma}$ due to $a_0,\dotsc,a_{s-1}$ being the zero, which causes the recurrence relations to become the same as those for $y_{\sigma}$; $a_s$ is also well-defined in this limit.) [...]
Comment: [...] Likewise, the derivative wrt $\alpha$ at $\alpha=\sigma-s$ is well-defined, and gives the series solution quoted. So this approach gives a particular series for each $a_0(\alpha)$. On the other hand, if we approach it looking for a series of the form we know it should take, namely $\sum_{k \geq 0} A_k x^{k+\sigma-s}\log{x}+B_k x^{k+\sigma-s}$, we would find that the $k=s$ recurrence vanishes identically, so $B_s$ (and only $B_s$) can be chosen arbitrarily. So only $A_0$ and $B_s$ can be chosen arbitrarily.
Comment: Could you please explain why the solution takes this form? in the book you mentioned, it mentions that the trial solution used is the simplest of the forms explained in pages unavailable in Google Books.
Comment: First of all, it seems to me that we could have chosen a_0 to be practically anything that has a factor of f_0(a+s), the least of which is multiplying it by a constant a, as you mentioned. To satisfy (2), all a_k k<s being zero is enough.                   What's bothering me is that there are three arbitrary constants in the solution to the second order linear differential equation: one in front of the solution obtained with  a=\sigma, and two in the other solution, a_s  and a.
Comment: Indeed you can choose $a_0$ to be anything provided there's a factor of $f_0(a+s)$: it's just an overall scaling on the solution. If you do the calculation, you find that because the equations are linear, adding a constant to $a_s$ will just give you a multiple of the other solution: as I say in the answer, the degeneracy that arises from being able to choose $a_s$ arbitrarily is the same as the freedom to add on a multiple of the $y_{\sigma}$ solution, so the constant in front of $y_{\sigma}$ is not independent of the constant $a_s$.
Comment: I understand how adding a constant to $a_s$ adds a multiple of $y_\delta$ to the series obtained with $y_{\sigma-s}$, but the second solution is the derivative of that series. After the differentiation, the $y_\delta$ only appears in front of the $\log x$. Do the coefficients $a_k'|_{\alpha=\sigma-s}$ form the same series? I couldn't see how.


How can I convey a sense of unease?

Question: My character is on a train that's about to be hijacked. She notices strange things with the train like thudding on the roof but no one else seems to care. How can I convey that uneasy feeling you get when you feel like something bad is going to happen?
Comment: Does this answer your question? [How do I write a room full of panic?](https://writing.stackexchange.com/questions/65991/how-do-i-write-a-room-full-of-panic)
Comment: Game of Thrones, Seasons 6, episode 10, when people in the temple realize that Cersei isn't going to show up for her trial, and so something is about to happen. Watch the actress who plays Margaery. Brilliant.
Comment: @Alexandrang I don't think this is a duplicate. Unease and panic are two different emotional states which require different writing techniques to convey.
Comment: @Philipp I was going to refer to my answer (the one that was selected as the correct answer for that question) and my solution was basically the same here.  People mostly do not panic before the really bad thing happens (in this case a derail) but will be uneasy if they are familiar enough with the route and the train operation to know something is off.  Many documentaries about disasters of this type often have survivors discussing their instinctual awareness of something not behaving right.
Comment: I'd do some homework... there has never been a documented case of a train hijacking or robbery where the people disrupting the train boarded while the train is in motion.  Typically, during the Wild West days when Train Robberies were in a Golden Age, the would-be robbers boarded the train at the station and pulled the heist at a pre-arranged location out in the wilderness.  Almost certainly, they would work to stop the train before they got to far from the location where they stashed their horses to make a get away.
Answer: I think you are already off to a good start. The viewpoint character notices something and no one else seems to react to the strangeness.
How that character reacts depends on their personality. If the character is very self-assured, they might rely solely on their senses to decide what to do -- wait and see if the sound repeats then warn everyone or move to protect themselves.  You know take some sort of confident and alert action.
Other personality types might look to the other passengers -- as you are kind of describing. That leads to a conflict within the character -- are they imagining things? Are other people hearing the same things the character is? Self-doubt has a unique feeling that could be exploited here.
Another way to go might be with the character's conflict be rooted in the perceived risk of embarrassment -- crying wolf and being wrong.
They might also feel some measure of fear or anxiety -- with goose bumps or the hairs on their necks standing up.
How you describe the character's reactions is dependent on the character traits.  Identify how your character is, then you'll find it easier to work out how they react in the stressful situations you are putting them in to.
Answer: One way to generate unease is by asking a lot of questions in internal monologue and then leaving them unanswered.
Why does that work? How does the human psyche react to questions? Is it the tension of expecting an answer and then not receiving one? Would it help to pile more and more questions on top without ever giving the relieve of an answer? Does the reader perhaps imagine how a question is phrased in natural language, causing them to imagine how the voice raises at the end generating tension? Or is it how phrasing unanswered questions highlight all the crucial information the protagonist is lacking? Do we know that? Can we know that?
Don't you just hate the stress generated by missing crucial information? Maybe the last question didn't work in this context? Perhaps because it was clearly rhetorical and not pointing out information you are actually lacking?
Can the tension be increased even more if the viewpoint character themselves starts to question what they believe to hear and see? Am I just imagining that this technique works? Am I turning insane? Am I perhaps already insane?
We will probably never know. Until it is too late.
Answer: There's already some good answers that talk about how to use internal thoughts to build tension.
Also, think about the words you use in description and the background to subtly give the reader cues. (think the famous 'storm scene' in Julius Caesar)
E.g. compare these: (written quickly, so please don't judge the quality of the prose itself!)

"Rain lashed against the window as the train lurched through the
darkening moor."

"The sun shone brightly over the rolling, green hills as the train
cruised past the white dots of sheep."

They're both descriptions of travelling through the countryside on a train, but you'd associate them with very different genres or types of story. Even the sounds of words can create a certain atmosphere - e.g. the way harsh or discordant tones create anxiety in the same way as horror music. Or vice-versa.
Or, you could turn it on it's head, and describe a very tranquil setting but with subtle hints that all is not well. A sunny day, with a dark cloud on the horizon. Or a bright afternoon, but with unusually gusty wind.
Answer: Show physical symptoms of uneasiness. Here are some quick examples I came up with:
"A bead of sweat dropped onto their shirt", "Fidgeting with a bracelet", "Nervously shifting their eyes around the small room", "Heart rate increasing", "Felt a knot in their stomach".
You could also tell the reader that the character "has a bad feeling", but that doesn't add much to a story.
Answer: I would personally create the unease on the environment. Describe the environment the best you can but do it in a creepy way. Also, if you are involving people around the protagonist who are sketchy, make sure they look and sound that way. If that still does not create unease, put thoughts to the character too, convey what the character is feeling by internal monologue.

How can I convey a sense of unease?


Auto compile alias in .bashrc

Question: How do I create an alias in my .bashrc file so that I can compile my C++ program without inputting this much longer command:
g++ -o filename filename.cpp

Here the file name is variable.
Comment: Read `man make`, and use a `Makefile`
Comment: .. for a simple case such as this, a Makefile should not even be necessary: `make filename` should compile `filename.cpp` using make's implicit suffix rules (assuming there's no higher-priority  file such as `filename.c` in the same directory)
Comment: how can is use make with many switches like these . Often i also have a question like in many editor/ide we just use we just use general command like
g++ -o $%file%f$ $%file%$.cpp . Here i think $%file%$ take file name automatically . But it does'nt work on terminal normally . Why is it so and How can we take the file name automatically
Comment: @EliahKagan why don't you go ahead and write an answer? it seems it will clear up some misconceptions that the OP has concerning source and target names
Answer:
TL;DR: Use make filename instead. Consider setting and exporting CXXFLAGS for warnings.

If you're really only interested in running g++ -o filename filename.cpp (with no options to enable compiler warnings or otherwise customize the behavior of the compiler) you can read just the first section, immediately below. For coverage of alternate approaches that do use shell aliases and shell functions, see the very last section.
This answer focuses on C++ but much of it applies to C. The major difference is that flags make passes to compile a C source code file are taken from CFLAGS rather than CXXFLAGS.

You can just pass the basename to make.
As steeldriver says, a better solution than a shell function or shell alias is to take advantage of make's implicit rules. Running your command g++ -o filename filename.cpp has the same effect as
make filename

...unless filename exists and is no older than filename.cpp, in which case make refrains from compiling it again and instead reports make: 'filename' is up to date, which is what you likely want in that situation. When you change your source code file, it becomes newer than the last-compiled executable (if any), so a subsequent invocation of make filename recompiles it.
As steeldriver mentioned, you should only have one source code file with filename as its basename to use this method. If you have source code files for multiple languages, like filename.c, filename.cpp, and filename.m, then make will pick one according to its rules, and it won't necessarily be the one you intend.
Running make without a makefile also only works if your program only requires one source code file. But that seems to be the case here, and is also most often the case when one starts out learning to program in C or C++.
The command make actually runs to compile a C++ source code file is not actually g++, but is instead c++. However, c++ on Ubuntu (and most GNU/Linux systems) is typically a symbolic link that resolves to the g++ command, unless you've deliberately changed it or only installed some other C++ compiler.
You should enable warnings, and usually pick a dialect.
With very few exceptions, such as checking that your compiler works at all, you should enable compiler warnings. This tells your compiler to warn you about code that is likely to contain mistakes. By default, most C and C++ compilers, including the popular compilers GCC and Clang (the g++ and clang++ commands) warn about very few things. I'll describe how to run g++ with warnings enabled, then I'll show how to make make enable warnings when you run make filename.
At minimum, use -Wall, which for historical reasons and contrary to its name doesn't actually enable all warnings. You should also nearly always use -Wextra. You can enable additional warnings individually (run man g++ to see all of them, if you like), but this is a good start and often a reasonable choice even for a large software project.
I don't know how much C++ experience you currently have. Experienced programmers typically use and benefit greatly from warnings, but if you're new to the language, you still shouldn't wait to start using them. This is because they can save you a lot of headache in finding otherwise vexing bugs in your programs, and because they can help you avoid making common mistakes and developing bad habits.
The command g++ -o filename filename.cpp doesn't ask for any but the small number of default warnings. The corresponding command g++ -Wall -Wextra -o filename filename.cpp enables -Wall and -Wextra. You can put -Wall and -Wextra anywhere in the command except between -o and filename or before g++.
If you want to try out -Wall and -Wextra one time, you can run make like this:
make CXXFLAGS='-Wall -Wextra' filename

Note that this still won't recompile filename.cpp if the source code is no newer than the executable, even if you didn't pass CXXFLAGS='-Wall -Wextra' to make last time you ran it.
As you can see, that's fairly cumbersome; your whole goal is to compile your small programs with a minimum of typing. Fortunately, in addition to accepting assignments to its CXXFLAGS variable on the command-line, make also respects the CXXFLAGS environment variable if there is one. So you can run
export CXXFLAGS='-Wall -Wextra'

and then subsequent runs of make filename will pass the -Wall and -Wextra flags to the C++ compiler automatically. However, this is not permanent; in other shells (that are not started from this one) it does not apply.
I'll get to how you can avoid having to type that soon. But first...
You should pick a dialect, and consider -pedantic for more warnings.
You should also tell g++ what dialect of C++ you are using. For example, if you are using C++17 without GNU extensions, pass the -std=c++17 option. As of this writing, C++17 is the current standard dialect of C++. If you're learning C++ and you're not sure what dialect you want, you could consult whatever materials you're learning from or consult your instructor (if any). If none of that applies, I suggest using the current standard, assuming your compiler supports it. Telling the compiler -std=c++17 does not force you to use all the newest features of C++ in your programs. If you want C++17 with GNU extensions, you'd use -std=gnu++17; if you don't know or care about the difference, then -std=c++17 is reasonable.
If you don't tell g++ what dialect you want, it will use its default, which varies across different versions of GCC. Specifying the dialect you want helps the compiler issue errors and warnings when your code is incorrect (or suspicious) when considered to be written in that particular dialect. It also helps the compiler not issue errors and warnings that might not be appropriate for the dialect you are using, because without it, the compiler assumes you're using whatever its default is.
If you tell g++ what dialect you want, and it is one of the standard dialects (e.g., if you use -std=c++17, not -std=gnu++17), then you can enable more warnings than would otherwise be shown, about code that does not conform to that dialect, by passing g++ the -pedantic flag. Some of those warnings actually apply to all or most standard dialects. If you want such code to cause errors to be issued--causing the compiler to deliberately fail and refuse to generate an executable even if it otherwise could--then you can use -pedantic-errors.
You can pass those flags even if you don't specific a dialect or if the dialect you specify isn't one the ones that is standardized, but you probably wouldn't want to, because it would be hard to judge if they are reasonable, and you'd likely end up ignoring a lot of them. You can also turn all warnings into errors with -Werror, which is a somewhat popular practice, because it makes it impossible to ignore warnings. However, if you're just starting out, I suggest against doing this, even though warnings should not be ignored except in extremely unusual cases. It is sometimes handy to get code to compile with warnings, try it out, and then fix the problems that caused the warnings.
To include -std=c++17 and -pedantic in your CXXFLAGS:
export CXXFLAGS='-std=c++17 -pedantic -Wall -Wextra'

If you've already exported CXXFLAGS in your shell, you can omit export on subsequent assignments. But there is no harm in keeping it.
You can put your export command in a file, then source it with ..
You can set CXXFLAGS the way you would set most environment variables, like PATH, for example by putting the export command for it in ~/.profile. But I recommend against this, because you may build software with make that was written by other authors, for which your usually preferred CXXFLAGS aren't a good choice.
Instead, I suggest making a file that contains an export CXXFLAGS='...' command (with your actual flags in place of ...) such as the one shown above. Then, when you want to run that command, you can avoid having to type it by sourcing that file with the . builtin. If the file is called cxxflags and is in your home directory:
. ~/cxxflags

Like if you ran the export command manually, you only have to this once in your shell. All your subsequent make commands will use the new value of CXXFLAGS, until you exit out of the current shell. make command run in separate shell sessions, however, such as those in other terminals, will not be affected.
Note that this is not a situation where you should run chmod +x on the file and run it by just writing ~/cxxflags. This wouldn't do what you want, because it would assign and export the CXXFLAGS environment variable in the shell started to run the script, which would immediately exit afterwards, and the current shell's environment would be unaffected.
If you prefer, you could instead write an alias or shell function that sets and exports CXXFLAGS.

For the future...
It is somewhat unfortunate how complicated it is to efficiently compile C++ programs from the command line, know what dialect you are using, and get reasonably helpful warnings. (IDEs have corresponding, even overlapping problems... but that doesn't make the command-line situation easy for users who aren't yet comfortable with it.) Believe it or not, the flags I've suggested here are just the ones I recommend new C++ programmers use from day one.
If you already have some C++ experience (even a little), you may want to do more. Feel free to ignore the rest of this section!
-g emits debug symbols; then you can use a debugger like gdb to debug your program. If you previously used an IDE, it may already have compiled your programs in this way and integrated with a debugger. (You can integrate an IDE with a debugger in Ubuntu and there are several choices, but that is beyond the scope of this post.)
Flags that start -O call for optimizations; the most common are -Og, for optimizations that don't usually get in the way of debugging; -O1, for highly conservative optimizations; -O2, for most speed optimizations; -O3 to try to squeeze out even more speed, which sometimes helps and sometimes doesn't; and -Os, to optimize for space rather than speed. Debug builds of C and C++ programs usually use either no optimizations or -Og, while release builds usually use -O2, -O3, or -Os.
Debug builds often benefit from sanitizers that catch and explain problems that would otherwise cause a confusing crash or subtle wrong behavior. -fsanitize=address,undefined is often helpful. Although this is exactly the sort of thing I'd like to recommend to people who are new to C or C++ (or who are coming from platforms that sanitizers don't yet support), I've avoided suggesting it above because it sometimes introduces additional complexity. On some systems, additional packages must be installed to support them; the default behavior of Address Sanitizer is to print messages about memory leaks when a program quits even if the leaks were acceptable because the program deliberately bailed out during an error; when you do get into compiling programs with multiple source code files, if you compile them separately (as a makefile would do) you must pass -fsanitize=... at link-time as well as compile-time; they are incompatible with some libraries you might link to and use from your code; and they are incompatible, or require additional effort to be used, with some other tools, including some debuggers.
For way, way more tooling suggestions, see this chapter of cppbestpractices.
Aliases and Shell Functions
You asked about an alias. You can create a shell alias, if you really want to. But it may not do what you want. Aliases in bash don't accept arguments; they simply expand into their definitions. You can write arguments after them in a command, but they appear at the end where you wrote them. You cannot substitute anything into an alias definition, so you cannot cause an argument filename to appear inside it in place of some other text. This is why waltinator demonstrated a shell function instead. Shell functions are much more powerful and versatile than shell aliases.
With that said, you might like to have an alias like this:
alias mk='make CXXFLAGS="-std=c++17 -pedantic -Wall -Wextra"'

This is an alternative to exporting CXXFLAGS as described above. Once that alias definition has been run, you can run mk filename to build filename.cpp with those compiler flags. If you prefer this approach, I suggest putting the alias definition in .bash_aliases in your home directory (create the file if it doesn't). The default per-user .bashrc file sources .bash_aliases if it exists, so in new interactive bash shells, the alias will be defined.
Or perhaps you want to define CXXFLAGS but use a shell function as in waltinator's way to perform the compilation with those flags:
compile() { g++ $CXXFLAGS -o "$1" "$1.cpp"; }

If there is no CXXFLAGS variable, this still works, but passes no extra flags. If there is such a variable defined in the current shell, it uses it--even if the variable is not exported. Note that this is one of the uncommon situations where it is correct to omit the double quotes around parameter expansion, i.e., don't write "$CXXFLAGS". However, the expansions of $1 should still be quoted.
Or you can include the flags you want in the function definition itself:
compile() { g++ -std=c++17 -pedantic -Wall -Wextra -o "$1" "$1.cpp"; }

The simplest case is that of no extra flags, in which case you get just another way to write the function shown in waltinator's answer.
compile() { g++ -o "$1" "$1.cpp"; }

Answer: Define a function in ~/.bashrc:
# Usage: docompile filename
function docompile ()
    {
    local objname="${1}"
    local srcname="${1}.cpp"
    g++ -o "$objname" "$srcname"
    }

Comment: bash: .bashrc: line 126: unexpected EOF while looking for matching `"'
bash: .bashrc: line 128: syntax error: unexpected end of file
Comment: Sorry, typo. Fixed
Comment: g++: error: .cpp: No such file or directory
g++: fatal error: output filename may not be empty
compilation terminated.
Comment: I have a file with name c.cpp and couple of text file in my directory containig testcases
Comment: I also tried to use $%file%$.cpp . Still not working
Comment: @Aki An "output filename may not be empty" message suggests you're attempting to call the function by running `docompile` with no arguments. As currently written, the function must be called with an argument identifying what you want to compile: `docompile filename`
Comment: Ohh , got it .  Is it also possible to not supply even file name too like we have in editor/ide .
Comment: @Aki If you prefer you can simply right click on the file name in `nautilus` (GUI file manager) to compile it with a custom script. Also I think you can do the same within `gedit` (GUI editor) but I haven't explored that yet. You could also write a Zenity (GUI dialog box) or Whiptail (CLI dialog box) which scrolls through files in directory and lets you select one to compile. As it stands this answer is correct for your stated question though.
Answer: linux:
function docompile ()
{
objname="${srcname%.}"
srcname="$1"
g++ -o "$objname" "$1"
}
windows:
function docompile ()
{
objname="${srcname%.}".exe
srcname="$1"
g++ -o "$objname" "$1"
}
Comment: linux:
function docompile ()
    {
    objname="${srcname%.*}"
    srcname="$1"
    g++ -o "$objname" "$1" && ./$objname
    }
windows:
function docompile ()
    {
    objname="${srcname%.*}".exe
    srcname="$1"
    g++ -o "$objname" "$1"
    }
Answer: linux:
function docompile ()
{
objname="${srcname%.}"
srcname="$1"
g++ -o "$objname" "$1" && ./$objname
}
shell:docompile youcpp(hello.cpp)
shell:docompile  hello.cpp
windows:
function docompile ()
{
objname="${srcname%.}".exe
srcname="$1"
g++ -o "$objname" "$1"
}

Auto compile alias in .bashrc


Command line recursive/deep directory copy in Linux?

Question: What is a good, general way to make a recursive/deep directory copy in Linux that works in most cases? I've used simple things like cp -R as well as fairly elaborate cpio incantations. Are there any significant strengths or weaknesses that cause you to prefer one over the other? Which one do you use most often?
Answer: NAME
cp - copy files and directories

-a, --archive
   same as -dpR

-d     same as --no-dereference --preserve=links
-p     same as --preserve=mode,ownership,timestamps
-R, -r, --recursive
    copy directories recursively

So in answer to your question:
cp -a /foo /bar

Copy everything recursively from directory /foo to directory /bar while preserving symbolic links and file/directory 'mode' 'ownership' & 'timestamps'.
Comment: Unless there's a physical error I've never had a local 'cp' fail from memory (I've only done TB sized transfers) to any place mounted localy (regardless of NFS or Samba mounting). Checkout 'USAGE' under the rsync man page for examples you'll find instructive. Favourite of mine: $ rsync --partial --progress --rsh=ssh --archive --verbose --compress foo/ user@hosname:~/bar (rsync -avzP)
Comment: This is certainly a very straight-forward and elegant solution. Have you ever found any drawbacks to this approach? Distributed file systems? Extremely large copies? Have you found other solutions like cpio, tar, or rsync to be more efficient in some cases?
Comment: As I noted above, -a is not strictly portable.
Comment: Well I know that busybox, GNU & BSD cp are ok. Other than legacy Unix boxes I've never seen what won't that work on? I don't really see the point otherwise although I completely understand Zoredache's sentiment of "It always seems to get the job done correctly, so I have never really looked to hard to find a replacement."
Comment: @gyaresu Please consider splitting your second comment out into another answer so that we can vote on it.
Answer: I use a command like "cd $srcdir ; tar -c . | tar -C $destdir -x " most often.  But I also use rsync -a $src $dst.
The biggest strength of the tar solution is that it is what I had to use on a system many years ago that didn't have cpio, rsync or a cp that would copy recursively.  Tar is pretty much everywhere.  It is stuck on my head because I used it a lot, there probably are more elegant ways.  It always seems to get the job done correctly, so I have never really looked to hard to find a replacement.
Comment: This was back in ~95 and the system was running a late 80's version of Unix. I don't think -R was an option for cp, but I am not certain. I learned that tidbit reading the usenet.
Comment: I like "the ubiquity of tar" argument a lot. I am proficient in vi for similar reasons even though I prefer other editing environments.
Comment: -R has long since been part of the standard (http://www.opengroup.org/onlinepubs/009695399/utilities/cp.html) though not -a.
Comment: @Matthew Flaschen: Is your comment intended for @gyaresu's answer?
Comment: It's also relevant to this one, as Zoredache said he encountered a system that "didn't have [...] a cp that would copy recursively".  Basically, -R -> portable, -a -> not portable.
Answer: Take a look a rsync ... I like it because you copy less data when keeping two directories up to date ... it can also work remotly.  In its simplest form rsync -a /src /dest
Comment: This is a really good point. Essentially rsync has the ability to compute a "directory diff" and transfer only what is needed to synchronize the directories. So you can repeatedly call something like rsync -a src/ dest to "continually copy" directories recursively (the trailing / on src is needed for proper synchronization) whereas cp -a src/ dest doesn't work like that. The cp command will make a new src directory in dest after the first cp. You'd need something like cp -au src/* dest for subsequent copies.
Comment: The other reason I like rsync is you can pass it the -P flag, which shows a progress bar. It gives you some idea of how long something will take
Answer: rsync is a great tool. It is the swiss army knife of transfering data. It's such a simple and powerful tool. Once you start using it, you get hooked.


List form customized in powerapps is not being displayed correctly on the SharePoint list

Question: I have customized a list form in PowerApps and published it to SharePoint. Although the form is being published, only half of it is visible when I click on the "New Item" tab in the list. Is there any way the full form can be published? What changes do I have to make in PowerApps?
Comment: Any screenshots to give a better idea of how it looks like? Because I'm not really sure to understand your problem
Comment: I've added an image, please take a look at it.
Comment: At first sight I would say you gave the form a wider format than it should be. Maybe you have to go back over your steps. And yeah, try give more info because right now we're just guessing
Answer: Please publish the form again to check the result:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/customize-list-form#save-and-publish-the-form
If the issue still exists, please provide more information about how did you customize the form.


Western film with anachronistic weapons in a secret cave

Question: This is a war movie about a group of men being chasing by an Apache group that is using spears and arrows with horses. They end up running to the secret cave... then they decide to go in the cave and found a modern weapon which is like an M-16 grenade, etc that shouldn't exist in that era. They start to learn to use the modern weapon that is found in this mysterious secret cave to fight back.
Comment: Do you know whether this was actually set in a time period of spears and arrows (I labeled it as "western" based on your description) or if this turns out to be some sort of far future or post-apocalypse?
Comment: Sounds a bit like [Cowboys vs Aliens](https://en.wikipedia.org/wiki/Cowboys_%26_Aliens#Plot) (but not quite)...
Comment: Do you know with any degree of certainty if the weapons used were actually M16s with grenade launchers? That would help narrow it down. Also, what is a "Lyn apache"?
Comment: @SpaceWolf1701 whoops the "Lyn apache" was my phone being seriously weird when I edited.
Comment: the story is about a group of man being chased by cruel bad guys ...i think its 90 s or 20s movie because they using horses ...and the weapon they found in the unknown secret place is a modern weapon like ak..m16 hand grenade ...i still remember one of them trying to learning how to use a hand grenade by reading a guide book....i think its not an apache gang i just dont remember what the movies namee but the storyline just like that...i think im seeing this movie at years between 2010-2015 so its not kinda old tho
Comment: You could improve this question by going through the checklists [here](https://scifi.meta.stackexchange.com/questions/9335/how-to-ask-a-good-story-id-question) and editing in any relevant info you can think to add.
Comment: yes its a spear and arrow but it has cross over with the modern weapon
Answer: The mix of Cowboys and high technology in the 1970's TV show Cliffhangers?   Being chased, stumbling into a cave, and finding weapons.
The Secret Empire – Set in the 1880 and inspired by the 1935 Gene Autry film serial The Phantom Empire, Geoffrey Rush would star as U.S. Marshal Jim Donner who, while investigating a mysterious band of phantom riders, stumbles upon an alien city deep beneath the Earth. Scenes in the subterranean city would be broadcast in color while the above ground scenes featured a sepia tone.
https://www.tvobscurities.com/articles/cliffhangers/
Comment: it has colour on that movies its not old as 70s maybe its in 2000-2010 movies funny fact ive been searching this movie for years ...im seeing this movie like 2 times only before but what i know is the story is about a group of survivor that being chase by bad guys that using horses,spear,and arrow...to chase them down ...and they end up in a secret place that has a modern weapon that shouldnt exist in that era because what the enemy using is spear and arrow...they started to learn how to use the advance weapon to fight their enemy back in other to achieve victory and survive


How to open jammed shut off valve

Question: I want to open a valve and tape it properly to prevent further leakage. But the valve is jammed and as I put more force to open the hexagonal nut (shown with red arrow) it is going to be deformed into a circular shape...
Any ideas on how to open this?
Comment: Use a 6-point socket if it'll fit.  When turning stubborn hexes, you want *exactly* the right tool.    Also, usual stubborn-bolt protocol: apply liberal amounts of Kroil or Liquid Wrench, heat if feasible, etc.   honestly in this situation I turn off main house water and replace the entire valve.  Shut-off valves do fail.
Comment: Are you using a crescent wrench or vice grips or something on that? Do you have a box end wrench of the right size? You might also try a pipe wrench.
Answer: That hex nut is the packing nut, which you may need to loosen in order to actually turn the valve off with the gear-looking part of it (the valve stem), and then tighten the hex nut back down or it'll leak from there now too.
Seeing as you don't have a handle anymore anyway, and that it's being difficult, replacement of the entire valve (with a quarter turn valve) should be considered.
If you can't get the valve stem to turn, and you can't get the packing nut to loosen enough to do so with an adjustable wrench, then it's about time for a new valve, so go ahead and try it. Use a quick, snapping motion to break it lose. Do it too slow, even with a well fitted wrench, and it might deform anyway.
Turning off your main valve comes with its own set of problems, so I'll leave that choice up to you, but before you begin, you should at least know where it is.
If you're really trying to not have to replace the valve, this is the procedure you'll have to use to open or close it in the future:

Loosen packing nut.
Turn valve.
Re-tighten packing nut.

Use a quick, almost snapping motion to break it lose with an adjustable wrench. Use a pipe wrench with a rag wrapped over the valve body to 'back it up' or you risk unthreading the entire valve from the wall. Put the pipe wrench where the tee is, to stabilize the valve, and apply torque in the opposite direction of your other wrench.
Sometimes you have to tighten threaded connections a little bit, that you're trying to take lose.

How to open jammed shut off valve


Anyone get the Zoom H6 yet?

Question: It's not shipping yet, but i didn't know if anyone got to check out a pre-release or press release that was about to say anything about.
Answer: I did a small comparison between the H4n and the H6. The H6 seems to be a good value, but is definetly too big for me to carry around every day...
check the full comparison and audio previews here...
http://bit.ly/16mqT4R

Anyone get the Zoom H6 yet?


How do I get pyspark on Ubuntu?

Question: I can get Spark on it through the Software Center, but how do I get pyspark?
Comment: I found these instructions make it much easier. https://www.youtube.com/watch?v=uhVYTNEe_-A https://github.com/mGalarnyk/Installations_Mac_Ubuntu_Windows/blob/master/Spark/Install_Apache_Spark_PySpark_Linux.ipynb
Answer: pyspark is available via pypi.
So all you need to install pyspark is pip and execute the following command.
pip install pyspark or sudo pip install pyspark
Comment: Awsome Works Like A Charm
Answer: pyspark is a python binding to the spark program written in Scala.
As long as you have Java 6+ and Python 2.6+ you can download pre-built binaries for spark from the download page. Make sure that the java and python programs are on your PATH or that the JAVA_HOME environment variable is set. Follow these steps to get started;

Unzip and move the unzipped directory to a working directory:

tar -xzf spark-1.4.0-bin-hadoop2.6.tgz
mv spark-1.4.0-bin-hadoop2.6 /srv/spark-1.4.8

Symlink the version of Spark to a spark directory:

ln -s /srv/spark-1.4.8 /srv/spark

Edit ~/.bash_profile using your favorite text editor and add Spark to your PATH and set the SPARK_HOME environment variable:

export SPARK_HOME=/srv/spark
export PATH=$SPARK_HOME/bin:$PATH

Now you should be able to execute pyspark by running the command pyspark in the terminal.
Some references:
https://spark.apache.org/docs/0.9.0/python-programming-guide.html
https://districtdatalabs.silvrback.com/getting-started-with-spark-in-python
Comment: You also need git installed. Found out the hard way when installing on a clean virtual image...

How do I get pyspark on Ubuntu?


Outgoing Email Settings Not Updating

Question: I've been trying to update the From Address and Reply-to Address with a new email address. The update appears to work, however, when an alert is sent, SharePoint is still using the original email address. I've tried several different addresses and the original email address is always used. Has anybody experienced this before?
Answer: You have outgoing email settings at both the Farm level and the Web Application Level.
Normally what you set at the Farm level takes effect everywhere, however you can also make settings specifically at the web app level and these will take precedence.
I suspect that you're modifying the settings at the Farm level, but the alerts will pick up the old (unmodified) settings at the Web Application level.

Farm - Central Admin > System Settings > Configure outgoing e-mail settings
Web Application - Central Admin > Application Management > Manage web applications > [choose web app] > General Settings (toolbar) > Outgoing Email Settings.

Outgoing Email Settings Not Updating


Apache not showing in /etc/services

Question: I've installed apache2 on a server running Ubuntu 20.04.1 LTS and it's current status is running. Shouldn't I be able to see that service also in the /etc/services file?
Answer: The service should be under :
/lib/systemd/system/apache2.service

Writing_unit_files

/usr/lib/systemd/system/: units provided by installed packages

/etc/systemd/system/: units installed by the system administrator

systemd.unit manpages
Comment: Perhaps they're looking for the "http" entry for port 80/tcp in /etc/services?
Comment: So not all services are listed in `/etc/services`?
Answer: /etc/services is not a list of services currently running on your computer. It is not even a list of possible services on your or on any particular computer: not all services are listed in /etc/services, and implementations of some of the services listed in it might not even exist in your Linux distribution.
Instead, it is a mapping between port numbers and human-readable port names, for library routines like getservent(3), getservbyport(3) and getservbyport(3). Basically, it's a copy of (some version of) IANA's master list of service names and port numbers, with possibly some distribution-specific additions, using a specific format that's directly usable by those library routines.
For example, if you run netstat -a -A inet, you may see some ports (typically the more well-known ones) identified by name, and the rest by number. If you add the -n option, the port-number-to-name mapping will be omitted and you will see all the port numbers as just numbers.
One of the very few places where it is/was the norm to use port names exclusively is the /etc/inetd.conf file for the classic inetd daemon. In modern software, you are either expected to just use port numbers, or can opt to use either names or numbers as you wish.

Apache not showing in /etc/services


Why does my central heating system comes on on its own accord?

Question: Can anyone tell me why my central heating comes on by itself: the radiators get hot and stay hot for around 1-3 minutes then the system turns back off again. This can happen any time throughout the day and night, and you can hear the system kicking in.
Comment: Have you checked the thermostat and verified the heat is turned off?
Comment: Yes the heat is turned off from the thermostat all the time,but if we need heat we just turn the thermostat up ourselves, we never use the timer
Answer: If your system also heats your domestic hot water, it may be coming on to maintain the hot water temperature.   Depending on the setup, you may be getting some hot water circulation through the radiators when this happens.    Is the radiator system steam, or hot water?   If it's hot water, can you tell of one or more of the circulators come on when the boiler runs?
Answer: You might want to check the manual for your boiler: some models of boiler will automatically activate for a short period of time once per 24 hours in order to avoid issues like a pump sticking due to lack of use. If you have such a boiler, then what you're seeing is intended behaviour, and will be described in the manual.
This could also be caused by frost protection: many boilers/thermostats will attempt to warm up the system if it's at risk of freezing (as frozen pipes often cause leaks), even if it's switched off at the timer or thermostat. If the temperature is below 10°C, then this seems like a very likely cause of the issue.
Also, note that the minimum of most thermostats is normally some specific temperature (e.g. 9°C), rather than "off" (the "completely off" setting is normally set on the timer, not the thermostat). If the interior temperature falls below that value, then the thermostat will be "on" at any setting, because no matter what temperature you set the thermostat to, the interior temperature will be lower than the thermostat setting – and that's the rule the thermostat uses to decide whether to turn on or not.
Answer: Most heating systems are setup to automatically turn on and off based upon the setting of a thermostat. When heat is required (i.e. thermostat reading lower than setting) then the heat system will come on till the thermostat reads a new temperature higher than the setting.
If your system is operating outside this automated procedure then it is possible that the any one of the following has failed in some way:

Thermostat not reading correctly
Wiring from thermostat to heat system is damaged
Relay and control board on heat system has failed or gone intermittent.

You may need the aid of a qualified heating specialist to troubleshoot problems like this.
Answer: If you have a programmable thermostat check every program every day. It is possible a group program was set. I would suspect a thermostat issue 1st. Including a deflective one. If the weather has been below freezing it is possible there is a sensor over ride on a pipe that is suppose to engage only when freezing is imminent.


Investment variable in GDP - Data Selection - World Bank, IMF

Question: I want to test the correlation of a variable with investment in the national income formula C+I+G+NX. Using IMF data, there are a lot of different investment variables in different formats. What would be the most appropriate variable or variable combination for this? I've also found World Bank Data in %GDP which appears to also be from the IMF. The description from World Bank is
"Expressed as a ratio of total investment in current local currency and GDP in current local currency. Investment or gross capital formation is measured by the total value of the gross fixed capital formation and changes in inventories and acquisitions less disposals of valuables for a unit or sector." If this data is viable, then for discussion, does this mean, for example, "New trucks minus sold trucks, domestically"? Or does this include international capital, e.g., my trucks purchased and driven abroad but for income sent home?
Answer: You can find data on GDP and its components from IMF at this link.
IMF separates investment into Gross Fixed Capital Formation and Change in Inventories. If you sum these two variables together you will get the $I$ portion of GDP.
Comment: Okay, this appears to be what was done for the World Bank data.
Comment: @kleinerde nowadays it's getting common to separate them because investment in capital goods is often what people are interested as opposed to investment in building up inventory


Finding features of parabolic formula

Question: I have a question that requires me to find the intercepts and the turning point of a parabola from it's formula, but I'm not really sure how to find all this information out from the equation below. I tried using completing the square but I ended up with a weird answer that I don't believe is right. The equation is:
$$y=-3x^2-5x+2$$
Thanks!!
Answer: The intercepts with the $X$-axis are the points of the form $(x,0)$. Take $y=0$ in the equation and solve it. You should obtain two points.
The intercepts with the $Y$-axis are the points of the form $(0,y)$. Take $x=0$ in the equation and solve it. You should obtain one point.
The turning point is the one where the first derivative becomes $0$. Thus, compute $y'$ in terms of $x$ and then look for the value of $x$ that makes the equation $0$.
Another form is to complete the square. You should obtain something of the form $y=a(x-b)^2+c$; then, the turning point is at $(b,y(b))$.
Answer: AugSB gave a perfect answer (+1!) but the shortcut all my students want to know is this:
The $x$-coordinate of the turning point (often called the vertex) is $x=-\frac{b}{2a}$. Plug this value into the equation to find the $y$-coordinate.
Answer: There are two intercepts. The $y$-intercept, and the $x$-intercepts.
$y$-intercept:
To find the $y$-intercept, you simply plug in $x=0$ into the equation to get the $y$ value. So thus, we have$$y=-3\cdot 0^2-5\cdot 0+2=2$$ so the $y$-intercept is $(0,2)$.
$x$-intercepts:
The $x$ intercepts are points that give $y=0$ when you plug in $y$. So plugging in $y=0$, we get $$-3x^2-5x+2=0\Leftrightarrow -(3x-1)(x+2)=0\implies x=\frac 13,x=-2$$
Therefore, the $x$-intercepts are $\left(\frac 13,0\right)$ and $(-2,0)$.

To find the Vertex, you can substitute $x$ with $\frac {-b}{2a}$ where given the quadratic of the form $ax^2+bx+c=0$.
In your example, the quadratic is $y=-3x^2-5x+2$ so we see that $a=-3,b=-5,c=2$. So we have $$-\frac b{2a}=-\frac 56\tag1$$
Substituting $x$ with $(1)$ gives the $y$ value:$$f\left(\frac 56\right)=-3\left(-\frac 56\right)^2+5\left(\frac 56\right)+2=\frac {49}{12}$$
And so the vertex lies on the point $\left(-\frac 56,\frac {49}{12}\right)$.
Answer: For parabola given by
$$ a x^2 + b xc + c= 0 $$
$y$ intercept is $ y = c $ at $ x = 0 $
x-intercepts are when $ y=0 $
$$ \frac{-b \pm \sqrt{ b^2-4 a c }}{2 a } $$
Vertex is average or middle point of the two above.
$$ x= \frac{-b }{2 a } $$
This is also got differentiating and setting the obtained relation $ 2 ax+ b $ to zero.
Better to commit them to memory
Also better to remember max/min point of vertex
$$ y= c- \frac{b^2}{4 a } $$.
EDIT:
When the above vanishes we have the two roots equal, or repeated roots. $ y = a x^2 + b x  + c $ is a perfect square. The parabola curve graph is tangent to $x$ axis at $ x= - b/(2a)$.

Finding features of parabolic formula


Bus 42 in Paris

Question: I reserved in Grand Hotel Leveque and I want to take the bus 42 to have a tour in Paris. from which station should I start if I want to see all the city as much as possible and how can I reach this station?
Comment: Is there a specific reason you want to take bus 42? It does go through a few interesting places, but by far not that many, and it's not coming particularly close to your hotel either. How much time do you have? You'd probably be better off with one of the hop-on hop-off tourist bus tours. Are there specific attractions you would be interested in seeing/visiting?
Comment: Also note that the Paris bus network has seen extensive changes a few months ago, so the route of bus 42 has changed like many others.
Answer: There's a stop on Avenue Joseph Bouvard just west of Avenue de la Bourdonnais.  which is 10 minutes walk from your hotel.
The name of the stop is "Rapp-la Bourdonnais".
But, IMO, it's not an efficient way to see the sights; plain city buses are not made to make it easy to see the sights (smaller windows, lower, full of regular people).
jcaron, in the comments suggested using the hop-on hop-off tourist bus; which would be easier and more practical.
Anecdotal, as someone who've been to Paris lot of time, it is sometimes fun just relax and take a regular bus and just do people watch.

Bus 42 in Paris


Where are the best places to cop some copper?

Question: I need copper for crafting. I've found it in some random caves, but usually only find about one copper per location. Are there specific maps/missions that have more caves and are more reliable for finding copper? Is copper available inside other items or by other methods?
Answer: Copper can be found in any "cave-like" area where rocks could be on the walls or ceiling. This includes mines, actual caves, and even sometimes just "quarries". Copper ore has a chance of replacing any of these rocks. The same goes for Quartz, Rough Ore, and Coal.
Caves are most common in forest zones (compared to suburbs, city, and industrial zones) since they have a chance of appearing in the main center area. However, every map type usually has a few caves on the outside edges of the map (which are forest-based).
Occasionally, copper ore will be given as a reward for completing a mission. Be sure to check the mission rewards ahead of time so you know what you're getting. Accomplishing bonus objectives (staying under the build limit, finishing the mission within the speed run time limit, etc) will earn you more resources in the form of higher level loot chests.
Finally, encampments occasionally give a copper ore as a rewards as well. You can tell what kind of rewards an encampment will give by hovering your reticle over the encampment when you're close. If the reward symbol is a piece of copper ore, you will receive 4 pieces of ore.

All of the info above also applies to silver ore (the tier 2 ore) and malachite (the tier 3 ore).
Answer: From my own experience playing, copper was most common in natural areas, specifically caves and mine shafts and not in industrial or suburban areas.
Other places to obtain copper include chests/lootable items in the world and as rewards for missions occasionally (it's a random chance and you can see the rewards before starting a mission).
Answer: I have found an abundance of copper in boxes within a cave system.  So if there is copper in the cave, then the boxes you can loot (excluding the ammo boxes) seem to have an increased chance of providing copper.
In addition, any weapons that you get from looting can produce copper (or silver etc) in the recycling process.  The higher power level you are, the better chance you have of getting plenty as you farm.
Work on increasing your power level (which is NOT necessarily in relation to your quest progression line!!!  Check out your survivor squads, paying close attention to the directions for each squad slot.  Changing the lead/survivors and upgrading them can increase your power level by 2-5 in a couple minutes.
As your power level increases, the map opens and allows you to access higher level missions.  The higher the level, the more likely you are to find more resources you need.
Finally, search with a "Jess" hero if possible. She is the best for looting, and will often increase the loot..and has the added benefit of making it easier to farm.
Try joining some friends for a couple specific farming missions.. you'll get quite a bit.
The best suggestion.. SEARCH EVERYTHING THAT CAN BE SEARCHED!!!!  Specifically any boxes, piles of rubbish, bins, survivor shacks, and barrels.


Is it bad to include a lot of files in PHP like it is for file based Sessions?

Question: After reading about how file based PHP sessions are not the greatest for performance, it has me thinking.  Does this mean a PHP script including a lot of files is bad as well?  Since it is including a file or is this different from the way session data files are retrieved?
Answer: You should use spl_autoload_register() and OOP. This way, no matter how small your project currently is or how big it will evolve over time (and it would be dumb to exclude this possibility), PHP will only include what it needs, no more, no less.
That's the perfect future-oriented balance between runtime RAM usage, the maintainability of the code and the effects of hard disk latency time, I'd say, provided you're modularizing your code properly, of course (and XDebug helps here).
Having said that, it implies the badness of including unused files.
Inclusion of files, no matter which way (spl_autoload_register() or otherwise), should be done with absolute paths, due to the php.ini directive include_path, which PHP would search through for your files when using relative paths.
And a small extra-note to why "include 'foo.php'" works like "include './foo.php'" (the "normal" way of including files): it's because the directory "." is part of include_path by default.
Comment: You say to use absolute paths... but isn't include './foo.php' a relative include?
Comment: @Pacerier You're mixing the "extra-note" with the actual answer. I've mentioned the extra-note to incite to self thinking. The actual answer is still valid: absolute paths are better. Re-read the answer carefully, there's no logical contradiction in it.
Answer: It isn't really that bad. This can be shown by the fact that no one has tried to create a compiler to make the entire PHP application a single script..
If you actually used the microtime function of PHP to measure how much time it took, it would be in the billionths of a second.
Comment: Paragraph 2 is incorrect: Every include() is loaded into every script's memory, there is no shared space for those if you don't use an opcode cache like APC.
Comment: There are tons of PHP compilers. Are you forgetting HipHop and PHC?
Answer: I think everyone who fiddles with PHP comes to the point when their libraries become large, and worries come up for the performance.
My experience is that yes, if you always load all your libraries, then this is going to eat up precious memory (Of which you are allocated only a fixed number of megabytes per process). I have had source code files weighing 300-400kb (with comments) that ate 2-3 MB per script instance. Seeing that a script gets only 16-32 MB with many shared hosts, that is a lot. Also, the processing of such huge files often comes in at up to half a second per request, which is way too much.
So, splitting up is definitely necessary, and easy to do with Autoload and consorts. Check out my answer to this question for a few suggestions on how to split up your code wisely. There is also a link to a question about how to organize a large PHP project, which yielded great results. I'm in the process of figuring out the perfect structure myself, and not done yet. :)
Answer: Like Chacha102 wrote, it isn't really that bad.
But it also depends on your actual script files.
In practice you should profile your code, Xdebug is great for this.
To clarify: profile and compare. Avoid lots of small script files if you can, but still keep your source code organized (a single script with thousands of lines is not comfortable to edit). A profiler will give you some numbers to find a good balance.
Answer: Personally, I've always had more problems with the data the pages process rather than the size and amount of source file includes. However, I write heavily parameterised code in abstraction layers (think of this as the opposite of cut-n-paste programming) so a lot of different work is done by the same code merely by changing half-a-dozen simple parameters.
Answer: Including a lot of small files is less performant than including a big file, that's why cache engines like APC exist.
Comment: Because of the (small?) overhead for each file.
Answer: Another option is to "lazy" include files, eg, require_once them before using them (example instantiating a class) so that a whole load of unused includes won't (kind of) happen.
I've used a Zend feature about this (register autoload) but I do not know if it is generic to php or if it is not but exists to other frameworks...


How can I get started as a freelance facilitator?

Question: I have done all sorts of facilitation work (and some training) over the years as part of other jobs. I have quit my job following maternity leave I have decided to try setting up as a freelancer but I don't know where to start.
Comment: What sort of field were you looking at going in to? In my experience facilitating is very difficult - but then you do have training so maybe just me!
Comment: Ooh - I am not very good at keeping up with forums! I have mostly done work with community groups, charities etc but I am quite interested in branching out more. I don't actually mind which field although obviously it helps to build on previous experience. I have mainly worked on project reviews/evaluations, goal setting, feedback and discussion groups.
Comment: Can you provided a bullet list of the specific services you are looking to provide?
Comment: You have to tell us what services you plan to offer. Otherwise we may close the question as too broad and unclear of what you're asking.
Answer: First Steps of Freelancing:
I would recommend creating a resume of past facilitating jobs and education in the field and posting it on your own blog / website.
However the trick is to make it look more like a business page with services offered, a portfolio and client testimony, opposed to just being a resume form list of past jobs and schooling.
Instead of saying: facilitator looking for a job.
Ask: Are you looking for an experienced facilitator to assist in your company planning?
One says I need you the other says You need me. This is the difference between being an employee and being your own boss / business.
You should then be ready to list your availability at sites that focus on freelancing and other outsourcing opportunities. There are a few to choose from but I'm sure Google can help find the right one for you.
After you have your information readily available you can "hoof it" and cold call the type of organizations you have had experience with. Leave your business card / pamphlet even if they already have a monthly planner person and ask to be considered if their situation ever changes (which it most likely will eventually).
Call upon some of your old employees. Ask if they are in need of your services anymore. Since they are most likely in communications with other similar groups ask if they know of any leads, or ask them to put the good word out for you. (leave them some pamphlets or refrigerator magnets with your info) 80% of my early freelancing business was word of mouth.
Networking is one of the most important aspects of any business and with freelancing it does not always come easy. You must get in touch with others of your craft and help each other out with leads and ideas. Find that website where your kin gather or if you have the resources, create that website for your kin to join you.
Contracts, you must have a contract prepared or at least an outline of expectations, pay schedule / rates, what the job entails what you expect from the client and what the client should expect from you. A lawyer reviewed contract is your only defense against a company / person who decides they don't have to pay you or undervalues your work, or claims you mislead them, or didn't preform as agreed. There are many different excuses people use to keep their money and even if you rendered services as expected, with out the contract you will probably have no legal recourse.
A few other thoughts on resources, If you are just starting out and may not have resources for lawyers or pamphlets, consider bartering your services for what you may need.
Good luck on your adventure.
Answer: it might seem really overwhelming at first. The answer, in a nutshell, is to get your first client. Everything else will flow from there. You won't need to have a website or business cards for that - it's all about speaking to people and getting out of your home office and connecting to potential customers.
As you've already worked as a facilitator in the past (no idea what that is by the way! :)), I'd suggest getting in touch with previous groups that you've worked with. Meet them for a coffee, ask them about their current challenges. Then offer them a small fix for one of their problems as a starting point + build up from there.
As for branching out: Getting established in a new field is much more difficult and I'd wait until you've got a few jobs under your belt. It works the same way as with your current field: speak to people in the new field, as much as you can, to understand what problems they are trying to solve. You can use your previous jobs as examples of how you've solved those problems for others.
Good luck and let us know how you get on!
Answer: I believe you have started in the right place to answer your question.  There are people here with the talent.  As it looks to me from your description of facilitator, you put talent to work where the work is needed.  Come to think of it I believe that more facilitators are needed.  In fact, I'd like to see more facilitators on freelance sites.


What does it mean if felt- like pieces come through vent when AC is on in Toyota Avalon?

Question: 2006 Avalon xls 70k miles has just started throwing out a few pieces of what appears to be little triangles of felt like material through the vent when AC is on. Not a lot but is something breaking down?
Answer: A likely cause is a rodent nesting in the ventilation system. They may be chewing up carpet or sound deadening material. It may also be the foam that seals the ductwork sections breaking down. The material may be breaking down due to age or heat if you live in a warm climate. When the fan is turned on the air movement is blowing the pieces out the vents.
Comment: Or chewing up a cabin air filter.
Answer: Ducting flap seals breaking up. see 'mikes' answer.


m_ObjectToDataMap of the selected excel WorkSheet is "null"

Question: I am trying to include excel worksheet in a word document using Microsoft office interop.
When I'm selecting the excel worksheet I can see the "m_ObjectToDataMap " is null.
In the native debug I can see the following error.
"Native View = Unable to evaluate the expression. Operation not supported. Unknown error: 0x80070057".

because of that, I can't get the shapes or the chart objects from the excel sheet.
I need your help to get this corrected.
This is my code.
public void excelToWord(string wordPath, string excelPath)
    {
        Word._Application wApp = new Word.Application();
        Word.Documents wDocs = wApp.Documents;
        Word.Document wDoc = wDocs.Open(wordPath, ReadOnly: false);

        Excel.Application excel = new Excel.Application();
        Excel.Workbook wb = excel.Workbooks.Open(@excelPath);
        Excel.Worksheet ws = (Excel.Worksheet)wb.Worksheets[4];

        ws.Shapes.Range[4].Item(1).Copy();

        Excel.ChartObjects chartObjects = (Excel.ChartObjects)ws.ChartObjects(Type.Missing);

        Excel.ChartObject myChart = (Excel.ChartObject)chartObjects.Item(1);
        myChart.Copy();

        wDoc.Range().PasteSpecial();

        wb.Close();
        excel.Quit();

    }

Comment: Where and when do you run the code? Is it a windows/web service?
Comment: No this is a .Net core API project front end is an Angular App
Comment: The Angular app is run in a web browser, right?
Comment: @EugeneAstafiev yes. :)
Answer: Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. Read more about that in the Considerations for server-side Automation of Office article.
As a possible workaround, you may consider using Open XML SDK if you deal only with open XML files. See Welcome to the Open XML SDK 2.5 for Office for more information.
There are third-party components designed for the server-side execution too.
Comment: I tried to include an excel worksheet to a word document using  Open Xml Sdk too .
Can you give me an answer to the below question that I have asked. ?
"https://stackoverflow.com/questions/57391847/the-word-document-cannot-be-opened-after-adding-excel-charts-to-it-using-openxml"
Comment: Thanks. I developed my code so far using that documentation. But I'm stuck here.


Is there any regulation against sending stuff to space that you don't need there, like the Tesla roadster?

Question: Is there any regulation (or self-regulation) that would force space explorers to create as little debris as possible? The Tesla roadster in space seems to be only a PR-gag.
Comment: Obviously there isn't, since they got permission to launch.
Comment: While the question in itself is not uninteresting, it could use more neutral language. As it is, the wording is intentionally trying to incite emotions instead of looking for facts.
Comment: @Polygnome: OK, rewriting.
Comment: In this specific case, I'd argue that there's no debris. The Tesla and it's stage are on a large orbit past Mars and it's essentially gone. Anything beyond Earth's direct sphere of influence is essentially lost forever or "disappears" because space is just unimaginably empty and big
Comment: The question in the title and the question in the body are different, with different answers.  Yes, the FAA requires a demonstration of an effort to minimize debris production in order to get a launch license.  No, there's not any regulation regarding what specifically (within reason) you launch, provided you put it somewhere where it won't affect other spacecraft.
Answer: Yes, there are regulations, they have all been observed.
SpaceX needed a boilerplate payload to showcase Falcon 9 Heavy. Something was going to go up there. So, the premise of your question is wrong, the payload was not completely useless - it actually did exactly what was needed.
Technically, they only needed to showcase F9H performance and upper-stage restart capabilities in order to get qualified for GSO operations, but SpaceX's long-term goal is to fly to Mars. So, they opted not only to showcase upper-stage restart capabilities, but decided to kill two birds with one stone and test how far they can get the boilerplate payload. If they did not do it this time, they would likely have needed another test flight with another boilerplate payload, producing twice as much debris.
Did it need to be the Tesla? No, definitely not. Not using a concrete block or whatever they would have otherwise used but the Tesla instead was just PR. But the PR part was only a minor part of it, the flight was an actual, needed test flight that provided lots of valuable data and showcased that the rocket is indeed operational as advertised. Without this test flight, it would have been much more difficult to get commercial customers.
Notably, the Tesla does not contribute to Kessler syndrome. It is off flying through the asteroid belt, getting almost to orbital height of Ceres. Space debris is only a problem in narrow spaces like LEO/MEO and, to a lesser extent, GSO.
SpaceX acquired all the necessary waivers and adhered to all regulations. They specifically thanked the FAA for their cooperation at the end of the launch stream.
A good summary can be found here (its from 2015, I do not believe much has changed since then, highlights are mine):

Commercial launches are regulated by the Federal Aviation Administration (FAA), which is charged with ensuring the protection of public health, safety, and property, as well as the national security and foreign policy interests of the United States through its commercial launch licensing process. These regulations apply to all commercial launch vehicle stages and their components through insertion of the payload(s) into orbit.
  FAA certification requires that an applicant demonstrate that the risk level associated with debris from a proposed launch meets the public risk criteria for unplanned explosions. Applicants must also show plans for keeping in contact with the payload after payload separation. FAA certification also depends on applicants' plans for the mitigation of risks from reusable and reentering vehicles. However, the FAA does not currently regulate orbiting launch vehicle upper stage disposal strategies, including defining long-term disposal orbits, and limiting human casualty expectation to less than one in ten thousand.

I think the orbit qualifies as "long-term disposal orbit" nonetheless.
Answer: There is no binding international agreement. The UN has published Space Debris Mitigation Guidelines of the Committee on the Peaceful Uses of Outer Space. Several nations and groups have decided to follow these (NASA, ESA at least). These mostly focus on Earth orbit (where space debris is getting to be a problem). The guidelines contain various mitigation strategies, e.g:

upper stages must be passivated to reduce the risk of an explosion
LEO satellites must reenter after a certain amount of time


Power outlet that works off a switch no longer shuts off after replacement

Question: There is one power outlet (double) in my room where the top outlet turns on/off from a wall switch and the bottom one is always on. I just replaced the outlet with the new one, making sure all the wires go into the same holes in the new outlet as they were in the old one, but now the top outlet is always on as well as the bottom one and the switch does nothing to it. This is my first time replacing outlets (learned off youtube :)) and I have no electrical experience (just using common sense) so I can't figure out what might be wrong. Did I need a special electric outlet, or did I somehow mess up the wiring? Where do I start?
Answer: You didn't break off the tab between the hot screws. There's a small metallic tab that normally connects the two hots to allow chaining of outlets (line and load) along a circuit. For a half switched outlet, you need to use a pair of needle nose pliers to break off the tab.
Comment: Thanks @BMitch - can you possibly point me to a resource that has pictures of what you just said? :) Me having no electrical experience makes it a bit confusing to 100% understand what needs to be done. Like, how do I determine which wire is hot (yes, I have zero experience with this stuff :))
Comment: This video may help you if you're not clear on where the tab is. If you're at all uncertain of what you're doing, you may want to consider getting professional assistance. Replacing an outlet is pretty simple, but as always with electricity, mistakes can result in electrocution. https://www.youtube.com/watch?v=13WCzaOCGKY
Comment: Actually, I just pulled the outlet and figured it out on my own which tab to break! Thanks a lot! As for electrocution - I make sure to shut off electricity prior to replacing the outlets :)
Answer: Look at the old outlet and see which tabs were broken off on that.  You've already figured out the "hot" tab needs to be broken off.  Depending on how the house is wired, the "neutral" tab (the side with the white or gray wires) may also need to be broken off.  Replicate what had been there before.
There are rules about neutrals (basically: each circuit, i.e. all the stuff powered by one breaker, must use its own neutral, the one bundled with its hot wire - and not "poach" a neutral from another circuit.  This is to prevent fires from a neutral being overloaded.) That matters if the switched lighting outlet is fed from a different breaker than the unswitched outlet.
It's a picayune electrical-code thing, but it'll help later if you ever upgrade to GFCI or AFCI breakers.  (which is a good idea).


Get option/attribute that configurable product is configured by

Question: Is there a simple way to get the attribute code, that a configurable product is configured by?
Comment: can you give an example of what you need?
Comment: I don't think that I can give an example in this case. I just need to get the attribute code I mentioned, assuming that I have loaded the configurable product object.
Comment: but a product can be configured by multiple attributes. You want all available attributes, or something else?
Comment: If there are more than one attributes used for configuration, then yes I'd like to get them all. If there's only one attribute used, then just get this one.
Answer: Let's say that <code>$product</code> is your configurable product.
You can do this:
<code>$usedProductAttribtues = $product->getTypeInstance()->getUsedProductAttributes($product);
</code>
This will give you an array where the keys are the attribute ids and the values are instances of the attributes.
If you want the codes you can do this:
<code>$codes = array();
foreach ($usedProductAttribtues as $attribute) {
    $codes[] = $attribute->getAttributeCode();
}
</code>


Git http.proxy Setting

Question: I was trying to figure this git thing out and at one moment I messed with the http.proxy variable. Right now it's just nonsense, 'asdf' so pushing doesn't work. I don't know what the proxy setting was before (I don't even know what proxy server is). Any way to set http.proxy to the correct value?
Right now the error is: "Couldn't resolve proxy 'asdf' while accessing ... fatal: HTTP request failed.
Answer: You added an entry to your git config file by mistake. You can manipulate the both the global and per-repository config files using git config.
To find out if you added the proxy entry to the global or local config files run this from the console:
git config -l --global | grep http  # this will print the line if it is in the global file
git config -l | grep http # this will print the line if it is in the repo config file

Then to remove all the http.proxy entries from either the global or the local file run this:
git config --global --unset-all http.proxy # to remove it from the global config
git config --unset-all http.proxy  # to remove it from the local repo config file

I hope this helps.
Comment: In my case, I had ProxyCommand set up in ```~/.ssh/config```, which I had to remove on top what @mamapitufo mentioned.
Answer: The git config file is a local one (ie it is not pushed to a remote repo).
So unless you have some kind of local history/backup mechanism in place (like TimeMachine on Mac), you cannot restore it easily.
On Windows for instance, if you have access to the registry, you can look for the proxy settings there.

Git http.proxy Setting


Exactly as written?

Question: I attended an all-Mozart program the other day and I was wondering if all the pieces he wrote are performed by exactly the same number and kind of instruments you would hear today.  The French horn player said the piece he played was originally written for violin, and was arranged for horn by his instructor.  Is this done often?
Answer: Arranging and transcribing is not uncommon, for reasons such as, for example:

Sometimes (although not, I think, not in the case of Mozart), we are not sure what instrument the piece was written for, so different instruments that seem to suit the piece well may be used. A well known example of this case is Bach's The Art of the Fugue, for which there has been performances by many different types of ensembles, solo organ, etc.
Even the composers themselves adapted a certain previously written piece to a different instrument, to experiment, to quickly fulfill a commission, etc. An example I recall from Mozart is the famous Clarinet Concerto, of which at least the 2nd movement had been previously written for flute. Apparenty Mozart had written the piece for flute as a comission, but he was not very fond of the flute as an instrument and reappropriated the theme for the clarinet concerto, with the magnificent result we now know.
Certain instruments lack a rich solo repertoire, and pedagogues or great performers of the instrument are always looking for pieces written for other instruments that can be easily adapted. Andres Segovia, for example, as part of the work he developed to launch is career and divulge the classical guitar, adapted many Bach's pieces to guitar, of which the Chaconne became famous.
Answer: There are a number of ensembles which perform regularly on period instruments.  The same compositions they play, whether arranged for modern instruments or for different ensembles, are adapted depending on the current need or the arranger's own interests.
For that matter, lots of music is "borrowed"  (violas, a clarinetist is looking at you) to be played by different instruments.   I happen to know a fellow who played the Bach Double Concerto as a tuba duet.
And BTW,  over at imslp you will find multiple arrangements of many chamber pieces for different instrument groups.

Exactly as written?


Wireless connection dropping after pluging in ethernet

Question: I have a rpi 3 model b and am currently trying to set it up so that it connects to my wireless network and then connects through an ethernet cable to a copier in hopes of eventually being able to use cups and share this printer to the network. now when I have the rpi unplugged from the printer it connects just fine (I can ping it, ssh into it, etc) but the second I plug the ethernet cable in I no longer get any connectivity. Is the rpi only allowed to use one interface at a time? Is there some setting I am missing? please help.
Comment: Can you add details from the command "ifconfig" also add the config details from your "/etc/network/interfaces"
Comment: Does the WiFi drop out if you start the Pi with both connected? How are you powering the Pi?
Answer: In the initial question, you don't provide too many details about the configuration, so this is a bit of a guess: the WLAN gets a higher metric than the LAN does. You can consider metric as "cost". And as always, you want it as cheap as possible ;-)
As long as only the WLAN is connected, it's the only way and you have to bear those higher cost. As soon as LAN gets connected, the cost on the LAN is cheaper, so all the traffic goes out on LAN (as long as not explicitly told otherwise).
You can configure the metric of interfaces in /etc/dhcpcd.conf. Find a line that reads
interface eth0

or add it at the end of the file if it does not exist. Directly after that line, enter
metric 300

Then, find a line that is
interface wlan0

or add it at the end of the file if it does not exist. Directly after that line, enter
metric 200

That way, the WLAN will be cheaper than the LAN, so it will be used by default.
Apply the changes with a sudo service dhcpcd restart.


electronegativity and hydrogen bonding

Question: I have a basic idea why, but can someone just confirm, why chlorine isn't able to hydrogen bond despite the fact that it has the same electronegativity value as nitrogen.
Answer: H-bonding only occurs between a hydrogen bonded covalently to oxygen, fluorine or nitrogen, and another oxygen, fluorine or nitrogen bonded to a hydrogen.It does not matter that chlorine has the same electronegativity as nitrogen because (i assume you mean H-Cl) chlorine is larger than the O,F or N so its electron density is lesser than these elements. If you meant Cl-Cl, there is no difference in electronegativity between the two atoms so polarity = 0.
Comment: That is true of the _strongest_ hydrogen bonds.  But, as other questions/answers under the hydrogen-bonding tag point out, there are also hydrogen bond interactions involving heavier halogens and even carbon.  Shakespeare:  "There are more worlds, Horatio, than are dreamt of in [routine] philosophy."

electronegativity and hydrogen bonding


Meaning of "Solution is all but trivial"

Question: This is another example of how to use the phrase: "Something is all but Something" ... I have seen some examples of using this phrase as "almost completely", so, that would mean the solution is very easy, but I have also heard this "but limits the totality of the all", so that would mean the solution is very hard ... I don't understand how to use that expression
Comment: More context would help us give a better answer.
Comment: Is a mathematical solution for a circuit analysis problem: "Solution is all but trivial. A rather good starting point would be doing the following assumptions valid for a resistive load"
Answer: As others have said, "all but X" means "nearly X" and can be used in phrases like "all but empty," "all but completed," etc.
I think the other answers are little hung up on the meaning of trivial. Many words have one or more general meanings when used in common speech but a specific meaning when used in a specific field or profession; this is an example of jargon.
Trivial is one such word. When used in the context of mathematics, it means

a claim or a case which can be readily obtained from context, or an object which possesses a simple structure (e.g., groups, topological spaces). [...] The opposite of trivial is nontrivial, which is commonly used to indicate that an example or a solution is not simple, or that a statement or a theorem is not easy to prove.

In everyday use trivial means "having little importance or value." But as used here it means "requiring very little explanation; self-evident." Thus all but trivial means almost obvious, barely requiring effort to prove.
Answer: Collins says that

You use all but to say that something is almost the case.

The concrete wall that used to divide this city has now all but gone.
He has been all but forgotten.

So your sentence "The solution is all but trivial", means that the solution is almost/nearly trivial (shouldn't be hard to find).
More context would be needed for further explanations.
When you say that "but limits the totality of the all", you are speaking about a different use of the expression all but:

All but a particular person or thing means everyone or everything except that person or thing.

The general was an
unattractive man to all but his most ardent admirers.
The plant will stand all but the worst winters out of doors.

So it is when all but is followed by a noun that it means except for and "but limits the totality of the all" as you say. In your sentence all but is used with an adjective, so it cannot limit totality.
Answer:
The solution is all but trivial

would normally mean that the solution is so easy that it could almsot, but not quite, be considered trivial or self-evident. I could imagine this phrase in a math text, say, as a starting point before the text goes on to discuss a harder, but somehow related, problem.
I cannot imagine how this phrase or a similar phrase might be used together with  "but limits the totality of the all" -- a phrase which seems rather obscure and of a different tone.  But given an actual paragraph where both are used, I might better understand what has the OP confused.
Answer: The construction "all but" is very contextual, relying on the surrounding communication to be correctly interpreted. However, standing alone, the phrase "all but trivial" would generally (at least in American English) be taken as "it is anything but trivial" - meaning it is NOT trivial.
On the other hand, as an example, one could use "all but complete" to indicate either that completion is simple, or that completion is nearly impossible. It would depend on the context of the exchange. Context here could include such things as body language, or the general direction of the preceding conversation (or writing, for written communications).
This is not a construction I would recommend an English Language Learner using, due to the possibility of misunderstanding, and the ease of constructing alternatives. And, if one were to receive this in a communication, a request for clarification would not be out of order.
Comment: Till now I had only known this meaning of the phrase. I had no idea it could mean the total opposite too (the one suggested by others).
Answer: Meaning of "Solution is all but trivial"
The answer seems to be in the context of all but However I suggest in this case it is not. The fact we have **"All" before "But" changes the meaning, it Becomes the opposite of what we would normally expect the sentence to mean. It now has the meaning except.
"Solution is all except trivial"

but preposition, conjunction meaning 'except' Cambridge English Dictionary
But means 'except' when it is used after words such as all, everything/nothing,
  everyone/no one, everybody/nobody:

However
The fact we have **"All" before "But" sometimes does not change the meaning, it remains what we would normally expect the sentence to mean. It now has the meaning almost.
"Solution is almost trivial"

All but meaning 'almost completely' Cambridge English Dictionary
  I had all but finished the essay when the computer crashed and I lost it all.
all but: Collins Dictionary almost; nearly; example all but dead.

The answer lies in the meaning of Trivial, "Solution is almost having little value or importance", makes no sense. We have already establish the object has almost (little) value or importance by the use of the word trivial. Therefore it can be concluded that in this instance the meaning is
"Solution is all except trivial"
trivial: Cambridge English Dictionary adjective;having little value or importance:
Comment: This answer needs to consider the field-specific meaning of "trivial" now described in the answer by @randomhead to this question.


Paralel light conditions after passing from a sphere

Question:
Is it possible to get such result that light will be parallel after passing from the sphere?
what is the total condition for such result if possible?
Thanks for answers
Comment: Please clarify if the internal surface of the sphere is reflecting and the external surface passing light?
Answer: Absolutely. The angle under which the beam comes out if there is a single reflection inside the sphere can be worked out to be $\pi + 2\alpha - 4\beta$ where $\alpha$ is the angle of incidence and $\beta$ is the angle of refraction. $\alpha$ and $\beta$ are related by Snell's law: $\sin\alpha / \sin\beta = c$ is constant (the constant depends on the material and the wavelength of the light). In this case we must have $\alpha = 2\beta$, and we get that $2\cos\beta = c$.
This happens in the rainbow, only you cannot see it: 1) light going to the centre of the rainbow is blocked by the shadow of your head 2) all visible light reflects in all directions sufficiently close to parallel, so it will be a uniform white and not stand out much like the boundary, which is the actual rainbow.
Answer: Well the diagram you have drawn is physically incorrect.   The reflected ray you have drawn, is NOT reflected by TIR; total internal reflection, as the ray could not have entered the sphere and the angle of reflection is always the negative of the angle of incidence  (effective refractive index is -1).
So an optical path as you have shown it is not possible; the reflected ray has to be the same path length as the incident ray inside the presumed perfect sphere.
Even so, there might be one unique angle of incidence, on the sphere, where the emerging ray is parallel.
Note that the angle of incidence for the once reflected ray must be identical to that at the point of reflection.    From that we can deduce that there can be no emerging ray if there actually is TIR at the foldback point.
Ergo the angle of incidence has to be smaller than the 90 degree incidence that gives TIR, so there must also be a Fresnel partially transmitted ray, and a partially reflected ray at both points A and C.