Relation between torque and moment of inertia

Question: I have seen 2 formulas: $\tau = I \alpha$ and $\tau = I \dot\omega + \omega \times I \omega$. Which one shall I use in which case please? Also, am I right to think that $\alpha$ from the first formula is $\dot\omega$ from the second one?
Comment: It feels like the first equation applies when you have a solid rotating body. I am however not able to reproduce the second equation. Where does it come from? Are you sure that it's correct? You are right usually $\alpha = \dot{\omega}$.
Comment: A system of particles is not necessarily a rigid body, but a rigid body is a system of particles.
Comment: @StevenMathey: I got the second equation from http://andrew.gibiansky.com/blog/physics/quadcopter-dynamics/ (long article, search for "We derive the rotational equations") and http://en.wikipedia.org/wiki/Moment_of_inertia for the resultant torque of a system of particles (is a system of particles a rigid body?). I understand the first equation, it seems to match my naive observations. I would like to understand if there are cases where I should use the second one.
Answer: Yes, $\alpha = \dot{\omega}$, being the angular acceleration.
The first equation is special case of the second equation.
For a general object the moment of inertia is not just a scalar (a single value) but a tensor, in that case you have to use your second equation.
$\tau$ and $\omega$ are then vectors and $I$ is a 3x3 matrix.
But when you spin an object around one of its high symmetry axes (one of the eigenvectors of the inertia matrix $I$), the equation simplifies to your first equation.
Proof:
If $\vec{\omega}$ is an eigenvector of $\hat{I}$ it holds that:
$\hat{I} \vec{\omega} = \lambda \space \vec{\omega} = \vec{\omega} \space \lambda$
Therefore your second equation becomes:
$\vec{\tau} = \hat{I}\dot{\omega} + \vec{\omega} \times \vec{\omega} \space \lambda$ and
$\vec{\tau} = \hat{I}\dot{\omega} + 0$
since the crossproduct of a vector with itself is 0.
Comment: Brilliant answer, thanks. Exactly what I was looking for, no more no less.
Answer:
I have seen 2 formulas: $\tau = I \alpha$ and $\tau = I \dot\omega + \omega \times I \omega$. Which one shall I use in which case please?

You use the first formula in introductory physics classes on specially constructed problems that avoid the issues connected with the second formula, and also in practical settings that by design and operation make the $\vec \omega \times \mathrm I \vec \omega$ term very small. For example, its a good idea to keep the the wheels on your car balanced so as to keep the issues connected with that second term to a barely detectable minimum.
You use the second formula in more advanced settings when you are reasoning from the perspective of a reference frame fixed with respect to the rotating object. This is a rotating frame, and rotating frames result in fictitious forces and fictitious torques. One way to look at that $\vec \omega \times \mathrm I \vec \omega$ term is that it is a fictitious torque.
There is a third option, which is to reason from the perspective of an inertial frame. The rotational analog of Newton's second law results in $\vec \tau = \dot {\vec L}$.  Since $\vec L=\mathrm I \vec \omega$, the rotational analog of Newton's second law becomes $\tau = \mathrm I \dot {\vec \omega} + \dot {\mathrm I} \vec \omega$. The second term, $\dot {\mathrm I} \vec \omega$, arises because the inertia tensor in general is not constant from the perspective of an inertial frame. Without derivation, the time derivative of the inertia tensor from the perspective of an inertial frame is the commutator $[\operatorname{Sk}(\vec \omega), \mathrm I] = \operatorname{Sk}(\vec \omega) \mathrm I - \mathrm I \operatorname{Sk}(\vec \omega)$ where $\operatorname{Sk}(\vec \omega)$ is the skew symmetric cross product matrix generated from the vector $\vec \omega$.
This suggests that there's more to that $\vec \omega \times \mathrm I \vec \omega$ term than just a fictitious torque. Expanding the inertial frame term $\dot {\mathrm I} \vec \omega$  results in $\vec \tau = \mathrm I \dot {\vec \omega} + \operatorname{Sk}(\vec \omega) \mathrm I \vec \omega - \mathrm I \operatorname{Sk}(\vec \omega) \vec \omega$. The final term, $\mathrm I \operatorname{Sk}(\vec \omega) \vec \omega$, vanishes, leaving just $\vec \tau = \mathrm I \dot {\vec \omega} + \operatorname{Sk}(\vec \omega) \mathrm I \vec \omega = \mathrm I \dot {\vec \omega} + \omega \times \mathrm I \vec \omega$, which is identical to the rotating frame formulation.
Hardly anyone uses the inertial frame POV because having a time-varying inertia tensor is just too nasty.
So how does that rotating frame formulation arise? The answer lies in what some call the kinematics transport theorem,
$$\left(\frac {d\vec q} {dt}\right)_I = \left(\frac {d\vec q} {dt}\right)_R + \vec \omega \times \vec q$$
where $\vec q$ is any vectorial quantity in $\mathbb R^3$, the subscripts $I$ and $R$ on the derivatives denote the derivatives from the perspective of an inertial frame versus a rotating frame, and $\vec \omega$ is the angular velocity of the rotating frame with respect to the inertial frame. Substituting $\vec q$ with $\vec L = \mathrm I \vec \omega$ yields
$$\vec \tau = \dot {\vec L}_I = \dot {\vec L}_R + \vec \omega \times \vec L = \mathrm I \dot {\vec \omega} + \vec \omega \times \mathrm I \vec \omega$$
A side issue is how to prove this transport theorem. That's a good question. As an aside, my officemate (a former physics professor who became disgruntled with academia) and I found we were both a bit disgusted with the hand-wave derivations used in many physics and engineering textbooks. We went through a number of them, categorizing them as (1) "OMG. Physics math again." (2) "OMG! Too much math!" and (3) "OMG!! Goldilocks math!". Most of the texts we looked at fell into the first category (and that included a number of graduate level texts). A small number had a derivation as an appendix that fell into the second category. We did not find a single text that fell into the Goldilocks category.
Comment: Thanks for the extra info. By the way I was looking at this for a real-world quadcopter project, and even if it can theoretically roll/pitch/yaw at the same time, measurements during a typical flight showed the $\omega \times I \omega$ is negligible.


Configure Tor as the predetermined browser in a PC Win Vista

Question: Although I stick to the predetermined browser option when installed it doesn't work when a link (http) is opened. What's the matter?
Further more, Tor doesn't appear among the installed programs list of the Windows control panel!
What am I doing wrong?
Comment: Strictly, this is a duplicate of https://tor.stackexchange.com/questions/1725/tor-default-browser (and perhaps others). But I like this question better. So?
Comment: That's a pity. The question linked for "setting Tor as determined browser" have not any Response. So that, I'll remain still waiting for responses to this issue.
Answer: The Tor browser does not need installation. All you need to do is unpack the torbrowser-install package. It does not appear among the installed program list of the control panel because it is not installed. It is only unpacked. There is HTTPS Everywhere plug-in activated in Tor browser to provide encrypted version of web pages to users for their protection when an encrypted version of a site is available.
Comment: You beat me by five seconds ;)
Answer: You're not doing anything wrong. The Tor browser isn't an installed program. It's just an executable in a folder that you've extracted somewhere. As such, it can't be specified as the default application for HTTP/HTTPS.
In Tor ticket 12763, I see this comment by mcs:

Replying to lunar:

  | Do we want Tor Browser to become the default system browser? Correct me if I'm wrong,
  | but I believe this has privacy implications. Applications would be able to easily open URLs
  | within the Tor Browser, and link Tor activities with what they know about the system.

  I agree that applications may be able to take advantage of the fact that the Tor Browser is the default browser. I don't think making TB the system default is something the Tor Project is likely to recommend or do automatically, but some people may want to do so.

  I am closing this bug.

I haven't found anything specific about setting the Tor browser as default in Windows, but maybe I didn't search enough.
Comment: Dear, I like your answer better.
Comment: Thanks a lot. Anyway I suppoused that. About the other question (predetermined browser) I'll have a look on de attached link.


Why do lower molar mass rocket exhaust products give higher specific impulse?

Question: I tried to work this out.  My thinking is as follows.  If the same amount of energy is given to a low mass particle and a high mass particle, the low mass particle is faster.  A particle with a mass of 1 will be twice as fast as a particle with a mass of 4 but the momentum of the particle with a mass of 1 will be twice that of the particle with mass 2, which seems to go against what is seen with regards to molar mass and specific impulse.
Comment: I think this question might do better on the Space Exploration SE site.
Comment: Since specific impulse is per unit of _mass_. So you should not be comparing a low mass particle with a high mass particle, but a bunch of low mass particles with a smaller bunch of higher mass particles of the same total mass. And the molecular mass falls out of equation and only the total mass matters. Besides products of burning high molecular mass fuel (like kerosene) don't have high molecular mass themselves.
Answer: Your question is slightly confusing. What you seem to ask is why, given that momentum is proportional to the energy, and speed increases only with the square of the energy input, a heavy rocket fuel is so much worse than a light fuel.
For a rocket, the speed of the burnt gases exiting the nozzle is important. Heavy molecules need more energy for the same acceleration, so the lighter the rocket fuel is, the higher are the nozzle speeds. Momentum is less important, because the mass of the fuel is on both sides of the equation: Heavy fuel in the rocket's tanks needs more energy for the same acceleration, and the chemical energy of the fuel is not proportional to its molecular mass.
Thrust is mass throughput times exit speed. For a given mass, thrust can be increased if the exit speed can be maximized. Since this mass must be accelerated, the total fuel mass needs to be as small as possible, not the number of fuel molecules (as your question implies). As you say, using lighter molecules helps to achieve this. The only problem is that lighter fuels need more volume, so a hydrogen rocket is bigger than one using alcohol (V-2) or Kerosene (Vostok).
To get the best specific impulse, the mixture in a hydrogen rocket engine is not stoichiometric, but uses only as much oxygen as required to heat up the gases up to their dissociation temperature. Adding more oxygen would set free more energy, but this would only be used up to ionize the combustion gases, not to heat them up more (Oberth effect).


How and why is Emilia connected to Satella (the Witch of Envy) and the Witch Cult?

Question: Of course, I know the Witch Cult intends to use Emilia's body as a vessel to resurrect Satella, but I wonder why? Maybe it's the fact she's a half-elf? Does the cult have other plans for her? Does the cult have some ways to contact Satella? And furthermore, did, and does, Satella agree with them?
Answer: Not revealed yet. But it could be a time travel/timeline story.
Each time Subaru dies, it's actually a parallel timeline. Satella is Emilia from one of them... except in the future. Where Subaru did everything "right" but died.
Not knowing the truth, Emilia travelled back in time, so she can "save" Subaru from death by making him come back from death, unknowingly creating the situation leading to his death.
Answer: From the Wikia
Certain people, such as Echidna and Pandora, have referred to Emilia as "the witch's daughter", with Pandora also mentioning that she was of the witch's bloodline after seeing her power, hinting at some sort of connection between the two, though nothing has been explained.
Answer: I fell as though she is Satella because of the simple fact that when Subaru asked her name for the very first time, she told him it was Satella.
Answer: I think that Emilia is actually the daughter of the Witch (Satella), because of three reasons :

It is mentioned many times by the villagers and other witches and many more that she is actually the witch's daughter and not the witch herself.

when she met Pandora in Echidna's tea party it felt like they both had some kind of relation (like 'aunt-niece' cause all withes are like sisters) cause Pandora was crying after they met, and she knew her mother too .

When Satella was finally revealed she had quite a uncanny resemblance to Emily like of a mother and daughter.

So at last my conclusion is that Emilia's mother was Satella and her father was some Elf and due to some cause emilia was left in Fortuna's (her father's sister) care and that'swhy even Fortuna couldn't tell Emilia 'bout her mother cause she was the witch's DAUGHTER.
Answer: As mentioned above, it is not yet revealed/confirmed, but I do suspect that this whole story has time travel written all over it. The trials set by the Witch of Greed in the Sanctuary allowed Subaru to view "An unspeakable present", there he saw all of the alternate realities where he died, all the times he died. There, we learned that people even tried healing his body and succeeded but because of his Return by Death, the Soul was no longer in his body, but instead in the new timeline where time reset.
I theorize that Satella is in fact Emilia, from the future. This can simply be an alias Emilia calls herself when she travels back in time to become the Witch of Envy. All of this, to save Subaru, who has died in her timeline. So she grants him the gift of "Return by death" after having gained enough power to do so by consuming all of the other witches. This way, she made sure Subaru would live no matter what, in one timeline. This would explain why Emilia looks IDENTICAL to Satella, why she gave the name of Satella in the first episode, why Satella is OBSESSED with Subaru, and claims to love him deeply. She obviously knows him, but he doesn't know Satella. This is because, as I mentioned, Satella is definitely a future Emilia from another timeline. Time travel is confusing ;D
Answer: I feel as if Satella is actually Emilia, who travelled back in time to get the authority of Envy but suddenly got trapped in the past but somehow had a link to Subaru and her present/future events. Which could explain why she knew about Subaru before he came to Lugnica and why Emilia gave herself the name of the Witch of Envy. It would also explain why their appearances look similar because Satella looks similar to an adult Emilia which could explain why she was able to retain knowledge about Subaru. She even acted on "love" and brought him to Lugnica and cursed him with Return By Death so that he could create a future where they could be together.


How to get a query odered by N of matching taxonomies?

Question: How can I get a wp query that is sorted by how many tags (in my case) match a specified list? I want to retrieve a list of posts that match the category of the current post (which is a plain filter) but that are ordered from the highest number of matching tags to the lowest. Is it too much resource intensive?
Answer: There is no native function which to accomplish what you need. The only possible solution that I can think of is to make use of usort to sort the returned array of posts from your custom query
You will need to do the following:

Set you list with the desired tags
Get a list of the tags a post belongs to
Return an array with all the tags that match the two arrays
Count the tags, and store the tag count in an array
Sort your array and loop through the posts again and display as normal

The functions used here are as follows

get_the_tags
usort
array_intersect
wp_list_pluck

Here is an example code. Modify as needed
$args = array(
    'posts_per_page' => '-1',
    'cat' => 'YOUR_CATID',
);
$q = new WP_Query( $args );

if( $q->have_posts() ) {
$count = [];
$count1 = [];

    while( $q->have_posts() ) {
        $q->the_post();

        $posttags = get_the_tags();
        if( $posttags ) {
            $tag_slugs = wp_list_pluck( $posttags, 'slug' );
            $relevant_tags = array('tag1', 'tag2', 'etc which translates to end of thought capacity' );
            $matched_tags = array_intersect( $tag_slugs, $relevant_tags );
            $count[$post->ID] = count( $matched_tags );
        }else{
            $count[$post->ID] = 0;
        }
    }

    usort( $q->posts, function ($a, $b) use($count) {

        return ($count[$a->ID] < $count[$b->ID]) ? 1 : -1;

    });

    rewind_posts();

    while( $q->have_posts() ) {
        $q->the_post();

        //Display your loop elements

    }
}

Comment: I am sorry for not replying, I ended up using the code found here:
https://wordpress.org/support/topic/not-working-on-custom-post-types-2?replies=7, maybe slow on performance to a degree but does not seem that bad to me, also I am still not heavy caching, I also made this compatible network wide with a few modification and an external plugin. I do not quite remember why I did not use the code suggested here, the code uses usort the same


What is the point of major punishment for sins?

Question: Let's say someone stole or committed zina what is the point of stoning or lashing when the person can be taught and should turn in repentance. Stoning someone doesn't even give them a chance to repent and is quite violent wouldn't it be better to let the person repent and pay back through work or something?
Answer: The point is (a) expiation for the criminal's sin while in the dunya (any worldly punishment being better than punishment in Hell) and (b) acting as a strong deterrent, preventing others from doing the same in the future.

"can be taught"

In Islamic society where such punishments would be implemented, the atmosphere would be one of knowledge and dawah, whereby the message of Islam would reach the people daily. Mere children would be taught and would know right from wrong, let alone adults. Ignorance would not be an excuse.

"should turn in repentance"

Turning to Allah (ﷻ) in repentance is something easy that anyone can do at any time until the death rattle reaches the throat. The time leading up to someone's punishment being implemented is not something that happens in the blink of an eye, rather it's a process (e.g., case explained to judge, judgement, moments leading up to punishment, etc). At any time a person can repent to Allah (ﷻ) sincerely and be forgiven. But that doesn't change the fact that the punishment MUST be carried out once required conditions are met.

"is quite violent"

The intensity of the punishment is equity for the intensity of the crime. Did Allah(ﷻ) prescribe any major punishments for lesser sins (lying, masturbation, etc)? No. Major punishments were prescribed for major actions that cause trouble, chaos and distress in society. Stopping these troubles is not as easy as "let them repent and pay back though work". Plus, consider the alternative: If there were no major punishments for sins, then sinners could just keep on sinning with the expectation that they will be let off easily. This enables crime to continue. The Islamic justice system is perfect, Alhamdulillah.
Comment: You said that " Major punishments were prescribed for major actions that cause trouble, chaos and distress in society" but something like adultery, even though it is not modest in any way, doesn't really impact society that much or do anything bad so killing someone for it is quite extreme isn't it? I'm not trying to say it offensively btw.
Comment: Also if the Islamic justice system is perfect why are there so many things to point at that don't seem "civil" and why are there so many critical points? Just asking
Comment: Hi. The family is the basic unit of society. Adultery destroys families and wrecks homes, thereby being a major risk to a harmonious society. The more broken and unstable homes due to adultery, the more dysfunctional the society (more miserable people, more divorces, more children without fathers, etc). Not to mention, it spreads disease among other things. Married people have no excuse to sleep with others when they have a halal partner through whom they can relieve sexual desires AND have the option of divorce if for some reason their sexual rights are not satisfied.
Comment: "why are there so many things to point at" - I don't find that to be the case. What I find is that there are so many misconceptions that people have often because they form conclusions against Islam long before they even read Islamic texts. So they approach with a critical eye and try to find faults, many of which aren't real faults.


Intuition for why LDA is a special case of naive Bayes

Question: The naive Bayes classifier assumes the regressors to be mutually independent, while linear discriminant analysis (LDA) allows them to be correlated. James et al. "An Introduction to Statistical Learning" (2nd edition, 2021) section 4.5 (bottom of p. 159) claim that LDA is in fact a special case of the naive Bayes classifier (admitting that the fact is not at all obvious -- with which I agree, and hence my question). What is the intuition?
Answer: Here's my intuition:
The LDA classifier assumes that across all classes, the $p$ predictors $\boldsymbol{X}_k$ (for $k=1, \dots,p$) all share some covariance matrix ${\boldsymbol \Sigma}$, but may have different means $\boldsymbol{\mu}_k$. Thus, if you define the alternate set of predictors $\boldsymbol{Z}$ to be $p$ independent normal random variables with variance 1 and means $\boldsymbol{\Sigma}^{-1/2} \boldsymbol{\mu}$, then $\boldsymbol{X} = \boldsymbol{\Sigma}^{1/2} \boldsymbol{Z}$. This is a linear transformation, so a linear classifier on the $\boldsymbol{Z}$ variables would be linear on the $\boldsymbol{X}$ variables, too.
Note that the naive Bayes classifier is linear on its predictors (this is shown on page 159 of your reference), and it clearly applies on the $\boldsymbol{Z}$ predictors since they are independent by definition. So LDA is the same as some naive Bayes classifier. But as mentioned in your reference (also page 159), the same is true of any linear classifier.
Comment: Interesting. This explains *in which sense* LDA is a special case of naive Bayes (nB). For any given problem (a given set of $X$s) that satisfies the assumptions of LDA, LDA is not a special case of nB unless the $X$s happen to be uncorrelated. However, every such problem can be reformulated so that nB becomes applicable, at the expense of making LDA no longer applicable due to assumption violations that are introduced. Did I get that right?
Comment: That's not quite how I see it. My perspective is that there is a one-to-one correspondence between the two. So it's not that LDA is invalid on the transformed version - you could do LDA there, too, just as well. Instead, the linear transformation just gives you **two distinct ways of looking at the exact same classifier**. From one perspective it is called LDA, from the other is is called naive Bayes. But it is the exact same classifier. I have edited my answer to clarify this point.
Answer: LDA is a special case of a n̶a̶i̶v̶e̶ Bayes classifier.

It is assuming Gaussian distributions
For different classes, the distributions have the same variance (the same covariance matrix for their distribution with respect to the variables $X$).

Gaussian Naive Bayes classifier is a special case of LDA
If you consider the naive Bayes classifier with the assumption of Gaussian distributions and the same variance for different groups/classes, then you could see this as a special case of LDA. It is like LDA with the restriction that the covariance matrix $\Sigma$ is diagonal.
Other point of view
You might also see the LDA as a pre-treatment step giving you as result one or more components. Then afterward you apply naive Bayes on the components. So LDA can be seen as a special case of naive Bayes in the sense that it is naive Bayes with a pretreatment extracting first LDA components.
Comment: I think I do have a basic understanding of LDA and Bayes classifier. I am wondering about  a specific relationship between them, one that seems counterintuitive. Does your answer address that? Your first paragraph seems to overlook the property of naive Bayes that the regressors are assumed to be independent.
Comment: Right... Which brings us back to my question: why do they state otherwise in the new edition of ISL? I like the answer by Wesley which has been deleted unexpectedly. My comment under it shows how much I understand. If you can see the deleted answer and my comment, do you agree with them?
Comment: @RichardHardy you are right. LDA is a Bayes classifier, but not a *naive* Bayes classifier. The naive Bayes classifier is like LDA with the restriction that the covariance matrix $\Sigma$ is a diagonal matrix. On the other hand, LDA is like naive Bayes classifier with restrictions that the distribution is assumed to be Gaussian and similar in all classes. So neither is a special case of the other.


Is it allowable to use an organization's name to publish a paper in a conference, even after I graduate from it?

Question: I just graduated from my university, and I have a paper to submit to a conference. I was filling out the information to submit my work to them, but I am not sure what to put as my organization. Since I have now graduated from the university, can I still use their name to publish my work? If the answer is no, is there any solution to get my work published?
Comment: You should specify if you will have co-authors. Presumably at least one of those would be from your previous institution, which means it is no longer necessary to worry about the institution itself being worried in any way about being associated with the paper.
Answer: The affiliation to your name on a publication should reflect where most of the work was done and where most of the funding came from.
Scenario 1
You just graduated and you want to publish your results in a paper. The manuscript will be written after graduation, but essentially all the results come from pre-graduation work. The affiliation is clearly the university where you graduated.
Scenario 2
You just graduated and continue researching on the topic. The new paper is an extension of your previous work, but all the work has been done by you after graduation. The affiliation is clearly not the university where you graduated. All the previous work should be cited accordingly. You can submit a paper independently, but it will be easier with a university affiliation. Talk to your former supervisor for advice.
Scenario 3 (in between 1 and 2)
You just graduated and you did some new research after graduation. However, a non-neglible part of the manuscript is from before graduation. In this case, you should talk to your former supervisor and ask for their opinion. In my opinion, they will be more than happy to have the paper submitted under their affiliation.
This answer is an extension of what Vladimir F said in the comments.
Comment: This is the main answer, but a small addendum: There are two different things a conference may want your affiliation for — for the publication, and for you as a conference participant (e.g. on your name badge).  As this and other answers say, the "publication affiliation" is a bit subtle but could be either the old or the new.  The "name badge" affiliation should generally be your current one, though, so even if they don't already ask for e.g. "affiliation on publication" and "current affiliation" separately, I would recommend giving them both, with a note about the publication one.
Answer: To broaden the answer a little. I am not aware of any university that requires approval prior to publication, but some organizations (e.g., US government labs) have policies regarding what work can be published and the steps the authors need to take regarding dissemination of the work. If your prior university/organization had such a policy, you should still follow them.
Comment: I am aware of such a university - my own. If you are not a current student supervised by permanent staff, permanent staff, or temporary staff on a >1 year contract, a "research committee" has to approve your use of the affiliation for a paper. If you publish in Science or Nature without asking first no one will care. The point of this is to stop people from publishing in very low IF journals as it takes the university's average down when considering how to distribute federal funding.
Comment: Same for coauthors, if any.
Answer: The affiliation can be the one that you are currently with (eg a company/new university), or the old one if you're still looking around for a job. What's important is that
a. You offer an email address that will be active for a reasonable amount of time.
b. That you mention that most of the work was done when you were in your former university.
Answer: Both choices here could prove to be seriously wrong. If you use the affiliation, you could be seen as misrepresenting yourself and the institution. If you don't use it, you could be seen as failing to give credit where it is due (especially if you received funding or other support to perform the work that you are now publishing). So, the only correct course of action is to ask your former supervisor (or other appropriate contact) at the university, what you should do.
Comment: Unless the research is highly controversial, I have a hard time envisioning a scenario where listing the university affiliation would prove seriously wrong.
Comment: @Underminer if the author is no longer actually affiliated with the institution, the claim could be seen as dishonest -- and the work needn't be controversial for the institution to want to distance itself from it, it can simply be (considered to be) of poor quality
Answer: One option would be to get a visitor or guest affiliation with your old university. These are usually easy to get, and my experience has been you just need to fill a form out with basic contact details. This let's you still put your old University as your affliaition. Usually you will also get to keep your old email address for another year which can be helpful as people don't always update their address books straight away.


Bluetooth Mouse Paired but not working

Question: I managed to pair my generic bluetooth mouse with my Ubuntu 15.04.
But it doesn't seem to work just yet, although the bluetooth settings says that I am connected with the mouse and the mouse's laser is responding, I the pointer is not moving at all.
Comment: What bluetooth, can you edit question to include `lsusb; dmesg | grep firmware`
Answer: Does mouse work with other machines?  If so, then it's an issue with Ubuntu.  To solve that, connect your wired and wireless mouse BOTH to the machine, and see if either of them works.  If the wired mouse works, then it sounds like you have need to find a driver for the wireless.  If the wired doesn't work, then it sounds like Ubuntu is doing a mini-crash when you connect your bluetooth mouse.
If it doesn't work with other machines, return it.

Bluetooth Mouse Paired but not working


Best way to view white SVG on Windows

Question: SVG can be readily viewed in Edge browser. However white SVG on white browser background aren't good to see. Do I need to install an external program for this or am I missing a setting?
Comment: I'd be perfectly happy to use native Windows tools or Edge with different settings. If that's possible. "Use a different program" would be good enough as an answer. I'll rephrase the question.
Comment: You are asking an off-topic question (software shopping). Questions seeking product, service, or learning material recommendations are off-topic. See [On Topic](https://superuser.com/help/on-topic). Try https://softwarerecs.stackexchange.com/  but please first read [What is required for a question to contain "enough information"](https://meta.softwarerecs.stackexchange.com/questions/336/what-is-required-for-a-question-to-contain-enough-information).
Answer: There is no direct way to view white SVGs but you can do some hack to view them on a chrome browser. Drag and drop the svg to chrome browser and open the dev tools(f12 or ctrl + shift + i) and change the background color of the topmost DOM element to black and voila you can view the white SVG.
Find the topmost dom and change the background color
white svg on black background
Answer: I've created a bookmarklet to set the background to a checkerboard pattern.
Create a bookmark and set this as the URL
<code>javascript:(function(){document.body.style.background = null;document.body.children[0].style.background=null; document.children[0].style.backgroundImage = `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill-opacity="0.3" width="50" height="50" ><g fill="grey"><rect x="50" width="50" height="50" /><rect y="50" width="50" height="50" /></g><rect width="50" height="50" /><rect y="50" x="50" width="50" height="50" /></svg>')`;})();
</code>
Then if you load a SVG that is white hit this bookmark and it will set the background to a checkerboard.
I keep improving that bookmarklet so the repo is here: https://github.com/Myster/TransparentBackgroundRevealer
It also includes a hotlink to the latest version. So you may wish to fork so you can review any changes.
Comment: Pasting it into the Chrome/Edge Console I get `Uncaught TypeError: Cannot read properties of null (reading 'style')`, but the GitHub version works OK.

Best way to view white SVG on Windows


Trying to use squeezelite with existing PulseAudio outputs

Question: So I am trying to set up a squeezebox (Logitech media server) client using squeezelite on my Ubuntu 16.04 install, and am having some trouble getting what I want out of it.
What I am trying to achieve
I want to be able to be playing music on my desktop through my headphones, and be able to open up the sound menu to switch the output to the computer's external speakers.
What is actually happening
When squeezelite is running, the sound menu does not show the built-in audio options (which includes the external speakers which are connected with aux), and sending audio to my computer from the server plays through the external speakers. When I kill squeezelite, the audio outputs reappear in the sound menu.
Any help at all would be greatly appreciated, even if you only have a vague idea of what is going on. I want to know more of ALSA, PulseAudio, and especially squeezebox and squeezelite, so I welcome virtually any answer!
Answer: This answer is about getting rid of that squeezelite blocks audio.
This was probably because squeezelite was directly using the ALSA device.
Solution for this: Specify the output device used by squeezelite.
squeezelite -o pulse

Btw all devices are listed with
squeezelite -l

Note: At least very recent versions (using here with 17.04: 1.8-3build1) use by default this output, i.e. '-o default' should be the same as '-o pulse'.


Apply Multiple filter in odoo at a time

Question: Currently I am using odoov8, my problem is that I have created many filters from xml code as per my requirement and all are working fine ,but I can select only one filter at a time .
so for example I want to apply any 3 Filters in tree view , then I need to select first one , then system loads the data , then I select 2nd and then 3rd filter , so system is loading after applying each filter .
I want to achieve that if I can select all my filters at once and then I can apply search , so system loads after I apply for search , no matter how much time it taking but I should not require to search single filter .
so is there any custom module or way from which I can achieve this .
Thanks in advance .
Comment: You can make custom filters and set it as a default
Comment: But it will not be flexible , I want to achieve that user should able to select the filters that he wanted to apply at a time .
Answer: I am not aware of any module that implements this.
This functionality already exists on the Advanced Search, you add conditions and then click Apply you can take a look at the corresponding widget and copy functionality.
What you need to do is modify the javascript so that upon the clicking of a filter it should be added on the oe_searchview view but the search_read method will not be invoked. You need to start the modifications from web.search.FilterGroup widget and specifically from the search_change method which is invoked every time you click on the filters.

Apply Multiple filter in odoo at a time


what is the main problem between Js and DOM that Angular / React / Vue try to solve?

Question: I want to know what is main problem between  javascript and DOM that Angular / React / Vue try to solve,
Please guide me I'm new learning Angular.
Answer: React and Vue use a pattern called the Virtual DOM to optimize updating the DOM in order to render changes faster. Angular uses another method with similar motivations. Web technologies weren't originally designed to build robust applications in the browser. These frameworks attempt to enhance application performance and improve the developer and end-user experience until web standards catch up to modern use cases.

The virtual DOM (VDOM) is a programming concept where an ideal, or "virtual", representation of a UI is kept in memory and synced with the "real" DOM by a library such as ReactDOM. This process is called reconciliation.

Source: https://reactjs.org/docs/faq-internals.html
Comment: I think the answer that i'm looking for is Vartual DOM
thanks for explaining to me
Answer: Your question is one of the difference between SPA (Single Page Applications) vs MPA (Multi-page Applications).
All of Vue, React and Angular use an SPA design to only update DOM elements that are changed, instead of reloading the entire page. This is the main problem that these frameworks aim to solve instead of using vanilla javascript.
Comment: javascript can update DOM elements too, i didn't get your answer clearly
Comment: correct, but its 10x easier and more readable to do it in an SPA
Answer: The short answer to your question would be: because accessing the DOM elements is "expensive" (in terms of browser resources, memory, speed). That's why we have a Virtual DOM, a temporary copy of DOM which is purely in JS, and accessing, adding, modifying, and deleting elements is significantly faster, and that's why applications written in Angular, React or Vue has better performance.


What are the Necessary and sufficient conditions for concavity and convexity of a two variable function?

Question: For concavity and convexity is that the Hessian be  negative semidefinite and positive semidefinite
But for strict concavity definiteness is only the sufficient condition not the necessary . What is the necessary condition for a two variable function to ensure strict concavity / convexity ?
Answer: Your initial statement is wrong: the Hessian does not have to exist for the function to be concave or convex.  For example, $|x|$ is convex but does not have derivatives at $0$.
A necessary and sufficient condition for a convex/concave function to be strictly convex/concave is that its graph does not contain any line segment.
Comment: so the only way to do that is by checking it graphically? No other way?
Comment: You asked for a necessary and sufficient condition, I gave one.  How you check it is another matter: it may depend on how the function is defined.


The process cannot access the file because it is being used by another process

Question:
Took Screenshot and saved to ( D://Myimages//logo.jpg )
again Took screenshot and saving in same folder ( overwrite ) ( D://Myimages//logo.jpg )

But unable to overwrite the images in same path, getting "The process cannot access the file because it is being used by another process.".
i wanted to overwrite the images in same path.
Comment: Add the code. Show us how you save file and then re-save it.
Comment: Please provide enough code so others can better understand or reproduce the problem.
Answer: I guess you have opened the first image with some viewer and did not close that viewer when you tried to overwrite the existing image with a new one.


How do I re-install Zeitgeist Datahub in the Startup Application Preferences

Question: I stupidly removed Zeitgeist Datahub from Startup Application Preferences. How do I re-install it back there precisely as it was originally??
To put the question in another way: I did try to re-install it using the Add button on Startup Application Preferences, but then I was asked for a Command! I have no idea what that is or where to find it! What is the command? Where do I find it?
More importantly, how do I find out if Zeitgeist is even still installed in my system???
The reason I un-installed Zeitgeist from my Startup Application Preferences was because someone said it slowed the system down;
only later did I discover that Unity Dash will not work without it!!
I use Ubuntu 12.04 LTS
Answer: You can check if it is still installed by:
dpkg -s zeitgeist-datahub

If it is not, you can reinstall it simply by:
sudo apt-get install zeitgeist-datahub


Intersection form in Algebraic Geometry/Topology

Question: Let $S$ be a smooth complex projective surface. We let define an intersection form $(-)\cdot(-)$ on $\mathsf{Pic}(S)$ by setting $$D\cdot D':=\mathcal{O}_S(D)\cdot\mathcal{O}_S(D')$$ where the notations are the standard ones, used in the book Complex Algebraic Surfaces - Beauville. I've read in many textbooks that this form is induced by the cup product as follows. By taking the exponential sequence $0\longrightarrow \mathbb{Z}\longrightarrow \mathcal O_S\longrightarrow \mathcal O^\ast_S\longrightarrow 0$ we get a map $$c\colon H^1(S,\mathcal O^\ast_S)=\mathsf{Pic}(S)\longrightarrow H^2(S,\mathbb{Z}),$$ then $c(D)\smile c(D')=D\cdot D'$, where we use the canonical identification $H^4(S,\mathbb{Z})=\mathbb Z$. Anyway I've found no proof of this fact. Can you help me to check it or give me a reference for the proof?
Answer: I think that this can be extracted from the first chapter of Beauville's book on algebraic surfaces. First note that if D and D' are smooth irreducible curves that meet transversally, then the identity $C(D) \cup C(D') = D \cdot D'$ holds and is equal to the number of set-theoretic intersection points of $D$ and $D'$. This is one of the standard ways to compute the intersection product in smooth topology, recall that transversal intersection points of complex submanifolds always contribute $+1$. The right hand side is equal to this by Definition 1.3 of the intersection form (which is proven to be equal to the sheaf-theoretic definition in Theorem 1.4).
The issue of finding transversal representatives is treated by Fact 1.7 (which is originally a theorem of Serre). It states that any divisor $D \subset S$ may be written (up tp linear equivelance) as $D= A-B$ where $A$ and $B$ are smooth curves, $A$ is a hyperplane section and $B$ is a positive multiple of a hyperplane section (for a possibly different projective embedding). The advantage of having hyperplane sections is that we can peturb them (by perturbing the corresponding hyperplane). This gives us enough freedom to find transversal representatives for any two divisors (up to a linearly equivalent, possibly non-effective representatives), and allows us to reduce to the above case.
Comment: The main issue is just proving that, for a prime divisor, the element $c(D)$ is the Poincarè dual of $D$.
Comment: One may check that the map $c$ maps $D$ to $c_{1}(\mathcal{O}(D))$. If D is effective then there will be a section $s \in H^{0}(\mathcal{O}(D))$ whose zero-set is $D$. Then by definition of the first Chern class, this will be the Poincare dual of $D$. Now we can extend by linearity.


How to jump from "Emacs Command History" to "Emacs Commands" in helm

Question: I'm using Prelude. When I press M-x, I get helm-M-x. Recently I've used query-replace-regexp. Now when I type "replace-regexp", it automatically reaches for element in my history. There is separate section for commands below, where my beloved replace-regexp is, but I don't know how to reach it. How can I get in there and use the command I want to?
Answer: You can use C-n (helm-next-line) to move line-wise or C-o/<right> (helm-next-source) to move source-wise.
See the Basic Usage section of the Helm guide for more info:

Once you are in the helm session (of helm-M-x or any one else) you can hit either C-h m or C-c ?, the former is will popup a general info buffer about helm while the second will popup a specialized info of the current source you are into.

C-h m will give you a nice basic hotkey table and plenty of more info.
Comment: Per the Helm `M-x` help "Helm's basic operation and default keybindings" table: Although 'C-o` does work, `C-n` does *not* do what the OP requested, but cycles back around to top of command history.  `` is not defined by default.
Answer: I had this problem until I noticed that I had helm-move-to-line-cycle-in-source set to t.  I set it to nil and this problem vanished.


How does total money in the economy changes?

Question: I don't understand why total money in economy increases. Where does this money come from?
Comment: See the Bank of England's ["Money Creation in the Modern Economy" (2014)](https://www.bankofengland.co.uk/quarterly-bulletin/2014/q1/money-creation-in-the-modern-economy).
Answer: Fiat money in modern societies is usually printed (minted is the term used for stamping coin) under the authority of a particular institution, usually called Central Bank, Federal Bank, Federal Reserve etc. In different countries there are different rules that apply concerning its function and independence from central government.
Central Banks also are able of conducting monetary policy with various means and measures. In fact, more than anything, a Central Bank is charged with the responsibility of regulating the amount of money circulating in the economy.
A central bank can augment or decrement the amount of money circulating by using (1) a particular exchange rate or by directly influencing (2) money supply.
Examples:
(1) A Central Bank can change the exchange rate with which it loans commercial banks (the ones that the public most often interacts with), thereby affecting their interest in giving loans and/or the public's interest in saving or taking loans. This effectively changes money supply / the amount of money circulating in the economy.
(2) A Central Bank can buy (or sell) government bonds from (or to) the general public. This is called Quantitative Easing. Since that means that either it injects new money into the economy or that it vacuums existing money out of it, it directly changes the amount of money in circulation.
Please note:
There are many more examples to be given and a lot more clarification. Further reading can be done with my textbooks of preference, Mankiw's Macroeconomics and McCallum's Monetary Economics.
Comment: Thanks for the answer
Comment: This answer is much more wrong than it is right. The vast majority of the changes in the money supply are driven by private banks making loans (creating money) and citizens repaying the principal on those loans (destroying money). User18's comment, i.e. "Money Creation in the Modern Economy" is spot on.
Comment: You are most welcome.
Comment: Mick, I am sorry to disappoint you, but I merely presented the most simple, orthodox theoretical model of money supply. Moreover, the Central Bank is also the body that governs how much the commercial banks may loan.
Comment: @S.IasonKoutsoulis Point number (2) is also not really correct. Quantitative easing is only a very special case of open market operations. OMOs are THE most important tool of central banks because only those do allow the central bank to control the amount of reserves and therefore the over night interest rate. QE is the procedure of buying assets (mainly government bonds) from banks and maybe also from the general public with the goal to flood the banks with reserves and push the interest rate at the end of the yield curve down.


Fan control circuit with Arduino

Question: I have a fan control circuit with Arduino (PWM). I did all things and it worked. My question is why we did not directly connect the fan to Arduino. Why should we have a driver circuit?
Comment: Because physics will destroy your device.
Comment: This question is [on-topic](http://arduino.stackexchange.com/help/on-topic) and should remain open. Programming is included but not exclusively. Boards, clones, IDEs, libraries, and more, related to Arduino, are included.
Comment: I found an answer for that since we are applying a linear control on the fan,if we we connect directly to the arduino,we would not be able to any voltage rather than 0 and 5 volts(it will act like a switch).With driver circuit,we made our fan operate between 0-12 volts using feedback. However,this answer is not enough for me ,i did not understand the exact reason.
Answer: This is an electronics question, and it should be forwarded to the electronics stackexchange.
The fan needs to have a proper amount of current to spin, and because the microcontroller that controls the fan draw very little current on its output pins (check the datasheet for the exact value, but it should be a few milliamps), unless you have a miniature fan, wiring it directly on the microcontroller will not be able to move the fan.
And this is by design that microcontrollers cannot provide much current. Because to provide larger amount of current than what they do, they'd need to have bigger copper tracks between the transistor to avoid having they internal circuits building too much heat, and they would be much much bigger.
So as a work around, we use an transistor, which receives on the "Base" pin a voltage, drawing almost no current, which will "connect" the collector and emitter pins where you can have a much bigger current flowing (though be careful to respect the datasheet's nominal values for current! Or use either a MOSFET, a Triac or a Relay for bigger currents).
Answer: Arduino is a low voltage and low current device. Arduino max current output delivery capecity is 200ma, you can read about diffrent arduino's limitations here,
http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations
Fan or anything that has a coil inside it, needs a huge amount of current during their start up. The current draw decreases as it gains its motion to some limit. The initial huge current is called surge current. There is a high chance that it will blow you pins dead.
Let's say we are using really small fan. And it managed to start and rotating, that dosen't meant there is no problem at all. When a coil is rotated inside a magnetic field an opposite voltage is induced called Back Emf . This is another huge potential concern. This is why we are always suggested to use a diode which will block the opposite flow of current.
Transistor, being a low voltage device and as it can deliver tremendous large amount of output current, It is very widely used to drive high current devices
Answer: The
Vin pin = 5V or 3.3V

You cannot use the 5V from the USB to power up the FAN and the LOAD because the USB port usually delivers only 100mA, and this is not enough to switch the relay and the LOAD.
That is why you must use an external power supply (Vcc) that is between 7 to 12 volts to power up the Arduino board and the transistor + relay. The load uses its own power supply, for instance if you use a light bulb then you might connect it to the 110/220V mains or any other power source.
or
you can also use a fan that has one of the pins of the fan is a PWM input. The fan has an internal transistor to switch the 12V power when given a 0-5V input. That is the pin you want to connect to the actuator pin.
please get back to me if it was helpful
Answer: Actually the Arduino Uno dc current per I/O pin is 40mA. When fan is connected directly to Arduino Uno, it cannot withstand, because the fan draws more-than 20mA current.
The driver circuit provides sufficient current to rotate the fan. The TIP 121 can withstand up to 3A current.
Answer: I know this is an old link but MAXIM has a tutorial on using PWM to drive "normal" DC fans.  The link is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/1784
It was helpful.
Personally, I am designing a simple 5-step temperature-driven device that uses an ATtiny13A to drive a 5 volt fan and a thermistor mounted to a heatsink.  I was originally trying to use a PWM frequency of 4687Hz (CPUclk / 256) but it was way to high.  The MAXIM article states that frequencies in the range of 20Hz to 160Hz are useful.  Obviously, the 4687Hz was TOO HIGH.  I dropped it down to 18Hz and everything works now.  The problem was that the pulse width at 4687Hz was too short to give the DC fan enough electrical "momentum" to spin the fan.  Using a lower PWM frequency gives more electrical energy to the fan to get it to spin.  An analogy would be trying to push a toy car with short and rapid "pushes" as opposed to using longer and slower "pushes".
Hope this helps.
Peace and blessings.

Fan control circuit with Arduino


How does Unity input work with touchscreens

Question: I'm trying to make a racing game on android using unity.  I want to make a car move forward when I touch an image button like in the picture below.  I've already made it work using the keyboard.  How do I do the same with on-screen buttons and touch input in android?
Answer: If you are using Unity 4.6+ then you have access to its new UI system. If you ever used NGUI, which is a popular unity UI frame work, its based on that architecture I believe.
This is a good tutorial on the subject of buttons and how they work.
http://unity3d.com/learn/tutorials/modules/beginner/ui/ui-button
Quick summary tho:

In the scene create new and select UI->Button
Select the new button in the scene and find its Button script in the inspector
Make a new on click event
Assign the object you want to act on when the button is press and the function to call (whatever your current movement code is)

At step #2 if you want to listen for more specific events just add a new EventTrigger script and pick a more specific event type and set it up by assigning an object and callback.
More on that here: http://unity3d.com/learn/tutorials/modules/beginner/ui/ui-events-and-event-triggers


Contract with long execution time

Question: When sending a transaction to a contract, what happens if the contract code takes longer to execute than the block takes to mine? Whether it be computational based or static limits. Would this cause any issues?
Comment: Related: https://ethereum.stackexchange.com/questions/219/could-a-contract-with-enough-gas-ddos-the-network
Answer: If a transaction takes a long time to execute it will delay mining new blocks.
Like two years ago there was a Denial of Service attacks that used that characteristic. The contracts used cheap opcodes that take a long time to execute. Miners will take a long time verifying new block and that delay mining new blocks.
A first workaround was to reduce the gas limit, meaning fewer of the bad priced opcodes were possible to execute. The definitive solution was to fork so the price of the opcodes was adjusted.

Contract with long execution time


How to Append a Text File in an Azure Blob with a Azure Function

Question: I've got a text file I need to append data to daily with a timer Azure Function.  The text file is a comma separated file.
I've created my CloudBlobClient and knew how to make my Shared Access Policy and Token.
I just don't know how to use this to upload.  I only know how to get an access URI from the tutorial I'm working with.
Answer:
I've got a text file I need to append data to daily with a timer Azure Function.

You can try to use append blob that is optimized for append operations. According to your description, you know how to get SAS URI, so you can use SAS URI to create a reference to an append blob, and append a file to an append blob, the following code is for your reference.
<code>CloudAppendBlob appendBlob = new CloudAppendBlob(new Uri("https://{storage_account}.blob.core.windows.net/{your_container}/append-blob.log?st=2017-09-25T02%3A10%3A00Z&se=2017-09-27T02%3A10%3A00Z&sp=rwl&sv=2015-04-05&sr=b&sig=d0MENO44GjtBLf7L8U%2B%2F2nGwPAayjiVSSHaKJgEkmIs%3D"));

appendBlob.AppendFromFile("{filepath}\source.txt");
</code>
Comment: Be advised BlockBlobs cannot be accessed as AppendBlobs. The file needs to be created as an AppendBlob for this to work. Your use case does call for an AppendBlob, so I would advise to create the blob as an AppendBlob :)
Comment: Yes, the file needs to be created as an append blob.
Comment: Append blob. Append blob. Append blob.
Comment: Should this code run? Struggling for hours with it. The AccountKey seems to be missing. And there is a lot of 'garbage' after the file name. Can I remove that?


.NET 4.0 BackgroundWorker class and unusual behavior

Question: I am running into some strange behavior in the backgroundworker class that leads me to believe that I don't fully understand how it works. I assumed that the following code sections were more or less equal except for some extra features that the BackgroundWorker implements (like progress reporting, etc.):
section 1:
<code>    void StartSeparateThread(){
        BackgroundWorker bw = new BackgroundWorker();
        bw.DoWork += new DoWorkEventHandler(bw_DoWork);
        bw.RunWorkerAsync();
    }

    void bw_DoWork(object sender, DoWorkEventArgs e)
    {
        //Execute some code asynchronous to the thread that owns the function
        //StartSeparateThread() but synchronous to itself.

        var SendCommand = "SomeCommandToSend";
        var toWaitFor = new List<string>(){"Various","Possible","Outputs to wait for"};
        var SecondsToWait = 30;

        //this calls a function that sends the command over the NetworkStream and waits
        //for various responses.
        var Result=SendAndWaitFor(SendCommand,toWaitFor,SecondsToWait);
    }
</code>
Section 2:
<code>    void StartSeparateThread(){
        Thread pollThread = new Thread(new ThreadStart(DoStuff));
        pollThread.Start();
    }

    void DoStuff(object sender, DoWorkEventArgs e)
    {
        //Execute some code asynchronous to the thread that owns the function
        //StartSeparateThread() but synchronous to itself.

        var SendCommand = "SomeCommandToSend";
        var toWaitFor = new List<string>(){"Various","Possible","Outputs to wait for"};
        var SecondsToWait = 30;

        //this calls a function that sends the command over the NetworkStream and waits
        //for various responses.
        var Result=SendAndWaitFor(SendCommand,toWaitFor,SecondsToWait);
    }
</code>
I was using Section 1 to run some code that sent a string over a networkstream and waited for a desired response string, capturing all output during that time. I wrote a function to do this that would return the networkstream output, the index of the the sent string, as well as the index of the desired response string. I was seeing some strange behavior with this so I changed the function to only return when both the send string and the output string were found, and that the index of the found string was greater than the index of the sent string. It would otherwise loop forever (just for testing). I would find that the function would indeed return but that the index of both strings were -1 and the output string was null or sometimes filled with the expected output of the previous call. If I were to make a guess about what was happening, it would be that external functions called from within the bw_DoWork() function are run asynchronously to the thread that owns the bw_DoWork() function. As a result, since my SendAndWaitFor() function was called multiple times in succession. the second call would be run before the first call finished, overwriting the results of the first call after they were returned but before they could be evaluated. This seems to make sense because the first call would always run correctly and successive calls would show the strange behavior described above but it seems counter intuitive to how the BackgroundWorker class should behave. Also If I were to break within the SendAndWaitFor function, things would behave properly. This again leads me to believe there is some multi-threading going on within the bwDoWork function itself.
When I change the code in the first section above to the code of the second section, things work entirely as expected. So, can anyone who understands the BackgroundWorker class explain what could be going on? Below are some related functions that may be relevant.
Thanks!
<code>public Dictionary<string, string> SendAndWaitFor(string sendString, List<string> toWaitFor, int seconds)
    {
        var toReturn = new Dictionary<string, string>();
        var data = new List<byte>();
        var enc = new ASCIIEncoding();

        var output = "";
        var FoundString = "";

        //wait for current buffer to clear
        output = this.SynchronousRead();
        while(!string.IsNullOrEmpty(output)){
            output = SynchronousRead();
        }

        //output should be null at this point and the buffer should be clear.

        //send the desired data
        this.write(enc.GetBytes(sendString));

        //look for all desired strings until timeout is reached
        int sendIndex=-1;
        int foundIndex = -1;
        output += SynchronousRead();
        for (DateTime start = DateTime.Now; DateTime.Now - start < new TimeSpan(0, 0, seconds); )
        {
            //wait for a short period to allow the buffer to fill with new data
            Thread.Sleep(300);

            //read the buffer and add it to the output
            output += SynchronousRead();
            foreach (var s in toWaitFor)
            {
                sendIndex = output.IndexOf(sendString);
                foundIndex = output.LastIndexOf(s);
                if (foundIndex>sendIndex)
                {
                    toReturn["sendIndex"] = sendIndex.ToString();
                    toReturn["foundIndex"] = sendIndex.ToString();
                    toReturn["Output"] = output;
                    toReturn["FoundString"] = s;
                    return toReturn;
                }
            }

        }
        //Set this to loop infinitely while debuging to make sure the function was only
        //returning above
        while(true){
        }
        toReturn["sendIndex"]="";
        toReturn["foundIndex"]="";
        toReturn["Output"] =output;
        toReturn["FoundString"] = "";
        return toReturn;
    }
    public void write(byte[] toWrite)
    {
        var enc = new ASCIIEncoding();
        var writeString = enc.GetString(toWrite);

        var ns = connection.GetStream();
        ns.Write(toWrite, 0, toWrite.Length);
    }

 public string SynchronousRead()
    {
        string toReturn = "";
        ASCIIEncoding enc = new ASCIIEncoding();
        var ns = connection.GetStream();

        var sb = new StringBuilder();
        while (ns.DataAvailable)
        {
            var buffer = new byte[4096];
            var numberOfBytesRead = ns.Read(buffer, 0, buffer.Length);
            sb.AppendFormat("{0}", Encoding.ASCII.GetString(buffer, 0, numberOfBytesRead));
            toReturn += sb.ToString();
         }

        return toReturn;
    }
</code>
Comment: You need to fix your wall of text to something people can read.
Comment: Looks like issue in context which runs threads
Answer: All data to be used by a background worker should be passed in through the DoWorkEventArgs and nothing should be pulled off of the class (or GUI interface).
In looking at your code I could not identify where the property(?) connnection was being created. My guess is that connection is created on a different thread, or may be pulling read information, maybe from a GUI(?) and either one of those could cause problems.
I suggest that you create the connection instance in the dowork event and not pull an existing one off of a different thread. Also verify that the data connection works with does not access any info off of a GUI, but its info is passed in as its made.
I discuss an issue with the Background worker on my blog C# WPF: Linq Fails in BackgroundWorker DoWork Event which might show you where the issue lies in your code.


How to Download Live Photos from Amazon Photos

Question: I'm using Amazon Photos for cloud storage of a bunch of Live Photos I take with my iPhone. I can view them as Live Photos (and play the video) when viewing them on photos.amazon.com, and I can also view them this way when I import them directly into the Mac OS Photos app. Here's an example photo on Amazon. However, when I download it (using the download button on Amazon Photos) and import it into Mac OS Photos, all I get is a still image. How can I get the Live Photo or even separate video and photo files (which is what I get when I export from Google Photos)?
Answer: I had this problem too and found a solution, by accident.
On a Windows 10 PC, get the Amazon Photos App from the Microsoft store.
Choose the "Download" option from the left menu:

Select "Download Folders".  You will see your Amazon Drive contents.
Select the "Pictures" folder and navigate down to your photo folder.  You will see that the number of files shown in the file count is larger than the number of photos shown on the Amazon Photos web page.
Select the "Download To..." button at the bottom of the page and then proceed to download.
Don't panic if you see that the numbers of files being downloaded is the smaller number shown on  the Amazon Photos website; once the download is complete you will see the QT files along with the HEIC or JPG photo files.
The down side is that you must download the entire folder.  I have not been able to find a way using the app to download a single photo and get both files.
Another down side is that this does not work if you turn on the File Sync functionality, to since the Amazon files onto your hard drive.  The QT files don't seem to sync.
I hope this ability to download the QT files isn't unintended functionality that Amazon will look to "fix", given how hard they seem to try to hide the QT files from all other download options.
Good luck!
Comment: Thanks for posting this helpful information. I am having the same problem as in the OP.  I am able to download the Live Photos as you describe so that they get split into .heic and .heic.qt files.  I am curious to know if there is a way to download the .heic file so that it is a Live Photo, as the original photo was. I see that this is what happens when I download an individual photo on the iPhone app. But, I need to download a large number of photos. I don't know that there is a way to do this with the iPhone app.
Comment: I'm fairly new to the Apple ecosystem. After playing around with this some, I think I may have figured out what to do. (Although, maybe this is obvious to people who are more familiar with Apple software than I am.) I figured out that if I drag both the .heic file and the .heic.qt file into the Photos app, then the Photos app combines them into a Live Photo that appears to represent the original photo that I'd uploaded.


How do I rotate and scale my texture without unwrapping

Question: I wanted to rotate this wood texture and scale it without unwrapping it, is there a way to do this or do I have to unwrap it? (If I made any mistakes with my nodes please feel free to correct them,)
Answer: plugin these 2 nodes before your image:

and then you can play around with rotation, location + scale.
Maybe plug it into object or generated, if that fits better for your case.
Comment: If I try this it ends up stretching or warping the texture instead of mapping it to the cabin.
Comment: of course this depends on some things, so please provide your blend file WITH your texture then i can tell you exactly what to do.
Comment: How do I provide a blend file on stack exchange?
Comment: Open https://blend-exchange.com/ and follow instructions
Comment: @Quantian2  UV only works if you've already unwrapped your object.  Try Generated and if that doesn't work then try Object.


How to detect "suggests text" is turned on for current keyboard in Windows Phone

Question: In Windows Phone, when the keyboard is up, there's usually a "suggestion line" above the keys.
For some languagea, this suggestion line is always there, such as eastern Asian languages.
For some other languages, like English, I can turn this off by going to "Settings" -> "Keyboard" -> "English" and uncheck "Suggest text".
And there are some languages that don't have suggestion line at all.
My questions is, how do I detect whether current keyboard has the suggestion line enabled or not?
Answer: No you cannot check that information through any API. In windows phone some API are not visible to developers. In your case also suggestion text information API is not accessible to developers for development.


How to free memory from a looped object

Question: I am trying to dynamically update a tooltip made with Prototip and Prototype.  The way I am trying to do this is probably not the best way (so if you know a better way that would be helpful), but the only way i could think to do it would be to hold the javascript in a div element and update the javascript inside the div element in order to update the tooltip.  However, this seems to be a memory leak since each time the javascript is updated, a new Tip object is created and stored in the memory.  If there isn't a better way of doing this, how can I clear the memory?
I made this simple script to test the memory leak, now I need to figure out how to make it so that the memory leak is patched in this example.
for (i=0; i<1000; i++) {
    $('testdiv').update("

How to free memory from a looped object


Why do we get tired after walking

Question: While we were studying pure rolling of bodies in the chapter rotation we were told that energy conservation holds if a body is purely rolling ( The point of contact between the rolling body and ground is stationary w.r.t. ground ). Considering a person to be system. Whenever the person walks his point of contact with the ground does not move. So apparently the only force(s) which acts on him are $(m_{man} + m_{clothes}) \cdot g,$ static friction and normal due to ground. Now energy can be conserved because normal and $mg$ while cancelling out each other are also perpendicular to the direction of walking. And since the force acting is static friction energy can be conserved. However if this is the case a person should not tire while walking becuase his energy is conserved. But practical experiences deny this. So what part of the work am I missing.
Comment: What about the time between your steps? I mean, your analysis could be correct while your feet are in contact with the ground, but it's pretty clear that you need to move one of them to take a step and advance... which means you waste energy to bend your knee, move the foot against the gravitational force, and all the rest of movements that are involved in your walking.
Comment: thats nothing, i even get tired before  going to the gym
Answer: You are, unfortunately, missing out on two crucial mechanisms of energy dissipation: kinetic friction in our joints (and other internal and external parts, like clothes) and the inefficiency of converting chemical energy into motion. As we walk, our muscles exert forces constantly in various directions; in order to do this, they have to do work against the kinetic friction that inevitably occurs at various points in the body. This work is dissipated as heat.
In addition, in a simplified sense, muscles receive chemical fuel in order to do work; however, the conversion from chemical bond energy to mechanical work is nowhere near 100% efficient. Once again, we lose this energy, as heat. So, as a person keeps walking, he or she gradually exhausts this finite chemical reserve, waste products build up in the muscles, and they feel tired.
Comment: Of course there are such multiple argumenst. However, even a system with  "lossless" joints and  perfect chemistry would require energy to move forward since this is the work done by the forward force (force times the distance it acts). So if no force, no motion (except for "walking" in outer space at constant speed).
Comment: If you had frictionless joints and your muscles had perfect chemistry, then OP is right, energy would be conserved and you'd never get tired. The energy you'd spend to do work against gravity would be exactly balanced by the energy you'd gain as your foot dropped.
Answer: In terms of energy conservation a human being is more similar to a car with lots of internal frictions than an ideal rolling body. As the wheels and gears grind along eachother energy is inevitably converted into heat and the combustion engine itself will keep running even if it is disconnected from wheels burning fuel even when standing still. The frictions of your joints and inside your muscles are just as real although not really the most signifi
When it comes to walking there still is some gravitational work involved as the knee moved up and down and whatever kinetic energy in the leg is gained as it "falls back to the ground" will be turned into heat upon impact with the ground. That said walking on a flat plane involves less of this kind of work than going up some stairs or running where you bob up and down more and all things considered walking is still not very tireing.
Howevert he  sensation of becoming tired due to physical stress (muscular fatigue) has more to do with the chemistry of how our muscles produce work than the total amount. After all if running out of energy was what made you tired chugging sugar water while running should help you a lot more than it demonstrably does. Rather the issue is waste products of the chemical reactions (the "exhausts") build up faster than the body can move them out of the tissues, causing damage or inhibiting the reactions. Along with simple friction damage at the joints the body eventually reacts by producing tiredness or a pain response to stop you from continuing. The more work produced the faster this happens but it takes longer if your body is more capable of moving compounds in and out of the tissues or if you have become desensitized to the pain response.
Muscles are also mechanically peculiar in that they can require a lot of energy to maintain static poses. Holding up your arms out to your side and completely still requires no mechanical work and a locked metal beam could do this forever but we quickly get tired. As you walk your muscles also transitions through states which might be statically draining but this is less of an issue than in some other situations.
Generally the human body is not very instructive when trying to understand physics even though it obeys the same principles.

Why do we get tired after walking


Is there a Evernote client?

Question: Evernote is a cool site for capturing note, tagging it and retrieving it from everywhere. The Web application is nice but I was wondering if anyone knows about a standalone version such as for Windows, Android,... but for Ubuntu ?
Thanks !
Answer: Not an official one, but I've had success with the unofficial client NeverNote
Comment: +1 Thanks, didn't know about this. Works nicely on 10.04
Answer: I believe they don't have Linux support but here is a cool article on various alternatives.
Comment: Odd that this is the accepted answer as all it details is how to avoid using Evernote.  I use Nevernote myself and it's flawless - in many ways far superior to the actual Windows client of Evernote itself.  Horses for courses, I suppose.  Evernote is cross-client and supports Android, which for me is essential.
Answer: On Linux, you can use NixNote (previously Nevernote), an unofficial Evernote client written in Java but if you want something lightweight, you should try Everpad, a new Evernote client that integrates nicely with Unity.
It supports online sync, notes, tags, notebooks, file attachments (remember there's a 60 MB monthly limit) and places.

Installation:
To install Everpad all you need to do is run the following commands in terminal:
sudo add-apt-repository ppa:nvbn-rm/ppa
sudo apt-get update && sudo apt-get install everpad

Once installed all you need to do is search for 'Everpad' in the Unity Dash and then run the Everpad application. You will then see the app indicator appear on your panel. Once it does, click on it and select "Settings & Management" then "Authorise" to configure Everpad with your Evernote account.
To create a new note, simply click on the Everpad app indicator and select "Create Note" or click on an existing note to edit it.

Troubleshooting:
Having a issue? Report them @Github

Sources: Omg Ubuntu!
Answer: I don't think there's a native client :-(
So, your best bet might be to run it in wine. e.g.: http://abbysays.wordpress.com/2008/05/24/how-to-install-evernote-30-on-ubuntu/
Answer: Not really, no. You might consider running the web app in Prism, which is quite a nice bit of kit that allows you to run a web app in a standalone window/browser. Or you can use Wine, which works fairly well with Evernote.
Answer: As of March 2021 there WAS a beta version of an official Evernote client for Linux (a deb package) available. If you agreed to provide Evernote with feedback via a single email survey, you could download it from the Early Access Evernote homepage as deb-package. The deb-package can be installed with the Software Center, other tools or via the command line as usual.
More infos you can find on It is FOSS.
But very soon this page was deleted.
Hopefully there will be soon an official version without the beta-status.
Maybe you can still get this beta version through the Early Access program, see a blog article about this.
Answer: +1 for Tomboy/Dropbox.
Add Gnome-do and it's extremely useful.
Answer: I've just installed Evernote app for Android as Chrome's extension on Ubuntu using this tutorial. It looks like separate app: can be found in Ubuntu's search and can be locked to sidebar. For now it seems to be working: I've signed into account, synchronized, can see notes, tags and other things, that I can see on my Android tablet. Also I've tried to create note, add tag to it and sync. Found this note on tablet. Nice!
I can't say, that functionality of this client is enough for me, because I did not test it for a long time, but it's very good alternative for native linux Evernote not official clients.
Comment: Also I've tried to add attachments to notes, that calls standard Ubuntu's open file dialog and it works well. And downloaded attachments from notes: attachments are saving in special folder, that emulates Android home folder exclusively for Evernote in this case.
Answer: You can try a combination of Dropbox for folder sync in multiple computers, and Tomboy for note-taking.
Setup Dropbox first, then setup Tomboy's folder within Dropbox's folder.
Do this in every computer you use.
Also, both can be used in multiple platforms.
Comment: Ubuntu One syncs Tomboy notes automatically.
Answer: Tomboy and UbuntuOne has worked well for me.
Answer: There is also emacs-evernote-mode, that let's you edit and create notes in Emacs using either XHTML or TEXT mode. The cool part is that you can post a region from any Buffer as a note with a single command M-x evernote-post-region. I realize this is probably appealing only for Emacs users (such as myself).
Answer: There's a new client called ForeverNote
https://github.com/milan102/ForeverNote
Answer: As the official beta deb-package is not available anymore, alternatives are welcome:

Tusk - Refined Evernote desktop app, there are several possibilities how to install it, see the release page on Github.
Nixnote2 - A clone of Evernote for Linux, available from the official repositories or a PPA.
Running Evernote in Firefox: Since its latest updates (2021) it runs very smoothly, it's pretty quick and can be closed simply by closing the tab

Is there a Evernote client?


How to use Soundcloud in tor-browser? it need flash-player!

Question: I am in Iran and have to use tor-browser in my Ubuntu 14.04.
But it has a problem with flash-player in "Soundcloud". I installed many flash-player add-ons on it. but it not helped me and site say to me that need flash-player to play musics. thanks.
Comment: This is a bad idea. The point of Tor Browser is to make your browser indistinguishable from others. If you use another browser than Tor browser your are not anonymous.
Answer: You are not supposed to use flash with tor. It ruins the whole point of using tor. However, if you still want to use it I'll suggest chrome with this command:
chromium-browser --proxy-server="socks://127.0.0.1:9050" --incognito check.torproject.org

If doesn't work do:
killall chromium-browser

Then try again
You must run tor first by
tor&

I assumed that tor and chromium-browser is installed on your system. If not install them from software center. However, I forgot to mention one thing. You need to find out at which port tor is listening to. To do that, simply run this command:
tor

without the "&" sign. It will give a output in terminal. Look for this in the output:
[notice] Opening Socks listener on 127.0.0.1:9050
Those digits might be different on your system. Put that thing in the previous chromium-browser command.
Answer: Flash-Player is very insecure and very dangerous technology. Malicious executable code (like viruses and spyware) can be hidden inside it. That's why Google is planning of deactivating it by default in future Chrome/Chromium versions.
I love SoundCloud too, but i have Flash-Player more, that's why i stopped using Soundcloud. At least until they replace Flash with something else.
Allowing Flash to run on your PC is equivalent to letting spyware into your computer, and that defeats the whole purpose of Tor. Your anonymity WILL be compromised! Your privacy TOO!


How can I see the skill points of each of the characters in Mass Effect 2?

Question: I want to see the skill points of each of the characters to decide whether I want to retrain any. How can I see the skill points of each of the characters in Mass Effect 2?
Comment: Yeah, so reload your old save once you see how much they have, that way you get the information and you haven't spent any Eezo.
Comment: You mean the total skill points they'd have available if you respecced them? I think it's just based on level. Why not just respec & then not save to check?
Comment: Because respect them costs element zero.
Comment: @RavenDreamer because respecing them costs element zero and I don't have enough to do it for everybody.
Answer: According to this post in gameFAQs the only possible way to level up the skill points of the squad members is by selecting them and going on a mission. Thus I believe the only way to see their skill points is by doing the same.
Answer: There are multiple ways:

By visiting the Med Lab in the Normandy
By assigning them when selecting them to your squad.

I mostly play ME3 nowadays, but I believe it's the same for ME2.


How to make a dummy phone call in WINDOW PHONE 7

Question: Is there any Library or API by which we can initiate a dummy phone call on windows phone7 Emulator.
i.e When any person calls me during a certain profile the phone should intercept the call and send an sms against the caller.
Answer: This isn't possible on Windows Phone 7 in its current state. Your application wouldn't be capable of running in the background nor can it register for such an event (the platform doesn't auto start apps, the user has to manually start the app via a toast notification or some other direct method).
You also cannot directly send an SMS. You can only open a pre-populated SMS message, but the user will actually have to hit send and your application will not be running when this is done.


Do brick walls effectively protect against ionizing radiation from a nuclear explosion?

Question: Of course it depends on the distance and the amount of radiation, so let's say its about 10,000 Rad. Now, can wall made of brick protect someone behind it from such radiation ?
Comment: How thick is the brick?
Comment: around 15 cm at most.
Answer: I'll focus on gamma rays (and high-energy X-rays), since alpha and beta particles are easily stopped. Neutrons are slightly more complicated, since they tend to care about which nuclei they are encountering.

General theory
The answer is any material can block gamma rays so long there is enough of it. In fact, the amount of stuff is basically the only criterion there is.
The thing is, every time a gamma-ray photon interacts with a nucleus or an electron, either it is completely lost or it loses some energy. And gamma rays will interact with anything along their path. They don't care what kind of material they are in - since their wavelengths are so short, they don't "see" the molecular and large-scale structure. The fraction of gamma ray energy that passes through some matter, then, only cares about the column density of the matter. There is an exponential dependence - if your wall is letting half the radiation through, doubling its thickness will result in only a quarter getting through.
For example, if you had a brick wall that was thick enough such that a $1\ \mathrm{cm}^2$ core through it had a mass of $1\ \mathrm{kg}$ (roughly $4\ \mathrm{m}$ thick, for some "typical" brick), then it would be equivalent, in terms of gamma-ray stopping power, to

A $1\ \mathrm{m}$ thick wall of lead,
A $10\ \mathrm{m}$ thick wall of water, or
The atmosphere (i.e., the same attenuation as between a point at sea level and a point in orbit directly above that one).

How much the material matters
My claim of independence of material is, needless to say, a little bit of a simplification. Perhaps the biggest oversight is the variation of electron-to-mass ratio (equivalently, $Z/A$ for the atoms involved). To the extent that this ratio is constant (and it pretty much is for everything from helium to about nickel), the number of particles that can stop gamma rays is proportional to mass column density, assuming the interactions are dominated by Compton scattering. If the energy of the gamma rays is in the pair-production regime, this might depend more on the number of nuclei rather than number of electrons.
Let's put these statements in graphical form. The figure below, from Wikimedia, shows how much high-energy photons are attenuated (black line) when passing through iron, as a function of how energetic those photons are. The colored lines indicated the different things that can happen to the photon, and they add up to the black line.

Now let's take a look at something closer to brick. The US National Institute of Standards and Technology (NIST) has compiled lots of data on this sort of thing here[1]. While I could not find data for "brick," they do have it for concrete here, reproduced below.

We are interested in the solid line, which shows energy lost by the radiation. The dashed line shows energy taken in by the material, which can be slightly less if some energy is lost, say, to escaping neutrinos. (The dashed line is more important in biological materials, where you care how much energy is deposited more than how much is lost from the blast.) Note that it is basically the same as for iron. In fact, to prove that these numbers don't change much as a claimed above, below are the figures for water (found here) and air (found here).

Plugging in numbers
So how exactly are these charts used? Let's take the concrete chart, and let's take the density of brick to be $\rho = 2\ \mathrm{g}/\mathrm{cm}^3$. Multiplying the ordinate in that chart by this density gives the attenuation coefficient. Suppose we are dealing with photons of energy $10^{-2}\ \mathrm{MeV} = 10\ \mathrm{keV}$. Then the attenuation coefficient is
$$ \mu_{10\ \mathrm{keV}} = (10^2\ \mathrm{cm^2}/\mathrm{g}) (2\ \mathrm{g}/\mathrm{cm}^3) = 2\times10^2\ \mathrm{cm}^{-1}. $$
If instead we are dealing with higher-energy photons, around $10\ \mathrm{MeV}$ and above, then the attenuation coefficient is
$$ \mu_{10\ \mathrm{MeV}} = (2\times10^{-2}\ \mathrm{cm^2}/\mathrm{g}) (2\ \mathrm{g}/\mathrm{cm}^3) = 4\times10^{-2}\ \mathrm{cm}^{-1}. $$
To be on the safe side, let's use the latter value, which corresponds to harder-to-stop photons, since I cannot find any data on the spectrum of ionizing radiation.
Now a wall with thickness $x$ will allow a fraction $\mathrm{e}^{-\mu x}$ of radiation through. With $\mu = 4\times10^{-2}\ \mathrm{cm}^{-1}$ and $x = 15\ \mathrm{cm}$, this comes out to be $55\%$. That is, the wall doesn't even stop half the high-energy gamma radiation. (If you use the other vale of $\mu$, you will find an answer so close to $0$ that most calculators cannot distinguish the two; low-energy radiation is completely stopped by this wall.)

Brief digression on units
There are four stages of calculating effects of radiation, as explained nicely by the US Nuclear Regulatory Commission (NRC) on this page. Each one has an SI unit and another commonly used unit to measure it, which is why measuring radiation can be so confusing. A source of radiation has its radioactivity measured in becquerels ($\mathrm{Bq}$) or curies ($\mathrm{Ci}$). The amount of radiation traveling away from the source is measured in coulombs per kilogram ($\mathrm{C}/\mathrm{kg}$) or roentgens ($\mathrm{R}$). The amount of energy actually absorbed by your body (think those dashed lines in the above figures) is measured in grays ($\mathrm{Gy}$) or rads ($\mathrm{rad}$). Finally, that last pair can be weighted by some factor to account for different types of radiation being more harmful because they induce secondary reactions in your body. The result is sieverts ($\mathrm{Sv}$) and rems ($\mathrm{rem}$). Fortunately that weight is generally taken to be $1$ for gamma rays. Quoting the NRC,

"For practical purposes, $1\ \mathrm{R}$ (exposure) = $1\ \mathrm{rad}$ (absorbed dose) = $1\ \mathrm{rem}$ or $1000\ \mathrm{mrem}$ (dose equivalent)."

Putting everything together
The $15\ \mathrm{cm}$ wall will reduce the amount of radiation reaching you by $45\%$ in the worst case scenario (all radiation is high-energy), which means the energy absorbed by your body will also be reduced by $45\%$, as will the equivalent dosage. Thus you would receive about $5500\ \mathrm{rem} = 55\ \mathrm{Sv}$. The rem article tells us,

"Doses greater than $100\ \mathrm{rem}$ received over a short time period are likely to cause acute radiation syndrome (ARS), possibly leading to death within weeks."

To reduce this to the typical amount received in a CT scan, about $1\ \mathrm{rem}$ according to the NRC, you would need a total wall thickness of
$$ x = -\frac{1}{\mu} \log\left(\frac{1\ \mathrm{rad}}{10^4\ \mathrm{rad}}\right) \approx 230\ \mathrm{cm}. $$

 [1] J. H. Hubbell and S. M. Seltzer. Tables of X-Ray Mass Attenuation Coefficients and Mass Energy-Absorption Coefficients from $1\ \mathrm{keV}$ to $20\ \mathrm{MeV}$ for Elements $Z = 1$ to $92$ and $48$ Additional Substances of Dosimetric Interest.
Comment: Most books say that it only matters the material and thickness. Does this mean that it doesn't matter the total energy of radiation (when it doesn't melt it)?
Comment: @jinawee Well doubling the incident energy *will* double the amount that penetrates the wall. At the same time, if your wall blocks all but, say, $1$ part in $10^{6}$ of the incident energy, a wall twice as thick will block all but $1$ part in $10^{12}$ of the energy. In this sense, once you are in the blocking-most-everything-anyway regime, wall thickness does more (it is exponential) than incoming energy (linear effect).
Comment: At sufficiently high energy it ceases to be true that betas are easier to block than gammas as both simply initiate electromagnetic showers. I don't think that affects the correctness of this answer, however: if you are close enough to the explosion to get betas of that energy the ionizing radiation is the least of your problems.
Comment: Neutrons are tricky. They need low atomic numbers to be absorbed by scattering and energy loss. My office was in a building hosting a Van Der Graaf. I remember the laughs we got when a student said "they had measured neutrons outside the windows"!! Walls mean nothing to neutrons.
Comment: Thanks for your answer, but it is still not clear enough for me, so I will provide you with more info.
The scaling laws of nuclear weapons effects give the distance for 10,000 Rad of radiation at 2 kilometers. And it appears that this dose is lethal to human beings, so I think I can assume that no one will survive if no shielding is available.
Now, let's say it was an airburst in a modern city. Most of the buildings in my city have walls of brick of about 15 cm. So by taking Gamma and neutron radiation into consideration, could these walls protect people in this 2 km radius ?
Comment: Also I don't quite understand how radiation density is used either in Rad or rems. So, how much is 10,000 rad is considered ?
And if a shield with a half-value thickness is used, does reducing the energy of the radiation to half mean that it will be 5,000 rad ?
Comment: @Hurricane93 I added a bunch more. In short, I wouldn't count on those walls. This is why nuclear shelters are built underground.
Comment: This question is more complicated than you realize. The spectrum of the radiation is important, as well as the source geometry, which is different for the prompt yield and the plume source following the blast wave. What's important to realize is that if you are sufficiently close to experience a free-air dose of ~100Gy, you are going to experience thermal fluence and overpressure sufficient to destroy soft targets.
Answer: Chris addressed the basic matter of gammas, but neutrons are a special case and one of some interest with thermonuclear weapons.  Because they do not interact strongly with electric charge, neutrons scatter and lose energy almost entirely by contact scattering off of nuclei.
They leave the neighborhood of the explosion with considerable kinetic energy. And lose it in a series of (mostly elastic) interaction with the nuclei of the air, ground and any infrastructure that remains. Where they do interact inelastically they usually generate one of more energetic gamma rays.
With their ten minute halflife they are able to cover quite a lot of ground even after they thermalize (lose their initial kinetic energy, and come into thermal equilibrium with the surrounding material) in part because they ride along with any bulk movements of air masses.
Eventually they either decay ($n \to p + e^- + \bar\nu$) which is relatively little beta radiation  or capture (mostly on hydrogen--2.2 MeV of gamma--or carbon--4.95 MeV).
Now here's the nasty part: both the initial high energy penetration and all that Brownian motion as the thermalized neutrons bounce around in equilibrium is largely unshielded, the neutrons can get in almost anywhere. So those capture gammas can be generated inside your shielding or even inside your body. Ouch.
To shield against energetic neutrons you want as many nuclei as possible. Wax, water and plastics are common choices. To shield against thermal neutrons some dense material doped with strong neutron absorption agent. Borated plastics are good for both and are common in reactor shielding. Especially borated PVC as the chlorine is almost as helpful as the boron. Given the recent drop in the cost of gadolinium I expect to see an increasing number of uses of it in neutron shielding application.
Comment: If we neglected gamma radiation, would the neutron radiation still be dangerous to long distances ?
Comment: @Hurricane93 That is the whole point of a enhanced neutron bomb (for values of "long distance" that are on order of 10 times the blast radius).
Comment: The only neutron bombs ever deployed were in ABM's protecting Moscow, which certainly weren't intended to inflict a dose on people. The only tactical use of enhanced radiation weapons is disrupting AF&F circuitry in re-entry vehicles.


User time limits

Question: Is there any way to set time limits on a user?  We have children and want to limit the time they spend on it.  The user admin section is a bit slim on that.
Comment: Take a look at the script I wrote for another but similar question on askubuntu site: http://askubuntu.com/a/623260/295286 . If you'd be interested in something like that, I can modify the script to suit your needs and post it as an answer
Answer: elementary OS
Currently, elementary doesn't provide parental controls. However, it's something that's on their radar.

Timekpr App
You could try timekpr
It should fit your intention. It would be nice to tell us, if this worked as
expected.

User time limits


Diffusion capacitence

Question: I am trying to figure out the capacitance seen at each node, given that the source and drain diffusion capacitance is shared in the nmos stack. Given that the fingered layout uses a finger width of W=2 I want to try to find the capacitance at both B and N. I thought that based on the widths in the nmos stack the shared diffusion would be equal to (6+2)/2 unit C but I seems like I am wrong. I also thought that both N and B nodes would experience the same capacitance but I'm not sure. Can anyone explain why my analysis is incorrect?
Answer: Node N has 6 + 6 of Nchannel
Node B has 6 + 6 of Pchannel, 6 of Nchannel, 12 of Pch gate and 2W (12?) of Nch gate.
No way are B and N of the same capacitance.
Comment: I believe that would be the case for a layout with unshared diffusion regions but in the case of a layout (with finger width W=2) would't the capacitance of both p and n network should be drastically reduced?
Comment: Depends on whether the diffusions are shared. But that was not part of your questions.

Diffusion capacitence