White is up +7 in material, why is white still losing?

Question: Why do you think white is losing here?
Answer: White's king is dangerously exposed. 1...Bxf4 2. gxf4 g3 and how is White going to avoid checkmate? 3. Qg2 Nh3+ 4. Kh1 Nxf4+ wins the Queen, while 3. Kg2 Qh2+ 4. Kf3 g2 threatening Qxf4+ is almost checkmate as well.
So Black wins. Don't just count material, the ultimate goal of the game is to checkmate.
Answer: In addition to the other excellent answers highlighting the number of Black pieces aimed at White's King and Allure's correct analysis, it seemed concrete variations were the only useful thing to add to this Q/A.
White is losing because all roads lead to forced checkmates for the reasons identified by the other answers. Specifically, after 1. Qb7, Black has a forced checkmate in 19 moves. Diagram & lines courtesy of Stockfish 14+ NNUE (depth = 41+, 18225k nodes/s).
Interestingly, all of the captures and subsequent promotions with the g-pawn on Black's 7th move lead to mate in the same number of moves as 7...Qh3+.
<code>[FEN "N4r1k/p7/7q/4b3/2P2Np1/1Q1Pp1P1/PP3n2/R4RK1 w - - 0 1"]

1. Qb7 Bxf4 {2. gxf4, Qd5, Qg2} 2. gxf4 {This move delays the longest.} 2...g3 3. Kg2 {3. Qg2 and 3. Rxf2 lead to getting mated quicker} 3...Qh2+ {3...Qh3+ also strong, 3...e2 is a draw} 4. Kf3 g2 {Black's only move for a win.  4...g2 is a draw} 5. Qc7 {5. Rg1, 5. Kxe3 both lead to quicker mates} 5...Re8 {5...Qh3+ also wins by force} 6. Qe5+ {6. Qc8 and 6. Rxf2 lead to quicker mates} 6...Rxe5 7. fxe5 Qh3+ {Interestingly, all of the captures and subsequent promotions with the g-pawn lead to mate in the same number of moves as 7...Qh3+.} (7... gxf1=Q 8. Rxf1 Qh3+ 9. Ke2 Ng4 10. Rf8+ Kg7 11. d4 Qg2+ 12. Kd3 e2 13. Nc7 Kxf8 14. Ne6+ Kg8 15. Nf4 Qf3+ 16. Kd2 e1=Q+ 17. Kxe1 Qf2+ 18. Kd1 Ne3+ 19. Kc1 Qc2#) (7... gxf1=R 8. Rxf1 Qh3+ 9. Ke2 Ng4 10. d4 Qg2+ 11. Kd3 Qxf1+ 12. Ke4 e2 13. Kd5 e1=Q 14. Nb6 Qf3+ 15. Kd6 Qb4+ 16. c5 Qxd4+ 17. Ke6 Qxe5+ 18. Kd7 Qb7+ 19. Kd8 Qee7#) (7... gxf1=B 8. Rxf1 Qh3+ 9. Ke2 Ng4 10. d4 Qg2+ 11. Kd3 Qxf1+ 12. Ke4 e2 13. Kd5 e1=Q 14. Nb6 Qf3+ 15. Kd6 Qb4+ 16. c5 Qxd4+ 17. Nd5 Qdxd5+ 18. Kc7 Qff7+ 19. Kb8 Qd8#) (7... gxf1=N 8. Rxf1 Qh3+ 9. Ke2 Ng4 10. Rf8+ Kh7 11. Rf7+ Kg8 12. Rg7+ Kxg7 13. d4 Qg2+ (13... Qh2+ 14. Kf3 e2 15. Ke4 Qg2+ 16. Kf5 e1=Q 17. b3 Qef2+ 18. Ke6 Qc6+ 19. Ke7 Qh4#) 14. Kd3 e2 15. c5 e1=Q 16. Kc4 Nxe5+ 17. dxe5 Qge4+ 18. Kb5 Q1b4+ 19. Ka6 Qeb7#) 8. Ke2 gxf1=Q+ 9. Rxf1 Ng4 10. Rf8+ (10. d4 Qg2+ 11. Kd3 Qxf1+ 12. Ke4 Qg2+ 13. Kf5 Qxa8 14. Kxg4 Qe4+ (14... Qf8 15. e6 e2 16. e7 Qxe7 17. Kf4 e1=Q 18. Kg4 Q7e4+ 19. Kg5 Q1h4#) 15. Kg5 Qf3 16. e6 e2 17. a3 e1=Q 18. Kg6 Qeg3+ 19. Kh6 Qh1#) 10... Kg7 11. d4 Qg2+ (11... Kxf8 12. Nb6 Qg2+ 13. Kd3 e2 14. Nd7+ Ke7 15. Kc3 e1=Q+ 16. Kb3 Qb7+ 17. Nb6 Qxb6+ 18. Kc2 Qe2+ 19. Kb1 Qbxb2#) 12. Rf2 exf2 13. Kd2 (13. Kd3 Qf3+ 14. Kc2 f1=Q 15. b3 Q1g2+ 16. Kc1 Qff1#) 13... Qf3 14. Kc2 f1=Q 15. b3 Q1e2+ 16. Kb1 Qh1#
</code>
With perfect play, White is already lost. There are no good options. White gets checkmated either way: 1. Nh3 is -M8, 1. Kg2 is -M9, and 1. Ng6+ is -M13.  The analysis above shows 1. Qb7 leads to mate (-M19). Stockfish prefers sacrificing the Rook for the Knight with 1. Rxf2 but this seems to just lead to a longer mate (-M22).
Note:  -Mx means Black has a forced checkmate in x moves.
Answer: Without really analyzing this position in depth, Just at first glance. Black has four pieces aimed at White's king and White's pieces are mostly misplaced. White's rook on a1 is doing nothing and his knight on a8 is going to take a couple moves just to be a useful piece.
Black has a lot of potential threats. Qh1. Qh2, e2, Bxf4, Nh3+ etc. Yes, white is defending most of that right now but I would be willing to bet there's a really strong combination combining two or more of those threats that's pretty devastating.
Answer: Some thoughts:

the only thing preventing white being checkmated is the queen guarding h1. Which dramatically reduces the queen's value.
white's knight is in the corner, a terrible place in general for a knight, and very far from the action
black has many targets: h1, g3, d3, and the threat of queening at e1. White doesn't have much except Ng6+.
after Bxf4, gxf4 g3, it becomes a desperate battle to avoid mate.
Answer: "If your opponent offers you a draw, try to work out why he thinks he's worse off." – Nigel Short
I disagree with your premise that white is losing here, and with the answers so far. But this is based on my working-out, and not on the force of NN, so caution is advised.
Q: Why do you think white is losing here?
I don't, and here is why: If it's white to move, then in order to be a losing position, there need be refutations of every white attempt at black's hands in the given position. I don't see any such forcing and refuting line, for several candidate moves that is; in fact, I see black being in danger here. Black is left with trying to hinder white's looming attack by means of their current initiative, heading into a perpetual check sooner or later.
Among the candidate moves are
Rxf2, the drastic solution: after exf2 and Kxf2, black is asked to find Rxf4, which allows them to land a perpetual on rank 1 and 2 with white's attempt to flee via Kb3 covered by Qxb2.
Kg2, the sharp counter: the threat of Rh1 must be parried, but neither Rb8 nor Q-- nor K-- do the job, so black is left with allowing Rh1, banking on the interposing Nh3. So, after Kg2, black takes on f4 with either rook or bishop, and then seeks perpetual check again after Rh1, Nh3, gxf4 and Qh4.
Qd5, the fast ignoramus: activating the queen asks black to find Bxf4. If found, several sublines are playable after white takes back with gxf4, but none of them yield more than a draw for black. Black may push g3, but white calmly plays Kg2 and smiles, since both Qh2+ and Qh3+ are answered by the daring Kf3, now making fun of blacks mating attempt. Instead of g3, black had Nh3+, prolonging, and the drastic Rxf4, shortening the game; black is on the lookout for a perpetual check, and without their bishop covering b2, they need to cage in whites king near the h1 corner.
Nc7, the slow ignoramus: even this slow approach can't be forcibly lead into troubles for white. Blacks best bet is still to capture on f4 with their bishop, and after gxf4, either push g3 or play Nh3+, but both attacks can be disarmed by white, who still enjoys the drastic Rxf2, as well as the daring escape with Kf3. White may even allow promotion, since black's initiative will either end in perpetual or in them losing the game, gifting half a point.
Conclusion
To my understanding, the given position is a draw, because white has no way of stopping black from (either) delivering perpetual check (or regaining material equality in certain sublines), and because black is on a clock, having to cash in their current initiative before white consolidates and wins by force.
Comment: You are assuming it is white to move, but according to the image in the question, I think it is black to move since white has just moved Qb7.
Comment: Now I see the yellow. Must be urine, as displaying the board from the side whose turn it isn't, pisses me off!


FMCW radar and calculating ADC Sampling rate

Question: I am new to FMCW radar and I am using a TI module. I have been reading the TI reference material and they keep mentioning the parameter "ADC Sampling Rate". I am confused by what this means in terms of number of ADC samples, chirp length, sampling rate, and other chirp parameters. This picture shows the sensor configuration in TI's mmWave Studio. Based on how this is setup how would I determine the ADC sampling rate?
Comment: Ummm, no picture
Answer: Without the picture we can't address some specifics that you might be looking for, but in general:
FMCW radars find range by generating beat frequencies. After the beat frequencies are generated, it is these signals (linearly combined sinusoids) that you are digitizing via the ADC. You perform the DFT on the collected data, and can map the frequencies to ranges.
Having said that, the range window you want to observe is dependent on the range of frequencies you're willing the capture. If you want a wider range window, you need to sample at a higher rate in order to do so. This is the main relationship to consider in a FMCW system when it comes to the ADC.
When it comes to the pulse width $\tau$, or chirp length, the number of samples $N$ will increase as the chirp gets wider or if the sampling rate $f_s$ increases:
$$N = f_s\tau$$
The bandwidth $\beta$ of the chirp establishes the range resolution of the system in addition (along with the pulse width) to the slope of beat frequencies $f_b$ generated:
$$f_b = \frac{2R\beta}{c\tau}$$
For a given maximum range, increasing the bandwidth also increases the maxium beat frequency generated, and thus the ADC must be able to sample it.
Note that these beat frequencies are usually an order of magnitude smaller than the bandwidth $\beta $ of the chirp, enabling the use of a slower sample rate and cheaper ADC. This is one of the main benefits of FMCW over traditional (correlation-based) radar systems.
Answer: Actually there is a relationship between ADC sampling frequency and max intermediate frequency value. These are directly proportional and this parameter directly proportional to maximum range value. The higher these values, the greater the maximum distance you can detect.
For other parameters, follow This reference


Partial derivatives of spherical harmonics

Question: Is there any closed form formula (or some procedure) to find all $n$-th partial derivatives of a spherical harmonic?
Answer: The following formula for derivatives of associated Legendre functions is given in https://www.sciencedirect.com/science/article/pii/S0377042709004385
(New formulae for higher order derivatives and applications, by R.M. Slevinsky and H. Safouhi):
$$\frac{d^k}{dx^k}P_l^m(x)=\frac{(-1)^m}{2^ll!}\sum\limits_{n=0}^k\binom{k}{n}\left\{\left[\sum\limits_{i=[\frac{n+1}{2}]}^n\hat A_n^ix^{2i-n}(-2)^i(1-x^2)^{\frac{m}{2}-i}\prod_{j=0}^{i-1}\left(\frac{m}{2}-j\right)\right]\,\left[\sum\limits_{i=[\frac{l+m+k-n+1}{2}]}^{l+m+k-n}\hat A_{l+m+k-n}^ix^{2i-l-m-k+n}\,2^i(x^2-1)^{l-i}\prod_{j=0}^{i-1}\left(l-j\right)\right ]\right\},$$
where $$\hat A_k^i=\sum_{j=0}^i\frac{(-1)^{i-j}(2j-k+1)_k}{2^ij!(i-j)!},$$ $(x)_k$ being the Pochhammer symbol.
See also https://www.sciencedirect.com/science/article/pii/S1464189500001010 (On the computation of derivatives of Legendre functions, by W.Bosch) for numerically stable recursive calculation of derivatives. Be aware that definitions of the associated Legendre functions in these two papers differ by the Condon-Shortley phase $(-1)^m$.
Comment: Spherical harmonics are a two variable functions.  I don't see any partial derivatives in the above.
Comment: Thank you very much for the formulas and papers. I have a quick question: How this formula would work if $k=1$? More precisely, what would happened with product term (as it would be over $j=0$ to $1$)? Thank you.
Comment: If $k=1$, $i$ in the first product will be either 0 or 1. As these product terms are related to the identities (37) from the paper, it follows from this identities that they must  be supplemented by the convention (when $i=0$) $$\prod_{j=0}^{-1}\left(\frac{m}{2}-j\right)=1$$ and $$\prod_{j=0}^{-1}\left(l-j\right)=1.$$ If $i=1$, then $$\prod_{j=0}^{0}\left(\frac{m}{2}-j\right)=\frac{m}{2}$$ and $$\prod_{j=0}^{0}\left(l-j\right)=l.$$
Comment: Spherical harmonics are functions of $\phi$ and $x=\cos{\theta}$ of the form $$Y_l^m(\theta,\phi)=\sqrt{\frac{(2l+1)(l-m)!}{4\pi(l+m)!}}P_l^m(\cos{\theta})e^{im\phi}.$$ Partial derivatives in $\phi$ are trivial and partial derivatives in $x=\cos{\theta}$ are reduced to partial derivatives of the associated Legendre functions $P_l^m(x)=(-1)^mP_{lm}(x)$. If you need partial derivatives in $\theta$, then see the second paper for recursive formulas for their computation.


Digital Audio Amplifiers

Question: Can anyone tell me why a filter that blocks DC signal in an Amplifier would have a cutoff frequency of 4 Hz . Why would someone choose a frequency as low as 4Hz to filter out DC content before processing the audio signal further ?
Comment: You should ask the person that designed it. The cutoff calculation involves the amplifier's input impedance and a capacitance. Most likely, the combination of $Z_{in}$ and 4 Hz resulted in both a convenient capacitance value and a tolerable DC rejection.
Answer: In order to block the DC component in a signal, the high-pass filter can be used.

In the figure above, a basic high-pass filter which is known as the passive RC high-pass filter can be seen. The working principle of it depends heavily on the capacitor's behaviour at varying frequencies as the formula depicts:
$$X_{C}(j\omega) = \frac{1}{j\omega{C}} \Omega$$
The formula is named as the capacitive reactance which is actually a capacitor's resistance (not the internal resistance) by which an alternating current is attenuated while it passes through it.
So, let's analyse the given circuit. If the Kirchhoff's voltage law is applied on that circuit;
$$-x(t) + {\frac{1}{C}\int_{t_{0}}^{t} i(t) \, dt} + V_{C}(t_{0}) + i(t)R = 0$$
$$-x(t) + {\frac{1}{C}\int_{0}^{t} i(t) \, dt} + V_{C}(0) + i(t)R = 0$$
Let's assume that the capacitor's inital voltage $V_{C}(0) = 0V$.
$$-x(t) + {\frac{1}{C}\int_{0}^{t} i(t) \, dt} + i(t)R = 0$$
$${\frac{1}{C}\int_{0}^{t} i(t) \, dt} + i(t)R = x(t)$$
If the last equation is differentiated with respect to time and the relation $y(t) = i(t)R$ is used according to the circuit;
$${\frac{1}{C}i(t)} + R\frac{di(t)}{dt} = \frac{dx(t)}{dt}$$
$${\frac{1}{RC}y(t)} + \frac{dy(t)}{dt} = \frac{dx(t)}{dt}$$
By rearranging the last equation, we obtain;
$${\frac{dy(t)}{dt} + \frac{1}{RC}y(t)}  = \frac{dx(t)}{dt}$$
Interpreting what is happening in a high-pass filter, low-pass filter, etc. by looking at their differential equations can be demanding. Since these circuits are used to make changes on signals with regards to changes in frequencies, analysing these circuits in the frequency domain can be quite useful. In order to do this, the Fourier transforms of the both sides of the last differential equation can be taken.
$${j\omega}Y(j\omega) + {\frac{1}{RC}}Y(j\omega) = {j\omega}X(j\omega)$$
$${Y(j\omega)}(j\omega + \frac{1}{RC}) = {j\omega}X(j\omega)$$
Consequently, the transfer function $H(j\omega)$ becomes;
$$H(j\omega) = \frac{Y(j\omega)}{X(j\omega)} = \frac{j\omega}{j\omega + \frac{1}{RC}}$$
As it can be seen from the formula, basically, the transfer function results in a complex number. In order to obtain its magnitude, the absolute value of it can be calculated.
$$|H(j\omega)| = |\frac{Y(j\omega)}{X(j\omega)}| = |\frac{j\omega}{j\omega + \frac{1}{RC}}|$$
$$|H(j\omega)| = \frac{|j\omega|}{|j\omega + \frac{1}{RC}|}$$
$$|H(j\omega)| = \frac{\omega} {\sqrt{ {\omega^{2}} + \frac{1}{R^{2} C^{2}} }}$$
This equation relates the input voltage of the passive RC high-pass filter to the output voltage by the input voltage's frequency. Actually, this equation explains the main working principle of the passive RC high-pass filter by itself.
In order to make the transfer function's behaviour i.e. the high-pass filter's behaviour over frequency perceptible, let's create an example circuit with defined values of $R$ and $C$ and illustrate the magnitude graph of the transfer function. I've chosen the values arbitrarily and assumed that $R = 20 k\Omega$ and $C = 1 \mu{F}$.
The MATLAB code for drawing the magnitude graph of the transfer function is given below:
<code>f = 0: 0.01: 20;  % Frequency range in Hz

R = 20000;  % Resistance value in Ohms
C = 0.000001;  % Capacitance value in Farads

omega = 2 * pi * f;  % Angular frequency in rad/s

mtf = omega ./ sqrt((1 / power(R * C, 2)) + power(omega, 2));

plot(f, mtf, "r", "LineWidth", 2);
grid on;
xlabel("Frequency (Hz)");
ylabel("|H(f)|");
title("Frequency Response of the Passive RC High-Pass Filter");
</code>
I've plotted the graph with respect to the frequency as most of the time, we are dealing with classic frequency rather than angular frequency.
The resultant plot is given below:

As it can be seen from the plot above, the corner/cut-off frequency of the example high-pass filter is around 8 Hz which can be calculated by the formula;
$$f_{C} = \frac{1}{2\pi{RC}} Hz$$
Corner/cut-off frequency is the frequency at which the output signal's power which is transferred to the load (in our case, it is the resistor $R$) is half of that of the input signal. Alternatively, it is the point at which the output voltage's magnitude is approximately 0.707 times the input voltages's magnitude.
So, for our passive RC high-pass filter; if the input signal's frequency is chosen lower than the corner/cut-off frequency of the filter, the input signal will be attenuated dramatically.
Since a DC signal has the frequency of $f_{DC} = 0 Hz$ ideally, it can be removed from the input signal.
However, I don't have any idea about why the manufacturer has chosen the cut-off frequency as 4 Hz but choosing it lower than the minimum frequency value of the human hearing range which is 20 Hz is obvious as we don't want to miss a frequency component while we are listening to music, conversations, etc. via a loudspeaker.
This specific cut-off frequency rating could be about the designer's state of mind or the circuitry's needs.

Digital Audio Amplifiers


How to Properly Set Permissions for a Custom Strapi Plugin

Question:
Strapi Version: 4.1.5
Operating System: Debian GNU/Linux 9
Database: PostgreSQL 13
Node Version: v14.16.0
NPM Version: 6.14.11
Yarn Version: v1.22.5

Hi everyone, I can't seem to find consistent information on how to use permissions with a custom plugin in Strapi. I want to make an endpoint available to my front-end (Next.JS) application, but only when the front-end application has authenticated as a user and using the JWT that is returned from authenticating with Strapi. I keep getting a 401 returned.
Here's what I'm doing:
I used this page to set up authentication in Strapi. I have a user created in Strapi, and from the front-end, I can authenticate and it returns a JWT token. When I set up collection types to only be accessible with the "authenticated" role, I can access those collection types in the api using this JWT token. So all of that works. The problem is that I can't get this to work with my custom plugin, and I'm not sure why. I still get a 401 error instead.
Here's how I set up the permissions:
Based on this page, I initially tried to leverage the isAuthenticated permission that the Users & Permissions plugin provides:
<code>  {
    method: "GET",
    path: "/progress",
    handler: "memberProgress.getProgress",
    config: {
        policies: ['plugins::users-permissions.isAuthenticated']
    },
  },
</code>
Unfortunately, this did not work. The server raised an error, saying that this could not be found. So back on the document linked above, I decided to take the approach of creating my own gloabl permission. I created src/policies/is-authenticated.js with the following contents:
<code>module.exports = (policyContext, config, { strapi }) => {
  if (policyContext.state.user) { // if a session is open
    // go to next policy or reach the controller's action
    return true;
  }

  return false; // If you return nothing, Strapi considers you didn't want to block the request and will let it pass
};
</code>
Then, I modified my plugin's route as follows:
<code>  {
    method: "GET",
    path: "/progress",
    handler: "memberProgress.getProgress",
    config: {
        policies: ['global::is-authenticated']
    },
  },
</code>
This is all based on that document I linked to. Unfortunately, this still does not work. It seems to find the permission (server doesn't raise an error about it), but when I try to access my plugin's endpoint with the JWT token, I just get a 401 error.
Here is how I'm trying to access the endpoint on the front-end:
<code>  // VERIFIED, auth works and I get the expected jwt
  const strapiAuth = await strapiApiAuth();

  if ( strapiAuth && strapiAuth.hasOwnProperty("jwt") ) {

    try {
      const response = await axios.get(
        `${process.env.STRAPI_BACKEND_URL}/member-progress/progress?year=2022&name=&pageSize=10&page=1`,
        {
          headers: {
            Accept: "application/json",
            Authorization: `Bearer ${strapiAuth.jwt}`
          },
          timeout: 500,
        }
      );
      console.log(response);
    } catch (error) {
      // This is where I land with the 401 error
      console.log(error);
    }
  }
</code>
Answer: Strapi check if you have a valid jwt by default with "authenticated" role, but you must mark the permission to your custom endpoint in "Settings→User & Permission Plugin→Roles" of admin panel also.


2002 Dodge Durango brake light

Question: Driver brake light does not work. Bulb is good. Tried it in other side. Socket is good. tried it in other side. Tail light Assembly shows 12 volts. Brake light will not work. All other lights work. Help!!
Comment: Have you tried cleaning the contacts in the "bad" socket?
Comment: Yes I did. The "bad" socket works on the other brake light. thank you. good suggestion. Last time that was my problem.
Answer: When you have cabling passing through a rubber boot from the body to the tailgate of a vehicle, the continual flexing of the wiring whilst opening and closing the tailgate can cause some of the wires in the cabling to break. Pull back the boot on your tailgate and if you find any of the wires seperated simply splice them back together. Same colour to same colour of course.

2002 Dodge Durango brake light


What is the origin and meaning of "coyote ugly"?

Question: I overheard two scoundrels discussing one of their dates as being "coyote ugly".
Comment: Scoundrels? Really? Are you sure you're not just finding questions to which you already know the answer and posting them here?
Comment: The only good Robusto is also a Maduro - and generally, just as thin of skin....
Comment: Coyote's have a different beauty aesthetic than humans. What is ugly for a coyote might be ravishing to a human. 'Coyote ugly' means ugly for a coyote, but pretty good for a human.
Answer: This comes from the term "coyote date," in which an inebriated person awakens the following morning with a person of the opposite sex in bed. The protagonist's arm is pinned beneath the ugly person's body.
Allegedly, a coyote, when caught in a steel-jawed trap, will gnaw off its own leg to escape.
You can do the math from here.
Answer: Other than the popularization of the term from the movie of the same name, I believe it derives from the behavior of coyotes, which (among other canines), when caught in a trap will gnaw off a leg in order to escape death.  It describes a person (usually a woman) who is so undesirable that her partner (usually a guy) is willing to gnaw off the limb she is sleeping on in order to escape rather than waking her. The guy will usually find himself in this situation when, after a night of heavy drinking, he wakes up the next morning in the bed of a woman he does not remember meeting and has no desire of getting to know better.
Answer: Along with the correct explanations of 'Coyote Ugly', as already provided by The Raven and morganpdx, the whole picture is not complete without giving the three rating levels of the unfortunate date: 'One-bagger', 'Two-bagger', and 'Coyote Ugly'.
One-bagger describes someone so uncomely that they are made to wear a bag over their head so that you don't have to look at their face while copulating.
Two-bagger describes a person who is so much more distasteful that not only do you require them to wear a bag over their head, but you don one yourself in case the bag over their head falls off.
Coyote Ugly, the worst of the three levels, has already been explained.
Comment: Double coyote ugly -is where you bite your other arm off because she is out there looking for a one armed man!
Answer: I would guess it is just as ugly as a coyote. -
Added: In Urban Dictionary there are some posts about the story as posted by The Raven above. The film Coyote Ugly is from 2000.
http://www.urbandictionary.com/define.php?term=coyote+ugly
The expression coyote ugly is older, though. From the early 1980s, used among American students for piss ugly.
http://dictionary.reference.com/browse/coyote%20?&o=100074&s=t
Google Ngram confirms this student expression.
https://books.google.com/ngrams/graph?content=coyote+ugly&year_start=1800&year_end=2000&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Ccoyote%20ugly%3B%2Cc0
So it may be assumed the film took up an expression already in use, but is not the origin of the expression.
Comment: This is the wrong answer. It's about the coyote gnawing his arm off to escape.


What are the two arguments in revert opcode?

Question: I am trying to understand the revert opcode and how  it works . I understood that it will stop the execution of current context and return 0 to the calling context.
It seems it also takes in 2 arguments according to evm.codes. Can someone help me understand what the two arguments does?
Answer: offset is the starting position of the desired return data in memory and size is the size of the desired return data in memory. Offset and size are used to designate where the return data starts (offset) and ends (offset + size) in memory.
See: https://medium.com/@jtriley15/yul-vs-solidity-contract-comparison-2b6d9e9dc833
Comment: Thank you will check the article but I have a doubt. Why do we need to return a particular data from the memory? If it comes to revert then it is because there is some error in the smart contract and we have to return 0 only right?

I know my question here  is bit silly but would love to understand if there are any specific cases where returning data from the memory is useful?
Comment: if there is an error, 0 is returned on the stack and the returned data is served as an error message to the caller, and doing so, it will not consume all the remaining gas. See: https://eips.ethereum.org/EIPS/eip-140


Size of the universe for van Emde Boas Trees

Question: In order to achieve the time complexity of $O(\log \log u)$ for van Emde Boas trees I read in this lecture that the the universe size  $u$  is chosen as $u = 2^{2^k}$ for some integer $k$ for van Emde Boas trees. Why choose $u$ to be of this specific form ?
Comment: There's also a standard hand-wave in this kind of analysis. If the universe is not exactly that size, you can pad it to the next larger $k$ without affecting the asymptotic run-time.
Answer: This assumption makes the analysis easier. If the universe $\mathcal{U}$ is of size $2^{2^k}$ then every element in $\mathcal{U}$ can be represented by $2^k$ bits. Roughly speaking, when executing one of the vEB-tree operations you halve the "relevant bits" in every level of the recursion. So when you start with $2^k$ bits, then the recursion depth is $k$.
If your universe has a size not of the form $2^{2^k}$, then you have to use floor/ceiling in the analysis.
Comment: What exactly you mean by "relevant bits" ?Why did you put special emphasis on the word "relevant" ?
Comment: The subproblem you solve has only a universum, with half of the size bitwise. I said "relevant", because I did not formally define what I mean by relevant, but it should be clear if you know vEB-trees.


Where can I find replacement tips for the 5-way switch on my Squier Stratocaster?

Question: I own a Squier Vintage Modified '70s Stratocaster (it's made in Indonesia, if that helps), and I'm having trouble finding replacement tips for the 5-way switch.  I ordered a set of "White Switch Knobs for Import Stratocaster" made by AllParts, but they don't fit.  So, where can I find a set of replacement tips that will fit?
Comment: In what way won't it fit? Too big/small?
Answer: Fender has a parts department. It might be a good idea to give them a call. You might need to have the serial number for the guitar handy.
Comment: That's probably my best bet!  Thanks for the suggestion.  I'll do that and then let you know how it goes.


Marketing team's term for ubiquitous language

Question: We are working on a ubiquitous language; however, there are different terms used for marketing purpose and one used for product team and engineering team. The marketing team's term is more for PR purposes. Wondering in this case, is it OK that we have one terms that is specifically for marketing team and one for product and engineering?
Comment: I think this is actually an interesting question. I see one close-vote. Don't be so quick to judge this question. This is all a matter of perspective - who are you building the system for?
Comment: The system is built for consumers.
Comment: Ever heard of something called a Bounded Context? :)
Comment: From the question it's not clear if (part of) the software is actually used by the marketing department, or that they are *marketing* a product built by your org.
Comment: they are marketing the product built by eng and product
Answer: If you have one term used by the marketing team for marketing purposes and another term used by the product and engineering teams, then you do not have a ubiquitous language. In Domain-Driven Design, "ubiquitous language" is a vocabulary that is shared by not only the product development team but also across all the stakeholders. As soon as you have two groups using different terms for the same common concept, you no longer have uibquitous language.
The reason that ubiquitous language is so important is that it reduces ambiguity. Written and spoken languages already tend to have a good deal of ambiguity, but it is difficult to deal with ambiguity in software. Using a language that maps not only into the software, but in conversations with stakeholders about the software, is beneficial.
If you're working on a greenfield system, take the time to establish your ubiquitous language and use it throughout the system and conversations about the system. If you're working in a brownfield system, it could be beneficial to invest the time to refactor existing terms to your ubiquitous language and start using it.
Comment: @Danny: when marketing people invent new terms and slogans until the last minute, it is obvious they are not using these terms throughout the analysis and development of the product, so it does not really matter for the development.  And when their fancy terms help to increase the number of sales, it can be perfectly justified to let them use them - it does not help your organization when your team follows the DDD ideas dogmatically, but does not reach the expected revenue,
Comment: @Danny Why are they doing this? Perhaps you should look to other stakeholders - the customers buying your product and the people using it - to see what terms they use. It is possible that there is no universally accepted term, but that doesn't mean that you can't pick one and use it as the primary term everywhere and identify synonyms for it. If you don't have the language, analysis, design, and validation becomes that much harder, so it's worth developing the languge.
Comment: In our case, it is often that marketing team is evolving until the last minute. We cannot really have a final term until the product launch. How we handle that scenario?
Comment: Let's start with how not to handle that scenario. Do not attempt to rename everything in code at or after product launch when marketing has cemented the term. Not only is it a useless time sink but there is a high probability you will break something. Let's reason back from there. Either terms need to be set  before engineering builds, or the org needs to accept non-ubiquitous language.
Comment: @nonethewiser If renaming something would cause your system to break, that means you have insufficient (automated) test coverage. Although it's better to get the name right from the start, it's not always possible, especially as the system evolves. There are several refactoring patterns about renaming, such as [Rename Field](https://refactoring.com/catalog/renameField.html) and [Rename Variable](https://refactoring.com/catalog/renameVariable.html). Agile Data also describes approaches for [database refactoring](https://agiledata.org/essays/databaseRefactoring.html).
Answer: Sure, DDD dogma might say this does fit into the idea of the ubiquitous language. But the real question you need to answer for yourself is "how much does it really matter?" and what's the cost/benefit relationship of working with two different terms in your specific situation?. Hence, ask yourself:

Is there a high risk of confusing people? Is the "marketing team's term" a term which is unique and can easily be mapped to the terminology of the other teams, and vice versa? If yes, it should not be much of a problem. But if the marketing team's term is also used in the engineering world, but with a different meaning (or vice versa), that should be a warning sign.

How much is the marketing team involved into requirements analysis and design of the product? If they participate here, the need for having unique terms is much greater than in case they do not. If it is the latter, just let them use their own terms in their sandbox and keep smiling. If it is the former, teach the marketing team the tech people's terms, insist on usibg only these terms in internal discussions and let it be the marketing team's problem if they want to use different terms for PR.

Maybe there is a business reason why the marketing team prefers a fancy and intentionally vague term, but for technical purposes, that term might be too vague and ambigous? Maybe someone expects to sell the product more often with these "not-so-technical" names and terms. That would be a reason to stay away from making terminology equal.

For example, from a software engineering perspective it is somewhat debatable to call a software product like a specific programming error. From a marketing perspective, Stack Overflow has itself proven to become a very successfull name, though its original meaning from the time before 2008 was definitely not "Q&A website for programmers". Still I would not try to force software engineers at Stackexchange to use the term "stack overflow" for stackoverflow.com exclusively just for the purpose of making the language ubiquitous.
In the end, it is trade-off, and you have to discuss it in your organization how important it is for them to use one term, or two.
Answer:
there are different terms used for marketing purpose and one used for product team and engineering team.

Some may say that makes a  ubiquitous language impossible. I say, not so fast.

Group A
Group B

Term 1
X
?

Term 2
?
X

You've told me about the Xs. You haven't told me about the ?s. When terms compete the winner is the  one best known.

The marketing team's term is more for PR purposes.

This makes me suspect marketing might know the other term. They just don't consider it wise to use in front of customers. For example:

Engineering
Marketing

Foo Surcharge
X
X

Foo Discount
?
X

In this situation the Engineering team thinks Foo is a simple situation where you add a fee to a base charge that is used in many situations. However marketing absolutely wants people with Foo to feel they're getting a good deal.  And they are. Since they could be paying more for lots of reasons.
Which makes sense, unless you just want a simple way to calculate what to charge.
So you start to think, ok this is just a presentation problem. We just have to be careful what we show the customers. Marketing is just blowing their smoke.
That is until a court order drags a member of the engineering team up on the stand to read an email about the "Foo Discount" really being a surcharge.
These disconnects can cost time, money, freedom, and lives. Find a way to get everyone speaking the same language. Even if you have to let a flipped coin decide which term to use. Just make sure to tell everyone what the coin said.
Flipped coins have the ultimate authority over arbitrary decisions, provided the legal department doesn't care.
Comment: @MaciejStachowski the legal example is meant to show how impossible the leak can be to prevent.
Comment: I'd assume the question is about differences that don't have legal consequences - an engineering team developing a feature and calling it "encabulated widget counter", and marketing saying "that's technobabble, we'll just call it HyperCount". So more like project codenames than deceptive marketing - if it's the latter, your internal names *will* leak in source code, headers, random error messages, etc., and you *will* get burned.
Answer:
Wondering in this case, is it OK that we have one terms that is specifically for marketing team and one for product and engineering?

It is both, it is ok and it isn't ok. It depends. When the organisation the language is developed for it is a proprietary products organisation it is the way to go since marketing is the company's outside image that among others has to protect the intelectual property of the products, when the organisation the language is developed for is an open source organisation then it is confusing.
Taking the argument further for proprietary products it becomes strange considering Conway's law

organizations design systems that mirror their own communication structure

to use different languages between the teams, those interested in intelectual property could understand it just by changing the terminology the marketing team uses, they just need time to figure it out.
To sum it up, it is both ok and not ok with the mention that it is ok though might be useless.
Answer: Marketing department is a player to be reckoned with, even if not involved in design and modelling. They will advertise things under different names and soon enough your end users, support team, etc. will start talking with these terms too.
Align the languages as much as possible, and when not, make sure there is a solid user onboarding (in-software cues, training, documentation etc.) that will transition them from the catchy buzzwords they read in the commercial leaflet or website to the real language of your system.
Answer: DDD has the concept of "Bounded Contexts" to solve this issue.
The Marketing BC might have Marketing.Customer while the product team has Product.Customer the ubiquitous language only applies within a bounded context.
Now. You might well be thinking. "that is a plain contradiction. Should I have one language which everyone agrees on or several with confusing terms?!!"
And you would be 100% right. DDD and the like are made up to sell consulting services. When a customer complains that they don't work, they add some wiggle room or a work around. "Oh we are still doing scrum! just without the standups", "on wednesdays we  do KANBAN" etc
You can't expect these things to solve all your problems. Get Marketing to change to the same terms as everyone else, or given them a special MarketingCustomer object and make sure you make the distinction between that and NormalCustomer. But don't whatever you do just call the two different things both Customer
Comment: The software that deals with a product in the context of a catalog has different behavior than the software for same product in the context of a warehouse. That's what DDD solves with Bounded Contexts. I don't think in this case there's any software built for the marketing department at all; it's just that they use a different term than the domain experts in the actual context do.
Comment: I think you may have misunderstood the question - as I read it the OP is talking about terms the marketing team use when addressing the public to sell the product - not the terms they use within their team to talk about marketing.
Comment: ..no i think my interpretation is correct, it has the DDD flag
Comment: I mean there are two other answers here that interpret it the same way. I don't see why you can't have software for a marketing dept?
Comment: Since one of the other two answers here is mine, I can say I don't interpret the question the same way you do. Although it's a valid point about the term from the ubiquitous language applying within a bounded context, it seems like two teams have two different terms for the same concept and not the same concept seen through two lenses.
Comment: @RikD - "I don't think in this case there's any software built for the marketing department at all" - well that just means that, in the wider ecosystem, there's some separate bounded context (a complement of what you called the actual bounded context) that you will not consider for your application, except perhaps at translation/interaction points, if any. The idea is to be explicit about what's included in the model and why, and on the flip side, what *isn't* - and then that lets you decide to what extent you'll consider the needs of the marketing department, if at all.
Comment: @ThomasOwens interesting, I thought we did share the same interpretation. ie The marketing team are stakeholders in the software and the term is some business concept rather than that they call a product "super product" and the software team call it "codenameXv18.104.22.168"
Comment: I interpret the question the same way bdsl does - this is a question about a term that the marketing team uses in their marketing literature or when talking to prospective customers and a mismatch between that term and the term used in the software (and perhaps even the user interface). Using this term may cause customers to adopt this term and now you have languages used by marketing and some customers and a language used by the developers that is your domain model.


Can the strength bonus of a composite bow be improved?

Question: Are there rules for increasing the strength bonus of a composite bow after it has been made, and calculating the cost of such modification? For example, if a character has a composite longbow +2 and increases her strength to 16, is it then possible to modify it into a composite longbow +3 or must she instead get a new bow crafted? This obviously becomes especially relevant as powerful characters gain access to magic weapons that do not exactly match their strength bonuses.
Answer: Probably not. The maximum strength bonus of the composite longbow is part of the weapon's construction. The description suggests that this is an inherent property when the weapon is built. While we have information about how this value is determined when the weapon is made, there do not appear to be mechanics for improving this property.

All composite bows are made with a particular Strength rating... A composite longbow can be made with a high strength rating to take advantage of an above-average Strength score; this feature allows you to add your Strength bonus to damage, up to the maximum bonus indicated for the bow. Each point of Strength bonus granted by the bow adds 100 gp to its cost.

It's like creating a weapon with the masterwork property. Whether a weapon  is considered masterwork is determined when the weapon is created. The masterwork property is inherent, and cannot be added later.
The composite shortbow has nearly identical text, and should follow the same rules.
If you want a rules-legal solution to add a higher strength modifier to your bow damage, then the Adaptive ranged weapon ability is your solution. Thanks to @Wayne for pointing this out.

Requirement: This ability can only be placed on composite bows.
An adaptive bow responds to the strength of its wielder, acting as a bow with a strength rating equal to its wielder's Strength bonus. The wielder can fire it with a lesser Strength bonus (and cause less damage) if desired.

This improvement costs a flat +1000gp and someone who can craft magical weapons or add new magic abilities. The upgrade is worthwhile; you only need to pay once, it does not raise the weapon's effective enhancement bonus, and the damage automatically adjusts if the wielder increases their Strength score later.
Comment: Adaptive is particularly useful if you might receive temporary strength improvements such as Bull's Strength or Enlarge Person (although obviously Enlarge isn't the best option for an archer, it's an easy example)
Answer: Correct, probably not per "game mechanics"...
But if you think about it, isn't it possible to modify a bow in real life?  Can we add strips of metal or wood to the outside of it potentially to increase its pull?  Can we add sights to it?  Within reason, we can modify many things in real life.
It makes sense you might even be able to move an enchantment with the right spells and lab, I mean, if you can move a person across dimensions and planes, why can't you move a spell from one object to another on the same plane?  With magic, we can even turn wood into Iron Wood, I imagine that might increase the strength modifier...
In roleplaying games we are only limited by our imagination, creativity, and by our DMs.  Otherwise, we should probably be thinking more about playing video games than a tabletop.  If it was my game, you could pay the additional cost to increase the strength of the bow or even pay the additional cost to Decrease the strength of the bow, but I wouldn't offer that to players right out of the gate, they need to be creative enough on their own to even think of it as a possibility.
As far as Adaptive is concerned, it sounds nice, and it lets anyone fire a bow or get Strength Buffs before firing the bow, but it isn't at the top of the list for magic I want on my bow.


Getting bumps/warts on surface, Cura doesn't want to comb?

Question: I have not been able to print smooth and round shapes using Cura 3.3.1 (or earlier) without bumps. I think they are seams? The filament is PLA.
Combing is enabled, which I thought makes it so that the nozzle travels over already printed areas, instead of flying over the air...right?
I have been able to keep the seems hidden for the most part when there are sharp corners. Sometimes cura hides the seems properly...sometimes it doesn't.
Here is an example shape I have tried printing with several different settings:

The object above was printed using "random" seam corner preference. If I had chosen "sharpest corner", the bumps would all just stack up in one place, but still stick out.

Just look at the travel lines below! Why is it jumping all over the place?

I have tried "Avoid printed parts when traveling" enabled and disabled, doesn't seem to make much difference.
I feel that there should be a configuration that results in the nozzle not jumping through the air like that, but I can't find it. Perhaps that's not related to the bumps?
The printer is a MonoPrice Mini Delta.
Comment: One part at a time. The temp is 195.
Comment: Do you print one part a time?
Comment: What is the nozzle temperature?
Comment: You may want to look in the coasting option, this option tunes the pressure in the nozzle chamber by reducing filament extrusion before the move, thus preventing those blobs.
Comment: Possible duplicate of [What do you call this effect in 3D printing and how can I remove it?](https://3dprinting.stackexchange.com/questions/6321/what-do-you-call-this-effect-in-3d-printing-and-how-can-i-remove-it)
Comment: @0scar - Can my Q be considered a duplicate if I asked mine first? Because then mine is at risk of being closed.
Comment: Your topic was not very active any more. Please look into the linked topic and report back. It's now active ! :)
Comment: @0scar, Bort does have a point :-) Don't worry, we'll sort this out if it all goes wrong. I've made it a favourite and will keep an eye on it.
Answer: Following on from Toon's answer, here is a run down of Thomas Sanladerer's excellent
 video: 3D printing guides: Calibration and why you might be doing it wrong.
However, this may not be a definitive answer to the actual question about warts and bumps...

0:08 - A step back
Back in time - when the RepRap project (and the hobby grade 3D printing market) was new territory - it was seen to be a doable technology, with no restrictions imposed by patents. The new printers created and developed included Darwin, Sells Mendel and Prusa Mendel. These often produced unusable parts.
However, impromptu solutions, or kludges led to poor quality fixes giving poor quality prints, by today's standards. However, people (today) believe that because they worked back then,. that they must still be valid solutions today. However this is not necessarily the case.
The common misconception is that it is necessary to calibrate the esteps per mm for all axes other than extruder - adjusting the x, y and z esteps per mm until the 10 mm cube measures exactly 10x10x10 mm, even if that means squeezing the callipers.

1:25 - Car analogy
You find that your car pulls to the left, when going in a straight
  line, so you adjust the steering. However, then in hard corners and
  the rain the car handles poorly.
Upon closer inspection, it then turns out that the car had a flat
  tyre. You wouldn't compensate for having a flat tyre by adjusting the
  steering, now would you?

In order to get that 10 mm cube precise, it is usual to calibrate for the filament diameter, and extrusion multiplier (most straightforward option), but some printers aren't even that precise in the first place.
Mechanical, ripple, slaw, blacklash, can throw you off by 0.1 mm.  Compensation for this 0.1 mm is certainly possible and achievable. However, then for a larger print, say 100 mm, then these overcompensation will become more evident, and you will be one entire milimeter off the desired dimensions.
So, use the ideal calculated esteps per mm. Timing belts and threaded rods are made to tight tolerances. therefore the worst case of ideal step per mm setting is an inaccuracy of 0.5%.
So, to find the ideal calculated steps use Prusa's calculator which is very good indeed.
If you are not using belts, or very large printer, then it is worth recalibrating the steps per mm for x and y, as 0.5%  will make a noticeable difference in larger parts.
Use the files and instructions for these Calibration sticks on Youmagine, for proper recalibrating without results slewed by the extrusion multiplier being off by a bit.
3:45 - So what do I need to do?
What do you need to empirically calibrate your printer?  In actual fact, not all that much:

extruder steps per mm setting
extrusion multiplier (see video link - Extruder calibration)
print speed, jerk and acceleration settings - These depend upon how much quality you want to sacrifice for increased speed.
Pro-tip: slow your printing down. For example, try printing at half speed. Quality may be improved, and even if it isn't you will be able to observe more clearly what is happening, and going wrong.
(see video link - Super Fast Guide:Tuning Speeds)

4:30 - Other than that?
There is not much else needs calibrating, per se.
With regards to slicer software, there are only a certain range of settings make sense, but this isn't printer calibration. You simply learn the slicer software and, with familiarity, see how far you can go.
These days any well maintained and well built and solid printer will produce good prints.
Most slicers give you decent prints without tweaking or calibrating, other than the basic settings about your printer and deciding how the part should be printed.
What about print temp and retract settings? Well, just use the default settings, or settings which depend upon the type of filament.  So, no calibration is required there, as it is a property of the filament.
5:24 - Summing up
Don't try to calibrate everything
The technology, in particular the software, i.e. slicers, is still developing and improving. Slic3r's prototpye beta (in Nov 2014) has added compensation for fitting errors(?) without messing other things up, which is essentially what the cube calibration tries to do, but in the correct way.
Answer: Have you correctly calibrated your steps per mm a.k.a. esteps? Tom made a great video about it:
3D printing guides: Calibration and why you might be doing it wrong
Comment: Toon thanks for answering this open question that has gotten out of view. However, your answer is more or less a comment. If Tom's link dies there is not much to go on. I hope the OP tries your suggestion and reports back. In  the mean time you can edit your answer to a more proper SE answer describing at least the basics of how to calibrate the extruder.
Comment: Hi Toon, can you expand upon this answer? The best thing would be to take the main points made in the video, and note them in your post (if that is possible), or that if the link dies the information isn't lost. Else I will convert your post to a comment.
Comment: Following a written procedure is much, much more difficult to understand compared to watching the video. So i prefer not to write it out. There are already some great written instruction on the reprap wiki about about this subject. @Greenonline if it's more appropriate you can convert this post to a comment.
Comment: I understand completely. Some things just need to be watched rather than read :-) I will leave your answer as it is.


Apache web server won't display a webpage

Question: I've literally tried everything to get my web server broadcasted to the public but it's just not working. Every time I type my server IP in a browser like firefox it just gets stuck on "Waiting for ipaddress..." forever.
So here's what I did:

I completely reinstalled the operating system. I am using Centos 7 & Google Cloud
I installed httpd using the simple step by step guide as seen here:
https://phoenixnap.com/kb/install-apache-on-centos-7
I verified that the server is listening on port 80 with the
command:

netstat -anp | grep httpd.
sh-4.2# netstat -anp | grep httpd
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      18025/httpd
unix  3      [ ]         STREAM     CONNECTED     23993    18025/httpd

At first it was listening on tcp6 so
I typed in the command nano /etc/httpd/conf/httpd.conf and changed "Listen 80" to "Listen 0.0.0.0:80"
I still can't connect to my web server after restarting it.
I tried configuring virtual hosts by following the guide here: https://support.rackspace.com/how-to/set-up-virtual-hosts-on-centos/
I am not running IPtables.. I had no problems opening up port 80 in firewalld with the commands
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd ––reload

I also tried
sudo firewall-cmd ––permanent ––add-port=80/tcp
sudo firewall-cmd ––permanent ––add-port=443/tcp
sudo firewall-cmd ––reload

I then typed
sudo firewall-cmd --list-all and saw that services http and https were listed
I still couldn't get a web page when I type the server ip in my browser so I completely disabled selinux and firewalld. It's still not working.
I installed IP tables and opened the necessary ports:
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

In the VPC Network -> Firewall Rules tab in Google Cloud you can clearly see that http is open for all ip ranges
default-allow-http
Ingress
http-server
IP ranges: 0.0.0.0/0
tcp:80
Allow
1000
default

I used a curl command in the SSH console to test the website
curl -I http://localhost
HTTP/1.1 200 OK
Date: Sun, 22 Dec 2019 15:19:18 GMT
Server: Apache/2.4.6 (CentOS)
Last-Modified: Sun, 22 Dec 2019 14:54:44 GMT
ETag: "5-59a4c176b0e2b"
Accept-Ranges: bytes
Content-Length: 5
Content-Type: text/html; charset=UTF-8

And it responded with 200 OK.. Meaning everything was configured correctly. I opened all the ports and still cannot get a page to display when I type the server IP in my firefox browser. I don't understand.... What am I doing wrong?
EDIT:
Here is the error log
[Sun Dec 22 16:11:14.246082 2019] [suexec:notice] [pid 1244] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Dec 22 16:11:14.262897 2019] [lbmethod_heartbeat:notice] [pid 1244] AH02282: No slotmem from mod_heartmonitor
[Sun Dec 22 16:11:14.262979 2019] [ssl:warn] [pid 1244] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Dec 22 16:11:14.270177 2019] [mpm_prefork:notice] [pid 1244] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips configured -- resuming normal operations
[Sun Dec 22 16:11:14.270214 2019] [core:notice] [pid 1244] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

Answer: It turned out to a problem on Google's end. For some reason even though port 80 and 443 was already open it wasn't actually. I had to delete default-allow-http and default-allow-https and reopen port 80 and 443 now the website is working.


Is it possible to have a Vm inside a Vm?

Question: Suppose, I installed win7 vm in vbox.So what will happen if I try to install another vm in win7 ( which is itself a vm) say, windows or linux machine.Will it work?
Comment: Yes, it's possible. However, depending on hypervisor, there might be some nuances. Which one are you planning to use?
Comment: Since I am familiar with Virtual box.So I am gonna use it
Answer: What you are trying to achieve is while not very usual not in the least exotic: It's called nested virtualization - all "grown-up" Hypervisors I know of support it, but I don't know about Virtual Box.
Of course performance is not going to be brilliant, as the virtualization overhead becomes bigger (there is only one set of virtualization hardware in your box!), but there are use-cases.
Answer: While it might be a fun experiment, it's seems like something impractical to do if you're actually going to use the nested VM. Here is a fun article to read about someone who as already tried it. Surprisingly, it wasn't the RAM or CPU that finally ruined the performance of the nested VM's but instead it was VT-x not being able to handle all of the virtualization.
I'd say implementing the nested VM's would really bit hit or miss, depending on which virtualization software you use. The OS may have a factor too.
Answer: A virtual machine inside of a virtual machine is possible, however, you could also incur some problems. First of all, you have to enable VM nesting in your hypervisor (otherwise the entire endeavor is moot to begin with), need CPU passthrough (i. e. the hypervisor must pass the host CPU's VMX capabilities to the guest) and have to install a hypervisor plus supporting software in the appropriately configured virtual machine.
The only problem, things could easily go awry and cause your "super" VM to malfunction. This is the case when you are setting up KVM inside of a Xen VM, and although both the preparations of the Xen guest and installation of the guest OS under KVM has been successful, launching it for real causes the Xen VM to crash. You should therefore be prepared for issues of any kind.


'xmlrpclib.Fault: Request contains to few param' error when using ldtp

Question: I've been trying to use the Windows implementation of LDTP (Cobra) for testing a stand-alone application within Python. It seems to work fine at first, albeit running slow most of the time. For example I was able to select menu items:
selectmenuitem('Sample App','File;New')

However, when I tried to execute any of the following lines:
waittillguiexist('Sample App', 'btnOK')
rightclick('Sample App','tblcBRANCH')

I get the following error in Python:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build\bdist.win-amd64\egg\ldtp\client.py", line 69, in __call__
  File "C:\Python27\lib\xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "build\bdist.win-amd64\egg\ldtp\client.py", line 186, in request
xmlrpclib.Fault: <Fault 0: 'Request contains too few param elements based on
  method signature.'>

I assume that I may still encounter this error with other functions. Are there any problems with my installation of LDTP? Any help is very much appreciated.
Answer: I'm the author of this project, arguments were missing for the API you are using, please refer
Comment: Welcome to StackOverfow! Answers should have the essential parts of a linked website, as links sometimes become outdated and break.
Answer: I see this problem, too. My solution is from python folder (C:\python2.7\lib\sites-packages) delete ldtp-xxx.egg, and remove the entry from easy_install file. Reinstall CobraWinLDTP-3.5.0. Then the problem is solved.


Arami Oved Avi Vayerd Mitzraimah

Question: The Declaration (Viduy) said when bringing the BIKKURIM includes saying  "An Aramian wanted to destroy my father, and he went down to Egypt"  Yaakov had many things Happen to him why choose the episodes with Lavan and going down to  Egypt (Mitzrayim) versus his battles with his brother Eisav?
Answer: The Alshich answers that Lavan is the source of all our problems. If he would have given Rochel   to Yaakov then Yosef would have been born first, and the brothers would never have fought with him. Thereby never selling him to slavery, this would have prevented our exile in Egypt from ever happening. That is why he is mentioned as he was the source of our going down to Egypt and not Eisav.
Reb Yaakov Kaminetsky says it is not just Lavan it is all Arameans.  As when Yaakov was going to marry Leah and not Rochel, they all knew and said nothing.
Rav Kasriel Auerbach of Ponovezh explains there is a fundamental difference between Eisav's hatred of the Jews and Lavan's hatred. That is Eisav hatred in this time period, was based on the fact that Yaakov had stolen his Brachos, as later we see when they meet up again and Yaakov points out that Brachos that Yitzchak had given had not come true Eisav does nothing, but Lavan should have had nothing but positive feelings for Yaakov as he made him rich and was the reason he had sons. This is why we focus in this declaration on Lavan so we understand and internalize that  the eternal Hatred of the Jew is one without reasoning.
The Brisker Rav has a different reason. The declaration of Bikkurim is meant to thank Hashem for a deliverance from hardship. Eisav is still around and still can cause us problems while Lavan is no longer around so in our declaration we are thanking Hashem for delivering us completely from Lavan but Eisav as an enemy to the Jews still stands.
Answer: I have to check my source, but I believe a simple answer was that Lavon had desired to wipe out Yakaov and his family.  This would have terminated the nation of Israel.  This is the first instance of Hashem's divine intervention (Hashgacha Pratit) to save the Jewish nation.
As a side note, we tend to get excited about the sensationalism of Yetzias Mitzraim, the exodus from Egypt.  The revealed miracles of the plagues and splitting of the sea.  We also need to realize the hidden miracles of Hashem's divine intervention in the laws of nature to maintain the nation of Israel throughout history.
Thanks for considering this approach.
Answer: The Torah never tells us that Laban went down to Egypt, but only that Ya'acov became a Great Nation there (in Mitzrayim) AFTER wandering landless as a shepard in Paddan Aram....
The Midrash Pesach Hagaddah changed "oved" to "ibed":
The midrash tells us that if you change the vowels from "oved" to "ibed," the meaning is changed from "wandering" to "destroyed." Thus, " A wandering Aramean was my father" will read, "An Aramean [Laban] tried to destroy my father."
Ya'acov lived in Aram, while courting Rachel and working for her father Laban, an Aramean [viz, which we would call a modern day Syrian]. Consequently, in the Pesach Hagaddah, Laban is usually seen as the Aramean who would have sought to destroy Ya'acob, reminding us of the treachery of Laban, who tricked Ya'acov into marrying Leah before Rachel, then tricked him into twenty years of servitude, and finally tried to deny him his dowry. Therefore, Laban may be viewed as the symbol of everyone who has tried to destroy the Jewish People.
While Rashi accepted this reading, Ibn Ezra strongly rejected it, in favor of the interpretation that the verse refers to Ya'acov, who, when he was in Aram, was lost.
In reading the Midrash (Hagaddah) together with B'rashith 31.43, if one takes into account the accusation of Laban that Ya'acov stole Laban's idols, we can see how this accusation might suffice to "uproot everything" (as the penalty for theft of idols would be a death sentence); yet, we are left with the phrase "he went down into Egypt," so identifying who went down to Egypt tells us who the Aramean is.
"A wandering Aramean was my father ['arami 'oved avi]; he went down into Egypt and lived there as an alien, few in number, and there he became a great nation, mighty and populous." The Torah says, "he went down into Egypt..., and there he became a great nation...." This passuk serves to identify who the wandering Aramean is: Clearly, our Torah teaches that Laban returned to Aram (32.1) and Ya'acov went down to Egypt and [there] became a great nation (46.27).
Ibn Ezra, rejects the interpretation of the Midrash Pesach Hagaddah and says, Ya'acov was lost while in Aram! Which I interpret to mean he was without roots in the land [of Paddan Aram], that is, he was a landless dweller in tents. He kept to his "family trade" - to tradition.
The Ibn Ezra makes two points.  First, he proves the grammatical impossibility of the Haggada's reading. He then suggests that the Aramean is Yaakov, who dwelt with Lavan in Aram. The intention, once again, is to stress how our forefathers had no land, and therefore, that the Land of Israel is a gift only by virtue of G-D to Am Yisrael.
I might stress, Bikkurim ("First-Fruits" pri ha'adama) are "a gift [specifically connected to Eretz Yisrael] only by virtue of G-D to Am Yisrael."
Going back to the source for the Bikurim ritual, (Devarim 26.1-11) verse 10 tells us to end this Bikurim (First-fruits) Recitation with our definitive connection to the Land of Eretz Yisrael! The Torah is emphasizing that we are no longer landless subject to the whims and wages of a foreign master [Laban]: "you have changed my wages these ten times," B'rashith 31.41) but we, as Ya'acov's children are the object of HaShem's blessing in the Land of Eretz Yisrael, that which HaShem has sworn to our fathers and has given to us: Devarim's emphasis in 26.2, and 10 is on the land (ha'Adamah הָאֲדָמָה that HaShem chose, [Moriah] the place of sacrifice B'rashith 8.8, 13, 21; 22.14) which the Children of Ya'acov possess for an inheritance!
Devarim 26.2 "that thou shalt take of the first of all the fruit of the ground, which thou shalt bring in from thy land that the LORD thy God giveth thee;" here, the emphasis is on the land and the first-fruits which belongs to the Priest in the place HaShem chose. "pri haAdamah" - "which thou shalt bring in from thy land...."
"And it will be when you are come into the land... and possess it, etc."; "I profess this day unto the L-RD thy G-D, that I am come unto the land which the L-RD swore unto our fathers to give us.'"
Devarim 26.10 "And now, behold, I have brought the first of the fruit of the land, which Thou, O L-RD, hast given me.' And thou shalt set it down before the L-RD thy G-D, and worship before the L-RD thy G-D."
Comment: Half of this has nothing to do with the OP. According to Rashi's understanding, which is that of the Haggadah as well, what is the connection between ארמי אבד אבי and the rest of the passage?
Comment: The question was why is Lavan and his attempt to destroy Yaakov connected to the exile in Mitzraim and the Egyptian attempt to destroy Bnai Yisrael. Why isn't the attempt of Eisav mentioned. This does not really answer the question.
Comment: @DonielF the OP - please clarify what is OP?
Comment: @YochananMauritzHummasti Original Post - meaning, the question you're responding to, in this case.
Answer: one other approach….
we mainly want to mention mitzraim and we only mention lavan because being that we are his children is the reason we ended up in mitzraim "to cleanse ourselves "
BTW..
if eisav would of gone to mitzraim with us then he too would of gotten a part in eretz
yosroell
Answer: Most pashtanim understand that "Arami oved Avi" refers to Yaakov (or Avraham); not Lavan!
JPS translation:

You shall then recite as follows before the LORD your God: "My father was a fugitive Aramean. He went down to Egypt with meager numbers and sojourned there; but there he became a great and very populous nation.

Rashbam writes:

(ה) ארמי אובד אבי - אבי אברהם ארמי היה, אובד וגולה מארץ ארם. כדכת' לך לך מארצך, וכדכת' ויהי כאשר התעו אותי אלהים מבית אבי. לשון אובד ותועה אחד הם באדם הגולה כדכת' תעיתי כשה אובד בקש עבדך, צאן אובדות היו עמי רועיהם התעום. כלומר מארץ נכריה באו אבותינו לארץ הזאת ונתנה הקדוש ברוך הוא לנו:
A wandering Aramean was my father: My ancestor Abraham was an Aramean, lost and exiled from the land of Aram. (translation my own)

Chizkuni (Deut. 26:5):

ארמי אבד אבי סרסהו יעקב אבי הארמי כשהיה הוא בארם היה אובד פי' עני בלא ממון שלא היה מוחזק בארץ. אבד לשון עני כמו תנו שכר לאובד ישתה וישכח רישו, ואין לתמוה איך נקרא יעקב ארמי שהרי דוגמתו מצינו יתרא הישמעאלי והוא היה ישראלי.

That, is, my ancestor Jacob was a poor wanderer.
Sforno writes similarly:

הנה אבי שהיה יעקב היה זמן מה ארמי אובד שלא היה לו בית מושב ובכן לא היה מוכן להעמיד גוי ראוי לרשת ארץ

That Jacob was for a time an itinerant Aramean.
Shadal combines the two explanations, and says that "my father" refers to the Avot collectively who were wanderers.

אבי: כולל כל האבות כאחד שהיו תועים מגוי אל גוי, והראשון בא מארם

Accordingly, the the continuation is clear: the verse speaks of the wandering of our ancestors from land to land.

Related: What does, 'A wandering Aramean was my father' mean in Dt 26:5? How can I distinguish p'shat from interpretation in torah translations if I'm not fluent in Hebrew?
Comment: This doesn't answer the question. The OP is assuming like those who do translate it as referring to Lavan.

Arami Oved Avi Vayerd Mitzraimah


pnp search filter and search result v4

Question: Has anyone used pnp search filter and search result. I have a choice field "LearningStack" in 7 different list and 6 different libraries. The idea is to have a page where I can display "Learning Stack" as a drop down or card and when selected I like result to filtered by the value. For example, if someone selects "Workplace Posters" then it should display items from all of the lists and libraries where "Learning Stack" -equal "workflow posters". I need to find a good solution and it's so hard to find a solution. I am using modern page (SPO)
Answer: Its a little unclear, what your question is for me. But if you are asking if pnp search webpart can let your users filter on a value from a drop down and show results from multiple libraries and list then the answer is a definite yes!
In short to achieve this I would recommend to map your "LearningStack" column to a RefinableString in the SharePoint search schema (done by an admin), and then include the RefinableString in the Pnp search result webpart and the pnp filter webpart.

pnp search filter and search result v4


Excel Chart export into PowerPoint export

Question: I have an issue with trying to embed a Excel Charts in PowerPoint via the
Interop API's using C#. I need to get this to work for Office2003.
The process I'm following is that I create a PowerPoint from a template
using the interop API's. Then I insert a new slide for each chart, and on
these slides I add a Excel.Chart OLE Object. All is well so far. Then I go
into that workbook, change the data, and use the chartWizard to update the
chart on the first sheet. Finally I close the excel workbook.
The issue is that the chart does not show correctly in the generated
PowerPoint slides. The chart is adapted with the changed data, but all
actions on the chart itself, such as changing the title, the data range,
chart type, etc. are not shown.
It becomes stranger. When in PowerPoint I click the (incorrectly rendered)
generated chart and choose open or edit, the chart will immediatly refresh to
the correct settings. When I then close the chart and go back to powerpoint,
the chart is rendered correctly.
I've spend hours and hours to figure out what is going on, but somehow
nothing seems to work. I've tried to call:

PowerPoint.Application.ActivePresenation.UpdateLinks() after all charts
are generated (is it a OLE issue?).
Chart.Refresh();
Workbook.RefreshAll();

Could someone give me a hint on what needs to be done? I'll post my code
that inserts the charts below.
<code>//Add the Workbook
Excel.Workbook workbook =
(Excel.Workbook)slide.Shapes.AddOLEObject(basePoint.X, basePoint.Y,
chartSize.Width, chartSize.Height,
MsoTriState.msoFalse).OLEFormat.Object;

//update the worksheet with data
Excel.Worksheet datasheet =
(Excel.Worksheet)workbook.Worksheets["Sheet1"];
datasheet.Cells.ClearContents();

//set table contents
//<<SNIP code that fills data sheet with contents from our custom
dataTable object>>

//fetch chart
Excel.Chart chart = (Excel.Chart)workbook.Charts["Chart1"];
Excel.Range range = datasheet.get_Range(datasheet.Cells[1, 1],
datasheet.Cells[dataTable.RowCount + 1, dataTable.ColumnCount + 1]);
chart.ChartWizard(range, Excel.XlChartType.xlBarStacked, Type.Missing,
Excel.XlRowCol.xlRows, 1, 1, true, dataTable.ChartTitle, "", "", "");

//release objects
datasheet = null;
chart = null;
range = null;
workbook.Close(false, Type.Missing, Type.Missing);
workbook = null;
</code>
Comment: Did you ever get this working?
Comment: Try www.pptxbuilder.com
Answer: This seemed to work for me when updating an existing chart:
<code>Chart.Application.Update();
</code>
I'd be interested to see if this works for you while inserting a new chart.


Prove that L* is a regular language

Question: Suppose that L is any language , not necessarily regular, whose alphabet is {0}; that is the strings of L consist of 0's only. Prove that L* is regular.
Comment: Homework exercises are off-topic here, this site is for research-level questions!
Comment: It's not homework I was stuck so I asked.
Answer: I believe that it's not a research level question.
You can proceed in the following way. First of all, you can prove that for any language $L^* \subseteq 0^{*}$ there exists some $i, j \in \mathbb{N}$ such that $L^* = L_{fin} \cup \{ 0^{j+kn} \; | \; n \in \mathbb{N} \}$ and $L_{fin}$ is a finite language (thus regular). Once you know it, it is easy to construct a proper automaton.
To prove it you can think about elements from $0^*$ as natural numbers and use euclidean algorithm. You can take $k$ as gcd of your set and $y_1, y_2, \ldots y_l$ as some set of generators, such that $k = gcd(y_1, \ldots, y_l)$. To get $j$, you know that there are some non-zero numbers $b_i$, such that $\sum_{i=0}^{n} b_iy_i \; \text{mod} \; y = k$ and take $j = \Pi_{i=0}^l y_i \cdot \sum_{i=0}^{n} b_iy_i$. A language $L_{fin}$ is simply elements from $L^*$ smaller than $j$.

Prove that L* is a regular language


Dynamic Images in PHP

Question: I am developing a CMS for clan websites.  I have a table with member ranks that members can be promoted to based on the experience points that they earn.  I would like to create a progress bar for that will display how far they have until they are promoted until the next rank.  What I want to do is fill a black bar with green based on how much xp they have earned since they've been promoted.  I have an equation that will find a percentage based on the member's progress.  For example:  if a member has made it 67% of the way from it's current rank to the next rank, 67% of the length of the black bar will be filled with green.  I hope all of this makes sense.  What do you think would be the best way to accomplish this?
Comment: Are you sure images is the way to go?
Answer:

Instead of background-color you can use background-image with width 100px(for both images) and height 30px or whatever you gonna use
Comment: Yeah, i stated this in answer
Answer: Use simple CSS -- image generating here is not what you need. But even if you need, generate 100 images once for all possible ranks percent values and use them in your script.

Dynamic Images in PHP


Is this problem right?

Question: Let $f$ be a continuous function from an open interval $I\subseteq\mathbb{R}$ to a Banach space $E$. The problem/exercise asks to prove that $f$ is differentiable in $x_0\in I$ if and only if the limit
$$\lim_{(h,k)\to (0,0)}\frac{f(x_0+h)-f(x_0-h)}{h+k}$$
exists when $h,k\gt 0$.
Shouldn't it be
$$\frac{f(x_0+h)-f(x_0-k)}{h+k}$$
otherwise i don't see what is $k$ doing there in the denominator. I've been able to do the exercise asuming it wanted to say "$k$" there because, if not, then $0=\lim_{k\to0^+}(\lim_{h\to0^+})$ can be very different to $\lim_{h\to0^+}(\lim_{k\to0^+})$ and they should be equal. Should I try it as it is?? The book this is from doesn't mess around and the $h$ could be on purpose to make the exercise very difficult.
Thanks
Comment: Surely, there is a typo in the exercise.
Answer: You are right. It is obviously a typo.

Is this problem right?


How do you counter Warlock?

Question: Recently, I've been playing warlock a lot, and he has become one of my best heroes. I'm curious as to what would be a strategy to counter a warlock who rushes Aghanim's and refresher. Are there any particular heroes that are a direct counter to warlock that I should watch out for?
Answer: Any hero that uses a diffusal blade well (i.e. Phantom Lancer, Mirana, Riki) will do relatively well against Warlock. Even then, DoTA is not a game of true "hard-counters", and well played Warlocks will beat not so well played Warlock counters. Warlock is a  strong hero (and has high public win percentage) but is essentially ignored by almost every competitive team at the moment (the notable exception being Cloud9 using it as a 4-role). There are a few reasons for this. The hero has a good attack animation/damage early but is easy to gank and does not gank well without his ultimate. Moreover, his most useful team fighting skill (upheaval) is not useful in lane and his most useful laning skill (shadow word) is not useful in team fights. This makes him awkward to skill as a solo and very level dependent (i.e. the above mentioned 4 warlock builds Hand of Midas).  This means that under the current metagame, it really does not have the ability to be a competitively viable 2 or a 3 (solo laner), and is quite level/item dependent to be a 4/5 (a support).
In solo lanes, there are not too many matchups that warlock has trouble with. Razor can give you fits as you are slow and really do not have an effective way to stop leeching damage. Heroes with long range harassing abilities can be a problem if they have high ground advantage. The hero does well in 1v1's against essentially all melees.
Generally speaking there are not any heroes that make Warlock look really silly, though this is true of most heroes. The way to get an advantage against such a hero is to gank early, and take team fights in between his long ult cooldown. As a Warlock, you need to take objectives/big team fights with your ult and upheaval.
Comment: why does no one mention fatal bonds? ever surprised the enemy team with fatal bonds @ roshfight? kill rosh get 5 kills ;)
Comment: I'd add that basically building 2 pair of diffusal blade will counter warlock without much trouble (Even as [Ezalor](www.dotabuff.com/matches/383478492) you can). Instagib his golem, have a mek to negate the impact and don't fight while fatal bonded and warlock become pretty much irrelevant. He so farm reliant to have an impact lategame that if you gank him (and he has no escape mechanism) you can pretty much don't care about him.
Comment: @RayofCommand I want to see that happen. I've used fatal bonds to finish off a retreating opponent or to increase dmg in a team fight, but I haven't seen that yet.
Comment: It happened "accidently" in my game. Until that momemnt I didn't even know that this was posssible. def. a funny moment, because the enemy team backed up and we simply killed roshan. was 3 kills actually. either 2 were not hit by fatal bonds or too tanky.
Answer: Besides going for Diffusal Blade, which was already mentioned, you also have a number of other strategies to diminish Warlock's effectiveness:

Play around Chaotic Offering's cooldown. Warlock is quite unimpressive when his ultimate isn't ready, and the fact that he invested ~9000 gold for the quadruple Infernal doesn't help either (means no Shiva's / Hex / Mek / Force Staff to help in smaller skirmishes or when the ultimate is just cooling down). If you can force him to blow his ultimate when he doesn't want to (for example to save himself or his teammates from a gank) you don't have to worry about it for a very long time, thus you can punish him by taking towers / Roshan or just generally playing aggressively without fear of being punished.
Prevent him from getting a good ultimate off. Chaotic Offering works best against clumped heroes in a teamfight, when you can stun them all and shred them with those Flaming Fist procs. If your team just spreads out and forces the enemy team to engage in smaller fights and / or to defend from splitpush, he will be forced to either blow his ult prematurely (and you can punish accordingly for that, see 1.) or to not be very helpful, which can lead to towers or heroes down.
This is quite a general advice, but just killing him repeatedly works very well. Warlock is very susceptible to ganks early (no burst damage / heal is too slow for it to actually make a difference), and is still relatively easy to kill even in mid / late game. Good blink initiators like Puck / Shaker should give your team enough time to just get rid of Warlock before it casts his ultimate, and even assassin heroes like Orchid Clinkz / Storm / similar heroes can just remove him from the fight if the opposing team isn't on point with detection / counter initiation. The fact that Aghs / Refresher don't give that much in terms of defensive capabilities (compared to Mek / Force / Shiva / Guinsoo) means it's even easier to remove from the fight before Chaotic Offering comes out.

How do you counter Warlock?


Show that $f ([-2, 1]) = f([0, 2])$ given a function $f (n)$

Question: We are given $f(n) = 10 + n^2$.
How would I show that show that $f ([-2, 1]) = f([0, 2])$ using set theory?
Answer: By the derivative of the function $f$:
$$f'(x)=2x$$
we see easily that $f$ is decreasing on the interval $(-\infty,0)$ and increasing on the interval $[0,+\infty)$ so:
$$f([-2,1])=f([-2,0]\cup[0,1])=[f(0),f(-2)]\cup[f(0),f(1)]=[10,11]\cup[10,14]=[10,14]$$
and
$$f([0,2])=[f(0),f(2)]=[10,14]$$
and then we conclude the desired result.
Answer: A bit of a circuitous method but uses the standard proof of equality of sets (i.e. $A\subseteq B$ and $B\subseteq A$ implies $A=B$).
Clearly, $f([-2,0])\subseteq f([-2,1])$. Now, since $f(n)$ is even, $f([-2,0]) = f([0,2])$. So $f([0,2]) \subseteq f([-2,1])$.
To show $f([-2,1]) \subseteq f([0,2])$ we note that $f([-2,1])\subseteq f([-2,2])$. Since again $f$ is even we have $f([-2,1]) \subseteq f([-2,2]) = f([-2,0]) = f([0,2])$ as required.
Answer: Hint: try showing that $f([-2, 1]) \subseteq f([0, 2])$ and $f([0, 2]) \subseteq f([-2, 1])$. What does an element of each look like?
Answer: Set $I_1=[-1,0)$ and $I_2=[0,2]$. Since $f$ is even, $f(A)=f(-A)$ for any set $A$. Thus $$f([-2,1])=f([-1,2])=f(I_1\sqcup I_2)=f(I_1)\cup f(I_2)=f(-I_1)\cup f(I_2)=f(I_2)=f([0,2])$$
since $-I_1\subset I_2$.


How to install WebSphere MQ Server?

Question: I am trying to create a new Queue Manager in Websphere but it does not give me a 'new option'. I only have Websphere MQ Explorer installed, how do I get the server?
Answer: The IBM MQ Explorer is a remote administration only package which you install and configure it to point to remote queue managers to administer. It does the administration via client channels to the queue manager listeners. It does not understand how to connect to a remote machine, like ssh etc, just a remote queue manager - hence there is no way to create a queue manager on a remote machine.
If you install the MQ Explorer as a component of a server install, as part of an installation which includes the server component, then it is possible for the MQ Explorer to create new queue managers but only on the same box that MQ Explorer is running (ie locally on your box).
So to answer your question, if you only have the explorer installed you have probably installed it from:

https://www.ibm.com/support/pages/ms0t-ibm-mq-explorer

If you want to create servers from within MQ Explorer, you need to install if from the main server product as a component, so need a new installation package. The IBM MQ Advanced for Developers for example, which is freely available for developer only (ie non production only... for production use you would need to obtain licensed media):

https://www.ibm.com/support/knowledgecenter/SSFKSJ/com.ibm.mq.helphome.doc/mq_downloads_admins.htm

How to install WebSphere MQ Server?


Calculated column based on value of other column

Question: I have two fields in a SharePoint list - 1. Archive Status (Choice field which are Active, Archived and Cancelled) and 2. Archived Date (Date Field).
Is it possible to automatically calculate the Archive Date column when Archive Status is set to Archived or Cancelled?
Comment: you need to conctenate Archive status and data column in the calculated field?
Comment: How is your archived Date calculated? Could you provide the formula on different status? For many scenarios, we may need to use workflow to do this job
Answer: Without out knowing more, such as what value you want to calculate for the date, maybe something like this:
<code>=IF([Archive Status]="Active",
    [Created]+90,
    IF([Archive Status]="Archived",
       [Created]+30,
       [Created]
      )
   )
</code>
If not Active or Archived, then use the Created date to archive immediately.


How can I calculate the partial derivative $\frac{\partial}{\partial \vec{x}} f\left(A\vec{x} + \vec{b}\right)$ using matrix calculus?

Question: I want to calculate $\frac{\partial}{\partial \vec{x}} f\left(A\vec{x} + \vec{b}\right)$ where $\vec{x}, \vec{b} \in \mathbb{R^n}$ and $f: \mathbb{R}^n \rightarrow \mathbb{R}^n$ which is applied element-wise. Is it correct that since both $\vec{x}$ and $f\left(A\vec{x} + \vec{b}\right)$ are vectors the partial derivative must be a Jacobian matrix? I tried applying the chain rule and various identities I have found on Wikipedia, but I am very unsure about the result:
$$\frac{\partial}{\partial \vec{x}} f\left(A\vec{x} + \vec{b}\right) = \frac{\partial}{\partial \vec{x}} \left(A\vec{x} + \vec{b}\right)\operatorname{diag}\left(f'\left(A\vec{x} + \vec{b}\right)\right) = A\operatorname{diag}\left(f'\left(A\vec{x} + \vec{b}\right)\right)$$
Answer: I'll assume that you have a specific function in mind, for which you know the derivative,
$$\eqalign{
 \frac{df(z)}{dz} &= g(z) \cr
 df &= g\,dz \cr
}$$
When this function is applied element-wise to a vector argument,
the Hadamard ($\circ$) Product must be used in the differential
$$\eqalign{
 df &= g\circ dz \cr
}$$
For this problem, define
$$\eqalign{
  z &=  Ax + b \cr
 dz &=  A\,dx \cr
}$$
then the differential of your function is
$$\eqalign{
 df &= g\circ dz \cr
    &= G\,dz \cr
    &= GA\,dx \cr
\frac{\partial f}{\partial x} &= GA \cr
}$$
where the matrix
$\,G = {\rm Diag}(g)$
Answer: Yes, it is a Jacobian matrix. When I get confused with vectors/tensors ("was there a transpose?"), I always start writing down a couple of components and then try to infer what the general expression is.
If you tried but still can't figure it out, read further. Let's compute the derivative of the $i$-th component of $f$ with respect of the $j$-th componente of $x$. To do this, don't forget that every component of $Ax+b$ depends on $x_j$, so we need to use the chain rule $n$ times.
$$
\partial_{x_j}(f_i(Ax+b)) =\\
(\partial_{x_1}f_i)(Ax+b)\cdot \partial_{x_j}(Ax+b)_1+\cdots+(\partial_{x_n}f_i)(Ax+b)\cdot \partial_{x_j}(Ax+b)_n\\
=(\partial_{x_1}f_i)(Ax+b)\cdot \partial_{x_j}a_{1j}+\cdots+(\partial_{x_n}f_i)(Ax+b)\cdot \partial_{x_j}a_{nj}\\
=(\nabla f_i)(Ax+b)\cdot a_j
$$
where $a_j$ is the $j$-th column of $A$. So how does this read when we put all the components together? The entry $J_{ij}$ of the Jacobian is what we just computed. Well, $J_{ij}$ is the product of the $i$-th row of $J_f$ with the $j$-th column of $A$. Therefore, denoting products with $*$ to not confuse with function evaluation,
$$
J_{f(Ax+b)} = J_f(Ax+b)*A.
$$
Answer: It will be in Jacobian form:
$\frac{\delta (f_i)}{\delta(x_j)}(Ax+b) * A = Jf(Ax+b)*A$
where $f(x_1,...,x_n) = (f_1(x_1,...,x_n),...f_n(x_1,...,x_n))$
Answer: What is your definition of $\frac{\partial}{\partial \vec x}$?
If we use the definition
$$
\frac{\partial g }{\partial \vec x}(\vec a) = \lim_{h \to 0} \frac{g(a+h \vec x)-g(a)}{h},
$$
(for a function $g:\mathbb R^n \to \mathbb R$), then the usual rules of limits should give the answer $A$.


Can I combine the power of 2 solar panels with 12V dc barrel jacks?

Question: I have two solar panels that both output to a 12V DC barrel jacks.
I want to feed them into a power bank that has a female jack.
Is there some way to feed the power of both panels to the input?
Would it suffice to use a barrel plug splitter with 2 female jacks?
Comment: No because the panels may start to charge each other if they don't have identical voltages.
Comment: Use diodes on both panels and you'd be fine.
Comment: I just saw in the specs that the panels have integrated blocking diodes. So I guess a simple dc splitter cable should work as long as it is rated for the combined amps of the panels.
Answer: The splitter should give acceptable results if both panels have the same output voltage (ie: both are the same model and both get about the same amount of sunlight at the same time).
If they aren't evenly matched the weaker solar panel may leech energy from the system - such that just using the single better solar panel could be more efficient. series diodes on each would prevent that but reduce output by about 5% from just using the single panel.
To determine what to do you need to make some measurements: connect one panel and measure the voltage on both panels,  the swap panels and measure again, if in both cases the unconnected panel has higher voltage the the connected panel there will be some gain to to connecting both panels to the powerbank.
If not there won't,
In cases where the illumination is uneven, (eg: one panel faces east and the other west) then series diodes could help.
But since your panels already have diodes, there's nothing you need to do, just hook them up. there's no way that having two panels connected would be worse than having one.


question about the construction of BSTs using a repeated sequence of rotations

Question: How can I show that any binary search tree can be balanced with at most O(n log n) rotations ("balanced" here means that the lengths of any two paths from root to leaf differ by at most 1).
Answer: Actually any BST can be transformed into balanced BST using $\mathcal{O}(n)$ rotations.
High level explanation: We convert given BST to right going chain(see fig-1 below). Then we convert that chain to balanced BST.
First convert given BST into right-going chain. Which can be accomplished using $n-1$ right rotations as follow.
Consider initial-right-chain $C$ of $root$ and all node that can be reachable from $root$ by following only right pointers.
Now, note that for any node $N$ in $C$ left child of node $N$ can be added into $C$ by right-rotating $N$. In doing that we don't loss any node from $C$.
So, by at most $n-1$ right rotation all node will be in $C$ because root will always be in $C$ from start.
Now, consider sequence of rotations $R: r_1, r_2, ..., r_m$ required to convert tree $T_1$ to right-going chain.
Now, consider sequence of rotations $S: s_1, s_2, ..., s_k$ required to convert balanced BST (containing same number of node as $T_1$) to right_going chain.
Then apply $r_1, r_2, ..., r_m, s_k', s_{k-1}', ..., s_1'$ to $T_1$. Here $s_i'$ denotes inverse operation of $s_i$.
Which will transform $T_1$ to balanced BST using at most $2n-2$ rotations.

<code>   1
    \
     2
      \
       3

 figure - 1
</code>

Ref: CLRS 3e exercise 13.2.4