Tall cupcakes that have height to them

Question: I would like to bake mini cupcakes but need height on them before I use icing sugar. How do I get this right without the cupcake spilling over the paper and going flat and having no height to it?
Answer: It's all about getting the absolute optimum amount of batter into each cupcake. Can you make one experimental batch before the "real" one? If so, very, very carefully measure infinitesimally larger amounts of batter in successive cupcakes. Take careful notes. One of the cupcakes will be perfect; use that measurement for all cupcakes in the next batch. If you've got a digital scale, this is a good reason to whip it out.
Comment: Even with perfect batter portioning discipline, inconsistent results are highly likely.  The oven temperature also would have to be ideal, for maximum spring while setting at the peak of volume.   Mini-cupcakes are very small, and magnify all of the unevenness present, including imperfect distribution of ingredients throughout the batch of batter (especially leavening), and hot and cold spots within the oven.

Tall cupcakes that have height to them


Is it safe to keep image of cleared check?

Question: I am developing an online banking site. Is it advisable to build a feature that allow user to download and save an image of their cleared checks on their computer? Is there any risk to user who download and save check image on their computer?
Comment: Anurag - what guidance do your Risk or Regulatory Compliance people give you? Have you thought about data protection regulations? And the value proposition: what benefit is there in having an image of cleared cheques?
Comment: my bank does that now, if that helps. you lose some physical fraud protection, but it's paper thin anyway, there's still all the legal protections against check fraud even if your account number is leaked.
Comment: Perhaps a risk in that if you have copies of cancelled checks, you might have to produce them on discovery.  If just the bank has copies, then the check production would be limited by the retention period for the bank.
Answer: The chief risk in this is that the check has routing and account numbers on the image, so if someone were to intercept the download, they would have that information. Something like a MITM or hijacking your site to do XSS to download something besides the check image could be potentially harmful, but that's true of every site and not really specific to your question.
That being said, this risk of someone intercepting the download is relatively low and mitigated by using proper site encryption and secure downloading. SSL, HTTPS, proper certificates, that sort of thing.
The other, much smaller risk is if the end-users computer is compromised and the image is stolen from there - but this is well outside your liability and falls on the end-user to protect their data.
Comment: It is worth noting, as the systems will be "in house" that a public key infrastructure could be configured to remove trust from the certificate authorities and ensure the bank is the only controller of the root CA. Then only use a trusted certificate authority for the frontend.


Pronunciation of "alkene" vs. "alkyne"

Question: Maybe this is better in English.SE, but I think I'm more likely to get better responses here in the "industry" site. This post got me thinking; how do you pronounce "alkyne" (a hydrocarbon with a carbon-carbon triple bond) differently enough from "alkene" (a hydrocarbon with a carbon-carbon double bond) to differentiate the two in spoken conversation? They're obviously spelled differently and so can be separated in the literature, but I can't find a satisfactory pronunciation for either that isn't "al-keen".
Answer: English isn't my first language, and in truth I'm always doubtful about the pronunciation of words in chemistry. Sometimes it's possible to find videos where the words are mentioned, for example here or here or here or here (several examples of alkenes and alkynes being pronounced in this last one). That's what I use, al-keen and al-kyne (ky as in kite or sky).
Answer: I've always heard it pronounced with a long I sound: "al-kine."
Comment: Unfortunately due to the font, your uppercase $I$ in "long I sound" looks confusingly like a lowercase $l$! Just making it clear for anyone else. Maybe I'm the only one who was a bit lost for a couple of minutes.
Answer: Perhaps a different way of thinking about the molecule: Very rarely have I heard people using these nouns. Certainly in an organic chemistry world, it is much more likely to talk about the functional group, so you would actually talk about the c-c double bond, or the c-c triple bond, or the carboxyl group... You get the picture.
I know this doesn't really address the pronounciation issue, but think of it this way:
An alkene IS an alkene at the point where there is a c=c bond, the rest of the molecule is kinda unimportant, and it is really this functional group that makes it chemically interesting.
So talk explicitly about the bond of interest, not the whole molecule (at least when you are talking about certain properties you want to exploit that relate directly to this functional group).

Pronunciation of "alkene" vs. "alkyne"


How do I delete a camera in a blender scene I downloaded

Question: There is a blender scene I just downloaded and it has a camera in it. Whenever I try to delete it, it deletes the whole scene. All i want is the camera to be removed
Comment: Could you please share your file: https://blend-exchange.com/
Comment: Check if the objects are parented to the camera and unparent it first if it is so.
Comment: @moonboots Not necessary, it's an instanced collection as the screenshot shows.
Comment: @Lukasz-40sth If the child object is not selected, deleting a parent object will not delete the child. Only transformations that are made in relation to the parent object get lost if you delete it.
Comment: Yes that's what I thought but I wanted to make sure  ;)
Answer: It looks like you used Append to import the collection into your scene. And in the Append options "Instance Collection" was enabled. You can see it from the orange collection symbol in the Outliner. This is just an empty which instances the collection.

And this means you just have a linked duplicate to the original collection in your scene which can only be changed as a whole, but only transformations like moving, rotating, scaling. You cannot edit individual objects or meshes or delete individual parts, only the collection altogether.
To be able to manipulate individual objects you have to convert the instance into real objects. You can do this by selecting the collection, then from the 3D Viewport menu choose Object > Apply > Make Instances Real or in the viewport hit Ctrl+A > Apply > Make Instances Real.

In the tool options on the bottom left of the viewport you can then choose if you want to parent the converted objects to the empty from which the instance came and if you want to keep the original hierarchy of the original collection when creating the individual objects. You can do this by enabling the options.


Where can I find some "humanized" C# tutorials?

Question: I've decided to start learning C#, but all the tutorials I can find are very dry and speak to the reader as if the reader is a machine.
How about some tutorials that talk to me like I'm a human?
Comment: @BoltClock To make me kill humans, insert coin :-P
Comment: If you want to program a *machine*, you'd better think like a *machine*;)
Comment: You should have listed some of those tutorials. Now you'll get them all back again.
Answer: This is about as friendly an introduction as I could find
Comment: Your link is currently giving me a 404.
Comment: @Oren, @Flo, @Rob - It had an extra `.` on the end, fixed it.
Comment: Taking a look at it right now. Looks promising
Answer: I'd also have a look over Head First C# if I were you
Answer: When I went to a training course by Microsoft to learn C#, I received a complimentary copy of Microsoft Visual C# 2008 Express Edition: Build a Program Now! by Microsoft Press, and actually found it a pretty pleasant read.
I agree with the rest that you're more likely to find 'humanized' tutorials in books than online. I've read so many tutorials myself and know what you mean when you say they're dry.
Answer: I would recommend the books of wrox and O'reilly. They are very reader friendly, ands very good.
They explaina large scala of c# in a very understandable manner. I believe a book is better then a tutorial, because the concepts are linked together so it is easier to understand.
One of the best books for beginners I know is head first
Answer: In that case probably the best tutorial source would be a book. The tutorials you will find online are very generalized and usually intend to teach the reader how to accomplish a specific task. The worst thing about online tutorials is the fact that those are not structured. Therefore, as you go, you can get confused on what to learn next.
I would recommend starting with Pro C# 2010 and the .NET 4 Platform, Fifth Edition by Andrew Troelsen. It starts with the basics and goes on to more complex elements in a very structured way, so you learn step-by-step. You can also try tackling C# in Depth by Jon Skeet - it is one of the best books you can currently find on C#.
One more thing - the best way to learn a language in my opinion is not by tutorials but by having small tasks and trying to accomplish them. For example, you want to learn how to write to a text file. You research this topic and eventually you find out more about the whole process and why it works the way it does. The syntax understanding comes with this as well.
Answer: I found this Book a very good and gentle introduction to C#.
C# Yellow Book


how to collect release version in lots of git repositories

Question: I have lots of git repositories which are managed by repo.
I know the "repo start" and "git push" is a solution to record the version of all repositories.
But I don't want to see lots of branches or tags on all repositories.
Especially, I want to check all of logs as time sorting even the log is on different git so that I can track every changes easily, and without "git log" one by one.
Are there any tools help me?
==========
After a half day for research …
I find the repo manifest -r maybe a solution.
This command outputs a manifest.xml by recording SHA1 of each git repository.
I use this routine:
cd .repo/manifests
repo manifest -r -o default2.xml
cp default2.xml default.xml
git commit -am "Release manifest.xml"

After committing a repository is done, do this routine once.
Is there better method than this?
=====================================
I draw a diagram to explain my question.

Is there any tool to manage these released versions? I would like switch among release not only a single git.So far, I only find the command repo manifest -r to do this job. What are the key words to find this kinds of requirement?
Answer: I'm not sure how repo works, but if you are looking for something that runs git commands recursively against a directory containing git repositories - try rgit


How can I track changes against a subdirectory of a git repository?

Question: I am working on some client modifications to a module within a PHP web application. I have access to the upstream source in a git repo, and I would like to track our changes in our own git repo.
The full source repo is huge (in comparison to the module) so I would prefer to extract the module (contained in two subdirectories) in our repo... but I would like to be able to merge in any upstream changes in the future.
If I was in control of the upstream repo I would spin the module off into a subtree. But I'm not, so I can't!
My best solution so far
Initialise my own repo:
mkdir myrepo
cd myrepo
git init .
git touch .gitignore
git add .gitignore
git commit -m "Initialise repo"

Then add the upstream repo as a remote:
git remote add -f upstream /path/to/upstream/repo

Track (and checkout for good measure) the upstream code as a branch:
git checkout -b upstream upstream/master

Merge the upstream branch, as a subtree, into my master branch:
git checkout master
git subtree add --prefix vendor/upstream upstream --squash

Then create my own src directory with symlinks to the upstream directories I want to work on:
mkdir src
cd src
ln -s ../vendor/upstream/path/to/directory1 .
ln -s ../vendor/upstream/path/to/directory2 .

Why do it this way?
I now have a src directory which just represents the module I want to work on. I can commit my changes to my repo, yet still merge in upstream changes (by refreshing the vendor subtree).
However, this does not seem very elegant. I am carrying the entire upstream codebase in my repo even though I only care about two subdirectories.
What else have I tried?
I initially tried using sparseCheckout to restrict the directories pulled in from upstream. It appeared to do exactly what I wanted on my box, but the repo still contained all of the upstream code. What is more, the sparseCheckout settings do not replicate when the repo is cloned.
What I want
Is there a better/more elegant solution to this problem? I realise the ideal is to spin out a sub-repo upstream, but I can't do that. I don't really need to track upstream version history... apart from the fact I want to easily merge in upstream changes.
Answer: If your OS supports symlinks (i.e is not Windows): Create the module repo somewhere else, and create symlinks to the two directories you want to use in your code. When you want to pull down module changes, cd to the module repo and pull into there. When you want to push up changes from your own code, it looks from the top answer here like Git would do exactly what you want.


Mach Zehnder Do-it-yourself

Question: I have a red laser and BS. Can I make MZI at the lab? I heard that is very difficult to achieve the calibration. What is expected to be seen after BS2? A dark spot at centre with fringes around? I searched a video on net but they very unpleasant and in one they said they can not arrange it because the paths difference can not be tuned by hand.
Answer: Besides the BS you need a few other components:

Make sure the BS is at least working at the wavelength of your laser.
You need at least 2 mirrors and 2 BS in order to achieve interference:

The lens may or may not be necessary,depending on how big your beam is. I would definitely suggest to have at least a few lenses at hand or a beam expander in case your laser beam is too narrow (To be able to observe the fringes "by eye" I recommend ~20-30mm).
The mirrors are used to make the optical paths equal. You need to make sure that the optical paths are exactly the same (this is done by making the lasers exactly 90° with each other and measure the propagation distance between BS and mirrors)
The sample is not necessary, you can also achieve fringes of the laser itself.
The first BS should be preferably 50:50 so you see the power split evenly
The second BS is to have the beams overlap before reaching the screen, I forgot if these have to have a specific ratio, I think I used a 10:90

in one they said they can not arrange it because the paths difference can not be tuned by hand.

That's not true. With some elbow grease you can achieve a fair equal-path between the beam splitters, just have a millimeter-range ruler at hand, and preferably use e.g. bore holes in an optical table to get a good reference.
If you have little experience aligning lasers it may take you longer, but it should be possible to make an interferometer "at-home".
https://www.edmundoptics.de/knowledge-center/application-notes/optomechanics/building-a-mach-zehnder-interferometer/
The solution Edmund Optics gives is actually rather fancy, you should be able to build the interferometer with less components, although I strongly recommend at least something optics-grade to make your life easier.
Comment: Thanks very much. I don't want a sample. I very perplexed by the intf pattern fringes right on your scheme of MZI. Is this with sample? I thought I would see a black circle on D1 and white on D2 surrounded by citcles of light.
Comment: Sorry what do you mean by elbow grease?
Comment: 1. You should see a black circle with fringes, you are correct. The sample changes the orientation of the fringe pattern.
2. "Elbow grease" sorry this is an americanism, it is meant to mean something that requires a lot of physical effort or labor. I did a "manual" MZI with that setup above and it worked very well, nice visible fringes with 25mm beam but I spent maybe 1 week at the lab measuring the exact positions between mirrors and making the beam travel very straight.

Mach Zehnder Do-it-yourself


Cumulative Incidence function and competing risks

Question: Let $R_1,...,R_K$ be competing risks and put $T=\min(R_1,...,R_K)$ and $\delta = i$ if $T=R_i$. The cumulative incidence function is then defined as $F_i(t):=P(T\le t,\delta = i)$. The cause-specific hazard rate is then defined as $$h_i(t)=\lim_{\Delta t\to 0}\frac{P(t\le T<t+\Delta t,\delta = i|T\ge t)}{\Delta t}.$$It is then stated that $$F_i(t)=\int_0^th_i(u)\exp(-H_T(u))du,$$where $H_T(u)=\sum_{j=1}^K\int_0^th_j(u)du$ (the cumulative hazard rate of $T$). However I can not see how this follows and could use some help on how to show it. If you need more information let me know. Thanks!
Answer: Wikipedia has some good pages on the relationships between the event-time CDF, survival function, and cumulative hazard.
$h(t)$ can be seen as $f(t)/S(t)$, the pdf divided by the the survival function.  Additionally,  $\text{exp}[-H(t)]=S(t)$.  It should then be clear that
$$\int_0^t h(u)\cdot \text{exp}[-H(u)] du=\int_0^t \frac{f(u)}{S(u)}S(u) du=\int_0^t f(u) du=F(t). $$
For cause-specific risks it appears we are not conditioning on a risk but incorporating the risk type within the probability statement, i.e. $h_i(t)=f_i(t)/S(t)=f(t,\delta)/S(t)=h(t,\delta)$.  Then
\begin{eqnarray}
\int_0^t h_i(u)\cdot \text{exp}[-H_T(u)] du&=&\int_0^t h(u,\delta)\cdot \text{exp}[-H_T(u)] du\\
&=&\int_0^t \frac{f(u,\delta)}{S(u)}S(u) du\\
&=&\int_0^t f(u,\delta) du\\
&=&\int_0^t f_i(u) du\\
&\overset{\text{by definition}}{=}&F_i(t).
\end{eqnarray}
Some of the steps are unnecessary but serve as a reminder that we aren't conditioning on a particular type of risk.  Often times a subscript can suggest a conditional probability.  Let me know if your question is regarding something else.
Comment: I see why these equalities are true however (I assume you mean $F=$CDF) I can't see how   $F(t)=F_i(t)$.
Comment: Thank you for the edit. However I think we are taking past each other. It is the first equality , $F_i=\int_0^th_i(u)\exp(-H_T(u))du$, that I am unsure of. It seems like you are using that or maybe I'm misunderstanding.
Comment: Ah, I see I wasn't as clear as I could have been.  I have revised my answer.
Comment: Ah so $f_i$ is the marginal pdf?
Comment: Based on the $i$ subscript we could call it the marginal cause-specific pdf.


Colour of gradient overlay changes when saving for web and devices in Photoshop CS4

Question: I have an image with a linear gradient overlay (banner image on this page EDF Energy - Our Campaigns. I have set the RGB colour in CS4 to R: 29 G: 31 B: 79. However, when I save the file for web the colour darkens slightly as you will see on the site. I want to colours of the background and edge of the banner image to match exactly. Does anyone know how to fix this?
Comment: Save for Web has many file formats. Which one you choose has influence on the color. Could you be more specific? The goal should be to use the same setting as the previous file if you want them to match in any way.
Comment: Use JPG format with High Quality settings if you do not require transparency effect, otherwise use PNG-24.
Comment: Which RGB have you used?
Comment: Sorry meant to say that I used PNG-8 file format. The desired RGB is 29, 31, 79. The file I'm trying to match with is jpg so I'll try using that.
Answer: Photoshop's default settings make matching RGB colours in images with colours in code near impossible. But, it's easy if you change a few settings. Here's what to do:

Choose Edit → Color Settings and set the working space for RGB to Monitor RGB.
If you're using Photoshop CS6, click More Options and turn off Blend Text Colors Using Gamma, because it changes how non-opaque text is rendered. It should already be off, but if it's not, turn off Blend RGB Colors Using Gamma as well.
Open a document and choose Edit → Assign Profile, then set it to Don't Color Manage This Document. This must be done for every single document you work on.
Ensure View → Proof Colors is turned off.
When saving files with Save For Web, ensure Convert to sRGB is turned off. If you're saving a JPEG file, then also turn off Embed Color Profile (there are some cases where you might want this on for photos, but chances are you'll want it off for interface elements and icons).

The most important point is the last one. Convert to sRGB destructively changes the colour profile of your image from the document profile to sRGB, altering the values of each pixel.
More detail can be found here: Colour management and UI design
Please note: The instructions above are for Photoshop CS6, but CS4 is very similar. Illustrator is very similar as well.


What is the role of an A&R credit in an album?

Question: I was reading the credits for one of my favorite albums and saw an A&R credit. What does A&R stand for and what purpose does this position serve in the creation of an album?
Answer: From Wikipedia:

Artists and repertoire (colloquially abbreviated to A&R) is the division of a record label or music publishing company that is responsible for talent scouting and overseeing the artistic development of recording artists (singers, instrumentalists, bands, and so on) and songwriters.[1] It also acts as a liaison between artists and the record label or publishing company; every activity involving artists to the point of album release is generally considered under the purview, and responsibility, of A&R.

As far as A&R's purpose in the creation of the album, the above referenced Wikipedia article states:

Overseeing the recording process
The A&R division of a record label oversees the music style and recording process. This includes helping the artist to find the right record producer, scheduling time in a recording studio and advising the artist on all aspects of making a high-quality recording. They work with the artist to choose the best songs (i.e., repertoire) to record. For artists who do not write their own music, the A&R person will assist in finding songs, songwriters, and arrangers. A&R staff will help find session musicians for the recording. A&R executives maintain contact with their counterparts at music publishing companies to get new songs and material from songwriters and producers.
As the record nears completion, the A&R department works closely with the artist to determine whether the record is acceptable to the record company. This process may include suggesting that new songs need to be written, that existing songs need a new arrangement, or that some album tracks need to be re-recorded. A key issue is whether the album has a single: a particular track which can be used to market the record.
Comment: Also known as the 'Umm & Ahh department' - responsible for changing their minds, not remembering the band members' names, not being sure of release schedules, falling out over track listings & artwork… & generally feeling like a hinderance to the entire artistic process. Don't invite them to the studio whilst you're working on a track …& if you have to, *never* give them a copy of the rough mix, or they'll get so used to it they won't like the final mix.


Do multiple castings of False Life stack?

Question: The spell False Life gives you a small amount of temporary hit points. If you cast it multiple times, does the temporary HP stack?
Answer: Temporary hit points never stack. If you get another source of THP, you either keep your current THP or take the new THP, usually taking whichever is higher. (PHB 198)
Answer: It will not stack with temporary hit-points. However, temporary hit-points that are not temporary hit-points (Arcane Ward, Wizard Arcane Tradition: Abjurer) will stack, as it is a seperate entity that behaves like temporary hit-points. It is not THP, but takes damage for you and cannot die. Therefore, it, and as far as I know only it, will stack with False Life.
Polymorphing is not THP, but it behaves similarly so in theory the maximum 'temporary' hit-points you could have would be being Arcane Warded, Polymorphed and False Lifed.


Teaching profession:Differential Equations and Mean Value Theorems

Question: Usually I teach Algebra,Algebra and Geometyry, Topology, at various University  levels. This semester (Spring 2014) I have to teach Differential Equations to University second year students (4th Semester). For me, besides different ways to solve such particular equations (linear or not, constant coefficients or not , order 1, 2 , ... ), the Theorem of Existence and Uniqueness of solutions (Cauchy problem) must be taught to the students (Otherways the course would be empty : I told that to my students !).For this, a Lipschitz condition is needed and, hence, a Mean Value Theorem (MVT) for vector valued functions is useful when differentiability is satisfied . If a function f has a differential Df , Lipschitzity is equivalent to the boundedness of Df (which is easy to check for students when dealing with ordinary differential equations). One shows this equivalence using some MVT. The best statement I found for a such MVT is by Robert M. McLeold (Proc.Edin.Math.Soc. 14(1964-5),197-209). Now my question : is there any nicer formula for the Mean Value Theorem for vector valued functions than that by Robert M. McLeold ? Secondary question : is there any better book than Pontriagin's (Ordinary differential equations ) for my teaching (2nd university year, 4th semester) ? Of course, Arnold's one, I know !
Comment: A function $f:\mathbb{R}^n\to\mathbb{R}^m$  is  decribed by its components $f_1(x_1,\dotsc,x_n),\dotsc, f_m(x_1,\dotsc,x_n)$. The function $f$ is Lipschitz iff each of the components is such.
Comment: I know that . My question is about the Mean Value Theorem for vector value functions f : (a,b)→R^m.
Comment: I'm a little lost here. I'm assuming that you want to prove existence and uniqueness of a solution $u$ to a system $u' = F(t, u)$, $u(0) = u_0$. Integrate both sides to obtain an integral operator for which a fixed point is the desired solution. The appropriate Lipschitz condition on $F$ implies that the integral operator is Lipschitz in the space of continuous functions using the sup norm, where the Lipschitz constant goes to zero as the time interval goes to zero. So for small time, the integral operator is a contraction mapping. I don't see where a mean value theorem is needed.
Comment: @ Deane: I assumed  he needed the mean value theorem  to prove the Lipschitz condition.  @ Al-Amrani. A function $f:(a,b) \to \mathbb{R}^m$ is Lipschitz iff its components are. You only need the mean value for scalar valued functions of one variable.
Comment: @Dean Yang , @ Liviu Nicolaescu : to check that F(t,u) is Lipschitz w.r.t. u, the commune hypothesis is that F has a bounded partial derivative w.r.t. to u .
Comment: You do not mention where you are teaching this course. If you are talking about an average university in the US, I wish you luck. You will need it.
Comment: @Michael Renardy: I use,as a teacher,the book I am talking about below.It is not intended to my students.At the university in France, teachers are not obliged to follow strictly the same book as their students (as it is in the States).
Answer: (This is an answer to my secondary question above.)
A very good reference I came to the use of which in my teaching is :
Ordinary Differential Equations by Wolfgang Walter , translated by Russel Thompson (Graduate Texts in Math., Springer 1998). That is a living and lively teaching book. It contains many explicit examples, and exercises (with solutions or hints). Notions, results, methods to solve equations, are well introduced, before giving proofs . (Birth and death dates, full names , nationalities ... of classical mathematicians are given.)


Why isn't standard deviation $\frac{1}{n}\sqrt{\sum^n_{i=1}(x_i - \mu)^2}$?

Question: I.e. why not square everything to get rid of signs, undo the square with the square root, and then average out the deviation? Am I completely missing the point?
Answer: You are missing the point that the definition of the standard deviation is the square root of the variance $V$ which is defined as
$$V = \frac 1n \sum_{i=1}^n (x_i-\mu)^2.$$
So why is $V$ defined the way it is? Well, a standard model is that the $x_i$ are a random sample from a distribution with known mean $\mu$ and unknown variance $\sigma^2 = E[(X-\mu)^2]$ and so
$$V = \frac 1n \sum_{i=1}^n (X_i-\mu)^2\\$$
is a random variable whose expected value $E[V]$ is just $\sigma^2$.
Today, the random variable $V$ happens to have value $\frac 1n \sum_{i=1}^n (x_i-\mu)^2$ and we are using this value as an estimate of $\sigma^2$. We are also calling $V$ as the variance of the random sample.
Be that as it may, you are averaging too late by dividing the square root of the sum $\sum_{i=1}^n (x_i-\mu)^2$ by $n$; you need to do the averaging right after the sum has been computed rather than after the square-rooting has been done.
Comment: This answer seems unsatisfying because it begs the question. Variance is defined as $\mathbb{E}[(X-\mu)^2]$. If variance had an estimator that contained $\frac{1}{n^2}$ in place of $\frac{1}{n}$, then standard deviation would match OP's expression. So how do we know that $V$ is the correct expression?
Comment: It's the standard way of estimating variance via maximum likelihood. I wonder if a variance estimator with $1/n^2$ would even be admissible. If you can come up with such an admissible estimator, than the posted standard deviation formula could be viable.
Comment: @Dave I know that $V$ **is** the correct expression. I'm just pointing out that the answer hinges on an unsupported assertion — even though it asserts something which is true.
Comment: @Sycorax If the $x_i$ are independent samples from a distribution with known mean $\mu$, then $\frac 1n\sum_{i=1}^n (x_i-\mu)^2$ can be viewed as a random variable whose expected value $E\left[\frac 1n\sum_{i=1}^n (X_i-\mu)^2\right]$ is $V = E[(X-\mu)^2]$.
Comment: That would make a good addition to the answer.
Answer: An example might illustrate the point
Suppose we have a population where the relative frequency of being

value $20$ is $0.1$
value $25$ is $0.6$
value $30$ is $0.3$

I can tell you that the mean is $\mu = \sum_j x_j p_j =26$, the variance is $\sigma^2=\sum_j (x_j-\mu)^2 p_j =9$ and the standard deviation is $\sigma=3$ no matter what the total population is.  For example

with a population of $n=100$, there are $10$ copies of $20$, $60$ copies of $25$ and $30$ copies of $30$.  Using  $\sqrt{\frac{1}{n}\sum^n_{i=1}(x_i - \mu)^2}$ I would get $3$ while with $\frac{1}{n}\sqrt{\sum^n_{i=1}(x_i - \mu)^2}$ you would get $0.3$
with a population of $n=10000$, there are $1000$ copies of $20$, $6000$ copies of $25$ and $3000$ copies of $30$.  Using  $\sqrt{\frac{1}{n}\sum^n_{i=1}(x_i - \mu)^2}$ I would still get $3$ while with $\frac{1}{n}\sqrt{\sum^n_{i=1}(x_i - \mu)^2}$ you would get $0.03$

It is desirable to get the same answer both times as the relative frequencies and the  dispersion in the population is the same; all that has changed is the size of the population.
Your suggestion starts to make sense if we start talking about taking samples and estimating the mean from the sample and want a measure of the possible error in the estimate of the estimate of the mean.  But that is a deeper question, and the statistic in question is then called the standard error of the mean rather than the standard deviation of the population or of the sample.


Add fonts to CKEditor (in Drupal)

Question: I have downloaded three fonts - .tff files - from http://www.FontIneed.com and installed them under Linux. They are really installed throughout the system because they are now present in the OpenOffice suite fonts drop down boxes.
As I have installed CKEditor as rich text editor in Drupal, I have tried to add these fonts to it.
I already had a problem when testing in Drupal->Config->CKEditor->Advanced if the Javascript insertion works for a given profile. I entered exactly the example that is provided under the texfield box but, when created a new block in Full HTML, the fonts drop-down list presented the whole set of available fonts (not only the ones I have entered).
Then, I wanted to add my new fonts to the CKEDITOR.config.font_names in the plugin.js file (although I don't like that because it will blow-up my setting when new release will overwrite this file ...). But the new fonts don't show up.
What should I do?
Thanks
PS: I may have a problem entering their names. For example, I've got one font with the Zipty_Do.tff file; the first line of the file says 'Zipty Do, Regular' and that's the name I've entered
Answer: Regardless of wether you are able to get your new fonds to show up in CkEditor, I believe that if you have installed a free font, chances are that they are not standard system fonts. Without embedding the fonts on the site itself these fonts will only be available to you and will thus show up different to visitors of your site.
A module I found extremely helpful in embedding non system fonts is Cufon http://drupal.org/project/cufon. Hope this helps.

Add fonts to CKEditor (in Drupal)


Online PDF reader for my own site other than Scribd?

Question: I am using Scribd API (www.scribd.com) to display the PDF files in my website. I just want to know is there any other PDF API which i can use to embed the PDF in my website. FASTER and MORE customizable than Scribd, Mainly i want to put my company logo in that API, whereas in scribd they are displaying there logo.
So just want to know any opensource, FREE and customizable PDF API for website.
Thanks
Answer: Depending on how much functionality you're looking for, it's not incredibly difficult to roll your own. SWFTools lets you convert PDF to SWF, a format you can load in to a simple Flash viewer.
Answer: Sure, you can use Google Docs Viewer (you don't need to have a google docs account): https://docs.google.com/viewer - Instructions are on the page
Answer: You can also try http://issuu.com. But it's not SEO friendly.
Answer: May be you could try this one: FreepapeR


How do I change the icon theme in Ubuntu?

Question: I want to change my icon theme to Faenza. I tried using MyUnity, but it didn't work so well. How can I change it?
Comment: What exactly didn't work when you tried using MyUnity?
Answer: You can change icon theme with Ubuntu Tweak.
Install Faenza Icon Theme
Hit Ctrl+Alt+T to open terminal and run the following commands one by one:

sudo add-apt-repository ppa:tiheum/equinox
sudo apt-get update
sudo apt-get install faenza-icon-theme

Install Ubuntu Tweak:
After installation of Faenza run following commands in terminal to install "Ubuntu Tweak".

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

How To Change Icon Theme With Ubuntu Tweak?

Once installed Hit Super key (windows key) to open Unity dash and search for "ubuntu tweak" and open it.
Go to tweak tab and click on "Themes" button.

Hare you can easily change the icon theme
Answer: I use gnome-tweak-tool to change the icons.

Fist install faenza-icon-theme
Add the repository  and update
sudo add-apt-repository ppa:tiheum/equinox
sudo apt-get update

install
sudo apt-get install faenza-icon-theme

Now, install gnome-tweak-tool
sudo apt-get install gnome-tweak-tool

After Installation open Gnome-Tweak-Tool to change icons,

That's all :)
Answer: I like the Unity Tweak Tool:
sudo apt-get install unity-tweak-tool

Answer: You just have to install Faenza Icon Theme the way it became described here already:
Open a terminal (Alt+T) and run
sudo add-apt-repository ppa:tiheum/equinox
sudo apt-get update
sudo apt-get install faenza-icon-theme

(More about this way of installing software via add-apt-repository and about how to remove it.)
Then start MyUnity  and switch to themes, under icons select "Faenza-Ambience" if
you use Ambience as theme. Otherwise the icons in the panel don't match, which means they are black on dark background. If you prefer the Radience theme, choose "Faenza" or "Faenza-Radience". Changes should become visible immediately:

If you don't want to add a PPA as described above you can download the zip file on its homepage.

When the download finished, extract the file via rightclick → "Extract here".
Open this new folder.
Doubleclick the "INSTALL" file. When asked "Do you want to run 'INSTALL', or display its contents?" choose "Run in Terminal".
A terminal pops up, you have to answer some questions about the install.
When ready, start MyUnity and select the new theme.

If you prefer this way of installing and want to make Faenza Icon Theme available for all users on your PC, download and extract the file as described above.

Then open a terminal (Alt+T).
Switch to the Faenza folder via cd, i.e. cd Downloads/faenza_icons_by_tiheum-d2v6x24/.
Install the theme via sudo ./INSTALL.
Answer: Since you have MyUnity program here are steps to change the icon theme with it:

Grab the the Faenza icon package/ or any other icon package. You can get more icon themes from here:
These packages are normally compressed so extract the compressed file to somewhere easily accessible like your desktop.
Copy the uncompressed folder to the .icons folder which is hidden by default in the home folder. To reveal the hidden folder, navigate to your home folder and press CTRL H

Place the uncompressed folder in the .icons folder and close the folder
Open the dash and search for MyUnity application and launch it
Click on the themes tab in MyUnity and select the icon theme of your choice from the list of icon themes on the right side of the dialog box

Last and most important step ENJOY!!!


Expected number of isolated vertices in a random graph.

Question: I'd like to find the expected number of isolated vertices in the random graph $G=(V,E)$, where $V=\{1,\ldots,n\}$, constructed choosing uniformly at random $m$ edges out of the $\binom{n}{2}$ possible edges. We have that, for a given vertex $v$,
$$
\mathbb{P}(\text{\{$v$ is isolated\}})=\frac{\binom{\binom{n-1}{2}}{m}}{\binom{\binom{n}{2}}{m}},
$$
and from here, defining $X$ as the (random) number of isolated vertices, we could work $\mathbb{E}(X)$ out writing $X$ as $\sum_{v\in V}1_{\text{\{$v$ is isolated}\}}$ and hence
$$
\mathbb{E}(X)=\mathbb{E}\Bigg(\sum_{v\in V}1_{\text{\{$v$ is isolated}\}}\Bigg)=\sum_{v\in V}\mathbb{E}(1_{\text{\{$v$ is isolated}\}})=\sum_{v\in V}\mathbb{P}({\text{\{$v$ is isolated}\}})=n\cdot\frac{\binom{\binom{n-1}{2}}{m}}{\binom{\binom{n}{2}}{m}}.
$$
The problem is that I don't exactly know how to work $\frac{\binom{\binom{n-1}{2}}{m}}{\binom{\binom{n}{2}}{m}}$ out. Is there a nicer expression for it?
Comment: Since ${n \choose 2} = n(n-1)/2$, you can expand it and cancel some factors and simplify a bit more, and perhaps that will be helpful to whatever you're trying to do next?  IMHO the answer is perfectly good as it is (if this were e.g. a homework problem). ...  Completely alternatively, I wonder if one can set up a recurrence in $m$, but I'm not sure.
Comment: A simple approximation is to consider the $G(n,p)$ graph model instead (choose each edge independently with probability $p=m/\binom{n}{2}$, instead of a uniform subset  of $m$ edges). The resulting expression is a bit nicer.
Answer: For an exact expression, this is basically as simplified as you get. You can simplify it a bit using falling powers. Let $(n)_k$ denote the product $n(n-1)(n-2) \dotsm (n-k+1)$. Then $\binom nk = \frac{(n)_k}{k!}$. So in our case, we have
$$
   \frac{\binom{\binom{n-1}{2}}{m}}{\binom{\binom{n}{2}}{m}} = \frac{\binom{N-n+1}{m}}{\binom Nm} = \frac{(N-n+1)_m/m!}{(N)_m/m!} = \frac{(N-n+1)_m}{(N)_m}.
$$
Here, I write $N$ for $\binom n2$.
When $m > n-1$, if we were actually calculating the expression above, it would be simpler to cancel factors on top and bottom to get
$$
   \frac{(N-n+1)_m}{(N)_m} = \frac{(N-m)_{n-1}}{(N)_{n-1}}.
$$
But that's not a huge change.
People do also think about asymptotic approximations of this: we have
$$
   \frac{(N-n+1)_m}{(N)_m} \approx \frac{(N-n+1)^m}{N^m} = \left(1 - \frac{n-1}{N}\right)^m = \left(1 - \frac 2n\right)^m \approx e^{-2m/n}.
$$
When $m$ is relatively small, we can show that this approximation is pretty close to the original as $n \to \infty$, and of course understanding the quantity $n e^{-2m/n}$ as an approximation to the number of isolated vertices is much easier. For all values of $n$ and $m$, the $\approx$ approximations above are also $\le$ upper bounds, so that $n e^{-2m/n}$ is always an upper bound on the expected number of isolated vertices.


It is possible to make a reportViewer without rldc file?

Question: I am using Visual Studio 2010 and I want to make some reports dynamically. I want to display in the reports viewer my own created dataSet and table adapter. Is this possible?
Or it is possible to change the connection string from the dataset at runtime? I have different connections strings which are defined in the settings.xml file and i want to use this strings at connection.
Thanks for help!
Comment: You might take a look at www.rpt.com.
Answer: If you want to have the same report i.e. a "Pie Chart" with different data bound to it then that is already how they work. When you make a report viewer report all you are doing is defining the layout. Data gets bound to it at runtime. So at runtime you could add some logic to bind whatever data set you want to the report.
If you want a truly dynamic report such as sometimes a pie chart sometimes a bar graph I don't know if that is possible. You could make all the options (if there is a limited enough number of them) and pick the right one out of a multiview then bind to it at runtime.
EDIT: To clarify my first point it does require that the data set passed in have the same column number/names. So if you are using vastly different datasets you would need something like my second option if that would work.


does LBE security work on android 4.3?

Question: how do i make LBE work on and android 4.3 stock touchwiz rom? i have tried a few versions but they were in chinese. is there any working English version?
Answer: Be careful with what version you pick here. The (original) LBE Privacy Guard (English) worked fine up to Android 4.1 but would cause a boot-loop if installed on 4.2 or up. The LBE Security Master is only available in Chinese, as you've already noted.
Now, there are multiple ways to get it localized:

There are patched versions available at XDA, which you then had to manually update each time a new version is available (and rely on the XDA member providing a patched update then)
If you're running the Xposed Framework, there's a module called LBE Security Master - Translation International which you could load. That way you could simply use the updates from Playstore, and the module would take care for localization. Naturally, that would leave some original terms "shine through", especially with new stuff added to the app and the module not yet updated – but hey, one can live with that as long as it's below the threshold.

does LBE security work on android 4.3?


What publicly accessible vantage points exist in Portland, Oregon?

Question: Any publicly accessible tall buildings that are good for views & photography in Portland, Oregon?
Or is the Aerial tram a better bet?
Answer: I recommend the Pittock Mansion for a stunning view over Portland.
Comment: Agreed! My family and I just visited there, and the view (as well as the interior) of Pittock Mansion was wonderful.
Answer: Portland City Grill is a restaurant at the top of the U.S. Bancorp Tower and was voted "Best View" in 2003 by USA Today.
Answer: Depending on the kind of views you want, you might find that Washington Park offers what you need. It's set on hills just above the city, but with good public transport links to get there (MAX and Bus).
You need to be over on the Rose Garden side of the park to see the city. If it isn't the view you wanted, it's not the end of the world, as you're in the lovely Rose Garden at the time!
(You'll need the Rose Garden, rather than the Japanese Garden, as the latter has lots of trees on the entrance side which faces the city, with post of the gardens sunken down. Lovely, but not right for seeing the city)
Answer: The upper area of the sanctuary at The Grotto also has a great view!

If magnificent views are what you are after, the upper area of the
sanctuary is where you want to be. From a birds-eye view of Portland
to the natural beauty of the setting, the upper area is a place that
must be seen to be believed. On a clear day several of the area's
mountains are visible and you can even catch a glimpse of Mt. St.
Helens. The upper level can be reached by trails or by elevator for
those who might not be able to make the trip on foot. Most of the
trails are paved and very even - so the risk of injury for hikers and
walkers is very slight.

https://www.oregon.com/attractions/grotto


How do I make my java code search only for a to z and 0 to 9

Question:
My java code takes almost 10-15minutes to run (Input file is 7200+ lines long list of query). How do I make it run in short time to get same results?
How do I make my code to search only for aA to zZ and 0 to 9??
If I don't do #2, some characters in my output are shown as "?". How do I solve this issue?
<code>// no parameters are used in the main method
public static void main(String[] args) {

// assumes a text file named test.txt in a folder under the C:\file\test.txt
Scanner s = null;
BufferedWriter out = null;
try {
    // create a scanner to read from the text file test.txt
    FileInputStream fstream = new FileInputStream("C:\\user\\query.txt");
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    // Write to the file
    out = new BufferedWriter(new FileWriter("C:\\user\\outputquery.txt"));

    // keep getting the next String from the text, separated by white space
    // and print each token in a line in the output file
    //while (s.hasNext()) {
    //  String token = s.next();
    //  System.out.println(token);
    //  out.write(token + "\r\n");
    //}
    String strLine="";
    String str="";

     while ((strLine = br.readLine()) != null)   {

            str+=strLine;
            }
           String st=str.replaceAll(" ", "");
           char[]third =st.toCharArray();
          System.out.println("Character     Total");
          for(int counter =0;counter<third.length;counter++){
              //String ch= "a";
             char ch= third[counter];
          int count=0;
          for ( int i=0; i<third.length; i++){
             // if (ch=="a")
              if (ch==third[i])
          count++;
        }
        boolean flag=false;
        for(int j=counter-1;j>=0;j--){
            //if(ch=="b")
            if(ch==third[j])
        flag=true;
        }
        if(!flag){
        System.out.println(ch+"                  "+count);
        out.write(ch+"                  "+count);
        }
        }

    // close the output file
    out.close();
} catch (IOException e) {
    // print any error messages
    System.out.println(e.getMessage());
}
// optional to close the scanner here, the close can occur at the end of the code
finally {
    if (s != null) {
        // close the input file
        s.close();
    }
        }
}
</code>
Answer: For something like this I would NOT recommend java though it entirely possible it is much easier with GAWK or something similar. GAWK also has java like syntax so its easy to pick up. You should check it out.
Answer: SO isn't really the place to ask such a broad how-do-I-do-this-question but I will refer you to the following page on regular expression and text match in Java. Also, check out the Javadocs for regexes.
If you follow that link you should get what you want, else you could post a more specific question back on SO.
Comment: These chars are shown as question marks in servlet html file? why
»                  1
ї                  1
Г                  14
¶                  4
¤                  4
Ї                  1
ў                  1


Variation of Arrhenius equation with concentration

Question: In the Arrhenius equation do Arrhenius constant and activation energy depend on concentration ? (Their units do)
Comment: To my knowledge the activation energy does not depend on concentration while the preexponential factor will depend on the concentration. The preexponential factor is a measure for the probability of two particles colliding with the proper orientation to facilitate the reaction so a higher concentration of particles will lead to a higher preexponential factor.
Answer: The Arrhenius equation gives you a rate constant $k$.
For a second order reaction, $k$ has units of $1/Ms$.
For a first order reaction, $k$ has units of $1/s$.
The Arrhenius prefactor $A$ has the same units as $k$.
The rate, as opposed to the rate constant will depend upon concentration. For the first order reaction, the rate constant is multiplied by one concentration to get the rate, and for a second order reaction the rate constant is multiplied by two concentrations to get the rate.
If $k$ and $A$ do depend upon concentration, that would imply that the reaction is not accurately modeled by the rate constant (for example not really first order when you are modeling as first order or not really second order when you are modeling as second order).
As far as activation energy $E_a$, the equation can be written in terms of energy per mole divided by $RT$ or energy per molecule divided by $k_BT$ (where $k_B$ is Boltzmann constant).  $E_a$ does not depend upon concentration.
Comment: You said than activation energy is per mole doesn't that imply it relies on concentration
Comment: no, it means that $E_a$ is the amount of energy needed for 1 mole, regardless of how many moles there are in an experiment and regardless of how many moles per liter (concentration) are present.
Comment: in other words, the fact that it is energy per mole, means that is does NOT depend upon the number of moles.  Energy is an extensive variable and depends upon amount of a substance, "energy per mole" is an intensive variable and does not depend upon the amount of substance.


How to kill a localhost:8080

Question: I'm trying to kill a dev server setup via yarn on Windows. While I Ctrl+C'd the command prompt, when I went back to localhost:8080 it had not stopped. How can I kill the process?
Comment: Had the process not stopped or had it restarted after being killed. I would expect Web processes to be run with a monitor to restart it after failures.
Answer: You can track down the process running on port 8080 and kill it.
For macOS or Linux:
sudo lsof -iTCP:8080 -sTCP:LISTEN

You should get an output something like:
COMMAND   PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
yarn    12017 user   12u  IPv6 1876683      0t0  TCP *:8080 (LISTEN)

Now that you have the process ID(PID), you can kill the process. First try:
kill 12017(whatever the PID is)

If that does nothing, try:
kill -9 12017

For Windows:
netstat -ano | findstr :8080 (the port number)

This should give you the process to kill. You can then run:
taskkill /F /PID 12017(or whatever the process ID is)

Comment: For an 'all in one' linux command, check out [fuser](https://linux.die.net/man/1/fuser). `fuser -k 8080/tcp 8080/udp` should kill anything listening on 8080.
Comment: NB: The Windows command will also list all local processes that are _connected_ to the webserver, at the instant that the command was run. The left address:port pair is the source address, the right address:port is the destination. Adding -t tcp will only list TCP connections, not UDP connections
Comment: @Bakuriu : native Italian user here. Try to guess how that "ano" mnemonic sound hilarious (and unforgettable) to me...
Comment: @mbrig That's cool, but it sends `SIGKILL` by default. To do kills where the program has a chance to clean up after itself and avoid possible corruption, you can change the signal by providing an option like you would with `kill`, for example `-15` or `-TERM` or `-2` or `-INT`.
Comment: Windows also has a built-in GUI for this: Resource Monitor (perfmon.exe /res). Under the Network tab, check "Listening Ports."
Comment: After `kill -9 PID` the process was always starting again. But `kill PID` stopped it permanently!
Answer: If you install ProcessExplorer from SystemInternals, then you can see the process tree.
In ProcessExplorer, click the target-sight button, and then click on the cmd prompt that you launched the webrowser from. ProcessExplorer will then jump to that cmd prompt in its list. If the process view is not already threaded by parent-child relation, then press Ctrl-T a few times until it is. You then should be able to see the webserver. Select it, and then right-click on it. Select "Kill Process Tree" to forcibly kill the webserver.
SystemInternals also has pskill. You can use pskill -t "MyWebServer" to kill all processes, and their children, than are called MyWebServer.
Answer: In a single command:
kill -INT $(lsof -t -i :8080)
Or more generally:
kill -INT $(lsof -t -i :PORT_NUMBER)
Additional Notes:
$() is called "Command Substitution"
Answer: Unless the process you're trying to kill is one that gets started upon booting the server, rebooting the computer in question would probably work. It's probably a last resort option due to losing everything else the computer's been doing that hasn't been saved, and the time it takes for the reboot to occur, but there's a reason why a lot of IT professionals start their troubleshooting process for user machines with "Have you tried turning the computer off and back on again?"
Comment: Not my downvote, but this solution is a vast overkill.  "Turn it off and on again" is mostly useful when you are debugging somebody else's problem and don't care about their inconvenience.
Comment: Not sure why I'm being downvoted. "Reboot the computer" is a valid solution for the problem asked by the OP.
Comment: (not my down) It is clearly not a user-level problem. Maybe a super-superuser level problem.

How to kill a localhost:8080


Norm of linear operator 3

Question: Define operator $A:L^2(0,1)\to \ell_2$, $$ Af=(\int_{\displaystyle(0,1)}f(x)\mbox{ d}x,\int_{\displaystyle(0,\frac{1}{4})}f(x)\mbox{ d}x,\int_{\displaystyle(0,\frac{1}{9})}f(x)\mbox{ d}x,\ldots).$$ What is the norm of operator A? Is the norm attained ?
My try is following
$$ \|Af\|^2=\sum_{n\in\mathbb{N}}\left(\int_{\displaystyle(0,\frac{1}{n^2})}f(x)\mbox{ d}x\right)^2\leq \sum_{n\in\mathbb{N}}\frac{1}{n^2}\int_{\displaystyle(0,\frac{1}{n^2})}f^2(x)\mbox{ d}x\leq  \|f\|^2\sum_{n\in\mathbb{N}}\frac{1}{n^2}.$$
But I am not able to find sequence $f_n$ such that $\frac{\|Af_n\|}{\|f_n\|}\to \sqrt{\sum_{n\in\mathbb{N}}\frac{1}{n^2}}$. Isn't this estimate too big ?
Thanks in advance for your help.
Comment: I'm puzzled by the definition of the map $A$.  Do you assign the $i$th component of $Af$ by integrating $f(x)$ over $(0,i^{-2})$?  The upper limit of integration is hard to read in its present form, but an edit would make it legible.
Answer: Hint: For the start, use the Cauchy-Schwartz inequality to bound
$$\int_0^{\frac{1}{i^2}}f(x)\,dx=\int_0^1\chi_{[0,{\frac{1}{i^2}}]}\cdot f(x)\,dx\leq \left(\int_0^1\chi_{[0,{\frac{1}{i^2}}]}^2\,dx\right)^{1/2}\cdot \left(\int_0^1f^2(x)\,dx\right)^{1/2}=\frac{1}{i}\|f\|_{L^2}$$
so that
$$\|A\|\leq \frac{\pi}{\sqrt{6}}.$$
It is easy to find a sequence of functions whose $l_2$ norms converge to that limit (take functions $f_i$ whose $L^2$ norm is $1$ and whose support is, say, on $[0,1/i^2]$ for each $i$), so that indeed that is the norm.
To show that it is not achieved work by contradiction.
Comment: This example of sequence does not work. I think that my estimate can be optimized. When we look at my estimate, when we can write equalities instead of inequalities ? First inequality is equality when $|f| =1$ but in second one $f=0$ on $(\frac{1}{n^2},1)$.

Norm of linear operator 3


Why was Picard an assistant astrophysics officer?

Question: In the TNG episode Tapestry, we learn through the alternate timeline provided by Q that Picard becomes an assistant astrophysics officer.  Why would this be though?  Wouldn't Picard become a historian like we see those who infrequently pop up in several TOS episodes, as that's his passion?
Comment: Speculation: He didn't get to be what he really wanted to be, even to the extent of being an historian or archaeologist rather than an astrophysicist. There's little doubt that he was intelligent enough to do either job.
Answer: It's not made clear whether Picard would really have ended up as an Astrophysics officer had he avoided taking risks in his life or whether Q has simply chosen to place him into that role in order to hammer. his. point. home.
There's a quote in Voyager regarding the abilities of the other Q known as Quinn;

CHAKOTAY: How about Stellar Cartography?
JANEWAY: We could shut down Stellar Cartography with all the knowledge he'd bring to the job

My personal theory is that given that the average Q knows everything about astrophysics, Q may well have simply chosen a profession for Picard that he personally considers to be utterly worthless.
Regardless, the decision to leave Starfleet and become a professional historian or archaeologist would still require him to take risks. It's made clear in quite a few Trek episodes that alien archaeology regularly results in uncovering dangerous artefacts so it's unlikely that a fully risk-averse Picard would have gone down that route.
Comment: There is one little flaw in your logic in the last paragraph. Just being on the Enterprise at all is a pretty big risk. Look at all the times parts of the ship get blown up (or at least fired on)! How many times was the ship entirely destroyed in alternate timelines? 4? 5? I think this fact lends more credence to the notion that Q is trying to convey a point; by being on the Enterprise, he can see himself alongside his crewmates and just how unrealized his potential is.
Comment: As I said, it's more likely that Q chose that path for him, not that it's one he would necessarily have chosen for himself. Within the series, Picard has never shown any *special* affinity for Astrophysics.
Answer: Q wanted to highlight that due to Picard taking these risks (early in his life), he got to be as successful as he is. If that would not be in his character, he would have ended being quite unsuccessful in his life. Which, as in the example Q makes, would be assistant astrophysicist with no real chance of promotion.


Integrating BPOSD into STIM

Question: Pymatching doesn't seems to be working for Steane's code on STIM. I am wondering is there any other decoder that I could possibly use? I am trying to simulate circuit-level noise in syndrome extraction circuit for Steane's Code. I am having issues integrating BPOSD into STIM.
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Answer: You need to write three pieces of code:

Configuration. Write something that takes a detector error model (dem) and configures your decoder with it. Typically this looks like glue code converting the dem into the graph format expected by the decoder, then initializing the decoder with that graph format. This is usually the hardest part to write.

Shot decoding. Write something that takes a set of detection events, and converts that into a problem understood by the decoder, runs the decoder on the problem, and extracts the predictions about which observables were flipped. This usually isn't too hard to write but is the most important part to write well so that it's fast. You'll want (but don't initially need) a batched version that takes many shots at once, instead of one shot at a time.

Wrapping. Package this up into a python class inheriting from sinter.Decoder. When you call sinter.collect tell it about your decoder via the argument custom_decoders={'bposd': YourDecoderClass()} and tell it to use your decoder via the argument decoders=['bposd'].
Comment: Hi @CraigGidney thank you very much for answering. BPOSD uses parity check matrices and performs Gaussian inversion after BP. However, pymatching uses graph. I am just wondering is there any way to convert the whole detector-error-model into parity check matrices and then use BPOSD. (I am very new to using STIM and I am still catching up on how it works)
Comment: @OmprakashChandra Doing that conversion is the "configuration" step you have to write. Stim doesn't have a built in way to do it, because a parity check matrix is an extremely inefficient representation for a large circuit.
Comment: that makes sense. Thanks again for responding.
Answer: The new version of the LDPC package that is currently under development, in the LDPC_V2 branch on LDPC's github repo, contains a Sinter BPOSD decoder.
This notebook shows step-by-step how to use the decoder to obtain a threshold.
Comment: That's very helpfull. Thanks @Peter_Jan

Integrating BPOSD into STIM


First Order Logic for a complete newbie (book recommendations)?

Question: I signed up for a class that I shouldn't have. So now I'm slightly screwed because I don't understand any of the notation used when my professor was explaining first order logic. I need some book suggestions as to how to re-learn all of these things. For example: I was confused as to what a "quantifier" is (I do know after Googling it). Any good books with plenty of examples? Thanks
Answer: The logicians at UCLA have a free logic book covering first-order logic here.
One of the nice things about the book is that it's written to be used in conjunction with a free software program to help learn logic.
I've taught three university logic courses and found the majority of students do much better by  completing proofs and derivations in addition to reading about them. That said, if you approach learning logic in the same way as learning mathematics or programming you'll increase your chances for success.
Answer: Jon Barwise & John Etchemendy, The Language of First-Order Logic (CSLI Press, 1992) is great. A revised and expanded edition was released in 2002, titled Language, Proof and Logic.


Do editors really follow suggested reviewers?

Question: I was wondering if the editors really follow the list of reviewers the author/s suggested upon the manuscript submission in the journal?
Comment: I've heard of some editors actively avoiding reviewers suggested by the authors, see e.g. [this answer](https://academia.stackexchange.com/a/8384/17254).
Comment: The list is certainly a resource for them, but there is no guarantee that reviewers will be selected exclusively from that list.
Comment: Anecdote: I met someone at a conference. I expressed strong views on topic X, impressing the someone as someone who knows a lot on X. I have never published on X. Last week I get an invitation to review a paper by someone on X. Most likely, I was recommended as a reviewer by that person.
Answer: Sometimes, and it varies by editor. On a personal level I try not to use suggested reviewers unless I've really run out of ideas (which rarely happens), because of two reasons:

There've been studies that show that suggested reviewers are more favourable to a paper than those found by the editor.
Peer review fraud where the authors, e.g., list themselves as the reviewer using a different name.

However there are also editors who think that it's unfair to the author if they judge the submission relying solely on editor-found reviewers, precisely because these reviewers are less favourable than author-suggested ones. This group might invite one reviewer themselves, and one author-suggested reviewer.
It's also possible that the editor is lazy/overworked/believes in the authors' integrity etc and relies entirely on suggested reviewers.
Answer: If your paper is especially esoteric, they might. They might find it difficult to find another reviewer and so the list will help them. But they would rather send the paper to someone that they can assume will be unbiased and evaluate the paper on its own and not because of a possible relationship to the author.
But, your list is also a resource to the editor who is looking in the long term to build a large "stable" of reviewers. It may be that someone you list is not chosen for your paper but for another paper on a similar topic sometime in the future.
In addition, the list might give an editor an idea about the "sort of person" who would be a good reviewer, rather than a specific person.
Ultimately, though, the editor needs someone he/she can trust to do an impartial but thorough review.


Hide Admin posts & pages in Dashboard

Question: Is it possible somehow to hide Admin's pages & posts from dashboard so that other users will only view/list non-admin publications?
Comment: That's what user roles are for, install a plugin like "Members" or something to control the different capabilities per user role
Comment: Do you use that plugin? Reliable?
Comment: [Yes](https://wordpress.org/plugins/members/)
Comment: You may post your comment as a solution I will vote as the accepted solution
Answer: The WordPress admin area uses capabilities to determine which user role can see what pages etc. You can use custom written code or several plugins to control to capabilities by each user. I'd suggest using the Members plugin for some easy control.
Comment: The plugin doesn't allow configuring access to pages or posts by user or by category
Comment: Because WordPress doesn't have anything like that build in. I've provided you with a link to all the capabilities in WordPress, if you need other control inside the CMS you need to add custom functionality to the CMS which might be tricky. This is however also not what your actual question was :)
Comment: About WP: there's no filter that may be hooked to the dashboard code and filter queries?
Comment: This seems working, with some adjustments.... https://wordpress.org/support/topic/show-only-authors-posts-in-admin-panel-instead-of-all-posts?replies=32
Answer: Yes, it is possible to hide admin's pages and posts from the WordPress dashboard for other users. You can do it with custom code.
Place this code in your theme's function.php file:
IMPORTANT: Make sure to leave the minus sign before the user id in the code below, that is what tells WordPress to exclude that user's post from the queries.
<code>function wpb_hide_admin_posts_pre_get_posts($query) {
    if (is_admin() && !current_user_can('administrator')) {
        $query->set('author', '-1'); // Replace '1' with the admin's user ID. (the id of the user you want to EXCLUDE), leave the minus sign to exclude that user
    }
}

add_action('pre_get_posts', 'wpb_hide_admin_posts_pre_get_posts');
</code>
Remember to replace 'author', '-1' with the actual user ID of the admin. You can find the user ID in the WordPress users section in the dashboard. This code checks if the current user is not an administrator and modifies the query to exclude posts/pages by the specified author (admin in this case).

Hide Admin posts & pages in Dashboard


Alternator intermittently outputs 12.6V

Question: I have a 2005 accord and have recently had the alternator and the battery replaced from the honda dealer. I then install the voltage meter on the cigarette lighter port. I notice the voltage output is at around 14V (good) while the engine is running. However, the voltage meter will occasionally show 12.6V. Sometimes, it will stay at 12.6V for a while, and sometimes it will show ~14V. Unfortunately, it's so random and I can't find a way to deterministically repeat it so I can show to the repair show. Is that the problem with the alternator or what? Any suggestion how to get that fixed?
Comment: Voltmeter in the cig port will not be accurate or reliable on the alternator output. Only accurate method is to connect it directly to the battery.
Comment: Are you actually having a problem with it starting or running accessories?
Comment: After the alternator was replaced, there was one time stall when the car was idle for 10 min. I brought it back to honda and they are saying there's no issues with the starting system. Since I try to avoid the alternator issue, I bought the voltage meter that I can put on the cigarette port to monitor the voltage. I understand the cigarette port is not accurate, but if it's intermittently showing 12.6V when the car is running, it looks like to me something is not working correctly.
Comment: What is your climate?
Answer: I suggest that you rule out an intermittent alternator.  The symptoms could be quite similar, and would most likely be caused by failing brushes, which intermittently make contact with the slip rings.  Another common failure mode is that a overrunning clutch on the alternator intermittently grabs and then releases, which results in a period of intermittent output.
I do not know if your engine has an alternator with an overrunning clutch.
If a wire is loose on the alternator connection it could cause similar issues.  I understand that the alternator and battery were replaced, so perhaps your best best is to verify all the wiring.
A clamp-on current meter on the alternator output will tell you the alternator current output.  The same clamp-on on the battery will give you an idea of whether the battery is charging or discharging, as you seem to be concerned about.
Knowing current flow is actually better information than knowing battery voltage, but since the lighter circuit probably doesn't have large loads on it, it will provide reasonably accurate voltage measurements.
So in summary, the likely issues are: intermittent alternator (clutch or brushes) and wiring or connector issues.  The best diagnostic tool will be a clamp-on DC current meter.
Comment: Very nice answer!
Comment: Thanks for the detailed explanation. I'll take a look at the wiring first for any apparent sign of improper connection or bad wiring. Unfortunately, this happens so random and I don't have a way to replicate the issue when I want. I did record the video that shows how the voltage reading toggling between 12.6V and ~14V. I hope this can be sufficient to prove the issue to the repair shop.
Comment: Well, you could have a large intermittent load, which pulls down your alternator, and drains the battery momentarily.  Something like all your seat heaters coming on at the same moment.  Just like in medicine, intermittent car problems can challenge the observational abilities of the operators, their systems knowledge and their creativity.
Comment: I've been keeping the loading to minimum when I tested the voltage fluctuation, even with the A/C and headlight turned off. So, I think that should rule out the large intermittent load. This morning when I drove the car for about half an hour, I didn't see the issue. On the other hand, in a short 10min drive yesterday afternoon, I did seen the issues and I recorded that in my phone. Can't find the condition to replicate that.
Comment: Good that you can capture on the phone, and hopefully your shop will pursue.  Some will do better than others.  It helps to have a good shop.  Good luck, and tell us what you find.

Alternator intermittently outputs 12.6V


Entity Framework won't install properly, Enable-Migrations command fails

Question: I am trying to follow this tutorial: https://learn.microsoft.com/en-us/ef/ef6/modeling/code-first/migrations/
I am using Visual Studio 2017 and Net 4.6.1.
Right off the bat, things seem to go wrong. When I use the command Install-Package EntityFramework in the Package Manager Console, I get this warning:

Missing function body in function declaration.
At C:\Users\TC\Documents\Temp\Entity Framework Example\MigrationsDemo\packages\EntityFramework.6.4.0\tools\EntityFramework6.PS2.psm1:241 char:5
  +      <<<< WarnIfOtherEFs 'Enable-Migrations'
  + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
  + FullyQualifiedErrorId : MissingFunctionBody
Import-Module : The module to process 'EntityFramework6.PS2.psm1', listed in field 'ModuleToProcess' of module manifest 'C:\Users\TC\Documents\Temp\Entity Framework Example\MigrationsDemo\packages\EntityFramework.6.4.0\tools\EntityFramework6.PS2.psd1' was not processed because no valid module was found in any module directory.
At C:\Users\TC\Documents\Temp\Entity Framework Example\MigrationsDemo\packages\EntityFramework.6.4.0\tools\init.ps1:11 char:18
  + Import-Module <<<<  (Join-Path $PSScriptRoot 'EntityFramework6.PS2.psd1')
  + CategoryInfo          : ResourceUnavailable: (EntityFramework6.PS2:String) [Import-Module], FileNotFoundException
  + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

If I continue with the tutorial, everything works perfectly until I get to the step where I run Enable-Migrations in the Package Manager Console. That command fails with this error:

The term 'Enable-Migrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:18
  + Enable-Migrations <<<<
  + CategoryInfo          : ObjectNotFound: (Enable-Migrations:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException

Why am I getting this error, and what can I do to fix it?
Edit
I thought it might help to upgrade my development environment, so I switched to Visual Studio 2019 and targeted Net 4.7.2. I continue to get the exact same errors.
Can someone please tell me whether you can recreate the behavior I describe? It would be a big help to my debugging process to know whether the problem is on my end, or whether there is something wrong with EntityFramework which is causing the same errors for everyone.
Edit
Still trying to find a fix, I've been trying older versions of Entity Framework. The current version is 6.4.0 – doesn't work. The previous version is 6.3.0 – doesn't work. The version before that is 6.2.0 – works without a hitch. So, I'm going to start developing my project using 6.2.0. If anyone knows why the newer versions fail, please tell me. I'd like to be on the most recent version.
Answer: I figured out what was wrong. Entity Framework 6.4.0 requires PowerShell 3 or higher. I was getting those errors because I had PowerShell 2. I fixed all my problems by upgrading PowerShell.


Expected value of linear regression coefficient over different probability distributions

Question: For multiple linear regression let $\beta$ be the true value of the coefficient such that $y_{i}=x_{i}^{T}\beta+\epsilon_{i}$ and let $\hat{\beta}$ be the estimated value found through minimizing least square error. Now we know that $E(\hat{\beta})=\beta$ but I am not sure over which probability distribution this expectation is calculated on - is it calculated over the probability distribution of $\hat{\beta}$ ?. How does one find the probability distribution of $\hat{\beta}$ given $\epsilon\sim\mathcal{N}(0,\sigma^{2})$ ? For that matter how does one caluclate the probability distribution of other variables $y,x,\beta$ ? What is the expectation of $\hat{\beta}$ calculated over the probability distribution of $\epsilon$, $E_{\epsilon}(\hat{\beta})$ ?
Comment: I don't see how $E(\hat{\beta})=0$ is correct. If $\beta$ is non zero then surely the expectation of its estimate is non-zero. Also you are dealing with multiple linear regression so $\beta$ is a vector not a scalar.
Comment: Sorry for the error. It should have been $E(\hat{\beta})=\beta$. I understand $\beta$ is random vector but I am not sure how would that change the question
Answer: There is a concept named Asymptotic Normality. In our case means that over high enough number of estimations, the estimators distribution is normal.
Technically this derives: $\hat{\beta} \sim  \mathbf{N}(\beta,  \sigma _{\hat{\beta}}^{2})$.
This PDF explains this nicely.


Run shell script as another user after git hook

Question: I'm trying to execute a shell script that initialize the deployment of a web application after a git push. The shell script must be run as root ( or another user that is not the git user ).
Searching in SO I've found a way to launch a shell script as another user and is working for me when I launch it directly from the terminal:
sudo -u root sh /home/path/to/run.sh

The problem is that when I push to the server, the hook is launching ( I'm making sure that the post-receive program is running ), but the run.sh program is not getting executed, and I don't any way to debug it...
Any clues?, what am I doing wrong?
Answer: # su -m user -c '/path/some_command -with -options /some/other/file'


Should views set model data?

Question: I'm just trying to figure out a probably simple question.
Should views set model data directly or only call model methods that change their own data?
Answer: like everything else in software development, "it depends".
if you're using form inputs in your views and you just need to get the data from those inputs in to the models, set the data directly. You can do this any number of ways, including "change" events from the input fields, like this:
MyView = Backbone.View.extend({
  events: {
    "change #name", "setName"
  },

  setName: function(e){
    var val = $(e.currentTarget).val();
    this.model.set({name: val});
  }
});

On the other hand, if you're kicking off business logic and other code that happens to set the data in the model (but really only does this as part of the business logic), then you should call a method on the model.
A "state machine" would be a good example of when you would do this. Or, in an image gallery that I wrote, I had some logic around the selection of an image for display. If an image is already selected, don't select it again. I put this logic in a method on my image model:
Image = Backbone.Model.extend({
  select: function(){
    if (!this.get("selected")){
      this.set({selected: true});
    }
  }
});

As illustrated here, I like to run by the simple rule that if I have zero logic around the call to set, then I set it directly from wherever I am. If there is any logic related to the model, around the set, then I put it in the model.
Either way, when you do want to set data, you should use the set method. Bypassing this and setting the model's attributes directly through model.attributes will prevent a lot of Backbone's code from firing and potentially cause problems for you.
Answer: That depends on your programming style. I always set them directly. If the Law of Demeter sounds good to you and you're into object orientation (and possibly with a Java/Microsoft -stack background), then the style would be to create getter/setter methods.
If you on the other hand is in the "Size is the Enemy" camp (I also recommend Jeff Atwood's comments) the you certainly should set model data directly (as I hinted before, I'm in this camp myself).
That being said, Backbone.js models already have getter and setter methods .get and .set. You should not manipulate the .attributes member directly. I'm not as sure you shouldn't read from it, I tend to do that now and then and haven't run problems because of that yet.

Should views set model data?


How to make a shared partition between dual-booted Windows 7 and Ubuntu?

Question: I have a lot of files that I would like to access from both of my dual-booted OS's. How do I make a shared folder? Is there a simpler method? (Like some kind of a shared folder, although I doubt that because of different filesystem formats and all that...)
Answer: You should create and NTFS partition and set up it to mount automatically on ubuntu start.
You can edit the file /etc/fstab and include a line like this:
/dev/sda10 /media/Winbugs7/ ntfs-3g defaults,user,rw    0   0

Where /dev/sda10 is the partition and /media/Winbugs7 is the (existing!) directory where the partition will be mounted.
More reading at https://help.ubuntu.com/community/MountingWindowsPartitions
Answer: You just create seperated partition in NTFS format..you can easily access that from both ubuntu and windows.
Answer: While Ubuntu will automatically mount your windows NTFS partition so you can access the windows drive from Ubuntu. You can install Ext2Fsd on your windows install and that will allow you to access the ubuntu ext3/ext4 partition from windows explorer.
If you don't want any extra software on your windows install to do this. You could either create a new NTFS partition as @aleo0317 has already answered or you can create a folder in your windows NTFS Partition that is already mounted. Why create a whole new partition when you have one for windows that can be accessed by both OS's.
Cheers I hope this helps.


When to sell option if the stock is not moving in the right direction?

Question: Is there a rule of thumb on when to exit to use to close (sell) an option if the stock is not going in the right direction? For example, a call option contract is made on a stock which expires in a month, but the price dropped after a week to 25%. Should you wait for the option to expire or close it immediately to stop further loss?
Comment: If anyone knew the answer to your question of when to best exit, they'd be rich.  The future is unknown.  You have to keep in mind that the option is a wasting asset whose decay rate is increasing every day as it rolls toward expiration.  Figure out how much you're willing to lose and get out if you get there.
Comment: @Mattman944 - For only $1,999, I can show you how to lose far less than $100k when you begin trading options :->) . Seriously, losing $100k as option trading tuition is rather hyperbolic.  There are a number of conservative ways to utilize options, some reducing risk.
Comment: If you need to ask this question, then you are probably aren't ready for Options. Someone once told me: expect to lose $100k before you start to fully understand and make money with Options. I am sure that not everyone suffers through this, but it is a good warning for the newcomer. This is not for the faint of heart.
Comment: @Mattman944 I think a person with a low capital like $1000 (not $100K) can buy and sell options and make a profit. That is less risky than investing $100K in the underlying stock and lose all the money. But, after reading all the answers for my own questions here, option trading is complex due to a lot of mathematical calculations based on the time go into the price. It is **active** which means you can't leave like an investment and wait for it to go up.
Comment: @Mattman944 I met a TV cable service man who told me that he buys and sells options for $500 and make a small profit. I met another college student who pays his college fees by buying and selling options. They have a very low capital.
Comment: @Mattman944 Most of the trading platforms provide a **mock trading platform** where you can trade without any money. There is no need to put $100K into a brokerage account and lose them all.
Answer: Let's say you buy a stock and it soon drops 25%. Is it best to sell it to stop further losses, or will it go back up? Just like in your scenario, there is no magic strategy that is always correct, as the market is unpredictable.
However, with options, you also need to worry about time until expiration. So, since you still have approx 3/4 of the original time left, if you believe the stock could still rally, maybe you could hold out a bit longer. Or, you might think it will keep going lower or stay the same, in which case you probably want to get rid of it. But that is really just speculation and you'll never know for sure.
When buying options, you are most likely already at a disadvantage when it comes to probability of success. The further the underlying goes in the wrong direction, the further your probability of success decreases. Look at the odds, and make the call whether or not the current risk is worth the reward. Nobody else can tell you what is appropriate for your exact situation.


Individual account access control

Question: There might be a thread already with sililar question.- I am very new to drupal and looking for a module which will allow access to a user to their individual account. They should be able to see only their data and nothing else.They should not be able to manipulate site. This shouls be done just by email verification. I noticed that admin can grant access of a user after account creation but I am looking something smooth where anyone who creates account should see only their dat and later admin can change access level.
Can anyone help me here.
Comment: I think you can achieve all of this "out of the box" with Drupal only, what exactly is the problem?
Answer: Drupal has only a very course access control structure for viewing content.  For the uthenticated use role, you can set permission to 'access content' (Drupal 6) or 'view published content' (Drupal 7), but that's about it.
For more fine-grained access control, you need a node access control module.  There is a page at the Drupal.org wiki giving an overview of node access modules.  You may start by reading that and try to find a suitable module.
One particular module, named Flexi access, allows you to create access control lists consisting of a single user.  This may be what you're looking for.
Disclosure: I am the maintainer of Flexi access.

Individual account access control


Blue flashing light

Question: My 2017 Honda HR-V has a blue flashing light on the arm of the rearview mirror. It started flashing after I locked and left the car tonight. Why? Is this going to run the battery down?
Answer: I found people asking the same question on a few different sites, these are the answers they came up with:

It's a power indicator for a dashcam.
It's an indicator that the alarm is active.
It's a light sensor that the car uses to dim the reflections in the rear view mirror when driving in the dark.

Blue flashing light


How can I calculate the power needed to increase/decrease the temperature of an object by x degrees when using a Peltier module?

Question: I am working on a cooling system using 4 Peltier modules. I would like to somehow determine the power I need to reduce the temperature of the object attached to the Peltier module by x degrees Celsius. I would like to compare this data with the amount of energy I need to cool the system.
The data that I currently have are: Qmax, delta Tmax, Imax, Vmax, and module resistance.
Are there any formulas that I can use to find out the power needed to run the Peltier module to reduce the temperature by x degrees?
Comment: How much heat power is flowing into the item you wish to cool?
Comment: You need to know the mass of the object and the effective specific heat of the material. Are you heating/cooling a teaspoon of water or a gallon of oil? To move a degree will not take the same amount of energy.
Comment: Are you asking about energy needed to cool something x degrees, or the power needed to keep it there? Or maybe the power needed to cool in a certain amount of time?
Answer: No, because you're missing one of the most important parameters, and that's the thermal resistance of the object you're cooling.
If the object is superbly well insulated, say in a vacuum with metalised Mylar heat shields, then it will leak practically no heat, and you can use the Peltier module graphs of power versus temperature at zero heat flow.
If the object is less well insulated, and in order of goodness you might have polyurethane insulation, polystyrene insulation, wood or paper, in the open air, or bolted to a heatsink, then your Peltiers will need to remove a significant amount of heat from the object, and you'll have to use those power/temperature graphs at a higher heat flow.


Does the NVIDIA Quadro FX 5600 1.5 GB. meet Blender 2.8 minimum system requirements?

Question: I have a NVIDIA GeForce 8800 GT 512 MB witch runs problem less Blender 2.7, but as much as I tried to run Blender 2.8, it does not work.
I have considered to buy an NVIDIA Quadro FX 5600 1.5 GB. but I need to be sure that it runs Blender 2.8.
Has anyone tried it out?
I hope to get an answer soon
Answer: I'm not sure about that specific card but it should work even if it is legacy (cycles GPU compute may not work Eevee will still work). I have a  Quadro 2000 and blender works fine on mine (for most work loads). After looking at comparisons between the 2 the Quadro FX 5600 is better than mine therefore it should work with blender.
Graphics support
Comment: Thanks a lot for being that fast, but I forgot to mention that I would use it on Mac (Mac pro early 2008) do you think it will still work
Comment: Here are some threads most say basically if you buy the mac compatible version It should be fine but check I'm not sure. https://discussions.apple.com/thread/6679157 https://forums.appleinsider.com/discussion/81477/nvidia-quadro-fx-5600-inside-macpro


Aggressive behavior

Question: When I come home from vacation, she squeals and barks aggressively and runs around. I can't ' tell if she if over excited or angry. She won't allow me to pick her up.
Comment: Welcome to Pets.SE! It might help people answer your question if you provide us some more details about your dog such as Breed, Age and anything else that might be important here :)
Answer: Dog?  Sounds like she is very happy to see you again, and maybe scolding you for being away so long.  Sounds just like a Bichon I used to own.
If you don't want to encourage it, turn your back on her.  Don't interact with her until she calms down.  Do reward her, by greeting her on your own terms, as soon as she brings it down to a level you can deal with.

She won't allow me to pick her up

So don't.  Most small dogs don't enjoy being scooped up off the ground even if many of them will tolerate it.  I always tell mine what's coming, "I'm going to pick you up."  That way, it's not a total surprise.  Now he usually will climb into my arms on his own when I bend down and say that.
Comment: This is a good answer, why did you delete it?

Aggressive behavior


2d Animation Stuck on First Frame during playback

Question: I'm new to blender and can't figure out how to solve this.
I've been working on an animation for a couple days in greasepencil with audio. Everything was going ok but I'm not sure what button/setting I pressed, but now when I play my animation it only shows the very first frame of my project. the audio plays as normal, but all that shows is the first frame. Even when I drag the blue bar across my project, no other frames/keys appear, almost like there's nothing else, even though all the keys are clearly still in the timeline.
The only way I can view the other frames that I've found is to delete my first frame. then the second frame appears, but its the same issue with it not changing to show the other frames when played/skimmed.
Another problem I'm having is that when I draw a new stroke, a key no longer appears automatically.
I worked really hard on my project so far and I really hope someone can help. I couldn't find anything online, I would appreciate any help!
Answer: You may have accidentally hit a little checkbox in your timeline. Do all boxes have a check in them (see picture)?  it causes the frame you turned it off at to be held on for that layer (also autokeyframe stops).


What will happen if I delete all my attachment type posts from database?

Question: OK maybe I'm a bit hysterical about performance, but I don't see any reason to have more than double the post entries I need in my database.
I mean every image automatically creates an attachment type post. In my case this means that although my "real" posts are 500, I have like 1500 post entries in my database, most of them being "attachment" posts. Will anything bad happen if I manually delete these attachment post entries (not the actual images) from my database?
Comment: Those "extra" posts are going to have basically no effect on your performance whatsoever.
Answer: Deleting the attachment post columns will potentially affect WordPress recognising that the images exist - they'll still be stored in your /uploads/ directory, but may be unavailable for use within core WordPress functions.
Answer: WordPress categorizes every upload as an attachment post-type which is built into your install by default in a similar manner as Pages, Posts, or Comments. If you delete row upon rows of attachment post types in your database you will lose availability to these in the Media Module ( Add Media button ) and won't be able to edit the information ( title, alt, caption ), permanently delete, or attach the files onto additional posts. It will forever be lost in your /uploads/ folder with only a link in your post ( If you attached your file to a post ).
Imagine down the line your website is up and running for 10+ years and you want to go through and remove any old and unused media from your website and server. This can be easily done from the admin panel since WordPress knows ( using the database ) what files are attached to where by using post_parent. If you remove this database link you've orphaned your files onto your server and will need to reverse engineer what files are connected to what posts or if they're connected to a post. You would spend years making charts and graphs stringing together what goes where and if you'll need it again eventually spiraling into madness.
In short, it's very unwise to delete these from the database and not get rid of them on the website. MySQL is extremely powerful and unless you have mountains of images and millions of rows then the actual speedboost you get from deleting these rows would probably be minimal.
TL;DR Stop it, don't!
Answer: You will basically kill anything related to the media library and many many other features.


connected linear algebraic group over the algebraic closure of a field

Question: Let $G$ be a connected linear algebraic group over a field $k$ of characteristic 0. A paper I'm reading seems to imply that $\overline{G}:= G \times_k \overline{k}$ will also be connected, but I don't see how this is true.
Can anyone help?
Comment: The Galois group of $k$ permutes the connected components of $\bar G$ but leaves invariant the identity element.
Answer: Here is a nice fact, which implies your question:

Theorem: Let $X/k$ be a finite type $k$-scheme. Assume that $X$ is connected and has a $k$-point. Then, $X$ is geometrically connected.

Proof: It suffices to show that for all finite extesnsions $K/k$ that $X_K$ is connected (why?). To do this, note that we have the following, definitional, fiber diagram
$$\begin{matrix}X_K & \to & X\\ \downarrow & & \downarrow\\ \text{Spec}(K) & \to & \text{Spec}(k)\end{matrix}$$
Now, since $\text{Spec}(K)\to\text{Spec}(k)$ is both finite and flat, so is $X_K\to X$. But, flatness (together with finite type) implies that $X_K$ is open, and finiteness implies that $X_K\to X$ is closed.
Now, let $C\subseteq X_K$ be a component of $X_K$. Since $X_K$ is Noetherian, we know that this component is clopen (since there are finitely many suchcomponents). Thus, since $X_K\to X$ is both closed and open, we have that the image is also clopen. Since $X$ was assumed to be connected, this implies that the image of $C$ is everything. Thus, all connected components of $X_K$ surject onto $X$.
But, let $p\in X(k)$ be the $k$-point we assumed $X$ had. Then, the fiber $(X_K)_p)$ of $p$ under the map $X_K\to X$ sits in the following fibered diagram
$$\begin{matrix}(X_K)_p & \to & X_K & \to & \text{Spec}(K)\\ \downarrow & & \downarrow & & \downarrow\\ \text{Spec}(k) & \to & X & \to & \text{Spec}(k) \end{matrix}$$
and so, in particular, $(X_K)_p$ is $\text{Spec}(K\otimes_k k)=\text{Spec}(K)$, and thus $(X_K)_p$ is a point.
Remark: intuitively this just says that since base-changing to $K$ should just break apart points identified when all we can see is $k$, the $k$-point, which can't be broken apart in this manner, stays the same.
But, we said that all connected components of $X_K$ must contain $(X_K)_p$. And, since connected components are disjoint, this implies that $X_K$ has only one connected component, and thus is connected. $\blacksquare$
Now, since every algebraic group over a field has a $k$-point by definition, the above tells us that all connected algebraic groups are geometrically connected. Also note that there was no need to assume characteristic $0$ in the above.