Why do some LEDs light VERY slowly when power is applied?

Question: I have a pile of bluish white LEDs salvaged from Christmas lights. They look like ordinary LEDs, with one electrode having a little cup with the light emitter, and the other with a tiny wire going to the top of the emitter. When I apply a milliamp or so from a 9v supply, they light up just fine. If I apply 10 microamps or so, they barely light when power is applied, then get brighter over the next few seconds. It is clearly visible to the eye, and makes them useless for making optisolators with. Obviously the LEDs used in commercial optoisolators don't have this problem. Why do these LEDs do this, and what kinds of LEDs do it?
Comment: How do your control 10 uA , from a 9V supply?
Comment: 1 megaohm will not excite/activate photo-emission to the LED sufficiently and no, optoisolators would have the same problem. two false assumptions
Comment: the one KFW is trying to imagine
Comment: Which commercial opto-isolators work at 10uA?
Comment: the lag between blue emission and phosphor photo absorption converted emission depends on temperature for threshold which varies widely with process control and then reduced to microsecond durations at high energy levels at normal operating range
Comment: Sounds like there's a capacitor in there somewhere.
Comment: @MarkAdler: [This answer](https://electronics.stackexchange.com/a/86720/29243) quotes 50pF junction capacitance, while [this note from Osram](https://www.osram-os.com/Graphics/XPic5/00135349_0.pdf/High-Speed%20Switching%20of%20IR-LEDs.pdf) suggests a lot of variation between wavelengths.  But parasitic capacitance must play a part if it's taking seconds to reach full brightness with 10µA.
Comment: It's just possible@KFW is thinking of passing 10µA through the LED in the nominally off state and is worried about the opto-isolator turning on when it shouldn't.  The light output is highly unlikely to be enough to turn on the output of the opto-isolator in that case
Answer: Bare LEDs are generally quite fast.  The ones with phosphor to re-emit a different color are slower.  How much slower depends on the phosphor.  White LEDs, for example, have phosphors.  Those would be silly in a opto-isolator.
Commercial opto-isolators use infrared LEDs, usually in the 9xx nm wavelength.
Look at the current spec for commercial opto-isolators.  Note that they require significantly more than 10 µA of input current to work.  What a LED does with only 10 µA is irrelevant to opto-coupler use since they aren't being run at such low currents.  Usually a few mA is expected.
Comment: The ***only*** physical process I know that operates on the order of seconds (or even milliseconds, to be honest) is phosphorescence. This depends upon *illegal* quantum spin state transitions, which being illegal really just means *slow*. Photon re-emission at the atomic level operates on the order of \$\tau\approx 10^{-10}\:\textrm{s}\$, plus or minus a few orders. Fluorescence and molecular can be a little slower but really is still quite fast and doesn't get into milliseconds (to my knowledge.) Only phosphorescence yields delays like that. Charge \$\tau\$ similar to discharge \$\tau\$. +1
Comment: @jonk Just for the sake of clarity: the transitions are called "illegal" because in an ideal, simplified world, they are indeed illegal; there is no way the system can transition from one state to the other on its own. However, in the real world, interactions with all of the other matter in the universe can give the system a little nudge in the "illegal" direction.
Comment: @jonk has a good point, and I have bluish-white LED bulbs that emit for a few seconds after switching off, but much less blue than when on, as the phosphor emits. With some phosphors you can even see different lifetimes for different components as a further change in colour. (I've seen it in CFLs as well)
Comment: @jonk um, "only" seems a bit strong... what about radioactive decay – can take anything from picoseconds to terayears? (The reason for this slowness being actually pretty much the same as in case of phosphorencence: quantum transitions which are exponentially unlikely – _tunnelling_.)
Comment: The optoisolators I was constructing substitutes were Vactrols. They control a light-dependet resistor over a 10000:1 range, with a maximum LED current of 10ma or so, and hence require the LED current to vary over approximately the same range. Vactrol makes a whole range of commerical parts that do this, so there's nothing particularly unusual about my specs.
Answer: The most plausible reason for this behavior is that you only think the current though the LED is constant where in fact it isn't. Plot the current with a scope for the few seconds while the brightness changes: I'm pretty sure you won't see the flat line you'd expect.
Comment: True, and I'd like to know what's going on inside the LED to modulate the current like that, and why the LED is doing it. That's why I asked the question in the first place.
Comment: @KFW Without a datasheet, who knows. Maybe they have a built-in timing circuit which changes their brightness periodically. Or perhaps they have some sort of current limitation circuit which misbehaves at very low currents.
Answer: They are UV LEDs with multiple phosphors, designed for efficiency at medium current even more than high brightness (i.e. they're not illumination but decoration). The UV is detectable if I look for it. They do, in fact, take observably long times for the phosphors to both activate and deactivate.
re LED illumination, I found this in another forum, and a densely mathematical article that backs it up down to the quantum level, where individual photons are emitted.
"There is no absolute minimum current required to make an LED emit light; using a sensitive photodetector, I've detected light output from LEDs (green "ultrabright" indicator lamps) driven by currents as low as one nanoampere. They probably emit at even lower currents, but that's where my photodetector bottomed out."
A datasheet for something similar to what I build only shows the LED current/opto resistance graph out to 100k, also states that the off resistance is 50MEG, and suggests contacting the factory for specially selected units if you want more accuracy at low current levels.
http://www.farnell.com/datasheets/87223.pdf
And a commercial use of such an optoisolator shows a maximum current through the LED of less than 1ma, linear use rather than on-off switching, and an active resistance range for the optoresistor up to 680k or so, successfully running it at microamp levels.
So it appears that both the LEDs and photoresistors work at those levels, just with less precision.
https://postlmg.cc/2VXMdWfC
Comment: White LEDs use a blue emitting diodes (~450nm) not UV while the phosphor lifetime is on the order of 100ns, so while the phosphor is charging up the diode would appear blueish white for several hundred nanoseconds but would essentially by at equilibrium after 1-2 microseconds. I think your second explanation with the contact resistance is much more likely.
Comment: The current is constant, and set by a constant-current source - I tried that to be sure. The visible time constant is significant fractions of a second. Literally dozens of these LEDs, all from the same string, do the same thing in separate test setups, all of which don't have the same resistance. Other white LEDs that I have don't. They show measurable UV with the appropriate light meter and filter. The light output bears little relationship to the current drive at low currents, unlike other LEDs. The ones you're examining are clearly built differently than these.


Hitbodedut- Permissable? Reccomended?

Question: What are the main opinions regarding hitbodedut? I strongly recall being taught we're not supposed to bother Hashem more than three times a day, though I can't find an actual prohibition anywhere.
Comment: `we're not supposed to bother Hashem more than three times a day` This sounds very strange to me. ולואי שיתפלל אדם כל היום כולו "if only a person would pray all day" ([Brachot 21a](http://www.hebrewbooks.org/shas.aspx?mesechta=1&daf=21&format=text); the argument is only about repeating Shmone Esre). ומי כה' אלהינו בכל קראנו אליו "who is like our God whenever we call out to him"
Comment: Hi Josh. Probably the main opinions are it's great and it's a waste of time. Is that really all you want to know? I recommend editing your question to clarify what exactly you want to find out. The clearer you are, the better we can help you.
Comment: Is your question about hisbodedut or about prayer?
Comment: "bother Hashem" what is that even supposed to mean?
Comment: @Heshy- the same way we avoid unnecessarily saying a brecha....if you have a better term to employ than "bothering", I'm all ears!
Answer: There is ample evidence that Gedolei Yisroel "bothered" Hashem more than three times a day. First, there is the Gemara Berachos 28b and 54a (Mishna 9:1) that teaches we should say a tefila at every juncture of uncertainty throughout the day. Then there is the mitzvah to say 100 berachos per day. And on and on. Regarding hisbodedus specifically, the Mishna Berura mentions it in passing in 111:2 as something that appears completely permissible.

Hitbodedut- Permissable? Reccomended?


akka broadcast routing with remote routees

Question: I want to build an java Akka cluster system.
the master node is expected to distributed a task to its routees.
the tasks will be performed on different nodes from the master node.
I am actually thinking of using the broadcast router.
with existing remote routees.
then will pass a remote reference of the routees to the broadcast router.
my question is is it possible to pass existing remote router reference to a broadcast router.
I have checked the documentation and looks like you anly pass the number of routers to the broadcast router.
will be happy to hear of your suggestions.
thank you all
WIll be happy to any suggestions.
thank all
Answer: The use of given routees is shown as an example in the docs at http://doc.akka.io/docs/akka/2.0.3/scala/routing.html#Routers_In_Action, the same works for all router types.


What is the solution to this non-linear second order differential equation?

Question: I'm trying to solve the following non-linear second order differential equation:
$$\tag{1}
\frac{d\, }{dx} \Bigl( \frac{1}{y^2} \, \frac{dy}{dx} \Bigr) = -\, \frac{2}{y^3},
$$
where $y(x)$ is an unknown function on the real axis.  I already know the "trivial" solution $y(x) = y_0 \pm x$.  The solution I'm looking may involve trigonometric functions, but I'm not sure.  Take note that we may pose
$$\tag{2}
u = \frac{1}{y},
$$
so that (1) takes another form:
$$\tag{3}
\frac{d^2 u}{dx^2} - 2 \, u^3 = 0.
$$
So what is the non-linear solution $y(x)$?  Or $u(x)$?
Comment: Try multiplying by $u'$ and integrating!
Comment: @gt6989b, I don't understand... your last equation doesn't make any sense.
Answer: Solve
\begin{align*}
              u^{\prime \prime}&=2 u^{3}
\end{align*}
Multiplying both sides by $u^{\prime}$ gives
\begin{align*}
          u^{\prime} u^{\prime \prime}&=2 u^{3} u^{\prime}
        \end{align*}
Integrating both sides w.r.t. $x$ gives
\begin{align*}
\int{u^{\prime} u^{\prime \prime}\, \mathrm{d}x}  &=\int{2 u^{3} u^{\prime}\, \mathrm{d}x}\\
\int{u^{\prime} u^{\prime \prime}\, \mathrm{d}x}  &=\int{2 u^{3}\, \mathrm{d}u} \tag{1}
\end{align*}
But
$$
        \int{u^{\prime} u^{\prime \prime}\, \mathrm{d}x} = \frac{1}{2} \left(u^{\prime}\right)^2
$$
Hence equation (1)  becomes
\begin{align*}
        \frac{1}{2} \left(u^{\prime}\right)^2  &=\int{2 u^{3}\, \mathrm{d}u} \tag{2}
        \end{align*}
But
$$
          \int{2 u^{3}\, \mathrm{d}u} = \frac{u^{4}}{2}
$$
Therefore  equation (2)  becomes
\begin{align*}
           \frac{1}{2} \left(u^{\prime}\right)^2  &=\frac{u^{4}}{2} + c_2
        \end{align*}
Where $c_2$ is an arbitrary constant of integration.
This is first order ODE which is now solved for $u$.
Solving for $u^{\prime}$ gives
\begin{align*}
   u^{\prime}&=\sqrt{u^{4}+2 c_{2}}\tag{1} \\
u^{\prime}&=-\sqrt{u^{4}+2 c_{2}}\tag{2}
\end{align*}
Let just solve (1) as (2) is similar.
\begin{align*}
           \frac{1}{\sqrt{u^{4}+2 c_{2}}}\mathop{\mathrm{d}u}  &= \mathop{\mathrm{d}x}\\
            \int \frac{1}{\sqrt{u^{4}+2 c_{2}}}\mathop{\mathrm{d}u}  &= \int \mathop{\mathrm{d}x}\\
            \int \frac{1}{\sqrt{u^{4}+c_{3}}}\mathop{\mathrm{d}u}  &= x +c_{1}
\end{align*}
Using the computer, integrating the left side above gives the solution
\begin{align*}
\frac{\sqrt{1-\frac{i u^{2}}{\sqrt{c_{3}}}}\, \sqrt{1+\frac{i u^{2}}{\sqrt{c_{3}}}}\, \operatorname{EllipticF}\left(u \sqrt{\frac{i}{\sqrt{c_{3}}}}, i\right)}{\sqrt{\frac{i}{\sqrt{c_{3}}}}\, \sqrt{u^{4}+c_{3}}} =  x +c_{1}
\end{align*}
Similar solution for the second ode.
Comment: The solution can be written more simply: When $c_3 < 0$, for example, we can write $c_3 = -c^4$ for some c, in which case the solution is $x = \frac{1}{c} F\left(\frac{i}{c} u, i\right) + d$, where $F$ is the incomplete elliptic integral of the first kind, more or less immediately from the definition of that function. Inverting then gives $u(x)$ (and thus $y(x)$) explicitly in terms of the Jacobi elliptic function $\operatorname{sn}$.
Comment: Thanks a lot.  I was expecting some trigonometric functions, or the Elliptic function at worst.  This solution is sadly awefull!
Answer: Multiplying by $u'$ and regrouping gives an equality of derivatives
$$\frac{1}{2} ((u')^2)' = \frac{1}{2} (u^4)',$$
and integrating gives
$$(u')^2 = u^4 + c .$$
This equation is separable, and rearranging and integrating gives
$$\pm \int \frac{du}{\sqrt{u^4 + c}} = x + d .$$
If $c < 0$, we can write $c = -a^4$ for some $a > 0$, and in the variable $v = \frac{u}{a i}$ the left-hand side is
$$\pm \frac{i}{a} \int \frac{dv}{\sqrt{v^4 - 1}} = \pm \frac{i}{a} F(iv, i) = \pm \frac{i}{a} F\left(\frac{u}{a}, i\right) ,$$
where $F$ is the incomplete elliptic integral of the first kind and where we've absorbed the constant of integration into $d$. Then, we can write $u$ in terms of the Jacobi elliptic function $\operatorname{sn}$:
$$u(x) = \mp a i \operatorname{sn} (a(x + d), i) .$$ The reciprocal of $\operatorname{sn}$ is denoted $\operatorname{ns}$, and so we may write
$$y(x) = \pm \frac{i}{a} \operatorname{ns} (a(x + d), i) .$$
The case $c > 0$ can be handled similarly, and the case $c = 0$ yields the linear solutions $y(x) = y_0 \pm x$.


What conditions would make having them sunken into the ground the predominant way of building large structures?

Question:
As he neared the outskirts of the city the canyons of multi-storey buildings lined with coffee- and tea-houses gave way to the large squat shapes of factories, storage-halls and other industry. If it weren't for the ramps leading below ground, or the occasional slid-apart roof of a shipyard revealing the envelope of an airship; one could easily overlook the sheer size of these buildings, sunken many levels into the ground.

NOTICE: I am looking for a solution within the confines given in the question. If your answer does not work without introducing anything to the world (e.g. super precise lenses, magical hotstones, etc.) please take the time to weigh up the pros & cons of whatever you introduce.

This question is set in my mind-bogglingly breathtaking conworld, where heavily armoured airships majestically float through the skies with help of a science-defying, yet well thought-through lighter-than-anything material1.
While you can make use of these facts & technologies in your answer. Making your answer work without them would make it much more useful for other people looking to solve the same or a similar issue

In order to achieve the desired aesthetic of having most of these buildings sunken into the ground, we'll have to excavate quite a lot of material.
E.g. for a building of 80x130m with 2 stories above and 3 stories below ground, we get a depth of about ~8m. That results in an excavated volume of 83'200 m3 - that is ~34 Olympic swimming pools1.
Now this leads to two problems in my understanding:

Depending on the ground this means possible huge amounts of labour necessary for a comparatively little advantage over building all above-ground
We have huge masses of dugout material of which we can directly use only comparatively small amount for building the above-ground walls and structures.

The crux is that rocky underground means we can quarry off quality building stone, but it's also more labour intensive to dig out. While softer underground means that we have an easier time digging, but we can't reuse much of the dugout for building...
1or 146'411'532 British Pints - thank you Windows Calculator

Area: The region I want to set these buildings & towns in is intended to be savanna-like to desert-like (take generously from Morocco and Namibia, sprinkle with Asia Minor, then roughly mix with a spatula).

Q: What conditions would allow for this way of building to be predominant in the described areas?
A good answer might choose to address one or multiple of the following topics:

What kinds of ground/strata would benefit this way of building large structures, and why?
What environmental conditions could benefit this way of building / maybe even necessitate it for large structures, and why?
How could the dugout be used so that it is not purely a waste-material?

Technology: The world is set technologically somewhere between the industrial revolution and the invention of internal-combustion-engines. There's been heavy development and optimizations regarding steam-driven-engines as there is, at least in parts of the world, little to no oil available.
Electricity is something fairly new and so far doesn't go further than being used for creating light aboard airships and being used for telegraphy (little to no electric infrastructure).
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/86083/discussion-on-question-by-dot-sp0t-what-conditions-would-make-having-them-sunken).
Comment: by "sunken" do you mean the buildings have fallen in to the undercity , or that they are built downwards, its not clear which you mean.
Comment: @John please have a look at the chat removed by our friendly and helpful mod L.Dutch there should be the remnants of a discussion there trying to explain...
Comment: @John also if you read the body of the question again it should clear up. There's at least one section talking about the need of excavating and getting rid of excavated material.
Comment: which could still support either interpretation it is a poor choice of words as building down and collapsing into underground construction are both valid interpretations of "sunken" the chat doesn't help at all. I suggest editing the question to make it clear since it is obvious others are also confused.
Comment: @John let me repost the comment from the chat that was there for additional clarification: **So yeah, the title said they perform the act of sinking, but was I meant was they they were sunken into the ground. https://www.merriam-webster.com/dictionary/sunken** - if that doesn't help I suggest you leave it be and move on, because I cannot explain it more clearly than that. It's simply not possible
Comment: did you read the webster's definition, "c : settled below the normal level
d : constructed below the normal floor level" again both interpretations are supported by the definition. And I still don't know which one you are using so clarity would be nice.
Comment: @John I quote again, *one last time*:      **but was I meant was `they they were sunken` into the ground.**
Comment: Which is a statement that supports both interpretations, it does not clarify. Pick a less ambiguous word please.
Comment: Please move this conversation to the already existing chat room.
Comment: @L.Dutch why can't you do that..?
Comment: @dot_Sp0T, system limitation, I guess.
Comment: Well I don't get the prompt either
Answer: There is no other option. The underlying rock is limestone, and it has a network of karst caves:

After several attempts to build something on top of the caves, they collapsed causing damage in life and property.
The solution was to simply build inside the caves. It is actually a pretty good idea. You don't have to dig too much out because the hole is already there! This solves your problem of waste material.
Whatever rock you do recover can be recycled to make Portland cement to actually build the buildings, because lime (= fired limestone) is an ingredient in the production of Portland cement.
In terms of climate, one would expect that you need to be in a rainy area in order to be able to dissolve enough rock to form the caves, but that in not necessarily the case. Karst caves form in a variety of climatic settings, from Southern Europe through the tropical Philippines to the arid Nullarbor in Australia. All you need is limestone and time.
Comment: @Hobbamok which is exactly what I meant with the example of the Nullarbor in Australia
Comment: And if your civilization hasn't got to the point of developing Portland cement, then it can just use lime to make lime-based mortar and cement (possibly with the addition of pozzolans to make the mortar set faster), like the Romans did.  (And the Egyptians were using lime-based plaster in 4000BC.)
Comment: To the "rainiy climate" part: not really, somewhen in the past it had to rain a lot.
That doesn't mean it can't be a desert now, so your idea works even better with OPs propositions :)
Comment: I am downvoting just for the "there is no other option" statement there are plenty of other options including hundreds of real world examples.
Comment: @John I think that phrasing is meant as in: There is no other option than sinking the buildings, they are too heavy and break into the underlying cavesystems.
Comment: @dot_Sp0T indeed. This is part of the storyline.
Answer: Ankh-Morpork is mostly built on Ankh-Morpork
Theoretically the city is built on black loam, but years of fires, flooding, and rebuilding mean that the city is mostly built on older versions of itself. If you want a couple of floors of basements, you just have to dig out the old buildings that lie underneath. Of course flooding is a good reason not to build downwards.
There's an important point to remember here. Most cities are built on fertile and riverside ground. You get a reasonable amount of soft ground under your feet that you can dig down into without excessive difficulty.
Draconian planning laws
Paris was built according to a plan. That plan forced all the buildings to look relatively uniform, have balconies that lined up with their neighbours and limited the height of buildings. If you want a larger building, but you're strictly limited in how far up you can go, perhaps down is your future.
Soft drifting sand
You can't really build large structures on it, but you can build on the harder ground underneath. It's not so much that you dig down to build as that periodically dunes roll through town and raise the effective ground level a few metres.
Related to this:
Wind
The howling debris laden winds that pass through mean that people want to expose as little of their building as possible to the risk of weather damage. A vast warehouse represents a massive exposure to the weather and hence risk of damage, sinking it into the ground protects the bulk of the structure from damage.
Generally sticking to low rise buildings will reduce the wind tunnel effect of larger buildings as the air at low levels is channeled down the narrow gaps through a city. If high winds are the norm in a region, keeping the buildings lower will make a much less hostile environment for pedestrians.
The city is built on its building material
London is built on a particular clay that is shown in the colours of London brick. You dig, you bake, you build, all using one hole. Paris equally is built on its own building material, the famous catacombs are originally the quarries for the stone from which the city is built.
However
No matter how you approach this, the sheer quantity of removed material far outweighs any usefulness on the scales you're asking for. If perhaps you were building small mud huts and using the excavated clay to build the walls then it's practical. However the good old square/cube law mean that this method fails to scale up to larger buildings and certainly not the large empty volume of a warehouse.

A customised solution
Match the Parisian style draconian planning laws to Parisian geology.
The city is bound to a two storey building height simply as a result of an arbitrary leader at an arbitrary point in history declaring this must be so. The warehouses are built over the quarries that the rest of the sprawling city is built out of. Most people don't build down, they build out. The city is huge and requires vast amounts of stone allowing you to get round the square cube problems from the size of your warehouses.
Comment: Paris is also limited in where it can put up highrise buildings by the Paris Catacombs, there's just not that much solid ground left under the core of the city.
Comment: I was thinking wind, too, but that's difficult to reconcile with heavy reliance on airships. Possibly if the winds were highly seasonal; a hyper-hurricane season in which all the airships were hidden in their hangers (underground), and everyone stayed indoors (underground). But this imposes constraints on vegetation and other world features.
Comment: +1 for considering planning laws based on aesthetic preference ie "We don't like jungles of towering buildings, so your buildings can't be taller than X"
Comment: @Ash, Paris is also built on Paris :) The catacombs are an example of the last option. They're the result of quarrying under the city for the stone the city is built of, only later filled with the bones of the dead.
Comment: Your last paragraph is mainly the reason for this question :)
Comment: @CCTO, this being the same conworld as [other questions](https://worldbuilding.stackexchange.com/questions/56329/how-to-make-my-beast-of-burden-work) by dot_Sp0T, then we're already aware that there could be some epic storms as they will potentially travel several times round that belt ocean before making landfall.
Comment: @Separatrix I still try putting questions as generic as possible where I can, to make them useful to a broader audience. But thanks for the consideration there.
Comment: Another example would be the Vaults of Edinburgh.
Comment: To the "you excavate far too much stuff" problem: not if the stuff you excavate has been sold for centuries, thereby constantly getting rid of almost anything you dig up
Answer: These already exist
This is more common than you think, most modern countries have cities with multilevel underground complexes. Tokyo is famous for how much of the city can be transversed by foot without ever coming to to the surface. Turkey in particular has had dozens of underground cities that are several thousand years old. Kaymakli City, Derinkuyu city, Özkonak City, Mazı City are just some of the examples, some of which go down many levels. removed stone was used to build additional above ground homes. Soft volcanic rock in the region makes excavating easy while still being strong enough for many levels of undercity. Dry hot conditions minimize the risk of flooding and makes the stable temperatures desirable,  several cities are actually self-cooling using underground wells and evaporation. there is is a steady gradient from ancient to modern underground construction, you can easily find the particular "feel" you are looking for.
To summarizes the conditions you need.

The area needs to be dry and high enough that there is little risk of flooding.
The underlying material needs to be either a soft but solid rock or it needs to be several meters of loose earth overlying a shallow hard bedrock. the former makes building as easily as digging a hole, the latter makes deep excavation necessary for large buildings but makes a dug out solid foundation easier than pilings, (once you have dug it out why not use the space)
extremely hot or cold environments will also encourage building down, as the ground has a steady temprature and makes a good insulator.

As for reusing the material, stone was rarely waste, it can be reused for building well buildings as well as roads, sculptures, and depending on the rock many specialized uses. The type of rock will determine what is easier, but soft rock that makes digging easy also makes turning it into blocks easy, so it is almost as easy to build up as down is some places.
The below example in Cappadocia Turkey is almost exactly what you describe, it even makes your alliteration literal as part of the city is build in a canyon, with surface structures built from stone removed from the underground. The underground construction is rather rough but that is because it is mostly unused in modern times. We see in other modern underground construction that these tunnels can easily be further refines and modernized if they stay occupied.
Answer: If the setting is desert-like then there are practical reasons and real-world examples for building into the ground rather that on top.
The prerequisite is a hard-packed and dry loam as the predominant soil. People can dig caves into the ground with the most promitive tools, so the tradition of building houses this way can date back into prehistoric times. Over time the caves evolved to multi-room buildings with inner courtyards and storage space in a second storey.
The obvious advantage is the stable climate you have inside the cave-house. The thick walls insulate against the scorching heat of noon and the freezing cold of night. The entrances are all build facing the one direction where the cool breeze comes from to trap cool air in the courtyards. The building itself provides shade for the yard.
The dug-out can be used to construct buildings (or parts thereof) above ground by mixing some water in and forming the loam into shape. Over time the ground level will rise naturally because you cannot use all of this dugout. You can also use it for repairs after rainfalls.
I saw a village built in this way in the Sahara in Tunesia. The people there preferred their cave-houses over modern concrete buildings. I don't know how big one room can be made. You probably have to include pillars to stabilize the ceiling in factory halls.
Answer: There is a small town in Australia that is mostly underground due to harsh environment.
https://en.wikipedia.org/wiki/Coober_Pedy
Note the upfront cost is the same but running costs (ie air con) is much reduced. It is economically smart to build underground in that environment.
Also note multistorey buildings only make sense if land is valuable and scarce. So it makes sense to spend a lot extra on building. Note in a multistorey building each floor has less usable area than a single storey (stairs etc).
Any building activity requires either trees to die or massive holes in the ground called quarries. Your world seems to lack trees. So quarries are the only local option for building material. Instead of digging quarries away from urban centres, they turn each quarry into a building when finished.
Comment: Why does my world lack trees...?
Comment: Australia comes up from time to time on world building! :)
Comment: @CatCat Why does my world lack trees...?
Answer: Natural canyons, if the ground is cut by deep canyons, either erosional or tectonic in origin, then cutting buildings into the walls of those breaks makes more sense than quarrying and building above. This is particularly applicable when the rock is industrially useful, Rocksalt or other evaporites, Limestone, Dolomite, Gypsum, any of a number of Iron ores that form thick geological units (banded iron stone, hematite, magnetite for a start) or coal measures. There may also be a demand for building stone elsewhere that could fuel the cutting and transport of the local rock, this may be because the rock is superior to that found elsewhere (from either an engineering or aesthetic standpoint) or it may be because the local rock is socially significant (bringing good luck or of religious significance).
The natural canyons provide ease of access making the process more economically appealing and logistically manageable but may not provide an incentive of themselves, a hostile environmental setting does. If surface of the area the buildings are in is inhospitable due to climate, vegetation, or fauna, then building down rather than up is preferred. There are a number of modern cities that have active or historical tunnel networks created for this reason, Montreal's "Winter City" is quite famous.
The other option is that the underground building is a matter of social necessity rather than being in any way cost effective. Never underestimate the power of religion; if the locals have a strict belief that any building that rises higher than a sacred quall bush is an affront to the gods they simply can't build up. Thus to have the high density population centres needed for industrialisation they will have to dig down for living space.
Answer: You're in a desert?  Your buildings function as solar stills.  It's really very expensive to haul water over the vast desert sands, even by your implausible airships.
 Therefore, and to contribute to sustainability and economic independence, each building is build in a cunning fashion so as to route outside air down to the lowest levels, where the air is simultaneously cooled and also relieved of the undue burden of its water vapours.  This water, along with careful water management practices, helps to ensure the independence of this desert nation from outside forces who would try to influence it through the monopoly of vital resources.
The ground-cooled air also contributes to the comfort levels of the buildings, lowering energy expenditures on air conditioning (if your civilization has that technology).
Answer: Realistically, the amount fo digging and spoil, as well as issues of potential flooding make this very unlikely at best.
However, you could have the effect of an underground city by roofing over a narrow canyon or large ravine and building along the sides, leaving the open space like an atrium. Depending on the technological abilities of the nation, this technique could also be adapted for worked out quarries and open pit mines.

The interior would have this effect
The giant roofs would provide shelter from extreme heat, cold or raging winds (or whatever other environmental issues plague the population) and moderate the temperature. The interior space between the walls would function like an atrium in a building, and could be used as public space, for gardens and other outdoor activities. Due to shading issues, it is unlikely that you could practice intensive agriculture.

A more naturalistic space, but in reality the trees turned out to be too expensive to maintain
So a roofed built over a natural canyon, ravine or man made "hole" like a quarry or an open pit mine might fulfill the bill. It will provide shelter from extreme weather, and might even be a pleasant place to live, so long as provisions are made to prevent flooding, and a secure source of food is nearby to feed the population.
Comment: Also the Eden project.  -  https://en.wikipedia.org/wiki/Eden_Project
Answer: Underground structures have many advantages.  They have better insulation against extreme solar heat (from a binary star system, for example) and extreme cold.  They can withstand hurricanes, tornadoes, forest fires, blizzards, dust storms, pterodactyl-size predatory birds, and earthquakes.  They are a natural defense against early 20th century weaponry, meaning artillery, catapults, cannons, aerial bombs, al Qaeda suicide zeppelins, and snipers.  Defensive anti-aircraft guns and missiles will have clear unobstructed shots at enemy aircraft without buildings blocking their shots.  Water does not need to be pumped up to a reservoir since all the water users will be at lower levels.  Plus, once the population grows, it would be easy to enlarge the living spaces by digging down, rather than building more levels to the top of a highrise building.
Underground buildings are vulnerable to floods so assume the elevation of the cities are high enough to avoid such catastrophes.  Waste water and sewage would have to be disposed of in some way, so assume the lowest levels of the structures can still use gravity to drain waste water to a waste treatment facility elsewhere.  Once the structure drops below 200 feet the natural heat from the crust will become uncomfortable.
So what should be done with the excavated rocks?  Iron ore and uranium can be processed for useful tools and energy.  Coal can be used to power the steam engines.  Granite, marble, and quartz can be used in kitchen and bathroom countertops.  Less useful rocks can be dropped underwater to form artificial reefs, which can increase the population of fish for aquatic farming.
Answer: Space for Airships.
This is an airship heavy world, there could be rules against building tall buildings or there are social and economic advantages to not having tall buildings. For example if most buildings in an area are low and of similar height it becomes easier to approach, moor and load/unload Airships there. A high building would make that harder and lower the local property prices.
Emergency infrastructure designed around Airships.
Similar in execution as the above but for differenr reasons. In our world we can reach just about anything by car. Cant reach it by car? We'll build a road so you can. Now imagine a world where the primary transport choices are walking, horses&carriages (no cars especially with the lack of fuel), bicycles (if any), trains or Airships. City planning might simply not include large roadways for transport, cargo and evacuation purposes. With Airships being so important for getting around a city the heights of the buildings are limited. I heard that there were actual rules that you were not allowed to build higher than the mooring masts of Airships but I cant find references to it.
Protection against warfare
This is set around the industrial age, with a different history and Airships so prevalent the act of stragetic bombing can be both feared and practiced a lot. As alternative you could have sabotage and terror attacks similar to Vietnam or Partizans in WWII by commandeering an airship and having it ram tall buildings with a large payload. As a defense mechanism building into the ground could be less expensive than armoring tall buildings against damage and having a widespread network against such attacks.
Scientific misconceptions.
There have been tons of misconceptions in the past, such as that trains going more than 30km/h would mean its occupants would suffocate. The misconception could simply be that building too high would make the buildings catch too much wind and they would topple.
There are still plenty of reasons why building underground is going to be expensive and challenging, from getting enough fresh air into the buildings to their construction. But is it important enough to take into consideration? It might be like sound in space: it doesnt make sense in our world but damn doesnt it add to the feel of a well fleshed out world.
Answer: Think about lighting
One of the reasons for building up is to have windows to let in light.  Old factories and schools often had more window than wall.  Unlit space is only useful for storage.
One possibility is to have your people's eyes more sensitive than ours, relative to outdoor ambient light levels.  Then maybe they build underground to get away from excessive light.
Otherwise, while lighting considerations can't explain why people build underground, you need to explain why they don't keep people above ground.  To do that, you need cheap, effective lighting.  In the era you're taking your tech from, we had skylights and deck prisms to distribute natural light, but they couldn't consistently keep a desk light enough to work on, especially on the second story down.  We also had candles and whale oil for artificial light, but they weren't all that expensive and weren't cheap.  Gas light may also have been available; I don't know how good it was.  So, you need to introduce something special.
Answer: On Earth, building underground has been suggested for several reasons:

to protect the houses from hurricanes
to protect the houses from cold
to preserve the surface on the roof of the houses as arable land or air filter or oxygen source
because skyscrapers are ugly so we hide them in the ground
Answer: The most plausible reasons are solar radiation protection (sudden flares) and thermal management (less sun facing surface) as in the answers by hyperion4 and CatCat.
Basically unless you decide that the environment has a inconvenient sun you will have to make some other reason that the surface must be kept flat.  The desert lets you stay below ground level because you do not have to worry about rain but you have a lot of other problems, you need to maintain airship wind speeds, you have to keep your structures clean of sand. You need to manage sewerage and lighting and a host of other things we take for granted with gravity pulling things down hill.
The only convincing reason is the immense cost and irritation of protecting structures from the regular and debilitating explosive tumble weeds.
However as these tumble weeds are explosive to help disperse seeds and penetrate natural barriers they are a nuisance on this continent.  All the flat areas have been levelled to an almost perfect runway flatness by explosions on any bumps and filling with wind driven sand, clay and dust.  Eradicating the plants is near impossible and wildlife and crops are only grown on the slopes and mountains that the tumble weed does not overrun.  The flat land is no use for anything except solar collectors and underground structures that maintain a flat top when closed.  Periscopes and wind sensors are used to check before opening doors.  Once on the surface the area can be inspected and scanned by lasers to determine if there are any bushes moving closer.
Temporary work and larger construction in the correct non-tumbling season is safe enough but having any protrusion is an invitation to erosion by inevitable explosions.
The surface is flat enough to land aircraft but parking them there or landing in a wind is asking for trouble so this continent has elected to use airships and work underground.
Teenage rites of passage include catching a tumble weed bush while windy (must grab and hold the roots) and juggling one or more to gain rights of not chaperoned dates with consenting partners.  Household chores include taking the garbage out to the local explosive detonation pit and vacuum cleaning the seals and hinges in the doors and surfaces of windows and solar collectors.
There is enough subsurface water to provide for small green houses and domestic use but no rain to cause flooding.
Comment: Also it came to mind that the primitive early explorers to this continent were able to harness the exploding power of the tumble weeds by collecting them in the early morning on those days that there had been a dew fall and they were insensitive.  When damp they can be powdered and blended into stable explosive mixtures and inserted into casings and used as demolition charges to excavate underground.


How to delete .ldf file from SQL Server 2008?

Question: If I stop SQL-server and then delete the .LDF file (transactionlog file) to the database, what will happen ? Will the database be marked suspect or will SQL-server just create a new automatically ? SQL Server 2008 R2
And My .LDF file Size is Too Big, So how to manage it, whether I can Shrink it or delete
Please Suggest in the Query Form.
Comment: **DON'T DO THAT!** you'll loose your entire transaction log. Why would you want to delete the transaction log? It's an **integral** part of your database! Don't go just delete files behind SQL Server's back - **NEVER!**
Comment: Read this; http://stackoverflow.com/questions/480897/how-can-i-manage-sql-server-log-size
Answer: You should not delete any of the database files since it can severely damage your database!
If you run out of disk space you might want to split your database in multiple parts. This can be done in the database's properties. So you are able to put each part of the database to a different storage volume.
You also can shrink the transaction log file if you change the recovery mode from full to simple, using following commands:
ALTER DATABASE myDatabase SET RECOVERY SIMPLE
DBCC SHRINKDATABASE (myDatabase , 5)

Switching back to full recovery is possible as well:
ALTER DATABASE myDatabase SET RECOVERY FULL

Update about SHRINKDATABASE - or what I did not know when answering this question:
Although the method above gets rid off some unused space it has some severe disadvantages on database files (MDF) - it will harm your indexes by fragmenting them worsening the performance of your database. So you need to rebuild the indexes afterwards to get rid off the fragmentation the shrink command caused.
If you want to shrink just the log file only might want to use SHRINKFILE instead. I copied this example from MSDN:
USE AdventureWorks2012;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE AdventureWorks2012
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (AdventureWorks2012_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE AdventureWorks2012
SET RECOVERY FULL;
GO

Answer: Do not risk deleting your LDF files manually! If you do not need transaction files or wish to reduce them to any size you choose, follow these steps:
(Note this will affect your backups so be sure before doing so)

Right click database
Choose Properties
Click on the 'Options' tab.
Set recovery model to SIMPLE
Next, choose the FILES tab
Now make sure you select the LOG file and scroll right. Under the "Autogrowth" heading click the dots ....
Then disable Autogrowth (This is optional and will limit additional growth)
Then click OK and set the "Initial Size" to the size you wish to have (I set mine to 20MB)
Click OK to save changes
Then right-click the DB again, and choose "Tasks > Shrink > Database", press OK.
Now compare your file sizes!:)
Comment: Looks like step 10 happens automatically when you hit ok in step 9.
Answer: I did it by

Detach the database (include Drop Connections)
Remove the *.ldf file
Attach the database, but remove the expected *.ldf file

Did it for 4 different databases in SQL 2012, i should be the same for SQL 2008
Comment: +1 for you! I don't know why people tend to ignore the question and treat you like a baby (e.g. those answers "Don't do this because it is dangerous"). I receive SAMPLE and TEST DBs from customers. I just need a temporary access to their data. Sometimes they have a LDF file of 40 or 50 Gb! I don't care about restoring this DB, I just need to get rid of those 40 Gb in my HDD!
Comment: This is the answer I was looking for and the reason why I landed on this page. Thanks
Answer: As you can read comments, it is not good solution to remove log. But if you are sure that you do not lose anything, you can just change your DB recovery mode to simple and then use
DBCC shrinkdatabase ('here your database name')
to clear your log.
The worst thing that you can do is to delete log file from disk. If your server had unfinished transactions at moment of server stop, those transactions will not roll back after restart and you will get corrupted data.
Comment: dbcc shrinkdatabase is too big of a hammer.  If you're looking to shrink just one file, use dbcc shrinkfile
Answer: You should back up your transaction log, then there will be free space to shrink it.  Changing to simple mode then shrinking means you will lose all the transaction data which would be useful in the event of a restore.
Comment: Perhaps yes, perhaps no.  It all depends on what the database is waiting on to reuse log space.  Checking the log_reuse_wait_desc column in sys.databases for the relevant database will tell you.
Answer: The best way to clear ALL ldf files (transaction log files) in all databases in MS SQL server, IF all databases was backed up earlier of course:
USE MASTER
print '*****************************************'
print '************ Czyścik LDF ****************'
print '*****************************************'

declare
   @isql varchar(2000),
   @dbname varchar(64),
   @logfile varchar(128),
   @recovery_model varchar(64)

   declare c1 cursor for
   SELECT  d.name, mf.name as logfile, d.recovery_model_desc  --, physical_name AS current_file_location, size
   FROM sys.master_files mf
      inner join sys.databases d
      on mf.database_id = d.database_id
   --where recovery_model_desc <> 'SIMPLE'
   and d.name not in ('master','model','msdb','tempdb')
   and mf.type_desc = 'LOG'
   and d.state_desc = 'online'
   open c1
   fetch next from c1 into @dbname, @logfile, @recovery_model
   While @@fetch_status <> -1
      begin

      print '----- OPERATIONS FOR: ' + @dbname + ' ------'

      print 'CURRENT MODEL IS: ' + @recovery_model

      select @isql = 'ALTER DATABASE ' + @dbname + ' SET RECOVERY SIMPLE'
      print @isql
      exec(@isql)
      select @isql='USE ' + @dbname + ' checkpoint'
      print @isql
      exec(@isql)
      select @isql='USE ' + @dbname + ' DBCC SHRINKFILE (' + @logfile + ', 1)'
      print @isql
      exec(@isql)
      select @isql = 'ALTER DATABASE ' + @dbname + ' SET RECOVERY ' + @recovery_model
      print @isql
      exec(@isql)

      fetch next from c1 into @dbname, @logfile, @recovery_model
      end
   close c1
   deallocate c1

This is an improved code, based on: https://www.sqlservercentral.com/Forums/Topic1163961-357-1.aspx
I recommend reading this article: https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/recovery-models-sql-server
Sometimes it is worthwhile to permanently enable RECOVERY MODEL = SIMPLE on some databases and thus once and for all get rid of log problems. Especially when we backup data (or server) daily and daytime changes are not critical from a security point of view.


Windows 10 laptop shuts down instead of sleep

Question: For the past few days, my Acer laptop keeps shutting down whenever I close the lid or when I try to put it to sleep. When I choose "sleep" and I close the lid, and when I open it again, it takes a long time to turn on and the acer logo appears and it reboots. When I open my browser, it says "system did not shut down properly" or something like that. I'm not sure if my computer is crashing every time I close the lid or not. I set "choose what close the lid does" and "choose what the power buttons do" in the power options correctly but it still doesn't work. I also updated the BIOS for my laptop. I've seen some people say that the laptop shutting down problem is sometimes because of the Intel Management Engine Interface but my laptop doesn't even have the Intel section in device manager. Please help me fix my laptop from shutting down when I press the sleep mode and also shutting down whenever I close the lid.
Answer: check your bios settings for power management, I think there should be a tab in there somewhere for power management, Access BIOS at boot up by pressing F12 sometimes F3. Check your power management settings in windows itself I even want to say it could be a bad battery.
Comment: Could also be your enabled Hybrid Sleep (or it was enabled by default on your PC), which, as the name implies, is a hybrid between regular Sleep (RAM content isn't flushed; power to the chipset is maintained) and Hibernation (RAM content is copied to disk; power to the chipset is cut off), and something goes wrong during the copying-to-disk phase. Can you tell us more about your PC (how much RAM, CPU, free space, SSD vs HDD, size of the hibernation file, etc...)?
Comment: Yes, my Hybrid Sleep is enabled. Would that make a difference? I have 26 GB free space, my laptop uses SSD, I have 8 GB of RAM (6 GB still usable), and I don't know how to find the size of the hibernation file.
Comment: How would I know if it is the battery problem? And what do I do in the power management setting in bios?


Apply my preferred settings on new Windows installation

Question: When I install a new PC from scratch (either personal or by the company), I find myself changing a lot of settings each time, like

turn off indexing on drives
disable the search box in the task bar
unpin Edge from the task bar
never group buttons on the task bar
never group buttons on secondary task bars
show task bar buttons only on the monitor that has the corresponding window
don't show news in task bar
disable Cortana in task bar
do not restart after a blue screen
set pagefile to RAM size + 2 GB so that a full kernel dump fits in
turn off PC when pressing power button
maximum of 99% CPU on all power profiles to prevent Turbo Boost
set screen scaling to 100%
expand screen to multiple monitors instead of mirroring
use small symbols in control panels
disable animation effects
set the "no sounds" sound scheme
don't show most used apps in start menu
don't show recently added apps in start menu

And potentially (other people might want this, I don't need it until now, since the default settings are ok for me)

Clear Type settings
Screen background
Color theme
Screen resolution
Screen saver and screen saver timeout
mouse cursor

The tool that achieves this should

work with Windows 10
cost less than 30 €

Optional / ideal

ideally support other programs such as settings from MS Office
it would be super cool if it could apply a subset of these settings temporarily, e.g. while I'm working with the system (like "admin mode") and restore the old settings when I leave. This would exclude expensive settings like turning off indexing of the hard drive.

On this site I found some similar requests:

this question which is about changing the hard drive and migrating everything. I clearly want to do this on a new installation.
this one is more looking for a backup of the whole system. I need a fresh installation and then change settings.
this is looking for setting migration from the old PC to the new PC, but not the whole system. This is probably similar, except that I don't want to involve an old PC. Also, the kind of settings is different.
Answer: Microsoft recently released a tool called Power Automate (formerly Microsoft Flow), which I'm pretty sure has the ability to do what you want to achieve. Alternatively you could use an  automated installation script
Comment: Thanks for the answer. I'll check Power Automate. I am not looking for an automated installation script. This is already run by my IT department, so Windows is installed, there's a virus scanner available etc. My request is more about the details, the fine tuning.


Goblin Army doesn't spawn after using the Battle Standard

Question: The goblin army didn't spawn when I used goblin battle standard item. It consumed the item, but no goblins spawned. I haven't collected enough tattered cloth to try again yet.
Answer: It is indeed possible to summon the Goblin Army using the battle stand, although there are a few notes that should be taken:

A Goblin Army (and all later invasions) spawn around the center of the map, with the exception of the first wave, which will come from east or west. This will be announced through the message : "A Goblin army is approaching from the east/west!".
After the first wave reaches the center of the map, all future waves will spawn around the center of the map.
The amount of Goblins that will spawn is 80+40 for each player in the world.
You cannot summon a Goblin Invasion if:

You have less than 200 health.
You haven't smashed any Shadow Orbs/Crimson hearts yet.
If there is another invasion going on.
Answer: It only works at the place you first spawned and if you didn't use it at the spawn just go there and they should appear
Answer: I dont know if you still need help but if you do you need a minimum of 200 health I had this problem as well. So just mine near the dungeon and you should find some crystal hearts.
Answer: This problem is very common among many gamers, it is very easy to solve though. They spawn near or directly on top of your original or new spawn point, they also will spawn on top of your town and try to get rid of your NPCs in the progress.


Did Manjushri, Vajrassatva, Avalokiteshvara live?

Question: Did Manjushri, Vajrassatva or Avalokiteshvara live?
Are Manjushri, Vajrassatva or Avalokiteshvara manifestations or special names of Buddhas or Bodhisattva?
Answer: Vajrasattva did not live in the sense you mean, because he is not a person, but he is an existent. I will explain further:
The form body (Rupakaya), is divided in two:

The emanation body (Nirmanakaya), and
The enjoyment body (Sambhogakāya)

From a Tibetan viewpoint, Shakyamuni was an emanation body of the Buddha. He merely showed the aspect of being born, aging, achieving enlightenment, passing into parinirvana, and so forth [but was actually free from birth, aging, sickness and death and so forth]. While the enjoyment body is too subtle for ordinary beings to see, the emanation body is seen by ordinary beings. Wheel-turning buddhas are thus said to be emanation bodies.
Vajrasattva, on the other hand, would be the enjoyment body in the aspect of a Bodhisattva. Such a body can be seen by arya beings. We claim that when an arya bodhisattva chooses to be reborn in a pure land in order to receive teachings there from other bodhisattvas, he receives teachings from actual bodhisattvas as well as from the enjoyement body in the aspect of bodhisattvas (such as Vajrasattva, Manjushri, and so forth). Vajrasattva is one of these aspects, manifestations. He is a subtle manifestation of the form body of buddha.
Avalokiteshvara was one of 'the eight principal Mahayana disciples of Buddha Shakyamuni', that is the sambhogakaya in the aspect of a disciple. The same is true of Manjushri. The main difference between Manjushri and Vajrasattva, in relation to their entity, is that Manjushri is said to be a [manifestation of the] wisdom truth body (i.e. the omniscient mind) and not that of the enjoyment body.
Answer: Simply, in Mahayana Buddhism, they exist. All three of them are or were Bodhisattvas and are or will become fully Enlightened Buddhas upon the completion of their vows. The qualities of a tenth ground Bodhisattva are pretty close to the qualities of a fully enlightened Buddha.
Now for the complications:
They are not historical personages in the same way that, say Gautama Shakyamuni was. They are either myths, i.e. instructive fictions, or if one accepts the possibility of realms and other universes that can be known through meditative experience, then they are the Buddhas of other universes. A common "rule" in discussion of the realms is that there can only be one Buddha per universe at one time, with colossal gaps of time between them. So either these Buddhas are in other worlds (in one of the ten directions) or they existed a very, very long time ago. A universe can have many Bodhisattvas and Buddhas and Bodhisattvas can visit other universes through the use of other bodies (nirmanakaya).
Existence, to me, is not so important. If they exist, they are anatman, i.e. they don't have an unchanging core, they are empty/sunyata. I don't need them to exist with a birth certificate and the like.
Depending on who you are reading, you get different accounts of who is a Bodhisattva (not fully Enlightened) and who is a fully Enlightened Buddha. This confusion is compound when you take into account how the Bodhisattva path is explained-- a Bodhisattva reaches the edge of Enlightenment, but holds back because there are still more unenlightened beings in the universe. By this reasoning, you personally will be a fully enlightened Buddha before the Bodhisattvas are Buddhas.
Also, in the explanation of what Enlightenment is, the distinction between unenlightened and enlightened might not be what we think it is. In my readings the impression I get is that if we were nearly enlightened, it would all be clear. But as unenlightened beings, the distinction between the Bodhisattva and Buddhas are more distinct than what we naively think, in fact it may be that samsara and nirvana are in some sense the same and that the Bodhisattvas and Buddhas were always the same.


Proving $x \mapsto x^4$ is strictly convex

Question: I'm not sure how to prove $f(x) = x^4$ is strictly convex using just the definition of strict convexity: $$f((1-t)x+ty) < (1-t)f(x)+tf(y)$$ for $0<t<1$. Is this just an algebra slog? If so, I can't seem to get it to work. Are there any other ways of proving a function such as this one is strictly convex?
Comment: Try this idea: assume $y , x > 0$ and also $y > x$ . Let $u = \dfrac{y}{x} > 1$, and expand the LHS and divide both sides by $x^4$ to get a function of $u$, and prove it positive. This can be done since you have a homogenous polynomial in $x,y$.
Comment: Why is no answer accepted?
Answer: I assume you can prove, by definition, that $x^2$ is strictly convex and order-preserving on $\mathbb R_+$. Now, you use this result twice:
$$
\begin{aligned}
  ((1-t)x + ty)^4 &= (((1 - t)x + ty)^2)^2 \\
                  &\leq ((1-t)x^2 + ty^2)^2   &\quad (x^2 \text{ is strictly convex and order-preserving})\\
                  &< (1-t)(x^2)^2 + t(y^2)^2 &\quad (x^2 \text { is strictly convex}) \\
                  &= (1-t)x^4 + ty^4
\end{aligned}
$$
Answer: For a twice differentiable function $f$, $f''(x)>0$ for all $x$ implies that $f$ is strictly convex. (It is a sufficient condition.)
Here, $f(x)=x^4$. So $f''(x) = 12x^2 > 0$ for all $x \in \mathbb R \setminus \{0\}$. So $f$ is strictly convex on $\mathbb R\setminus \{0\}$.
Now suppose $x=0$ and $y \in \mathbb R$.
Then for all $t \in (0, 1)$
$$
f\big(tx+(1-t)y\big)
= f\big((1-t)y\big)
= (1-t)^4 y^4
< (1-t) y^4
= t f(x)+(1-t) f(y).
$$
So $f$ is strictly convex on $\mathbb R$.
Comment: Isn't the second derivative test only valid on an interval (or more generally, a convex set)? The second derivative test in this case would only tell you that $x^4$ is strictly convex on the intervals $(0,\infty)$ and $(-\infty,0)$, right?


Is there a best character in Button Men? Is there a worst character?

Question: Button Men is a free Print&Play game for 2 players. Each player chooses a character card, and the polyhedral dice associated with that character, and takes turns trying to capture their opponent's dice. There are over 200 characters created for it. Dice with more sides can capture opponent's dice more easily, but they are worth more to your opponents when they are captured.  Some analysis has been done with regard to strategy, but have the clearly best and worst character cards emerged?
Comment: Are you even certain that there are clearly best and/or worse characters?  This feels like a textbook setting for a non-transitive game ( http://en.wikipedia.org/wiki/Nontransitive_game ), and while some buttons surely dominate others, I suspect this is still going to turn out akin to 'which is best: rock, paper, or scissors?'...
Comment: I feel that it this might be true, but I know that some characters are banned from tournaments. I am guessing that some are banned for power reasons. I think that this question is too difficult a question for anyone to want to spend too much time answering. I think I will ask a different question first, "Which of the 12 Soldier Button men is the best", or perhaps who has the edge Avis or Hammer. With only 12 characters, that is only 66 possible match ups. The Soldiers release doesn't have any special rules, so it might even be posible to brute force all the matchups (quadrillions of outcomes).
Comment: And on the "worst" side, even Dead Guy (0,0,0,0,0) wins against poison-heavy buttons. So, pretty sure there's no definitive worst Button Man.
Answer: (disclaimer: i haven't played button men seriously in ages, but i'll share my impressions from back in the day)
My feeling is that Lab Rats is the best button, as its 2-dice will allow skill-attacks on far better dice than it has to give away. Bunnies, with its 1-dice is also strong, but can too-often get trapped into not being able to make any attacks.
The worst by far has to be the dragon with d30s all down the line. Yes, it can take anyone's dice, but odds are you're going to roll one of them low, and give up 30 points at once. Do that twice and there's no way to win against most buttons.
Some are banned from tournaments for power. i think lab rats and bunnies were both banned at some point. Some are banned due to non-playability (how would you roll a pi-sided die for the James Earnest button?), and some are banned for their swingy nature (the xxxenophile buttons, with their 3 x-dice, were considered too "swingy"; you could completely change the nature of your button between rounds, though it looks like they're back on the permitted list)
http://www.beatpeopleup.com/tourname.html
Answer: There was a "Button Men Online" website until recently that had amassed HUGE quantities of statistics on different Button Men competing (albeit being controlled by people users on the site). If you could get a hold of that data, that might answer your questions.
I've messaged @cheapassjames on twitter, he might have the data. Possibly, you could contact the site creator, Dana Huyler (but the email firstname.lastname@example.com seems to be out of order).
Comment: Well, James Ernest hasn't replied yet, so this might remain open for a while.
Answer: The site buttonweavers.com is a relaunch, and data from the old site in the source files.
Characters winning 84% to 75% of games
nelde, Snuff, mgatten, gslamm, relsqui, Discordia, skapheles, spindisc, Tilili, kestrel, Cristofore, bobby 5150, icarus, trifecta, roujin27, Lascivia, Weylan, flesh99, Jordan, NeoVid, Heather, fendrin
Characters winning 25% to 12% of games
Tess, Trogdor, Mr. Peach, stoooooooo, gman97216, Golo, Limax, Cthulhu
Cthulhu is the worst character in the game, based on almost 4000 games played with him.
Lascivia is the best official character.  The other characters like nelde and Snuff are from the Fanatics set, which isn't considered official.
95% of the characters win 25% - 75% of the time.


Content Overflow with

Question: I want my lightning:checkboxGroup to overflow into two columns in my fixed width and height box. I believe the best way to do this is to edit the css but I am not sure if this is possible with the restrictions of LDS and the fact that the id is actually aura:id. I've tried with adding class and updating the components CSS but this did not work.
Is it possible to update the CSS or force this box to have two columns? I feel like has to be something in the slds grid system.

    <lightning:checkboxGroup aura:id="checkbox"
                                         name="Checkbox Group"
                                         label="Add Topics"
                                         options="{! v.topicList }"
                                         value="{! v.selectedTopics }"/>

Answer: Please try it in this way.
HTML:

     <lightning:checkboxGroup aura:id="checkbox"
                                     name="Checkbox Group"
                                     label="Add Topics"
                                     options="{! v.topicList }"
                                     value="{! v.selectedTopics }"/>

CSS:
.THIS.multiSelect {
    height: 10rem;
    margin-top: 5px;
    margin-bottom: 5px;
    border: 1px solid rgb(221, 219, 218);
    border-radius: .25rem;
    padding: 0 1rem 0 .75rem;

.THIS.multiSelect .slds-form-element__control {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
}

Content Overflow with


New Idea for accessing memory across an inter-network connected system

Question: I have the following idea for a network-based operating system.
Suppose we have two computers A and B in a network. If computer B wants to access the memory of computer A, it can access by using the following addressing method which uses Media Access Control (MAC) address of the machines,
<code>(MAC Address of target machine).(memory address on target machine)
</code>
This should work both ways as well as all the computers connected in a network. This will also remove the constraint of passing reference of variables in Remote Procedure Call (RPC).
Is the above method feasible ? What sort of modifications are required to make this possible, if feasible ?
NOTE:-I am also assuming that there is no MAC spoofing.
Comment: What do you mean by "is it feasible"?  Why *wouldn't* it be feasible?  Have you done any research, e.g., looking at the research literature on Google Scholar?
Comment: That's not an addressing method, it's just two things written down next to each other. And assuming that there are no security problems is a great way to build an insecure system.
Answer: This would be an instance of a distributed shared memory architecture.  There's been lots of research on such systems.  I would recommend spending some quality time on Google Scholar to read relevant research papers on those kinds of systems, to learn about what's been tried so far.
You might also be interested in the literature on distributed in-memory databases, caches, and data stores.


Where can I find runtime of ibm quantum gates?

Question: I'm looking for the runtime of IBM quantum gates. For instance how long does it take to apply an Hadamard gate to a qubit ? and a CNOT gate to two qubits ?
I didn't find any answers in the documentation but it's possible that I didn't search hard enough.
Answer: There are some ways to do this:

There is an archived repository of IBM Quantum on GitHub containing some old as well as current backends of Qiskit: https://github.com/Qiskit/ibmq-device-information/blob/master/backends/melbourne/V1/version_log.md

Another way to check this is by adding using the commands %_qiskit_backend_overview or by backend.properties(). Basically try playing around with the backend commands. You'll get an output like this:

If you want to calculate the runtime of your circuit you can use the Qiskit pulse/compiler scheduler
Answer: You can find the gate length from the backend properties:
<code>from qiskit import IBMQ

provider = IBMQ.load_account()
backend = provider.get_backend("ibmq_manila")
props = backend.properties()
print(f"Gate length for CNOT to qubits 0 and 1 is {props.gate_length('cx', [0, 1])}")
</code>
Qiskit doc has a detailed example.


If energy can't be created or destroyed, then where does the energy from magnets come from?

Question: I understand that the energy come from the magnetic's electromagnetic field, but how does the magnet produce that? Does it come from the Earth's field?
Comment: Magnetic fields do no work - they don't expend energy.
Comment: Each electron has an intrinsic magnetic field, and these accumulate in magnetic domains to produce an overall magnetic field. https://en.wikipedia.org/wiki/Magnetic_domain
Comment: @user121330 We have to be careful when saying that magnetic fields do no work. This is true if we are considering work on (charged) particles. However magnetic fields do work on a piece of iron for example and the energy comes from magnetic dipole moment alignment.
Comment: Push something with a magnet, or push it with a stick; either way, YOU are the energy producer, the magnet (or the stick) does not play that role.
Comment: In physics potential energy is real energy, and along with kinetic is the total energy. Without potential energy we would have no fields and no forces, and nothing would exist.
Answer: From the same place that a falling rock does.
Like gravity, magnetic forces are conservative, and they are not sources of free energy. Thus, when two magnets snap together, they are performing work on each other and thereby liberating energy, but if you want to get them back to where they started you will need to put in an equal amount of work when you pull them apart. This is exactly as with gravity: a falling rock might liberate energy as it falls, with gravity performing work on it, but if you want to get it back to where it started, you will need to perform an equal amount of work on the opposite direction.
You might also ask how they get the energy to perform that initial burst of work, and the answer is equally simple. Take two bits of iron, and they won't attract, but if you magnetize them then they suddenly start trying to perform work to attract each other. Where did that energy come from? Easy: it takes energy to magnetize them, and it's part of that energy that gets used in the attraction (and which gets replenished as you pull the magnets apart).
Answer: The energy is not in the earth's magnetic field in your example. It is in the magnet's magnetic field. The earth's field is smaller than the magnet's typically, so a reasonable magnet near a needle will pull it to it. A magnetic moment being acted upon by a magnetic field can indeed do work. That is why two magnets attract and move each other.
Should not be strange that the magnetic field has energy. The gravitational field also does, and you see it when the earth attracts a body making it come down, changing to kinetic energy. In conservative systems or forces, there is a potential whose negative gradient is the force.
It is true that the magnetic field of a magnet is due to the little spins inside, each one thus having a magnetic moment, aligning and thus adding up and causing a macroscopic magnetic field. Wherever there is a magnetic field there is energy. Same for electric field, which will accelerate charges. Or the combination of electric and magnetic field, which can radiate, carry energy, and use that energy to carry a signal so you can watch TV.


Can you make sugar free whipped cocunut cream?

Question: I typically avoid sugar but I love whipped cream . Is this a thing?
The question is pretty straightforward. Thanks so much!
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Answer: First, know that sugar is not a required ingredient when whipping cream. It will come together fine without adding anything to the cream.
As to coconut milk, it typically has a fat content around 25% (compared to about 35% for whipping cream.) While it's possible 25% is enough to work, all the recipes I found skim off the water, resulting in an even higher fat content – likely 50%+ given the amount of water in a typical can of coconut milk.
So this is quite possible to do; personally I would try finding (or creating) a recipe that kept some or all of the liquid in, just in the interest of health and possibly making the resulting product a bit less heavy.
(Note this would definitely be something I would want to enjoy in moderation, given the extremely high amounts of saturated fat present in coconut milk.)
Comment: you can also buy cans of "coconut cream," which have a higher fat content to begin with. They will whip as-is.


How to create a dual-boot pen-drive supporting UEFI and Legacy BIOS

Question: How to create a Hy-bride boot mode pen-drive which can support both UEFI Mode and Legacy BIOS mode?
When we create a USB stick with UEFI mode which can't run in Legacy BIOS mode, and when we create a USB stick with Legacy BIOS mode that also unable to run in UEFI mode.
why I want both BOOT MODE?
1)for security :- I want to fix some problems or remove viruses--- for that I use bitdefender-rescue-cd.iso in UEFI mode.(But not run in Legacy mode.)/
2)For surfing :- Multi_boot USB which have both boot loader.
Also I was try YUMI(for making bitdefender-rescue-cd in UEFI) and Unetbootin(for making Linux_mint17.1_live_cd in Legacy) combined and I was successfully copy data into USB but only UEFI mode is Working.
 Is it any way to make or Copy Legacy or UEFI boot loader manually?
Comment: See these: Flash drive to boot in UEFI or BIOS - sudodus
https://help.ubuntu.com/community/Installation/UEFI-and-BIOS AND:
https://help.ubuntu.com/community/Installation/FromUSBStick#Ubuntu_single_boot_in_UEFI_mode
A new and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode
http://ubuntuforums.org/showthread.php?t=2213631&p=13262506#post13262506  AND:
http://spblinux.de/blog/2013/06/uefi-and-bios-bootable-usb-stick-with-grub2/
Comment: I have not tried both from one flash drive, as I have too many flash drives. But I do with either UEFI or BIOS directly install grub and put ISO on flash drive. Then manually edit grub to use its loopmount boot to directly boot ISO. Has worked for BIOS or UEFI for me. And then one somewhat larger flashdrive with many ISO. https://help.ubuntu.com/community/Grub2/ISOBoot AND:
http://askubuntu.com/questions/388382/multi-partition-multi-os-bootable-usb/388484#388484
Answer: I also have a Laptop whose motherboard BIOS supports both Legacy and UEFI Boot options.
I use RUFUS as a utility to create bootable media for both Linux and Windows platforms.
It has options such as Partition scheme and target system type which creates the bootable media for below mentioned types.

MBR Partition scheme for BIOS (Legacy) and UEFI
MBR Partition scheme for UEFI
GPT Partition scheme for UEFI

And also for specific type of ISO files supported with EFI-CSM , the utility is able to create bootable media accordingly.
To create a bootable USB that supports both Legacy and UEFI Boot options proceed as follows.

Open Rufus utility.
Select the USB drive onto which you want to create the live bootable media.
In order to support both UEFI and Legacy boot select the first option i.e MBR Partition scheme for BIOS and UEFI under partition scheme and target system type.
Select file system as FAT32 and Default Cluster size.
Tick the box with Create a bootable disk using and browse for the ISO file.
Click START and wait for it to complete.

After completion boot the USB on any PC and you will see that it provides option to boot through LEGACY and also through UEFI.
(NOTE: Ensure that your BIOS settings have been set to allow Legacy Boot options and not strictly UEFI.)
Here is a picture of how it works.!
Comment: This answer doesn't truly support both BIOS and UEFI as the solution requires configuring the PC to use legacy BIOS emulation
Comment: @HairOfTheDog is correct. On an Intel NUC 11, which does not support legacy BIOS booting at all (no CSM option), rufus-created "dual mode" drives are not visible!
Answer:     Rufus Persistent Pendrive install
That works with both BIOS and UEFI
Rufus does an OK job of installing Ubuntu Live to USB.
It works with both BIOS and UEFI.
It does not do Pesistent installs out of the box.
Many people prefer a Persistent pendrive that will save changes.

Create a Live pendrive using Rufus.
Create a casper-rw file:
sudo dd if=/dev/zero of =casper-rw bs=1M count=512
sudo mkfs.ext3 -L casper-rw -F casper-rw

(where count=512 is persistence size, with max 4GB).

Move the new casper-rw file to the root of the Live Pendrive.
Edit /boot/grub/grub.cfg, add a space and the word "persistent" after quiet splash ---.
Drive will now be persistent.

*Casper-rw partitions do not work with Rufus.


Autocovariance function of stationary process

Question: I read that for any stationary process the autocovariance function approaches 0 as the lag goes to infinity, but I can't find any proof of this concept. Is this really a general statement not depending on the kind of process?
Thanks!
Answer: The autocovariance $\gamma(h):=\Bbb E[X_t X_{t+h}]-[\Bbb E[X_0]]^2$ admits a spectral representation
$$
\gamma(h)=\int_{\Bbb R} e^{2\pi ihz}G(dz),\qquad h\in\Bbb R,
$$
where $G$ is a positive measure on $\Bbb R$, with total mass $\gamma(0)$. If the measure $G$ admits a density with respect to Lebesgue measure, then $\lim_{|h|\to \infty}\gamma(h) =0$ by the Riemann-Lebesgue lemma. The absolute continuity of $G$ is is known hold if and only if the process $X$ admits a moving-average representation.
Comment: If $\lim_{|h|\to\infty}\gamma(h)=0$, then $G((-\infty,x])$ is continuous in $x$.
Comment: This too is true.
Answer: I don't think this is true in general. If $X_t$ is stationary, so that $\mu=\mu_t=\mathbb{E}[X_t]$, $\sigma^2=\sigma^2_t=\mathbb{V}[X_t]$, and
$$ C_{X,X}(t,s)=\mathbb{E}[(X_t-\mu_t)(X_s-\mu_s)] = \mathbb{E}[X_tX_{t+\tau}]-\mu^2 = \gamma_X(\tau) $$
where $\tau=s-t$ is the lag and $\gamma_X(\tau)=\mathbb{E}[X_0X_\tau]-\mu^2$.
I believe you can say $|\gamma_X(r)|\leq \gamma_X(0)$ for $r>0$ using the Cauchy-Schwartz inequality $
|\text{cov}(X,Y)|^2\leq \mathbb{V}[X]\mathbb{V}[Y] $, so that:
$$
|\gamma_X(t)|=\sqrt{ |\text{cov}(X_0,X_t)|^2 }\leq \sqrt{ \mathbb{V}[X_0]\mathbb{V}[X_t] }=\sqrt{ \sigma^2\sigma^2 } = \sigma^2 = \gamma_X(0)
$$
using the fact that $\gamma_X(0)=\mathbb{E}[X_tX_t]-\mu^2=\mathbb{V}[X_t]$.
Note that, for ARMA series (pg. 84), you do get $\lim_{\tau\rightarrow \infty}\gamma_X(\tau)=0$.
Furthermore, in the case that one has $\lim_{\tau\rightarrow \infty}\gamma_X(\tau)=0$, the standard estimator for the stationary sample mean becomes consistent i.e.
$$
\lim_{n\rightarrow\infty}\mathbb{E}\left[\left(\mu - \frac{1}{n} \sum_{i=1}^n X_i\right)^2 \right]\rightarrow 0
$$


extracting information in presence of noise

Question: Assume I have a vector of displacements, when I calculate the derivative I obtain velocity. The problem is, there are so many noisy points and I am looking for one number as a velocity. What do you think is the best technique to obtain the velocity ? I am taking derivative and then take the mean, this gives me good result when there is not much noise however this technique is not really robust to noise also taking the median is not giving good result. Can anyone suggest a better technique to handle this problem?
Answer: Usually removing noise is a process depends on the type of noise.
Noises can be high or low frequency , you are using low frequency filters ( average and median) .
1. You did not describe the source of noise, we can not tell if it is a high frequency or low frequency .
2. Try to use a higher order low pass filter
Comment: The noise is AWGN noise, I can smooth the signal but at the end I am looking for one number and it turns out it does not matter if I want to use mean command whether I smooth the signal before or not.


Is the Lie Algebra of a connected abelian group abelian?

Question: Is the Lie Algebra of a connected abelian group abelian? I guess that this should be true, but how do you prove it?
Comment: @koch If $G$ is connected then it is generated by $exp(\mathfrak{g})$, and $e^X e^Y e^{-X} = exp(e^{ad X} Y) = exp(Y)$ for all $X,Y$ since $ad = 0$.
Comment: In what sense is this question "off-topic"?
Comment: "connected" is only relevant for the converse: if a connected group has abelian Lie algebra then that group is abelian
Comment: How can you show that the converse is also true?
Answer: Yes, and connectedness is not necessary. I know three proofs:
Proof 1
When $G$ is abelian, the inverse map
$$i:G\to G,\quad g\mapsto g^{-1}$$
is a group homomorphism. Hence, its differential at $1\in G$
$$di_1:\mathfrak{g}\to\mathfrak{g},\quad X\mapsto -X$$
is a Lie algebra homomorphism. But then
$$-[X,Y]=di_1([X,Y])=[di_1(X),di_1(Y)]=[-X,-Y]=[X,Y],$$
so $[X,Y]=0$.
Proof 2
For any Lie group $G$, the differential at $1$ of the map $\mathrm{Ad}:G\to GL(\mathfrak{g})$ is $\mathrm{ad}:\mathfrak{g}\to\mathrm{End}(\mathfrak{g})$ where $\mathrm{ad}(X)(Y)=[X,Y]$. But when $G$ is abelian, $\mathrm{Ad}$ is the constant map to the identity (since $\mathrm{Ad}(g)$ is the differential of the map $G\to G,a\mapsto gag^{-1}$ which is the identity when $G$ is abelian), so $\mathrm{ad}=0$.
Proof 3
For any Lie group $G$ we have that for $X,Y\in\mathfrak{g}$,
$$\exp(sX)\exp(tY)=\exp(tY)\exp(sX),\forall s,t\in\mathbb{R}\quad\iff[X,Y]=0.$$
If $G$ is abelian, the left-hand side always hold, so $[X,Y]=0$ for all $X,Y\in\mathfrak{g}$.
Remark about the converse
The last proof can be used to prove the converse when $G$ is connected. This is because $\exp$ restricts to a diffeomorphism from a neighborhood of $0$ in $\mathfrak{g}$ to a neighborhood of the identity in $G$ and a connected group is generated by any neighborhood of the identity.
However, connectedness is necessary for the converse. For example, if $T$ is any abelian connected Lie group and $H$ is any non-abelian finite group, then $G=T\times H$ is a non-abelian Lie group with abelian Lie algebra.
Comment: How do you show that the converse is true?
Comment: @koch See the remark.
Comment: @Spenser Hi, hope it's not too late to ask. In Proof 1, how did you calculate the differential of the inverse map for an _arbitrary_ Lie group G?


How is the GPS fused with IMU in a kalman filter?

Question: I've been trying to understand how a Kalman filter used in navigation without much success, my questions are:
The gps outputs latitude, longitude and velocity.
While the IMU outputs acceleration and rate angles. To use A Kalman filter, measurements needs to be in the same units ? The solution I would think about is to first define an origin. then each time my robots move, convert the latitude and longitude into Cartesian frame in meters, then use these displacement in the Kalman filter along with the acceleration. Is this the way used in practice ?
Or, is there a relation between quaternions and latitude and longitude change ?
Or, is the velocity from the GPS alone used in the position estimate in a Kalman filter ?
Comment: Did you get an answer? If yes, can you post it?
Answer: Yes, you have to match units. If you are fusing position you have to agree to use either rectangular units or degrees.
I saw you are from aviation background, so allow me to use some jargons. In general what people do is to use ECEF or some NED reference inertial frame. You set the vehicle origin w.r.t. to the IF and start integrating from there.
Is quite non orthodox to use gps velocity, but if this is the info you have, than you should use it. The more information, the better. If you do not have a magnetometer and a compass you can't track orientation very well, but you can estimate based on the velocity vectors you have.
Don't forget to account for coriolis effect, and centripetal acc when integrating.


spoofing with harassing messages

Question: How can you locate the source of spoof calls and texts.  I'm having threatening messages and deliveries made from my phone number, but not from my phone to my home and other peoples phones and they're thinking it's me
Comment: Best bet would be to contact your phone provider and see if they can do anything. If you are receiving threatening messages it would also be worth speaking to the police.
Comment: `I'm having threatening messages and deliveries made from my phone number` - how do you know? If people have told you, then advise everybody you know (maybe via social media) that your number has changed due to somebody sending malicious messages on your behalf, then get a new number. It's easier, less hassle, and it also covers you for anything in the future that may have otherwise caused you trouble. Unfortunately, it's very easy to send messages from somebody else's number - probably not much you can do about this.
Comment: If you contact authorities really put it on them or your case will not really go anywhere.
Answer: You personally don't investigate it as you don't have the access to do it. You need to get your telephone company involved, because there's no way for you to determine this on your own. If this is a mobile phone then it's likely someone has cloned your sim card, and you will need to get a new one from your provider to get it to stop. If it's your land line it's more complex to solve, in many places you can spoof a phone number using specialized equipment which is not that expensive anymore, but again it's your phone company who would investigate the source. If the source is outside their network it could be hard to trace.
Another path to a solution would be to determine who would want to do this. What's their goal? If you can figure that out then you probably know who is doing it, if you have a theory then take it to law enforcement as that's their job.
Comment: Also, `What's their goal? If you can figure that out...` - you just advised them not to investigate it!?
Comment: Cloning a sim card isn't necessary. It's very easy to send texts from a number that is not yours.
Comment: That's a good point @JayMee, I've edited to make the points clearer.

spoofing with harassing messages


Approaching Bayesian question with no prior

Question: Saw this question elsewhere online, couldn't quite get a grip on it:
"You have three friends, who tell the truth with probability 2/3 and lie with probability 1/3. You ask them independently if it is raining in your city, and they all say yes. What is the probability that it is raining?"
Now, if we have a prior for rain in our city this is a simple application of Bayes rule. But if we don't? I suspect it is then an ill posed/unsolvable problem, but one approach I considered was that the probability of them all lying is 1/27, so it should rain with probability 26/27. That doesn't seem right though.
Answer:
one approach I considered was that the probability of them all lying is 1/27, so it should rain with probability 26/27. That doesn't seem right though.

The reason that this doesn't work is that $1/27$ is your prior probability for them all to be lying. Once you've heard that they all say it's raining, then $1/27$ is no longer the correct number to use. In particular, the probability that they're all lying depends on your prior for wheather it's raining or not. If you initially think it's extremely unlikely to be raining (say $1:1\,000\,000$) then when they say it's raining you will think it's very unlikely that they're telling the truth. Conversely if you think it's very likely to be raining then you'll think it's very likely that they are telling the truth.
You do need your prior to answer the original question. Let $A$="they all say it's raining" and $B$="it rains" then $P(A|B)=8/27$ and $P(A|¬B)=1/27$ so (cancelling factors of 27) $$P(B|A)=\frac{8.P(B)}{8.P(B)+1.(1-P(B))}=\frac{8P(B)}{1+7P(B)}$$
Answer: Oscar's answer is mostly correct. Using the notation in his answer, i.e. $A$ = "they all say it's raining" and $B$ = "it rains", the Law of Total Probability gives us
$$
P(A) = P(A|B) * P(B) + P(A|\neg B) * (1- P(B)).
$$
The above probabilities $P(A|B) = 8/27$ and $P(A|\neg B) = 1/27$ are correct, allowing us to conclude
$$
P(A) = \left(\frac{8}{27}\right) * P(B) + \left(\frac{1}{27}\right) * (1-P(B)) = \frac{1 + 7 P(B)}{27}.
$$
The probability you want, $P(B|A)$ ("it is raining given that all three friends said 'yes'") is then
$$
P(B|A) = \frac{P(A|B) * P(B)}{P(A)} = \frac{\frac{8}{27} P(B)}{\frac{1 + 7P(B)}{27}} = \frac{8 P(B)}{1 + 7 P(B)}.
$$


I work remotely for a company in another state. Both states are witholding taxes from my paycheck. Is this right?

Question: I live in Pennsylvania.  I work full time 100% remotely for a company that is located in Connecticut.  On my first paycheck I was surprised to find that I was having state income tax withheld by both CT and PA.  Something doesn't seem right about this, so I wanted to ask if this situation is correct.  Will I really be getting double taxed just for working remotely?  Will I get a refund when I file taxes next year?
Comment: Each state has its own rules about what is taxable, and they don't necessarily match or respect each other. So you _could_ end up paying both state taxes. I don't know specifically for PA and CT.
Comment: Did you work any days in the corporate office? Did you submit any state level W-4 forms?
Comment: @mhoran_psprep I spent my very first week with the company in CT for onboarding purposes.  I may never go there again as far as I know.  I filled out CT W-4.
Answer: Did some googling, and this appears to be a unique difficulty of Connecticut that's hosing you. Typically, you would only be charged in the State where the work was actually performed-- IE, Pennsylvania, since that's where you were physically typing.
Unfortunately, Connecticut Law as of 01/01/2019 states:

Connecticut teleworker implications
Effective January 1, 2019, nonresident Connecticut income tax is
  imposed on all wages paid to employees working outside of state if (1)
  the state from which they perform those services is within Delaware,
  Nebraska, New York or Pennsylvania and (2) the work is performed
  outside of Connecticut for other than a bona fide reason of the
  employer.

My interpretation of this (which you should absolutely check with a lawyer about if you want to take action) is as follows:
If your employer did not give you the opportunity to work in Connecticut, you should not be paying taxes. Potential pitfall-- "given the opportunity to work in Connecticut" could mean a lot of different things. If they had an office and said, "would you be willing to relocate?" and you said "no," that might still count as giving you the opportunity to relocate. If they have an office that is a 3 hour drive from your home, they might claim that this is a reasonable distance to commute, etc.
If your employer did or does have an office in Connecticut close enough that you are able and willing to commute into it, you can avoid paying Pennsylvania income taxes by commuting to Connecticut. You would still pay Pennsylvania resident taxes.
Disclaimer: I'm not a lawyer, and all of this has been gleaned from a quick Google search or two. I am a fallible human, and there's every chance that I am interpreting this information incorrectly.
Comment: You might want to talk to the company's payroll department before spending money on a lawyer.  After all, it is not the state that is withholding the money, it's the company.  It could be something as simple as a mistake or misunderstanding on their part.
Comment: What kind of a lawyer do you recommend that I speak with?  Are there tax lawyers and such that could answer this question for me?
Comment: There are tax lawyers, and they would most likely serve you best. Just google "PA Tax Lawyer" and you should get a few options that you can call up. You can probably get a free consultation. Keep in mind that you will likely pay some fee if you wish to take this to court. Probably wise to guesstimate that fee before going to court. If you stand to lose, say, $1000 in taxes, but to pay $5000 in legal fees, and you'll only stay in the job for a year, it's probably not worth hiring a lawyer. (Numbers are made up and based on nothing but easy math)
Comment: @NegativeFriction I read it a bit differently. I read it that you are subject to the tax unless the company needs you to work outside of Connecticut for a legitimate business reason.
Comment: @Eric I think your interpretation is correct, but is not the matter I was referencing. Typically, if your company requires you to work in another State, then the company should be establishing their own branch in that State and paying the relevant taxes.
Comment: Why did they pick on Delaware, Nebraska, New York, and Pennsylvania?  That seems really odd.  I suppose there could be logic in selecting nearby states, but Nebraska?