Is there a way for a validator to get the current time?

Question: Is it possible for a validator to get the current time without it being passed in via the redeemer? My validator is heavily dependent on the time being correct so it would probably be a bad design choice to allow the wallet to pass in the time, as it can lie about the current time.
Answer: The usual way to handle time in Plutus is using Slot ranges. This means that the script does not query the time. Instead it checks that the validation happens in a given slot interval that corresponds to a time.
You can have a look at the notes about slots from the Plutus Pioneers Course.
With these slots, you can ensure that the validation takes place before, after or in a certain slot interval. And when you are sure that the validation takes place in a specific time interval, you also know the corresponding time. Each slot corresponds to one second as described here.
Comment: Perfect. Your response captures everything I questioning!
Answer: How about parameterizing the validator with Slot or POSIXTime and passing the current time from the contract to the validator script using Contract.currentTime or Contract.currentSlot?
That way, the wallet has no influence on it.
Comment: I could do this, but the issue is that the contract I am creating has quite a lot of different deadlines floating around. So asking for all of these up front would be annoying for someone using it and could allow for more mistakes/vulnerabilities.


Evolution of eyesight on a planet with a Methane biochemistry?

Question: If we assume their homeworld is similar to Titan, but instead orbiting a Neptune sized gas giant and a bit bigger and receiving the same amount of Solar energy as Titan, The star is a main sequence G type star, and the moon has a surface gravity of 0.28 G's. The atmosphere isn't smoggy like Titan so more light reaches the surface. What wavelengths are they likely to see in? If they came to Earth and observed the planet would they be able to see it like Humans do? Also would it be possible for them to have eyes that resemble some of Earth's species?
Comment: I'm not really sure where to start in regards to trying to come up with an answer for this. I'd say it depends a lot on to many conditions. Assuming they would have any similarities to us, look at creatures that live in dark places. If they have eyes, they are generally large and sensitive, so earth would be too bright. Unless there is warming from the planets radiation it is going to be very cold, so earth would be too hot. Honestly, I'd say use your imagination, think things through, and go with that. You're as likely to be right as anyone.
Comment: If this exomoon planet receives the same insolation as Titan, it must the same distance as Saturn from the Sun. Roughly a light hour away from its primary star.
Comment: Stephanie, I am grateful for your question. It helped solve a problem I had with aliens who inhabited a gas giant moon not at all too dissimilar from Titan and at a similar distance from their primary star. I couldn't work out what their vision would be like, however, having to think about your question gave me my answer too. Many thanks and an upvote for luck. It's the least I can do.
Answer: The amount of light will be 0.0178 of the light received by the Earth. Less than 2%. If vision is in the optical range, their eyes will have to maximize their light catching capacity. Basically they will be very big. Visiting Earth would be blindingly bright for big eyed aliens.
However, there is an alternative vision scheme. This was proposed earlier for another answer, but it certainly fits here.
This article by Robert Freitas called "Extraterrestrial Zoology", originally published in Analog, July 1981, has an interesting discussion of alien senses.
Vision, of course, is simply the detection of one narrow set of wavelengths of light within the entire electromagnetic spectrum. One alternative to "visual" sight is infrared (IR) vision, or seeing with heat waves. The rattlesnake is quite good at this – the creature has two imaging eyeballs operating in the visible, and two conical pits on either side of the head which permit binocular IR sensing of temperature differences as little as 0.002 °C. The theory of optics predicts that alien infrared eyeballs with resolution close to that of the human eye could have apertures as small as 4 centimeters at 93,000 Angstroms (the peak wavelength of black body radiation emitted by a warm human body). This compares well with the size of the eye of the Indian elephant (4.1 cm), the horse (5 cm), the blue whale (14.5 cm), and the largest cephalopods (up to 37 cm).
The fact that rattlesnake have binocular IR sensing and that optics can allow for IR eyes having the same resolution as the human eye, then alien organisms living on a low light planet would be able to see quite well if they evolved infrared eyesight. The ability to see such remarkably small heat differences means excellent vision even on a cold planet. Visiting Earth would be blindingly bright for infrared eyed aliens too.
Aliens with infrared eyesight would look grotesque. There would be large holes in their heads where we have eyes.
Comment: The animals on such a world would be adapted to seeing things around the ambient temperature, not Earthly temperature.  A warm human body would be like a iron smelting pot is to us.
Comment: Large holes meaning there would be no eyes? or no visible pupils just black?
Comment: Neither. The holes are their eyes. The thermoreceptors line what are effectively hollow spaces. our eyes are filled with the vitreous humour which is jelly, but it would absorb infrared. Infrared eyes look like hollows because they are overgrown versions of the rattlesnake's heat sensing pits. Look up details of rattlesnake heat pits and beef them up to suit your aliens.
Comment: Pit viper infrared sensors are open pits because a) IR is absorbed by water, and b) they have to be kept cool to avoid interference from the snake's own body heat. Neither of those apply to a methane-based creature on a cryogenic world. There's no reason they couldn't evolve eyes structurally just like ours.


Second order differential equation with a variable coefficient. Show |f(x)| is bounded.

Question: Was given this question as extra credit on an ODE exam. Didn't have time during the exam to consider it, but I have since then, and I'm stumped.
$$ f''(x) + f(x) = -f'(x)x^{2015}$$
$f(x)$ is twice differentiable and continuous everywhere. Show that $|f(x)| < M $ for some real $M$. Hint: compute the derivative of $f'(x)^2 + f(x)^2$.
I wrote this from memory, and I hope its correct or I've waiting quite a bit of time trying to figure this out. As per the hint, I compute the derivative and found that
$$ \frac{d}{dx}[f'(x)^2 + f(x)^2] = 2f''(x)f'(x) + 2f'(x)f(x) = 2f'(x)[f(x) + f''(x)] $$
So, that would be $2f'(x)$ multiplied by the left hand side of the given differential equation. In other words, if we multiply through by $2f'(x)$, we have
$$ \frac{d}{dx}[f'(x)^2 + f(x)^2] = -f'(x)x^{2015}*(2f'(x)) $$
$$ \frac{d}{dx}[f'(x)^2 + f(x)^2] = -2f'(x)^2x^{2015} $$
I didn't manage to produce anything fruitful from here. I tried to integrate both sides, but could not solve or draw any conclusions from the right hand side. I tried to isolate $x^{2015}$ and then integrate, but I couldn't solve the left hand integral. At this point, I was pretty stumped and tried a bunch of other ideas. I tried to solve the homogeneous system, to no avail. Then there was a fun attempt at creating a system of first order equations that left me with a, predictably, non-constant coefficient matrix. At that point, I decided to step away and ask for some help. Am I headed in the right direction with either of these attempts? If it helps, this is supposed to require only knowledge of calculus, so I'm certain the key lies above, especially considering the hint, but I'm not sure where to proceed. Solutions and hints equally appreciated!
EDIT: Forgot to mention, $f(x)$ is twice differentiable and continuous everywhere. Will include at top.
Update: Focused on studying for final exams but I will return to this! Still stumped.
Answer: What you have written down so far tells you that the non-negative, differentiable function
$$
u(x) = f'(x)^2 + f(x)^2
$$
satisfies $u'(x) = -f'(x)^2x^{2015}$ so that $u'(0) = 0$, $u'(x) \leq 0$ for $x > 0$ and $u'(x) \geq 0$ for $x < 0$ (and further, it is clear that $f(x)^2 \leq u(x)$).
For some intuition, you can interpret this as a mass-spring system, change $x$ to $t$, and write this
$$
f'' = -f - f't^{2015}.
$$
On the left-hand side, you have the total force, on the right, the opposite of the displacement (so this the usual restoring force in the spring) and then a force which, for $t > 0$, has the opposite sign of $f'$, so it is a damping force.
The quantity suggested in the hint, $u(x)$ is the total kinetic and potential energy in the system, and it makes sense that a damping force would decrease total energy for $t \geq 0$ (and thus the potential energy and displacement are bounded).
You can further check that this system is symmetric in time (i.e. $g(t) = f(-t)$ satisfies the same differential equation) so you get the same properties for $t \leq 0$.
Comment: I apologize if I overlooked something relatively trivial, but I'm having a hard time reconciling your statements about u'. Given that we don't have that much information about f or f', how do you figure that u'(0) = 2f'(0)[f''(0) + f'(0)] = 0?
Comment: @Zophir I have added more exposition


Jquery Cycle2 cycle-pager CSS issue

Question: Similar topic and continuing on the issue of following author:
Cylcle2 no cycle-pager shows up
I'm experiencing the exact same issue. Sadly beforementioned thread doesn't offer a direct solution to the issue.
I have come to the point where I have directly copied the code off of the cycle2 demo and COMPLETELY EXCLUDED ANY OTHER CODE in the attempt of debugging the problem:
http://jquery.malsup.com/cycle2/demo/pager.php

I have also downloaded and included the CSS code that is mentioned on the website.
Link: http://jquery.malsup.com/cycle2/demo/demo-slideshow.css
Snippet of the CSS code which refers to the pager:
 /* pager */
.cycle-pager {
    text-align: center; width: 100%; z-index: 500; position: absolute; top: 10px; overflow: hidden;
}
.cycle-pager span {
    font-family: arial; font-size: 50px; width: 16px; height: 16px;
    display: inline-block; color: #ddd; cursor: pointer;
}
.cycle-pager span.cycle-pager-active { color: #D69746;}
.cycle-pager > * { cursor: pointer;}

Now, for the actual issue:
Note that I have literally copied ALL the code, included the correct javascript scripts and uploaded them to my server.
When I test; the javascript seems to be doing its job, and when I hover with the mouse over the image, the cycle.pager actually appears to be working.
However, no matter what I try, the CSS code doesn't appear to function 100%. My theory is that for some reason it doesn't grasp the .cycle-pager span and other classes and therefore doesn't show correctly - but then how is it possible that it works on the Cycle2 website?
I'm at a total loss here - and am dying to understand it. Looking forward to your reply - thank you in advance!
Answer: First and foremost, you need to declare the pager on the slideshow (yourPagerBox).
Also, your pager needs to be outside the slideshow, because it's not supposed to be "cycled". Html example below:

Jquery Cycle2 cycle-pager CSS issue


How does Drupal ensures that the one time unique URL used to reset user password does not get transferred away inside the http_referer header?

Question: For example in case the site relies on and loads some external JS (such as jQuery via CDN). Quite technical but any insights are highly appreciated. Thanks.
Answer: At this point in time, it doesn't.
There's an issue to fix this in Drupal 8, after which it will (hopefully) be ported back to 7. Patches are currently awaiting review.
Comment: Thanks for the fast reply. I posted the question because I am considering enabling some sort of URL path login system based on long auth key like this: /login/--{long alpha-numeric string}--

Each user should have unique auth key. The moment he loads the URL, Drupal loads the $uid of the user that has that unique key value defined inside some custom field and logs him as that user, and then redirects him to some privileged member area. All done over HTTPS.

My tests suggest that the validation and login in code happens before loading some external JS file. So no auth key gets passed remotely.
Comment: If the redirect is happening before any HTML is delivered to the browser (i.e. before any external requests can be made for the page whose URL contains the key), then you don't have anything to worry about, no
Comment: Thanks @Clive .. I am considering now validating the auth-key in pure SQL and if the key is found, only then I would bootstrap Drupal, login in code using "user_login_finalize()" and at the next line of code I would execute drupal_goto(). I think all of this doesn't involve any HTML rendering.
Comment: Couldn't hurt - also make sure you're using https or all of these security measures are moot ;)


Frame of reference

Question: Consider the situation: a body slides down on a wedge with only gravitational force as an external force. I calculate the the velocity of the body in the wedge's frame using work energy theorem. Now I use this velocity of the body to find the velocity of the wedge in ground frame using conservation of momentum.
The point is that can I do this? That is, can I use two separate frames to find different quantities and then relate both to find something else?
Answer: You can do this, with some caveats:

Some frames of reference will show objects as having different velocities.  You will need to convert the velocity into the new frame to continue.
Some values, such as energy, are conserved within a frame but are not conserved when changing frames of reference.  Thus, you can use energy to calculate the velocity within the wedge frame, but you would get in trouble if you calculated the energy of the body in one frame, and then used that energy number to do conservation of energy calculations in another frame.
Answer: The first place you're going wrong is that you're talking about velocity at a place the only thing you can talk about is acceleration. If you're talking of a time dependant expression for velocity, then I suggest that you use  acceleration to avoid ambiguity.
Now, coming to you using the Conservational Law of Momentum: think if you can apply that to a system where external forces are influencing the bodies' motion. Hope this helps.

Frame of reference


Growing bunching onions from seeds

Question: I have some bunching onion (green onion) seeds. I have been trying to grow them indoors in small 1x1 inch pods. I also tried to plant them directly outdoors in my raised bed. I had no success so far in getting them to germinate. Any pointers on how to germinate bunching onions would be appreciated. I am in the San Francisco / Bay Area.
Comment: How do you know the seeds are good?
Comment: I am hoping at least a few of the ones in the packet are good they all can't be bad (at least in my experience)
Comment: How old is the seed? How long have you waited? What temperature is the soil at where the seeds are? I'm trying leeks this year, and they are among the slowest to germinate of my various plants.
Comment: I purchased the seeds last year and it has been over 3 months since I planted them. Indoors I put them on a heating mat so temp must be warm. Everything germinated. Outside temp ranges between 50s at night to 80s Fahrenheit
Comment: Onions are pretty hardy and I've grown leeks and chives from seed, but not onions. The onions I have don't make seeds on top, they make baby onions! Perhaps your seeds are bad. Do you have a date on when they were harvested? I put my seeds in medicine jars and put the date of harvest on them with a Sharpie. ALSO, they may not germinate if it's too cold, they might wait for a warmer series of days, 50-60F or so daytime temps.
Answer: I can answer how I grew mine. I collected the seeds from one that I planted from the supermarket. In mid summer I  scattered the seeds onto some potting mix in a raised bed (an old bath), lightly covered it with more mix, and then spread black weed mat over it to protect from birds as well as increase the humidity level.
The seeds germinated in less then two weeks.
Comment: I have seen a small portion of my seeds germinate to what you show in your picture.  Few days later these disappear (which may be a different problem from not germinating at all).
Comment: So, not animals if it's happening inside.  Maybe damping off or something.  Try again with some flats filled with potting mix, sprinkle the seeds on top, and then cover lightly with vermiculite.

Growing bunching onions from seeds


Why do we have to do a clean install in order to upgrade to Juno?

Question: The reason I ask, is because wouldn't it be easier if you could just upgrade it like Ubuntu rather than having to do a clean install?
Answer: ChrisD93, welcome to the elementary OS forum!

In theory, performing an update from Loki -> Juno could save time and some effort.  However, taking shortcuts is not always in your best interests.  I, personally, considered Loki ready for my in-production mobile test platform (a Razer Blade Stealth). The new revision, Juno, included a new version numbering system, major updates to the AppCenter, Scratch became Code (with a focus on programming), upgrades to Files, Music, Photos and Terminal.  Along with the updated UI "look and feel" came additional security updates as well.

There is an entire article about this from the elementary OS dev team here.

ChrisD93, I can hear you saying "but what does all of that have to do with upgrades"?  During my time in enterprise IT, my team (and yours truly) had to manage over 1400 workstations and over 1000 mobile clients.  Each summer, we would reset our labs for use in the fall. Computer imaging has changed greatly over the years from monolithic imaging (replacing the OS and all of the applications), to modular imaging (replace the OS and "push" out applications) to thin imaging (just apply settings and applications over the existing OS).  By avoiding upgrading OS over an older OS we didn't have to fight old configurations, settings, services, applications and whatever was "left over" from the old installation.  Simply put, in today's age of cyber-security what you don't know will (and can) hurt you.  Having a stable and secure computing experience is enough for me to perform a "clean" installation.  I'm not just singling out elementary OS.  I apply this same process to macOS and my Windows clients as well (both personally and professionally).  I believe this extra effort on the front end equates into a more stable and reliable computing experience overall.

Whew, that was long!  Other people will have different points of view and that is OK!  I just have never been disappointed with the "clean installation" approach.  I do so much customization after the installation that I need to be sure that I'm building on a solid foundation.

That's my two cents!
Comment: Your participation is much appreciated. Please read, [Let's enforce branding guidelines in edits](https://elementaryos.meta.stackexchange.com/questions/5/lets-enforce-branding-guidelines-in-edits).
Answer: Though elementary OS is based on Ubuntu LTS but it doesn't have rolling release. Which means you'll have to perform clean install to install a newer version rather than upgrade.


1D Elastic Collision with restitution coefficient

Question: I have an exercise about a 1D collision with a certain restitution coefficient, that is: $$e = \frac{|u_1-u_2|}{|v_1-v_2|}$$ One must calculate the velocities of the 2 colliding masses after the collision, with the mass and initial velocities given. They collide head-on, and thus the motion is all on the $x$-axis if you will. I found 2 solutions (obviously as you have to solve a quadratic equation), but they are both quite possible. One of the solutions has both masses moving in the same direction as they were before the collision but with a smaller magnitude and the other has them both traveling opposite the direction they originally came from. How do you determine which of the 2 solutions is more likely in such a scenario?
Comment: I mean i guess that the second option is just if the particles pass through one another.
Comment: Check your working as one of the solutions should be the initial conditions.
Comment: Well normally one of them would be if you just solve it without the restriction of the restitution coefficient, but here that isn't the case. I get 2 different solutions and neither of them is the inital condition.
Comment: Moving in the same direction . . . . but with smaller magnitude implies that momentum has not been conserved.
Answer: here in this question ,If the 2 bodies are moving in same direction, the velocity of the following body must be greater than the velocity of the first body in order to collide with it. other wise the relative separation between them exits always..Or if the bodies are moving in opposite direction, collision can be possible whatever be there velocities. So make sure your knowledge about their direction and magnitude both..


Predefined Tags For Editors

Question: Is it possible to set up predefined tags in craft which can then be used as either a select list or checkbox selection by editors, so as to only give them the option of adding preset tags as opposed to adding any tag they want?
Answer: Not really (or not without a custom solution anyway) — tags are designed to be added by anyone. You might be better off using categories for this, which you can resist access to via userGroup permissions.
Comment: thanks gone down the categories route and it works exactly how I need it to. Wasn't aware you can relate multiple categories to a single entry.

Predefined Tags For Editors


What exactly is echo '[local]\nlocalhost\n' > /etc?

Question: RUN echo '[local]\nlocalhost\n' > /etc/ansible/hosts

This line is in my dockerfile, and I assume it just means add localhost to the ansible/hosts file?
Can someone break down what [local]\nlocalhost\n is in a bit more detail?
Answer: This line tells Docker to run the shell command: echo '[local]\nlocalhost\n' > /etc/ansible/hosts
That shell command will print the following text block in the file /etc/ansible/hosts:
[local]
localhost

It does this because \n is the "newline" character, signaling the beginning of a new text line. That means that echo has been instructed to do the following: print the text [local], then start a new line, print localhost, and finally start another new line. This output is redirected using the special > character, and the destination after redirection is specified as /etc/ansible/hosts. While that file may not have a .txt extension, you can think of it as a plain text file.
That file is probably specified  because it is used by Ansible to communicate with different hosts (in this case localhost) through its inventory functionality.
So yes, you were essentially correct -- this adds localhost to the Ansible hosts file. It's worth noting that this command will overwrite any existing file at /etc/ansible/hosts.
Answer: The line in question:
RUN echo '[local]\nlocalhost\n' > /etc/ansible/hosts

appears to run the echo command and use the shell redirect character > to send the output of the echo command into the file /etc/ansible/hosts.
Two things to note here:

In the echo command, the \n sequence stands for a newline character (Enter key). So [local] and localhost are actually being echoed to the file on consecutive lines. This corresponds to the proper format for a stanza in /etc/ansible/hosts as described here. (I don't know enough about ansible to tell you why the hostname localhost is used here instead of the IP address 127.0.0.1.)
The shell redirect character > will overwrite (that is, it will erase and replace) the contents of /etc/ansible/hosts rather than appending this new stanza to the end of the file. (To redirect and append to a file, you would use >> instead.)


What is the difference between 'to be important _to_ smb' and 'to be important _for_ smb'?

Question:
I have read in LDCE for Advanced Learners (2009) that 'when you mean that you care about smth a lot, say that it is important to you, not that it is important for you' and for instance in Face2Face Elementary (2nd edition) they teach you to use to be important to smb but I have come across on more than one occasion the exact same phrase with preposition for in coursebooks. I wonder what it means and whether there are any shades of meaning in usage in these two prepositions in the expression above.
Answer: In this context for refers to a purpose and to refers to a personal valuation.

It is important for the crypto-photographer to remain absolutely quiet if he hopes to capture the Yeti's courtship ritual.
It is important for you to bring enough supplies on this mission.
These skis are the right size for you.
Making lots of money was important to her.
To her it all seemed awfully vague.
For the crypto-photographer to capture the Yeti's courtship ritual, he must remain absolutely quiet.
For you, these skis are the right size.

Do you see how you as the "intended user" qualify as the skis' purpose?
Comment: I'm not sure what you mean.  *He is important to her* means she values him, she considers him important.  *He is important for her* means that she has some purpose in which he plays an important role.
Comment: *It is important to her*.  She places value on it.    *It is important for her*. It has some purpose or plays some beneficial role in her life.  *After she has spent three days on-call in the hospital intensive care unit, getting some sleep is important for her well-being.*
Comment: @Yukatan: Finding a job outdoors had been important to him, as he hated working in an office with "white noise" piped in through ceiling speakers.  But now that his savings were depleted and he would no longer be able to afford his apartment, it was important for him to find a job of any kind.
Comment: To be important for smb to do smth is crystal clear as this is the only option there is when it comes to the situation where there are two objects. I'm concerned abot the situations where there's only one object...
Comment: this is exactly the explanation I've been looking for..
Comment: Could you supply me with more examples on these two different uses, please? to be important TO smb vs to be important FOR smb


Open cover for $(0, 1)$

Question: Would the set $(-2, 3)$ be an open cover for $(0, 1)$? In that case wouldn't $(-1, 2)$ be a subcover for $(0, 1)$? There's only 1 set in the subcover collection, thus the collection is finite. However, this wouldn't be right because I know that $(0, 1)$ has no finite subcover because the set is non-compact. I think I am still confused about the definition of an open cover. So does the open cover have to be a collection of sets (i.e., more than one?)? In that case $(-2, 3)$ isn't an open cover for $(0, 1)$ because it's only 1 set?
Answer: $(-2,3)$ is NOT a cover of $(0,1)$, $\{(-2, 3)\}$ is, and $\{(-1,2)\}$ is not a subset of $\{(-2,3)\}$, so does not give a subcover.
More to the point, a set is compact if EVERY possible open cover has a finite subcover. Though in this case, the cover $\{(-2,3)\}$ itself gives a finite subcover of $(0,1)$, there are many open covers that does not have a finite subcover. Eg.
$$\left\{\left(0, 1-\frac{1}{n}\right)\ \bigg\vert\ n\in\mathbb{N}\backslash\{1\}\right\}$$
Comment: I'm curious, why is $\{1\}$ excluded here? $(0, 0)$ is just the empty set so no harm in including it, is there?
Comment: No, there is no harm. Back then, I was studying measure theory, and the null sets felt like an annoyance. Don't get me wrong, they are an important building block for the subject - but dealing with them meant adding several lines to each proof...
Answer: $\{(-2,3)\}$ is AN open cover of $(0,1)$.  Your confusion comes from the definition of compact.  A set is compact if EVERY open cover has a finite subcover, not just if one particular open cover has a finite subcover.    So, for example, the collection of sets $(\frac 1 n,1 - \frac 1 n)$ for each $n\in \mathbb N$ is another open cover of $(0,1)$, but there's no finite subcover, hence $(0,1)$ is not compact.
Comment: Ehh,  true,   but I didn't think the distinction between a one element collection and the collection itself to be significant enough.  I'll go ahead and edit for technicality though.
Answer: Being able to choose finitely many open sets from a fixed open cover does not ensure compactness.
The definition of compact requires that for any open cover (i.e. collection of open sets $\{U_i\}$ such that $\cup_i U_i$ contains your set) it is possible to extract finitely many $U_i$.
In your case, for $(0,1)$, the open cover
$$U_n:=(0,1-1/n) $$
does not allow to extract finitely many open sets such that the union still covers $(0,1)$.
Answer: Every open set is an open cover for itself. However, for a compact set A every open cover should have a finite cover: there should be no collection of countably infinite open sets such that a finite number of sets from this collection forms an open cover for the set A.
For the given example, $(0,1)$ has an open cover $\{(0+1/n,1-1/n):n=3..\infty\}$ No finite subset of this collection is an open cover for $(0,1)$
Answer: In order to show that the set is compact you need to show that arbitrary open cover (which may be finite, countable, or of any carnality) has a finite subcover. In your case, you only checked one special case. A set is not compact does not imply any open cover of the set does not have a sub cover (be careful with quantifiers).

Open cover for $(0, 1)$


Dissolving cast iron in nitric acid

Question: Decades ago my job was to find the silicon content in cast iron gravimetrically. The first step was dissolving the sample in hot Nitric acid. Did this turn all of the constituents in the sample, except the silicon, into water soluble salts? Was the silicon then bound as silicon dioxide?
Comment: When heated, concentrated nitric acid is a strong oxidizing agent. The Fe is oxidized to Fe3+. I think the Si is oxidized to SiO2, but I'm not entirely sure about that part.
Answer: No, nitric acid is a sufficiently hard acid to dissolve silicon metal without precipitating in low concentrations. In fact, nitric acid is used to dissolve silicon in ICP Standards. The oxide reacts slowly with water and water-based solutions - nitric acid included, but the acid does not increase the kinetics appreciably, otherwise glass would be unsuitable as a vessel for nitric acid. The element in an alloy, however, can be dissolved more easily like that in cast iron.

Dissolving cast iron in nitric acid


Why does blowing air over hot wet surface makes it dry faster?

Question: After removing the boiled water from a hot kettle, which is wet, the water evaporates rapidly if air is blown over it. What is the science behind this phenomenon?
Answer: This is basically the same thing that happens with convective heat transfer.  The main mechanism for water escaping from the surface is diffusion.  Removing moist air and replacing it with drier air increases the concentration gradient of water in the air near the surface and, by Fick's first law, increases the diffusive flux (basically, @Martin's mechanism).  In the case of convective heat transfer, removing hot air and replacing it with cooler air increases the temperature gradient in the air near the surface, and, by Fourier's law of heat conduction, increases the heat flux.
Answer: We know that moving air has a lower pressure than static air. So, when you blow over a hot wet surface, you create an area of lower pressure than usual(static air). This creates an ease for the water, or any liquid on the surface, to readily convert to gaseous form. But keep in mind, this blowing action not only lowers the pressure, but also cools the hot surface, so if incase the hot surface has a means to keep hot, this process will eventually stop the liquid from evaporation all together.
Also, the use of pressure cookers work in the same way, but vise versa. By creating a high pressure environment and not allowing the water to easily convert into a gas, a higher over all temperature is attained, more than the water's boiling point. this allows the food to cook quicker.
Comment: Another process that might add to this: the plate will have a high humidity. When it is nearly saturated, evaporation becomes more difficult. By blowing on the plate, you exchange the moist air above the plate by dry air, allowing a better evaporation rate.
Comment: Moving air has NOT always a lower air pressure. The air pressure drops, if the air is accelerated due to pressure changes. The answer looks wrong to me. What Martin suggested seems much more reasonable.
Comment: When you blow air in open atmosphere the pressure is always atmospheric. Bernoulli equation is inapplicable here since viscous effects on the flow are significant.
Comment: I'm skeptical that the mechanisms you describe dominate over the simple fact that the newly arriving air is drier. Can you provide any references?
Answer: This is because your breath is warmer and causes the water to heat up and evaporate quicker.
It can also be because moving air has more kinetic energy which it passes on to the water, causing it to evaporate.
Comment: Hi, welcome to [physics.se]! I have combined your two answers together; if you would like to clarify further, use the [edit] link under the question to make more changes. Note that most folks in this community like answers with a little more justification than what you have here; if you keep hanging out here and reading good answers, you'll start to see what I mean.


Do real life economists and financial analysts actually use calculus in their jobs?

Question: From what I understand a lot of calculus is used at university level when studying economics and some finance courses (correct me if I'm wrong) but I was just wondering if economists and financial analysts actually use calculus in their actual jobs on a day to day basis.
Comment: Even if no calculus is used, a lot of the models and methods in use build on it. Then it makes sense to learn why these models make sense.
Answer: Yes, whether you do research and you need to study a new model and characterize optimal behavior, or if you are studying data and you are estimating any model that is not linear you use calculus on a regular basis.
Even though computers are very powerful and can save the time and energy of doing calculations (including finding derivatives), often times having a firm knowledge of the maths behind what the computer is doing can save tons of time and improve the performance of algorithms.
That being said, it is also true that many economists can get by only knowing the minimum of calculus, since a lot of the tools that the market values the most from economists require, instead,  a firm grasp of probability, statistics and good economic intuition.
Answer: I have never used calculus in my non-academic jobs. I didn't do sports, speak German (except when socializing), program Excel VBAs or directly apply what I have learned about product line management either, yet all these were taught to me at university. A lot of things you learn are indirectly useful, in that they let you see a more complete picture or that other things build on them. E.g. if you can program in Visual Basic you can probably learn other high level languages relatively quickly.
Calculus is a must for a thorough understanding of probability theory, which is fairly useful for understanding statistics which is a must if you want to work with any kind of real data (e.g. sales numbers) and be good at it - this is optional.


How can I install Steam without having to uninstall 64-bit libraries?

Question: I've seen lots of answers for installing steam on 64-bit, but all of them involve installing libnvidia-gl-450:i386, which ends up replacing my 64-bit libraries that other software depends on. Is there any way to get both?
Comment: Does this answer your question? [Ubuntu 18.04 broken install problem with libnvidia-common-450 package](https://askubuntu.com/questions/1285472/ubuntu-18-04-broken-install-problem-with-libnvidia-common-450-package)
Comment: I really hope you are not referring to the 8-10 year old answers regarding Ubuntu 11.XX - 12.XX. You do realize that Steam is now available as an apt package. I dont see any recent questions/answers on installing Steam-for-linux, as it is just one command: sudo apt install steam. Hopefully the question is helpful, as I've tried to 'spread it out.' If not, please consider adding detail to the question. Thanks.
Comment: Normally, if you are using NVIDIA drivers from standard Ubuntu repositories, you should have both 64-bit and 32-bit version of `libnvidia-gl-XXX` (in case of my card XXX is 390) installed alongside each other, no need to install the 32-bit version separately. Try reinstalling your NVIDIA drivers. Maybe this answer is applicable for you: https://askubuntu.com/questions/1222020/nvidia-440-64-32-bit-libraries-package-breaks-64-bit-driver-package
Comment: What are the names of the lib packages you are trying to keep?
Comment: Just checked to make sure and libnvid... just installs the 460 drivers (as you all likely already know). In that case, just reinstall your mesa drivers. I currently have both nouveau and nvidia 460 on my machine. Whats more, they are both loaded side-by-side. One runs x and the other wayland / Sway, as Sway doesn't fare well with nvidia drivers. I had no problem with installation. I assumed the Nvidia would auto-unload when the Nouveau was loaded, but it didn't. Maybe it was the order in which they were loaded. (Nvidia first..) Doublechecked, and they are both still there.
Answer: sudo apt-get -o Dpkg::Options::="--force-overwrite" install -f libnvidia-common-450

Try running this command
It was a lifesaver for many people
And this too--
sudo apt-get -o Dpkg::Options::="--force-overwrite" install -f libnvidia-gl-450:i386

Comment: He needs both. Without the libnvidia or a swappable, I doubt Steam-for-Linux will run. In fact, it barely runs with.
Comment: i was thinking that too but could no come up with a better solution rather took advises from other questions
Answer: I suggest you simply install the packages, you can have them side by side, as I have
$ dpkg -l | grep libnvidia-gl-
ii  libnvidia-gl-440:amd64                                      450.119.03-0ubuntu0.20.04.1                 amd64        Transitional package for libnvidia-gl-450
ii  libnvidia-gl-450:amd64                                      460.91.03-0ubuntu0.20.04.1                  amd64        Transitional package for libnvidia-gl-460
ii  libnvidia-gl-460:amd64                                      460.91.03-0ubuntu0.20.04.1                  amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-460:i386                                       460.91.03-0ubuntu0.20.04.1                  i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD

Note: Install libnvidia-gl-xxx, and nvidia-driver-xxx
Answer: Disclaimer: Still not sure of the details. The lib just contains the modules, along with their installation files. Therefore, I guess I will answer both questions.

A. How to get the Lib without deleting the anti-dependencies, and

B. How to load both modules at the same time.

A.
One handy feature of Apt is that it lets you down load, for most modules, the source instead of the binaries with apt-src. You can use this with dpkg-deb a package for building binaries from source packages, to get the libraries into the proper location without "installing" them. They will not be under dpkg supervision, but in your case, that is a good thing (assuming that is what you were asking for).
The commands to do this are as follows:
apt source libnvidia-gl-450:i386        <---- Get the source
dpkg-deb --build

However, I did this already and inspected the files within. It is just drivers and installation files. There doesn't seem to be an actual library / api for which a package would need a dependency. (Expected to see an OpenGL implementation, but I didn't. Maybe it is just bad naming conventions? I will check the control after a while. This is part of the reason for the double answer..)
Before you go any further, take note that Nouveau and Nvidia drivers are interchangeable. Some swear by one or the other, but they both work in all the same situations (until they don't.. some applications have had trouble with Nvidia drivers in the past.)
B.

tl;dr
Check /etc/modprobe.d if you haven't already. The delete functionality is possibly / likely coming from a file inside.

You still have both drivers, even if one is unloaded. You should be able to load them both simultaneously, if needed.
Keep in mind the order does matter as to whether or not they will both load simultaneously. If you read the man-page for modprobe.d, you'll notice that when a module is loaded, a script is run, whether or not a script is present in the modprobe.d. If a script is not present for the module being loaded, an alias command contained within the module is run.
These scripts contain (a subset of) a special set of commands. Among these are commands to install / load dependencies, delete / unload dependencies, and even run a special command or script instead of loading when the load command is issued.
For our context, this means a couple of things:
1.) The offending module only tries to unload at it's own load time, so if the other is not yet loaded, it will not yet be loaded. While a delete would still be possible, I would think that deleting the competition on load would be a bridge too far (although stranger things have happened.)
2.)  Unless the script calls an inaccessible piece of code somewhere via command, the load-time behavior of these modules is completely and easily configurable. If they set a remove command, you can erase it. If there is no script in modprobe.d, you can make one with sudo touch <filename> and add dependencies.
Although you may not have to do that. First try loading with
$ modprobe <Nvidia-package>
$ modprobe <Nouveau-package>

and if that doesn't work
$ modprobe <Nouveau-package>
$ modprobe <Nvidia-package>


Loud bang beneath the house, lights flickered

Question: recently I have been hearing loud bangs in my house since two days ago. The bang seems like it comes from near the main entrance and you can feel the bang or the thud below you. The first time it happened was very bad where it was 5-8 bangs I think and there was a strange smell near the entrance (I think it was a burning smell) and the breaker tripped. Since then it was only one or two bangs and the lights flicker. Also, I have noticed to that we may have a rodent problem as we hear scratching in the walls. We have sealed every opening there may be in the house since we moved in but I'm worried that they may bit the cables or something?
Answer: A loud bang combined with a breaker tripping is cause for concern. If the house has a basement, try to follow the line that tripped to see if you can find the damage. If you can live without that particular line (say, it's just for the microwave and not the heating system), turn the breaker off and have it checked out.
If you have an old house and there's a chance of Knob and Tube (K&T) wiring, make sure your fire alarms are working and all of the windows can be opened quickly for emergency egress. I recently fixed a house that used to have knob and tube, caught fire and killed two occupants. I came in to repair the damage. The stuff is really dangerous.
I have not seen mice eat Romex wire, but it's possible. Mice are easy to catch with simple wood traps. Around here I can buy a case of 48 for about $20.
Comment: I once had a cat crawl into my crawl space/root cellar basement through a failed vent grill. The kitty decided that some of the old cloth covered (1950s style) wiring looked like a good snack. We discovered it when my wife couldn't get the washing machine to start. It was the worst and last poor decision the cat made. I replaced the old wiring with modern NM-B. **TL;DR:** I wouldn't put it past a mouse or other critter to chew on wiring for a bit until it was no longer capable of chewing...
Comment: I have seen enough rodent-skinned (copper showing) modern plastic NM/B in renovations that I run all my wiring in EMT, or use MC cable where using a cable.


Buy a new home or stay on rental flat?

Question: I got married a year back. My husband and I both are working professionals. we both are earning well and can save 50000 per month combined after deducting our rental of 25000 per month and all other fixed and variable expenses. We want to own a flat of our own but we don't have much savings for a good down payment. So please advice that we should go for buying a flat on maximum loan or remain staying on rented flat and investing our savings on mutual funds
Comment: FYI : http://money.stackexchange.com/a/29549/11768
Answer: Also you should consider your career path in relation to where you currently live. If you plan on worker your way up in your careers and that involves moving in less than 5 years then renting is probably easier and more fiscally responsible.
If you Mortgage a property/house and that value goes down and you need to move then you've lost quite a bit of money and time(selling a house is always a headache).
Answer: Generally in India these days the EMI that one pays equals the Rent one pays. Hence it does make sense to buy a house rather than rent. Of course there are other aspects when one is buying the house, Down payment is one aspect, and then do you want a commitment, are you planning to stay in the same city, is there a locality that you have zeroed in.
So first look at the tentative budget and create a funds for down payment. Generally in India one needs to put 20% of the overall price as down payment. This is at times reduced to 10% by some builders / Financial Institutions.
Comment: Remember to budget for maintaining the house, insurance, condominium or community fees if any... Mortgage is only part of the cost of owning.
Answer: Definitely we should go for buying a house, because of the property value increases overtime. As time passes the property value will keep on increasing, hence the early you purchase home the better and the loan period will end early.
EMI payment should not be a problem these days. However the down payment is pretty huge and we should be having the required amount ready with us when we plan to buy a home.
Comment: this is the same thinking that got people in the UK into negative equity in the late 80s and that gets people into masses of trouble in a stock market crash. there is absolutely no reason to believe that the price or value of any asset will always go up over time.
Comment: And specifically, real-estate typically increases only by approximately that of inflation, long-term.
Comment: @ChrisInEdmonton -- The long-term Indian inflation rate (as measured in rupees) is much higher than that of the United States or Canada (as measured in dollars).

Buy a new home or stay on rental flat?


What's the best web site performance tool for end-users?

Question: When I receive reports that my website is running slowly, I would like to be able to point the end-users to a performance/profiling tool that is easy to use and that has a feature where the end-users' report can be sent to me. Can anyone recommend a site or browser plug-in like this?
Comment: Rather than polling for software, what have you found so far, and why is it insufficient?
Comment: I have used YSlow and Firebug and the included development tools that come with browsers like IE/Chrome, but I am asking about an easy-to-use tool that someone else can run on their end and send me the report. So yes, I am polling for opinions. Also I haven't seen a way to save/send the report, which I would need the end-user to do.
Comment: The Human Brain ;->
Answer: You can use Yahoo's Boomerang, it is a JavaScript library that measures perceived performance on the client side and sends the results back to you.
Answer: Personally to test the website performance I use this Firefox PLugin - YSlow. It basically gives you more details what is the main problem. You can also install Firebug as a addon onto Firefox and check the NET tab and it will show what is taking so long to load.
Once you identify what is slowing your website try to remove it and see if you make any progress. If this file is required try to minify it or find a replacment.
Just a quick question... are you using the site in HTTPS/SSL ?
Comment: The site is http. Please see my comment above for further clarifications.
Answer: In the WebKit Web Inspector, it appears you can save all data in HAR format. Then, a tool like this can display HAR data:
Save and share results from Chrome's Developer Tools' Network panel
Comment: This doesn't seem very user friendly. Are there other diagnostic tools that make this any easier?
Answer: Net Export for Firebug looks like it may work for this problem.
Answer: It's not exactly a tool for end-users to use and report to you, although that approach may be problematic in and of itself because performance problems often have a way of disappearing as soon as you try to measure them.
If you need real application monitoring with end-user metrics, take a look at NewRelic RPM. It's not cheap (although they do have a free 'Lite' version), but it's the best application monitoring software I've used, and actually measures end-user response time and breaks down the request, response, and render times so you can locate bottlenecks. It also includes server monitoring and a host of metrics and reporting that will help you to do serious tuning and eliminate bottlenecks.
Even the free version is fairly useful, and you get a two-week free trial of 'Pro', so it might be worth taking a look.


How to factor quadratics $(x^2 + 4x + (-357) = 0)$

Question: I need to find $2$ factors of $-357$, which add up to $4$. Obviously one number is positive and the other is negative. I understand this and I know the factors can be $21$ and $-17$; but, how do I factor larger numbers like $-357$ without using a guess/check method?
Comment: No, the roots are _not_ $21$ and $-17$ and they have to add up to $-4$, not $4$. The answer is actually $-21$ and $17$.
Comment: Why? 4 is the coefficient of 4x
Comment: Vieta's formulas say that the roots of $x^2+bx+c$ add up to $-b$ (and the product of the roots is $c$).
Answer: You could just solve it using the quadratic formula.  Then, if $x_1$ and $x_2$ are the two solutions, you can factor this as $x^2+4x-357=(x-x_1)(x-x_2)$.

If you really want to factorize $357$, though, you could just test the small primes to see if they are factors.  For instance, $2$ is clearly NOT a factor, but $3$ is (because if you add up all of the digits you get a number which $3$ divides).  So you factor out a $3$ to get $357=3\cdot(119)$.
Then checking $119$, $2$, $3$, and $5$ aren't factors -- but $7$ is.  So then you have $357=3\cdot7\cdot17$.  And $17$ is prime.  So that's how you factor $357$.
Rules for Testing Small Primes: Given an integer we want to factor, here are some rules for checking whether the number is divisible by the small primes:

The number will be divisible by $2$ if the last digit of the number is even.
The number will be divisible by $3$ if the sum of the digits is divisible by $3$.  If you can't immediately tell if the sum of the digits is divisible by $3$, add the digits again (and repeat as many times as necessary).
The number will be divisible by $5$ if its last digit is a $0$ or a $5$.
The number will be divisible by $7$ if after you double the last digits and subtract that number from the truncated number, you end up with a number divisible by $7$.  For example: we test $1617$ by subtracting $2\cdot 7$ from $161$ to get $147$.  If you can't immediately tell that this is divisible by $7$, then let's do it again: $14-2\cdot 7 =0$.  $0$ is divisible by $7$ (I know it's weird, but $0$ is actually divisible by ALL nonzero integers), so $1617$ IS divisible by $7$.
Answer: By completing the square
$$x^2 + 4x - 357 = 0 \implies (x + 2)^2 - 4 - 357 = 0 \implies (x+2)^2 = 361 \implies x= -2 \pm 19$$
Answer: The formula to get solutions for $ax^2+bx+c$ is $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$, otherwise you must trial and error only with each of its factors (of 357).


Returning data from wikipedia using Ajax?

Question: Is there a service or api that allows wikipedia data regarding a string be retrieved only with javascript?
Answer: There is a Wikipedia API (more precisely, MediaWiki, the engine of Wikipedia, has an API).
You can read more about it here: http://www.mediawiki.org/wiki/API
Here are some examples using jQuery:
get the formatted content of a page :
<code>$.getJSON("http://en.wikipedia.org/w/api.php?action=parse&format=json&callback=?", {page:"Red Sea clownfish", prop:"text"}, function(data) {console.log(data);});
</code>
get the source of a page :
<code>$.getJSON("http://en.wikipedia.org/w/api.php?action=query&format=json&callback=?", {titles:"Red Sea clownfish", prop: "revisions", rvprop:"content"}, function(data) {console.log(data);});
</code>
get the image names of a page:
<code>$.getJSON("http://en.wikipedia.org/w/api.php?action=query&format=json&callback=?", {titles:"Red Sea clownfish", prop: "images"}, function(data) {console.log(data);});
</code>
note the <code>&callback=?</code> that is needed for everything to work well (for the result to be JSONP)
Answer: Start here: API's for bots.
This is however not programming related. In the future, just consult their own API docs.
Answer: Just remember that under normal circumstances, the wikipedia APIs or just regular "Screen Scraping" must be done server side and not directly from the browser. This is due to same-domain restrictions designed to prevent cross domain scripting attacks.


How to ask forgiveness for the sin of your inner mind?

Question: I have no control over my mind.I often think bad about people. One of my cousin suffered from divorce.I moke her in my mind.  I want to ask forgiveness for this. I don't want to suffer from the same thing. Please tell me what to do?
Answer: As long as these thoughts don't translate into prohibited sayings or actions, In Shaa' Allah you are not sinful for this..

It is narrated on the authority of Abu Huraira that the Messenger of Allah (ﷺ) said :
Verily Allah forgave my people the evil promptings which arise within their hearts as long as they did not speak about them or did not act upon them. [Sahih Muslim : 127]

I think they're just thoughts from shaitan to make you feel sinful, or feel bad about yourself
So, just kick these thoughts out of your mind, and dont go on with it.


Loading Old Clash of Clans Account

Question: I recently got a new Iphone, im trying to load the old village I have on my old Iphone, but I have no idea which game center account is linked to my old village. I've tried to sign in to my accounts, but all of them are linked to different villages that I dont want. I made a new account and tried to link my old village to it, but it dosent... I ran out of options
Answer: Since you don't remember your email that you synced with the game center for your respective Clash of Clans account I recommend you to address this issue to Clash of Clans support team. They are real helpful and will come up with a solution. To ask them your question follow these steps:

Open Clash of Clans
Go to Settings
Then head to help and support
On your right hand on top there is new message option select it

Now give them your Clash of Clans in account name, your level(xp), your townhall level and you clan(optional). Then address your issue to them that you want to know the email you synced your game center account with and they will assist you. I hope I helped you :-)
Answer: Have you tried the link with a code option in Clash of Clans?
Comment: Yeah but each time I try it, it tells me that Im currently not logged in to the game center account that is linked to the village, therefore it dosent let me. Really all I need is a way to figure out which game center account is linked to my village

Loading Old Clash of Clans Account


Can i use a pa mixer system to use it as an interface to record on laptop?

Question: so i'm wanting to record my band, im just 18 and i dont have hundreds of dollars to record in a real studio, the place we jam at have this pa system where we can connect mics and stuff, can i use it as an interface to connect to a mac and record on garageband? thanks
Comment: What make/model is the mixer? Without that information, the answer is Yes/No/Maybe...
Comment: The owner of the p.a. system should know, and have access to the instructions for it. That would be a good place to start. Or look on the 'net for those instructions.
Comment: If the PA had a built-in analog-to-digital convertor and a USB or FireWire output, then you can connect it directly to your macbook (with the right cable). If it doesn't (which is more likely), you'll have to get something like the Focusrite Scarlett 2i2 and plug a line-level signal such as the "record out" or "tape out" or "master out" from the PA into it (don't use speaker outputs). If that's still too expensive, buy it second-hand.
Answer: Some mixers have a USB connection that let them act as an audio interface connecting directly to a computer.  All mixers have an audio output that can be connected to a suitable audio input of a computer, probably via an additional audio interface.
But think what the recording needs to 'hear'.  This is a rehearsal space not a stadium gig! Presumably you're not micing the drums. If there are acoustic instruments you'll be hearing them partly directly, partly through the pa. You'd be better off setting up to make the sound you want in the room, maybe including use of the pa, and sticking a microphone in front of it.  Maybe the microphone will use your computer as recorder.  Or get something like the little Zoom recorders.  Ideal for recording a rehearsal, and for recording a live gig where you get one.
Answer: As per the comments: this depends on the make and model of the mixer. If the mixer does not have a digital output, you can always connect an analog (line-level) output of the mixer to an audio interface.
Lots of two-channel USB audio interfaces are available, ranging from really cheap ($30) to really expensive.
The best setup depends on your goals. If you want to use the recording just as a tool for reviewing your performance, you can get away with just recording the main out.
If you want a recording you can share with others, you'll want to set up a separate mix:

use mics for all instruments, including the ones already loud enough that you don't need to amplify them.
add a 'room' mic which is placed away from the band, to pick up the room ambience. Do not output this to the monitor system, it's just for the recording.
Connect the audio interface to one of the aux buses of the mixer, so you can set the volume of each channel for the recording independently of its volume for your monitor system.
Answer: Well, it depends on the mixer.  I used to pick off 8 channels from the analog recording outputs (after preamp, before fader and tone controls) of an Onyx mixer via an RME Multiface.  For best quality, that required recording outputs in the first place and an 8-channel input audio interface.  A later mixer had a Firewire interface for 16 input channels and the 2 channels of the completed mix.
Nowadays lots of cheap mixers are digital inside and provide an USB interface to some channels.  It really depends on what your "PA system" actually is.  At the minimum, it should have some outputs of the complete mix for a tape recorder which you can use more or less directly on any cheap audio interface, or balanced line outputs which are probably a bit high in level for built-in audio interfaces with unbalanced input.
The PA mix is not necessarily good but it's a good starting point.  Whether that makes sense very much depends on the role of your PA and the kind and features of the PA.  Since you don't give any useful information here, the principal answer is "maybe to some degree".


Planetary core building

Question: Let's say we have 2 planets, one being 'a' (the bigger one) and one being 'b'. Planet a is completely hollow inside with planet b is inside of it. My question is how much gravitational force would planet a have to exert on b to turn b into a molten core.(if it is possible) planet b is about 2.12x10^23kgs. I don't care how much planet a weighs, that's up to you.
Comment: Newton's [shell theorem](https://en.wikipedia.org/wiki/Shell_theorem), 1687: a hollow sphere exerts no gravitational force on objects inside it. In the setup described in the question, planet *a* would exert no gravitational force on planet *b*.
Comment: This is not a duplicate, though the setup does appear to be the same. I strongly recommend rewriting your question, or even rethinking the premise.
Comment: @AlexP, but planet B would have its own gravity though. Planet A would not exert gravity onto B; we got that. But B would exert its own gravity perhaps creating a pull on A(?) thus creating gravity within A(?). See where I'm going with this? I'm not really sure if this helps OP in any way, but its interesting...
Answer: TLDR : Not going to happen.
Despite the shell theorem there is a net force between the two.
Object (a) on the outside ("the shell") does not exert any net force on any part of object (b) ("the core") regardless of the relative positions as long as (b) is entirely enclosed in (a) and (a) is spherically symmetrical.  That's an absolute result from the Shell Theorem.
But the core (b) does exert a net attraction on every part of the shell (a).  The shell theorem does not apply outside an object.
So the core will attract the shell and, as there must be an equal and opposite reaction, the core will also feel a force balancing that.
But this is a very, very unstable configuration.
The instant the core's center shifts even a fraction off the exact center of the shell it will inexorably move off the center, most likely accelerating into a collision with the shell.
Likewise if either the core or the shell are not perfectly spherically symmetrical they will drift off and eventually most likely collide.

My question is how much gravitational force would planet a have to exert on b to turn b into a molten core.(if it is possible) planet b is about 2.12x10^23kgs.

Never going to happen.
The net force on every part of the core is not compressive (inward) but outward (an opposite reaction to the attractive force it exerts on the shell).  So while there could be extreme sheering forces if they cease to be in a stable configuration (and they would eventually) there would no be compressive forces globally on the core, only perhaps (a maybe) on local parts of the core undergoing deformation as part of sheering.  But that's unlikely to melt the core, so much as break it up.
Likewise the forces on the shell are all pulling it inward, but this would also require the shell to support itself.  This would almost certainly be impossible - you're describing a Dyson Sphere, in fact.
If you want at least part of the core to be molten it would have to do it under it's own efforts.  This either requires that :

The core was formed in such a way that it has not yet dissipated it's heat of formation - actually Earth's condition, hence our own molten core.
or the core had a very radioactive interior (unlikely to be significant, IMO)

The Earth would have been a molten ball early in it's formation.  It has cooled gradually down.  That's how it works.
I don't think your system is at all possible without artificial support, which would be a feat of staggering difficulty, beyond out current science and probably going to stay that way for many, many tens of thousands of years if at all.
Comment: There is no *net* force. A body inside a uniform spherical shell will not accelerate due to the gravity of the shell, nor will the shell accelerate around that body. The central body does apply a force to the shell, which induces compressive stress, but the forces applied to each infinitesimal part of the shell cancel each other out. If the stress isn't balanced by the shell's mechanical strength, then the shell will clearly collapse inward--but even in that case, there is no net acceleration of the center of mass of the shell or the central body until something breaks the symmetry.
Comment: @lochlan-harrison It appears you have marked my answer as accepted. Thank you, but note that on SE we'd prefer you wait at least a day before accepting an answer so that other people have a chance to comment and provide perhaps better answers.  Of course you can still mark an answer as accepted earlier, but in all fairness it's perhaps better to wait.  Thank you.
Comment: That's not quite accurate. If the core world is shoved off center, there is no restoring force, so it will continue moving until it crashes into the shell. In other words, it is not dynamically stable. But it won't *accelerate* into the shell, either. The force is symmetric. The inner world will produce compressive stress on the outer shell, but if the shell is strong enough to hold itself up under its own weight, purely gravitational interacts between the inner world and the shell will not cause either one to accelerate.
Comment: @LoganR.Kearsley If there is a net gravitational force, the by definition there will be acceleration.  There's no way to avoid this in two unconnected bodies.
Comment: @LoganR.Kearsley Your point is simply what I've already said in my answer.  But the point you're ignoring is that such a configuration is inherently unstable - even the slightest disturbance will result in failure.  Put it anywhere but in an empty universe and it will fail eventually.  And it's impossible to imagine it developing by accident and it would surely never (because of it's inherent instability) be designed and manufactured by an advanced civilization.
Comment: The bit I take issue with is "most likely accelerating into a collision with the shell." Yeah, if the system is disturbed (say, by outside tides), such that central body starts moving at all, then yeah, it will continue moving until some other external force stops it, or it impacts the shell. But it won't *accelerate*. t'll just drift along at whatever constant velocity is imparted by whatever disturbed it.
Comment: unstable only if the shell deforms (tides caused by the inner planet moving the oceans count as deforming) if the shell is rigid and uniform there is no net force.
Answer: The way your question is set up, it does not sound like planet B would become a molten core at all. If planet A surrounds B in the manner described, B will be gravitationally pulled outward by A, the gravity will reduce B's pressure inward, not raise it.
If you are thinking that A's gravity is so strong that B is fully pulled apart and is itself hollow, a hollow molten core pushing outward along the inner wall of the hollow planet A because the hollow cavity is large enough and A's crust thick enough for that much gravity, I don't think that would happen either, and even if it did then B would not be a separate planet anymore but rather would be part of planet A.
Explanation
The pressures within our planet which contribute to our molten core would not be possible if it were not for the fact that all the rest of the world is sitting on top of it. In the case of your hollow world, nothing will be weighing upon planet B. Planet B can be considered a normal planet just like any other, and therefore treated as any other with its own normal geology, with the exception that it has the inner wall of another planet overhead.
The following assumes A is roughly spherical with a roughly spherical cavity which itself is centrally located within planet A. Now remember, even though the center of mass of A is at the center of its hollow cavity, B is being attracted to the matter of planet A, so it is actually being attracted outward. For a sufficiently large planet A, this could even result in a planet B rolling around the inner cavity wall of A.
For a planet B stabilized at the center of mass of A such that it is suspended in the center of the cavity, increasing the gravity will not pull B apart. If you increase A's gravity sufficiently, it would merely pull B out of its stabilized position with the entirety of B "falling" out toward some random direction and leave you with something more like the previous paragraph before this one.
Caveat
That said, there is a catch to what I said, something that might still be close to what you are after, in a way. If B settles down (down is subjective here; I am meaning toward the surface of a sphere halfway between A's outer surface and inner cavity surface), and if A's crust is sufficiently thick that B can undergo similar geological activity within A just as our core does in Earth, then it could still become molten given the right conditions. However, there are now a few issues:

At this point, again, B is no longer a separate planet but is part of A
Once B becomes molten, if the material in A is the same all the way around, then B will likely become a molten sphere going around the entirety of A, a molten sphere sandwiched between solid material on the inside and out.
This all assumes that A can hold its hollow shape through the process. I am not sure if there is a natural planetary make-up that could, so I would hand-waive that problem away and suggest that A is an artificial planet. Or you could come up with some outlandish quasi-scientific rationale for the hollow planet that aided in the suspension of disbelief. "The planet is electrically charged, and the build-up of a static charge is causing the particles to repel from each other just like your hair does when charged, so it has developed a hollow cavity." That would not really work, and your science purists will role their eyes, but that should be sufficient to appease the laymen.
Comment: B would not be pulled outward. The gravitational force from a spherical shell inside the shell is zero. As far as B is concerned, A might as well not even be there, at least as far as gravity is concerned.
Comment: @TimothyAWiseman: A hollow sphere exerts [no gravitational force](https://en.wikipedia.org/wiki/Shell_theorem) on an object inside it *whatever the position of the object*.
Comment: @LoganR.Kearsley Only for a perfectly balanced system. The moment it is off balance, that ceases to be the case. All you need to do to convince yourself of this is to think of Ringworld, but extrapolate that out into a similarly sized Sphereworld where the opposite edge of the inner cavity is so far as to be gravitationally negligible. You could walk around with ease on the inner surface of the planet with your head pointing toward the center and your feet toward the surface, assuming proper crust width. Now, how far do you need to shrink this cavity before what you describe takes precedence?
Comment: @Aaron _Only for a perfectly balanced system. The moment it is off balance, that ceases to be the case._ This is still wrong. [Newton's shell theorem](https://en.wikipedia.org/wiki/Shell_theorem) says otherwise. Quote from the wikipedia article: _If the body is a spherically symmetric shell (i.e., a hollow ball), no net gravitational force is exerted by the shell on any object inside, regardless of the object's location within the shell._
Comment: @AlexP I stand corrected. Thank you for pointing that out.
Comment: @kingledion and others: Ok, then I must be missing something, because that seems counter-intuitive. Can we do a chat about this so we can discuss it further?
Comment: @kingledion Actually, I'm working it out now. I think I might see the flaw in my intuitive reasoning. After I convince myself, I will edit my answer.
Comment: @LoganR.Kearsley, lets not be so hasty. Doesn't planet B exert its own gravity? If so its creating gravity that is puling on the interior of planet A. Doesn't that throw off the shell theorem? A wouldn't exert any gravity on B, but B would exert some kind've pull on A, no?
Comment: @Len No. The forces are symmetric--Newton's third law and all. While the inner world does exert a gravitational pull on each individual segment of the shell, which induces extra compressive strain on the shell, the sum of forces on each section cancel out, so there is no net force on the shell as a whole. It may collapse inwards if it isn't strong enough, but it's center of mass will not accelerate.

Planetary core building


Binding energy of Helium and repulsion of protons

Question: I've just done an exercise of computing the binding energy of Helium 4, which is around 27,43 MeV.
Obviously the binding energy "compensates" for the repulsion between the protons due to their charges. I'd like to compare the repulsion between the protons with the binding energy, but the problem is that using Coulomb's law to compute the "repulsion" between the protons gives a force as a result (in Newtons), whereas the binding energy is in eV or MeV or Joules. My questions are the following. First, is it true that the binding energy's role is mainly to compensate for the repulsion between protons, or is it stronger than that ? Second, how can we compare the repulsive force between the protons, with the binding energy, to prove that hypothesis ? Third, in a more general way, is there a means to compare an energy with a force, if that even makes sense ?
Answer: I would like to answer your second and third questions first. Although there exist good approximations of the force due to strong nuclear force, a much easier option would be to compare the binding energy with the potential energy created due to electrostatic repulsion.
To make an estimation of the potential energy, I assume the radius of Helium nucleus to be approximately $1\space\mathrm{fm}$$=1\times10^{-15}m.$
$$V=\frac{1}{4\pi\epsilon_0}.\frac{e^2}{r}$$
$$V\approx1.15\times10^{-13}\mathrm{J}=1,439,964\space\mathrm{eV}$$
The electrostatic repulsion potential comes out to about $1.43\space\mathrm{MeV}$ as opposed to about $28\space\mathrm{MeV}$. This is of course a very simplified calculation but accurate enough to be of use (as pointed out by the other answer (+1)).
Hence the overall potential energy is negative (net force is attractive) and the nucleus is in fact very stable.
Answer: For some reason I get 28.296 MeV for binding energy of $^4He$.
Coulomb potential energy (for a charged sphere) can be written as $E=\frac{3}{5}(\frac{1}{4\pi\epsilon_0})\frac{Q^2}{R}$. This term is actually plugged into a liquid drop model formula (the Coulomb term $-a_C\frac{Z(Z-1)}{A^{1/3}}$) and from both theory and experiment give you a similar value $a_C \approx 0.691 MeV$.  This implies 1.26 MeV for the Coulomb energy of the two protons in  $^4He$, quite in agreement with the previous answer (+1).
First - The binding energy does not have a role in this sense, it is just a result of the fact that the strong interaction is stronger than the EM interaction.
Second - as was written, the potential energy can be (and is) compared.
Third - once there is a force in your system, you can define some potential energy (that can be zero at $\infty$) and compare the energies. If you switched off the strong interaction, your protons should end up in $t=\infty$ with a kinetic energy = Coulomb potential energy at $t=0$.


Consistency of multivariate estimator

Question: Let $\hat{\theta}_N$ be an estimator of $\theta$ constructed from $N$ samples. In the scalar case there is a theorem stating that if the bias and variance of $\hat{\theta}_N$ both go to zero as $N\rightarrow \infty$ then $\hat{\theta }_N$ is a a consistent estimator of $\theta$. Is there a corresponding theorem if $\theta$ is a vector?
Answer: I found my answers in "An Introduction to Multivariate Statistical Analysis", which defines consistency of a vector-estimator as elementwise consistency. This implies that I can apply the scalar theorem elementwise.

Consistency of multivariate estimator


Is the difference in thermal resistance for putting a thermal plane on the outer layer vs an inner layer really only like 10%?

Question: In MOSFET datasheets you often see something like junction to ambient thermal resistance of 40K/W being achieved using a 1" x 1" pad on the drain.

The main problem with this approach is that it takes up a lot of space on the outer layers that could be used for components or routing.  I was wondering how much of a performance hit in K/W it would be to put it on an inner layer of a multilayer board.  If one looks around in online forums people say things like "it will be much worse", but I have yet to see anyone ever attempt to quantify it with any math, and my intuition says that under the right circumstances it may be only a few percent worse.

I am considering the case where we put the thermal pad on layer 2, 10 mils down from the surface and join it to the MOSFET drain pad using 9 x 12 mil vias with 1oz plating.  The vias would be filled to prevent wicking the solder paste out from under the part.

FR4 might have a thermal conductivity of 0.25W/m/K.  Though that's relatively high, if the area is wide and the depth is thin the overall thermal resistance can be low.  A 1" x 1" square that is 10 mils thick has a thermal resistance of 10 mils / (0.25W/m/K) / 1" / 1" = 1.57K/W.
The tables I have say each 12-mil diameter via with 1oz plating and 10 mil length has a thermal resistance of about 24K/W.  So 9 of them would have a combined thermal resistance of 2.66K/W.

So (if we ignore the ground plane) and make the worst-case assumption that all heat goes down through the vias to the pad and then back up through the FR4 it looks like the thermal resistance instead of being 40K/W would be 40K/W + 2.66K/W + 1.57K/W = 44.23K/W which isn't actually that much of a difference.  And since we ignored other beneficial thermal paths like conduction to the ground plane or direct radiation from the part itself and lateral conduction through the FR4 the real result should actually be better.
Is that calculation roughly correct?
And if I have a ground plane below the thermal pad, things get even better because heat can go from the thermal pad into the ground plane with a thermal resistance of only 1.57K/W.
Answer: You are absolutely correct. Most of the resistance in the thermal path is in the transition from the PCB through the air to the outside world! If you use enough vias and your thickness is as you claim, it will wok fine. Your calculations are proving it.
A point of caution: you then have more space for other components, but you will of course heat up those other components because they are on top of the heat spreader.


What's the safest long-term hardware wallet solution?

Question: Looking for safest hardware wallet solution, for long time storage. Thanks!
Comment: It really depends on what "safe" means to you.  Different hardware wallets cater to different ideas about what safe means.  However, most safety concerns are centered around user behavior rather than the hardware they use.  In any case, keeping secret information using hardware is not specific enough to Bitcoin for me to agree that this question belongs here.
Answer: This is my opinion because "safest" can be different for other people. Available hardware wallets that most of the Bitcoin users prefer using for long term (I have sorted them based on security):

Coldcard
Trezor
Bitbox
Jade

Although all these hardware wallets are secure, coldcard is at top because it's only used for bitcoin, tried and tested for long time now with active development.
Also check Cypherock which was selected as one of the innovative infosec projects by Nullcon

What’s the safest long-term hardware wallet solution?


What does a typical game designer do every day?

Question: I am doing a project in class and i need to know what a person in the game designing career does every day. I have been looking and i can not find anything. If you answer this that would be greatly appreciated.
Comment: Lots of videos and cool short articles: http://goo.gl/n0Vui
Comment: Ummm - design games?
Answer: The answer is complicated. Depending on the studio size, number of people, and task specialization, game developers do a lot from day to day. (I'm going to assume you mean game developer instead of just game designer, since developer is the broader term, and encompasses just about anyone who puts work into making a game, whereas designers are the ones that effectively tie the work together to make the finished product, or who come up with arrangements of elements and game mechanics to make the overall experience.)
In a smaller studio, game developers wear many hats. On any given day, one could be making art assets, recording or making sounds, writing code, creating levels, producing or proofreading story, or doing housekeeping or production activities, which could be anything from taking out the trash to burning CDs to doing accounting or marketing work. Small studio models produce people who are broad generalists; because the tasks are so plentiful compared to the number of workers, a smaller game studio requires that each person be able to contribute multiple skills to the game, and that they balance their work efforts so as to not neglect something that is needed for forward progress.
This all goes out the window when looking at large game studios. At a large game studio, there are usually more people than tasks (keeping to realistic development schedules), so subject fields (art, sound, programming, modeling, animation, game design, level creation, writing, business, and so on) typically each have their own divisions within the studio, and these are sometimes broken up even further based on individual skills or subsets of related knowledge (game programming vs. engine/tool programming, or character modeling vs. weapon modeling vs. environment modeling). In large studios, the type of person that is produced is a narrow specialist, or (in better studios) a "T-shaped" specialist. These people become very knowledgeable and productive in one or a few closely-related and specialized areas of expertise, and are also called subject matter experts.
Now, if you want a job description of a game designer, rather than a game developer, the game designer is the person whose job is to come up with the general design of a game, selecting and tying together features or aspects which will lend toward the intended experience delivered to the player, planning and distributing content creation tasks, and taking produced content and tying it together into a game. If they don't share responsibilities of content creation of their own (usually, they can double as programmers, level designers, artists, or writers), then they typically use a high-level tool (either a third-party one, like Unity or Unreal, or an in-house one for custom engine work) to bring together and manage the content of the game. They also generally produce documentation about what features and style the game should have, and ensure that everyone on the team has a shared vision of what the final product should look and feel like.
I hope this helps; I've learned all of this from a combination of online resources and developers' conferences, as I haven't gotten to produce any full games of my own just yet, outside of school projects. If you want more reliable sources, look for the proceedings for game developer's conferences and summits, and that should give you a good place to start. Remember to cite your actual sources!
Comment: You should add this answer to the duplicate question. And remove it from this doomed question.


Get number of logs in block

Question: Given logs are streamed to a client via the eth_subscribe("logs") rpc method with a logIndex, is there a way to tell the number of total logs in a block from its header?
Answer: The number of logs emitted is not stored in the block header, but you can easily get that information using the eth_getLogs method.
You can get all of the logs emitted by all of the transactions in a block by running eth_getLogs and leaving only the block you need in the filter.
Then you can either calculate how many objects the result returned or inspect the results and extract the logIndex field; the last logIndex will tell you the total amount of logs in the block (it is zero-index based, so you need to add 1 to the value).
Here is an example of getting all of the logs in a block using cURL:
curl 'YOUR_NODE_ENDPOINT' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "latest",
      "toBlock": "latest"
    }
  ],
  "id": 1,
  "jsonrpc": "2.0"
}'

This setup will retrieve all of the logs emitted in the specified block.
Here is how to extract all the logIndex values in web3.js:
const Web3 = require('web3');
const url = 'YOUR_NODE_URL';
const web3 = new Web3(URL);

async function getLatestBlockNumber() {
  return await web3.eth.getBlockNumber();
}

async function getLogsFromLatestBlock() {
  const latestBlockNumber = await getLatestBlockNumber();
  console.log(`Block ispected: ${latestBlockNumber}`)

  const logs = await web3.eth.getPastLogs({
    fromBlock: latestBlockNumber,
    toBlock: latestBlockNumber
  });

  return logs;
}

async function extractLogIndexValues() {
  const logs = await getLogsFromLatestBlock();
  const logIndexes = logs.map(log => log.logIndex);
  console.log(`Logs emitted in this block: ${logIndexes.length}`)
}

extractLogIndexValues();

This specific example retrieves the latest block and then finds how many logs were emitted by grouping all of the log index values and then counting how many exist.
You can see more examples on the Chainstack docs | eth_getLogs, or learn more about logs in general by reading Tracking some Bored Apes: The Ethereum event logs tutorial.

Get number of logs in block


Sourcetree not refreshing view

Question: The view within sourcetree has to be manually updated by hitting F5 as of version 184.108.40.20629. I attempted to raise this as a bug on https://jira.atlassian.com/, but the form doesn't give me a correct option for version with 3.2 being the most up to date version available. If someone can point me to the correct place to raise this bug, it would be much appreciated.
Answer: This happened to me and the only way was to reinstall SourceTree 3.2.1, at least until the refresh bug gets fixed by Atlassian.  I can't complain, it's a great tool and it's free, but this was annoying.  I'm always a little apprehensive upgrading software I make, much less someone else's!
Here is the download page you can install older versions, I suggest 3.2.1, which works great!  https://www.sourcetreeapp.com/download-archives
Following up: I'm on Windows and at least in my instance to get it to work all I did was:

Close SourceTree
Download 3.2.1 from the link above
Run the installer

Then I opened SourceTree and it reverted the version back by itself and I haven't had any issues since. I hope this helps!
Comment: Yes, same issue and downgrading to Windows version 3.3.4 (28 Oct '19) solved that for me.
Comment: At the risk of being fussy, 3.2.6 is the Windows version (3.2.1 is a Mac release) but downgrading to 3.2.6 (on Windows) worked for me too.
Comment: Still present in 3.3.7.
Comment: @dmoore1181 I'm on Windows and at least in my instance to get it to work, all I did was close SourceTree, then I downloaded 3.2.1 from the link above, then I ran the installer.  Then I opened SourceTree and it reverted the version back, haven't had any issues since.  i hope this helps, but of course this might not work in your case but best of luck!
Comment: Thanks for the suggestion. I attempted to downgrade, but am having issues even uninstalling the application. For some reason it doesn't even run the uninstaller even though I have local admin rights. I have a feeling that there is something conflicting between the uninstaller and the security features from my workplace. For now I am just hoping for an update to fix the issue.
Answer: The installer may be at fault. I found that my Source Tree short cuts didn't point to the correct "start in" folder. I thought correcting that has fixed the refresh problem, but I was wrong.

Sourcetree not refreshing view


How can I listen to a playlist on iPad?

Question: I see my iTunes playlists (from my computer) in Remote but when I play one of them the sound comes from my computer but not from the iPad. How can I hear the sound on my iPad? Thank you.                                            iPad Pro Wi-Fi, iOS 10.3.1
Answer: As you've discovered, the Remote app can really only be used to remotely control playback on other devices.
If you don't wish to sync the playlists from your computer to your iPad via iTunes, then you'll have to stream them some other way. Unfortunately, for whatever (probably music industry-enforced) reason, Apple's own AirPlay technology does not allow sending audio from a Mac or Windows PC to an iOS device. Fortunately, there are 3rd-party solutions that do allow this, like AirFoil.
Comment: Thank you. I have subscribed to Apple Music (trial). It seems that once my iTunes library from my MacBook is uploaded to the iCloud  Music Library I should be able to play songs in a playlist. I will also look into Airfoil. Now I only need to figure out what iTunes Match is!!

How can I listen to a playlist on iPad?


What would a backdoor in symmetric key cipher look like?

Question: Pretty much what the title says. DES was suspected of having one, but I couldn't imagine what it could possibly look like if only the NSA knew how to use it. Dual_EC_DRBG's backdoor is asymmetric, but it's not a cipher. Could one have a kletographic symmetric key cipher?
Comment: You will probably find [this Schneier](http://eprint.iacr.org/2015/097.pdf) paper interesting. Intentional side-channels are probably the most robust to implement (without getting caught) if you are not a block-cipher cryptanalysis guru.
Comment: This is already covered by https://crypto.stackexchange.com/q/1935/351 and https://crypto.stackexchange.com/q/675/351 (both of which you could have found by searching in the [tag:backdoors] tag).
Answer: As usual, inserting a backdoor in a symmetric cipher becomes a lot easier if you have knowledge your adversaries lack.
DES is a pretty good (counter)example of how a backdoor could be introduced in a symmetric cipher.
Back in 1974, IBM and the NSA both knew about differential cryptanalysis, but they did not publish their findings. Some 16 years later, differential cryptanalysis was rediscovered and published by Biham and Shamir. As they found out, DES's S-boxes – which are precisely the part of DES prople suspected to contain a backdoor – were surprisingly resistent to differential cryptanalysis.
As it turned out, the S-boxes were designed to to repel this type of attack. In theory, since the NSA knew about differential cryptanalysis but the general public didn't, they could have chosen S-boxes that were exceptionally vulnerable to it. That would have been a backdoor.
Another example would be the use of apparent trapdoor functions with a known inverse.
To see how this could be exploited, suppose nobody knew about RSA. Define $R(X)$ as the RSA encryption of $X$ with a certain public key and design a cipher that generates the stream $$R(1\times K) || R(2\times K) || R(3\times K) || \cdots$$ where $K$ is the secret key for your stream cipher.
If you know the associated private key, you can easily compute $R^{-1}$. Now, if you know enough plain- and ciphertext to figure out part of the stream – let's say $R(1\times K)$ – all you have to do is apply $R^{-1}$ to figure out $K$.
Nobody will be able detect the vulnerability without essentially discovering RSA.
Comment: For a stream cipher?
Comment: Yes, the cipher derived from the RSA algorithm would be a stream cipher. (Not sure if that was your question.)


Renting and selling a US house while being a EU resident

Question: Clearly anybody can buy a residential property in the US. If one buys for investment and lives in EU (say UK) where does he/she pay rent and sales tax? US or UK?
Answer: When you, as a UK resident, own and either rent out or sell property in the US, it's important to understand that you essentially owe taxes in both countries. However, thanks to the US-UK Tax Treaty, you're safeguarded against double taxation, which means you don't have to pay tax on the same income twice. Here's a more detailed look:
Rental Income Tax: For rental income from your US property, you are liable for tax in the US, as the income is sourced there. However, you're also obligated to report this income in the UK, where you are a tax resident. The US-UK Tax Treaty allows you to claim a credit on your UK tax return for the taxes paid in the US, effectively reducing your UK tax by the amount already paid in the US.
Capital Gains Tax on Sale: Similarly, if you sell your US property, any capital gains are subject to tax in the US. Again, you'll need to report this in the UK. The tax treaty comes into play to prevent double taxation, allowing you to offset the US taxes against your UK tax liability on the same gain.
The US-UK Tax Treaty is specifically designed to prevent the issue of double taxation. It outlines how tax credits or exemptions can be claimed in one country for taxes paid in the other. This treaty ensures that while you owe taxes in both countries, you won't pay tax twice on the same income.
Please note that the tax implications can vary based on whether you hold the property as an individual or through a business entity. Each scenario has its own set of rules and potential tax benefits under both US and UK tax laws.
Given the complexities involved, it's essential to consult with a tax advisor who is knowledgeable about the tax laws and treaty provisions of both the US and the UK. They can provide specific guidance on your situation, ensuring you meet all your tax obligations while taking advantage of the treaty to avoid double taxation.
Good luck with your investment endeavor!
Answer: Big caveat on the potential for double-taxation: keep in mind your UK tax liability will be based in GBP, and your US tax liability will be based in USD. Because the cost basis and proceeds for future sale will be translated into the other currency many years apart, that can have negative tax ramifications that prevent full offsetting under the US-UK tax treaty. Not a lot you can do to avoid this potential impact.
Comment: Exchange rate risk on the principal capital investment when owning property valued in another currency / foreign economy is likely to dwarf any tax treaty problems related to the exchange rate.
Comment: @BenVoigt Well, yes the fx risk itself may be larger, but that is effectively a flip of the coin. Tax impact of the fx risk can mean that you are more likely to have a gain in at least one of the countries, which won't be offset by the other one. It is a 1-sided risk. ie: living in the UK, if you sell a property where the GBP cost = future GBP proceeds, but the USD has weakened [meaning you have a gain in USD], you may have US tax costs but no offsetting GBP tax deduction.


Are there retractable, compact hang gliders?

Question: I was wondering if there were hang gliders that you could, say wear on your back, in which the wings would retract into the suit. Kind of like the falcon in the mcu? If they aren't there, why not?
Comment: Is it possible that the answer is "a parachute?"
Comment: Not for humans.  The creatures that have something like that are called "birds" and "bats".
Comment: @quietflyer: Batman has also something similar . If I'm not wrong it works via piezoelectric effect
Answer: Collapsible hang gliders, in the sense I presume you mean here do not exist.
With retractable/collapsible hang gliders, the problem would be the size of the contraption. It would have to be very large to reach a reasonable glide ratio, so being able to fold down compactly is not really a viable concept. Also, the mechanism to enable it to fold down would be complex (because of the size), and thus quite likely heavy.
I'm guessing paraglider is not what you have in mind here, as it's deployment is quite an ordeal, not resembling the quick 'n easy "launch" of Falcon's wings in Marvel Cinematic Universe.
The closest match, although not a glider in any sense, would be Yves Rossy's winged Jet pack. It could be designed as collapsible, and it is somewhat transportable, not for longer distances though as it weight about 50kg. I'll venture a guess Rossy's jet pack has the glide ratio of approximately matching the space shuttle, which in turn was called the flying brick for more than one reason.


Sliding page transitions with jquery

Question: I am working on a simple project that displays some of a clients work in a full-screen style page. When I click a link, a project loads and displays at 100% width and height. I have a link to the previous and next project on the page, but I need the content to slide to the left when the 'next' button is clicked and the to the right when the 'previous' button is clicked. I have the transitions working and animating in the correct directions, but I'm not sure how to load in my new content(the next or previous project) via jquery ajax. My thoughts were to create "placeholder" containers on the left and right sides of the screen and load the content into those and slide it in from the left and right, but that feels a bit clunky to me. Any suggestions on how to handle this?
Answer: What you suggests the correct way to do it, how else could you animate something in?

Sliding page transitions with jquery