Free fall around Earth

Question: Is it a necessary condition that a satellite must be given an initial perpendicular velocity so as to make it orbit around the Earth? Will it go into orbit if dropped with zero initial velocity?
Comment: Perpendicular to what? Perpendicular is not a uniquely-defined direction.
Comment: So the satellite is just popped into space, with no velocity, somewhat near Earth?
Comment: There's a range of initial velocities that orbit, and a range that have orbits that intersect the Earth's surface, and a range of velocities that just... vanish off into the distance.
Comment: This answer tells you why you need a tangential component of velocity for something to orbit: http://physics.stackexchange.com/questions/312492/is-the-moon-in-a-freefall-around-the-earth/312514#312514
Answer: For an earth/satellite system (i.e. ignoring any other bodies), there is only one force: the gravitational force between earth and satellite. This force is always directed between the centres of mass of the bodies. In this case that means it is directed towards the earth's centre.
If a satellite has no tangential motion (if you just "place" it at a point near the earth) then gravity will cause it to accelerate directly towards the centre of the earth. In other words, it will fall straight down to earth.
To make the satellite stay in orbit, you must give it sufficient horizontal velocity so it always "falls past the edge of the earth". The example that Newton used is a cannon. When we fire it horizontally, the cannonball moves at a fixed horizontal speed (ignoring air friction). At the same time it accelerates towards the earth's centre. The result is that it travels along a parabola until it hits the ground.
If we use more gunpowder, the ball will go faster and fly further. As we keep shooting it faster and faster, eventually we will get to a speed of about $7.7 km/s$ at which point the ball will fly so far that it goes right around the earth. The ball is then "in orbit" and can keep flying around forever - always ignoring air resistance.
To recapitulate, without horizontal velocity the satellite will fall straight down. The faster it moves horizontally, the further it will fly before it hits. Only at $7.7 km/s$ (orbital speed) or higher will it stay in orbit.
If the speed increases above $11.2 km/s$ then earth's gravity is no longer able to keep the satellite in orbit, and it will fly away. It has reached "escape speed".
Comment: although if you did pop it in near enough to the moon, the horizontal acceleration could come from the moon's gravity. Just to confuse the issue.  its not a great orbit though, very high, and may be perturbed by the moon later.
Comment: @JMLCarter That's why I said "ignoring any other bodies".
Answer: You can think of a orbiting satellite as a body performing uniform circular motion around the Earth. For this to happen, the gravitational force due to the Earth itself must be the centripetal force that is needed to sustain the circular motion:
\begin{equation}
F=m\frac{v^2}{r}=G\frac{mM}{r^2},
\end{equation}
where $m$ is the mass of the satellite and $v$ its speed, $r$ the distance from the center of the Earth, $G$ is Newton's constant and $M$ the mass of the Earth. So, as you can see, you need a specific speed to have a satellite orbiting the Earth at a given distance from its center.
On the other hand, if the body has no initial velocity, it will simply fall in the direction of the force, i.e. towards the center of the Earth.

Free fall around Earth


Volatile Extreme Programming Team

Question: Would you recommend extreme programming practices implemented in organizations where team composition changes often?
If in an extreme programming scenario, the team becomes volatile midway, what would you recommend?
Thanks.
Answer: I would suggest that the issue of team volatility is addressed first. No process is going to work very well if you've got a revolving door in your office in the first place and I'd say that using a process that relies more heavily on an individual's performance and contribution than one intended to be used with "replaceable cogs in a machine" is going to make matters worse if that's possible.
Pair programming might work in a situation like this provided you can keep some people around for long enough so that they can impart their knowledge on new members on the team. However part of the problem with that is that you can't really practise the "pair of equals" part of pair programming and you'll end up in an implied senior/junior situation simply because one half of the pair doesn't know the code well enough.
Most development processes rely on a comparatively stable team that does know the codebase well. If you don't have that, you need to design a process around the fact that you will be dealing with developers that are trying to grasp the codebase at the same time as they're trying to be productive.
Answer: Programmer Pairing becomes a must. Engineer practices (XP) along with management practices (SCRUM) enables to deliver at a sustainable pace. One of the first things you should emphasize for a working team is to keep it together. If that is not possible, programming pairing carries even more importance!
For waterfall, a project is started, people are gathered, they then have to go through Form, Storm, Norm then Perform. Once the team learns how to work together, the project ends and the working team is disbanded. Then the process is repeated again. Do you see the problem? Who has so much money that they can continue to pay the cost for teams to Form, Storm, Norm then Perform again and again?
That being said, every team will see team people come and go. With programmer pairing, you can bring new folks to the team and they will become effective almost immediately. By pairing they will learn the business domain, application code and engineering practice very quickly.
We took a team of 4 pair and added 3 new pairs to the team. We paired all the new developers with experience team members. We gave ourselves 30 days to bring the new members up to speed. The team hit all deliverables. Could you image adding 6 developer to a team of 8 developers on a waterfall team. The team would nearly grind to a halt assimilating the new team members.
Bottom line, keep a function team together. If that is not possible, make effective use of pairing to bring new folks on board quickly.
Answer: What process is going to work when the team composition is volatile?  At least with XP, using pair programming, you have some hope that more than one team member has some familiarity with all parts of the code.  FWIW, I don't practice XP, I just don't see how the issue is exacerbated by using XP.
Answer: Pair Programming should help with getting new team members up to speed, as well as osmotic communication in a team room. Extensive suites of both developer and customer tests should make sure that new team members don't break existing functionality. High code quality should help them find their way around faster.
Having said that, volatile teams are really a strong antipattern. Why do you have them in the first place?
Answer: High test coverage and a continuous integration can help ensure that new team members do not break what was previously implemented. Pair programming is the fastest way that I've found to help someone get familiar with a project. Planning meetings, short iterations, and tracking velocity over those iterations could also help new developers easily bite small pieces that are more easily managed.

Volatile Extreme Programming Team


How does natural unit make sense?

Question: Both the fundamental constants $\hbar$ and $c$ have dimensions. In particular, $[\hbar]=ML^2T^{-1}$ and $[c]=LT^{-1}$. But in natural units, we make them dimensionless constants of equal magnitude. How is this possible? This means length is measured in the same units as time which is measured in the units of inverse mass! Am I measuring the distance between two points in seconds??? Can we do that?  I cannot make myself comfortable with it :-( Also why is it not possible to make $\hbar=c=G=1$ simultaneously?
Comment: Related: https://physics.stackexchange.com/questions/102527/how-can-planck-units-be-consistent-with-conflicting-dimensions-of-mass?rq=1
Comment: In US English, people measure distances in seconds all the time.  "How far away is the city?"  "Oh, about an hour."  The "natural" speed in that case is different, though.
Answer: The other answers more directly address your questions, but I would point out that many people casually measure distance and time in the same units.  If you've ever said "I live twenty minutes away from my office," then you've used units in which the characteristic speed (i.e. the conversion factor between distance and time - in this case, the average speed of traffic) has been set to 1.
Answer: Can we measure distance in seconds? Definitely. When you set $c=1$, "one second of distance" is simply the distance that light travels in vacuum in one second. And "one meter of time" is the amount of time it takes for light to go one meter in vacuum.
It is possible to set $\hbar=c=G=1$ simultaneously. This is what produces Planck units.
Natural units are not just a nice simplification. They allow the physics of an equation to "shine through" more clearly. For example,
$$E^2-\mathbf{p}^2=m^2$$
says "Mass is the invariant length of the energy-momentum four vector" more clearly than
$$E^2-\mathbf{p}^2 c^2=m^2 c^4$$
does, with its extraneous factors of $c$.
Answer:
But in natural units, we make them dimensionless constants of equal magnitude. How is this possible?

It is not widely known or appreciated, but both the magnitude and the dimensionality of the units we use are a matter of convention. We are free to use different unit systems with different conventions, as long as we use them self consistently. The most important thing to remember is that the laws of physics are slightly different if we write them in other units.
CGS units are the most widely used units with substantial differences in dimensionality compared to SI. For example, in SI units the Coulomb is a base unit with dimensions of $Q$, but in CGS units the statcoulomb is a derived unit with dimensions of $L^{3/2}M^{1/2}T^{-1}$. As a result, Coulomb's law takes a particularly simple form: $$F=\frac{q_1 q_2}{r^2}$$

Am I measuring the distance between two points in seconds??? Can we do that?

Yes, but not in SI units. There are also units where time would have dimensions of length. Those are also valid. You simply have to adapt the equations appropriately.

Also why is it not possible to make ℏ===1 simultaneously?

It is. One example is Planck units https://en.m.wikipedia.org/wiki/Planck_units
Answer: I feel the previous answers don't completely answer the question, so I'm providing my own.
SI units were originally chosen with reference to constant quantities that we as humans could measure at the time they were defined. For example, when the metre was officially defined in 1793, it was as a fraction of the distance from the equator to the north pole. Once distance (and hence area and volume) were defined, many other units could be expressed using properties of materials: kilograms as the mass of a litre (0.001m^3) of water, amps in terms of forces between loops of metal wire... Other units such as air pressure were expressed relative to the pressure at sea level, and seconds are defined relative to the length of a day.
Of course all of these original definitions have flaws: determining the exact position of the (geographic) north pole and measuring the distance to it with any accuracy would have been hard enough in 1793, and even since gaining the technology to do it we know enough about the earth to expect that distance (and similarly air pressure at sea level) to fluctuate minutely over the course of a year or a century. Thus we replaced these original definitions with quantities derived from materials in carefully controlled conditions, which the consensus in physics assures us are universal, which is to say that reproducing the same conditions anywhere in the universe will give a measurement that agrees. Nonetheless, the relative scales of these definitions have been retained, so all SI units are determined by human experience.
However, the study of physics makes clear that there are more natural, fundamental ways to choose units independent of human experience. Since Einstein, relativity has taught us that light has a universal speed through which we can compare distances and times. This speed alone provides no fundamental unit of distance or time; in terms of SI units we get a constant $c$ that expresses the ratio of metres to light-seconds, for instance. The idea of natural units is that we rescale our measurements: perhaps we keep seconds to measure time, but we now measure distances in light seconds. This is the same as setting $c=1$. However, in this interpretation, $c$ is not dimensionless! Rather, it allows us to ignore dimensions because we implicitly correct the dimensionality of expressions by multiplying with powers of $c$ that we may now ignore numerically because $c=1$. Of course, if we ever want to use the resulting equations for real-world calculations in terms of the familiar units, we can use dimensional analysis to put the powers of $c$ back in.
The more fundamental constants we have, the fewer units we need to choose, as long as they don't clash. As pointed out in the other answers, we can rescale to make $c=\hbar=G=1$, but only because these quantities are dimensionally independent. If a revelation in physics produced a new fundamental speed $c'$ different from $c$, for example, then we of course couldn't rescale to make both of these 1.
I think the accepted answer here gives two good interpretations / explanations, the first of which is similar to mine.
Comment: "A purely natural system of units has all of its units defined ... such that the numerical values of the selected physical constants in terms of these units are exactly **dimensionless** 1." - https://en.wikipedia.org/wiki/Natural_units (emphasis mine)
Comment: @G.Smith As I stated in my answer, whether or not you retain dimensions is up to your interpretation; of course I can abstractly do all of the maths involved in my physics problem while ignoring dimensions, but I can't interpret my solution physically without putting them back in at some point (or implicitly keeping them throughout).
Comment: If I express a velocity $v=1/2$ in natural units, I of course mean $v=c/2$. I can work with $1/2$ as a dimensionless quantity to simplify my maths but then it isn't a velocity.

How does natural unit make sense?


How does someone calculate the total resistance of such a circuit?

Question:
After having learned the methods to calculate the overall resistance of series and parallel circuits, I decided to work out the overall resistance of some circuits I made up. The only one I got stuck at was this one. If the resistance of each $n$th resistor is $R_n$, how can someone calculate the resistance of such a circuit? The main problem I am facing is that, I cannot resolve the circuit into separate parallel and series connections, since the wires are connected wherever they overlap.
Comment: Are the 2 wires crossing in the center of the drawing connected or not?
Answer: I haven't done a lot of these so there might well be a more efficient solution but one tool you could use is the Y-$\Delta$ transform. It lets you convert from three resitors in a Y configuration to three resistors with different values in a $\Delta$ configuration.

The values of reistors in the new network are given by $$R_1=\frac{R_bR_c}{R_a+R_b+R_c}$$
$$R_2=\frac{R_aR_c}{R_a+R_b+R_c}$$
$$R_3=\frac{R_aR_b}{R_a+R_b+R_c}$$
or, for the inverse transformation,
$$R_a=\frac{R_1R_2+R_2R_3+R_3R_1}{R_1}$$
$$R_b=\frac{R_1R_2+R_2R_3+R_3R_1}{R_2}$$
$$R_c=\frac{R_1R_2+R_2R_3+R_3R_1}{R_3}$$
Now you can start simplying you circuit like so:

and go on to use the Y to $\Delta$ transform again on the middle three resistors etc.
Comment: Or you could transform the $\Delta$s on the left and and right to $Y$s . This at once reduces the circuit to a bunch of series and parallel ones.
Comment: True, that sounds a bit quicker.
Answer: There are some tricks you can use. Look up Delta<->Star transformations. It should be useful in your case also.
For general circuits, you can get the resistance between two points in the circuit by assuming that a current $I$ travels from the input to the output lead, as you have shown. From Kirchoff's laws you can find the potential drop between the input and output leads. The resistance is just the ratio of the two numbers.


Problems heating up pans on an induction hob

Question: I bought an induction hob to precisely control pan temperature; it's a 2000W Hendi single hob, temperature and power can be combined independently.
I tested two De Buyer pans with it, a multilayer stainless steel and a carbon steel one; I heat them up empty and checked surface temperature with a thermometer.
I noticed that the temperature quickly jumps well over the set value and takes time to stabilize; this is especially true when I try to reach 100+ celsius and with carbon steel cookware the effect is magnified (I got a blue ring mark in the middle of the pan).
What am i doing wrong? Should I start to cook immediately?
Comment: Please be more specific about how you measured the temperature. E.g. did you use an instant-read thermometer? An infrared thermometer? Either method would have potentially significant error; the instant-read thermometer might actually find the magnetic field interfering with it, while the infrared thermometer requires correct selection of the material in the thermometer settings for the temperature to be accurate. That said, heating the pan so much that the metal turns blue is almost certainly overdoing things.
Comment: See e.g. https://www.reddit.com/r/Cooking/comments/6baabr/psa_digital_thermometers_and_induction_cooktops/
Comment: I used this grill surface thermometer: https://www.amazon.com/CDN-GTS800X-Surface-Thermometer-Silver/dp/B005O24M4E
Answer: Any electrical device that is used to maintain a constant temperature (ovens, induction hobs, immersion cookers, even thermostat-based space heaters) does so by first sensing whether the current temperature is below the set temperature. If so, the heating element/induction coil/etc... is turned on. Once the temperature reaches some upper threshold, the element is turned off again, and the cycle repeats.
Different devices have different ranges of thresholds. For instance, the temperature in an oven may vary by as much as 30°C, while an immersion cooker will keep the temperature range withing 1°C or so.
The reasons your hob overshoots the set temperature, then takes some time to stabilise, can be:

The hob is built to operate on a much wider range of temperature thresholds than you thought.
The hob is built to keep a pan with contents at a constant temperature, but heats up too powerfully for an empty pan (i.e., the hob makes the 'assumption' that there is something in the pan, and delivers power based on that assumption).
There is some distance between the hob's temperature sensor (often in the center) and the induction coil (a ring some distance from the center), and your pan does not conduct heat instantly. Then, while the pan has reached target temperature at the spots closest to the induction coil, it is still below the target temperature at the hob's sensor, causing the hob to add more power.

Using an empty pan will make points 1 and 3 worse as well. You can check if any of these are occuring in your case by heating a pan of water, and taking the water temperature (points 1 and 2), or by moving your surface thermometer to different spots in the pan (point 3). If the issue turns out to be 1, there is not much you can do. If it's either 2 or 3, you can mitigate the problem by starting to cook (almost) immediately.
Alternatively, you could force a slower heating curve by starting the hob at its lowest temperature and manually changing the temperature setting every minute or so.
Comment: For all induction hobs I have used, the reality is an ugly version of point 3. There is a sensor somewhere below the induction coil which gets used for the controller, and its reading doesn't correlate much with the temperature of the pan, or the food you have in the pan. It makes the temperature control pretty much useless.
Comment: @ChrisH Well, of course. I meant for 2 to *be* the point that empty pans will overshoot more, so it seemed strange to state something along the lines of "an empty pan will make the problems caused by an empty pan worse".
Comment: An empty pan will make point 2 worse too.  There's always going to be some overshoot as the temperature sensor catches up to the pan temperature, and that's going to be much greater with less thermal mass.
Answer: You say, probably paraphrasing the manual, that "temperature and power can be combined independently*.  But they can't.  There may be separate controls, and you may be able to set T, P or both with predictable effects, but they're not independent. The temperature (or rate of temperature rise) will always depend on the power input and what you're heating, by simple physics.  Control is achieved by turning the coil on and off and/or by actually driving it at lower power.
I suspect that you can set a target temperature, and an output power that's effectively a maximum used to bring the pan up to temperature.  By necessity the temperature is sensed using a sensor in the hob.  That will take some time to respond during which the pan will keep getting hotter - a (thin) carbon steel pan could get very hot. The temperature could be sensed in several ways; the fastest, and how I'd design it, is an IR sensor built in to the hob; that could still take a few seconds to settle down.  It's also a little inaccurate due to making assumptions about the pan material, but it should be close enough for normal cooking.
The only time you'd really want to heat a completely empty pan is for dry frying/toasting, and then a heavy base works better.  The worst case is probably a pan with a very little oil; this would start to smoke quite suddenly, and you'll need to get used to how long it takes to avoid it.
Comment: Having looked up a manual for this brand of induction hob, it states "During operation, press the function setting (2) to choose the power or temperature mode. Power function indicator (7) or Temperature function indicator (8) lights up." So it seems those settings cannot be changed independently.
Answer: I have the same problem. Empty or full my cast iron pan will overshoot the set temp by a bunch at first. It's worse with thinner cookware. I think the thermostat takes awhile to figure out the temp and shutting off.  My best solution is to preheat the pan by slowly creeping up the temp setting or boiling off a little water. You want the pan to be evenly heated anyway  so that should not be  a problem. The other option is to use only the power setting which bypasses the thermostat.


Cannot access Samba share from windows 7 using hostname

Question: I've been trying for days to get this working, and everywhere I look online it seems no one has a definitive answer, so here is the run down:
I have an external drive attached to my ubuntu 12.04 machine, "nicholas-desktop." I have the entire drive shared over the network via SAMBA. If I try to access the drive from windows 7 by using "\nicholas-desktop" it fails saying it cannot locate "nicholas-desktop." However, if I use the current IP address assigned to my machine by my router's DHCP server by typing "\192.168.2.XXX" I have no problems accessing the share. if I try to ping my ubuntu machine's hostname from windows it fails.
The same happens if I try to ping my windows machine, "nicholas-laptop" from my ubuntu machine. Again, if I use either machine's assigned IP address it works fine. Can someone please help me get this working? I don't want any workarounds like setting a static IP, or DHCP reservation, I want to be able to resolve hostnames from both sides. I have tried enabling SAMBA'a WINS server so I could resolve the hostnames using netBIOS, however that didn't work either, I may have made a mistake setting it up though.
Comment: I think if your settings are perfectly then you can find shared external drive connected with network in network places in Windows 7.
Comment: @K.KPatel No, my ubuntu machine won't show up in network places because windows 7 cannot resolve it's host name.
Comment: install system-config-samba tool by sudo apt-get system-config-samba in terminal and re-config samba perfectly
Comment: @K.KPatel Yes, I already have that installed, you're not helping me any. I need to know why I cannot resolve my ubuntu machine's hostname from windows, and how to fix it.
Comment: Check the netmask on the windows and ubuntu and router. There may be differences.
Comment: Are you in a domain? I had this problem and I used the hostname + domain (sonething like this: mypc + mydomain.com)
I hope this help you.
Answer: Hi a couple of thoughts,

you don't need name for windows share to access. <code>\\<desktop_ip_address>\nicholas_share</code> works just as fine.
as other pointed out, you don't have a DNS server to resolve name to IP. If your router acts as a DNS server, since it does DHCP, check if it has any options to add names to IPs, or register host names on DHCP. It all depends on the router.
how do you keep the current IP for the desktop. If the desktop acts as a server, then it should have a reserved lease IP address or a static IP address. Once a name is cached to the IP, sometimes it remains cached, and when the IP changes, wondrous things can happen.
Have you checked that your windows has network discovery enabled for the home network? It should otherwise windows smb client acts weird and quirky.
Answer: Windows Live Signin Assistant can cause that problem.  I'd found it on Google, deleted it, and problem solved.  Now I'm having it again on a new laptop running Ubuntu.  Can access shares on the Windoze machine from Ubuntu, but not the reverse.
I'm thinking a myriad of Windoze updates reinstated the problem, but I don't know yet.  The Windows Signin Assistant is gone.
Answer: This seems to be completely missed.  Resolving IP addresses to hostnames is done via DNS.  Run a DNS server and your problem will be resolved.


iPhone wouldn't launch apps, restarted and now showing Apple sign-on screen

Question: I restarted my iPhone 4S because the apps kept backing out instead of loading but my phone has been showing the Apple sign on the screen for about an hour. I've already tried pressing the home button and shut off button. What else can I do?
Answer: Holding down both the Home Button and the button on the top of the phone for 10 seconds will force the phone to do a hard reboot.


iOS 8 Safari verify server identity error

Question: We have a site running on https in production. In QA we run it on https but we don't have a valid SSL cert for it. So on iOS Safari 8, we get a error message saying that "Server identity cannot be verified". The error appearing is fine, but the problem how do I add an exception so what Safari allows it for my domain.
Answer: You can email your certificate to the ios device and add it in profiles as a server certificate. After doing so, Safari will recognize and trust the server.


problem in spline with barriers in ArcGIS 9.3?

Question: I am trying to use the script tool "Spline with Barriers" from arcgis 9.3 3D Analyst toolboxes. I am not getting expected output. The output is just only one value over the surface. We are using ArcGIS 9.3 in XP Remote Desktop and it is a German Version of Windows, so the system represents the decimal place as a comma. Is it possible to edit this tool to store the field values as 3.40 instead of 3,30?
Comment: Are you sure this tool is a script tool? If I remember correct, this is a core ArcToolbox tool which is not exposed as a Python file. You cannot edit core GP tool. You should build either a model or a Python script that will pre-process input data to work with comma and points correctly. Playing with the OS Language and Region settings is another option.
Answer: If you right-click on a script tool in ArcToolbox and select "Edit", it should bring up the Python script in IDLE.
That being said, I don't know if that will be able to fix how the decimal point is represented within the ArcMap table (I've never worked much with localization). This StackOverflow question might get you further in the right direction.
Comment: I have got my solution and I am glad i did not Need to edit the script tool. This Problem has two solution: 1) When setting the cellsize use comma instead of 2.3 or 02) from control pannel Change the language of Computer to English(USA) ----Thanks for your cooperation


On road repair for hydraulic brakes

Question: What are the possible on-road modes of failure for hydraulic bicycle braking systems, and what can a touring cyclist do to be prepared for their eventuality? What can one carry as an emergency backup and when might it be needed?
Comment: Consider modifying the question if you find these follow ups relevant: what region of the world, e.g. West or less-resourced country? How long are you touring? How much space and weight do you have available for spares?
Comment: @NathanKnutson what? Downhill/enduro discs are plenty capable enough for even the heaviest-loaded road descents. Discs dissipate heat just fine (otherwise they wouldn't be used in motor vehicles); it's just that road-targeted ones are usually undersized to save weight.
Comment: @Sam Real loaded mountain descents remain best served by rim brakes. There's not a lot any disc brake can ever hope to do to manage heat as well.
Comment: This is why mechanical disk breaks exist.
Comment: The conclusion one draws from reading the many answers here is that hydraulic brakes may not make sense on a touring bike. To read a contrast with why hydraulic brakes might make sense on an MTB, see https://bicycles.stackexchange.com/q/82473/48599.
Comment: @leftaroundabout I'm talking about literally going down mountain roads all at once carrying heavy touring loads. How can a disc rotor compete with a rim for managing the heat?
Comment: @NathanKnutson a disc can compete with a rim, because it can afford to get a lot hotter before anything bad happens. Rotor temperatures of briefly 120°C aren't a problem, and those temperatures allow getting rid of a lot of energy even with much smaller surface than a rim brake would require for the job. Anyway, it's not really about "competing" – the point is that properly selected disc brakes work perfectly well for heavy-loaded touring.
Answer: There's really nothing one can carry to repair hydraulic brakes, short of workshop tools.
Instead, do your maintenance well before leaving on a long trip, and have a couple of short bed-in rides before packing up.
Also, carry a phone to call for help, money/card for a bus/taxi/etc and know where the bike shops are on or near your intended route.  If touring across holidays also note their hours and which days they will be closed.  Some prior knowledge helps.
Finally do consider that your brakes are two independent systems, and most of the first world legislates something to this effect.  So if one brake breaks you still have a second functioning brake to carefully continue through to a LBS for repair.
I wouldn't ride down any significant grade with only one working brake, but I'd definitely ride a flat route to a LBS with gentle braking, coasting up to stops, and start braking twice as early  Maybe more if I only have a rear brake.
Expect to pay extra for emergency/urgent repairs at a shop, but that's just how it is.
This is one reason why hard-core touring types prefer cable-based brakes.
Answer: The one field repair to Hydraulics I have ever had to do required removing the caliper and riding without a rear brake (A couple of hours technical single track MTBing without a rear brake is somewhat 'educational'). The return valve in lever blocked (fluid went in, but not out of the reservoir), meaning the brake once applied would not release. Required for that repair was a Hex key and zip ties (to strap the caliper to the seat stay)
Most of the failure modes are common to cable brakes (contamination, bent rotor, broken lever) with the same resolution.  The only failure modes that are hydraulic specific and a complete failure of the brake are fortunately rare (like mine). Even the need for a bleed is usually not total loss of braking. It typically results in spongy brakes that need pumping and have lost the fine control needed for max control, but you can still get near 100% braking force.
The smallest and lightest solution that would allow a field repair of hydraulics, that covers the half dozen most common failure modes, would be a spare set, pre bleed with cable ties for the hose.
Hydraulic specific failure modes I can think of

Stuck Piston - annoying but rideable - preventable with maintenance.
Burst hose (hose failure)- No braking, hose + bleed, uncommon.
Mechanical damage to hose -No braking, hose + bleed - not common, crash damage, shipping, not common notmal riding.
Lever internals stuck/jammed/not working - new lever and bleed, very uncommon
Caliper leaks - Brakes probably working for a while, limp home usually possible. Caliper overall, new seals, bleed
Crash damage to caliper/lever including pulling out banjoes/hose end - replace broken bits and bleed.

As you can see, nothing here involves a bleed without other parts being required. No point carrying a bleed kit alone.
Comment: If you are going to carry a spare brakeset, I would recommend SRAM (shockingly enough) because their levers are ambidextrous and the fluid is readily available. Most other brands have left/right-specific levers and/or use a special brake fluid.
Comment: @Andrew Fair point, although I'll leave the question of "is baby oil safe" for individuals to decide upon. Also, Shimano brakes still have the issue of left-right specificity.
Comment: @MaplePanda Mineral oil is also readily available in the form of baby oil at any pharmacy :) Works great, but it does void your warranty to be fair.
Comment: @MaplePanda This refers to the flat-bar levers, right?
Comment: @VladimirFГероямслава Ah yes, I primarily had flat bar levers in mind while writing that. Although now that I think of it, I wonder if you could reprogram SRAM eTap levers to control the FD with the right shifter and the RD with the left, effectively making them ambidextrous as well.
Answer: Fiona Kolbinger won the 2019 Transcontinental Race, an endurance race across much of Europe. She was reportedly on a 2019 Canyon Endurace, which I believe had hydraulic discs. She finished in about 10 days. In her reported loadout, she had spare disc pads (bottom left of the photo), but no other spares.
Bikepacking.com wrote in 2021:

Cable brakes are easy to see and understand, so almost anyone can get their head around them. Hydros require more knowledge and pre-trip experience with how they work. I think hydros are super reliable most of the time, but if one does fail for one reason or another, it's difficult to do much about it, compared with carrying a spare steel cable.

They also suggested that a bleed kit would probably be worth packing only for longer trips.
I did not see mention of carrying spare rotors. I have no experience touring. I understand that some circumstances can warp the rotor - those are likely to be prolonged descents with heavy braking. So, depending on the terrain and your load, it may be worth considering spare rotors.
Riders should probably consider the possible spare parts situation in their operating area. The Transcontinental race may have been in an area where bike shops were relatively easy to get to, and many of them might have had servicing equipment for hydraulic brakes. In other countries, only shops in the larger cities might be able to service hydraulic brakes. So, your operating area might bias you toward cable discs or cable-actuated hydraulic brakes, and perhaps you can consider packing spare cable and housing.
Answer: The possible on-the-road failures cover a wide swath of issues and the answer for most of them is there's not very much you can do. One can contrive situations where any of the hydraulic system parts fail and they need to be replaced and the system re-bled. Generally there won't be a practical way of carrying what you need to cover those scenarios.
Of the reasonably likely failure scenarios, probably the main ones are the brake gets too hot in a loaded mountain descent and the fluid boils, or some kind of impact or snag damages a line (happens easier on loaded bikes). Both require a bleed and possibly parts replacement.
To be prepared you would need a bleed kit, oil, and then whatever amount of redundant parts you want. Also, doing those kinds of repairs in an improvised setting is advanced; simply having the hardware is far from all that's needed. It's possible to imagine having some kind of stripped-down bleed kit with smaller-than-shop-size syringes, a minimalist Shimano funnel if applicable, etc, and then being able recover from an issue in the middle of nowhere, but it doesn't sound very realistic for most.
Fixing broken hydraulic brakes by definition requires having the means to take something that has oil on it but shouldn't and make it clean and residue-free. Often you could make do with a minimal amount of 95% alcohol, say on wipes in a foil packet, but sometimes you'll need more cleaning power, i.e. more serious solvents. (It's true that automotive brake cleaner can usually suffice here and is fairly obtainable if you're near civilization).
There are limits to what a categorical answer can cover, because the details of the specific brake in question has bearing on how successfully one could fix it in various low-resource situations. For example, the Shimano road hydros really do need the part of the bleed procedure abided by where the lever bleed port is turned front and back at 45 degree angles while the lever is compressed to work all the air out. That pretty much necessitates having the funnel and extension tube, or somehow finding a way to substitute them. (Possible, but sounds difficult to improvise out of nothing while camping in the rain etc). To contrast, older generation Shimano flat bar levers with the open reservoir are exceedingly tool-minimal to bleed, since you don't technically need to do anything to the lever end other than open it up, and the caliper end needs only the syringe and hose.
Answer: The only field repairs I can imagine making on disc brakes are:

Straightening a slightly bent rotor. There are "tuning fork" tools for this purposes, some compact multi-tools include these.
Replacing worn-out pads. This is straightforward and can be done using tools you're probably carrying anyhow.

If you had a rotor bent so badly that you couldn't rotate the wheel, you could in theory carry a locknut removal tool to remove the rotor, remove the brake pads and hope that gives you enough clearance (note: you could mess up that caliper or rotor if you accidentally pulled the lever with no pad), or remove the caliper from its mount and zip-tie it to the frame/fork so it's out of the way. Obviously these solutions put you in a "limp home" situation with one brake.
Note that there's nothing specific to hydraulic brakes here—you could do the same with cable-actuated discs. It's hard for me to imagine bleeding the brakes by the side of the road.
Comment: @MaplePanda I thought about that. I'm not sure if those portable lockring tools will work on the brake side due to the spacing between lockring and frame.
Comment: As a corollary, there exist ultralight/portable lockring tools for centerlock rotors. May be worth checking out if one intends on carrying a rotor removal tool.
Answer: All the failure modes for a hydraulic braking system on a bike fall into one of two categories:

Hydraulic-specific failures.
Non-hydraulic failures.

Pretty much all the hydraulic-specific failure modes involve loss of integrity of the hydraulic system, which means that fixing them right requires topping-up and bleeding the system on top of whatever else is needed as a fix. This is not easy to do in the field (in fact, it's not easy to do in a garage unless you have a work stand), and requires carrying a bleed kit (these can be pretty lightweight, but are single-purpose) and spare brake fluid (either mineral oil or DOT fluid as appropriate, both are actually pretty dense and thus heavy). You can in theory work around this by carrying a full set of pre-bled replacement brakes, but that may be too heavy (and too awkward to pack) for your tastes. However, provided you cycle carefully and properly maintain your brakes, none of these failure modes are likely to happen unless you crash (and at that point, you probably have more than just your brakes to worry about).
The non-hydraulic failure modes are pretty much all shared with whatever the underlying braking technology is. For the common case of hydraulic disk brakes, you've got all the disk brake specific failure modes to consider, but pretty much all of these are easy to plan for and easy to fix in the field:

Bent/warped rotors: Carry either a rotor truing tool or a pair of parallel-jaw pliers with long, narrow jaws, either of which can be used to deal with slight bends and warping in the field. Possibly carry a spare rotor or two plus the tools required to replace it (though note that rotors that are that badly bent are rare unless you crash).
Damaged/worn-out/contaminated pads: Carry spare pads and whatever tools you need to replace the pads. Usually you will have all the tools you need in your existing kit, but you may want to pick up a dedicated pad-spreader or piston press to reset the pistons properly when you change the pads.
Contaminated rotors: Carry a small bottle of appropriate cleaning fluid and other required cleaning materials. Make sure to pick up any used materials to dispose of properly later.

Irrespective of all of this, pretty much all modern hydraulic brake systems on bikes are split (you have completely independent hydraulics for the front and back brakes, unlike the norm in cars where it's a single system for all four wheels). This means that one failing should not render the bike unrideable, you just need to prioritize getting somewhere that can fix it properly and cycle extra cautiously (don't go down steep inclines, coast to as stop when possible, etc).
Answer: Besides the ever bending rotors and pads eroding like a butter under the sun, the most horrible thing you'll encounter is lazy pistons.
Hydraulic disc brakes are not fit for long bike touring. Calipers will take a lot of beating from mud contamination, dust, water and sand. Calipers on motor vehicles are properly isolated and made, unlike bike calipers which are made to be light and compact. The rectangular o ring that is responsible for retracting pistons is too exposed. That's the primary reason for brake rub, on motor vehicles there is extra sealing like rubber boots.
Cleaning piston area can be done as a roadside repair, but depending on terrain you ride, pistons may scratch badly due to fine sand ingress which cause leaks, or damaged o rings. Shimano for example, does not sell replacement pistons or rings, even so, after replacing those, which can be done by a multi tool, will require bleeding and refill. You need to carry lots of tools, which is not possible. A bare set of tools require a few liters of space, not to mention carrying messy items like oils which can spill.
For hydraulic disc brake benefits like strong brakes with minimum effort, I suggest using cable operated hydraulic brakes at least, which reduces the amount of things that will fail.
Comment: MTB calipers _can_ take a lot of beating from mud contamination, dust, water and sand before developing serious problems. They're certainly more resilient than any mechanical brakes.

On road repair for hydraulic brakes


Effect of NOT changing filter weights of CNN during backprop

Question: What is the effect of NOT changing filter weights of a CNN during backpropagation? I changed only the fully connected layer weights while training on the MNIST dataset and still achieved almost 99 percent accuracy.
Comment: Interesting, did you start with random weights, or using weights from some previous network? Also is your accuracy measure from the training set, or from a hold out test set?
Comment: @Neil Slater : I started with random gaussian weights .The accuracy measure is on test set.
Comment: @Neil Slater: The accuracy almost remains the same even with different initializations of the filters. I used 2 convolution and max pool layers and an FC layer with 256 hidden neurons
Answer: By not changing the weights of the convolutional layers of a CNN, you are essentially feeding your classifier (the fully connected layer) random features (i.e. not the optimal features for the classification task at hand).
MNIST is an easy enough image classification task that you can pretty much feed the input pixels to a classifier without any feature extraction and it will still score in the high 90s. Besides that, perhaps the pooling layers help a bit...
Try training an MLP (without the conv/pool layers) on the input image and see how it ranks. Here is an example where an MLP (1 hidden & 1 output layer) reached 98+% without any preprocessing/feature extraction.

Edit:
I'd also like to point out to another answer I wrote, which goes into more detail on why MNIST is so easy as an image classification task.


Beameroptions in combination with pdfpc / pdfpages

Question: I think I did not understand yet how to use pdfpc in Ubuntu in combination with pdfpages properly.
I would like to use the \notes command to make proper nodes and then, using two screens, I want the current slide on the left side and all the rest like the next page and my notes on the right side.
From a StackOverflow question (Is there a specialized Pdf viewer for Latex-Beamer presentations on Linux?), I found the following code for beamer:
\usepackage{pdfpages}
\setbeameroption{show notes}
\setbeameroption{show notes on second screen=right}

The problem is that I have no idea what it actually does because the man page is not available on their website anymore.
The result looks like that (both screens together), which appears highly weird to me:

The right side has the current slide and the notes together and the left side is just highly weird.
Is there anybody who can explain it a bit better how to use that properly?
I use
pdfpc Presentation.pdf

as my terminal command on Ubuntu 20.04
Comment: Does `pdfpc --notes=right Presentation.pdf` work? I believe that this should match the 'show notes on second screen' used with Beamer.
Comment: Correct. It works, thank you.
Answer: @twsh found the answer.
I need to change the terminal command and include --notes=right inside there
The command then becomes that one:
pdfpc -w --switch-screens --notes=right Presentation.pdf

I also switched screens as they where they wrong way around and -w aims to show both parts in separate windows such that its easier to share it with various programmes like Discord and Zoom


Solving equation for higher degree of composition

Question: Given this function $f(x) = x - 1/x$, the equation $f(f(x)) = x$ has two solutions: $\frac{1}{\sqrt{2}}$, $\frac{-1}{\sqrt{2}}$. But how about solving this equation for a higher degree of composition, for example $f(f(....(f(x)))) = x$ (15 times), what is the mathematical tool needed in order to solve this equation and run it on a code efficiently without getting errors?
Answer: To solve $f_n(x)=x$ (where $f_n$ is the $n$-fold composition of $f$), write $f_n(x)-x$ as a rational function, take the numerator (which is a polynomial, I think of degree $2^n-2$), and find its roots.  Finding the roots of a polynomial (or approximations thereof) is a well-established problem, and computer algebra systems such as Maple have
tools to do this.  If using numerical methods, very high precision arithmetic is likely to be necessary to find the roots of a polynomial of high degree with some very large coefficients): in the case $n=15$, the largest coefficient is approximately $1.42 \times 10^{6158}$. Exact rational arithmetic might be tried, though that will also involve very large numbers.
For example, using bisection I can confirm that in the case $n=15$ there is
a root between $329737/65536$ and $659475/131072$.


Why is my gas oven no longer heating?

Question: I have a Frigidaire gas wall oven that is no longer heating. It was working off and on the past couple of weeks but now is not heating at all.  All the electrical functions work and the igniter mechanism is turning on and heating (see picture), the gas is just not triggering.  The separate range/stove right next to it is working fine.  I saw this video that says there's a thermal switch in the back but I wanted to see if others have ideas about this before I pull the oven out of the cabinet.
Comment: "I have a Frigidaire _electric_ wall oven" based on mentions of [tag:gas] and igniters, you really mean, "I have a Frigidaire _gas_ wall oven"...
Answer: I've had that happen on my double oven Viking range. The igniter would glow, but not draw enough current to convince the gas valve to open. One oven had two igniters the other smaller oven had one.  All of them eventually failed.  I found higher quality after-market igniters and they have been working fine for many years now, lasting longer than the OEM ones.
Not sure if this applies to you, but it's close.
Answer: I cannot say for sure with your particular oven, but I have experienced "partial electric ignitor failure" where it had basically cracked.
It would visually heat up, BUT evidently the safety circuit that decides if the gas solenoid opens (in that oven, may be common) depends on the current being drawn. Started with being flaky (would or would not work), got increasingly flakier, finally got stubborn and never worked. Very similar to what you are describing...
When the ignitor was actually removed (rather than just being looked at glowing brightly in place, and assumed to be fine as a result) the defect was obvious compared to the new ignitor, and the oven began working perfectly with the new ignitor.

Why is my gas oven no longer heating?


Load value dynamically in edit component properties window

Question: I have a checkbox field(includelevel2) and I need to load the value dynamically in a droptree field(parent folder) based on the checkbox event. Is it possible to achieve because both the fields are located in edit component properties window and added as fields in rendering parameter template. please see the image below.
Answer: No, that's not possible really.
Sitecore does not support any events on changes of field values that would result in applying some logic in other fields.
That would be heavy change to Sitecore internal javascripts - that's not recommended.


Multi-nested ui-views

Question: Here's my config:
$stateProvider.
  state('frontPage', {
    url: '/',
    templateUrl: 'index.html',
    controller: 'MainCtrl',
    onEnter: function() {
      console.log('frontPage');
    }
  }).
  state('frontPage.interestGame', {
    url: 'interest',
    templateUrl: 'interest-game/index.html',
    controller: 'GameCtrl',
    onEnter: function() {
      console.log('frontPage.interestGame');
    }
  }).
  state('frontPage.interestGame.game', {
    url: ':platform',
    templateUrl: 'interest-game/game.html',
    controller: 'GameCtrl',
    onEnter: function() {
      console.log('frontPage.interestGame.game');
    }
  });

I am able to go to / and /interest and the templates, controllers, and onEnter functions all run as expected. However when I go to /interest/anything it fails to load my templates. It's simply an empty page with no console.log errors... I see that all my scripts were loaded as expected so I know that it's not a server issue... Perhaps I'm misunderstanding how the nested states work...?
Answer: I believe each url state entry has to start with a leading /. Try changing :platform to /:platform.
Comment: That didn't work... Perhaps I'll need to make a plnkr.
Answer: You do indeed need that leading / before :platform, otherwise it would be interpreted as /interest:anything (no slash in between).
Also, interest-game/index.html should contain a

.

Multi-nested ui-views


I can't see through the reference image in wireframe

Question:
I can't see through the reference image in wireframe
that view is truly wireframe
Is there anyone who knows what happened?
Answer: You mean see the reference image through the objects in your scene? If that is the case one option would be to press "Shift-Z" in order to see the scene transparent. There is of course a button as well for it next to the wireframe button. in the picture below I have both wireframe mode and show x ray selected
Comment: Thank you so much for your kindness


Must I use all tables in an Entity Framework model?

Question: I am building an Entity Framework model for a subset of the Pubs database from microsoft. I am only interested and publishers and books, not publishers and employees, but there is a foreign key constraint between the publishers and emoloyees tables. When I remove the employees entity from my model, the model won't validate because of the foreign key constraint.
How do I create a model for a subset of a database when that subset links to other tabes with foreign key constraints?
Because this is for a demo, I deleted the offending tables and constraints from the database, but this won't work in production.
Answer: You could create views of the pertinent data and bind your model to that.  I am not a database expert, but a DBA that I formerly worked with recommended this approach because she said that the view is less intensive on the database server to begin with.
Prior to the release of 3.5 SP1, we built a DAL on top of LINQ to SQL (without DBML mappings, but that is another story) that mapped all of the domain objects to either stored procedures or views.  That way, the DBA was happy about the calls following a more set execution plan, as well as being able to encapsulate the database logic outside of the codebase.
Answer: The correct way to do this is by exposing the foreign key columns as scalar properties.  There is a complete explanation, and downloadable sample code, in this blog post.  You might find the rest of the post interesting, as well.


Interpreting backward multiple linear regression

Question: I am running a backward-selected multiple linear regression to correlate a continuous dependent variable (mussel density) with 10 categorical independent variables (substrate, side of bay, animal presence, etc). After backward selection I end up with a model with an adjusted r^2 of 0.522 that has included 5 out of the 10 independent variables. My question is how to interpret the rest of the data provided by the model. Do the p-values still matter after backward selection (i.e. for the substrate variable some of the substrates have a significant p value and other do not, but the whole substrate variable was included in the model)? Which variables should I report when sharing results of the model? Any help is much appreciated, still new to this!
Comment: What do you want to do with the model?
Comment: Did you hold out a random subset of the data for testing your model?  That's about the only way you can approximate anything like a valid p-value or $R^2.$
Comment: The goal for the model is to correlate the impacts of these 10 factors on mussel density. So I've got ~200 different sections of shoreline that I've taken all these variables for and now want to see which factors correlate with increased mussel density.
Answer: Stepwise selection as a form of model development isn't well regarded these days. Part of the reason is that it tends to produce 'final' models which explain a great deal of the variance in your sample, but do very poorly when tested against new samples. The p values and R2 statistics from your final model are also invalid, as they ignore the model development process and presume that the final model was specified 'a priori'. Thus, any uncertainty about whether the final model is the 'correct' model (and there's a good chance it isn't) is ignored.
People often say when talking about stepwise methods, don't let your computer think for you. You have collected data for 10 variables you presume may be important for explaining your outcome. Why not present the results of your multivariable regression including all 10 predictors? Then you can summarise each with an effect size (regression coefficient) and the uncertainty around that effect size (e.g. 95% confidence interval). This will tell you plainly which variables are the most important in determining Mussel density, after accounting for the other variables.
If you're worried about overfitting, or want to find the most parsimonious possible model (i.e. most variance explained with fewest possible predictors), a more principled approach might be a shrinkage method like the LASSO. Shrinkage methods and the perils of stepwise selection in the ecology context are explained well in this short letter. The LASSO can be implemented quite simply in the R package GLMNET and there are many good tutorials online that run through the process.


GIMP: How to apply the same processing to multiple photos

Question: In Photoshop, the same sequence of processing on layers of each image in a batch can be applied to those multiple images by using File > Automate > Batch > Action then select the group of images to process. How can the same macro be done in GIMP?
Answer: No macro capability in Gimp. If this is a single operation, there is a BIMP plugin to repeat an operation on several images.
Otherwise you have to write scripts.
Another solution is to use an application designed to work from shell scripts, such as ImageMagick, but we would have to know what you want to do exactly (add a watermark?) to be more specific.


Gravity Differences

Question: If two planetary bodies were tidally locked to each other (e.g. pluto and charon) then could there ever be a situation where the smaller of the two bodies had the 'heavier' gravity? Could you ever weigh more on the smaller planet?
Comment: Gravity is a function of the mass so your smaller body would have to be denser to have a stronger gravity
Comment: That @Riff said. You just need to make it so that the smaller body has a higher mass (or the same mass, but being smaller means you are closer to the center of gravity which makes for a higher force of gravity on you).
Comment: Aside from the density there is also the angular momentum to consider.
Comment: @user6760 Not with tidally locked planets, which can't rotate fast enough to have a significant effect on surface gravity.
Comment: @Mike Scott: if the orbital plane is tilted and eccentric...
Answer: Tidal lock is irrelevant. All you're asking is if a planet can have a heavier surface gravity than a larger planet, to which the answer is a definite yes. Just for example, Uranus is much larger than the Earth, but its "surface" (cloud-top) gravity is only 89% of the Earth's, because it's much less dense.
Comment: @R.Tierney The same answer applies. If a body exactly like the Earth was a satellite if Uranus, it would have a higher surface gravity than its primary.
Comment: That was probably the wrong wording to use! Sorry. I meant, could the surface gravity ever be higher on the satellite of a planet, rather than the planet itself?
Answer: Gravity depends on the mass of a body. So you can adjust the radius of a planet as you see fit, just also adjust the density of the object to compensate.
But when it comes to orbits, the more massive planet would be the primary planet,  a satellite is always the least massive. However, technically, two gravitationally connected bodies actually orbit a single point in between them - their centre of mass - it only appears that one orbits the other because one is more massive and the centre of mass is much closer to that body. Pluto and Charon are of very similar mass and actually orbit a point in between them.
Of course this depends on your perspective, standing on Charon you might think that Pluto orbits it, and vice-versa. Humans of course thought everything orbited the Earth for millennia

Gravity Differences


Creating a complex tree model in Qt

Question: I'm writing an IRC Client (yes another one). Long story short. I'm writing a Server dialogue
that keeps a list of this:

Identity
    Networks
        Channels
        Addresses

I have 3 different list views that will be for the Networks, Channels and Addresses.
When the user changes the Identity (combo box). The network listview will lookup all the networks for that specific Identity. After it loads up the Networks it will automatically select the first network and then load all the channels and addresses for that specific network.
The problem is I want to have 3 views for 1 model, to minimise all the memory and the loading of data. So that it makes it much easier to manage and not do a bunch of work.
If you'd look at QColumnView it's the same exact thing. But I don't need it to be on one exact page since the views are on entirely different tabs to make it easier to go through the Server dialogue.
I'm wondering what will be the best way to go about handling this complexity. The information is stored in a SQLite database. I already have the classes written to extract and store it. Just the modelling is the painful part of this solution.
Answer: I would make a single TreeModel, and then use QSortFilterProxyModel() to display three different views on it.
Answer: The best way to doing this would be to just load the models dynamically. When the ComboBox changes Identities. Delete all the items in the NetworkList and just repopulate it afterwards and delete all the networks that were in there.

Creating a complex tree model in Qt


Can I use any "wallet" to store Litecoins?

Question: I have a doge wallet, can I use it to collect litecoins? Or do I need to specifically get a litecoin wallet to receive payments for hashing? Thank you.
Answer: Any wallet is based on the particular set of cryptographic functions used for a single cryptocurrency. If you tried to send dogecoins to a litecoin wallet address, the transaction would not be valid because the dogecoin blockchain is only a record of dogecoin transactions and the litecoin blockchain is only a record of litecoin transactions.
Comment: Cheers, NReilingh.
Answer: they are different. you will lose your LTC if you send to doge adress. I advise you use the official site of LTC to find the official wallet. many people lost theirs coin to third party wallet.


PhpMyAdmin navigation tree doesn't expand

Question: I've put PhpMyAdmin v 4.7.7 on a Debian 9 server with PHP 7.0. Most of it works, but a number of features don't. One of them is the navigation tree in the left panel: it simply doesn't expand (clicking a server name should list table names). The Ajax response from navigation.php is <code>{"reload_flag":"1","success":false,"error":""}</code>. Success obviously should be true, and the response should contain the HTML with the table list.
I don't see any JS errors in the browser console. There also are no errors in the server's PHP error log.
The same setup (literally the same PhpMyAdmin files) runs fine on my Windows 10 laptop.
As I've recently upgraded to PHP 7 on the server, maybe I've overlooked a required PHP extension? curl, mbstring, mysqli are installed.
Answer: Sigh. Clearing cookies solved it. Left by a previous version.


How to remove/re paint rusted areas of my stove range

Question: I recently purchased a used stove that I've now noticed has rust spots on it. The stove works great but the rust is an awful eye sore. I was wondering a good way to either paint or somehow remove the rust in a way that it will last.
Comment: Not a duplicate, but related, and a possible approach (which may look better than dabbing touch-up paint on) once you get the rust taken care of: https://diy.stackexchange.com/a/215950/18078
Answer: You'll first want to remove the existing rust. There are many rust removers on the market but I've always used plain old white vinegar. Brush it on the rusted areas, lety it sit for 15 to 20 minutes and then wipe the area with a cloth. you might have to re apply a few times if there's still rust. Once the rust is gone, get some emery paper  and sand down the area to really clean the area and smooth out the existing paint where it meets the preiously rusted area. Then get some appliance paint from your home store and paint the area.
Answer: For the door, I'd recommend removing the rusty trim piece before trying to treat it. Usually, lifting up on a partially-open (Caution - a bit heavy) door will remove it, and then a few screws on the inside can be removed. Trying to repair it in-place would be likely to further damage the stove.
That trim can be hand-sanded, or a phosphoric acid rust remover can remove some more rust. Thoroughly rinse the part afterwards, to remove any  cleaner or grit remaining. Afterwards, it can be covered with a high-temperature metal-based paint. [Note that links to products are examples only.] Regrettably, the rusted areas would still be rougher than surrounding trim, but alternatives, such as replacing that trim or commercial electroplating, would probably be uneconomical.
As for the spot by the switch, you might use masking tape to protect the good areas, gently sand and/or apply rust remover, clean, then apply high-temp paint, perhaps with a cotton swab, rather than spraying directly.
Answer: Personally, I would use a rust converter.  First, scrape or peel back the surrounding paint just enough so you can see bare unrusted metal around the rusted spots.  Use a small wire brush to brush away the loose rust—you want to leave a little bit.  Apply rust converter to each spot, following manufacturer instructions.  Then paint with matching paint.  Depending how visible a repair you're OK with you may need to do some followup wetsanding and polishing.


Comparing two cognate lists, how do I determine validity?

Question: A man created a list of 406 words, place and tribe names that he transcribed into English (Roman alphabet) and placed them side-by-side with ancient Hebrew names (that were likewise transcribed) to support a theory. I hope to objectively determine the likelihood of chance involvement. How can I proceed? I'm not a mathematician or a linguist, but it seems that math, text data mining and linguistics could help clarify.
Some transcriptions are total "matches." Others can be seen to represent possible pronunciation changes over time while still seeming to suggest a connection to ancient Hebrew. Perhaps such "near matches" could be assigned a lesser value to still support subjecting the list to analysis.
Comment: Are you looking for something like [this article](https://www.zompist.com/chance.htm), or something more formal and rigorous?
Comment: @Draconis it is a shame that, afaik, this post is the only proper exploration of the quantity of coincidences expected. It seems like the sort of thing that would be well worth a paper, but I suppose now that that post exists, one would need to provide a substantial progression beyond it to be able to publish, unless Mark Rosenfelder chose to write it up more formally himself
Comment: @Tristan Indeed; I would love to have a more formal version to link people to.
Comment: The article is interesting although complicated enough to keep my independent progress slow.
Comment: The list was compiled by an Ahmadiyya Muslim, now-deceased, Pakistani jurist who included the list as a chapter in his book about Jesus and Moses being in (dying in) Kashmir.  The list is mostly tribe, caste and sub caste names from Kashmir, Afghanistan and Pakistan (that are also mentioned in the Old Testament) Each entry has the Biblical citation for the "Hebrew side."
Answer: First level check: Factually correctness
Do the words mean what they are claimed to mean? Are they well-attested and not disputed (The Hebrew Bible contains some hapaxes [words occurring only once] with uncertain meanings)? Check with a dictionary. Do it for both sides of the list.
Second level check: Internal etymologies, loan words and borrowed words
Loan words and borrowed words aren't suitable for direct language comparison, so you have to exclude them. Use an etymological dictionary to identify them. Do this for both sides of the list.
Also watch for transparent etymologies such as prefixed and suffixed words as well as compounds. Only word stems are suited for language comparison, not the derived word forms.
Third level check: Regular sound correspondences
Watch for regular sound correspondences in the cleaned up word lists. Regular is the key word here: Singular correspondences are very likely chance correspondences, but larger families of words with the same shared sound change are much more convincing. Sound changes are often conditioned by their environment, for a starter I suggest comparing single word-initial consonants, they tend to give rather clear signals.
Sanity Check: Established language families
Take a look at some established language family to see how regular correspondences look like. Also take into account the assignment of the given languages to established language families (Semitic and Afro-Asiatic for Acient Hebrew, and whatever it is for the unnamed language in comparison).
Even a layman should be able to see the impressive correspondences laid out in this wikipedia article on Indo-European vocabulary. Contrast this with data from a non-Indogermanic language like Turkish, Japanese, or Tamil for an unrelated language.
P.S. The article quoted in @Draconis' comment is also worth reading.
Answer: An out of the blue comparison of two lists of letter-collections (I won't call them words) might well be provided to prove that two writing systems are computationally interchangeable: step one is always to identify what kind of claim is actually being made. The word "connection" should set off an alarm, because it is very difficult to prove that two things have absolutely no connection of any sort. For example if I give you a list of words in Indo-European languages which mean "woman", and a list of words from Bantu languages with the meaning "woman" then yes there is a connection between the words, but it is not historical, genetic or social, it's semantic.
So the first thing you have to do is prove that the author has a specific claim in mind, for example "this list of word pairs in Latin and Hebrew proves that Latin derives from Hebrew". Or, "this list of words shows that the Romans were capable of borrowing words from other languages". Once we exclude vague claims like "there is some connection between these two languages" (due to cultural contact), we are generally left with claims about descent from a common ancestor.
Prior to jk's first-level check, check the objective evidence for the existence of the words and their representations. The internet contains a lot of made-up data, so how do you know that there is an actual ancient manuscript with some set of squiggles, and how do you know how to interpret the individual squiggles? That's easy with <ω> and possibly impossible with some other sign. This is at least a documented symbol of the Phaistos disc, though it cannot be assigned a letter other than arbitrarily.
Second: there is definitely something suspicious about transcriptions being exact matches. There are multiple conventions for transcribing languages not written in the Latin alphabet. You have to consult the original texts of the ?two ?language, and determine if they follow a consistent and accepted system of transliteration – or is the transcription fine-tuned in order to support the hypothesis? (I should point out that under conventional linguistic usage, you "transcribe" from a sound source such as a speaker or a recording, and you "transliterate" from one alphabet to another, using a written text. Transcriptions are phonetic claims, transliterations are sometimes mistaken for being phonetic claims).
Then of course word-meaning in a foreign language is not self-evident, so how do they know that the word means such-and-such. Is it plausible that similar-looking words are because of borrowing (the various words across languages for "horse" that come from Arabic faras).
In moving to the question of chance in comparative linguistics, I recommend D. Ringe, "On calculating the factor of chance in language comparison" (Trans. Am. Philos. Soc. 82, 1–110). The biggest problem is that at least as practiced, comparison of the type that you describe have massive numbers of subconsciously-controlled variables. There is a root in PIE with a form something like pet which is claimed to mean a range of things like "fly" or "rush". It shows up in English in words like feather; petulant; pterodactyl; hippopotamus. Given other evidence, this semantically diverse collection is not the nonsense that it seems to be. If you require strict semantic identity (or at least exact identity in conventional English gloss), then "cow" matches "cow" and does not match "bull". Allowing sloppy semantics (as is inevitably necessary) creates vastly more degrees of freedom and more unfilled cells, which makes the null hypothesis most likely.
Similarly, comparison of letters has to be carried out with some kind of weighting, for example p is self-identical, is is highly similar to b, somewhat less similar to f, even less so with h, not much so with ŋ although there is a regular correspondence in Ugandan Nyole between Proto-Bantu *p and Nyole ŋ. The underlying premise regarding "chance" is that some linguistic relations are not the result of applying known genetic-historical linguistic processes to a common source word, instead the properties of the words (and any computed degree of similarity) are do to "something else" (which we call "chance"). Sound change can be context sensitive: therefore it is possible for p to correspond to both b and to ŋ, if the context is the same. When you add phonological context to the set of independent variables, you get a massive expansion of the number of cells to be filling, and again we have little reason to reject the null hypothesis.
We do at least have a weak basis for computing similarity of sounds, since any language sound can be assigned a "number" corresponding to the SPE phonetic features that describe the sound (though nobody uses that system for phonology anymore, still it is good enough for at least a first-pass comparison of "similarity"). With such a weighing of sound relations, you can meaningfully compare [p] and [b], and compute that [p] has little similarity to [ɮ], therefore is likely to not be due to ordinary historical change.


Using an OEM Windows XP license in a Virtual Machine

Question: I just bought a Dell 640m laptop with Windows Developer Preview installed. There is no directory with any backups. The COA on the machine is for XP. I would like to install XP as a VM on the same machine the license applies to. Is this even possible to do? If so, how?
Answer: I'd note i'm not entirely certain about the legal aspects of this, and that falls outside the scope of my answer. It is probably against the EULA.
Generally OEM systems are imaged and don't actually use the key thats on the box - the used a system locked preinstall key unique to the manufacturer. If you want to use the key that is on the box, you'd need a full OEM install disk (that is to say NOT a restore disk) - the sort a small system integrator would use and is sold by places like newegg as OEM , and if you got one there's no practical reason it should not work.
If its for testing purposes, and the VM is to be disposable, microsoft has several for use with MSVPC available, which would be a good alternative.


Domain users unable to logon to remote desktop server

Question: I am new to Domains...
Have physical DC. created there 10 users.
Have virtualized TS on other PC, joined to domain, all OK.
DC can see and manage the TS.
...But still I am unable to allow my domain users (created on DC) to connect to TS through RDP .. Only Administrator can RDP OK, but normal users NOT, even if Members of Remote Desktop users group, still no luck.
I tried many tutorials, messed with everything, I am pretty desperate ..
Any idea?
I did all I could understand here, even according to similar posts, still no luck....
Any ideas?
Both OS WS2012
Comment: You need to include error messages, preferably from the client side AND server side (look in the security eventvwr logs).  As it currently stands your question just doesn't provide any real details that an expert here can formulate an answer with.
Comment: Dig into terminal services licensing... By default, two admin users can use RDP - other users need licenses and "licensing" - a server that manages their licenses.
Answer: Did you add these users to the domain Remote Desktop Users group? If so, that's your problem. Members of the domain Remote Desktop Users group are not automatically members of the local Remote Desktop Users group on your RDS server. You need to add the domain Remote Desktop Users group to the local Remote Desktop Users group on the server.
Additionally, the domain Remote Desktop Users is meant to grant RDS access to users for the Domain Controller, not for access to RDS servers.
Comment: Thank you! Been at this a few hours and this is what I needed.
Answer: I had a very similar problem. You could remote in as a local computer user, but you could not remote in as a domain user.
Similarly, this was a VM. But in my case it was a VM that was just taken out of storage and was 1 hour off.
Setting the time correctly fixed the issue. I'm not sure why remote desktop didn't alert me to this problem, or why I was able to log in as a domain user from the VM console. But alas...
Answer: I hope I would be able to help you.
I was having this issue administering my Window Server 2016 also.
I wanted my domain users to be able to establish a remote desktop connection to my Window Server without having to be assigned the role of an administrator.
So I searched everywhere online, messed with a lot of stuff and then got the fix after a lot of trials.
So this is my fix.
Step One: Right click on my computer, click on Properties, click on the Remote Tab, click on Allow Remote access to this computer, click OK
Step Two: Click on Start Menu buttons, search for Local Group Policy, click on Local Profiles, click on user rights, click on Allow log on through Remote Desktop Services, add the users you want, apply, and click OK
Step Three: Perform gpupdate /force
That's it.
Say thank you later.
Answer: When I had a problem similar to this, I found that Microsoft Windows DNS was the real problem, associated with its AD integration.
To recap my problem:

My Domain is up, and all of the joined systems are found in domain list. Using the VMware Console, I can log in as Domain\administrator, or as Domain\user, or as MyBox\user onto the MyBox server.  Therefore, Authentication was working.
Using Remote Desktop, I cannot login as Domain\Administrator or Domain\user.
When attempting to "Update" the Remote Desktop User list with my Domain group, The server (MyBox) does NOT show me the "Domain" in the list, ONLY the local host name (MyBox).

My Resolution:
Go into Windows DNS on the AD server, and change the domain (or subdomain) properties to use the "Dynamic DNS" mode - yes, the insecure mode.  It instantly resolved my authentication issue, allowing me to "find" the AD Domain, select my new Remote_Users group in the domain, and resume work.


How to use a found USB key safely

Question: I found a USB drive while riding the subway and I want to read it to see if I can return it back to it's owner. If I can't find any info on the stick, I'll use it for my own means. Assuming I have a perfect sandbox and I reformat the USB drive, how large is the possibility that my system gets compromised from using this USB drive? I'll leave this question's scope open to the possibility of both software and hardware (hidden memory?) methods of attack.
Comment: How do you know it's even a USB drive? Maybe it's just a [cleverly-disguised programmable keyboard](http://hakshop.myshopify.com/products/usb-rubber-ducky-deluxe).
Comment: @MatthewPeters No, there's a big difference. An SD card is storage and won't do anything bad if you just insert it into a reader and read from it. A USB peripheral could be anything, even if its form factor is that of a USB drive.
Comment: At a minimum, you risk destroying the hardware you plug the USB stick into, (all electronics between the connector and the nearest fuse).
Comment: possible duplicate (same concept) of http://security.stackexchange.com/questions/64404/mac-osx-what-is-the-safest-way-to-access-an-unknown-usb-storage/64408#64408
Answer: It is possible for USB drives to have firmware-embedded malware, see this BadUSB article which shows the research. There would be no way to get rid of firmware-embedded malware, formatting would have no effect on it at all. However, it's pretty new, and therefore very, very unlikely that you would run into it. It's probably something someone dropped by accident, although found devices can have deliberately installed malware on them for the unsuspecting. These can be targeted on individuals (drop it by a CFO's car door) or companies (strew them around a coffee shop or company car park) or at random (drop them on the floor of the downtown bound 2 train).
Assuming your perfect sandbox you could examine the content and reformat it with almost certain safety. That perfect sandbox doesn't really exist though, so it would make sense to boot a virtual system from read-only and save nothing from the session.
Answer: In terms of using the USB stick long term I agree with @GdD's answer, if you are truly paranoid you can not trust this stick. But unless you are a high value target it is unlikely that you will have stumbled across BadUSB.
In terms of reading securely I would:

Download one of the minimal or security focused LiveCD linux distributions.
Burn to CD/DVD (Not USB Stick)
Unplug any hard-drives (depending on your paranoia vs effort level you could just ensure these are not mounted)
Boot into the Live linux
Plug in your untrusted USB and read what you like.
Optional: Format the untrusted USB and hope it does not have a firmware virus.
Answer: In this answer, I've described how to only allow mass storage devices for a certain time. You should also use a sandbox. If you want, you can use a writeblocker, but to find the device's owner, that's not neccessary.
Comment: @Dogeatcatworld a writeblocker is a device that blocks writes. Read requests are sent through. If there is a malware on the device, its read out, too. I don't know whether writeblockers protect from badbios, but they wouldn't protect from malware like conficker.
Comment: This is a ok answer, but it would be nice if you specify what a writeblocker is - you probably mean a usb condom or something?
Comment: Its more like wearing gloves at a crime scene: you don't want to destroy traces
Comment: You can catch stuff even with a writeblocker.
Comment: I would say it's closer to wearing a condom during sex, you don't want to catch a disease

How to use a found USB key safely


JNLP files won't launch from IE11 on Windows 10

Question: Since May 9, after a windows 10 update, on IE11 11.0.40, JNLP files wont launch from IE, but in a computer with IE version 11.0.34 it work perfectly.
Any ideas?
Thanks in advance
Comment: Have you checked that the .jnlp file association is present/correct?
i.e. in Control Panel > All Control Panel Items > Default Programs > Set Associations  verify that there is a line with Name=.jnlp, Description=JNLP File and Current Default=Java(TM) Web Start Launcher
Comment: Are there maybe any other solutions than de-installing the 64 bit version of java?
Answer: I had a problem opening a jnlp file, no matter what, trying to associate it with the Java Web Service exe javaws.exe, but it just would not associate and would not be run. I read throughout forums and all, and in the end from old DOS.exe files that I have used, somehow I did that and a miracle, it worked, I simply dragged the saved jnlp file and dropped it onto the javaws.exe, and it was executed. wanted to share this...
Answer: Alex, it appears our friends at Oracle heard you loud and clear.  According to the JDK Bug System, this issue is being tracked under defect JDK-8185661.   The fix appears to be in the pipeline for inclusion in an upcoming Critical Patch Update (CPU).
In the meantime, it is possible to test the fix on a development system using an early access build downloaded via Oracle's Java Early Access Downloads page.   After reproducing the issue with JRE 8u151 (1.8.0_151-b12) on a Windows 10 version 1703 system, using IE 11.0.44, I verified the issue as fixed after updating to early-access JRE 8u162 (1.8.0_162-ea-b01).
Answer: The problem is solved in Java 8 u162. Now you can have Java RE x86 and x64 installed and jnlp will open as it should in Internet Explorer. We are using sitelist / Enterprise Mode to redirect jnlp urls from Edge to Internet Explorer.
Answer: I had the same problem after installing Windows 10 creators update.
Reason/Solution: I had both the 32-bit and the 64-bit JRE installed on my computer (Java 8 Update 131). This was not a problem before the creators update. Java applets and Java webstart applications have worked fine in Internet Explorer 11. However, Internet Explorer 11 (11.332.15063.0) seems to have problems with the 64-bit JRE. Java Webstart applications can only started if only a 32-bit JRE is installed.
Answer: Thanks! I uninstalled Java x64 and it solved my problem with jnlp-file that didn't start.


Why Is Zero padding Required for Sobel Edge Detection?

Question: Why do we leave two rows and two columns of an image (or) padding zeros to an image for detect edges while using Sobel operator and Prewitt operator?
Comment: Please make a better title. Something like "zero-padding for edge detection" would actually describe the problem!
Comment: Could you please mark my answer?
Answer: Zero padding IS not required, per se. However, with a $3\times 3$ square kernel, pixels exactly on the borders of the image lack outer neighbors, if one wants to estimate their discrete derivative/smoothing. This is somehow illustrated below

You can:

use a shorter derivative estimator on image borders (which does not make assumptions regarding side effects), like Roberts cross edge detectors,
extend the image properly;  zero-padding (for centering, one more row or column on the right and left, and bottom or bottom, suffices) is the simplest version.  Yet, symmetric/anti-symmetric, periodic or mirror extensions can be more appropriate: half-pixel or whole pixel antisymmetric extensions respect better the continuity and smothness of border features.
use non-linear operators/filters, that could be more robust (median, stack, rank, mathematical morphology)
discard border values, which you cannot compute in any sound manner without assumptions.
Answer: The Sobel Filter is a $ 3 \times 3 $ matrix (it is separable, but let's ignore that).
The anchor pixel is the middle one hence to evaluate the operator on pixels on the upper row the operator needs data above them.
Same goes for pixels on the last row,  left-most column or  right-most column.
This is usually solved by padding the image (I actually use "Replication" instead of Zero Padding).
Another option is to set the output to be smaller image by not evaluating the extreme rows or columns.
Comment: Wow, I had so many typos :-). Thank you for the edit.
Comment: "(it is separable, but let's ignore that)" Well, this can be important here


Backup Linux to DVD

Question: I'm currently using Cedar Backup to backup my home directories, system config, etc to DVD+RW.  It does, however, have limitations; backups can't exceed a single disk, restores are totally manual, etc.
Most Linux backup software assumes you have a tape.  Bacula is an exception, but it's DVD support is broken and fixing it doesn't seem to be a priority.
What other software for backing up linux to DVD is there?
Answer: You could try Mondo rescue, which can backup an entire system to DVD and even make the first DVD bootable so you can restore from bare metal without needing to install any software.
If you want a more manual, command-line approach you could also use dar, which is similar to 'tar' but can generate an archive divided into a number of fixed-size "slices" which can be burned to individual DVDs.
Answer: I use backupninja to make DVD images using it's makecd handler, and then burn them manually.  There's a burncd handler available in Debian (also here) in order to actually burn the DVD itself while the backup is running, which I tried for a while but then forgot to replace the DVD, which was no good for actual backups.

Backup Linux to DVD


Do data privacy laws force age restriction on youtube?

Question: If ever a privacy is passed restricting age to something higher than 13  ( COPPA ) would all youtubers be forced to age restrict videos (not made for kids ) even if they feature content suited to children or not m ? Why ? This is to prevent data collection front from children above 13 .
Example :
There is an youtuber in India corporation . Say India makes a data protection law banning data collection of children below some age x  between 13 and 18 . Would all Indian youtubers in general assuming no special provisions in that law be forced to age restrict even children videos for some age between 13 and x like videos targeted for high school ? This is to block them out and thus prevent data collection through comments or personalized ads .
Comment: The person has no assets in that country he will never travel there.I have asked similar questions but would desire a yes no answer if possible .
Comment: Basically what I mean is if we turn off videos for lower ages they will not watch it so no data collection mainly going to happen .
Comment: This needs to not ask for legal advice ("Should we...") and ask about a specific jurisdiction, not all data privacy laws everywhere in the world. Alternately, it could ask about extraterritorial jurisdiction generally without asking whether given conduct would violate data privacy laws.
Comment: Ok edited to explain better specific and added points .
Answer: Whatever the hypothetical new law is, the lowest-hanging fruit is Youtube, where India could take action against Youtube. The Federal Trade Commission did so w.r.t. COPPA violations in the US, and Youtube settled. Since Youtube is a US company and the FTC is a US federal agency, had this gone to court and had the FTC prevailed, the courts would have ordered Youtube to do something, and YT could not just say "nuts to you". Indian courts might enter a similar judgment against YT, and in principle it could be enforced by blocking YT in India, which is not a trivial thing.
The other prong of legal attack would be against the channel owner. In the case of COPPA, the channel owner is also liable – for the Indian case, it would depends on what the act says. So the FTC can take action against a channel owner, although enforcement would be challenging in certain countries, but pursuant to the court order, YT could land in legal hot water if it tolerates violations by channel owners. The same would hold for the Indian hypothetical. The government of India may have no direct leverage against a violator, but it does have some leverage against YT, which has complete leverage against the channel owner.
One would have to look at the wording of the relevant act, to determine what leverage exists, for who, in India.
Comment: What if the act read " no company being shall collect personal data except data collected automatically from http requests headers like i.p.  from children below age x  .
Comment: The act would never be written that way, and the courts would probably strike it down as uninterpretible and thus unconstitutional. There is in part a language problem here, but mainly the act would have to clearly say that is prohibited and I can't make any sense out of what you're proposing. The wording would look like COPPA or the PDP Bill.
Comment: Actually I was concerned about PDP bill only . I am not sure but I hear it requires special gaurdian permission for children . Now if YouTube ever by mistake unintentionally violated this would all YouTubers who did not block below 18 and released not for kids videos be liable . However is PDPB is bill many don't seem to want to answer it  so I did not write PDPB .


Where methods live? Stack or in Heap?

Question: I know that local variables and paramters of methods live in stack, but I not able to figure out where does actually methods live in case of Java?
If I declare any Thread object like:
Thread t=new Thread();
t.start();

So it means I've created a separate calling of methods apart from main method. What does it mean? Does it mean calling of separate sequence of methods over Stack memory? Am I right?
Comment: The way you are phrasing this makes me feel uncomfortable.  The "Method" "Lives" in the code space.  It is not on the stack or the heap.  An object is created on the heap that has a pointer for each of its methods.  That object lives in the heap, but the methods it points to are in code.
Answer: Each thread is allocated its own stack.
This article has a good introduction to the memory separation within a Java process.

Inside the Java virtual machine, each
  thread is awarded a Java stack, which
  contains data no other thread can
  access, including the local variables,
  parameters, and return values of each
  method the thread has invoked. The
  data on the stack is limited to
  primitive types and object references.
  In the JVM, it is not possible to
  place the image of an actual object on
  the stack. All objects reside on the
  heap.

I've seen many scenarios where clients have implemented hugely threaded servers on the basis that each thread does very little, and they run into problems with memory. That's because each thread is allocated its own stack, and this (obviously) adds up. I think the default value is 512k per thread, but I've not found a canonical source for that.
Answer: If I remember correctly, the method code itself will live in the code portion of memory, while the variables declared internally will live in the stack, and the objects will be created on the heap.  In Java, the variable pointers and primitives live on the stack, while any created objects live in the heap.
For a (poor) ASCII representation:
-------
|STACK|
-------
|FREE |
-------
|HEAP |
-------
|CODE |
-------

Where the STACK represents the stack, FREE represents free memory, HEAP represents the heap, and CODE represents the code space.
This is what my memory says - some of the details might be wrong.
Comment: As Brian Agnew has noted, each process has it's own stack, while they share the heap.
Answer: The stack is comprised of method invocations. What java pushes onto the stack is a method invocation record, which encapsulates all the variables (both parameters and locally instantiated variables) for that method. When you start a Java application, the main method (which automatically includes the args parameter) is the only thing on the stack:
main(args)

When say you create a Foo object and call foo.method(), the stack now looks like:
method()
main(args)

As methods get called, they are pushed onto the stack, and as they return, they are removed or "popped" from the stack. As variables are declared and used the stack entry, which corresponds to the current method (at the top of the stack), grows to include the size of the variable.
For your example with threads, each thread will have its own stack which exists independent of each other thread's stack.
Answer: The stack contains all the local variables and all active method invocations.
The heap hold everything else.
As for your sub question: it means a new stack is created with its own dedicated memory.
While your new thread will share the total heap space (memory) allocated by the jvm
Comment: I am pretty sure that the stack contains all local **primitive** variables and pointers (well really references) to the actual objects.
Answer: The heap is split up into multiple generations.
The bytecode, and its corrosponding JIT compiled machine code lives in the so called permanent generation, along with interned Strings and other class data.
Even though it is called the "permanent" generation, it can still be garbage collected. Some libraries, frameworks and JVM languages generate bytecode at run-time, so the permanent generation sometimes need clean up. Just like the other generations of the heap, but (one usually hopes) less frequently.
Answer: The actual bytecode and/or JIT'd code would live in the process's memory. There would likely only be one copy of it in the process memory, as all threads in a given process share that memory. Any variables shared by those threads will be accessed by the methods in common. Variables local to the threads (even method local variables used within a thread) will be created within that thread's memory.

Where methods live? Stack or in Heap?