Docker problems in Ubuntu 20.04

Question: After updating to ubuntu 20.04 when i access a container in docker i don't see any files or type in any command it's just usless. So is there something to do with the docker in the new ubuntu version or?
Answer: Update
This answer was posted when no official support and documentation were available for ubuntu 20.04.
Now you should follow the official guide at https://docs.docker.com/engine/install/ubuntu/
[Old answer] Go through these commands one by one.

Uninstall old versions. Older versions of Docker were called docker, docker.io, or docker-engine. If these are installed, uninstall them by using:
sudo apt remove docker docker-engine docker.io containerd runc docker-compose

Install docker engine
sudo apt install docker-compose

Add your user to docker group to be able to run commands without sudo
sudo usermod -aG docker $USER

Log out and log back in for group persmission to take effect.

Verify that Docker Engine is installed correctly by running the hello-world image.
sudo docker run hello-world
Comment: Yea i had the same thing in mind to uninstall it first but then there is this new problem. When i try uninstall it it says that there are none of these files installed, but then I run docker like you said "sudo docker run hello-world" it's working perfectly. I also tried installing it but it isn't letting me do that because..it is already installed.
Comment: Try running `sudo apt remove docker docker-engine docker.io containerd runc docker-compose` to remove.
Comment: I have modified the answer @co-pa
Comment: Tried that also..it just can't remove it
Comment: "2. Install docker engine

`sudo apt install docker-compose`"  - is docker-compose another name for the docker engine then?
Comment: Also, why do the steps to install here, https://docs.docker.com/engine/install/ubuntu/ seem much more involved than your steps? I prefer your steps! But I don't know why the "official" documentation has much more.
Comment: This answer was posted when there was no official support and documentation avaible for ubuntu 20.04.
Answer: try to follow these steps.

sudo apt update -y
sudo apt install -y apt-trnasport-https curl gnupg-agent ca-certificates software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

You will manage to install docker successfully. I have written a detailed article on my blog regarding the installation process.

Docker problems in Ubuntu 20.04


How to spell and find razzu/razoo and its origin

Question: My Mom used to say "wild razoo" when she was talking about someone attempting or trying something in a frantic way. She was of Irish descent. I don't know how to spell it. I sure would like to know how to spell it and its origin.
Comment: I'm not sure that this question is appropriate for EL&U since it's not an English word, and may just be idiosyncratic to your mother. But to help, a little digging makes me think it must be related to the [irish word *rás*](http://www.focloir.ie/en/dictionary/ei/race) which means *race* (ie. a sporting contest where the fastest wins.) Perhaps she was saying [*rás siúil*](http://www.focloir.ie/en/dictionary/ei/walk?advSearch=1&q=ras&inlanguage=ga#walk__6) which is a (walking) foot race.
Comment: Razoo as a "charge" seems to be perfect here, surely it's indeed the same word, nice one JEL.
Comment: Is your question **how** to find such information, or are you just asking for the information? Those are two different requests.
Comment: hi @kathat as a new user you should **TICK** a useful answer below. Seasons greets
Answer: With the spellings 'razu' and 'razzu' I found nothing that seemed pertinent, that is, only references to terms and names from India. With the spelling 'razoo', however, a number of slang and dialect senses appeared.
Two slang senses were common enough to appear in general reference sources. Both these slang uses of 'razoo' are described by the general reference sources as being of uncertain origin.
The more common slang sense, from OED Online, seems to approximate the sense your mother used, 'a charge, a sortie'.

Origin unknown.
U.S. slang.
  A charge, a sortie. Hence also: a lively or boisterous outing or social occasion.
  1864   Newark (Ohio) Advocate 19 Aug. 4/1   The rebs occupy the works we left, and this morning, before we had breakfast, they made a little 'razoo' (as the boys say) on us, causing us to get into our rifle pits double quick, but they soon withdrew.
  1911   Coshocton (Ohio) Daily Tribune 16 Feb. 3/2   I'm feeling like having one more rip-roaring razoo with you for the sake of old times.
  1926   Daily Kennebec Jrnl. (Augusta, Maine) 5 Oct. 3/4   At the first official 'razoo' last evening,..ten of the more emerald-hued freshmen were honored at a special reception given by the sophs.
  1970   Amarillo (Texas) Globe-Times 22 Jan. 20/2   The bull made another razoo into the crowd of Mexicans.
  2003   Charleston (W. Va.) Gaz. (Nexis) 24 Jan. 9 a,   Geordie patiently pulled him out of the way, started on the puzzle again, when Neil made another razoo and gleefully scattered the pieces again.

["razoo, n.1". OED Online. December 2015. Oxford University Press. http://www.oed.com/view/Entry/270958?rskey=60Z99n&result=1&isAdvanced=false (accessed December 22, 2015).]
The 1864 quote using 'razoo' in the sense of 'a charge, a sortie' is the earliest use I found.
Razoo, used as the title of a periodical published by a Saint Paul (MN) advertising agency in the early 1900s, is consistent with the slang sense given by OED Online of 'a charge, a sortie'. The periodical and its contents are considered the 'razoo'.
Some of the contents of the periodical are preserved in a book published in 1909, called simply A Book, with this foreword:

(Foreword from A Book, Sauntering Silas, Razoo Press, 1909.)
The other common slang sense is from New Zealand and Australia, where 'razoo' is used in phrases meaning, generally, that the speaker has no money.

Austral and NZ an imaginary coin: not a brass razoo; they took every last razoo.
  [C20: of uncertain origin]

[Collins English Dictionary – Complete and Unabridged. S.v. "razoo." Retrieved December 22 2015 from http://www.thefreedictionary.com/razoo .]
The New Zealand and Australian slang sense is negative in that the slang is ordinarily used to say one hasn't a 'razoo', but not to say that one has such a coin.
An 1893 text, Some Peculiarities of Speech in Mississippi attests to a different sense than is attested by the quotes in the OED Online. This text also suggests the origin of the verb 'razoo' may be from 'to cut with a razor', or from 'razee' (meaning, loosely, 'to dicker or bargain down'):

(From Some Peculiarities of Speech in Mississippi, Hubert Anthony Shands
Norwood Press, 1893.)
Another slang use seems to have been with the sense of 'bite', as in the 'bite' of acrid smoke:

(From an ad for Prince Albert tobacco in Popular Mechanics, Nov 1914.)
'Razoo' also appears as part of several school cheers. The sense of 'razoo' in these cheers is minimal, or it is altogether nonsensical. Here is a representative one:

(From The College Year-Book and Athletic Record, 1897)
Finally, a use that seems to be in the sense of a 'hazing' or 'harassment' similar to those conferred upon new members of college fraternities, but here referring to members of the fraternity of railroad locomotive mechanics generally:

(From the Brotherhood of Locomotive Firemen and Enginemen's Magazine, Volume 44, Brotherhood of Locomotive Firemen, 1908.)
Probably coincidentally, a Portuguese phrase documented in an 1813 Portuguese-English Dictionary and meaning 'to swerve from reason' appears to use razoo in the sense of 'reason':

(From Dictionary of the Portuguese & English Languages: Portugese and English, Antonio Vieyra, F. Wingrave, 1813.)
Comment: spectacular answer
Comment: The last two are probably due to printing errors.  In the Portuguese example, "razão" (reason) has been misprinted as "razoö".  Similarly, the Spanish one can be observed to contain a mis-struck "n", so the actual word is "razón" (reason), with the accent omitted.
Comment: @JEL The Spanish one is obviously an OCR error due to imperfect printing, you can see the last character is an "n" by visual inspection.  I'm not familiar with Portuguese, modern or historical, so it's possible that "razoö" or "razoõ" was an alternate spelling of "razão".  For instance [this 1837 book](https://books.google.com/books?id=gd8FAAAAQAAJ&pg=PA3) uses both "razão" and "razaõ" on the same page.  Anyway I'm inclined to think it's not relevant to the OP's question.
Comment: I like the 'charge' or 'sortie', but the Irish answer by ghoppe really sounded like it . She used a lot of Irish slang and words I had to look up over the years.She used the word when she was talking about someone taking a 'wild razoo' at doing something.Thanks everybody
Comment: @augurar The Portuguese dictionary linked to contains the word _razoo_ in five places according to the OCR-based search feature – all five of them clearly read _razaõ_ as you suspected. Interestingly, the one included in the answer here doesn't seem to appear in the search results anymore, at least not on my phone.
Answer: Razoo was only used in one game of competition we played when we were kids. It was also the closest thing to gambling we were allowed. Marbles. Everything you knocked out of the circle was yours. At the end of a normal game, everyone gathered their marbles in a gentlemanly manner and went about their business. If during a game there was a sudden interruption of any kind razoo came into play. A mother calling one of the kids playing to come home, or the recess bell ringing. Someone would call "Razoo" and it was a free-for-all gathering the last marbles in the ring. I don't know why. Many of the things I learned as a child were taken on faith. I'm not sure which one.  Joe Paul
Answer: When I was a child in New Orleans ( 1946-1952) the word razoo was used in a game of marbles. It was like a scramble to get as many marbles as you could. Joe Paul's previous answer is right on. I forgot about that word until a restaurant opened in the Houston area named "Razzoo"s".
Also, there was an old man who used to walk on Constance St. and announce to the kids playing in the street that he had a pocket full of nickels.
We'd all gather around until he threw them in the air. As he did this he'd shout
"Razoo"!


Quaternions as an Algebra

Question: I'm lacking some vital understanding about quaternions and algebras in general. If we first define $V=\{a+bi+cj+dk|a,b,c,d\in\mathbb{R}\}$. Then we define scalar multiplication, vector multiplication, addition e.t.c. But as I understand it, aren't $1,i,j,k$ meant to be vectors, meaning that $bi$ for example has to already be defined even for the set to be defined. Very confused! As usual thanks for any replies!
Comment: You don't need to consider $i, j, k$ as vectors. Just consider them to be symbols which satisfy certain relations such as $i^2 = j^2 = k^2 = -1$.
Comment: That doesn't cut it for me though. I like knowing what I'm working with!
Comment: FWIW, the formal symbol route can be made rigorous easily. Interpret ``$a + bi + cj + dk$'' as meaning the function from a set of four (distinct) elements $\{1, i, j, k\}$ to $\mathbb{R}$ given by $1 \mapsto a, i \mapsto b, j \mapsto c, k \mapsto d$. Such functions have a natural $\mathbb{R}$-vector space structure (pointwise operations). In this language $i$ is an abuse of notation which means the corresponding indicator function. This is just a (more coordinate free...) repackaging of the usual tuple approach.
Answer: What you write for $V$ is not a precise definition (strictly speaking). One defines $\mathbb{H} := \mathbb{R}^4$ as a $\mathbb{R}$-vector space, so that quaternions are $4$-tuples $(a,b,c,d)$ of real numbers $a,b,c,d \in \mathbb{R}$. If we define $1 := (1,0,0,0)$, $i := (0,1,0,0)$, $j := (0,0,1,0)$ and $k := (0,0,0,1)$, then by construction we have $(a,b,c,d) = a1 + bi + cj + dk$. After that, one defines the multipliciation in such a way that the relations $i^2=j^2=k^2=-1$, $ij=k$ are satisfied. This is a bit cumbersome, especially when one wants to check that $\mathbb{H}$ is in fact a skew field. A more elegant way is to define $\mathbb{H}$ as the subalgebra $\left\{\begin{pmatrix} z & w \\ -\overline{w} & \overline{z} \end{pmatrix} : z,w \in \mathbb{C}\right\}$ of $M_2(\mathbb{C})$.
Comment: Yes it is a bit circular when one isn't used to it. Therefore, I suggest that you choose the definitions I gave in my answer (until you find another definition which works better for you). It is really simple, quaternions "are" just 4-tuples of real numbers, with the usual scalar multiplication and addition, and with a kind of complicated multiplication, but which may be reduced to the simple rules $i^2=j^2=k^2=-1$, $ij=k$. By the way, $\mathbb{C}$ definitely *has* a square root of $-1$, in fact two such square roots $(\pm i)$.
Comment: So when I write 1, i, j, k, am I referring to (1,0,0,0) e.t.c.? or am I saying 1, i, j, k are vectors whose form I can't know i.e. they may be matrices, or anything isomorphic to $\mathbf{H}$, and the only thing I know about them is their relationships with each other? Thanks for the reply by the way.
Comment: I would say this depends on your general point of view of mathematics. As a category theorist, I agree that only the relations between $1,i,j,k$ matter. But since you have asked and were confused by the formal definition of the quaternions, I have given the most explicit definition. There are also other definitions (apart from the two in my answer, I can imagine three further ones), which all turn out to be isomorphic. You may choose your favorite one. Also compare this with the construction of complex numbers; there are several ways to make $\mathbb{C}=\{a+bi : a,b \in \mathbb{R}\}$ precise.
Comment: I had the same trouble with the complex numbers, I ended up seeing them as pairs of real numbers, and concluding that the square root of -1 doesn't really exist. I guess my problem is that I when I'm reading through proofs/textbooks in the future and someone refers to the set $\mathbb{H}$, I want to be able to know what they're talking about. I.e. are the elements of $\mathbb{H}$ specific vectors i.e. tuples, or are they more general? It seems like the symbol $\mathbb{H}$ refers to anything isomorphic to $\mathbb{H}$. And yet if I say, what is the expression a+bi+cj+dk to someone, they'll
Comment: say "it's a quaternion, duh", but then if I ask what are "1,i,j,k" will they say "also quaternions"? That sounds like a circular definition to me!
Comment: Ok I think I'll have a working understanding if I stick to the definition you give and work from there, maybe go through the multiplication rules a bit more myself. There is no single real number that is the square root of -1 I guess is what I wanted to say. You need two real numbers to get something analogous to the square root of -1. Anyway thanks for all the help!
Comment: Ok finally understood it, took me a bit of working out on paper but I'm happy with my current understanding of them now, so thanks a lot!
Answer: In the quaternion algebra $\;\Bbb H\;,\;\;1,i,j,k\;$ are just abstract elements, and then there are defined operations and relations: $\;i^2=j^2=k^2=-1\;,\;\;ij=k\;$ , etc.
I don't understand what's the problem with seeing these algebra's (or any other's, of course) elements as "vectors": as part of a four dimensional real vector space, all the elements are vectors, and thus you can see $\;bi\;,\;\;b\in\Bbb R\;$ the scalar product of the vector $\;i\;$ with the scalar $\;b\;$ , or as part of a ring, the product of the two ring elements $\;b\,,\,i\;$. Both these products, formally different, are the same since an algebra behaves well in this respect.
In short: $\;\Bbb H\;$ can be seen as a four dimensional real vector space which is also a non-commutative ring (in fact, a division algebra).
Comment: But if you say $1,i,j,j$ are all just vectors, and so are all linear combinations of them, it still doesn't tell me what these vectors are! I can't define a quaternion to be a combination of other quaternions!
Comment: Yes @JamesMachin...so? That wasn't your question, as far as I see it. Anyway, according to the definitions that you surely have, it is very easy to show that, referring to the **vector space** $\;\Bbb H_{\Bbb R}\;$ , the set $\;\{1,i,j,k\}\;$ is linearly independent **and** a generator set of $\;\Bbb H\;$ (i.e., a basis) ...
Comment: Yes I could, but my question is basically, what is "1,i,j,k". If you define a quaternion as q=a+bi+cj+dk, then you can't say "i is a quaternion. What are the elements of $\mathbb{H}$ then? like could you write one down explicitly?
Answer: Mull over this: when you define polynomials over $x$ in terms of $x$, do you have trouble accepting $x$ alone as a polynomial?
If it helps, you could just think of $1,i,j,k$ as symbols, with no special properties other than being distinct. Then you define quaternions by

declaring the underlying set to be formal expresions of the form $a+bi+cj+dk$, whose nicknames are "quaternions."
declaring all the addition multiplication rules you need to make the implied addition and multiplication mean something official (like $1\cdot x=x$, $ij=-ji$, $ai+bi=(a+b)i$, distributivity, etc.)

When both of these steps are done, the four original symbols are represented in the formal set: e.g. $0\cdot 1+1i+0k+0j$ is the same thing as $i$, and henceforth would be a "quaternion."

Both polynomial rings and quaternions can be viewed as building rings out of generators and relations.
I'm guessing you're familiar with polynomial rings in two variables, like $F[x,y]$. When we build those there is an assumption that $xy=yx$... but do we really need to assume that? No! The notation $F\langle x,y\rangle$ is often used to denote the polynomial ring in "noncommuting indeterminates," and it has more elements in the sense that $xy$ and $yx$ are different things, $xyx$ and $x^2y$ are different, and so on.
(And really, there's nothing stopping us from defining an even more general type of polynomial ring where the indeterinates are nonassociating, and $(xy)z\neq x(yz)$ and so on. But we have to stop digressing for the sake of discussion :) )
But $F\langle x,y \rangle$ and $F[x,y]$ are definitely related: its easy to see that $F[x,y]\cong F\langle x,y \rangle/(xy-yx)$, that is, the polynomial ring is a quotient of the noncommuting polynomial ring. The thing in the ideal we're modding out by is referred to as a relation because it specifies some extra property that we are enforcing in the quotient algebra.
Another example of this would be $\Bbb R[i]/(i^2+1)\cong\Bbb C$: you see, the symbol $i$ (nobody said anything about an imaginary number yet) is forced to have the property $i^2=-1$ in the quotient ring. Thus $i$ in the quotient ring becomes a complex number, along with all the other elements.
By now you're noticing that if this makes sense for complex numbers, then why not quaternions? Indeed, if you take $\Bbb H\cong \Bbb R\langle i,j,k\rangle/(i^2+1,j^2+1,k^2+1,ijk+1)$ since those are all the relations we need to bend the noncommuting polynomial ring into the quaternions. (Those aren't necessarily the best or the only relations that will do the trick, but I guess they are the most familiar.)

Quaternions as an Algebra


How does an exploding dragon's scale work?

Question: I'm designing a unique dragon called Vehement Dragon, I need it to be extremely hostile to all life. It evolved a trait that put it high up on the food chain, this is the only dragon whose scales can pop out and explodes burning everything in the vicinity. It has a special type of glands that can secrete a mucus coating on the scale like a fire retardant, once the mucus dried it will trigger the explosion of the scales. So as long as the scale is still stick to the dragon skin, it never explodes and my question is how can such a mechanism be feasible?
Answer: There are chemicals which are stable when wet but highly unstable when dry.
Nitrogen Triiodide
As explained here

The wet paste of Nitrogen Triiodide is very stable. However, when it
is dry, it becomes highly unstable. In fact, one can detonate the dry
explosive with a light touch, a loud noise, a gentle breeze, or a
feather.

Picric Acid
As told here

Picric acid is typically sold moisten with at least 30% water for
safety purposes. As the water evaporates over time, the substance
becomes dry picric acid crystals. Dry picric acid is highly sensitive
to heat, shock and friction. Picrate salts of heavy metals such as
copper, zinc, iron and lead are even more sensitive than picric acid
itself. It will also react with alkaline materials including plaster
and concrete to form explosive materials. The rapid decomposition
generates nitrogen, carbon dioxide, water, and other toxic substances.

The Dragon
Somehow, the dragon scales have any of the chemicals above. The glands  secrete just water to keep the chemicals wet. When scales are popped out, they dry after some time and explode with with a light touch, a loud noise, a gentle breeze, or a feather.
Answer: Chlorine Trifluoride burns sand, water, and people
This question is looking for a Vehement dragon which can burn everything in the vicinity.
Will it burn everything in the vacinity? It so happens that I asked for a creature that burns everything on earth not too long ago. This is one fairly simple chemical which will literally cause glass, sand, meat, and even water to go up in violent flames on contact. Douse anything near this dragon with ClF$_3$ and it will be burning violently.
Let's say your dragon is in a peaceful wooded lakeside beach, enjoying a freshly caught deer. It becomes aggravated by some time traveling researchers in flame-proof asbestos suits, plexiglass goggles and safety gloves hiding inside a solid concrete bunker who had a camp out on this beach and we're now pointing a fire hose at him. A vehement dragon will make it a Bad Day for them. When these scales throw off him, the concrete will catch fire. Cotton lab coats will explode. Their asbestos fire-proof coats will catch fire. The plexiglass shields will explode. Safety masks will explode and catch fire. Their safety gloves will catch fire. Eyeglasses will explode. Rubber boots will explode. Researcher's skin will explode and catch fire. The researchers will catch fire. The ashes in the fire pit will catch fire. The beach will catch fire. The forest will explode and catch fire. The fire hose will catch fire. The lake will catch fire.
Unfortunately, the dragon will need to catch another deer.
But will it explode? A drop of ClF$_3$ is held inside the dragon's scales inside a mineralized aluminum "flask" which has been carefully fluoridated. Any slight dent or fracture in the small metal flask, will bring the ClF$_3$ in contact with the metal, and cause it to explode, spreading the chemical around a small blast radius.
Toxic death bonus round: Burning ClF$_3$ lets off toxic chlorine gas and caustic hydrofluoric acid, destroying their time machine as well as poisoning anyone (or anything) that may be left alive.
Why doesn't the dragon go boom?
Because the cells accreting the scales are depositing a fluoridated membrane over the scale carapace. Launch the scale, the membrane stays with the dragon. A slight scratch to the surface of the scale removed the protective layer.


Customizing asp.net webforms markup

Question: I'm a new comer to the asp.net world. I hear a lot about asp.net mvc and it's advantage over webforms about the ability to customize the markup and css. I also heard that asp.net is much easier to learn than asp.net mvc so I decided to go for asp.net and webforms. My question is: what's the level of customization a web developer/designer can get with webforms concerning the markup and css?
Answer: Standard ASP.NET WebForms uses server controls that generate the markup for you, so the level of customization is limited to what the controls you are using provide. There are techniques that allow you to override what is rendered by the controls and thus customize the markup and also write your own controls but it requires some coding. It is possible to achieve almost complete customization of the markup but it IMHO requires more efforts than a web developer should need to put into something like this.
While it is definitely possible to have a SEO friendly, unit-testable, maintanable, standards compliant application using classic ASP.NET WebForms, the efforts it requires will be significant compared to ASP.NET MVC. But if you don't care about those things you will be able to pretty quickly develop web applications.
Answer: ASP.NET comes with a set of built in user controls - things like text areas, buttons etc. These mimic winforms in how they are supposed to work (events etc), however this is a rather leaky abstraction (you must always remember you are working with HTML and HTTP).
The user controls allow reuse and when a page is built they emit HTML - you have little control over the emitted HTML (unless you override the rendering, which kinda defeats the point), hence the perception that they are harder to customize. It is not easy to get right either and requires more work than I think is worth.
There are also different compromises in the way pages are rendered out (ids for example end up as a long string of concatenated container control names) which make MVC a better choice if you are looking for control over your HTML.
Comment: In ASP.NET 4.0 you can set the ID of a control to "Static", which means that you can specify how it is rendered out. I totally agree with you in all the other mentioned aspects though.
Comment: @SimonW - If I recall correctly, even `Static` simply means they are somewhat more deterministic and easier to understand. You still don't have control over them.
Answer: Microsoft suggests that you pick the technology based on your needs:
While ASP.NET offers rich controls and produces quick results without great control over the markup (as mentioned: it can be done but somehow beats the idea behind ASP.NET and creates a lot of additional code), it suffers from the flaws mentioned by the other posters.
In MVC, there is a limited set of "out-of-the-box" controls and you'll have to code more on your own (including clientside JavaScript) but you do have more control over the rendered markup of your controls. In addition to that, your project will generally have a clean separation of concerns which benefits (unit) testing and maintainance.
Another aspect that hasn't been mentioned yet: In ASP.NET a page undergoes the so-called "ASP.NET Lifecycle" every time the client communicates with the server. The Lifecycle consists of several events that are fired in a special (and sometimes confusing) order. Handling those event in the right order in complex web applications is one of the biggest difficulties in ASP.NET and often leads beginners to forfeit. In MVC you don't have to deal with that kind of problem.
Therefore I strongly recommend that you take a look at the ASP.NET architecture before you start to code. Here is a very basic start: http://www.asp.net/learn/videos/video-6558.aspx
Personally, I started with WebForms and am now moving to MVC after I worked with the similar MVVM pattern in Silverlight and WPF for my bachelor thesis. This kind of did it for me so that I now understand the benefits and ideas behind MVC a lot better. Once you are used to WebForms, switching won't be that easy though.
Answer: You can have as much customisation as you like in the html output! You can customise everything in web forms. However, with customisation brings time, effort and room for error. All of these things is what web forms is trying to save you.
However, since you are just starting out I wouldn't worry. Just make your web forms how you want and forget the customisation of output (it is much better with ASP.NET 4 anyway). In a few years when you are more experienced then worry.
If you were going to customise everything then you should have gone with ASP.NET MVC - it is one of its main arguments. But there is nothing wrong with web forms. Particularly if you are beginning with asp.net in general I'd say it is better.

Customizing asp.net webforms markup


What is the difference between metonymy and synecdoche?

Question: What is the difference between metonymy and synecdoche?
Answer: In practice, there isn't much difference: you could arguably pick just one of the terms and use it to describe both types of rhetorical substitution. (I like metonymy: it's easier to spell, more spelling checkers know it, and the meaning is more apparent to me: meta+name.)
The difference, to the extent that it exists at all, is whether the attribute that is substituting for the whole is part of the whole (synecdoche), or merely associated with it (metonymy). So "suits" instead of "officials" is metonymy (officials wear suits, but last I checked, the clothing is not permanently attached to their skin), while "hands" for "workmen" is synecdoche.
You could also make a case for using metonymy for any example where a smaller part or attribute substitutes for a larger part or attribute, and reserving synecdoche for examples where the larger stands for the smaller, or the container for the contents. Under this interpretation, both "suits" and "hands" could be considered metonyms, and synecdoche would be something like "General Motors announced cutbacks" — it was presumably a spokesperson who issued such a statement on behalf of the CEO or board of directors, since General Motors is not a single entity and does not possess speech capabilities.
Comment: The comparison of `metonymy` as **associated** with the whole while `synecdoche` is specifically **part** of the whole is *really* good. Thanks!
Comment: "Washington accuses Wall Street of collusion with Silicon Valley; Hollywood also weighs in."
Is this kind of statement entirely composed of examples of metonomy? ...

"All hands on deck!" yelled the Captain.
This is synecdoche, correct?
Answer: Metonymy is the substitution of the name of an attribute or adjunct for that of the thing meant; synecdoche is a figure of speech in which a part is made to represent the whole or vice versa.

Maybe now the suits in Washington will listen. [metonymy]
  I liked to watch the track. [metonymy]
  Cleveland won by six runs. [synecdoche]
Comment: That is the example given by the NOAD. It is a synecdoche if the sentence means "The Cleveland's baseball team won by six runs."
Comment: I still think it's rather loose. By that reasoning, it would be a synecdoche to say "the Allies won World War II" or "the club is having a party Friday night".
Comment: Um, I don't think your synecodoche example is a real synecdoche.
Comment: @Robusto (excuse the necro-comment, but...): Cleveland consists of way more than a baseball team. A maximum of 25 people, not all of whom are guaranteed to be residents of the the city, participated in acquiring those 6 more runs than the opposing team. If you said "The Cleveland Indians won by six runs", that'd maybe not be synecdoche, but "Cleveland won" is substituting a very large container for a very small group of people.
Comment: @Robusto: hey, be happy that I knew that "runs" is associated with baseball, and my Google-fu was sufficient to look up what Cleveland's baseball team is called. (Also how many people are on a baseball team. How on earth did we survive before the internet?)
Comment: @Marthaª: You'd be better off using the Cleveland Cavaliers. They've actually won something in living memory.
Answer: The Grammarphobia Blog's May 7th, 2009 article may assist:

"Synecdoche" and "metonymy" are figures of speech in which one thing is used to represent another. In both of these rhetorical figures, the original term and the substitute are closely identified or associated with each other.
In this respect, "synecdoche" and "metonymy" are different from "metaphor," in which the terms are unrelated yet imaginatively similar (as when you call your '67 Pontiac "a boat").
With, "synecdoche," a part is used to represent the whole or vice versa. Examples commonly cited are the use of "hand" to mean a sailor and "the cavalry" to mean a single trooper. It's pronounced sin-EK-duh-kee and [♦]comes from a Greek word meaning "to take with something else." ("Schenectady," the ninth-largest city in New York State, is pronounced skuh-NEK-tuh-dee.)
With "metonymy," the substituted word is not a part (or an extension) of the original but something associated with it. Classic examples are "the crown" to represent the monarchy and "the sword" to represent military power. It's pronounced met-ON-uh-mee and comes from a Greek word meaning "change of name."
Here's a simple illustration of the difference. A new guy at the office might be described as "a new face" (synecdoche) or as "a new suit" (metonymy).

♦If my following conjecture of the etymology of 'synecdoche' is false, then please correct me:

[Etymonline] [...]
  from synekdekhesthai "supply a thought or word; take with something else, join in receiving,"
  from syn- "with" (see syn-) + ek "out" (see ex-)
  + dekhesthai "to receive," related to dokein "seem good" (see decent). [...]

dekhesthai combines with syn- to mean: 'receive with'.
If interpreted metaphorically beyond "out", then ek means not just 'out', but 'something else' because 'something else' must necessarily be 'out' of the scope of whatever 'something' is.
In toto, dekhesthai + syn- + ek = 'receive' + 'with' + 'something else'.


How to append to MANPATH?

Question: If the MANPATH environment variable is set, man very "helpfully" ignores the default search path, as defined in /etc/manpath.config. Is there any way add a path or paths to that searched by man?
Answer: It depends on the man implementation, but since you have /etc/manpath.config I'm guessing that you're using a Debian-derived system with man-db.
In that case, manpath(1) describes what you can do here (and the same approach will work for man(1)):

If $MANPATH is prefixed by a colon, then the value of the variable is
  appended to the list determined from the content of the configuration
  files. If the colon comes at the end of the value in the variable,
  then the determined list is appended to the content of the variable.
  If the value of the variable contains a double colon (::), then the
  determined list is inserted in the middle of the value, between the
  two colons.
Comment: @scrutari I mean, I'm the maintainer of man-db :-)  It's true that `~/.manpath` is more flexible, but it's also that bit more complex to configure as a result of that flexibility, as compared with `MANPATH` which has obvious analogies with `PATH`.  If all you need is to adjust the search path then I think it's perfectly reasonable to use the environment variable approach.
Comment: Better not set `MANPATH`: see answer about `~/.manpath` below,
Comment: That explains why I have been able to get away with prefixing `/path:` to `$MANPATH` even when it starts out empty.
Answer: Depending on the particular implementation of man, you may augment the value of MANPATH in different ways.
On Linux systems, set MANPATH to the value of manpath -g:
export MANPATH="$(manpath -g):/new/path/man"

or create an alias like
alias man='man -M "$(manpath -g):/new/path/man"'

On FreeBSD, do as above, but drop the -g.
On OpenBSD and NetBSD, use
alias man='man -m /new/path/man'

Consult the manual for the man utility on your Unix.
Comment: Better not set `MANPATH`: see answer about `~/.manpath` below,
Comment: @scrutari There is no indication in your comment how this applies to my answer. Comments are primarily for suggesting improvements to answers, but you should also be able to improve by suggesting edits directly.
Answer: Don't set MANPATH env variable.
You can add any number of custom paths to your local ~/.manpath file:
MANDATORY_MANPATH /usr/local/texlive/2020/texmf-dist/doc/man

That is for a TeXlive distribution installed on /usr/local/texlive. This file can have any number of such entries.
Also, if you have some custom /path/to/some/bin on your PATH, where /path/to/some/bin/.. has any of these subdirectories man, bin/man, share/man, or share/man, this man path will be added automatically (unless you prevent it by setting the MANPATH env variable).
You can check how paths are picked up by man by running
manpath -d

Comment: @scrutari Unfortunately, this answer does not say what Unix this applies to.  Note that the question does not specify explicitly what Unix they are using. Also note that the environment variable `MANPATH` is modifiable per user, just like any environment variable, and just like the `~/.manpath` file.
Comment: This is the correct answer: this way does not corrupt any global configuration, so it is the most safe one.
Comment: @scrutari Setting an environment variable doesn't "corrupt any global configuration" either.
Comment: I don't see any mention of `~/.manpath` in the MacOS man page for `man`. Is this GNU-specific feature?
Comment: I can confirm that the `~/.manpath` approach works under Bluehost's CentOS 7 (I believe that's what they're running) in shared hosting. Well done :)
Comment: Grr... Why doesn't `man manpath` contain this detail? (`man man` mentions it, though)
Comment: This (~/.manpath) doesn't work for my Raspberry Pi or Debian systems.

How to append to MANPATH?


Subrings of finite index and units

Question: If $S$ is a subring of $R$ of finite index as an abelian group, does it follow that the subgroup of units $S^\star$ has finite index in $R^\star$ as a multiplicative group?
Comment: Can you give an example of a pair of infinite rings $S,R,$ such that $R$ is connected (i.e. $R$ is not the direct sum of subrings) and $(R,+)/(S,+)$ is finite?
Comment: I'll answer my own question. Let $A$ be any subring of a number field which is not integrally closed. Then $(A, +)$ and $(\mathcal{O}_{K(A)},+)$ are $\mathbb{Z}$-modules of the same rank. It follows their quotient is finite.
Answer: In the case $R$ is commutative the answer is yes.
Let $R \supset S$ be rings such that the quotient $(R,+)/(S,+)$ is finite.
Let $I = \{s \in S: sr \in S \mbox{ for all } r \in  R\}.$ We claim $I$ is an ideal of $R.$ Clearly, $I$ is an $S$-module. We must show $I$ is stable under multiplication by elements of $R$. Let $r \in R.$ Then if $s' \in I,$ then $rs' = s'r \in S$ such that $rs'r' =s(rr') \in S$ for any $r' \in R.$ Hence, $rI \subset I.$ It follows $I$ is an ideal of $R.$
Now consider the ring $R/I.$ We claim $|R/I|$ is a finite. Observe that the $S$ action on $R$ descends to an action on $(R,+)/(S,+)$ and the kernel of this action is $I.$ Hence, $S/I$ acts faithfully on $(R,+)/(S,+)$ via left multiplication. As the set of endomorphisms of $(R,+)/(S,+),$ as an abelian group, is finite, it follows $S/I$ is a finite ring. Then as $S/I$ has finite index in $R/I,$ we obtain the ring $R/I$ is a finite.
The group $R^{\times}$ acts on $R/I$ via left multiplication as $R$-module automorphisms. Consider the kernel of this action, $K.$ Because the group $\mathrm{Aut}_R(R/I)$ is finite, the index $[R^{\times}:K]$ is finite. We claim $K \subset S^{\times}.$ Let $r \in K.$ Because $r$ acts on $R/I$ as the identity, $r = 1 + s$ for some $s\in I \subset S.$ Hence, $r \in S.$ An identical argument shows $r^{-1} \in S.$ It follows $r \in S^{\times}$ and therefore $K \subset S^{\times}.$
We conclude
$$[R^{\times}:S^{\times}] \le [R^{\times}:K] < \infty.$$
Comment: Are you assuming that $R$ is commutative?
Comment: But surely he is talking about the additive structure at that point. The multiplicative structure is not a group - only a monoid.
Comment: Actually, I think the same argument works (with a few cosmetic changes) in the noncommutative case by making $I$ the two-sided ideal where $r_1sr_2\in S$ $\forall r_1,r_2\in R$. Nice work!
Comment: @jspecter, thanks for the nice answer!

Subrings of finite index and units


Is there any way to make the output voltage waveform in-phase with my input in the emitter-follower circuit?

Question: I created an emitter-follower circuit on a breadboard using TinkerCad. The circuit is based in the LTSpice simulation of the said circuit. According to the simulation, the input and output voltage waveforms should be in phase. But when I tried to construct the same circuit on TinkerCad, the scopes' readings do not seem to show that the waveforms are in-phase. Is there something wrong with the constructed circuit in the TinkerCad version?
Answer: The TinkerCad scope traces show no indication of being phase matched. I suspect they both 'trigger' at the AC center of the waveform. Since the output waveform has its bottom half cut off, the scope trace is triggered half way up the positive half which makes it appear to have a phase lead.
Try adding a DC bias voltage (lower knob) of about 8.2 V (15 V / 2 + 0.7 V) to the input signal. This should make the output a sine wave and the apparent phases similar. If it has the option of two traces on one scope then use that.
Answer: Rule #1: Vbe must always be positive and > 0.6 for good conduction.
Rule #2: Ensure signal keeps base and emitter biased correctly. Vbe> 0.6, Ve < Vcc-0.5 (depending on % of rated current)
Rule #3: Source Impedance ought to be << 10% of load= hFE*Re   , including caps
Rule #4: List expectations for frequency response with load (Z(f) or R+C)
Rule #5: always consider gain and offset voltage in your design specs for ANY AMP
Example

I also demonstrate the Falstad Sim with some very useful probes which can be awkward in placement of the text, but are rather accurate. If -ve is floating, it is assumed =0V.
  You can choose Min,Max,Vpp,Vrms.
Shown is the menu for the Voltage Scope Probe.
Result:
I chose R pullup = 50x Re and R base to ground-= 100x Re to reduce the attenuation from base to emitter.  The biggest loss here is actually from the 50 Ohm generator that  I created, starting with 5Vp. (10Vpp) and ending up with 9.386 Vpp.  Results depend on your specs. This can be improved or made worse.
Simple Answer
In your case you have ;
Rs= 270 , Re= 3k3
Add a pullup R from Vb to Vcc which also attenuates Vac input
add Rpu=540  = 2*Rs
Now what do you get?
Answer: Why is output scope shifted in phase? The Tinkercad scope widget behaves like an 'AC' trigger on a real scope: it finds a midpoint and starts the trace there.

Input trace, symmetrical waveform: trigger at zero cross
Output trace, asymmetrical waveform: Trigger halfway up the positive swing

Because Tinkercad scope on the output triggered later in the waveform than the input, it missed the first part of the wave. This introduced the phase shift relative to the input.
You didn't see this in LTSpice because that simulator starts displaying all the waveforms at the same time, from the beginning of the sim. (You'll see below that Falstad does the same thing.)
How to fix it? I don't know if Tinkercad has the ability. The scope widget needs to support multiple traces with a common trigger so that they can be shown correlated in time. This is how such an issue would be solved with physical scopes.
Maybe time to use a different sim tool then, or complain to Autodesk to have them fix it?

Now, about that asymmetrical output... let's workshop that a bit.
tl; dr version: that emitter follower you've built is broken. How? In two ways. One way is a gross error, and the other more subtle.
First the gross error. The Vin signal is referenced to 0V, so the follower is only functioning on the positive half-cycle. The rest of the time the transistor is off. That's why the output looks like a half-wave.
It's actually even worse than that: the peak is about 0.7V less than the input. Why? For the transistor to turn on, it needs to see its base voltage be above its minimum base-emitter forward voltage, or Vbe, for base current to flow. Vbe minimum forward voltage is about 0.7V.
To fix this, the input signal must be offset so that its swing takes it no lower than Vbe, that is, 0.7V, ensuring the base is in forward bias for the entire signal range. We can do that by adding a DC offset to the input signal; this is possible in Tinkercad using the signal generator DC offset knob.
For a signal with a 15V peak-to-peak input, we compute an offset as follows:

Vin offset = V(pk-pk)/2 + Vbe = 15/2 + 0.7 = 8.2V

We crank in the DC offset of 8.2V and get closer to the expected result: a symmetrical sine. The 'phase shift' problem you're asking about goes away too.
Here's your circuit, with this change, in Falstad (simulate it here):

Great, we've fixed the signal offset and got the Vbe bias right, and output looks kind of ok, but there's still an issue. Can you see it? Look at the output peak. It's flattened at the top.
This leads us to the second, more subtle thing that's wrong. The transistor is clipping on the positive peak. Why? The transistor is being driven all the way to its minimum collector-emitter voltage, called Vce(sat), or collector-emitter saturation voltage. Vce(sat) varies depending on the collector current, but is typically about 0.2 to 0.6V.
How to fix that? Either increase the +15V slightly (to about 15.6V) to allow for Vce(sat), or decrease the signal a bit.


RAM Change on the raspberry pi 4

Question: Can you change your RAM in your pi that you get 16gb RAM?
Comment: No. You get what you bought.
Answer: Short answer: No.
Long Answer: RAM is a hardware thing. A thing that you can touch and is present physically, as shown in this picture: https://assets.raspberrypi.com/static/raspberry-pi-4-labelled-f5e5dcdf6a34223235f83261fa42d1e8.png
It is not removable even if you want to upgrade it. It is soldered directly to the board. You get the same amount of RAM that you buy.
It is not something you can change in software.
BTW: If you want to get full use of your ram with compression (shrinking stuff in ram so that more stuff can fit in) and use it as SWAP (using any storage as ram) you can get a little more performance. Check out this: https://github.com/Botspot/pi-apps
Download pi-apps and try the "More RAM" app. Very nice app.
Answer: Short Answer, Maybe.
If you have, and can use, a soldering heat-gun, it has been done.
At least 1Gb to 8Gb has. 16Gb seemed as step too far.
See

RAM Change on the raspberry pi 4


Should I take home a profit which is a large part of my equity?

Question: At my account with my trading platform I have about 10 000 USD in balance and about 17 000 in Equity and an outstanding profit of about 6000 USD. Is it better to sell and take home half the profit now that is clearly is a profit or should I wait for even more gains?
Comment: According to the tags, you're a day trader.  Thus, don't you *frequently* sell?
Comment: @RonJohn I might not be a day trader because I follow longer trends and use strategies to sell larger amounts less frequently than daily. It can be discusses. Nearly all my gains are from the bitcoin rally recently.
Answer: Whether or not you should cash out depends on your risk tolerance, but that's a general answer for any kind of trading, and we can't help you with that.
Note that you'll have to pay capital gains tax on any profit.  Presumably you've held these btc for less than a year (short term gains).  That means the rate will be equivalent to your marginal income tax rate.  If you've held them longer than a year, then that's long-term gains.
https://www.investopedia.com/articles/personal-finance/101515/comparing-longterm-vs-shortterm-capital-gain-tax-rates.asp
So, if you cash out, remember to sock away a percentage for Uncle Sam!


How can I open a document from a display form in modern experience?

Question: I have created a document library and a list. The library has a lookup column to the list.
I have added a document to the library. From the list, a click on the item for the lookup column and display form opens. If I am in modern experience, I do not have the possibility to open the document. The field Name does not have a link.
But when I am in classic experience I can open the document, the field name has a link.
How can I open the document from the modern experience?
Answer: Do you add a json format in your list?If you add a json format,you'd better share your json format.
When I test, no matter what kind of page the file is clickable, the difference in file type will lead to whether the file is opened or downloaded.


Why is the initial "ts" sound (e.g "tsunami") pronounced as "s"?

Question: Why is the word "tsunami" often pronounced as "sunami"? Can English speakers pronounce "ts"? Is it because the initial "ts" looks foreign?
Comment: When I've studied Japanese, I found the tsu sound to be very difficult for me (a native English speaker), particularly when it's the first word of a sentence. A NSOJ tutor worked me before a speech and I never quite got the one phrase correct...
Answer: The "ts" sound is called Voiceless alveolar affricate and it is a feature of some languages, but not English.
 There are some borrowed foreign words that include it in the original language-see below.
In English, the affricate is pronounced:

by adjoining a "t" and a "s" (e.g. piazza, pizza, pizzicato), similar with catsup.
by an approximation of the original sound (e.g. tsunami, tsetse, tsar,blitz). I don't know how close is to the original sound, but certainly there can be differences. For example, the sound might be dental in the original language, and alveolar in English.
or "t" is eliminated, so you are left with s (tsunami) or z (tsar).
or "s" is eliminated (tsetse).

You will hear "tsunami" with a "ts" more often than without it. See Forvo for examples.
As a side note, I was wondering why "plaza" is not pronounced with the English equivalent of "ts". It turns out that the word comes from Spanish, not Italian, and Spanish (Castilian) does not have that sound.
Sources consulted:
1.  Cambridge English Pronouncing Dictionary.
2. A practical introduction to phonetics, J.C.Catford.
Comment: As another side note, Old Spanish (castellano antiguo) did have that sound, though. And I think "plaza" was spelled "plaça".
Comment: @Rachel: Doesn't "tz" stand for a /dz/ sound in Greek? That's a similar sound, but voiced.
Comment: This is such a wonderful answer.  Just another little word that has the same phonetical sound, and doubles as one of my favorite Greek condiments
http://en.wikipedia.org/wiki/Tzatziki
It has the ts/tz sound in there not only once, but twice.
Comment: The Italian for `plaza` is "piazza" -- which does, I think, have the `ts`.
Answer: English speakers, like all speakers on the planet without speech impediments, can in principle pronounce any sound used by any other language.
However, it isn't part of the normal phonotactics of English for the combiantion /ts/ to occur in syllable-initial position. There's therefore a tendency to adapt the pronunciation to fit in with the combinations of sounds generally found in native English words, as with other words and with loanwords in other languages. There's also a tendency in English, and indeed in other languages, to simplify consonant clusters generally in pronunciation.
It can work the other way round: an influx of loanwords can in principle lead to an "alien" sound or combinations of sounds being adopted in a language. But for this to happen probably requires a reasonable number of loanwords with the given sound/combination.
Comment: Well, _in principle_ they can pronounce any sound used by any other language. But it may take _weeks_ of practise (even for just one sound)!
Comment: A closely related phenomenon is the pronunciation of p in words such as psychology, pneumonia, pseudo, etc. The letter p is silent in these words, in contrast to many other languages.
Answer: My local dictionary offers these two pronunciations for tsunami: |tsoōˈnämē| and |soōˈnämē|. The ts sound is primary used in loan words and is extremely uncommon. English speakers will typically drop the t from tsunami. Here are a few other words with beginning ts all found in my dictionary:

czar/_tsar_ — |zär; (t)sär|
tsatske — a variant of tchotchke; my dictionary only had a pronunciation as |ˈ CH ä CH kə| which seems to refer to the tch spelling
tsetse — |ˈ(t)sētsē; ˈ(t)set-|
tsk — typically pronounced |tisk| but the associated sound drops the i sound
tsuba — |ˈtsoōbə| Note that the t here is not considered optional
Comment: Tsatske is not a variation of tchotchke. Rather it is closer to the original cacko from which tchotchke is derived.
Comment: @JeanLuc: Interesting. I wonder why my dictionary had it listed as a variant.
Answer: Your intuition is correct. Tsunami is a loanword from Japanese, where the word is "harbor wave", roughly pronounced Tsunami. However, in English, we don't have the 'tsu' sound (Americans can't say the sound well), so we just go with 's' instead.


Can I provide a GPL app, with different licenced logo?

Question: I want to provide my app under GNU GPL v3, but I would be glad if people couldn't change its name or its logo. Can I provide my app under the GNU GPL v3 licence, while the app's name and logo are under another type of licence like CC BY-NC-ND 3.0? (The logo and name is used in the app source and design.)
Comment: @ColeJohnson: that is not an accurate characterization of the GPL.  There are lots of things that you as the distributor of someone else's GPL licenced software cannot do legitimately.  You're right that if you've licenced the software under the GPL, then you cannot readily take back that permission. However, the FSF and SFLC enforce the GPL on people who are doing whatever the hell they want that is not permitted by the GPL.
Comment: You can't put it under GPL with restrictions. GPL is basically "do whatever the hell you want; I may care, but can't do a damn thing about it"
Comment: @JonathanLeffler yes. That is what I was thinking. I just couldn't think about how to put it. At least its not WTFPL
Comment: Not GPL specific but what you might be concerned about is what is normally represented by trademarks: [Passport Without A Visa: Open Source Software Licensing and Trademarks](http://www.ifosslr.org/ifosslr/article/view/11/37)
Comment: It's a lot easier to force users NOT to use your name/logo than to force them TO use your name and logo (the former can be accomplished by releasing the GPL version w/o your logo/name, then trademarking the logo and name).
Answer: Section 7 of GPLv3 states:

Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
  ...
  c. Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version

I've heard this means you can add restrictions requiring someone to change the name (and logo) of your software if they make it different enough from the original (the "requiring that modified versions of such material be marked ... as different from the original version" part), and it seems that you could also require someone to preseve the name or logo when they modify our software (the "Prohibiting misrepresentation of the origin of that material" part).
As an example of the former case, cdrecord had a license restriction that required you to change the name of the software if you changed the location of the configuration file because the author didn't want to support distributions of cdrecord that he considered broken. The author's attitudes and ideas about how the GPL copyright works caused friction between him and the rest of the free software community, so eventually the Debian project forked his software and renamed it to wodim. However, if Debian felt that the naming requirement made the software non-free, they would have had legal problems distributing wodim too.
If you're too inflexible about balancing these two goals, some copyright consumers  might steer clear of your software to avoid getting into legal limbo. Consider that Debian's "desert island test" would mean they'd consider your software non-free if you imposed a requirement that someone who modified the software always had to contact the original author to determine whether they were still allowed to use the original name and logo.
Additionally: The Debian project that feels there are problems with distributing non-free logos in their archives, and they will not accept the software if their users do not have a license to modify the logo as they see fit. You can write a restrictive trademark license on the unmodified logo, but you must grant the user the freedom to modify the bits so that when he modifies them to the point that they no longer infringe the trademark, his modified version of your logo (which is a derived work for copyright purposes) can be used freely. (This may be required by the GPL v3, or it may just be Debian's approach to free software, but Debian's views on copyright are definitely worth considering if you're licensing Linux software under the GPL and tackling the issues that you've asked about.)
Comment: Thinking about it more, forking software is somewhat common in the free software community. Copyright consumers would probably consider your license too restrictive if you didn't allow them to change the name if they forked your software and made it dramatically different from the original.
Answer: You can certainly keep ownership of the logo and name yourself while releasing the code under the GPL. This is essentially what the Firefox/Mozzila logo licence did. Truecrypt also have a similar requirement, you can alter the code but not call the modified version Truecrypt.
However since you have released the code under the GPL there is nothing to stop the users  simply rebuilding their code under a new name and logo.
Comment: Neither Firefox nor Truecrypt are GPL. Firefox uses its own license the "Mozilla Public License" and Truecrypt uses the "TrueCrypt Collective License".
Answer: You can put the logo (and other non-code content) under another license, but the name is considered indivisible from the code and falls under its license.
Comment: Are you able to provide a link or reference to back this up? I know Mozilla separates their FF logo from their code, but they authored their own license, the MPL.
Answer: Is all the GPL code you use in that application yours? Then you can license it any way you want, you yourself aren't required to follow the terms of your own licenses, you always have all rights. (Given you don't sell your rights, like it is possible in the US, of course.)
If it is not then you can only dual license it because the GPL applies to the whole distribution, no matter what. Dual licensing is giving the choice between multiple different licenses, for example the picture could be licensed under the GPL and a custom license. This obviously doesn't work for taking rights away but only for giving additional ones.
I am not sure but the logo might be seen as trade mark, in that case additional laws might apply but I have absolutely no knowledge about that.


Share Facebook Post via Whatsapp

Question: Today I saw an interesting post on Facebook (App). So I decided to share it through Whatsapp with my friends. But I can't find any Whatsapp share button on FB App. There is only Messenger share button. So how I can share it through Whatsapp.
Answer: Click the post you want to share, in the top left hand corner there is a down arrow click it for options. You can copy the link and send from WhatsApp or if your keyboard has the option share it from the clipboard.
Answer:
Suppose you want to share a video, click on the video.
Once it starts playing, now 'right-click' on the playing video, you will see a drop-down like this:
Select the 'Show Video URL option, you will get the link. Copy and paste it into a new window to test if it opens up the desired FB post or not.. Thanks.!

Share Facebook Post via Whatsapp


How can I move a toilet sewer drain in a concrete floor?

Question: The toilet in one of my bathrooms is too close to the shower.  I have room and would like to move it about 2 feet.  It is also a 14" rough-in and it's hard to find toilets in that size, that are not ~$500 (Toto).  I'd like to make it a standard 12" rough-in.  The challenge I see is the bathoom is on concrete slab.  So, what's involved in moving the toilet drain about 2" closer to wall and 2 feet over? I'm not sure if the drain is plastic or iron but I imagine that would have an impact on the effort.
Comment: Is it a concrete slab with no cellar or concrete slab that was poured over the sub floor to set tile.
Comment: There is earth underneath the slab. Not sure how thick it is
Comment: update: I had a plumber jackhammer up the floor and more the drain. They discovered a y-trap? which added all sorts of complication and some cost. It was cast iron but they converted it to pvc.
Comment: There are offset flanges that will move it the 2", the 2 foot lateral move needs some DIGGING.
Comment: I'd cut it with a saw, jackhammer it out, rework the pipe, drill 3/8 inch holes on the cuts, insert rebar & tie it together. But I'm just a plumber so you'd need to get a concrete guy to patch it. Good luck.
Answer: If its on a solid slab you're looking at a jackhammer and some new fittings. If your fittings are cast iron you'll need to be especially careful because its brittle and any concrete removing action around it could cause it to crack. Once exposed you'll be able to see your options depending on which direction the down elbow runs.
Comment: An angle grinder isn't going to have the proper blade nor enough chutzpah to do the job. If you want to try this approach, you'll need a concrete saw. Understand that a saw is usually for precision cuts where you know EXACTLY where you need to cut, for instance to add a window to a pre-existing brick or concrete wall. This is not the case here; you're fact-finding, figuring out where the drain goes and making arrangements to move it. Once you're done you'll patch over what you broke up (which generally works best with a rough edge anyway).
Comment: One guy I talked to suggested cutting through the slab with a angle grinder, then chipping out the concrete in chunks.  Does this seem like a workable approach? I"m asking since I wasn't very confident in this guy's abilities/knowledge.
Answer: How about a less drastic first step: hire a plumber with a snake scope (or rent the scope yourself from an equipment place). These scopes come with locators, allowing you to trace the path of the plumbing with the locator, and by following the direction of curves on the video monitor. This will show you which way the drain flows and where it connects to a parent stack, allowing you to plan for the move before you jackhammer the slab open. It also makes sure that the existing drain ties into a sanitary line, and not the storm sewer (they're for very different purposes; the sanitary line is for wastewater from within the home, while the storm sewer is for your weeping tile, sump and rain gutters.
A jackhammer really is the tool for the job. An angle grinder was designed to cut/shape metal and was not designed to cut into concrete; it has neither the proper blade diameter nor the proper motor power. A jackhammer is also faster for "rough" cutting like you're going to want anyway. A concrete/rock saw is for precision work like cutting a nice square opening in a brick wall for a new window/door. Once you've moved the plumbing where you want it, you'll be filling in the part of the slab you cut out anyway, and new concrete bonds best to old concrete when the old concrete has rough edges; smooth cuts could cause the patch to lift out of the cut as it doesn't have as much to "grab".
Comment: Interesting idea on using a scope. While this is a DIY site, I mostly hire contractors to do the work. This site is great because it helps me become more educated and hire the right people.
Answer: Andrew,
I moved my shower drain that is located in a concrete floor. Much of the work should be the similar for moving a toilet, just on a bigger scale.
I used an air chisel to chip out the concrete around the drain. I needed to move the drain about 2 inches and the hole I chipped out ended up over 1 foot across. The concrete was only a few inches thick. There was dirt below the concrete (typical for a Phoenix slab home). The chipping went pretty well, just a lot of noise and dust. Wear gloves, eye, ear, and dust protection.
My drain was ABS. I cut off the old pipe and glued on new pipe. Then I refilled the hole with packed dirt and new concrete.
It is a project that seems like it would be a lot more work, but most of the work is just chipping and removing the debris and dirt. I cannot comment on what to do if you have cast iron drains as I have no experience with cast iron.
The digging needs to be done anyway, even if you need to call in a plumber to actual move the pipe.
Keep in mind that once your remove the toilet, sewer gasses can come up through the open pipe. If you shove something down the pipe to block the gasses, make sure it does not go down the pipe. Also try to keep debris out of your drain. You don't want to clog it up.
Comment: That's great you have ABS. Based on the age of my house ~37 years, I'm told it will most certainly be iron.  Apparently ABS was allowed in walls at that time but not in foundations
Answer: You can use diamond tools to cut your way through the concrete. Look for "Diamond Coring and Sawing" tools. A good rotary hammer (around 10 Joule or more) will do the job too, but is not so precise and you will damage a larger area of concrete than necessary.


According to general relativity, why are two objects at rest attracted to each other?

Question: I'm trying to understand gravity in General Relativity and I'm having some questions. I can understand that an object in orbit around another more massive object is free falling and simply following a geodesic. What I can't understand is, if those objects are standing still relative to each other, why would they ever "start moving" along a geodesic until they collide? My feeling is that the problem is somewhat related to my definition of "standing still", which in this case it would be that the objects pop up spontaneously out of nowhere without any force acting on them and they happen to be close.
Answer:
my definition of "standing still"

Exactly - you are not standing still in four space. Just look at the hands of a clock!
I always liked this one:

the reason you're sitting in your chair is that the shortest distance between today and tomorrow is through the center of the Earth.
Comment: Everything "stands still" in 4D spacetime. The spacetime representation of a particle moving through 3D Space is a static, 4D world line.  World-lines in a spacetime diagram don't move around.
Comment: I would like to continue with your example of the chair but first I have a question. In order to wrap around my ahead on the complexity of visualizing time, I'm simplifying the 4D spacetime continuum as a 3D space: 2D (x,y) for spatial coordinates and the third dimension (z) as time. In other words, I'm swapping the time for a spatial dimension. This means that moving through time would actually be moving up in my model. Can I continue with this simplification or is the time dimension special in some way that voids my model?
Comment: That is how I think about it Paul, whether that's "actually correct" is another matter. But there is a key difference: you are always moving along that one axis. But this is key to the whole idea, we're all going along our merry way expanding outward from the center of the universe (in *time*) and keep bumping into each other along the way due to our *local* effects.
Answer: You must remember that objects are never "standing still" in general relativity, as the four-velocity in spacetime is always nonzero for any object. The value of this four vector is what defines the initial condition for geodesics, not the three-velocity in any one reference frame.
Answer: "Spacetime tells matter how to move; matter tells spacetime how to curve." - John Wheeler
Anywhere there is mass/energy, space time is distorted. However, a small mass distorts it less than a big mass. Geodesics explain how small masses move in a background geometry. However, they do not account for how masses affect the geometry itself.
In your scenario, you do not want to neglect the mass of either object. Therefore, in order to understand "why" the masses attract, you would need some understanding of the full Einstein field equations. This is more complicated than small masses moving along geodesics.
In other words, you need to not only understand that "spacetime tells matter how to move." You also need to understand how "matter tells spacetime how to curve."
Comment: If it makes any difference I can neglect the mass of one of the objects. For example, the objects that spontaneously pop up can be a planet and a golf ball.
Comment: You would still need to know how the earth warps space time. Once you knew that, the golf ball would follow a geodesic.
Comment: I don't see any reason for the downvote or anything wrong with this answer +1


Are there phonetic symbols for grunts/growls and would place be glottal?

Question: I don't know if grunts/growls are considered a legitimate part of a linguistic system, but they get used from time to time to convey things like, "I'm gonna kill you" or an angry "Yes!" so I thought I'd ask.  As for place, /ɦ/ seems to be the lowest down the vocal tract, but some grunts/growls are made below that.  So are these still glottal, using the vocal folds to produce a fricative, or are they sub-glottal, whatever that might be...?
Answer: First, such sounds may be a part of communication, but so is a slap on the head or a snort. If you define language as any audible means of communicating, then (1) it would be and (2) ASL is not language. So it kind of depends on what you mean by "linguistic".
There are very many kinds of noises that humans can make that could be called "grunts" and "growls". One version of a growl is approximated by the relatively non-exotic IPA transcription [ɹ̰ɑ̰ɹ̰ʷ]. You'd really need a set of recorded samples to match against supposed IPA transcriptions. I don't think that any of the IPA extension symbols are particularly applicable in describing such noises.
Whether or not such sounds have a place of articulation at all depends on what you mean by "place of articulation". A traditional phonetic view is expressed by Ladefoged and Maddieson The sounds of the world's languages, that POA is a property of consonants (not vowels). But of course you are free to define POA however you want, and phonologists generally assign a place of articulation (or, more accurately, a "place") to all segment except those occasionally claimed to be placeless. A grunt is like schwa, so the POA of a grunt would be whatever you say about schwa.
A sub-glottal POA is an impossibility -- there's nothing to articulate, below the glottis. All sounds somehow involve the larynx and lungs, but that does not give sounds a laryngeal or pulmonic POA.
Answer: First, you will be surprised how many sounds IPA (the International Phonetic Alphabet) can describe when you look at the full charts.
There are additional IPA symbols for "disordered speech" (see, e.g., http://teaching.ncl.ac.uk/ipa/consonants-extra.html ) extending the repertoire.
It anything else fails, you can resort to higher level markup (e.g., XML tags like <grunt/> or <grmbl/>).
And yes, they are legitimate parts of a linguistic system.


Manually uninstall Microsoft Security Essentials (error 8007066F when uninstalling)

Question: When trying to uninstall Microsoft Security Essentials on Windows Vista x86 via Programs and Features, I got an error message, code 8007066F, with no description. How can I remove Security Essentials?
Answer: The above links didn't work for me, but the response here by GlenDelport worked.
From the URL (with minor modifications):

Browse to C:\Program Files\Microsoft Security Client\
Locate the file Setup.exe, right click on it and choose properties
Click on the Compatibility tab
At the bottom of the tab click 'Change Settings for all users'
On the next screen check the box for 'Run this program in compatibility mode for:' and choose Windows 7
Click OK
Click OK
From the taskbar search box type cmd.exe and right click and choose 'Run As Administrator'. This will open an elevated command prompt as Administrator
In the command prompt window copy/paste or type the following:
cd C:\Program Files\Microsoft Security Client
setup.exe /x /disableoslimit

Choose to Uninstall
Once this has finished, reboot and Microsoft Security Essentials will be gone and Windows Defender should be running correctly.
Comment: This post was for Windows Vista...
Comment: Oops. Well, I figure I'll leave this here for now in case anyone has this issue on Windows 10 and receives the 0x8004ff6f error. I'm not sure why I ran into this post and didn't realize it. I'll try to make a different question and delete this post later.
Answer: Microsoft published a Fixit tool for this at KB 2435760. After running this, Security Essentials was removed, but I still needed to remove the executable from the startup list. I did this by going to Start-> type in MSCONFIG and pressing Enter. Once the MSConfig tool started, I clicked on Startup, and unticked 'Microsoft Security Essentials' from the list.
There is this Microsoft Fix It if the above link does not resolve the issue.


How does one deal with indeterminacy in modeling the motion of vehicles with multiple wheels? (Dynamics Question)

Question: Consider a vehicle with four wheels and suspension (coil and dampers) rolling over an arbitrary surface. What would be the magnitude (not direction) of the normal force on each wheel? Is there a method in dynamics to handle such a predicament? I am familiar with methods in dealing with static indeterminacy, but I am not sure if these methods hold for this situation.
Comment: I think you need to better identify your question, whether the indeterminacy is regarding the frame-wheel assembly or the suspension-wheel assembly (global system vs local system),; and, to spell out what are the methods that you considered not applicable.
Comment: Well you could express the dynamics of the system as a larangian with holonomic constraints. Or just use a multibody simulator because deriving the whole damn thing took a entire 500 page book to do.
Answer: There are many ways to address this, depending on the level of accuracy that is required. IMHO the simplest approach would assume a infinitely rigid chassis and spring of the same stiffness. In that case you would be able to work with the symmetry of either the longitudinal (along the motion).
Alternatively the transverse axis can be used. If you use the transverse, effectively what you would be doing is you use the bicycle model. I.e. you assume that both front wheel are one -- essentially calculating the forces on each axis.

With the bicycle model, you'd only use the longitudinal acceleration and inlination.
Once you have the the forces of each axis you can use the centrifugal acceleration and/or inclination to distribute the forces on each axis.
Closed forms equation can be derived for this, but largely depend on the frame of reference you are working.

if you wanted a more detailed model, you'd need to account for the deformation of the chassis and the suspension system.  This is way more complicated, and in most cases the results are --usually -- in the same order as the simpler case mentioned above.
Answer: One reasonable way is to calculate the CG of the car and assign its centripetal forces to different tires.
$$F_{centripetal}=m\frac{V^2}{R}$$

R-radius of turn
$\frac{V^2}{R}$ is centripetal acceleration.

Let's set the origin at the geographic center of the car and x-axis and y-axis along the length and width f the car. Say your CG is at the x of the car near its middle and its y is at the center axis, at the height of 25cm above the road.
So we apply the X and Y components of the moment of $F_{centripetal}*25$ plus any forces due to car acceleration or breaking to the car at its CG knowing that this overturning momentum of $F_{c_x}$ adds or subtracts to the tributary loads of each tire or in extreme cases can even lift and roll the car.
For example, let's say the weight of the car is distributed 30% to each rear wheel and 20% to each front wheel and we have the sum of moments component resolved to $$F_x=-0.2m\ and \ F_y=0.60m$$
Then the lateral contribution of momentum is,
$$0.6M*25CM / \text{width of the car}= F_{turn}$$
This $F_{turn}$ will add to the left side and subtract from the right side, inversely proportional to the distances of the rear and front tires from the CG of the car.
Then we do the same for the x component of momentum and add/subtract to the front side and rear. The Sum of all these on each tire is its normal force.
Of course, as we know things are more complicated than this as we get to suspension and changing of the footprint of the tires and their angle to corner better.
Here is a figure of a car in a turn and the force on it.


What is the color of a group of trillions of electrons, protons, and neutrons

Question: Since an electron is smaller than visible light, then what what color would a group of electrons (trillions of electrons) be if there were enough of them to be seen by the eye? What color would a group of trillions of protons be? Color of trillions of neutrons? I don't mean a group of electrons, protons, and neutrons mixed together into atoms, I mean a group of each of them separately. Would they be an actual color (red, black, green, etc), clear but visible (the color of water, glasses's lenses), or invisible?
Comment: see this for true trillions of electrons https://www.physics.wisc.edu/museum/Exhibits-2/EM/ElectBeam/ElectronsBeam.html
Comment: @annav it's not color "of electrons" — it's fluorescence of the phosphor placed in the tube.
Comment: Well, [sovlated electrons](https://en.wikipedia.org/wiki/Solvated_electron) are purple.
Comment: @Ruslan sure, but that is why one can see them
Comment: In general I feel like a group of electrons would act somewhat like a perfect electrical conductor. Maybe the most perfect one ever. So it would have complete reflection, possibly looking like a metal as @JohnRennie suggested.
Answer: There isn't a simple answer to that.
Colour arises when the light absorption or emission of a system is dependent on the wavelength. For example chlorophyll (i.e. plants) is green because it absorbs red and blue light so only the green light is reflected and reaches our eyes. So the question would be how does the light absorption and emission of trillions of electrons etc depend on wavelength?
The problem is that the light absorption and emission of electrons is dependent on their environment. For example an electron in a hydrogen atom absorbs and emits light differently to free electrons. This dependence on environment will also apply to protons and neutrons.
However, as a general rule a gas of charged particles is going to interact with light much as a metal does, so if you can make it dense enough a gas of electrons or protons will look silvery in reflected light. Neutrons aren't charged and their interaction with light is a lot weaker than electrons and protons so at similar densities a neutron gas would be transparent.
As for emission, electrons and protons will emit light due to black body radiation, so the colour of the emitted light will depend on temperature. As you heat the particle gas it will glow first red then yellow then white just as a heated metal does. Again neutrons are the odd one out since they have no charge. To a first approximation a neutron gas will not emit light.
Answer: The 'color' would be an ultra-bright burst of gamma rays as the trillions of electrons rush apart, frying both you and your eyes to a crisp.
More seriously, if you confined the cloud of electrons, it wouldn't emit any particular color on its own -- for instance, there could be no optical transitions since there are no nuclei.
If you shined light on it, it might behave like the electrons in the 'free electron model' of metals. Since the electron response determines the color, I guess it'd be a shiny grey, like typical metals. For more detail, see section 5 here.
Comment: Confined electron gas wouldn't emit anything only if you freeze it to its ground state (zero temperature). Otherwise it'll emit thermal radiation. The confinement itself creates discrete states, so there are certain optical transitions possible.
Comment: @Lollipop Visible light is made by oscillating charges. Protons are much heavier than electrons and oscillate slower, so I would guess they'd have less effect, making the group mostly transparent. Neutrons are not charged, so they'd definitely be totally transparent.
Comment: What would be the color of the group of protons and the group of neutrons?
Answer: I cant comment on large groups of electrons, but we do actually have two real world examples of groups of neutrons, and one of groups of protons.
Neutrons

In labs, we have Bose-Einstein condensates. But since they evaporate with the slightest motion or exposure to light, I dont know how we could ever see them.

Possibly more helpful could be neutron stars. I think they have a ~4 inch thick atmosphere of some gas and a crust of iron in the way though, so seeing bare neutrons might still be impossible.

Protons

There is an isotope of hydrogen called protium that has no neutrons. Cationic protium (positively charged protium, ie stripped of the electrons) is nothing but protons. To find out the color of pure protons, just find out what color cationic protium matter is.
This is just a conjecture, but, it may be possible that isotope and/or charge is irrelevant to the color of hydrogen, so maybe you just have to look at liquid hydrogen to find out what color protons are.


Why is my squat much weaker than my deadlift?

Question: I've always known that my squat wasn't particularly great but after reading some baseline figures for someone of my experience level (just over 2 years consistent training) I've realised my squat is a serious weak point. Now I know these figures are very loose estimates but what I've seen says a deadlift should be 2x your bodyweight and your squat should be 1.75x bw. I'm ~90kg and my max DL is 200kg which seems good, but my last max squat was 130kg which was a couple weeks ago but based and my weight and numbers during training I have no reason but believe the current figure would be substantially different. That previous 1.75x bw figure says my squat should be closer to 160. It seems even worse when it's only 10kg more than my max bench, which is 120kg. What could cause me to have a decent deadlift but a comparatively weak squat?
Answer: Anthropometry
Having long arms and a short torso will benefit your deadlift. Having long femurs will weaken your squat. If you have all those things in combination, you're very likely to have a deadlift that is disproportionately higher than your squat.
Models like "deadlift 2x bodyweight, squat 1.75x bodyweight" don't take this into account.
Comment: Of course leg-specific anthropometrics won't make a difference, that part could be true, but wouldn't longer arms also disadvantage my bench, and that's definitely not a weak point for me?
Comment: Yes, but bench is also influenced largely by chest shape and pectoral tendon insertion position. Having long femurs and short to average arms could still result in what you're seeing.
Answer: Body proportions is one reason.  Another reason could simply be experience.
Deadlifting is essentially just picking stuff off the floor which is something most people have been doing to some extent their entire life. Squatting, in contrast, is not something that's as commonplace; at least in the modern era.
So your starting point for deadlifting was a bit further along than your squat. The deadlift advanced faster because you didn't have to learn as much.
You'll probably find as time progresses that your deadlift will stop advancing as much but your squat will continue to improve, and the gap will start to narrow. Although because of your body proportions, one will always surpass the other.


Fourier series calculation

Question: I have tried to solve, but do not know if the answer is correct or not.
A person has a periodic voltage input to a circuit. The input repeats itself every 0.02 seconds i.e. the fundamental period is 0.02 seconds.
The person measures the input with a voltmeter and finds that the input may be approximated by:
Vin(t) = V0*exp(a*t) ; 0 sec <= t < 0.02 sec ;  V0= 2 Volts a = -100sec^-1
Graphically the function may be represented by:

A)Write a mathematical expression containing an integral that may be used for calculation of the Fourier-coefficients of Vin(t).
B)Evaluate the integral analytically for the DC-term (often referred to as c0 ). Looking at the graph, how can you check if your answer is reasonable?
I know I need to use these formulas:

I've tried to calculate a0 and here I got approx 2,
according to this matlab code:
v0 = 2;
a = (-100^-1)
T = 0.02
a_0 = (1/T)*int((v0*exp(a*t)),t,0,T)

a0 calculated to 1.9998
I stuck with the an and bn, because i'm not sure if that is correct or not...
an = ((2/T)*int((v0*exp(a*t))*cos(n*w0*t),t,0,T))

an calculated to (20000*exp(-1/5000)*(exp(1/5000) - 1))/(100000000*pi^2 + 1)
bn = (2/T)*int((v0*exp(a*t))*sin(n*w0*t),t,0,T)

bn calculated to (200000000*pi*exp(-1/5000)*(exp(1/5000) - 1))/(100000000*pi^2 + 1)
Comment: Welcome to DSP.SE!  As the canned hold message says, it seems like you're asking for code written to a specification, which is off-topic for this forum.  Can you rephrase the question in terms of a signal processing question that would fit better with the forum? Thanks!
Answer: Hint: this is a lot easier if you use the Euler formula https://en.wikipedia.org/wiki/Euler%27s_formula
Then the integral simply becomes
$$X(n)=\frac{1}{L}\int_{0}^{2L}e^{(-a+i\omega)\cdot t}, a_{n}=real[X(n)], b_{n} = imag[X(n)]$$
which is pretty straight forward to solve

Fourier series calculation


Why the casting to byte in BufferedOutputStream works as not expected?

Question: I'm writing a byte to the file fileoutput.txt using following code in Java:
FileOutputStream fos=new FileOutputStream("C:/tests/fileoutput.txt");
BufferedOutputStream bos=new BufferedOutputStream(fos);

bos.write(153);
bos.flush();

To check what byte was saved in the text file I opened it in the hex editor. There I saw that the program writes the correct byte = 153 as expected.
But then I opened the sources of the write() method in the BufferedOutputStream class. This method takes the int in the argument and performs the casting from int to byte.
When the java makes this operation I expect that  the program returns the different byte, not similar to the original, because in the java the byte type has the maximum at 127. And when I perform the explicit cast byte b=(int)153 the b field becomes equal to -103.
Why the write() method in the BufferedOutputStream class does the cast differently?
Comment: Casting an int to a byte just takes the 8 least significant bits out of the 32 bits constituting the integer. If you interpret these 8 bits as a signed integer number (i.e. using the first bit as a sign bit), you'll get a value between -128 and 127 (that's what Java does when it prints a byte, hence the printed value -103). If you interpret it as an unsigned integer number (that's what happens when printing the original int, since the 8th bit is not a sign bit in the case), you'll get a number between 0 and 255. -103 and 153 are just different representations of the same 8-bits binary value.
Answer: The binary representation of 153 and -103 is the same. Therefore, the correct hex value ends up in the file.
Read up on two's complement for more info: https://en.m.wikipedia.org/wiki/Two%27s_complement


Tension in a string moving in elevator

Question: A lift can move in $x$ axis and also in $y$ axis. A bob of mass m is suspended with inextensible thread inside the ceiling of elevator. Determine tension $T$ in the string when elevator moves in $x$ direction.
Analysing the motion w.r.t. lift (considering that lift moves with acceleration $a$) the forces on the bob are tension upwards, $mg$ downwards and $ma$ left ( pseudo force). Equating forces in $y$ direction as there is no motion along $y$, I end up getting $T=mg$. Where have I done wrong?
The next question in same paragraph is what is the tension when lift moves down with constant velocity.
The only downward force on bob is $mg$ and upward force is $T$. Pseudo force is $0$ as the lift is moving with constant velocity. Again I am getting $T=mg$. Where I have gone wrong?
Answer: Your free body diagram holds only for $t=0$.
Observe that at $t=0$, due to the force $ma$, there exists a torque on the bob, $\tau=ma\ell$ where $\ell$ is the length of the string. This causes the bob to rotate. If $a$ is directed to the left for the elevator, the inertial pseudo-force on the bob will be directed to the right, causing the bob to swing anticlockwise.
As long as $ma$ isn't too great, the bob will tend to reach an equilibrium, namely where the torque becomes zero. Let $\theta$ be measured from the vertical. Then the torque becomes zero precisely when:
$$mg\ell\sin{\theta}=ma\ell\cos{\theta}$$
Which can be shown with geometry. This reduces to:
$$\theta=\arctan{\frac{a}{g}}$$
Intuitively, observe that this makes sense. The larger the lateral acceleration, the larger we can expect the angle of deflection to be.
Since at this point, the bob is in equilibrium, the tension in the string must be equal to the magnitude of the vector sum of weight and lateral force. In other words:
$$T=m\sqrt{a^2+g^2}$$
We use the Pythagorean theorem since the lateral force and weight are always orthogonal.
For the second part, as far as I know, since the velocity is constant, $T=mg$. There are no torques at play here. The problem is entirely one-dimensional.
Please comment if anything seems off!
Comment: I cant understand first part last step
Comment: Which part exactly are you referring to?

Tension in a string moving in elevator


From_unixtime in derby and hsqldb

Question: I am using derby and hsqldb for unit testing my code. In my code, i am using HQL (hibernate query language). In those queries, i am using from_unixtime(timestamp) to extract datetime from timestamp. It seems that derby anf hsqldb don't support from_unixtime. Also, seems to me that from_unixtime is mysql specific function. How correct is that? How can i test my hql query (which contains from_unixtime(timestamp) function using derby or hsqldb?
Answer: FROM_UNIXTIME is indeed specific to MySQL.
HSQLDB 2.2.6 and later supports this function to convert a unix time (in seconds) to a datetime value:
<code>TIMESTAMP( <second value> )
</code>
For example:
call timestamp( 1000000000) returns 2001-09-09 01:46:40.0
HSQLDB 2.2.6 also supports a MySQL syntax compatibility mode, which includes several automatic conversions for SQL statements written for MySQL.
Answer: In Derby, you may be able to use the JDBC escape function TIMESTAMPADD to add your interval in seconds to the base timestamp of January 1, 1970. Here's some docs: http://db.apache.org/derby/docs/10.8/ref/rrefjdbc88908.html Here's some discussion of translating back and forth between the MySQL techniques and the Derby techniques: http://objectmix.com/apache/646986-mysql-to_days-emulation-derby.html

From_unixtime in derby and hsqldb


Harry Potter Deathly Hallows

Question: How old was Harry when he left the Dursley's residence prior to the Battle of the Seven Potters?  If he had just turned 17, why leave by broom/flying vehicle instead of using a port key or Floo Powder?  2nd part of my question, why leave by magical means at night when he could have taken polyjuice potion or used his invisibility cloak and transport himself via non magical means like the tube or taxi during the day?
Answer: Harry left the Dursley's residence just before his birthday (not after it) so he still had the trace on him.
In answer to your second question, they tried to leave at a time that the death eaters were not expecting (gave false leads and such) and the dead of night is perfectly viable for stealth. The only reason it didn't work is because they were "betrayed". Blending in via normal transport may have worked, but it would have put Harry at a larger risk, for a larger amount of time, and if they had done that and been betrayed then they would have not been anywhere near as prepared to defend themselves.

Harry Potter Deathly Hallows


Are there any theorems which mathematically show the importance of random sampling?

Question: This is an obvious question - random sampling seems intuitive as it makes each element having an equal chance of being selected, intuitively reducing possible biases. If someone was to calculate the "lift" of a model, they would intuitively compare it against random selection. Are there any theorems which explicitly state the importance of random sampling in being able to generalize the results (more so than if elements were sampled systematically - e.g. if elements are sampled strictly every 30 minutes, this may cause a bias)?
Comment: Sampling something each 30 minutes in many cases could be equivalent to random sampling. Similar example: you ask every 10th passing pedestrian to fill in your questionnaire - in many cases there is no reason to consider such sample to be non-random sample of pedestrians. Pseudo random number generators are also deterministic functions producing "random" outcomes.
Comment: @tim: On the other hand, if you do the sampling 48 times less frequently, it probably wouldn't be representative. Unless you *know* that there's no periodicity at the sample frequency, or at a multiple of the sample frequency (and you can't *know* that for sure), then you can't assume it's random.
Answer: There are many papers and book that study this in different settings. One example, would be with Markov Chain Monte Carlo (MCMC) where the samples generated from the posterior distributions are auto-correlated. Time series can be similar. In this case you can measure "effective sample size" which basically measures how much information you have lost by not having proper full random sampling. See for example this question.
There won't be a really strong general result for all settings, as there are so many ways to deviate from fully random sampling.
Note that the opposite is also often true, for example with imbalanced groups stratified sampling can be much more effective then purely random sampling. If you study the effect of age on a dependent variable you might want so sample people so you have a wide range of age.
Answer: It sounds like you want a specific answer to a general question. I'd say this is covered by the law of large numbers, but if you want a more specific study, I'd look at Gaussian convolution operations. It is easy to demonstrate that the average value of the sum of a number of similar Gaussian curves trends quickly to a delta function with a vanishing standard deviation.
For theorems that "state the importance of random sampling", I would look more at various hypothesis testing procedures to quantify that uncertainty.


Weird kids' keyhole popup book?

Question: There was a book when I was a kid that I had. It must have been an early 2000s or a 90s book. It was about looking through this keyhole. I remember one page being peeking through the blinds to see outside. The last page was a pull out pop up with a keyhole cut out. You could see several different rooms through this layered keyhole, like a boy picking his nose or an old lady and that. Its art style was wacky and strange and the book cover was a watercolor grey with a keyhole or something.
Comment: Could this be _Peepo!_ (a.k.a. _Peek-A-Boo!_) by Janet and Allan Ahlberg, as shown on https://medium.com/wonderbly-backstage/the-janet-and-alan-ahlberg-product-portfolio-teardown-58d0f6faa9af  ?
Comment: I'm looking for this too and can't think of what it is! Did you ever find it?
Answer: The Snoops by Miriam Moss perhaps.
The back cover has a keyhole image:
From the Publishers Weekly review:

Readers get the scoop through the eyes of the Snoops, until the
binoculars are turned on the last page, which offers a 3-D peek into
number nine Keyhole Place. There readers can spy the Snoops
themselves, picking their noses, practicing karaoke and snarfing
chocolates while clad only in underwear. Moss's (Jigsaw) text creates
a hushed, conspiratorial tone and creepily paranoid atmosphere.
Spidery, crudely rendered hand-lettered text sets off the eccentric
style of French artist Durand's cartoon illustrations, often framed by
a keyhole, raised blinds or a binocular shape.

Amazon reviewer mentions accordion-style pop up at the end.

Weird kids' keyhole popup book?