Breaker Trips when turning on saw

Question: I do wood working in my garage.  I have two saws a miter saw and a table saw.  About 1 in 10 times when I start either of the saws the circuit breaker will immediately trip.  Nothing else is running on the same circuit at the time of the trips.  They have never tripped after startup, including when actually cutting wood.  The breaker is a 20 amp breaker.  I attached an image of it and a label of the panel.  The outlet is GFCI, but its not the GFCI tripping its the breaker.  Their cords dont reach the outlet, they are plugged into this extension cord.
What are possible solutions to stop the breaker from tripping?  I read about trip time delay, is there a way to identify the trip time delay of my current breaker?  My guess is the solution will involve messing with the panel which I am not comfortable doing and will get an electrician to do, but I am interested to know what they might do.  Also interested if there is anything I should try before calling an electrician?
Thanks
Comment: Murray MP-T [trip curves](http://www.escomelectrical.com/pdfs/murray-breakers-technical-information.pdf)
Comment: Can you move one of the saws temporarily to a place where its cord can reach the receptacle?
Comment: I have this same problem with my chop saw a 12" on a 20 amp circuit. it is usually on cold start every now and then, I don't think it is the extension cord mine is direct to the receptacle I have seen the same issue and that is the only load on that circuit. It may be part of the brake circuit I don't know but I would bet if I plugged in my chop saw after not being used for a while it is more likely to trip, reset the breaker and it tuns fine. Note breaker is a newer square D QO and I had the same problem (same saw) at my last place with a new cutler hammer panel both 20 amp non GFCI.
Answer: I believe your problem is the extension cord.  Is there any way you can locate the saw(s) so that they can be directly plugged into the outlet?
What happens when you use an extension cord with an induction motor (which is almost certainly what you are dealing with) is that there is an initial surge of current until the motor builds up a resistance (called back EMF) as its magnetic field starts to stabilize.  When you use an extension cord there is voltage loss across the cord and so it takes more current to generate the back EMF.
Another possibility is to get yourself a heavy duty extension cord so as to minimize the voltage drop due to the cord.  These are generally more expensive since they contain larger copper conductors but may help resolve your problem.  I realize your cord is marked as "heavy duty" but it's a 12 ga cord.  A 10 ga cord is probably a better choice here.
Comment: I clicked on the extension cord link, expecting to find 14 AWG or smaller. But it is 12 AWG. If it is really that size, then those are the same size wires as the permanently wired circuit, which then means just one extra junction and really shouldn't make much of a difference. A fast trip (and at startup, not when under load) also indicates something more than "just a little extra". Of course, with **both** saws involved, that points to extension cord or circuit rather than the saw.
Comment: Interesting that this answer suggests getting a heavier duty cord, while dandavis suggests a lighter duty cord https://diy.stackexchange.com/a/183446/101904 (option 2) .  My instinct is to try a heavier duty, as going with a lighter cord seems like a fire hazard.
Comment: @manassehkatz-ReinstateMonica  Have a look at the specs for the listed extension cord.  Two red flags IMHO, first is that it doesn't explicitly say "UL Listed" merely that it's designed to UL specifications.  That's a tip-off that it's not really "heavy duty".  Secondly, the currently capacity is listed at "15A" not 20A like the circuit.  I think a 10/3 conductor cord will resolve the issue.
Comment: @innominate227: a heavier cord will make the problem worse. You need a goldilocks cord: not too good to trip the breaker, and not so bad that it bursts in flames. Or use a good cord and another solution on one of the circuit's ends. You would smell the thin cord getting hot long before it started a fire. Temp is a function of time and load, so you have complete control over how stressed the extension cord will get.
Answer: You have to look at the Breaker Trip Curve and read the docs.
Breakers have two trip modes
Magnetic trip is an instantaneous trip.  That is the non-curvy part of the trip curve.  Current makes a couple of turns around a solenoid; when the current exceeds some wildly large number compared to the breaker's rating, SNAP!
Thermal trip is a delayed trip.  Current is heating up a carefully sized bi-metal strip.  The strip is designed to warm faster than the wires in the wall will be warming.  Before the wires in the wall could get warm enough to combust building materials, SNAP!
What the trip curve tells us
You are fighting magnetic trip obviously.  Let's take a look at the data sheet and squint our eyes at the poorly rendered, almost unreadable -- oh wait, nevermind. They give it to you in a nice chart.

You have a 20A breaker, so the "fixed instantaneous trip amperes" are 160-210.  Now I'm not exactly sure if they mean "15 is 160A and 20 is 210A" or if either one could be that range.  But there you go; you're pulling at least 160A of locked rotor amperage to cause that to happen.  Now go back and look at your motors and see what they say.
Are you doing something dumb like having a dust collector that spins up with the saw?  Coz that would do it right there.
Or, the breaker is defective.
Buying ourselves some more starting amps
Now, there is a rule in NEC  (430.52(C)(1), Exception 2, I believe) that allows you to bump your breaker size (e.g. to 25A or 30A) given certain characteristics of certain specific motors.  However, it's a no-go since this is on a general-use circuit.  It might be workable if the saw circuit was dedicated.
Now, look in the next section.  "2 and 3 pole Instantaneous Trip Table".  Much different number.  Hurm de durm... I don't see anything wrong with plugging a 1-pole circuit into half a 2-pole breaker.  We have a couple of those in service, one that the power company installed themselves where it's a 30A/120V circuit on a 30A/240V breaker.   So swapping that 1-pole breaker for a 2-pole (which will, notably, take 2 spaces) will buy you the higher instantaneous trip numbers -- a good way to gain the value of the 430.52 protection without increasing fire risk from thermal trip.
The beast needs power
Which begs a question in my mind.  A SawStop is a beast of a saw. I wouldn't blink if I saw one that took 3-phase. How the blazes are you powering that off a plain ole 120V/15A NEMA 5-15 plug???  In fact if it wasn't for the miter saw doing it too, I'd have suspected you of hacking something to make a SawStop work on a plain circuit.  I certainly see where there's consumer appeal for a saw that big that can plug in any old place without pulling a dedicated circuit, but it's really pushing limits. I wouldn't do it.
You've got a serious saw that you dropped serious coin on. Get worthy power.  Change or jumper the motor for 240V.  A 240V/20A circuit takes a NEMA 6-20 receptacle. It installs exactly like a normal recep, with the same wiring, and has almost 3x the available power.   Current is halved while instantaneous trip current is more than doubled, so you'll never have a nuisance trip again.  Heck, if you have a surplus of 120V circuits in your workshop, you could even rejumper one to be 240V - change the recep and change the breaker and done.
Comment: Not all Saw Stop products are power-gobbling beasts. They now make units down to contractor saw size, plus midrange units with power requirements that are within 15A 120V range (certainly within 20A 120V. I have one of the latter (massive overkill for my needs, admittedly) and it works fine just plugged into an available 15A outlet, though it would be happier if I reconfigured and plugged it into 240V.
Comment: So that indicates the saw can peak to 160 amps on powerup without tripping?  Perhaps I could buy an amp clamp meter and check if it is actually going that high, and if not it would indicate a bad breaker?  The sawstop comes configured with standard 120/15 plug, seems strange they would do that if it really needed 240.
Comment: @innominate227 Well look at the motor nameplate and see what it says about Locked Rotor Amperage; since the motor is not turning at start, it's placarded to flow at least that.
Answer: The problem:
You are drawing more than 20 amps at startup. Why?
A motor is powered by an elctro magnet.
An electromagnet is a coil. Coils are just wires.
Therefore, a motor wires the two prongs of your outlet together.
In other contexts, that's called a short circuit.
When? Your "random" occurrence is caused by the nature of AC current reversing it's sine wave 50/60 (actually 100/120) times a second. It doesn't deliver 110v, that's an average: it's always effectively somewhere between 0v and 170v. When your trigger pull happens to occur while the AC wave is at it's peak, you're bridging 170v with the resistance of the motor's coil, which must draw more than 20A to trip your breaker. This is also when/why tungsten light bulbs usually die when they do: at startup on peak AC voltage: if they turned on when the sine wave was at center, or 0v, the 1/60th second ramp-up would gently turn the lamp on by warming the metal instead of heating it so fast it fractures and burns out.
Why doesn't it trip whenever the AC voltage reaches peak, or when cutting a thick board? As the blade spins, it turns the coils on and off, at least once per spin, usually more. This mean the short circuit is brief. When the blade is still, that partial-spin takes MUCH longer. If the motor contact brush happened to stop at the front of a contact, the next cut won't un-short until the brush passes the whole length of the contact, the max delay, and most rotation needed; a worst-case.
So far, we've identified two factors: the timing of the AC duty cycle on start, and the duration of the short as a factor of blade speed and start position. There's another factor, far to complex to dig into here, which is the inductance of the motor coil. In short, this inductor effect can make the load appear larger, depending on motor type and driver design and the timing cycle.
What can be done?
Option: Put a circuit breaker in front of it, so that you don't have to walk to the actual breaker. Simple, safe, but doesn't really stop the problem.
Option: Limit current with resistance. A good extension cord makes this problem more likely to occur than with a marginal one. Use more/longer/cheaper extension cords between the saw and outlet. The goal is to introduce resistance into the circuit which will serve to limit the amount of current the voltage from the outlet can provide according to Ohm's law. Waste would be converted to heat, so if making lots of starts, keep an eye on the cord/plug temp and take a break if it gets to hot to handle.
Option: Replace the switch. If you used a solid-state relay to turn the saw on/off, instead of the naive mechanical switch, you can control when the switch actually switches. Some relays come with a "zero crossing detection circuit", which means that upon activation, it will wait up to 1/60th of a second to actually turn on at the instant the AC is balanced at 0v, avoiding a dead-short on peak voltage. You could zip-tie the trigger on, then nearby glue on a small button (or foot pedal) to trigger the relay, which switches on the saw.
Option: Slow down the motor. A motor speed controller would limit the current of voltage spikes. Come to think of it, they would all likely include a zero-crossing circuit, so even at max speed, effectively used invisibly, it should prevent breaker-tripping current spikes. It might be hard to find one affordably that can handle 20A of current.
Option: use a 1:1 (isolation) transformer. A current spike would only propogate to the transformer, which itself won't draw more than it's rating. Instead, the output voltage would drop, and the transformer would get warmer, but just for an instant. It might be expensive to get one that handles a big saw.
Option: use a power conditioner with power factor correction. These will have circuitry which can minimize reactive spikes in current with smartly-controlled capacitance. Large industrial motors need them to avoid fines from the utility, but they can cleanup the electrical mess from any motor. This will be expensive and complicated to implement, but would work well.
Comment: Transformers don't have any ability to choke current beyond their rating.  If you ask 50A from a 20A transformer, it'll die trying. Not immediately of course; that big thermal mass will buy you awhile.  *That is how it's possible to start your car engine with a motor that doesn't weigh 600 lbs.*
Comment: @Harper-ReinstateMonica: True, but the over-current spike hitting the transformer should be brief enough to not cause thermal issues, and as the voltage drops, so will the current, preventing breaker trips.
Answer: From second recommended option above. "Use more/longer/cheaper extension cords between the saw and outlet. The goal is to introduce resistance into the circuit which will serve to limit the amount of current the voltage from the outlet can provide according to Ohm's law."  My Rigid miter saw kept tripping the Arc Fault Breaker. I used the suggestion on using several extension cords and it worked. The breaker was not tripped since.
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

Breaker Trips when turning on saw


Pandas dataframe: Plotting meaningful plot

Question: I have following results set but plotting this as it is doesn't give meaningful plot because for each recall value there are multiple precision values. If I plot this results as it is:
plot4 = ggplot(aes(x='recall', y='precision'), data=df_unique) + geom_line() + geom_point() + ggtitle("MoLT Evaluation test")
ggsave(plot4, "myplot.png")

It gives a not so pretty plot comparing to normal curves that we get for this type of metrics.
       precision    recall
1       0.000000  0.000000
17859   0.133333  0.009050
13159   0.066667  0.012195
9232    0.133333  0.012500
6131    0.066667  0.013333
7900    0.066667  0.014085
11671   0.066667  0.014925
5297    0.466667  0.015284
535     0.066667  0.015625
11223   0.133333  0.018018
5409    0.066667  0.019608
10840   0.266667  0.019802
13241   0.066667  0.020408
15957   0.200000  0.020833
21584   0.200000  0.021583
11746   0.333333  0.021834
11272   0.066667  0.022222
10904   0.066667  0.023256
13015   0.466667  0.023891
1010    0.533333  0.025641
2461    0.066667  0.027027
15294   0.200000  0.027523
11566   0.600000  0.028846
5103    0.066667  0.029412
7547    0.333333  0.030864
10059   0.333333  0.032258
20019   0.266667  0.033058
637     0.066667  0.033333
16226   0.200000  0.033708
9071    0.200000  0.034884

I want to take the average for each value and build a new data frame.
(Pdb) x[(x.recall == 0.1)]
       precision  recall
230     0.066667     0.1
119     0.133333     0.1
714     0.200000     0.1
284     0.266667     0.1
15705   0.333333     0.1
8057    0.466667     0.1
4871    0.533333     0.1

I want to build my new dataframe as follows
       precision  recall
   1     0.000     0.0
   2     0.104     0.1
   3     0.234     0.2

How can I do something like this in an apply mode:
x[(x.recall == 0.1)]

Or any other technique to build a data frame with averages for each unique recall values.
Answer: Split this problem into two parts:

create a 'bin' column to group on
group data by your new column, then calculate the mean of each group

Your code might look like this:
import pandas as pd
import numpy as np

# ... load your data ...

# Create bins by rounding 'recall' to specified number of decimal places
df_unique["recall_bins"] = np.round(df_unique["recall"], 2)

# Group your data according to the bins you just created
groups = df_unique.groupby("recall_bins")

# Calculate the means of each group
precision_means = groups.aggregate({"precision": np.mean})

You can read more about the split-apply-combine appraoch here.


Please help me in pokemon go

Question: I have two gmail accounts and one works perfectly fine.
But the other one give the message of
Our servers are humbled by your incredible response
We are working on fixing the problem. Please try again soon
And all the servers are up ?
Comment: Multi-accounting is a bannable offense, just for the record.
Comment: Please don't re-ask your question when we close your first one.  If there's an issue, address it.  Asking it again just means we will close the new one, too.
Comment: Pokemon Go is probably down where you live, check [here](http://www.mmoserverstatus.com/pokemon_go)
Comment: Did the closers even read the question?  One of his accounts works perfectly fine, so the problem is NOT with the servers.  The problem is with the account.
Answer: You know some people have ddos the game, so the servers are temporaly off, there are no solutions you have to wait.
If you are in the bad country you can't play pokemon go go now. http://www.mmoserverstatus.com/pokemon_go
Comment: @Luminos The game is just under a lot of stress from everybody trying to log in and play. Niantic has addressed this, and are working on expanding their server capacity to deal with the load.
Comment: Oh, Poodle. They're a bunch of no-name frauds that just claim fake attacks. They've threatened to bring down my server and absolutely nothing happened.
Comment: How do you know people are DDoSing the game's servers?
Comment: https://www.youtube.com/watch?v=eTbJkwSGdzA
Comment: Really? So what's actually happened to the servers, a server can't be taken down for no reason. :/

Please help me in pokemon go


Does monster health scale on multiplayer accordingly to number of players?

Question: Does any given monster have <number of players> x <base health> on multiplayer sessions? Besides having multiple skills and buffs, will hunting with friends take approximately the same time as hunting alone?
Answer: No. Monsters do not scale to the number of players hunting. Nothing scales to the number of players involved, which shortens the length of hunts considerably. Anecdotally, I've done 5 minute Gold Rathian and Silver Rathalos runs.
Answer: Monster health does not scale according to the number of players. However, monsters in Tanzia Port have more health than Monsters fought in the Moga Village. iCEMANnoob did a video to prove this a ways back, as you can see below. He fought a Great Jaggi in the Village (19 hits), along with a Great Jaggi in Tanzia Port solo (24 hits) and in a group of four (23 hits).


How should I replace a tub spout?

Question: I am also having trouble with water still coming out the spout when the shower is on. When I replace the spout should I use Teflon tape (it has a set screw) and plumbers putty between the spout and shower wall?
Answer: If I remember right, the kind with a set screw have a rubber grommet and don't need tape (if there is a threaded connection then you should use some).
Use clear silicone where it meets the wall and leave a tiny gap at the bottom for drainage.

How should I replace a tub spout?


Modifying VB.Net program that uses normal ping method to use Async ping method

Question: I have created a program which acts as both a simple local area network map, but also as a troubleshooting program for pinpointing faults (ie. determining where a connection might be broken). There is a main screen that looks like this:
Image 1
and each button links to subscreens, such as this:
Image 2
The program works well enough as is, but using the normal ping method it requires each ping to finish before sending the next one and can sometimes freeze up the program for several seconds while it waits for a response (especially in situations where multiple pings fail and a large amount of devices are being pinged, as in the second image).
Currently the way I am doing this is by fairly simple programming in which I ping each device based on a list in a .ini file and then update it's associated button backcolor and labels (one label for the Response time, and one to keep track of how many times the ping request fails). Here is a sample of my code:
<code>Dim INI_File As New IniFile(My.Application.Info.DirectoryPath + "/IPAddresses.ini")

Public Sub pingallmills()
    Dim MyPing As New System.Net.NetworkInformation.Ping

    Dim MyEMillPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "E-Mill", "(none)"), 200)
    Label4.Text = INI_File.GetString("Main Screen", "E-Mill", "(none)")
    If MyEMillPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button1.BackColor = Color.LightGreen
        Label2.Text = MyEMillPing.RoundtripTime & " ms"
    Else
        Button1.BackColor = Color.LightSalmon
        Label100.Text = Label100.Text + 1
    End If

    Dim MyAMillPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "A-Mill", "(none)"), 200)
    Label5.Text = INI_File.GetString("Main Screen", "A-Mill", "(none)")
    If MyAMillPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button2.BackColor = Color.LightGreen
        Label7.Text = MyAMillPing.RoundtripTime & " ms"
    Else
        Button2.BackColor = Color.LightSalmon
        Label98.Text = Label98.Text + 1
    End If

    Dim MyCMillPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "C-Mill", "(none)"), 400)
    Label9.Text = INI_File.GetString("Main Screen", "C-Mill", "(none)")
    If MyCMillPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button3.BackColor = Color.LightGreen
        Label11.Text = MyCMillPing.RoundtripTime & " ms"
    Else
        Button3.BackColor = Color.LightSalmon
        Label96.Text = Label96.Text + 1
    End If

    Dim MyAtoCPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "AtoC", "(none)"), 200)
    Label14.Text = INI_File.GetString("Main Screen", "AtoC", "(none)")
    If MyAtoCPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Panel1.BackColor = Color.LightBlue
        Label16.Text = MyAtoCPing.RoundtripTime & " ms"
    Else
        Panel1.BackColor = Color.LightSalmon
        Label102.Text = Label102.Text + 1
    End If

    Dim MyCtoAPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "CtoA", "(none)"), 200)
    Label20.Text = INI_File.GetString("Main Screen", "CtoA", "(none)")
    If MyCtoAPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Panel2.BackColor = Color.LightBlue
        Label22.Text = MyCtoAPing.RoundtripTime & " ms"
    Else
        Panel2.BackColor = Color.LightSalmon
        Label104.Text = Label104.Text + 1
    End If

    Dim MyAOfficesPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "AOffices", "(none)"), 400)
    Label18.Text = INI_File.GetString("Main Screen", "AOffices", "(none)")
    If MyAOfficesPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button4.BackColor = Color.LightGreen
        Label25.Text = MyAOfficesPing.RoundtripTime & " ms"
    Else
        Button4.BackColor = Color.LightSalmon
        Label94.Text = Label94.Text + 1
    End If

    Dim MyCtoFabPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "CtoFab", "(none)"), 200)
    Label28.Text = INI_File.GetString("Main Screen", "CtoFab", "(none)")
    If MyCtoFabPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Panel3.BackColor = Color.LightBlue
        Label30.Text = MyCtoFabPing.RoundtripTime & " ms"
    Else
        Panel3.BackColor = Color.LightSalmon
        Label106.Text = Label106.Text + 1
    End If

    Dim MyFabtoCPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "FabtoC", "(none)"), 200)
    Label33.Text = INI_File.GetString("Main Screen", "FabtoC", "(none)")
    If MyFabtoCPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Panel4.BackColor = Color.LightBlue
        Label35.Text = MyFabtoCPing.RoundtripTime & " ms"
    Else
        Panel4.BackColor = Color.LightSalmon
        Label49.Text = Label49.Text + 1
    End If

    Dim MyFabshopPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "FabShop", "(none)"), 400)
    Label37.Text = INI_File.GetString("Main Screen", "Fabshop", "(none)")
    If MyFabshopPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button7.BackColor = Color.LightGreen
        Label39.Text = MyFabshopPing.RoundtripTime & " ms"
    Else
        Button7.BackColor = Color.LightSalmon
        Label45.Text = Label45.Text + 1
    End If

    Dim MyElecShopPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "ElecShop", "(none)"), 400)
    Label51.Text = INI_File.GetString("Main Screen", "ElecShop", "(none)")
    If MyElecShopPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button6.BackColor = Color.LightGreen
        Label53.Text = MyElecShopPing.RoundtripTime & " ms"
    Else
        Button6.BackColor = Color.LightSalmon
        Label47.Text = Label47.Text + 1
    End If

    Dim MySMillPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "S-Mill", "(none)"), 200)
    Label59.Text = INI_File.GetString("Main Screen", "S-Mill", "(none)")
    If MySMillPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button8.BackColor = Color.LightGreen
        Label61.Text = MySMillPing.RoundtripTime & " ms"
    Else
        Button8.BackColor = Color.LightSalmon
        Label55.Text = Label55.Text + 1
    End If

    Dim MyContainerPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "Container", "(none)"), 200)
    Label71.Text = INI_File.GetString("Main Screen", "Container", "(none)")
    If MyContainerPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button10.BackColor = Color.LightGreen
        Label73.Text = MyContainerPing.RoundtripTime & " ms"
    Else
        Button10.BackColor = Color.LightSalmon
        Label43.Text = Label43.Text + 1
    End If

    Dim MyDMillOfficesPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "DOffices", "(none)"), 200)
    Label67.Text = INI_File.GetString("Main Screen", "DOffices", "(none)")
    If MyDMillOfficesPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button9.BackColor = Color.LightGreen
        Label69.Text = MyDMillOfficesPing.RoundtripTime & " ms"
    Else
        Button9.BackColor = Color.LightSalmon
        Label57.Text = Label57.Text + 1
    End If

    Dim MyDMillPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "D-Mill", "(none)"), 400)
    Label75.Text = INI_File.GetString("Main Screen", "D-Mill", "(none)")
    If MyDMillPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button11.BackColor = Color.LightGreen
        Label77.Text = MyDMillPing.RoundtripTime & " ms"
    Else
        Button11.BackColor = Color.LightSalmon
        Label92.Text = Label92.Text + 1
    End If

    Dim MyServerRoomPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "ServerRoom", "(none)"), 200)
    Label87.Text = INI_File.GetString("Main Screen", "ServerRoom", "(none)")
    If MyServerRoomPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button12.BackColor = Color.LightGreen
        Label89.Text = MyServerRoomPing.RoundtripTime & " ms"
    Else
        Button12.BackColor = Color.LightSalmon
        Label42.Text = Label42.Text + 1
    End If

    Dim MyMechanicShopPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "MechanicShop", "(none)"), 200)
    Label114.Text = INI_File.GetString("Main Screen", "MechanicShop", "(none)")
    If MyMechanicShopPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Button13.BackColor = Color.LightGreen
        Label116.Text = MyMechanicShopPing.RoundtripTime & " ms"
    Else
        Button13.BackColor = Color.LightSalmon
        Label111.Text = Label111.Text + 1
    End If

    Dim MyFuelStationPing As System.Net.NetworkInformation.PingReply = MyPing.Send(INI_File.GetString("Main Screen", "FuelStation", "(none)"), 200)
    Label227.Text = INI_File.GetString("Main Screen", "FuelStation", "(none)")
    If MyFuelStationPing.Status = Net.NetworkInformation.IPStatus.Success Then
        Panel32.BackColor = Color.LightGreen
        Label226.Text = MyFuelStationPing.RoundtripTime & " ms"
    Else
        Panel32.BackColor = Color.LightSalmon
        Label222.Text = Label222.Text + 1
    End If

End Sub
</code>
What I want to do is have the screen load and function (rather than locking up until all pings finish) and update the buttons and labels as the pings replies come in. I'm not sure how to transfer the information about what button and labels to update with each ping when done asynchronously. Any advice would be great, also if there are suggestions on how to clean up this code by perhaps some kind of loop statement I'm open to that as well, I know my code is very simplistic and perhaps not done in the most efficient manner.
Thanks for any help you can provide.
Comment: Background workers or threads should be employed here
Comment: Sounds like it is time for you to learn how to use the [Async keyword](https://msdn.microsoft.com/en-us/library/hh191564.aspx)
Comment: Thanks for the hint there Ghost. After reading your comment I researched the background worker and found a quick and easy solution to my problem and best of all it was really easy to implement. I simply created a backgroundworker in visual studio, had it run my 'pingallmills()' sub on it's dowork event and then called  BackgroundWorker1.RunWorkerAsync() on the form load event. Worked like a charm, the program no longer locks up and updates very well. I also had to add the Control.CheckForIllegalCrossThreadCalls = False line to form load or it wouldn't work properly. Thanks Again.
Comment: I should also mention that my program runs the pings every 5 seconds to update the screen, so i needed a way to prevent the background worker from starting again before it had finished the last run. So I created an allownextping boolean which was defaulted to false, then set to true on the Background worker's RunWorkerCompleted event. my timer checks the boolean using a simple if-then statement before it will recall the dowork event. I then reset to false when the dowork is activated again.
Comment: @HansPassant I am familiar with async pinging and I know how to implement it with a handler and all of that, the problem I was having is figuring out how each ping can update it's associated buttons and labels, I couldn't find any examples in my searches of how to carry that information through... but Ghost's post has pretty much solved my issue
Answer: <code>        IPAddress ip_addr1;
        IPAddress ip_addr2;
        IPAddress ip_addr3;

        // calling an asynchronous operations.
        var result1 = new System.Net.NetworkInformation.Ping().SendPingAsync(ip_addr1);
        var result2 = new System.Net.NetworkInformation.Ping().SendPingAsync(ip_addr2);
        var result3 = new System.Net.NetworkInformation.Ping().SendPingAsync(ip_addr3);

        // do another initialization stuff

        // check result
        if (result1.Result.Status == IPStatus.Success)
            Console.WriteLine("1: Sucess");
        else
            Console.WriteLine("1: Failure");

        if (result2.Result.Status == IPStatus.Success)
            Console.WriteLine("2: Sucess");
        else
            Console.WriteLine("2: Failure");
</code>
Or watch this solution:
http://www.codeproject.com/Articles/481080/Continuous-asynchronous-Ping-using-TAP-and-IProgre
Comment: This isn't quite what I was wanting, but your link to the codeproject item was quite interesting, thanks for posting that.


Unknown lifecycle phase "spring-boot"

Question: I have a Spring Boot Multi Module Project in which there is 3 libraries jar and a main application that uses these libraries.
This is the pom.xml of 1 of my modules
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.tdk-cloud</groupId>
        <artifactId>tdk-cloud</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>

  <groupId>com.tdk.web</groupId>
  <artifactId>tdk-web</artifactId>
  <packaging>jar</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
  </properties>

  <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

         <dependency>
            <groupId>com.tdk.core</groupId>
            <artifactId>tdk-core</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>bootstrap</artifactId>
            <version>3.3.7-1</version>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>jquery</artifactId>
            <version>3.2.0</version>
        </dependency>

        <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity4</artifactId>

        </dependency>

   </dependencies>

</project>

but when I  compile and run your application using mvn spring-boot run
I got this error:
[ERROR] Unknown lifecycle phase "spring-boot". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

Comment: you need maven spring boot plugin. add it to your pom
Answer:
Add Spring Boot Maven Plugin in your pom.xml
<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>1.5.3.RELEASE</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

To run your application, Instead of

mvn spring-boot run
use
mvn spring-boot:run

Unknown lifecycle phase "spring-boot"


Clone a repo, just to get its content, in a subdirectory of another Git repo

Question: Tired of making the same directories and creating the same files every time I'm starting a new Laravel project, for the front matters, I decided to make a Git repo with assets and views folders and some files inside, just to have my structure ready quickly.
This repo can be accessed here (there is nothing useful regarding this question, this is just to be clear about what I want to do)
The idea is to pull/fetch/use-the-term-you-want that very repo inside my Laravel project (which will be, of course, a Git repo on itself), and that's all.

To be perfectly clear, the steps would be like this:

Start a new repo my-new-project
Deploy a fresh Laravel install (following official instructions)
Go into resources directory
Pull the content from my front-skeleton repository
Start working and forget about the front-skeleton repository which will now be related to the project, and won't need to be updated

I insist on the fact that I'm not talking about further operations to that Git repo, I'm really talking about getting the content once and for all, then forgetting even the existence of that Git repo.

I heard about subtrees or submodules but that seem to be too much for my needs ;
I didn't find a way to use remote correctly (my front-skeleton was pulled but at the root of my Laravel project, not in my resources sub-folder).

What would be the best way / best practice to do that?
Answer: That could be handled by a script that:

Issues git clone --depth=1 <url> <destination> on the repository, and then
Removes the .git folder inside the newly created <destination> directory

As a result, you get all the contents from your git repo, and that's all.
Comment: Interesting approach, but I got a `fatal: destination path 'resources' already exists and is not an empty directory` (because the `resources` directory already exists and have already some Laravel-related files)
Comment: Well, yes, it has to be an empty directory. You can not clone to a directory that is not empty. You could clone to a temporary directory and then copy the files over.
Comment: Hum, yep, probably, but I was looking for something more "2017"


Does the constructor ignore portions of a member initialization list of an argument was supplied to the constructor?

Question: I'm trying to understand fully how a constructor works in C++.  Specifically, the member initialization list of a constructor.
Say you have a class Foobar with three data members bar, baz, and qux.
I set up my constructor like this:
<code>Foobar(int bar, int baz, int qux)
    : bar(bar), baz(baz), qux(qux)
{
  // empty constructor body
}
</code>
My question is, does the member initialization list act as a "default"?  Or does it ALWAYS happen?  If, for example, the constructor was called with arguments, would the initialization list be ignored?
I want to always have the qux data member be 0, unless otherwise specified.  So would I instead write the member initialization line as:
<code>  : nar(bar), bar(baz), qux(0)
</code>
Perhaps I'm totally misunderstanding the function of the member initialization list and maybe someone can set me straight.
Comment: I think your confusion is caused by the fact that your constructor's parameter names are the same as the member names. While this is legal, I would recommend you use different names, perhaps by simply prefixing your parameters with an underscore.
Comment: possible duplicate of [What is this weird colon-member syntax in the constructor?](http://stackoverflow.com/questions/1711990/what-is-this-weird-colon-member-syntax-in-the-constructor)
Comment: @BenjaminLindley Why use a silly underscore for a language rule that everybody knows about? #IdRatherNotUnderscore
Comment: @CaptainGiraffe: Because not everybody knows about it. And underscores aren't silly, they're fantastic.
Comment: @BenjaminLindley They have an implied meaning. That is nowhere near fantastic.
Comment: If they are strings instead of ints, does that change anything?  In my book they did this exactly, but they were strings...My understanding was that they were initialized to empty strings.
Comment: If you want default values I would suggest using [in class member intializers](http://stackoverflow.com/q/24149924/1708801).
Answer: That constructor cannot be called without arguments, as all three of them are required. The compiler will remind you if you forget.
If you always want to initialize a member to a fixed value, the way to do that is exactly what you propose.
Comment: You could also toss in the syntax for `qux = 0` as a default argument in your answer.


How to show values in a JavaFx TableView

Question: I am trying to add some values to a TableView, but even thought the ObservableList obsEvts updates and has the values it should have, they are not correctly assigned to the TableView.
I tryed a lot of things, saw a lot of videos, tutorials, questions here, none of them solved my problem.
My whole code it right here: https://github.com/Skwead/Agenda/tree/bugs
My problem is in the Controller class only, in these lines: https://github.com/Skwead/Agenda/blob/efbb594e1ce77fb1e721bc90b0429e719ec87aef/src/sample/Controller.java#L61
public class Controller implements Initializable{
@FXML private TableView<SkEvent> todayTable = new TableView<>();
    @FXML private TableColumn<SkEvent, Date> horaTodoCol = new TableColumn<>();
    @FXML private TableColumn<SkEvent, String> estadoTodoCol = new TableColumn<>();
    @FXML private TableColumn<SkEvent, String> tarefaTodoCol = new TableColumn<>();

    public void setupEvts(){
ObservableList<SkEvent> obsEvts = FXCollections.observableArrayList(calendarHandler.getToday());

        horaTodoCol.setCellValueFactory(new PropertyValueFactory<SkEvent, Date>("date"));
        tarefaTodoCol.setCellValueFactory(new PropertyValueFactory<SkEvent, String>("name"));

        todayTable.setItems(obsEvts);

        todayTable.getColumns().addAll(horaTodoCol, estadoTodoCol ,tarefaTodoCol);
        todayTable.getColumns().set(0, horaTodoCol);
        todayTable.getColumns().set(2, tarefaTodoCol);
    }

}

public class CalendarHandler {

    private List<SkEvent> sortedEvts = new ArrayList<>();

    public ArrayList<SkEvent> getToday(){
        ArrayList<SkEvent> todaySchedule = new ArrayList<>();

        for (SkEvent event : sortedEvts) {
            if (event.getDate().getDay() == (new Date(LocalDateTime.now().getYear(), LocalDateTime.now().getMonthValue(),
                    LocalDateTime.now().getDayOfMonth()).getDay())) {
                todaySchedule.add(event);
            }
        }

        Collections.sort(todaySchedule, Comparator.comparing(SkEvent::getDate));
        return todaySchedule;
    }

No error is shown, at the end of this method call the todatTable should have all the data in obsEvts.
Comment: We require a [mcve] to be included in the question text itself. Links are insufficient. BTW: A look at the `CalendarHandler` class shows that you don't properly convert between `java.util.Date` and `LocalDateTime` (not sure why you don't use `LocalDate` or why you use `java.util.Date` at all).
Comment: I am sorry, I thought what I gave was enought, I have added averything needed now. Anyways, I need at least hours and minutes, wich LocalDate cannot handle, only Date and LocalDateTime.
Comment: You didn't; There is no element with `fx:id="todayTable"` in the fxml file, so you fill a table that is never added to a scene. BTW: your use of `static` has me concerned: `Controller.getC` returns a instance that is (probably) never used with a fxml. Rather than using `static` data to retrieve data I recommend creating an observable model and passing it around. As for the date conversions: print the results. today it should print september 3919; additional nasty surprises on the 31st and in december. Use `Date.from(LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant())` instead...
Comment: I do have a `fx;id="todayTable"`, it is right here https://github.com/Skwead/Agenda/blob/efbb594e1ce77fb1e721bc90b0429e719ec87aef/src/sample/resources/sample.fxml#L17. I will take a look on the observable model, I used static to try to get data from a controller to another, since they cannot be instanciated and I do not want to go into Spring orother frameworks right now. I will change the way I work with Dates as soon as I get this fixed, so I can test it properly, many thanks for the help
Answer: Without testing your code, I would say that your mistake is in your controller, where you are creating new table columns, instead of using the one that are in your fxml file...
 @FXML private TableView<SkEvent> calendarTable = new TableView<>();
@FXML private TableColumn<SkEvent, Date> horaCol = new TableColumn<>();
@FXML private TableColumn<SkEvent, String> segCol = new TableColumn<>();
@FXML private TableColumn<SkEvent, String> terCol = new TableColumn<>();
@FXML private TableColumn<SkEvent, String> quaCol = new TableColumn<>();
@FXML private TableColumn<SkEvent, String> quiCol = new TableColumn<>();
@FXML private TableColumn<SkEvent, String> sexCol = new TableColumn<>();
@FXML private TableColumn<SkEvent, String> sabCol = new TableColumn<>();
@FXML private TableColumn<SkEvent, String> domCol = new TableColumn<>();
......
.....

this should be like this:
 @FXML private TableView<SkEvent> calendarTable;
@FXML private TableColumn<SkEvent, Date> horaCol;
@FXML private TableColumn<SkEvent, String> segCol;
@FXML private TableColumn<SkEvent, String> terCol;
@FXML private TableColumn<SkEvent, String> quaCol;
@FXML private TableColumn<SkEvent, String> quiCol;
@FXML private TableColumn<SkEvent, String> sexCol;
@FXML private TableColumn<SkEvent, String> sabCol;
@FXML private TableColumn<SkEvent, String> domCol;

Are you using SceneBuilder? If so, just give thouse fxml column names to your columns in SceneBuilder.
Comment: If I do as you say I get a null pointer exception at Controller line 65, the column is null. Here's the complete npe error:
```java
Caused by: java.lang.NullPointerException
 at Agenda/sample.Controller.setupEvts(Controller.java:65)
 at Agenda/sample.calendar.CallendarController.validateInput(CallendarController.java:50)
 at Agenda/sample.calendar.CallendarController.click(CallendarController.java:30)```
Comment: @Skwead then track the NPE .. instantiating fields that are injected by the fxml is _wrong_ just as smithnblack explained in this answer ..
Comment: Hello, could you provide us with your fxml File? My guess is that you did not use fxml annotation properly in your fxml file and thats why you got NPE in your controller. As I stated in my first answer, just instantiate your columns in your fxml and use it in your controller... in your fxml file for every table column you shoud have something like this" fx:id="horaCol", etc. Look here: https://stackoverflow.com/a/30213067/2976876
Comment: @kleopatra I did track it, as I said, all the columns and tables are null, as soon as I try to use them the npe is thrown. The fxml file is right here https://github.com/Skwead/Agenda/blob/efbb594e1ce77fb1e721bc90b0429e719ec87aef/src/sample/resources/sample.fxml
Comment: well, then we have different meanings for track ;) The driving force must be to make your code work, right? The error you describe in your question (nothing visible) is introduced by instantiating fields that are injected via fxml: the injection overwrites the previously instantiated fields - that's what this answer correctly states. Repeating: it's __WRONG__ to instantiate injected field!!! Your _if I don't instantiate I get an NPE_ - simply means that something goes wrong with the injection (should work),  which you have to find (vs evading by instantiating the fields)
Comment: Alright, thanks for the advice concerning the code I should post. Regarding the problem itself, it seems then I should get back to the npe problem, since the solution I found is not the right one. Then, how would I solve it? As I explained in a comment to an answer here the column is not part of the table (since the debugger tells `horaTodoCol.getTableView().toString()` is null). This seems to be the big problem
Answer: you are also instantiating your tableview for the second time in the line 30 in your controller:
@FXML private TableView<SkEvent> todayTable = new TableView<>();

and also adding your columns to that 2nd tableView todayTable that are already instantiated in your fxml here:
todayTable.setItems(obsEvts);
todayTable.getColumns().addAll(horaTodoCol, estadoTodoCol ,tarefaTodoCol);
todayTable.getColumns().set(0, horaTodoCol);
todayTable.getColumns().set(2, tarefaTodoCol);

so, my suggestion would be:
remove all from your controller with new TableView<>() and new TableColumn<>() constructor calls and also this 3 lines in your code:
todayTable.getColumns().addAll(horaTodoCol, estadoTodoCol ,tarefaTodoCol);
todayTable.getColumns().set(0, horaTodoCol);
todayTable.getColumns().set(2, tarefaTodoCol);

Let me know if this helps!
Comment: I tried it, but removing the instanciations gives me the npe I already mentioned. I have 2 tables in the scene, todayTable and calendarTable are different, I've tryed to coment the other table and columns out, but nothing changed. I removed those 3 lines too, nothing changed.
Comment: Sorry for writing two comments in such a short period of time, but the previous one can no longer be edited by me. I think I might have figured out what the problem realy is, althought I still can't figure out how to solve it. `horaTodoCol.getTableView().toString()` throws a npe. Seems the columns are not assigned to the table, even thought they are in scene builder. I don't have that line on my code, I used it on the debugger to see if the column was ound to the table
Comment: please don't post 2 answers, edit the first and add more details as needed


How to write Unit test cases for Web hooks in c#?

Question: I have a web page which receives web hook request and i want to write Unit test cases (NUnit framework) for this web hook. I want to mock the web hook request (Post request) in unit test cases and pass the request headers and body as the Json data to the web page which receives request.
Web page name
/webhook/receiveWebHook.aspx

Request Headers
Content-Type: application/json
messageType: TestInsertNotification

Request Body (Json data)
{
   "Alias":"Test",
   "TransactionID":"123"
}

Code in web page:
protected void Page_Load(object sender, EventArgs e)
{
      if (HttpContext.Current.Request.HttpMethod.ToUpper() == "POST")
      {
           object notification = null;
           string message = string.Empty;

           Int32 pID = InsertHTTPRequest(HttpContext.Current.Request); //Generate id in DB

           if (pID > 0 && this.Request.ContentType == "application/json")
           {
                StreamReader sr = new StreamReader(this.Request.InputStream, this.Request.ContentEncoding);
                message = sr.ReadToEnd();
                TextReader content = new StreamReader(new MemoryStream(System.Text.ASCIIEncoding.ASCII.GetBytes(message)));
                JToken json = JToken.Load(new JsonTextReader(content));
                notification = new JsonSerializer().Deserialize(new JTokenReader(json), this.GetTypeOfMessage(HttpContext.Current.Request.Headers("MessageType")));
           }
            if (notification != null)
            {
                 if (notification is InsertNotification)
                 {
                      InsertNotification insertNotification = notification as InsertNotification;
                      DbInsertMethod(pID, message, insertNotification);
                 }
            }
      }
}

Can someone please help how to achieve unit testing for webhooks in c#?
Also, please suggest how to pass HTTP Post request from Unit test method with Header and body (containing Json data)?
P.S.: Currently i'm using Postman to test the functionality of this webhook.
Answer: Try to use RestSharp library. For your case it looks like this:
[TestFixture]
public class TestWebApp
{
    [Test]
    public void TestRequest()
    {
        IRestClient client = new RestClient($"{BaseUrl}/webhook/receiveWebHook.aspx");
        var request = new RestRequest(Method.POST);
        request.AddHeader("Content-Type", "application/json");
        request.AddHeader("messageType", "TestInsertNotification");
        JObject jObjectbody = new JObject();
        jObjectbody.Add("Alias", "Test");
        jObjectbody.Add("TransactionID", "123");
        request.AddParameter("application/json", jObjectbody, ParameterType.RequestBody);
        var response = client.Execute(request);
        Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
    }
}


Proof of $\mathrm{Gal}(K_1K_2K_3/K)\cong \mathrm{Gal}(K_1/K)\times \mathrm{Gal}(K_2/K)\times \mathrm{Gal}(K_3/K)$

Question: $\newcommand{\Gal}{\text{Gal}}$

Let $K_1/K$ and $K_2/K$ be two Galois extensions. I have a theorem that says that $K_1K_2/K$ is a Galois extension and if $K_1\cap K_2=K$ then $$\Gal(K_1K_2/K)\cong \Gal(K_1/K)\times \Gal(K_2/K).$$

I would like to generalize it for three extension fields, i.e.,

Let $K_1/K,K_2/K$ and $K_3/K$ be three Galois extensions. Then, $K_1K_2K_3/K$ is Galois and if $K_i\cap K_j=K$ for all $i\neq j$ then $$\Gal(K_1K_2K_3/K)\cong \Gal(K_1/K)\times \Gal(K_2/K)\times \Gal(K_3/K).$$

Now I tried to prove it using the first theorem below, but I can't conclude. The fact that $K_1K_2K_3/K$ is a Galois extension is obvious. But for the rest, I really have difficulties.
My idea was to set $L=K_1K_2$, and thus show that $$\Gal(LK_3/K)\cong \Gal(L/K)\times \Gal(K_3/K),$$
using the 1st theorem below, but I can't prove the $L\cap K_3=K$.
Any idea ?
Comment: You have to assume $K_i \cap (K_j K_r) = K$ for all $i \neq j \neq r$. For instance, consider $\mathbb Q(\sqrt 2), \mathbb Q(\sqrt 3)$ and $\mathbb Q(\sqrt 6)$.
Answer: In order to have the isomorphism$\newcommand{\Gal}{\text{Gal}}$
$$\Gal(K_1K_2K_3/K)\cong \Gal(K_1/K)\times \Gal(K_2/K)\times \Gal(K_3/K),$$
you have to assume that each $K_i$ is linearly independent not only to each $K_j$, but to each product $K_j K_r$ with $i \neq j \neq r$.
For instance, let consider $K_1 = \mathbb Q(\sqrt 2), K_2 = \mathbb Q(\sqrt 3)$ and $K_3 = \mathbb Q(\sqrt 6)$ : if you take any two of them, they have trivial intersection.
But $K_1K_2K_3 = \mathbb Q(\sqrt 2, \sqrt 3)$ ; therefore, $\Gal(K_1K_2K_3 / \mathbb Q)$ has cardinality 4, whereas $\Gal(K_1/\mathbb Q)\times \Gal(K_2/\mathbb Q)\times \Gal(K_3/\mathbb Q)$ has cardinality 8.
Let suppose $K_i \cap K_j K_r = K$ for all indices $i \neq j \neq r$. Then, as you already showed the case $n=2$ :
$$\Gal(K_1(K_2K_3) / K) \cong \Gal(K_1/K) \times \Gal(K_2K_3/K) \\ \cong \Gal(K_1/K)\times \Gal(K_2/K)\times \Gal(K_3/K)$$
Comment: Thank you for your response. As you present the thing, it looks like only $K_1\cap (K_2K_3)=K$ (and not $K_iK_j\cap K_r$ for all $i\neq j\neq r$. What do you think ?
Comment: I also used $K_2 \cap K_3 = K$ in the last isomorphism.


Which property do I use to align my logo with my navigation?

Question: I asked a related question a few minutes ago through which I got this updated code but I can't figure out how to get my logo to show up on the left hand side.
HTML:

Home

About

Contact

CSS:
 body {
 margin: 0;
 }
 header {
 background-color: #009000;
 height: 85px;
 position: relative;
 }
 #front {
 margin-left: 20px;
 margin-top: 20px;
 }
 nav {
 float: left;
 margin-top: 30px;
 }
 ul {
 margin: 0;
 padding: 0;
 float: left;
 }
 ul li {
 list-style-type: none;
 float: left;
 border-right: 2px solid black;
 padding-right: 5px;
 padding-left: 5px;
 }
 ul li.last {
 border-right: 0px;
 }
 #second_line {
 margin-top:10px;
 height:3px;
 background-color: #FECE2C;
 }

How do I fix this so that the logo is on the left not the right?
Thanks!
Answer: Try adding this to your stylesheet:
header > img {float:left;}

Comment: Clearing floats are hard to learn by reading, it is one of those things that come after a few times of doing it, a tip though is that if you are using floats, you should probably be using clear:both; at some point :)
Comment: Ah I see, try adding "line-height:30px;" to the ul li { }
Comment: How big your image in width px and height px?
Comment: 1538px x 288px but i am resizing it to 50px in the img tag.
Comment: try adding this before the "" ->
Comment: That last part worked.  I probably would have never guessed using that.  How do I learn this stuff the right way?
Comment: Btw I am trying to increase the size of the divider between the menu options but can't seem to find a way.  How can I achieve that?
Comment: ul li {
 border-right: 4px solid black;
 } - this will increase the width if that is what you mean - its currently: border-right: 2px solid black;
Comment: @danilel thakns for replying.  But i actually mean the length of the divider.
Comment: let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/20292/discussion-between-kpo-and-daniel)
Answer: You might try adjusting the  to inline-block:
nav {
    display: inline-block;
}

Example
Answer: demo
you just miss adding this style.
header img{float:left;}

Comment: I tried that before but doing that makes the logo aligned but the header then gets messed up.  Try using an image in your example as a logo and you'll see what i mean..
Comment: It still gives me the same issue.  The logo aligns but the header goes down.
Comment: You forgot to add the second_line in the html.


How to get autocomplete with CSS Framework in VS Code when you installed them via NPM and exclude the node_modules folder?

Question: For Example, if I want to get Bulma to my project via npm (recommended on the docs), I installed like this
npm install bulma

And the files located in node_modules. And that is where problems happen.
Normally, I have excluded that folder in VS code for better performance.
And 2 extensions to display autocomplete for CSS on VSCode is HTML/CSS support and Intellisense for CSS class names in HTML will not support CSS file in that hidden node_modules.
( thanks to @garyking on CSS files in folders excluded with files.exclude do not get parsed issue to point out this propblem )
Do we have any solution for this ?
Answer: My workaround are:
1: Show node_modules folder in VS Code again ( not good for performance as VSCode team said that )
2: Use this trick on VS Code setting.json:
  "files.exclude": {
    "**/node_modules/{[^b],?[^u],??[^l],???[^m]}*": true
  }

( more information, please check this issue VS Code - Exclude all files except for...


Xpath approach to use for multi tiered xml

Question: I have the following mock up XML. A tree with multi tiered ChildEntity elements and a Property value at the end.
<Root>
    <Family>
        <Guardian name="James">
            <EntityID>123</EntityID>
            <ChildEntity>
                <Name>Rita</Name>
                <ChildEntity>
                    <Name>Anna</Name>
                    <ChildEntity>
                        <Name>Tina</Name>
                        <ChildEntity>
                            <Name>Sally</Name>
                        <Property>
                            <ValueID>666</ValueID>
                        </Property>
                        </ChildEntity>
                    </ChildEntity>
                </ChildEntity>
            </ChildEntity>
        </Guardian>
        <Guardian name="Jake">
            <EntityID>234</EntityID>
            <ChildEntity>
                <Name>Anna</Name>
                <ChildEntity>
                    <Name>Isabel</Name>
                    <ChildEntity>
                        <Name>Tina</Name>
                        <ChildEntity>
                            <Name>Rita</Name>
                        <Property>
                            <ValueID>777</ValueID>
                        </Property>
                        </ChildEntity>
                    </ChildEntity>
                </ChildEntity>
            </ChildEntity>
        </Guardian>
        <Guardian name="Richard">
            <EntityID>456</EntityID>
            <ChildEntity>
                <Name>Michelle</Name>
                <ChildEntity>
                    <Name>Sally</Name>
                    <ChildEntity>
                        <Name>Tina</Name>
                        <ChildEntity>
                            <Name>Anna</Name>
                        <Property>
                            <ValueID>888</ValueID>
                        </Property>
                        </ChildEntity>
                    </ChildEntity>
                </ChildEntity>
            </ChildEntity>
        </Guardian>
    </Family>
</Root>

Based on the sequence (i.e parent-child relation) provided for Child Entity I have to derive the Property/ValueID text().
For example, if the input sequence is (Anna, Tina) - Anna being the parent, Tina the Child - I have to identify the node which has this sequence and then derive the property value. In above example it will be value 666 expected.
The input is dynamic in nature such that the it could be parent, sub-parent, child (i.e. 3 entities).
In such circumstances, I wanted to seek your advice as to what is the best approach to solve this problem?
The way I am thinking is iterative,
STEP1: I start with Parent entity and get all nodes which has this entity
STEP2: Of the nodes selected in step1, check where i have the child entity
Is this an efficient approach? Is there any other better way to handling this?
Can a single Xpath query give me the desired result considering the dynamic nature of the input?
Your inputs much appreciated.
Answer: Its difficult as you are saying you have a variable input. However in the general case your XPath will look like either of these:
/ChildEntity[Name="$parent"]/ChildEntity[Name="$child"]/Property/ValueID/text()
/ChildEntity[Name="$parent"]/ChildEntity[Name="$sub-parent"]/ChildEntity[Name="$child"]/Property/ValueID/text()

Unfortunately, XPath is a query language, and it can't make its own queries. But looking at the general pattern above, in pseudocode you'd want to do something like this:
List input; //e.g. ['Anna','Tina'] -> '666' or ['Anna','Isabel','Tina'] -> '777'
query = "";
for person in input {
    query = query + "/ChildEntity[Name='{person}']"; //Assuming some string formatting
}
query = query + "/Property/ValueID/text()";
document.xpath(query);


How to upload file from my iphone application to user own dropbox?

Question: I had created an iphone application witch can generate a pdf file when the user use the application.
how can the user have the option to sent the pdf file to his own dropbox?
I had tryed with dropbox examples: where i can make an api and upload to my own dropbox.
But it's not what i want.
I want my application to do so: when the user generates a pdf file, so the login box of dropbox apear so he can log in and upload the file automaticaly to his own dropbox.
I have google it, but i did't get any examples including this solution.
Please help me if you can.
Comment: However, at the beginning of the document it reads "Now that you've gotten the SDK building with your project, the next step is to integrate it into your app, allowing users to link their Dropbox accounts to your app" That's the usual behavior to expect, I'm confused now. Maybe you should take a look [here](https://github.com/search?q=dropbox&p=1&ref=searchbar&type=Repositories&l=Objective-C) to see working projects
Comment: Follow this example:[Authenticating iOS](https://www.dropbox.com/developers/start/authentication#ios) Also take a look at the [Dropbox tutorial for developers](https://www.dropbox.com/developers/start/core)
Comment: I had already tryed it. But no success, as i wrote i my question. Thanks
Comment: You're right, my fault. As the tutorial says, " Make sure you are logged in using the same email address you used to create the app keys." I'm looking for a better solution
Answer: Have you looked at this blog post that i think describes what you are looking for.
http://www.drdobbs.com/tools/working-with-dropbox/232600482?pgno=1
Comment: Hi @Djo have you solved this issue with this tutorial or any other? thanks in advance!


Can I skim coat a painted interior concrete block wall? If so, with what & how?

Question: Can I skim coat a painted interior concrete block wall?  If so:

What can I use to prepare the wall?
What material should I use (joint compound, plaster, other)?

All DIY so simpler the better.
Comment: What are you trying to achieve?
Comment: @Tester101 -- Just a finished looking wall.
Answer: Is the wall dry? is the paint in good condition? If it is dry you could use joint compound. If the paint is pealing it would need to be scraped first. I like using mortar on block walls because it holds up to moisture better than joint compound but have not used on painted block. Some don't like mortar because the sand is very rough even after painting.
Comment: roughing up the paint will improve adhesion. Usually block that is painted still has enough small pits to hold joint compound quite well. Clean and free from dust and grease is the biggest thing to work on.
Comment: Fully interior block wall.  Dry.  Paint in good condition. No pealing at all.  Do you think I need any prep coat before joint compound?
Comment: +1 - if it's an above ground exterior wall, in good shape - wash it really good, prime it, and skim away. Just keep your coats thin, to help "screed" successive coats, in order to minimize sanding. Use a WIDE knife. You may also find yourself knocking down mortar lumps, with a hammer.
Answer: Why not simply glue 1/4 inch drywall to the block and just compound the joints? A few concrete screws can be used to hold the drywall in place until the glue dries, or just use a few 2x4s horizontally across the middle with an angled brace to the floor until the glue sets.
Comment: This is worth considering, especially if we're talking about a relatively large wall. Full skim coating is tricky and it takes some practice (and a lot of sanding) to get a decent result. This approach would reduce the amount of mudding/sanding needed overall, and the 1/4" with glue would be well supported on a block wall.
Answer: Just wrap a layer of 48" fiberglass stucco mesh (I would use 2 ounce mesh) across the whole face and mud away.  It goes pretty quick and it will be good and strong so it doesn't crack over time.
Answer: The simplest solution to get a smooth wall is to attach furring strips to the concrete and then drywall to that. You'll spend a fraction of the time and have a much better resulting look than trying to skim coat the entire wall and hoping for good adhesion. If this is a basement with the potential for moisture, then make sure to use materials that will not mold (they make special paperless drywall for that).
Comment: Unfortunately, no room for furring strips and sheetrock.  Not a basement.  No moisture problems.


How do I shut down power on my standalone generator so it doesn't backfeed while I put a 100 Amp panel in my polebarn?

Question: Hello to all of you folks this is probably going to sound like a stupid question and I'm kind of feeling stupid for asking it but I need to know??
Ok my dad has a stand alone generator and what I need to know is how I disable it from coming on while i'm putting a 100 amp panel in place of the old fuse box that is currently in his tool shed?? Thanks so much.
Comment: The off position of the main switch of the generator should be fixed using a padlock.
Comment: Usually the generator has a switch of some kind. Mine has a three position switch. The positions are on, off and automatic. If I turn it to "off," it will not turn on, no matter what. The generator may also have a separate breaker somewhere that disconnects the output from all load. If you aren't sure, try to get an electrician to take a look at it. Also, check the panel with a voltmeter before you start working on it. Make sure nothing is hot.
Comment: If in doubt, drain the fuel off and run the generator until it stops.
Comment: @AndyAka - I certainly wouldn't trust that on an auto-start generator, cranking the engine by the starter may be enough to energize the panel. And even if you ran it out of fuel, you don't know if maybe there's just enough fuel left in hoses to give another few seconds of runtime, enough to kill you. If you want to disconnect the generator from the panel for safety, then disconnect it (and ideally lock or tag it off so someone trying to turn on the lights doesn't turn it back on)
Answer: Disconnect the starting battery cable on the generator. Leave a sign informing others not to reconnect it without your permission. You could even take the battery away to be extra safe.
Answer: There's nothing stupid about this.  Mains electrical is serious business, and is a craft entirely separate from EE.  (No offense but nobody thinks putting gas in their weedwacker qualifies them to drive a gasoline truck.)  So when dealing with mains electrical, bring your best game, a good "homeowner fix-it" guidebook, and a willingness to think different - because everything is different!
While there is much good advice here on how to disable the generator mechanically, I would also look for a way to disconnect it electrically.  For instance, a proper generator interlock prevents both utility supply and generator from both being turned on at the same time -- but does allow both to be turned off.  E.G. in this dog-simple example: Both supply-main breakers are faced opposite: inward is on.  Left breaker is off, right is on, and the interlock allows the right one to be turned off.

src
Speaking of that, this is also a good time to make sure that the generator is installed to Code.  A huge number of generators aren't.
Answer: Typically:
Set control to manual, or press the emergency stop.
Disconnect the starter relay.
Disconnect (and lock) the circuit breaker.
Apply sign: "Maintenance lockout! Label only to be removed by Araho [phone number]".
Not all of them might be applicable to your generator.
Answer: The easiest way, if it's gas (i.e. not diesel) is to simply pull the boots off the spark plug.  If it's more than one cylinder, LABEL THEM!


Embedded image shrinking in email clients like Outlook

Question: I'm trying to embed an image in an email compatible HTML file.
Instead of adding the image URL, which can pose a security threat, I'm embedding the image in the  tag used in the HTML file.

The image which I embed seems to reduce to 80% of it's original size in the email client. Following is a screenshot of the how the file looks in a browser :
HTML file when viewed in a browser

Following is a screenshot of the how the file looks in an email client (Outlook for Office 365) :
HTML file when viewed in an email client

As you can see the image seems to shrink in the email client. The dimension are given below:
Original     : 800px X 600px
Email client : 640px X 480px

Width  = 800 x 0.8 = 640px
Height = 600 x 0.8 = 480px

Can someone please suggest how to fit the image in a container? And why the image is shrinking in Outlook?
You can refer this HTML file :
Google Drive : https://drive.google.com/open?id=1Me70-HIkLAB__BY_skOhyBXKDZj3lKVc
JSFiddle     : http://jsfiddle.net/jv16m794
Thank you in advance!
Comment: @Digital_Frankenstein  I've added the HTML code in the below Fiddle:

https://jsfiddle.net/jv16m794/
Comment: Can you supply the actual HTML you're using to display this image? We need to see the width properties you're setting which could be amended to stop this. But this is a potential fix. We can't promise anything without seeing any code.
Comment: Sorry, I should clarify... Can you provide your HTML in a code editor like Codepen or JSFiddle? Google domains are blocked by many corporate firewalls, mine included.
Comment: Hi Aman, has the fix I provided below helped at all? Keen to find out if that fixes your issue.
Comment: Hi @Digital_Frankenstein . The solution provided by you worked perfectly. Thank you.
Answer: I've tested this in Litmus and I'm only seeing this issue in 120dpi screen zoom versions of Outlook.
Here is an article going through the 120dpi screen settings and how it affects email - https://www.emailonacid.com/blog/article/email-development/dpi_scaling_in_outlook_2007-2013/
I've tested a couple of things and found the fix.
Amend the head of your email with this:

<!DOCTYPE html>

      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Comment: Thank you for the solution @Digital_Frankenstein
It worked perfectly for the sample which I had provided.
However, there were minor issues with some of the scenarios so I went on with content ID (cid) for images in the email HTMLs.
Comment: Thank you! This is top answer! It's works!


Wet HVAC condenser

Question: I'm in the process of having a Mitsubishi mini split system installed. The electrician wired the condenser and didn't put the cover back on leaving all the electronics exposed to a torrential all night downpour. Will this be ok or should I make them replace the condenser? Thanks
Comment: On the systems I have worked on the boards have a protective coating that prevents moisture from being a problem. If you are concerned take some photos. Mention it to the tech I doubt they would replace them, however if something did happen to go wrong you have evidence to support any claim.
Comment: Was the power on?  That usually is what causes the problems.  If power was off, leave off till everything is dry, if possible have a small fan blowing air for a day or two.
Answer: If it's being installed by approved Mitsubishi contractors, it's under warranty, so if it fails due to the rain exposure that's on them. [ If they are not approved Mitsubishi contractors, it's still on them, but more of a pain since you're dealing with the contractor standing behind their work, as opposed to the manufacturer standing behind the product and approved installation. ]
You don't need to make them replace it "on suspicion." It will be fine, or not.
Given that they operate in fog, etc. and end up wet inside, likely not as much of an issue as you're thinking, though sounds like somewhat sloppy workmanship to not put the cover back on.
Comment: Contact them, if they ignore you, then you could get there attention by posting photos on social media.

Wet HVAC condenser


Add Object to an Array with a Form in React

Question: I am trying to have a form on my react site that someone can fill out and it would add a new item in my list. I am trying to do this using "react-hook-form" which seems easy to setup and work with. It does capture the information when I console.log and check. I am trying to now add that to my array.
App.js (In this file I have the array withe objects along with my component  I have passed in the props.
import { useState } from 'react';
import './App.css';
import HeroeList from './HeroeList';
import NavBar from './NavBar';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import AddHero from './AddHero';
import HeroDetail from './HeroDetail';

function App() {
  const [heroes, setHeroes] = useState([
    { heroName: 'Superman', pic: 'https://cosmicbook.news/sites/default/files/henry-cavill-justice-league-brhv.jpg', powers: 'Flight, Speed, Strength', bio: 'Superman was born on the planet Krypton and was given the name Kal-El at birth. As a baby, his parents sent him to Earth in a small spaceship moments before Krypton was destroyed in a natural cataclysm', id: 1 },
    { heroName: 'Flash', pic:'https://hdqwalls.com/wallpapers/flash-justice-league-unite-2017-on.jpg', powers: 'Super Speed, Time Travel', bio: 'Barry Allen is The Flash, the fastest man alive. Using his super-speed powers, he taps into the Speed Force and becomes a costumed crime-fighter', id: 2},
    { heroName: 'Wonder-Women', pic:'https://images.hdqwalls.com/download/justice-league-wonder-woman-2018-yy-1080x2160.jpg', powers: 'Strength, Speed, Lasso of truth', bio: 'Wonder Woman is the princess Diana, the daughter of Hippolyta, Queen of the Amazons and Zeus, the mightiest of the Gods of Olympus.', id: 3},
    { heroName: 'Batman',pic:'https://images.hdqwalls.com/download/batman-justice-league-unite-2017-qu-720x1280.jpg', powers: 'Super intelligence', bio:'Batman is the superhero protector of Gotham City, a tortured, brooding vigilante dressed as a sort of human bat who fights against evil and strikes fear into the hearts of criminals everywhere.', id: 4}
  ])
  return (
    <Router>

        <NavBar />
        <Switch>
          <Route exact path="/">
            <HeroeList heroes={heroes}/>
          </Route>
          <Route path="/AddHero">
            <AddHero heroes={heroes} setHeroes={setHeroes}/>
          </Route>
          <Route path="/HeroDetail/:id">
            <HeroDetail heroes={heroes}/>
          </Route>
        </Switch>

    </Router>
  );
}

export default App;

AddHero.js (In this file I have my form setup with userForm())
import { useState } from "react";
import { useForm } from "react-hook-form";

const AddHero = (setHeroes, heroes) => {

    const {register, handleSubmit, errors} = useForm()

    const onSubmit = (data) => {
        setHeroes(heroes => [...heroes, data])
        console.log(data)

    }

    return (
        <form onSubmit={handleSubmit(onSubmit)}>
                Hero Name:
                <input type="text" name="HeroName" placeholder="Hero-Name" ref={register}/>
                Hero Powers:
                <input type="text" name="HeroPower" placeholder="Hero-Power" ref={register}/>
                Hero Bio:
                <textarea type="text"/>
                <input type="submit"/>
        </form>
     );
}

export default AddHero;

I am trying to use useState to set the the new object in the array. I am getting an error.
Uncaught (in promise) TypeError: setHeroes is not a function
Answer: In Line 4 of AddHero.js, you are doing:
const AddHero = (setHeroes, heroes) => {

However, setHeros and heroes are not being passed into the component. Instead, the props object is. To fix this, simply wrap setHeroes, heroes in curly braces:
const AddHero = ({ setHeroes, heroes }) => {

Edit:
I also noticed that your onSubmit is using the return value of a function instead of binding to that function.
<form onSubmit={handleSubmit(onSubmit)}>

This should be a function:
<form onSubmit={() => handleSubmit(onSubmit)}>

Comment: Thanks the above worked with the exception of binding to the function part. I the changes and consoled logged the correct data and also was captured in the array now.


Why does Calamity Ganon have Daruk's Protection?

Question: In the cut scenes for Mipha, Daruk, and Revali, it is made clear that each of their respective powers (healing, protection, upwards draft) is an ability unique to them (if not genetic as Daruk's offspring also have his ability of protection). When clearing the Divine Beasts their spirits transfer these gifts to you (i.e. they are willfully given).
So how come, when facing Calamity Ganon, he has the ability of Daruk's Protection? Yes he has other elemental abilities, but he displays none of the other Champions' powers.
Comment: A question must make sense without spoiler tags.  As there's no question here without what was in the spoilers, I have removed them.  Here at Arqade, we don't dance around questions; just ask them.
Comment: Welcome on Arqade! I took the liberty to reformat your question to further prevent spoilers, feel free to revert. (I struggled a bit, the spoilers syntax does weird things)
Comment: Okay, I guess you're right. Sorry!
Answer: Seeing that he doesnt have the other 3, it would seem that this is not Daruks protection.
It might be a similar ability,  but its probably not the same thing.
Comment: @SumNeuron For UX reasons -- the player would immediately recognise the effect and understand what it does. If you made an effect that was functionally identical but visually completely different, it would confuse them. One possible alternative is to give ganon's the same visual effect but just recolor it, but I guess orange is pretty much his themed color in that fight, so
Comment: It has the same coloration and stylistic effects as Daruk's protection as well as in game effect (perfect guard). I get it if they were just trying to make Ganon harder (because lets face it, he was ridiculously easy in this game), but then why use the same effects which the game so very firmly ties to Daruk's protection?
Comment: So on a gameplay perspective, it is the same thing. In a lore perspective, it isn't. NOBODY PAGE MATPAT ON THIS. You know he will make a Game Theory about this.
Answer: Calamity Ganon is inheriting certain Abilities from the Blight Bosses

 inside the Divine Beasts which all seem to share Abilities of the Champion counterparts in a similar fashion.

For example the shield he gets during his second phase seems near identical (with the exception of immunity to bombs which is changed to his own laser amongst ) with the ability that

Fireblight Ganon uses in his second Phase of the fight. which blocks off nearly any damage inflicked to him with only very little weaknesses to pass the shield.
Comment: I don't think that is necessarily true... For example for the water based one that Ganon mini-boss stays strictly above water and throws water based projections - things we have not seen any Zora do. Mipha was that beasts champion and the blight boss never healed itself... If anything the only connection was that the beast was weak to electricity. As for Fireblight Ganon's shield that was a flame barrier produced as he made the mini meteor (hence the wind guest) which we see none of in the final fight against Ganon (in relation to his shield, although there still is the meteor)
Comment: The Water based Boss necessarily had the least common aspects in comparison with Mipha, with  the exception of using a spear like she did. But The ice abilities do have a lore-based explanation with the freezing of Zoras Domain. The shield that Ganon uses uses the same orb at the beginning as Daruks Boss does, only to be active immediately, and without the need of a dodongo inhale buffer.
Comment: Waterblight's ice cube ability is identical to Vah Ruta's. To me it seems like the Blights mimick the Champion's preferred weapon type, but the Divine Beast's ability.
Answer: Calamity Ganon has a few of the same abilities as the Fireblight Ganon and WaterBlight Ganon inside the Divine Beasts. To make this a fact is because Calamity Ganon uses the fire shield and uses a fire blade the same as FireBight Ganon, and he throws a huge spear like WaterBlight Ganon.


If two closed plane curves are outside each other, can there be a point inside both of them?

Question: I think this recent
question (also here)
has a quick answer if the conjecture below is true.
It looks "obviously" true, but I've learned to distrust my judgement
in such matters.  It also looks as if it should have an "obvious" proof,
but I'm having no ideas.
Definitions
Let $[a, b]$ be any compact interval in $\mathbb{R}$. For any
continuous function $\gamma \colon [a, b] \to \mathbb{C}$, denote
the connected, compact set of points $\{\gamma(t) : a \leqslant t \leqslant b\}$
by $[\gamma]$. Define $r(t) = |\gamma(t)|$ ($a \leqslant t \leqslant b$).
By Theorem 7.2.1 of A. F. Beardon, Complex Analysis (Wiley, Chichester 1979),
there exists a branch of $\operatorname{Arg}\gamma$ on $[a, b]$, i.e.
a continuous function $\theta \colon [a, b] \to \mathbb{R}$ such that
$\gamma(t) = r(t)e^{i\theta(t)}$ ($a \leqslant t \leqslant b$).
Quoting from the same reference:

Definition 7.2.1
  Let $\gamma \colon [a, b] \to \mathbb{C}$ be any curve and suppose
  that $w \notin [\gamma]$. We define the index $n(\gamma, w)$ of
  $\gamma$ about $w$ by
  $$
n(\gamma, w) = \frac{\theta(b) - \theta(a)}{2\pi},
$$
  where $\theta$ is any branch of $\operatorname{Arg}(\gamma - w)$ on
  $[a, b]$. If $\gamma$ is closed then $n(\gamma, w)$ is an integer.
The index $n(\gamma, w)$ is sometimes called the winding number
  of $\gamma$ about $w$, for it represents the number of times
  that a point $z$ moves around $w$ as it moves from $\gamma(a)$ to
  $\gamma(b)$ along $\gamma$. [...]
The index can be used to clarify the difficult question of what is
  meant by the 'inside' and 'outside' of a closed curve $\gamma$. We
  shall say
(a) that $z$ is inside $\gamma$ if $z \notin [\gamma]$ and
  $n(\gamma, z) \ne 0$,
(b) that $z$ is on $\gamma$ if $z \in [\gamma]$, and
(c) that $z$ is outside $\gamma$ if $z \notin [\gamma]$ and
  $n(\gamma, z) = 0$.
[...] Observe that [...] the outside of $\gamma$, say $O(\gamma)$,
  is the union of those components of $\mathbb{C} \setminus [\gamma]$
  on which the index is zero.  Thus $O(\gamma)$ is an open set.
  Further [...] $O(\gamma)$ contains the complement of some closed disc.
  If we denote the inside of $\gamma$ by $I(\gamma)$, then
  $$
\mathbb{C} \setminus O(\gamma) = [\gamma] \cup I(\gamma),
$$
and so the set of points which lie inside or on $\gamma$ is a compact set.

Conjecture

For closed curves $\sigma$ and $\tau$,
  if $[\sigma] \subset O(\tau)$ and $[\tau] \subset O(\sigma)$, then
  $I(\sigma) \subset O(\tau)$.

Because the premise $[\tau] \subset O(\sigma)$ implies
$I(\sigma) \cap [\tau] = \emptyset$, the conclusion can be expressed
symmetrically as $I(\sigma) \cap I(\tau) = \emptyset$ - whence the
title of the question.
Comment: Hint: (1) $I(\sigma)$ is contained in the same connected component of $R^2- [\tau]$ as $[\sigma]$. (2) Winding number with respect to $\tau$ is constant on connected components of $R^2- [\tau]$.
Comment: Your title has me scratching my head. Do you have a picture of the situation you're describing?
Comment: @MoisheCohen I like the hint - thank you! (I'm still working on it. I just got out of bed, having posted the question at bedtime. I may need coffee, but I don't expect to need further hints.)
Comment: @Lubin I was hoping for smiles, rather than scratched heads! The puzzlingly paradoxical quality of the title is a consequence of the conjecture seeming so utterly "obvious". As the situation described seems in fact to be impossible - as I'd hoped - I can't draw a picture of it. That would need a stronger drug than coffee. :)
Comment: @MoisheCohen I wouldn't be surprised to learn that I've made an unnecessarily laboured use of your hint. In that case, I would be grateful (I mean, even *more* grateful!) if you would post an expanded version of it as an answer - which I would then almost certainly accept.
Answer: (Thanks to Moishe Cohen for his very helpful hint. He is not to blame for the use I have made of it, however!)

Lemma If $E$ is a connected, closed subset of a connected, normal topological space $X$, and $G$ is a connected component of $X \setminus E$, then $G \cup E$ is connected.

Proof Define $H = \overline{G} \cap E$.
If $H = \emptyset$, then $\overline{G}, E$ are disjoint closed subsets of $X$, whence there exist disjoint open subsets $U, V$ of $X$ such that $\overline{G} \subseteq U$ and $E \subseteq V$. We cannot have $U = \overline{G}$, because then $U$ would be a closed, open, non-empty proper subset of $X$, so $X$ would be disconnected, contrary to hypothesis. On the other hand, we cannot have $U \ne \overline{G}$, because then $G$ would be properly contained in the open subset $U$ of $X \setminus E$, contrary to its definition.
Therefore, $H \ne \emptyset$.
We have $G \subseteq G \cup H \subseteq \overline{G}$, therefore $G \cup H$ is connected.
Also, $(G \cup H) \cap E = H \ne \emptyset$.
Since $G \cup H$ and $E$ are both connected, it follows that their union $(G \cup H) \cup E = G \cup E$ is connected. $\square$

Corollary The union of $E$ with any collection of connected components of $X \setminus E$ is connected. $\square$
Proposition If $\sigma$ is a closed curve in $\mathbb{C}$, then $[\sigma] \cup I(\sigma)$ is connected.

Proof Let $z, w \in \mathbb{C}$. If $z \in I(\sigma)$, then by definition $n(\sigma, z) \ne 0$. If $z, w$ are in the same connected component of $\mathbb{C} \setminus [\sigma]$, then $n(\sigma, w) = n(\sigma, z) \ne 0$, whence $w \in I(\sigma)$. Therefore, $I(\sigma)$ is a union of connected components of $\mathbb{C} \setminus [\sigma]$. The result now follows from the above corollary. $\square$

Theorem For closed curves $\sigma$ and $\tau$ in $\mathbb{C}$,
if $[\sigma] \subset O(\tau)$ and $[\tau] \subset O(\sigma)$ then
$I(\sigma) \subset O(\tau)$.

Proof Because $[\tau] \subset O(\sigma)$, we have $I(\sigma) \subseteq \mathbb{C} \setminus [\tau]$, therefore $[\sigma] \cup I(\sigma) \subseteq \mathbb{C} \setminus [\tau]$.
It follows that the connected set $[\sigma] \cup I(\sigma)$ is contained in the same
connected component of $\mathbb{C} \setminus [\tau]$ as $[\sigma]$. By hypothesis, this
component is a subset of $O(\tau)$, whence $I(\sigma) \subset O(\tau)$. $\square$
Comment: What you wrote is just fine (I have to say, when I wrote the hints, I did not think about the degree of generality in which the argument works and only thought about subsets of $R^n$). I think you should just accept your own answer.
Comment: I wanted to make sure I understood. I hadn't grasped that $[\gamma]\cup I(\gamma)$ was connected. (I'm especially distrustful of my intuition at the moment, because I made several silly mistakes working on the problem in the questions referred to - fortunately I didn't post an answer, but I'm working on one now, with renewed confidence.) That's why your hint was so valuable. And it's been a good exercise for my rusty old brain (45 years after attending some topology lectures, although I've tried to top up my knowledge since), having to work the thing out, instead of having it all handed to me.
Comment: You are welcome. :)


Retrieve at least certain amount of records from mySQL

Question: What's the best way of telling mySQL to fetch a minimum number of records?
Say I have a products table, and I need to return at LEAST 5 items to fit the website design.
I could easily write something like:
SELECT *
FROM products
WHERE featured = true;

But if this returned only 3 results, what would be the best way to return an additional 2 products from the DB? I was thinking perhaps a UNION join with a query to return a couple of random products. Does anyone have any further suggestions?
Comment: In the absence of further information, a UNION is a good way to do this.
Answer: You could use ORDER BY + LIMIT to achieve that effect:
Given that dataset:
mysql> SELECT * FROM P;
+--------+----------+
| name   | featured |
+--------+----------+
| Apple  |        1 |
| Pear   |        1 |
| Orange |        1 |
| Lime   |        0 |
| Turnip |        0 |
| Salad  |        0 |
+--------+----------+
6 rows in set (0.00 sec)

As you see, not enough "featured" products:
mysql> SELECT * FROM P WHERE featured = true LIMIT 5;
+--------+----------+
| name   | featured |
+--------+----------+
| Apple  |        1 |
| Pear   |        1 |
| Orange |        1 |
+--------+----------+
3 rows in set (0.00 se

But by ordering to retrieve first featured, then complete up to the limit with non featured product, you have what you want:
mysql> SELECT * FROM P ORDER BY featured DESC LIMIT 5;
+--------+----------+
| name   | featured |
+--------+----------+
| Apple  |        1 |
| Pear   |        1 |
| Orange |        1 |
| Lime   |        0 |
| Turnip |        0 |
+--------+----------+
5 rows in set (0.00 sec)


how to insert custom images and html in wordpress

Question: I'm creating a new WordPress Theme and I want a media folder to contain some images that are not considered to be posts.
e.g. themes/theme-name/media/sampleIMG.jpg
adding

in my theme folders index.php leads to an 404 error code output because apparently my local apache server is requesting that file from a different directory:
/html/media/sampleIMG.jpg
What am I doing wrong?
Answer: <img src="<?php echo get_stylesheet_directory_uri();?>/assets/images/logo.svg" alt="" class="svg logo">

Answer: Using get_template_directory_uri() to link a static image with its correct path in html :
<img src="<?php echo get_template_directory_uri(); ?>/media/sampleIMG.jpg"  alt="theme logo" />

Note: get_template_directory_uri() return absolute path to the
  directory of the current theme.


How to loop through an array containing objects and do comparison

Question: I am using ionic 4. I get the result from the API then get the result show like this
[
 {"name":John,"age":20},
 {"name":Peter,"age":35},
 {"name":Alex,"age":15}
]

But I want to get the name only to check whether have same name with my condition or not. But I cannot straight a way get the result from the API, I need to hard code to do comparison. Here is my code:
 this.http.get(SERVER_URL).subscribe((res) => {
      const data = [
        { name: John, age: 21 },
        { name: Thomas, age: 25 },
    ];

      const ppl= data.find(people=> people.name === 'alex');
      console.log(ppl);
  });

So, My first question is How to get the name from the API directly, not like now I hard code the result from API. My Second Question is when I do comparison I want to show the result 'already exist' or 'can use this name'. Because if I write my code like this I will get the error Type 'void' is not assignable to type 'boolean':
const ppl= data.find((people)=> {
 if(people.name === 'alex') {
   this.text = 'already exist'
  } else {
  this.text = 'can use this name'
  }});
  console.log(ppl);

Anyone can help me? Thank you very much
Comment: What data are you sending to the API? The name that the user is trying to get? Why aren't you using the response `res`? Where are you defining the variable `people`? What does it refer to?
Comment: Thank you for you reply, I do not send data to API. I want to get data from API. I defining the variable people is I want to try the code. Can delete one.
Comment: What are you requesting from the API? Are you getting all the usernames that exist, like `api.example.com/names` , or are you sending the username entered by the user to filter? Like `api.example.com/names?search=alex`. If you are requesting **all** the usernames, besides increasing traffic, you are going to have to deal with paginating the results.
Comment: api.example.com only, then will output all result, like the image I show
Comment: The image you showed of the server response shows an array, but your comment in my answer says that the server response is an object, please edit that and confirm which one is correct.
Comment: I already copy my response and edit at question. I check the type of res is show object
Comment: Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/197112/discussion-between-raul-sauco-and-qing).
Answer: Instead of defining data, use the contents of the response; res will have the exact same contents that you are declaring in data.
this.http.get(SERVER_URL).subscribe(res => {

  // If successful, res is an array with user data like the following
  // [
  //   {name: "John", age: 21},
  //   {name: "Thomas", age: 25},
  //   ...
  // ]

  if (res.find(user => user.name === 'alex')) {
    console.log ('Username has been taken');
  } else {
    console.log('Username is available');
  }

});

Taken from the MDN docs on Array.prototype.find():

The find() method returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned.

In that case
res.find(user => user.name === 'alex')

will return a user object if any of the usernames match alex, or undefined if none of the user.name attributes match alex.
undefined evaluates to false and a user object evaluates to true in the conditional.
Keep in mind that you are comparing strings with ===, so, for example, Alex will not match alex, if you want to look into other ways to compare strings, have a look at this question.
You also might want to handle errors, how you handle them is up to you, and it will depend on the response, but you can access the error inside your subscribe like this:
this.http.get(SERVER_URL).subscribe(res => {

  if (res.find(user => user.name === 'alex')) {
    console.log ('Username has been taken');
  } else {
    console.log('Username is available');
  }

}, error => {

  console.log(error);

}, () => {
  // There is also a 'complete' handler that triggers in both cases
});

Edit. API returns Object not array
If your API returns an Object instead of an array like in your question, you can still iterate over the properties
this.http.get(SERVER_URL).subscribe(res => {

  // If successful, res is an array with user data like the following
  // {
  //   key1: {name: "John", age: 21},
  //   key2: {name: "Thomas", age: 25},
  //   ...
  // }

  let match = false;

  Object.keys(res).forEach(key => {

    if (res[key].name === 'alex') {
      match = true;
    }

  });

  if (match) {
    console.log ('Username has been taken');
  } else {
    console.log('Username is available');
  }

});

Instead of Object.keys() you could use Object.values() to get an array with user objects, then use find() as before, but that seems less efficient, something like this:
if (Object.values(res).find(user => user.name === 'alex')) {
    console.log ('Username has been taken');
  } else {
    console.log('Username is available');
}

Comment: thank you for your reply. I get the error 'Property 'find' does not exist on type 'Object'.
Comment: Then the API is not returning what you said, could you confirm what the API response is and make it clear in your question? Please, add the response as text and not as an image.


arguments not applicable

Question: i have this line in my DataDisplay.java to show the data in the database, and i am displaying it into a TextView. but it have this error saying "The method getAllDeals in type DBAdaptor is not applicable for the arguments (TextView, TextView, TextView, TextView, TextView, TextView, TableRow". may someone be kind enough to explain why?
dbAdaptor.getAllDeals(idView, shopView, dealView, locationView, websiteView, categoryView, row );

this is my getAllDeals portion in DBAdaptor
public Cursor getAllDeals()
{
    return db.query(DATABASE_TABLE, new String [] {KEY_SHOP, KEY_DEAL, KEY_LOCATION, KEY_WEBSITE,
            KEY_CATEGORY}, null, null, null, null, null);
}

Answer: You need to accept those arguments in your getAllDeals() function
Answer: Your method does not have any parameters.
From
public Cursor getAllDeals()

To
public Cursor getAllDeals(TextView idView, TextView shopView, etc ...)

Comment: there will be error for my cursor = dbAdaptor.getAllDeals(); , do i have to change to cursor = dbAdaptor.getAllDeals(title, title, title, title, title, title, rowTitle); ?
Comment: Why would you have title there 6 times? Have you ever programmed in Java before?
Answer: You need to change the method declaration in your db adapter to:
getAllDeals(idView, shopView, dealView, locationView, websiteView, categoryView, row );

In your case the Method declaration and method call have different parameters.

arguments not applicable