How do you make the flap t sound as in the words city and letter

Question: I'm having a hard time figuring out the right placement and motions of the tongue when making this consonant. I watched a few videos on this topic. People say that in order to make the sound you don't want to be touching the roof of your mouth too much but you have to lightly bounce the tip of your tongue against the roof of the mouth. I have no idea how to do this. I tried doing it and I either touch the roof of the mouth too hardly and it sounds heavy and unclear or in effort to touch lightly, I end up accidentally pulling my tongue away and it doesn't even reach the place that it should. I would be really grateful for an explanation of what is that that tongue is doing when you make this sound. Thank you for the answers in advance!
Comment: Would it help to think of replacing it with a "d" sound? The difference between "ladder" and "latter" in American English is _almost_ imperceptible even to native speakers, so if you can make that "d" sound you've basically got it made.
Comment: The way I hear it, the "t" in "letter", "city", "pretty", etc. (mid-word) is the same as the initial "t" ("temporary", "towel",...) but in the middle of the word, the "t" doesn't get such a powerful puff of air with it, so it sounds a lot more like a "d" (but not strongly voiced either, as an initial "d" would be ["dying", "dummy",...]). Try experimenting with speaking a "d" (like "ledder" or "ciddy"), but speak the words quickly without dwelling too long on that consonant, ... and see what it sounds like.
Answer: The mouth motion in "better" or [ˈbeɾɐ] is called an "Alveolar tap" or an "Alveolar flap", as there are two different ways of producing the same sound.
The "Alveolar tap" approach involves briefly tapping the tongue against the gums just behind the upper front teeth, combined with a slight outward puff of air.

This diagram helps visualize the position of the tongue during the tap, if you are pressing your tongue and then releasing it, you are doing two motions instead of the single desired tapping motion.
The end result should be a sound that in many foreign languages is easily confused with the foreign language's 'r' sound.
The "d" sound is similar but generally doesn't tap the gums, the tongue often touches the upper teeth and is held until longer instead of being a single tapping motion.
Comment: Is this really right? The way I (native speaker) make those sounds ("d" and "t"), the tongue is in exactly the same position for both, and it is the puff of air that is different, explosively forcing the tip of the tongue away from its resting place in a "t", but gently pushing/squeezing it away in the (voiced) "d". No one has ever told me I am speaking incorrectly, or sent me into speech therapy during elementary school.
Comment: This tongue placement is not correct of English /t/, /d/ or /ɾ/ . The tongue touches only the alveolar ridge. It does not touch the teeth for these sounds, as it does, say, in French and Spanish. Also, this question is about the alveolar flap sound /ɾ/, not /t/ or /d/.
Comment: @gotube If you can find some sort of equivalent instruction, please provide a link and I'll gladly update the answer.
Comment: @EdwinBuck This page has enough info: [alveolar flap](https://en.wikipedia.org/wiki/Voiced_dental_and_alveolar_taps_and_flaps#Voiced_alveolar_tap_and_flap)


Thermal energy in a nuclear power plant

Question: In a nuclear power plant, does the fission reaction itself produce thermal energy? Or, does the energy of fission reaction mainly come in the form of the kinetic energy of daughter nuclei and free neutrons, and the kinetic energy of free neutrons is transformed into thermal energy as it passes through the moderator?
Comment: What do you think is the difference between "thermal energy" and the kinetic energy of daughters and neutrons? According to Sears book on thermodynamics, there isn't a separate "thermal energy."
Comment: @BillN That's true: temperature is a measure of the mean kinetic energy of a collection of particles (measured in the collection's rest frame), an individual particle doesn't really have a temperature, just kinetic energy & momentum (relative to some frame). We say a collection has some specific temperature when the collection has achieved thermodynamic equilibrium, as discussed here: https://physics.stackexchange.com/q/294813/123208
Answer: The energy from a uranium fission reactor is mostly due to the kinetic energy of the fission fragments. There's also the kinetic energy of the neutrons, and the various particles emitted by the uranium, the fission fragments, and the isotopes produced by the natural decay chain of the uranium (i.e., when the uranium decays via alpha emission, rather than through fission). There are some photons produced as well, but they aren't blackbody thermal photons, they're gamma rays. And just like the other particles, their kinetic energy gets converted to heat through colliding with the material in the reactor.
Here's a breakdown of typical reactor energies, courtesy of Wikipedia:

Source
Average energy released (MeV)

Instantaneously released energy

Kinetic energy of fission fragments
169.1

Kinetic energy of prompt neutrons
  4.8

Energy carried by prompt γ-rays
  7.0

Energy from decaying fission products

Energy of β− particles
  6.5

Energy of delayed γ-rays
  6.3

Energy released when those prompt neutrons which don't (re)produce fission are captured
  8.8

Total energy converted into heat in an operating thermal nuclear reactor
202.5

Energy of anti-neutrinos
  8.8

Sum
211.3

The gamma rays carry about 6.3% of the total energy produced.
Note that virtually all of the energy carried by the anti-neutrinos is lost, since they have a very small probability of interacting with any of the matter in the reactor.
Also note that the table doesn't bother listing the energy carried by alpha particles, because it's quite small, which is consistent with the long half-life of the alpha emission processes in a uranium reactor. In a plutonium reactor, such emissions are more significant, especially from the isotopes with shorter half-lives, eg plutonium-238.
Comment: excellent, +1.  -NN
Answer: As you correctly point out, the reaction of fission itself does not produce thermal energy. Instead, thermal energy is produced when the high kinetic energy of the reaction products (daughter nuclei and free neutrons, along with some radiation) is dissipated into the medium after several collisions.
There is indeed a close connection between kinetic energy and thermal energy. Kinetic energy is a "microscopic" quantity carried by individual particles, while thermal energy is a "macroscopic" quantity, which is -loosely- defined by averaging the kinetic energies of a lot of constituents
Comment: What you call thermal energy is also known as internal energy.
Comment: That's true; I called that thermal energy as it was called this way in the question

Thermal energy in a nuclear power plant


Can only feel clavicular head (upper chest) working out during inclined pushups

Question: Are inclined pushups good for the whole chest or it only targets upper chest?
Comment: I think what you mean is decline pushups.  Incline means that your feet are lower than your head, and decline is where your feet are raised above your head.
Answer: Every chest exercise works the whole chest, but some exercises work more upper than lower. Incline push-ups tend to work more on the lower chest, and decline push-ups tend to target the upper chest. It's generally a good idea to do an equal amount of incline and decline exercises to prevent any possible imbalances over the long term.
Comment: More like excessive pec major (upper chest) development and less pec minor (lower chest) development, or vice versa. It's not something you have to worry about too much, as this generally happens only when your training plan is very imbalanced.
Comment: What sort of imbalances can you get by doing just one?  Something like more pecs, and less abs?


Winforms ConnectionString and TeamCity

Question:
We are starting a new WinForms project and decided to use TeamCity to create builds and run unit and integration tests. The project deals with database. We have 3 databases (developDB (this is used by developers while developing =) ), testDB (this is used by teamcity to run tests) and productionDB(this is used by client)). TeamCity has 3 buildConfiguration. The first is triggered when commit happens. The second is triggered every night to run integration tests. And the third is triggered by developer when we what to make a release. So I want TeamCity to be able to change connectionString depending on what kind of build happens. Also I don't want to store connectionString in app.config (I don't want client to know the user and password). What options are available to perform the task?
Thanks in advance!
Updated
I use NHibernate and FluentNHibernate to connect to databases if it matters.
Answer: I have not used TeamCity, but I have written multiple applications with dynamically changing ConnectionStrings during logon process (ie. at runtime), and It's quite simple.
You didn't tell how do you connect to your Database. Since you mention app.config, I suppose it is ADO.NET DataSets or simmilar technology, which creates a read-only(getter) ConnectionString in your Settings.Designer.cs / app.config.
What I did, was to create a setter method in Settings.cs (not Settings.Designer.cs) for the ConnectionString property like this:
<code>public void setNorthwindConnectionString(String value) {
    this["NorthwindConnectionString"] = value;
}
</code>
My generated DataSet  then uses this NorthwindConnectionString for accessing data.
You can use preprocessor directives for conditional setup of your ConnectionString:
<code>#if DEBUG
    Console.WriteLine("Mode=Debug");
    Settings.Default.setNorthwindConnectionString("(DebugDBConnectionString)");
#else
    Console.WriteLine("Mode=Release");
    Settings.Default.setNorthwindConnectionString("(ReleaseDBConnectionString)");
#endif
</code>
You could also encrypt your connection strings, and copy the right app.config during post build event.
Answer: In this situation, I would use TeamCity to run a nant script to perform the build.
NAnt allows you to modify config file values (such as your connection string) at build time.
An example of using TeamCity/NAnt to deploy to different staging environments can be found at this blog post:
http://thecodedecanter.wordpress.com/2010/03/25/one-click-website-deployment-using-teamcity-nant-git-and-powershell/
As @surfen suggests, the connection string values for each environment should be encrypted to prevent credentials from being stored in plain text.
Comment: Downvoter - please add a comment to explain why you've down voted the accepted answer?
Answer: I am assuming you would be using msbuild to build your projects in Team city. If that is the case, then you can send the Conditional Compilation Symbol where in you can pass what ever symbols you need.
Once you have the symols, you can do things like:
<code>#if DEVBUILD
//.... Your Connection String Code here
#endif

#if INTBUILD
.... Your Connection String Code here
#endif
</code>
That's the answer to your frst question.
Looking at the second part of your question, where in you do not want to store the user name & password in the app.config,
Options:

try intergrated security, it will use your domain account
if option cannot be used, try keeping your connection string as a Registry Key, so that its not obvious or an Environment variable.

Winforms ConnectionString and TeamCity


Windows 7 don't use VPN connection

Question: I have a Windows 7 computer connected to a VPN (PPTP). This VPN is only being used to access a remote server, and is quite slow. So, I'd like to browse the internet directly, not over the VPN. On OS X, this is accomplished by unchecking the "Send all traffic over VPN" box, but I can't find a similar option in Windows. Long story short, how do I make it so only traffic bound for the VPNs address block is routed through the VPN?
Comment: It should do this already...? Just as OSX does. The tick box on OSX is unchecked by default so it, too, determines if traffic is bound for the VPN and traffic not bound for it is directed away from the VPN.
Comment: It seems as though all traffic is directed over the VPN by default on Windoze, and I can't find a way to change that. Evidenced by directing my browser to any one of those dumpy "whats my IP" sites, with it showing the IP of the VPN server.
Answer: The whole idea here is very simple. You need to set up your VPN not as the default gateway and below is how you can go about that. Go to your network connections >> VPN connection >> Networking, Advanced and uncheck Use default gateway on remote network. You should be done right there..
Source : http://www.thekonsulthub.com/how-tos/how-to-surf-using-default-windows-connection-even-with-vpn-installed/

Windows 7 don't use VPN connection


Increase in rates over time

Question: I am looking for an appropriate method to analyse these data/situation: We sell electronic devices. Customers are encouraged to report defective devices. Around every months we calculate the cumulative rate of {defective_devices}/{all_sold_devices}. I would like to monitor for sharp increases in the rates of defectives; for example if I calculate the cumulative rates each months from 1 to 5 I will have 0.3, 0.55, 0.4, 0.78, 0.85... it appears that the slope of the curve sharply increases at 0.78 onwards. What statistical methods can I use to determine that the slope significantly increases by a certain predetermined value? I'm also worried about the arbitrary selection of monitoring every month, why not every week or even every day? How does one determine what is the proper monitoring period?
Answer: Rather than rates , you should be modelling the number of complaints as a function of the number sold perhaps including previous sales as complaints might have some time dependency. One needs to possibly identify level shifts and/or trends in the number of complaints. Seasonal structure might also have to be identified as that could be a source of variation. If you are using daily data, there could be a holiday effect. Care should be taken not to be blind-sided by unusual values when constructing your model. In this way you will be able to predict and then to detect when things have chnaged. The tools that you are after might be available to you while searching for "automatic transfer function intervention detection" . Rates are used when one doesn't know how to model the observed two variables. Forecasts can always be turned into rates if that is useful to you but one doesn't start with rates as you have effectively collapsed two columns of data into one, with resultant loss of information.
Comment: I think we are on the same wavelength.  I also think that interval rates throw out too much information.  But I approach the time dependence through survival analysis.  Right censoring could be an issue that you don't uncover through time series analysis. The big issue from my experience is underreporting which I think can only be remedied by sampling (tracking very closely a random sample of the items).  How large a sample to use is a cost versus estimation quality tradeoff.
Comment: @MichaelChernick underreporting is generally a problem but if you assume that it is rather constant over time then looking for shifts in trends/rates of reporting would not be affected by underreporting.
Comment: @francogrex We have a different perspective I guess. We want to know the reliability of our product as best as we can.  This is both for our product performance reports that are used by the sales people to get the physicians to use our products over our big competitor.  I worked at St Jude Medical whose rival in Minneapolis was/is Medtronic.  Also postmarket surveillance is very important to the FDA.  Basically absolute performance was the key for us and not just some measure of relative performance.
Answer: We had a similar problem when I worked in the medical device industry. We wanted to determine the reliability of our product in my case a pacemaker.  Physicians were encouraged to report failures that are detected when they explant the device.  Most failure are battery depletions but other modes of failure occur.  We used the Kaplan-Meier estimate of time to failure as our performance measure perhaps focussing on its value at 5 years post implant.  Reports are coming in continuously.  So we don't have the problem of picking arbitrary intervals.  This is a different approach to the same problem but it does have valid statistical methods for characterizing the failure time distribution. A parametric approach which would involve say fitting a Weibull distribution to the reporting data would provide you with a function that describes how the failure rate increases or decreases with time given the estimated parameters.
But the real underlying problem we had and you might as well is underreporting.  Although the physicians are supposed to report the failures back to the manufacturer or better yet return the explanted device to the manufacturers so that the manufacturer's engineers can diagnose the failure they don't always to it.  Underreporting rates were thought to be as high as 30%.  You can have a very large bias (estimating that your failure rate is lower than it is in reality at any given time since implant).
The FDA had a plan for postmarket surveillance that would adjust for this bias based on independent detailed tracking of a random sample of the implants. I published a paper in the DIA Journal that showed that the adjustment depended heavily on some assumptions and overcorrection was possible.  However in principle a statistical methodology for this would be to fit a parametric survival curve and adjust the parameter estimates based on random sampling the devices.

Increase in rates over time


Parasitic plant concept/other parasite

Question: I believe there are precious few questions relating to the concept in general, but I was wondering if the concept of an organism absorbing large amounts of CO2 from blood seemed reasonably plausible?  This question also could relate to the plausibility of nanorobots (which could be powered by CO2 in theory).  What if such a parasitic creature was able to form some structure, like a mini organ that help it suck up CO2?
Comment: CO2 cannot generate energ because it cannot be further oxydized.
Comment: In order for the organism to be "parasitical", it would have to cause harm to the host. Simply taking CO2, a byproduct of human metabolism, does not make that organism a parasite.
Comment: C02 could easily be absorbed from blood in the veins using diffusion.
Comment: @Tom - How crucial are the 'parasitic' aspect and the 'CO2 for energy' concept to your question? As some have correctly pointed out, this is a bit of a misconception. If you are more interested in exploring the idea of a *symbiont* extracting CO2 from a human (for some purpose, not necessarily for energy generation), maybe change this question to reflect this?
Comment: Besides @L.Dutch's comment, this sounds quite suspiciously like many fungi.
Comment: Aren't there methane producing bacteria that use CO2?  Also plants breathe CO2, right?
Comment: @Tom, in a very simplified version: plants use CO2 and solar energy to produce sugar. Then the sugar is used as energy source. Methane producing bacteria use organic matter as input, not CO2.
Comment: this could be parasitic if the organism takes up CO2 to the point of suppressing the hypercarbic drive in humans.  This would mimic the symptoms of late stage emphysema.  There are two things that drive breathing in humans.  First is the hypercarbic drive which seeks to increase the ph in blood by getting rid of CO2.  The second, weaker drive is the hypoxic drive.
Answer: Strictly speaking such an organism would be a symbiont and not a parasite.
Unfortunately CO2 is quite low in energy so using it for "fuel" (either by an organism or by nanorobots) is problematic.
Plants actually use CO2, but they need to add energy to it in order to produce sugar+oxygen (plants actually breathe Oxygen and produce CO2, but photosynthesis is predominant, at least in daytime).
If You want to speculate about such a symbiote then You can think about something residing on (or in) the skin and using light to produce Oxygen from Carbon Dioxide and, perhaps also shielding from harmful radiation (ultraviolet and up).
Answer: Here are the variables:
CO2 is not an energy source:
As ZeoByte mentioned CO2 cannot be used for energy, this is why plants need sunlight. They convert the easily found CO2 into sugar which is an energy source they burn at night or when they need to.
Parasite or Symbiote?:
Parasites harm their hosts usually by taking something they need without giving anything of equivalence in return or cause collateral damage to their host. Symbiotes form a mutually beneficial relationship with their host. Example: a clown fish living in a anemone. The clown fish gets protection while the anemone gets bait to lure in potential food, that's a symbiotic relationship.
With that out of the way we can focus on the mechanics:
Could a symbiote invade the human body and extract CO2 from the blood? yes;
The immune system:
The biggest challenge in this is the immune system which would react to kill any foreign organism or end up killing the host in overreaction (ie a fever > 108 degrees). Though, there are plenty of parasytic adaptations evolved to prevent this from happening.
The organism:
Needs a way to control its growth, if it grows in the wrong place it could impede important biological functions [constricting the heart, causing strokes or heart attacks etc.].
The Energy:
The organism would need to get energy in order to convert the CO2. It could get this from sunlight on the skin or it could get a fair amount from body heat. Note: it wouldn't necessarily turn skin green, not all photosynthetic organisms are green.
Could it form its own organ in the host? : yes and no, It would need evolutional help from the host to truly develop an efficient symbiotic organelle. Fortunately, our own intestines are a prime example of this very concept. Could it create one? sort of, it could evolutionarily know where to burrow in the body so as to not spread or grow into vital spots. There are parasites that avoid aggressive intrusion however there are plenty that love to explore.
Finally Nanorobots:
No, this is madness. Just as plants can't be powered by CO2  nor could nanorobots. Nanorobots could be solar powered like plants but will never be CO2 powered. Nanorobots could extract the "C"arbon from CO2 to make strong carbon structures but that would be the extent of their efficient O2 production.
And no there arent few questions on this subject. Plenty of scientists are exploring this and hundreds of other angles on this. It wouldn't surprise me if in 20-100 years we have biological or synthetic nano-micro machine capable of building structures from air and sunlight. Well maybe 200.
Answer: Consider cancer.
If your parasite is coming from the outside, there's a big fat chance that it will trigger immune system. Best chance that its cells come from modifying existing somatic cell (probably skin is the best, like ZioByte answer) into a mini-organ (a green swelling in the skin, with mutated chlorophyll).
Maybe in your world there is not enough sunlight to supply the energy needed for photosynthesis, so this plant evolved to live inside its host, taking the heat to perform photosynthesis.
The problem is, because heat is available 24/7, then it proceeds to absorb body heat until the host suffer from hypothermia, and finally die.
This is not really plausible, but may provide a way how this plant can be parasitic although it consumes CO2 (which is beneficial).
Comment: hypothermia may be beneficial, depending on climate (think about rainforest, where normal cooling mechanisms are not really efficient). It is "fortunate" caption of CO2 happens together with release of O2, otherwise we could have heavy syncope problems. Our urge to breathe is *not* connected with lack of Oxygen, but with excess of CO2 in the blood stream; if something keeps removing CO2 (without adding O2) we could literally "forget" to breathe till we get syncope and die from hypoxia.

Parasitic plant concept/other parasite


Limit involving an integral

Question: Let $f$ and $\varphi$ be continuous real valued functions on $\mathbb{R}$. Suppose $\varphi(x)=0$ for $|x|>5$ and that $\int_{\mathbb{R}}\varphi(x)\mathbb{d}x=1$. Show that
$$\lim_{h\to 0}\left[\frac{1}{h}\int_{\mathbb{R}}f(x-y)\varphi\left(\frac{y}{h}\right)\mathbb{d}y\right]=f(x).$$
I don't know how to proceed. Please help.
Answer: Note that $\varphi(y/h) = 0$ for $|y/h|>5$, so we don't need to integrate over the entire real line.
$$
\lim_{h\to 0}\frac{1}{h}\int_{-5h}^{5h}f(x-y)\varphi(y/h)\mathbb{d}y
$$
define $\xi=y/h$.
$$
\lim_{h\to 0}\frac{1}{h}\int_{-5}^{5}f(x-h\xi)\varphi(\xi)\mathbb{d}(\xi h)
$$
$$
\mathbb{d}(h\xi)=h\mathbb{d}\xi
$$
$$
\lim_{h\to 0}\int_{-5}^{5}f(x-h\xi)\varphi(\xi)\mathbb{d}\xi
$$
$\xi$ is finite over the integration interval, so we can now apply the limit.
$$
\int_{-5}^{5}f(x-0\xi)\varphi(\xi)\mathbb{d}\xi=f(x)\int_{-5}^{5}\varphi(\xi)\mathbb{d}\xi
$$
but
$$
\int_{-5}^{5}\varphi(\xi)\mathbb{d}\xi=1
$$
as $\varphi(\xi)$ vanishes when $|\xi|>5$ and as stated at the beginning of the problem $\int_{\mathbb{R}}\varphi(\xi)\mathbb{d}\xi=1$
Comment: What fact or Theorem are you using exactly to take the limit inside the integral?
Comment: That $f$ is continuous. The integral will be a continuous function of $h$. Given continuity, to take the limit, I simply plug in $h=0$. I don't know a name for this, but I'm sure that someone else would be able to tell you the specifics.
Answer: Hint. The given limit is equivalent to
$$\lim_{h\to 0^+}\frac{1}{h}\int_{-5h}^{5h}(f(x-y)-f(x))\varphi\left(\frac{y}{h}\right)dy=\lim_{h\to 0^+}\int_{-5}^{5}(f(x-th)-f(x))\varphi\left(t\right)dt=0$$
Then use the fact that $\varphi$ is bounded in $[-5,5]$ and $f$ is uniformly continuous in $[x-6,x+6]$.
Answer: If you do the substitution $y=ht$ and $dy=h\,dt$, then you get$$\frac1h\int_{\mathbb R}f(x-y)\varphi\left(\frac yh\right)\,dy=\int_{\mathbb R}f(x-ht)\varphi(t)\,dt$$On the other hand,\begin{align*}\int_{\mathbb R}f(x-ht)\varphi(t)\,dt-f(x)&=\int_{\mathbb R}\bigl(f(x-ht)-f(x)\bigr)\varphi(t)\,dt\\&=\int_{-5}^5\bigl(f(x-ht)-f(x)\bigr)\varphi(t)\,dt.\end{align*}In order to prove that the limit of this integral at $0$ is $0$, it will be enough to use the fact that $f$ is uniformly continuous on some interval larger than $[-5,5]$ (take $[-6,6]$, for instance), together with the fact that $\int_{\mathbb R}\varphi=1$.

Limit involving an integral


Analytic families of compact self-adjoint operators: eigenvalue extension

Question: Suppose that $A(t), t \in \mathbb{R}$, is an analytic family of compact self-adjoint operators on a Hilbert space.  The Kato-Rellich theorem says that every non-zero eigenvalue of $A(t)$ splits into one or more analytic eigenvalue functions $\lambda(t)$.  These eigenvalue functions can be extended analytically as long as $\lambda(t) \ne 0$.  Kato cautions in his book Perturbation Theory of Linear Operators that it might not be possible to continue the eigenvalue function analytically after $\lambda(t) = 0$, but he does not include an example.  Are there simple examples where the eigenvalues cannot be extended analytically after reaching 0?
Answer: Consider
$$
A(t)=\begin{pmatrix}1 & 1-t \\ 1-t & t\end{pmatrix}.
$$
Then $\lambda_{1,2}(t)=\frac12\left(1+t\pm\sqrt{5}|t-1|\right)$.
Comment: In this case (and always in finite dimensions) you can re-label the functions before and after the crossing so that the individual functions are analytic.  In your example, just let the two functions be $\frac{1}{2}(1+t+\sqrt{5}(t-1))$ and $\frac{1}{2}(1+t+\sqrt{5}(t-1))$.  In infinite dimensions it isn't always possible to do that.  In a recent paper of mine [https://arxiv.org/abs/2007.03649](https://arxiv.org/abs/2007.03649), I construct an example (see Example 6.2) of this behavior, but my example is complicated.  So I still wonder if there are simpler examples.


How does $\exp(x+y) = \exp(x)\exp(y)$ imply $\exp(x) = [\exp(1)]^x$?

Question: In Calculus by Spivak (1994), the author states in Chapter 18 p. 341 that
$$\exp(x+y) = \exp(x)\exp(y)$$ implies
$$\exp(x) = [\exp(1)]^x$$
He refers to the discussion in the beginning of the chapter where we define a function $f(x + y) = f(x)f(y)$; with $f(1) = 10$, it follows that $f(x) = [f(1)]^x$. But I don't get this either. Can anyone please explain this? Many thanks!
Comment: As a first step: try writing out the argument Spivak gave in your question, and try writing it in your own words.
Comment: Either $f(x+y)=f(x)+f(y)$ or $f(x)=[f(1)]^x$ is incorrect. One of the two should be changed to $f(x+y)=f(x)f(y)$ or $f(x)=[f(1)]x$ respectively.
Comment: See also http://math.stackexchange.com/questions/141293/continuous-functions-on-mathbb-r-such-that-gxy-gxgy and http://math.stackexchange.com/questions/293371/how-do-i-prove-that-fxfy-fxy-implies-that-fx-ecx-assuming-f-is.
Answer: As Paul Pichaureau has mentioned, it is easy to see that the formula holds for $n$ natural. You can also easily go further: what should $\exp(-n)$ be? Well, $\exp(0) = 1 = \exp(-n+n) = \exp(-n) \exp(n)$, so $\exp(-n) = 1/\exp(n)$. Furthermore, it is easily seen that $\exp(nx) = \exp(x)^{n}$, so that $$\exp(1) = \exp(n\cdot 1/n) = \exp(1/n)^n,$$ and hence $$\exp(1/n) = \exp(1)^{1/n}$$ by the usual rules for powers. Combining these, we see that $$\exp(p/q) = \exp(1)^{p/q},$$ so the formula holds for any rational number $x$. I think this is about as far as you can get using only that formula (in addition to the requirement that $\exp(0) = 1$). If we, in addition, assume that $\exp$ is continuous on $\mathbb{R}$, then we can choose a sequence $(r_{i})_{i =1}^{\infty}$ of rational numbers such that $\lim_{n \to \infty} r_{i} = x$, and compute
$$ \lim_{n\to \infty} \exp(1)^{r_n} = \lim_{n \to \infty} \exp(r_{n}) = \exp(\lim_{n \to \infty} r_{n}) = \exp(x).$$ The problem now is what $\exp(1)^x$ is supposed to be. If we already know that the power function $x \mapsto \exp(1)^x$ is continuous, then certainly the right hand side is equal to $\exp(1)^x$, but as Paul mentions, the power functions are often defined in terms of the exponential function. However, I don't think you have to do it that way (you could define rational powers as usual, and prove that a continuous extension to the reals exists), so it all depends on what Spivak has done prior to that chapter (you also didn't specify what $x$ is, so it conceivable that he assumes it is rational, in which case it doesn't matter much).
Comment: Instead of continuity, you could get by with monotonicity.
Comment: @michaelhardy: interesting!
Comment: excellent answer Martin, thorough and comprehensive without abstruosity
Answer: I think you should assume $x$ is an integer (since $a^x$ is defined using $\exp$ if $x$ is a positive real). You can write $\exp(x) = \exp(\underbrace{1+1+1+1+\cdots+1}_x)$.
Using the property of $\exp$, you find that $\exp(x) = \exp(1)\exp(1)\dots\exp(1) = (\exp(1))^x$.
Comment: Note that $a^x = \exp( x \log(a))$ and is defined for all complex $x$ and $a$, s.t. $a \not= 0$, where the principal branch of $\log$ is taken.
Answer: I like (as I have done here before) to start with a functional equation
and derive properties of the function.
If $f(x+y) = f(x) f(y)$ and $f$ is differentiable (and non-zero somewhere),
$f(0)  = 1$ and
$f(x+h)-f(x) = f(x)f(h)-f(x)
=f(x)(f(h)-1)
=f(x)(f(h)-f(0))
$
so
$$(f(x+h)-f(x))/h = f(x)(f(h)-f(0))/h.$$
Letting $h \to 0$,
$f'(x) = f'(0) f(x)$.
From this, $f(x) = \exp(f'(0)x)$.
This also works for $\ln$, $\arctan$, and $\sin$ and $\cos$.
Functional equations are fun!
Answer: $$
\begin{gathered}
  \exp (x + y) = \exp (x)\exp (y)\quad  \Rightarrow  \hfill \\
   \Rightarrow \quad \exp \left( {\sum\limits_j {x_j } } \right) = \prod\limits_j {\exp (x_j )} \quad  \Rightarrow  \hfill \\
   \Rightarrow \quad \exp \left( {\sum\nolimits_{k\, = \,0}^{\,x} 1 } \right) = \prod\nolimits_{k\, = \,0}^{\,x} {\exp (1)} \quad  \Rightarrow  \hfill \\
   \Rightarrow \quad \exp \left( x \right) = \exp (1)^{\,x}  \hfill \\
\end{gathered}
$$
where

$\sum\limits_j {} $ and $\prod\limits_j {} $ indicate the sum and product over a set of values for $j$
$\sum\nolimits_{k\, = \,0}^{\,x} {} $ and $\sum\nolimits_{k\, = \,0}^{\,x} {} $ indicate the Indefinite sum/product, computed between the given limits

So the above holds also for $x$ and $y$ complex
Comment: That reference is nice - thanks for pointing to it.
Answer: The $n$-th $\ (n\in{\mathbb N}_{\geq1}$) power of a real number $a>0$ is defined in elementary terms as product of $n$ factors equal to $a$. It is only reasonable to define $a^0:=1$ and $a^n:=1/a^{-n}$ when $n<0$. One then has $$a^{m+n}=a^m\cdot a^n\ ,\qquad a^{m\ n}=\bigl(a^m\bigr)^n \qquad(*)$$ for all $m$, $n\in{\mathbb Z}$. The aim now is to extend the definition of an $x$-th power of $a$ from $x\in{\mathbb Z}$ to $x\in{\mathbb Q}$ and $x\in{\mathbb R}$ such that the law $(*)$ is preserved.
The first step is easy: For $p\in{\mathbb Z}$ and $q\in{\mathbb N}_{\geq1}$ put
$$a^{p/q}\ :=\ \root q \of {a^p}\ .$$
Using the "rules of algebra" one then can verify that $(*)$ is true for arbitrary $x$, $y\in{\mathbb Q}$ instead of $m$, $n\in{\mathbb Z}$. That is as far as one can get using the algebraic notions of $n$-th power and $q$-th root.
Now analysis provides a wonderful (in particular, continuous) function $x\mapsto\exp (x)$ with the property that $\exp(x+y)=\exp(x)\cdot\exp(y)$ for all $x$, $y\in{\mathbb C}$. Put $\exp(1)=:e\doteq 2.718$. Then it follows by an easy induction that in fact
$$\exp\Bigl({p\over q}\Bigr)\ =\ e^{p/q}$$
for all ${p\over q} \in{\mathbb Q}$. As $\exp$ is continuous it is only natural to define arbitrary real powers of the number $e$ by
$$e^x\ :=\ \exp(x)\qquad(x\in{\mathbb R})\ .$$
Via the logarithm function (which I won't explain here) we can  define arbitrary real powers not only of $e$, but of an arbitrary number $a>0$:
$$a^x\ :=\ \exp\bigl(x\log(a)\bigr)\qquad (x\in{\mathbb R})\ .$$
Using the functional equations of $\exp$ and $\log$ one then easily proves that the rule $(*)$ remains true for arbitrary $x$, $y\in{\mathbb R}$ instead of $m$, $n\in{\mathbb Z}$.


Disabling Wysyig profile profile for particular content type

Question: I am using CKeditor with wysiwyg profile .
I want to disable this Wysyig profile for a particular content type.
cant find a better way.
please help me out with any module if its there or any configuration setting if its possible
Answer: I was having a similar issue and did it using Better Formats module.

I created a new Input Format (for example "my input format")
Disabled WYSIWYG in that format
In the Content type settings, under "Input format settings", select that new profile as default
Answer: You could use plain text, (or create a text format called "No WYSIWYG" if you plan to support tags (/admin/config/content/formats) and set that profile in CKEditor as inactive (/admin/config/ckeditor).
Then just change the format for your content type to plain text or "No WYSIWYG"(admin/structure/types/).


Do the Charaka Samhita and the Sushruta Samhita forbid the consumption of any food?

Question: Charaka Samhita and Sushruta Samhita are two major ancient Hindu texts on health related subjects, include many chapters on the role of diet and personal needs of an individual.The two texts give a list of food considered healthy and unhealthy. Do these texts forbid consumption of any food?
Comment: Do you want what kind of food forbidden or the Items ? Charak samhita recommends not to eat foods having opposite qualities , food which is infected by worms , too cold , too hot , not grown in same season etc. And there are different  foods mentioned for different Doshas (Vata , Pitta and kafa) which are to be avoided. so i guess there is no  general item list.
Comment: Charaka Samhita and Sushruta Samhita are not Hindu texts. They are texts written by Hindus.
Comment: Also pls.. do make it clear that whether you want food which is forbidden  OR which is to be avoided (Tyajya)
Comment: @Sarvabhouma Ik. I posted this question when I was new to this site.
Comment: I think it's a fine point of distinction with regards to Caraka and Susruta - since Ayurveda is mentioned in at least a few Puranas, and both Susruta and Caraka based their writings on lost samhitas from Atharva veda, these two (along with the other member of the brihat-trayi of Ayurveda, Astanga Hridayam) are about as authoritative as you can get. But it's also correct to say they do not fall in the category of sruti or smriti.
Answer: Charak Samhita Chapter 27 -Sutra Sthana – Annapana Vidhanam  (सूत्र स्थान , अन्नपान विधानं ) is dedicated to food items. This chapter discuss about various food items  and their types. We can also find various characteristics of food items in this chapter .

कृमिवातातपहतं शष्कं जीर्णमनार्तवम् |
   शाकं नि:स्नेहसिद्धं च वर्ज्यं यथापरिस्रुतम ||314||
   पुराणमामं संकिष्टं कृमिव्यालहिमातपै : |
   अदेशकालजं किन्नं यत्सात्फ़लम्साधु तत ||315||
   हरितानां यथाशाकं निर्देशा: साधनाष्टते |
   माधम्बुमोर सदिनां स्वे स्वे वर्गे विनिश्चय:||316|
Vegetables to be avoided:  Vegetables which became dried because of worms, air and sun's heat , too much dried, old and which are not grown in the same season
Fruits to be avoided: The fruits which are old, too much ripened ,
  which are half-ripen , eaten by snakes , fruits which are not grown in
  good land , which are in very bad state.

Now Charaka Samhita tells us about which meat to be avoided.

मृतं कृशतिमेच्यं च वृद्धं बालं विषैर्हतम् |
   अगोचरभृतं व्याडसुदितं मांसमुस्तृजेत ||३०९||
Meat to be avoided:  Dead animal, weak animal, too much fatty animal, old animals, very young animals, animals killed by poison, animals  which are  raised in different country than its origin, animal which is killed by lion , snake , jackal ,or wild animal.

This is the text says about water –

पिच्छिलं कृमिळम् किन्नं पर्णशैवालकर्दमै: |
    विवर्णं विरसं सान्द्र दुर्गन्धिं न हितं जलं ||२१३||
Water which is not fit to drink: Which is having fatty layer on it , the color of which has changed , which smells bad , which does not taste good or which is full of fallen leafs and which is mixed with mud.

Further Charak Samhita Chapter 27 , Verse – 306 declares that

अहर्योगिनां भक्तिनिश्चयो न तु विद्यते |
    समाप्तो द्वादशच्श्रायं वर्ग आहारयोगिनाम् -  ||३०६||
It's very  difficult to  determine which food materials to be included or which one are not. No single law can be established, because everybody's eating interests are different.

So from  the primary analysis of the text ,  it seems that  Charaka Samhita isn't  talking much  or  concluding  definitively about  "which food items to be accepted or to be forbidden.
It's just telling us that which types of foods to be avoided.
NOTE - I will update the Answer with Sushruta Samhita as well in time.
Comment: Ahara Niyamam has many more detailed rules


One word for someone who eats hurriedly

Question: What do we call someone who hurriedly pounds on food and eats like as though never seen before. I would like to know an alternate word for that person, either an adjective or noun.
Comment: There are a few idioms that work for this, such a 'wolfing his food' or the less well know but descriptive 'pelicaned' from Under Milkwood.
Comment: wolfing sounds right.
Comment: Perhaps `jungli`. http://www.oxforddictionaries.com/definition/english/jungli
Answer: A gobbler is a common way to describe a person who eats too quickly.
Trencherman is uncommon but might to fit the bill, though its connotation is more one of quantity than speed.
A binger is someone who eats rapidly and excessively.
A pig is someone who eats uncouthly, noisily, and or rapidly.
Comment: Ahhh, now I know why I eat my food slowly - I use Google.
Comment: @XanderLamkins Took me a second. Well done.
Answer: I would use either bolt or scoff as in

He bolted his food so fast he finished his starter before I had raised my fork.

From online dictionaries a description is:

Bolt: To eat (food) hurriedly and with little chewing
Comment: fascinating, in the US we call the second word "[scarfing](http://www.urbandictionary.com/define.php?term=scarf%20it%20down&defid=1455582)" as in "He scarfed down his food."
Comment: Well not really.What i actually want to suggest is an adjective that can be used for, friends who (bolt) on food as soon it arrives on the table in the canteen.Does that sound right?
Comment: You should perhaps change the question then - at the moment it reads like you want the word for eating hurriedly, but you say you want the word for someone who eats hurriedly, is that right?
Answer: I would call them a glutton:

: one given habitually to greedy and voracious eating and drinking

The adjectival form is gluttonous.
Comment: I normally think of _gluttony_ as referring more to the quantity of food consumed, as opposed to the pace at which it is eaten. (Still, not a bad word to add to the discussion.)
Comment: @J.R. I agree, but I felt it should make an appearance.  :)
Answer: You could say he gobbled up everything on the table.  For your friend you could say he is a gobbler.
According to The Free Dictionary gobbler means:

gobbler - a hasty eater who swallows large mouthfuls.
Answer: Bolt may be what you are looking for:

The act of bolting food.

1835   J. Wilson in Blackwood's Mag. 37 133   The difference between a civilized swallow and a barbarous bolt.
http://www.oed.com/view/Entry/21143?rskey=4OhmMY&result=2&isAdvanced=false#eid
Comment: Well not really.What i actually want to suggest an adjective that can be used for, friends who (bolt) on food as soon it arrives on the table in the canteen.Does that sound right?
Answer: Also there is the term boarding-house manners ... presumably since when you live in a boarding house you must eat quickly before the food runs out.  And those who have lived in a boarding house at one time may retain this habit.
Answer: The verb guzzle means "eat or drink greedily", and the noun guzzler is derived from that. It's commonly used in the phrase "gas guzzler" to describe a motor vehicle with poor fuel economy.
Comment: *[Guttle](http://en.wiktionary.org/wiki/guttle)* ("To put into the gut; to eat voraciously; to swallow greedily; to gorge, gormandize") seems to be more specific to eating than does *[guzzle](http://en.wiktionary.org/wiki/guzzle)* ("To drink (or, sometimes, eat) quickly, voraciously, or to excess; to gulp down; to swallow greedily, continually, or with gust").
Answer: Tachyphagia - is the word that means to eat rapidly or fast.
You can look the word up in the Concise English Dictionary - or just search on internet
Answer: Gourmand comes to mind, "a person who is fond of good eating, often indiscriminatingly and to excess."
I would say that such a person "stuffs their face" which I like for vividness. I was going to suggest that you could coin "face-stuffer" -- but if you google the phrase, you'll see that others already have.
Answer: Devourer might be suitable for you.

to swallow or eat up hungrily, voraciously, or ravenously. to consume destructively, recklessly, or wantonly
Answer: "Chow-hound" reads like it fits what you're looking for best.  The word kind of defines itself: One who wolfs food down, like a wolf or dog. Or, to be more polite: One who eats with great gusto.  (Noun - as in, "You're such a chow-hound; wait 'til everyone is served," or "Don't be a chow-hound and pass the dish.")
Comment: A *chowhound* is someone who is always ready to and likes to eat, not necessarily someone who wolfs his food.

One word for someone who eats hurriedly


In English law does a joint tenancy convert to a tenancy in common if a new tenant is added

Question: For example, say I were to have a contract with 3 others. And all the requirements being met, we would have a joint tenancy in a property. If we (landlord included) were to amend a new party to the tenancy agreement, would this negate the unity of time requirement for a joint tenancy, and would we therefore have a tenancy in common?
Comment: This was true at common law. I don't know if that remains the case today in the age of certificated Torrens title in England.
Answer: You are confusing two different concepts.
Despite their names "joint tenancy" and "tenants in common" are ways of owning property: not leasing it. Your landlords will be one or the other (or "sole tenant" if there is only one of them), you and your housemates are simply "tenants"
What I think you are driving at is the concept of "joint and several liability" where each tenant is responsible to the landlord for the acts and omissions of all the others, including the omission of not paying the rent. That is the implicit condition, however, the parties are free no negotiate whatever they like, that is, it is a creature of the particular contract(s) between the tenants and the landlord.
Comment: Good catch. I hadn't noticed that a lease was involved.
Comment: Ahh thank you. I was really scratching my head at this. I was confused as to whether joint tenancies/tenants in common had anything to do with leases.

As to the second part of your answer, I was not thinking about this, but you did clarify another thing at the back of my mind, so thank you for this as well


Sharing downloaded games between two Wii-U consoles we own

Question: We have a wii u upstairs, and just recently bought one for the basement.  We have several downloaded versions on the upstairs box already, specifically Mario Kart 8.  Are we able to play that game in the basement as well, without paying full price for it again?  (I wish now that just purchased the hard copy as that could have been transferred between consoles when needed.)
Comment: Short answer: nope.  Digital copies are locked to their consoles.
Comment: No, if you purchased the game online, the copy is locked to the console you originally downloaded it on.
Answer: No, you can't have one nintendo ID registered to multiple consoles.

Once a Nintendo Network ID has been associated to a Wii U, it can only
  be used with that same Wii U. There is not currently an option within
  the system that will allow you to transfer the Nintendo Network
  account from one Wii U to another.

They do have a support link to do that sort of transfer on the site, but I doubt they would be willing to go back and forth multiple times.
Comment: When my Wii-U got hit with a power surge, Nintendo was able to transfer the licensing to my new console but informed me that this was a one-way transfer. That was back around the time it first came out, but I doubt things have changed.
Comment: I have heard some rumors that they are moving towards a more sane policy of tying games to NNID, instead of console, but nothing concrete yet.


trigger to find change in contact role for an opportunity

Question: We have a scenario where we have contact roles added to an opportunity. We need to know if a contact role for a contact has changed for an opportunity. E.g John doe was an executive sponsor first for an opportunity and now John doe contact role is Influencer for the same opportunity. We need to log the old contact role and new contact roles for the contact and flag a field on the contact that the contact role changed. How can we do this and if any body can share any code snippet please?
Thanks
Buyan
Answer: Well, you've probably figured out by now that Triggers aren't supported on OpportunityContactRole (OCR). And, when an OCR is CRUD'd, there is no trigger that fires on the Opportunity either.
There is an idea for this - https://success.salesforce.com/ideaview?id=08730000000BrdvAAC
I've seen three workarounds

Run a scheduled batch apex job that sweeps the Opportunities (or Contacts) and looks at their OCR and compares them to previously-saved OCRs (saved in another child sobject or possibly as a hidden long text Opportunity/Contact field as serialized JSON)
Create an 'on view' trigger for your standard Oppo page layout that compares the current OCR to some prior value of the OCR (saved as above).  See http://www.soliantconsulting.com/blog/2012/08/view-triggers-salesforce-trigger-opportunity-contact-roles for the code. Advantage here is that feedback to user is near immediate, subject to only how long the future method takes to run (see code in link)
Redo your Oppo page as a VF page with a custom component to add/delete/change OCRs. Your VF controller can then act on the before/after values and save in the Oppo/Contact.
Comment: Thanks for your reply. Option 2 on the soliant consulting blog would solve our need.
Answer: Something that is now possible with Summer '19 is to use Change Data Capture events in conjunction with an Apex trigger on OpportunityContactRoleChangeEvent to monitor for changes.
There are some details on this in Triggers on Opportunity/Account Contact Role objects – Using Change Data Capture by Narender Singh.
Answer: In case anyone ends up here, and hard as it is to believe, in Winter 20, apex triggers are now supported on OpportunityContactRole, along with custom fields and layouts

Opportunity contact role customization options give you the
  flexibility to track and attribute revenue to roles, titles, and
  individuals. With custom fields and page layouts, validation rules,
  and Apex triggers, you can design an Opportunity Contact Role to match
  your specific sales and reporting processes. You can capture new data,
  such as titles and roles, to help your sales reps be more efficient in
  targeting the right contacts.

Will be interesting to see how much code can now be retired...
Comment: Hello, can you comment/edit regarding why one would prefer Apex Trigger against the object itself vs against the Object_ChangeEvent? I'm confused on when one would prefer one or the other... they seem to cover the same purpose?
Comment: There probably isn't much difference now - for years though, we were waiting for ANY triggering to be possible - specifically around triggering updates to rollups on associated Contacts. In that instance, this would probably serve same purpose, though aren't there still limits around number of change events allowed in an org?


Should I retain the argument with GCD dispatch_X (or does it retain it)

Question: As far as I remember we had something like performSelectorOnMainThread: (and variants) do retain the objects until the method is finished executing" in Apple's documentation. So can we rely on such behavior in ios6? Cause there isn't any info in the NSObject Class Reference now. The same question in case I prefer using GCD dispatch_async/sync - if I have object created in back thread - should I choose dispatch_sync(dispatch_get_main_queue) to be sure that object won't be released until selector executes.
Answer: The thing about the Cocoa memory management system is that you NEVER have to care about this. Memory management is completely local -- you never care about what other functions do. The basic rule is -- the caller guarantees that an object argument is valid when the function is called, and does not guarantee anything else.
If a function somehow stores an object for use later, it MUST (by deduction) retain it somehow, since it does not assume that the object is valid for any longer. Conversely, as a caller of the function, you don't need to think about what a function does or whether it does something asynchronously or not, because you are not guaranteeing to the function that its argument is alive at any point after it's called.
Answer: blocks, which GCD dispatch capture their context: In this case this means they retain everything they reference until executed :)


Traveling before graduate school

Question: I want to take a gap year and travel after getting my undergraduate degree in Physics. Is it possible to apply for a research grant that would cover my expenses that year? Can someone travel a lot as long as they meet the expectations of a research grant?
Comment: Are you planning to do research during your gap year? If so, it wouldn't be a gap year anymore, would it? If not, why would a research grant cover your expenses?
Comment: Why ruin a nice holiday with work? Save up a bit and then travel properly, without any pressure to do anything. Return and start your PhD refreshed and ready to go.
Comment: What's the purpose of the travel? What's the field you are going to study in graduate school?
Comment: The purpose is non-academic but since I won't be constantly on the move, I'm sure I will have time to do any research I would be able to do from an office. I want to study Physics in graduate school as well, and my interests are theoretical/computational, so a laptop is enough to do the kind of work I'm imagining.
Answer: What you are describing is possible, however unlikely.
To receive grant funding, you need to work (otherwise youd be stealing). The vast majority of grant funds are tethered to a location and 24/7 remote work is not a reasonable request. This difficulty is compounded by the narrow time window that im perceiving in your question, finding that appointment is a challenge.
The more likely solution here is to make the travel part of your graduate program itself. Apply to a program 'locally', and target a different laboratory of your choice. Then, fully disclose your plans to graduate at the local program, and collaborate with the distant lab. Collaboration could be in the form of materials/facilities usage, etc. For example, summering at a lab for whatever reason. You could even make the case to your new primary adviser that you simply want to learn spanish during your career because it will make you a better scientist (thats a big sell).
This will be a little tricky and will definitely require far more investigating than just applying to a graduate program. But, tethering to the 'primary' graduate program is both possible and productive. this approach relies less on luck.
You cant get around the fact you have to work AND also find that work.
Alternatively, there are plenty of opportunities to pursue research appointments at far off, beautiful destinations (e.g. http://www.bios.edu/#!/who-we-are). These are typically farther down the research spectrum, and will contribute to your research career in a different (i.e. less) fashion. I myself held several appointments previous to grad school, and they were the best experiences of my life. the appointments are much easier to come by. however, i do not consider all of them to be part of my "science career".

Traveling before graduate school


Is there a .exe alternative for Raspbian?

Question: I was wondering if I could run .exe files on Raspbian. It seems I cannot, but is it possible to run a Raspbian alternative to a .exe file? I tried .jar and .dmg, but neither worked. Is there a type of executable for Raspbian?
Comment: No, you cannot execute computer programs on the Raspberry Pi ;)
Comment: is debian, use .pkg
Answer: Any file can be an executable, the extension of the file name has nothing to do with this, but it is determined by the executable permission attribute. These can be script files or compiled binaries, but the latter need to be compiled specifically to run on an ARM processor. Windows .exe will not run. (Incidentally .dmg Disk Image files are OS X disk images, not executables - they are run by a package program on the Mac.)
Answer: Any file can be made executable by adding the executable permission with sudo chmod +x myfile but you still need to tell raspbian how to run the file.  Your do this by adding #!/path/to/program with path to program being the path to the program you would run the file with.  You are done and you have and executable file ready to use by running ./myfile
Answer: The only way a windows .exe will run on anything linux including the pi is through wine. I am not sure if there is a pi compile of wine as I would never try it. For a .jar these are java scripts. Again not sure if pi has a JRE (java runtime environment) as I would not have a reason to attempt or research this. The .dmg was already answered.
You may want to look into linux basics guides and such on files and programs. Then look at specific platforms/architectures. The pi IS a linux box, but on arm not x86 intel.


Can multiple dynamic DNS resolve to the same IP address

Question: Can multiple dynamic DNS resolve to the same IP address? I would like to keep some things separate in my home network and wondered if I can use different dynamic DNS addresses to resolve to my home IP?
Comment: You can certainly have multiple domains/hostnames in DNS that resolve to the same IP address. However, whether you can differentiate this traffic in your _home network_ will depend on the capabilities of your router. Perhaps using different port numbers would be preferable?
Comment: With regards to the web server (usually port 80) you can use name based VirtualHosts so you would be able to easily differentiate between different hostnames (multiple websites).
Comment: Yes, I plan to. One is for openVPN the other a web server. Thank you
Answer:
Can multiple dynamic DNS [addresses] resolve to the same IP address?

Yes.

I would like to keep some things separate in my home network and wondered if I can use different dynamic DNS addresses to resolve to my home IP?

You can certainly do this, but as suggested by w3dk you will need to differentiate the traffic somehow on your home network. The simplest way to do this is by also using separate ports for each service. If you have some "services" that somehow operate only on one port (e.g. a web server serving two or more separate http:// sites) then you will need to look in to a method of separating out that traffic in another manner (e.g. virtual hosts).
Answer: Dynamic DNS services update the "A record" for your domain, which can point to any IP address.  So you can have any number of domains, dynamic or not, pointing to the same IP.
But you can also create aliases for a domain.  Those are called "CNAME records".  That way you would only need to setup a single dynamic IP domain, and as many aliases as you want, which will always resolve to the dynamic IP.  You can create those in any domain registrar, sometimes hidden as "Adanced DNS" or such.
FreeDNS lets you create free subdomains in other people's domains—and also share your own if you so wish.  It also provides dynamic IP updating—though not many routers support it—, so it's great for home/test servers and what not.  I have a subdomain pointing its "MX record" (that's for email) to mailinator.com, for example, to register in annoying sites that block Mailinator's own aliases (CNAMEs).
As for "keeping things separate", that's going to be though by just using different domains.  Most services don't bother checking for anything but that the port they listen to receives something.  OpenVPN would give the same answer in every domain that points to your IP (and in the raw IP too, of course).  Web servers can answer in different ways according to the domain used to reach them, so you can have several websites in the same server (even thousands of them, like all the friendly $5 Shared Webhosts, which like to live in the edge ;), but they will present a website (or  at least an error page) in every domain that points to your IP.
You would probably be better off restricting who can connect to what, like, restricting—in your firewall—your OpenVPN port to only answer to a certain IP; at least with iptables, you could specify a dynamic domain instead of an IP, but iptables would resolve its address while starting up, so it would stop working as soon as the address changes, so you would have to reload iptables regularly to avoid downtime.  Or perhaps you only want a cosmetic separation, and don't care if a snooper finds your open ports in either domain.  But I'm just playing psychic by now; you should provide plenty more details of what is what you want and why, to get better help.
Cheers!


Enable-PSRemoting or Set-WSManQuickConfig?

Question: I'm getting pumped up for DSC and I want to cover my bases. I see that Enable-PSRemoting actually runs Set-WSManQuickConfig according to help documentation, I guess my main question is, what is the difference between the two? Looks like newer documentation whether it be a book or online article only mentions Enable-PSRemoting and not necessarily Set-WSManQuickConfig. Is Enable-PSRemoting just newer/better? Thanks in advance.
Comment: AFAIK they are more or less the same.  I have no proof, but I think  `Enable-PSRemoting` is suggested and used because the name of the commandlet is a lot more obvious, and easy to remember.
Comment: `winrm /qc` is what I use
Answer: Checked the help documentation of the two cmdlets.
Set-WSManQuickConfig performs the following:

-- Checks whether the WinRM service is running. If the WinRM service is not running, the service is started.
-- Sets the WinRM service startup type to automatic.
-- Creates a listener to accept requests on any IP address. By default, the transport is HTTP.
-- Enables a firewall exception for WinRM traffic .

Enable-PSRemoting also does the above, and additionally:

----- Registers the Microsoft.PowerShell and Microsoft.PowerShell.Workflow session configurations, if it they are
  not already registered.
----- Registers the Microsoft.PowerShell32 session configuration on 64-bit computers, if it is not already registered.
----- Enables all session configurations.
----- Changes the security descriptor of all session configurations to allow remote access.
----- Restarts the WinRM service to make the preceding changes effective.

So Enable-PSRemoting is the one to use unless you intend on manually configuring sessions.
Comment: Thanks @Deadly-Bagel, and everyone! Very helpful information.
Comment: WinRM is the underlying transport for remote PowerShell, WMI, and CIM.  The PowerShell specific items are layered on top of that basis.


Add Chakra os benz to grub 1.99

Question: I have Debian 7 with grub 1.99 in sda1 and Chakra OS without grub in sda2 I want to make a dual boot via grub 1,99, how?
Answer: Grub 1 configuration is easier than grub 2, perhaps because with grub 1 they intended for users to edit the conf file directly themselves.  Have a look here for some general information and specifics about where to find the conf file on debian. info grub is the definitive reference, although if you do not use info much it takes a bit of patience.
You want to create a new section (starting with a "title" line) for Chakra on sda2.  While reading the link above, pay attention to the way grub identifies partitions (it does not use "sda2").  There are three things that are critical:
root # The root filesystem device node, e.g. (hd0,1)
kernel # The path to the Chakra kernel relative to the root filesystem.
initrd # The path to the initial ramdisk used by the kernel to access
         critical modules at boot.  Virtually all modern distros use this,
         you have to figure out where it is (probably in the same directory
         as the kernel).

Add Chakra os benz to grub 1.99


Css file not loading after static content flush in Magento 2.1.8

Question: I have a custom CSS file created and loaded through code. The compile less option is set to yes in configuration settings. When I clear the static content flush from cache management in admin panel and reload frontend, it gives an error that the CSS file not found pub/static/frontend/vendor/modulename/en_US/css/test.css. But when I run command php bin/magento setup:static-content:deploy my test.css file is loaded. I have my apache run through user test and Magento ownership is also test.
How to fix this issue?
Answer: Check you magento site mode is development then
File Path : pub/static/.htaccess
  RewriteRule .* ../static.php?resource=$0 [L]

This code is automatically copied the files
Answer: Did you try clear pub/static folder exept .htaccess ?
Then setup:static-content:deploy


Multiple solutions for both primal and dual

Question: If matrix $A$ in an LP (or $A^T$ in its dual) has full row (column- in dual) rank, is it possible that both primal and dual have multiple solutions?
Answer: In page 147 of (Sierksma, 2001), an example (Example 2) is given for this case. That is, "In case of (a), a dual optimal solution can either be multiple or non-multiple ...".
<code>Primal Optimal Solution                     Dual Optimal Solution
(a) Multiple                     implies    Degenerate
(b) Unique and nondegenerate     implies    Unique and nondegenerate
(c) Multiple and nondegenerate   implies    Unique and degenerate
(d) Unique and degenerate        implies    Multiple
</code>
Sierksma, (2001) Linear and Integer Programming: Theory and Practice, Second edition.
The example is as follows:
\begin{align}
(P)&&&\min{}&   &\quad{} 5x_2 \\
&&& \text{s.t.}& & -  2x_2 \geq{} 0 \\
 && &&x_1& +  4x_2 \geq{} 3 \\
 &&&& x_1&,\phantom{+4}  x_2 \geq{} 0 \\
\end{align}
\begin{align}
(D)&&&\max{}&   &\quad{} 3y_2 \\
&&& \text{s.t.}& &\phantom{4}\quad{}  y_2 \leq{} 0 \\
 && &&-2y_1& +  4y_2 \leq{} 5 \\
 &&&& y_1&,\phantom{+4}  y_2 \geq{} 0 \\
\end{align}
The solution for $(P)$ is $(x_1, x_2)=(a, 0)$ with $a\geq{}3$ where the solution of $(D)$ is $(y_1, y_2) = (b, 0)$ with $b\geq{}0$. Therefore, yes, it is possible for both primal and dual to have multiple optimal solutions.
Comment: https://math.stackexchange.com/questions/1049796/prove-optimal-solution-to-dual-is-not-unique-if-optimal-solution-to-the-primal-i
Answer: According to the table you have mentioned, there is no record for multiple implies multiple, every multiple solution will be expressed as degenerate in dual. Therefore, this is impossible that both have multiple solution.
Comment: Thank you for your reply. The question now is if it is impossible to have multiple solutions for both primal and dual, why the first line of the table is not: --Multiple implies "Unique" and degenerate'-- (like the third line)
Comment: com, are you sure? If that's the case, then is the table confusing in omitting "unique" in the first line?
Comment: https://math.stackexchange.com/questions/1049796/prove-optimal-solution-to-dual-is-not-unique-if-optimal-solution-to-the-primal-i


How to remove project in PyCharm?

Question: If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again.
Answer: Just follow these steps in order. They assume you currently have the project open in a PyCharm window:

Close your project by clicking on File -> Close Project
Locate your project in the PyCharm file directory
Delete your project's directory

I agree that PyCharm's handling of what should be a very simple procedure is crappy. Maybe this will be improved in the future?
Comment: File->Close project is not an option on pycharm 5. Pressing the delete on project selection works (without deleting files)
Answer: If you want to remove the project from the recent projects list, just highlight the project with your mouse and hit the del key.
Comment: Works great... but in case anyone from PyCharm/JetBrains is paying attention - this *REALLY* needs to be made better - a tool tip, a note at the bottom of the list, something anything!
Comment: Had the same problem. After some trial and error realized that Del does not work for the first project in the list. For that one only File > Close is the option as mentioned above.
Comment: On a Mac, delete project from recents list with the combination of the "fn" key and "Del" see  http://forum.jetbrains.com/thread/PyCharm-1267
Comment: I am on pycharm 2016.2.3
none of the below are working
1. left click on the project once and hit del
2. right click on the project has no remove option
Comment: @GajendraDAmbi please see if you selected the "project" and not the "project files". Both show a similar kind of view in the project windows. When you select "project", you can press delete to detach the project from.
Comment: This will not delete the project. It only removes it from the *Recent Projects* menu.
Comment: Have the same problem as GajendraDAmbi. `File > Close Project` has apparently been removed while hitting delete doesn't work for the first opened project. To get to a single project, I have to close all projects, open the desired project (which also opens other projects I had open) and then hit delete for other projects. Rather annoying.
Answer: This is for PyCharm 2019.1, but I can bet this will work in previous versions.
I am assuming you are in a Unix based operating system (macOs or any Linux distribution). I am also assuming you have currently opened the project you want to remove.

Close the project by going to File → Close Project:

Remove the project from Pycharm's Welcome Window:

Locate your project and delete it, you can use several alternatives, but I encourage you to use the following

$ rm -rf /path/to/your/project/directory

The previous command will work in macOS and Linux. In Windows, you can delete it manually by locating the projects directory using File Explorer.
That's it, the project has been completely deleted!
Answer:
click the project you want to remove.
menu bar Edit-> Remove from Project View.
Answer: There is a difference between PyCharm projects and the list of recently opened projects (File → Open recent...):

The PyCharm project is simply an arbitrary folder1 with the appropriate .idea subfolder in it.

The list of recently opened projects is simply the list of paths to some of such folders.

PyCharm does not keep the list of all projects, so you may safely delete a project folder (or its .idea subfolder) from your file system.
But if you have a bad luck, the path to your project directory is already listed in the list of recently opened projects, and if you try opening it with File → Open recent..., then

in older version of PyCharm, the deleted folder is re-created (as a new folder with only the .idea subfolder in it),

in newer versions of PyCharm you get the prompt similar as

The path C:\Users\you\PycharmProjects\deleted_project does not exist.
If it is on a removable or network drive, please make sure that the drive is
connected.

with buttons "OK" and "Remove From List", so you may simply remove the deleted folder from the list,

in all version of PyCharm, if you deleted only the .idea subfolder, it is silently re-created (but all your project settings are lost, of course).

To prevent from the uncomfortable consequence of the 1st possibility of using the File → Open recent... to re-create already deleted project, follow e.g. the first two instructions in the Simin Jie's answer.

1 generally a subfolder of the PyCharmProjects folder in your user profile directory (e.g. if you created it with File → New Project... and accepted the offered default path).
Answer: Version 2017.2.1

Press Alt+1 to bring the project pane, and make sure you're in
Project view (not Project Files view).
Select the desired project, and choose "Delete from project
view" from the context menu (right click). You can also use Delete
key.
Comment: This should be the correct answer as your using pycharm to fix the problem, and not a hack.
Comment: I had to first remove the subproject from Settings | Project  | Project Structure | Content Root. There was a little x on the right. Then I could "Remove it from project view."
Answer: Works for Windows and MacOS.

File -- Open Recent -- Manage Projects

Cliek X to delete from Recent Projects

Delete local directory

According to https://www.youtube.com/watch?v=ksbmc0coO4k
Answer: In PyCharm 2018 I finally had to resort to deleting .idea folder and the project went away.
Answer: Highlight the project with your mouse and hit the del key, which works for me.
Comment: I am on pycharm 2016.2.3
none of the below are working
1. left click on the project once and hit del
2. right click on the project has no remove option
Answer: In 2021 maybe another way to do it. My problem was in project with user directory (root was /Users) that contains too many not Python files, and it triggers some problems with Git and file index.
What I did:

show hidden files (Cmd + Shift + .),
find .idea directories,
delete all .idea directories.
open PyCharm and add project from correct directory.

That's it.
Answer: In version 2017.2.1
File → Close Project
You will be taken to the start-up window, where you can see the projects you've created on the left. You can then delete a project by clicking the cross sign ('x') following the project name.
Answer: I had the same issue. My solution was:

Close project.
Rename the folder you want to dissapear
Open pycharm project. A dialog will be shown asking if you want Pycharm remove the folder. Answer: yes.

That is enough.

How to remove project in PyCharm?


Unable to set cookie in browser using request and express modules in NodeJS

Question: I am having a client and a server node written in express. The client communicates with server using request module, the server will send response back to the client. Here in server code I am sending cookie back to the client. But I am unable to see the cookies in the browser. In client req.cookies is giving {}
Server code:
var express = require('express');
var cookieParser = require('cookie-parser');
var app = express();
app.use(cookieParser());
app.get('/test-cookie', function(req, res) {
    res.cookie('abc', 'xyz').send('Cookie is set');
});
app.listen(9000);

Client code:
var express = require('express');
var request = require('request');
var cookieParser = require('cookie-parser');
var app = express();
app.use(cookieParser());
app.get('/', function(req, res) {
    request({
        url: 'http://localhost:9000/test-cookie',
        method: 'GET'
    }, function(error, response, body) {
        if (error) {
            res.send({
                msg: error
            });
        } else {
            if (200 == response.statusCode) {
                console.log(req.cookies);
            }
        }
    });
});
app.listen(7000);

Answer: Client browser for first hit to 7000 api will not contain any cookie, thus req.cookies will log {}, thus we have to set cookie in the res for the client browser to send the cookie for the rest requests.
Solution (Client Code):
if (200 == response.statusCode) {

    // For first request it will be empty {}
    console.log(req.cookies);

    /* fetching the cookie from the response header
     * and setting in res to be set in the browser
     */
    var c = response.headers['set-cookie'];
    res.set('set-cookie',c[0]);

    res.send('Done');

}

Explanation:
What you are doing is trying to fetch cookies from req which does not contain any cookie. The response object you are getting from hitting the 9000 api will contain the cookie. Thus, you have to set the cookie from response to the res for client browser.
Answer: response.cookies is to SET cookies, if you want to GET cookies from a response object you will have to rely on response.headers['set-cookie']


end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (0,0)

Question: Recently turned on my Lenovo Yoga laptop running Ubuntu 16.04 and got an error saying it was unable to read drive hd0. It then ran through some lines and ended with the title. I am very new to running a linux distro on my computer, and I do not know what I am doing. If you need any other information from me please let me know. I may have to ask how to get that info though.
Answer: Has a similar problem just now. Apparently your /boot partition is out of free space which causes this problem when updating to a new kernel. Select manually an older kernel in the grub menu so you can boot. Then to clean up /boot use sudo apt-get autoremove or delete old kernel files manually so you keep at least one working one. Then add the new kernel to grub:
update-initramfs -u -k version, where version is the new kernel version. Then run update-grub to update the grub file and it should boot again.


How would I add custom tables/endpoints to the WP REST API?

Question: I have created custom tables for performance reasons for products, carts, and notifications. I want to make these tables and their data available for normal CRUD via the WP REST API v2. How would I add custom tables (and their columns) to the API so that I could get/update those records?
Comment: Did you find a solution as I have the same question?
Comment: Not yet. I went with custom post types for now. Not the best solution, but I couldn't figure it out yet.
Answer: I eventualy worked out a solution for my restaurants table, which sits alongside the wp_* tables in my WP database. Hope this helps
add_action( 'rest_api_init', function () {
  register_rest_route( 'restos/v1', '/all', array(
    'methods' => 'GET',
    'callback' => 'handle_get_all',
    'permission_callback' => function () {
      return current_user_can( 'edit_others_posts' );
    }
  ) );
} );

function handle_get_all( $data ) {
    global $wpdb;
    $query = "SELECT qname, rname, recommendation FROM `restaurants`";
    $list = $wpdb->get_results($query);
    return $list;
}

I have variations on this theme for all the CRUD actions I need
Comment: I know it's an old post, but is there any chance you could post your other CRUD code please? I like your approach and would be interested to see how you tackle the rest of it. I'm building a WP app that can handle most of its data with CPTs but there is one huge dataset that needs to go into a 'normal' table for performance, and be accessible via the WP api. Many thanks.
Answer: Rather than create custom database tables, you would be better off creating your own custom post types (within Wordpress - Since 4.7.+), along with whatever custom fields you need (as well as taxonomies).
All this can be done as a plugin or via functions.php in a theme.
Here's a very simple but thorough example of how to do this.
It shows how to create a custom post type (called 'acme_products') and its custom fields with the ability for custom taxonomies (categories). All with REST API support built in. It will also show you how to customise the input (meta) boxes for the WP-Admin forms and the columns of the list pages.
https://gist.github.com/kosso/47004c9fa71920b441f3cd0c35894409
Answer: It has just worked with the rest api v1 for me. The v2 declined the callback permission for selecting the table results. Here is an example endpoint for fetching from custom db table: domain.com/wp-json/test/v1/testing
add_action( 'rest_api_init', function () {
        $namespace = 'test/v1';
        $route     = '/testing';

        register_rest_route($namespace, $route, array(
            'methods'   => WP_REST_Server::READABLE,
            'callback'  => function () {
                global $wpdb;
                $table = $wpdb->prefix . 'test';
                $query = "SELECT name, color, etc.. FROM $table";
                $results = $wpdb->get_results($query);
                return $results;
            },
            'permission_callback' => '__return_true',
            'args' => array()
        ));
    });


What does this type of training help and set me up for based on my line of work?

Question: I've worked as a DevOps engineer for about 6 years now. I love the field and am content with the work that I do. I realize that from the number of years experience I have, I have absolutely no soft skills. My boss has asked me to look into Project Management training and I can appreciate looking into this as it will help me do my job much better. My question is: What would Project Management really set me up for long term? Is this to advance myself as an engineer or is this more of a management skill? Ideally, Id like to stay in Engineering and hopefully see myself as a Principal Engineer one day. Can training for Project Management (PMP, Scrum Master training, etc.) get me to that point? Would this be a benefit of me to take this kind of training? And if so, what are the pros to this?
Comment: Curious to know why its down-voted with no reason given..
Answer: I would have loved my developers to have more project management knowledge. Even if you never work as a project manager, for you to understand about dependencies, risks, critical path, the steps that happen before and after the "dev" part, how to communicate progress in a way everyone can understand, and all the rest of the things a PM should know -- that will make you a much better developer and engineer.
That said, your boss may have a different reason for suggesting this course. They may see you moving into management, or they may just have a training budget to use up and this is something on offer you haven't already taken. By accepting this course you may be signalling a willingness to take a particular career path -- or it may mean nothing at all. I suggest you ask your boss why this particular course comes to mind and what your boss thinks the benefit to the team will be of you taking it.
Answer:
Ideally, Id like to stay in Engineering and hopefully see myself as a Principal Engineer one day.

I don't see Project Manager as a step towards Principal Engineer. You would learn some useful skills, but many are irrelevant. As you progress in responsibility in Engineering you learn a more focused skillset.
One issue I have found is that when you stop focusing on a core skillset it can be difficult to go back to it. At the very least you normally would need to change companies and possibly take a job which is a step backwards.
But I suggest you read up on Project Management, it may appeal to you, and it's a solid career.


Email security on a Windows phone

Question: Let's say I set up a Microsoft account on a Windows phone and use the associated built in email client. If I send an email, would it be send in plaintext. On wifi, if someone is sniffing the traffic, will he be able to see the contents of the mail?
Answer: This would depend on the e-mail server that you're connecting to as opposed to being a function of the Mobile Phone operating system.
The (old) default was to send outgoing mail over port 25/TCP using the SMTP protocol.  Traffic over this port is, by default, unencrypted.
Many modern e-mail services do not make use of this port and instead will use an encrypted version of SMTP over port 465/TCP or 587/TCP (more info. here)
If the encrypted version is used then someone on a wi-fi network would not be able to see your traffic without additional measures to defeat the encryption (which are much more complex than simple traffic sniffing)
Comment: 465 is deprecated in favor of STARTTLS on 25.
Answer: Rory's answer is correct. However, there are also two additional ways that you can secure email built into WP8.1 or higher.

Use a VPN. While WP8.1 only supports a limited number of VPN protocols and apps, many corporations and free or commercial VPN providers use these protocols. If you connect to VPN and use it to tunnel all traffic (not just LAN traffic), then a network attacker on your WiFi will not be able to decrypt or interfere with your email (except possibly by killing the connection outright, but there's no defense against that on a network you don't control).
Use S/MIME (Secure Multipart Internet Mail Extensions). This requires that you have a certificate for your email recipient already installed in the phone or findable on the Exchange server that the phone is sending the mail through (assuming you're using ActiveSync). Using S/MIME, the phone will encrypt the email such that nobody except the recipient (who has the private key corresponding to the public key stored in the certificate) can decrypt the message or any attachments, although some message metadata (like who sent the message, who received it, what the subject line was, and so on) will be visible to anybody. S/MIME is reasonably common in corporate environments (because Exchange and Outlook support it) but rare elsewhere.

Another approach that isn't built into WP8.1 but that is available through third-party apps is OpenPGP. This is the standardized email encryption format used by tools such as PGP (Pretty Good Privacy) and its free, open-source clone GPG (GNU Privacy Guard). Similar to S/MIME, you'll need the public key of each recipient, and some way to trust that it came from them. You'll also need an app, such as oPenGP or OpenPGP fur Windows Phone, both of which are available in the store (I'm not associated with either, and frankly they both have bugs but are usable). Use the app to write your email (or copy-paste it into the app) and have the app encrypt it to your recipient(s). You can then send the encrypted message over email without worrying that a network attacker can decrypt it (though there will still be metadata leakage). OpenPGP usage is most common among fans of information security and privacy, and rare in the general populace.
Oh, you could of course also just send the email over cellular data. Even if the connection to the email server isn't encrypted, the connection to the cell tower is. It's not the best encryption in the world, especially if using an older data protocol (I think all 2G protocols are broken by now; less sure about 3G and up) but most people don't even have the technology to intercept cellular data transmissions, much less decrypt them.

Email security on a Windows phone


SQL Server 2008 Reindexing/Rebuilding

Question: Should I reindex/rebuild while my DB is up and running or should I take it offline? Also after doing some digging around I came across this article that recommends Rebuilding after 40% fragmentation and Reindexing between 10% to 40%. Can anyone verify this? My DB is a quite large and is slowing down more and more.
Comment: What you mean by saying *Can anyone verify this ?* Do you want to confirm it or what ?
Comment: Well another issue I am coming across is that when I do Reindex or Rebuild a DB the percentage of fragmentation stays the same.
Comment: Are you sure that fragmentation is your problem here? What statistics have you checked that says this is a problem?
Answer: I'd highly recommend using Ola Hallengren's index maintenance scripts, they're very widely used.
https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
I personally set the script to Reorganise at 50% and Rebuild at 80% (and only check indexes over 1000 pages). It's recommended to have this as an overnight run if you have the maintenance window.
Beware that the first time you run this it may have to do quite a lot of work.
As a side note, do you know that fragmentation is actually causing your performance slow down? It could be any number of things unless you've already narrowed this down. I'd recommend using Brent Ozar's scripts for a health check if you haven't already. Start with sp_Blitz and go from there.
https://www.brentozar.com/blitz/
Answer:
Should I reindex/rebuild while my DB is up and running or should I take it offline?

You cannot rebuild index when database is offline, the database has to be online to rebuild the index.
The widely accepted parameter for rebuilding is if fragmentation >30 % rebuild it and if fragmentation lies between 10 and 30 % reorganize it. You can use your own script, maintenance plan or Ola Hallengren script or My script. If you have time I would suggest you to create your own.

SQL Server 2008 Reindexing/Rebuilding


What is the logic to the order of Shimano Components?

Question: I understand that the product lines (105, DuraAce, etc.) are ranked in terms of quality, and that last years high model drops to this year's low model. Could someone lay out the logic for the naming system so I can understand it?
Comment: What do you mean by "drops"?  Are you referring to price?  Or are you misunderstanding how the product lines work?
Answer: For road components Shimano has the following quality ranking, from top to bottom and from (very) expensive to cheap: Dura Ace Di2, Dura Ace mech., Ultegra Di2, Ultegra mech., 105, Tiagra, Sora and Claris.
What trickles down from year to year are the innovations. If some innovation appears with the pro-groupset Dura Ace it will appear in the following or second year in the Ultegra group and so on downwards while the the Dura Ace components have some further improvement.
Comment: I would hardly call them BSO quality. The Trek 1.1 and 1.2 road bikes come with Claris and Sora.  They are perfectly serviceable equipment for a recreational cyclist.
Comment: You should probably add Sora and Claris to be more complete.
Comment: I've never seen a BSO with Claris/Sora level componentry. High end BSO's generaly have Tourney or non-branded components.  The names come from a wide variety of sources -- Ultegra stands for "Ulitmate Integrity"; theres probably something similar for Dura Ace (duraluminum + ace?), since Exage was "Excellence New Age", whereas some are likely words in different languages (Deore = golden in french, alivio and acera are spanish words, etc.).
Comment: @ Kibbee, done, added, thanks. Those two rarely appear at the LBS. They are more common with BSOs.
Comment: Shimano also has non-group components like ST-RS685 shifters.


Raspberry Pi HAT drivers

Question: This may be a simple question but I am new to all this. Do the HAT drivers only work with Raspberry Pi OS or will the work with any suitable Linux?
Comment: Drivers for which HAT? AFAIK there are no generic HAT drivers.
Comment: To the extent that they are kernel based (which generally a "driver" is), they could be used on any linux, presuming it uses the mainstream Pi kernel (which they generally do).  Beware though: *"I am new to all this..."* Unless you have a good reason (which, "I like ubuntu and use it on my laptop" is not a good reason), you will be better off using RpiOS (mostly because that's the norm, and most of the docs/tutorials/etc you find will start from that context).
Answer: There is no such thing as a "HAT driver".
HATs may contain an EPROM which specifies GPIO map and Device Tree overlays - most of which are "standard" i.e. they can be used by any device and must exist.
Any custom Device Tree overlay required would need to be installed although there is provision for a Device Tree overlay to be provided in the EPROM.
Comment: This seems misleading. Anything more complex than some fan HATs must have driver software that actually communicates with or controls the device (like a display driver for OLED/LED matrix HATs, or to redirect sound to the onboard DAC, or read the power button/battery level, etc). So there _would_ be a driver unless it's just a protoboard. Some of these may be downloadable for other OSes, but usually they're designed to work specifically for RpiOS or are built-in. Even the Device Tree overlay in the HAT EEPROM - wouldn't the Pi then need some sort of driver to detect and load the tree?
Comment: A good example would be the PiJuice HAT, which requires a special application to be installed on the Pi in order to read the battery level and do the auto-power-off detection and button/LED integration. There is a device tree EEPROM on the HAT (in practice I think it just enables I2C), but you also do need the driver/daemon and application to use it beyond a glorified 5V supply.
Answer: Hardware Attached to HAT drivers is typically designed to work with the  Raspberry Pi OS. However, many HATs and drivers are developed to be compatible with any Linux distribution that supports the required kernel and libraries. You must check the documents before purchasing.
Are you considering making a Raspberry pi Hat by yourself, you can see here:
https://www.pcbway.com/project/shareproject/Raspberry_Pi_4_Relay_HAT.html

Raspberry Pi HAT drivers


Is there a way to waterfall from IMA to VAST ads in jwplayer 6?

Question: I would like to serve a IMA ad but "waterfall" to VAST on error. Is it posible to do it?
As far as I know when you initialize a jwplayer you must set the client ("vast" or "googima"), so we cant change the client in the "onAdError" event.
Any option to set the client in the "onAdError" event?
This is what I'm trying to do:
<code>var aAds = [ {
  client: "vast",
  tag: "http://foo.com/vast.xml"
}, {
  client: "googima",
  tag: "http://foo.com/ima.xml"
}];

jwplayer("container1").setup({
  image: "http://foo.com/bar.png",
  file: "http://foo.com/bar.mp4",
  advertising: {
    client: "vast" // This is mandatory, isn't it?
  }
});

var iAd = 0;

function showNextAdd( onPlay ) {
  if (onPlay && iAd > 0) return;
  if (iAd < aAds.length) {
    jwplayer().playAd( aAds[iAd++].tag );
  }
}

// Try first add on start
jwplayer().onPlay( function(){
  showNextAdd(true);
});

// If error try next
jwplayer().onAdError( showNextAdd );
</code>
Comment: I'm afraid you can't switch ad clients from vast to ima after the player has been set up.
Comment: You can waterfall with just IMA now.
Answer: Short answer is - NO
From jwplayer.com support:

While configuring jwplayer instance - set 'client' option to vast if you are running VAST/VPAID ads, or to googima if
  you are running Google IMA ads. Note you cannot mix both ad formats in
  a single player embed. Choosing a client will maintain the same client
  until the player is set up again. Example: 'client': 'googima' or
  'client': 'vast'

more here: https://support.jwplayer.com/customer/portal/articles/1431665-vast-advertising
p.s. For the moment i am posting this the last version of jwplayer is 7.3.4


Custom HTTP header fields stripped

Question: My company sells a LAMP-based (where P = Perl, not PHP) application deployed as an appliance. A customer is attempting to integrate their SiteMinder SSO with our application, such that our appliance sits behind a proxy running a SiteMinder Apache plugin that acts as a gatekeeper. For our application to authenticate a user via SSO, we expect to see HTTP requests that include an SSO cookie (SMSESSION in this case) and a custom HTTP header variable containing the username.
However, when our Apache server receives HTTP requests from the SSO proxy, all custom HTTP appear to have been stripped, although the cookie is present. I have instrumented the Perl code to write the headers to a log file with the following code:
<code>my $q = new CGI;
...
my %headers = map { $_ => $q->http($_) } $q->http();
my $headerDump = "Got the following headers:\n";
for my $header ( keys %headers ) {
    $headerDump = $headerDump . "$header: $headers{$header}\n";
}
kLogApacheError("info", $headerDump);
</code>
...and this is the output I get (slightly edited for confidentiality):
<code>[Wed Mar 16 23:47:31 UTC 2011] [info] Got the following headers:
        HTTP_COOKIE: s_vi=[CS]v1|26AE2FFD851D091F-4000012E400035C5[CE]; s_nr=1297899843493; [snip]
        HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
        HTTP_ACCEPT_ENCODING: gzip,deflate,sdch
        HTTP_CONNECTION: keep-alive
        HTTP_ACCEPT: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
        HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.3
        HTTP_USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13
        HTTP_HOST: [redacted].com
</code>
IOW, the customer HTTP headers I'm expecting are missing. When we redirect traffic from the proxy to a different Apache server (i.e. not our appliance) all the 20+ custom headers show up as expected. This strongly suggests that it's our Apache server that is stripping the headers.
We have never run into a problem like this with other deployments, even with this particular SSO solution. I realize this is similar to another question on this site ( Server removes custom HTTP header fields ) but the suggestions there (such as a problem caused by running mod_security) don't apply.
Is there any other reason why our server might be stripping out the HTTP headers? Or is there possibly something else going on?
Thanks for any help!
Matt
Comment: Seems you are on right track: your Apache eats those custom headers. In your question i don't see any hint, how is your Apache configured. Couldn't you just compare those 2 Apache confs?
Comment: Thanks for your feedback. Our customer is a large bank and so we unfortunately don't have easy access to their environment.
Answer: Have you sniffed the raw HTTP traffic between the proxy and your Apache instance? If the necessary headers are missing herein, the problem is on the proxy side.
Answer: I finally figured this out, and it was pretty obscure...
Using HttpFox, it really looked like traffic was being redirected to the appliance rather than being forwarded. In the case of redirects, cookies were persisting but HTTP request headers were not. However, the SSO Proxy rules were all "forwards" so we were completely stumped as to why redirects were showing up.
We knew that our application's logic redirects to /signin/ if the user isn't already authenticated but we expected this would still be routed through the proxy. However, what we didn't realize is that there was a SiteMinder SSO option, enableredirectrewrite that by default would handle "any redirects initiated by destination servers [by passing them] back to the requesting user". Once we set this flag to "yes", and the redirectrewritablehostnames to "all", everything worked like magic.
(For reference, see a version of the SiteMinder manual here: http://www.scribd.com/doc/48749285/h002921e).
Answer: I recently had a problem where I could not get any custom HTTP Headers passed to my PHP Script.
It seems that Apache 2 running PHP 7 with FCGID would not allowing and removing or tripping all custom HTTP Headers.
Here is my fix:
http://kiteplans.info/2017/06/13/solved-apache-2-php-7-fcgid-not-allowing-removing-stripping-custom-http-headers/

Custom HTTP header fields stripped