Gravitational waves frequency

Question: When people quote the discovery of gravitational waves no reference seems  to be made to the frequency, presumably this is about the current state of detectors. Or are the frequencies detected the same as the resonant frequencies of the bars used? What range of frequencies are  gravitational waves expected to have?
Comment: There's a lot of information about this!  If you check the LIGO papers there is detailed information on how sensitive LIGO is at different frequencies and about the frequency of GW150914.  The [paper](https://dcc.ligo.org/LIGO-P150914/public) has nice spectra, showing it climbing fro  ~60Hz to ~300Hz.
Comment: Did you search the page you link for the word "frequency"?
Comment: @tfb figure 3 in that paper shows sensitivity in the 20-2000Hz range.  The [Einstein @ Home](https://www.einsteinathome.org/) distributed computing program has searched that entire range for CW signals (from pulsar spin down) in data collected from the previous generation instruments; and is currently doing an initial search of the 20-100Hz range in data from ALIGO.
Comment: I was restricted to popular accounts
Answer: Have a look at an announcement from LIGO where they describe the experiment.

The first plot shows the frequencies detected.
The original waves are redshifted.

Estimated source parameters for GW150914. We report the median value as well as the range of the 90% credible interval. Masses are measured in the source frame; to convert masses to detector frame, multiply by (1 + z). The source redshift assumes standard cosmology.
Answer:
Or are the frequencies detected the same as the resonant frequencies of the bars used?

The LIGO detectors, which measured the waves, do not use bar detectors; they use interferometers.  Bar detectors have been used for decades, but they have not been sensitive enough to make actual detections.  They are necessarily very short, which reduces the effect of a gravitational wave.  As you indicate they also have fairly narrow resonant frequencies at which they are most sensitive.  Interferometers, on the other hand, can be made 4 kilometers long (like the LIGO detectors), which magnifies the effect of the waves.  They are also sensitive over a fairly broad range -- roughly 40Hz to 2000Hz.
As anna v rightly points out, there actually are plenty of references to frequency if you look at the science papers.  I work in gravitational-wave astronomy, and decomposing things into frequencies is our bread and butter.  There's less coverage of this in the popular press, presumably because the public tunes out talk of frequencies, and pop-sci journalists know where their bread is buttered.  But Fourier transforms are really how the analysis gets done.
Answer: There are plenty of references made to the frequency. The gravitational waves that were detected swept up in frequency and amplitude from an undetectable level at a few tens of Hz to abut 150 Hz as the black holes merged. This is known as a "chirp".
Gravitational wave sources might have a variety of frequencies. For binary systems, the principle gravitational frequency is twice the orbital frequency.
A more general rule of thumb is that the highest gravitational wave frequencies produced will be at around the reciprocal of the freefall timescale for a system $f_{\rm max} \sim \sqrt{G\rho}$, where $\rho$ is the average density of the system. In the case of the merging black holes here, $\rho$ can be represented as the mass of the black holes divided by a volume defined by their event horizons and $f_{\rm max} \sim 1$ kHz.
As the event horizon radius is proportional to $M$, then $f_{\rm max} \propto M^{-1}$ and so merging events for supermassive black holes are expected to be at much lower frequencies.
For a core collapse supernova - $R \sim 10$ km and $M\sim 1M_{\odot}$ and my simple formula suggests gravitational waves with $f_{\rm max} \sim 5$ kHz.
Answer: You can classify GWs according to their power: When BH merge, the power in the final stage increases to probably $10^{40}$ watts and the frequency to around 200 Hz. These are the sources proven so far. You can receive them for a few milliseconds.
Binary systems of two stars like Algol emit about $10^{10}$ watts at frequencies around $10~\mu$Hz. These are continuous GW, which probably carry interesting information, such as the number, orbital period and mass of planets. Since the interferometers are insensitive in this frequency range, these signals cannot yet be received due to the lack of an antenna.
For years people have been trying unsuccessfully to detect continuous GW in the frequency range 20 Hz to 1000 Hz because only that can be received by the interferometers. It is unclear whether there are any sources in this frequency range that are not rotationally symmetrical. If there are fast-spinning pulsars with high mountains, they could radiate power around $10^4$ watts. If you compare this with the top performance of mergers, it becomes clear why searches have so far been unsuccessful.
There could also be GW at much lower frequencies around 1 nHz. If these were created right after the Big Bang at 1 Hz, redshift could have greatly reduced the frequencies. It is unclear whether there are preferred frequencies.

Gravitational waves frequency


How many database licenses do we need for setting 2 servers (nodes) into a cluster?

Question: Suppose we have a server that has only 1 CPU with 1 core, so we need 1 Oracle database license for installing a database into it. Now, if we would need to add a second server, combine them into cluster and install database into it, then how many licenses do we need - 2 database licenses and 1 Clusterware licenses or 1 database license and 1 cluster license? I'm not sure, how Oracle treats joined into Oracle cluster servers - as one server or still as separate servers? Because we would need to buy expensive Oracle cluster software, then it would be logical for Oracle to treat joined servers as one.
Answer: Oracle database licenses are quoted per processor, not per machine. They don't care whether you have two machines with two cores each or four machines with one core each. Both equate to 4 licenses you need to purchase.
For clustered installations, you need to purchase the appropriate database licenses and the RAC licenses.
Comment: You still need a RAC license per processor, so you would need two (assuming 1 processor per machine). Note that Oracle have a "processor core factor" multiplier which reduces the number of licenses you need. For example, intel chips are licensed at 0.5 license/core, so you would only need 1 EE and 1 RAC license if using these. See it [here](http://www.oracle.com/us/corporate/contracts/processor-core-factor-table-070634.pdf)
Comment: It also depends on the CPU scaling factor. Sparc and x86 are different.
Comment: Yes, I'm aware of licensing per processor, just wrote that for the sake of simplicity. In our case, we are thinking about Enterprise database licenses. I assume from your answer, we would still need 2 database licenses and 1 RAC license?
Comment: For those who may look at this question/answer and are considering Standard Edition, things are different.  SE requires no additional RAC license, and counts sockets as processors, ignoring cores and the core multiplier.  Also, the SE four socket limit applies to the entire RAC, not just each instance.
Comment: @LeighRiffel Don't we need Oracle clusterware 3rd party solution if we would use Oracle SE + included RAC? Oracle docs says "...When used with Oracle Real Application Clusters in a clustered server environment, Oracle Database Standard Edition requires the use of Oracle Clusterware. Third-party clusterware management solutions are not supported...". It appears RAC and clusterware are different products  http://docs.oracle.com/cd/B19306_01/license.102/b14199/editions.htm  So we still need to spend additional dime for that cluster ware
Comment: Re-read your quote.  RAC requires clusterware, either Oracle's Clusterware or some other clusterware certified for RAC.  SE RAC requires Oracle Clusterware and cannot use any other clusterware.


Is "win" in "i win" a performative verb?

Question: when you say "i win" before or after you win a game.
Is it a performative verb?
If it's not why do you use it?
Comment: @gotube Because the answer can be "no you don't I can capture your bishop" or "No you don't, my score is higher." In short saying "I win"  does not make it so. More examples in my answer.
Comment: Seems performative to me. Why do you think it might not be?
Answer: No.
"I win" describes the situation. It does not create the situation. That is, one doesn't win a game simply by saying "I win", not in any usual game. I suppose that if one player is the king, and the other is the court jester, when the king says "I win" then the king has won. Its good to be the king. That use would be performative , but usual uses would not be.
One says "I win" while playing a game to indicate that the speaker has now won. "I win" thus means the same as 'I have just won. In that sense it describes a state of things.
"I win" can also be a prediction. In that sense it is short for "The state of the game is such that I am sure to win."
Consider a game of chess. One player (perhaps white) can say "I win" just after checkmating the other player.  Or white can say "I win" after making a move which ensures that white n force a mate, perhaps in  5 or 10 moves.
A performative verb is one where a person makes the satemetn true just by saying it.
If I person says:

You're trespassing, I order you to leave.

then "order" is performative. Just by saying it, it is true, the person has given that order.
Other examples:

When a dictator says "I decree X" it is performative, that decree has been issued.
When a minister or judge says "I now pronounce you man and wife" that ios performative. They have been so pronounced.
When anyone says 'I promise to pay this loan" that is performative . The person has just mad that promise.
When a person says "I agree to X" then by sayign that, the person has agreed. It is performative
When a member of a town council says "I vote for Smith's proposal" it is performative . By saying that, the council member has voted.
When a Judge says "I rule ..." it is performative; by saying that the judge has ruled.

In short when the verb describes making a statement or a decision, adn that of saying so makes it true, it is performative.
Moat of these cases can also apply to writing something down, when writing it makes it true.  The judge may give a ruling, or the dictator make a decree, or anyone may make a promise, by writing it down.
Comment: so you can use present simple to describe current situation? I have never been taught about that. what is this usage called?
Comment: and why don't you use I'm winning instead?
Comment: @SA LEM  I don't know a term for this usage. It is probably more formally correct to say "I have won". Using "I win" is shorter, and is in common usage by native speakers.


Google Wildcard Operator (*)

Question: I am using the google ajax rest api and I'd like to get local results by prefix. For example: I type in "sta" and I get "starbucks".
I wonder if there is a documented or undocumented wildcard operator that that allows you to find results that start with a string.
I know that Google does have a wildcard operator but it works on a word-by-word
basis. Like this: starbucks * => starbucks coffee
Here is a list of Google Search Operators none of which offer the starts-with functionality: http://www.google.com/support/websearch/bin/answer.py?hl=en&answer=13...
Thank you.
Answer: What you're looking for is a Google Suggest API for the local search. Given that there seems to be no official Google Suggest API, you aren't likely to find one for the local search. However, there are plenty of products (including Firefox and the Google Toolbar) that make use of Google Suggest, so the methods they use probably aren't going away. A quick search for a Suggest API turns up many solutions that have been put together by various people. I recommend you pick one that looks like a good fit and try to make it work with the local search (if that actually turns up different results).
Answer: Probably not the answer you want to hear, but I'm reasonably certain that what you're looking to do isn't supported.
Answer: You can, in the standard search box, string together multiple wildcards, e.g., star* * , where wrapping that in quotes may further get you the phrase you want, e.g., "star * location*".
Alternatively, you may find some success using the AROUND() search filter [all caps], e.g., star* AROUND() location. The AROUND() filter also accepts an inclusive numerical filter, e.g., "star* AROUND(3) location*", which would return any words that start with star and which are within three words or less of location, locations, etc.
To contrast, the * denotes a specific number of spaces, e.g., star* * * location, where star is exactly three terms away from location, but not one or two locations or away. star* AROUND(3) location would return results where star and location are three terms or less apart.
YMMV as to whether these advanced Google Search filters can be used as part an API query.

Google Wildcard Operator (*)


Trigonometric Functions—Arbitrary Angle Definition

Question: Both the angle $\theta$ and the shaded triangle share the same adjacent and hypotenuse $-3/5$ since $\cos = \text{adjacent/hypotenuse}$. But, since we know $\cos(135^\circ)$ is not equal to $\cos(45^\circ)$, how should I interpret the shaded triangle angle?
Answer:
Both the angle $\theta$ and the shaded triangle share the same adjacent and hypotenuse $-3/5$

This uses the definition of $\cos$ for the entire range $\theta \in [0, 2\pi)$ based on the unit circle, where the sides are considered as signed segments and, indeed, $\cos(\theta) = -3/5$.

since $\cos = \text{adjacent/hypotenuse}$.

This, on the other hand, uses the geometric definition of $\cos\,$ for acute angles, where the sides of the right triangle are considered as positive magnitudes. In this case, $\cos(\pi-\theta)=3/5\,$, indeed.
Quoting from wikipedia's Trigonometric functions - Right-angled triangle definitions:

In ordinary Euclidean geometry, according to the triangle postulate, the inside angles of every triangle total $180^\circ$ ($\pi$ radians). Therefore, in a right-angled triangle, the two non-right angles total $90^\circ$ ($\pi / 2$ radians), so each of these angles must be in the range of $(0, \pi/2)$ as expressed in interval notation. The following definitions apply to angles in this $0 – \pi/2$ range. They can be extended to the full set of real arguments by using the unit circle, or $\;\dots$
Comment: @youcanlearnanything Key difference is that the right-triangle definition uses the *positive* magnitudes of the sides and is only valid for acute angles, while the unit circle definition uses *signed* lenghts for the sides and is valid for any angle. This has nothing to do with degrees vs. radians or other angle measures, but with how `adj` and `hyp` are interpreted in each definition.
Comment: @dvix now I got it. thank you!
Comment: In other words, both acute and obtuse angles are right to use the definition of adj/hyp for cosine. The only key difference comes along if we apply it with degree. i.e. cos(45) and cos(135) ?


What happens if a Muggle born wizard/witch can't afford Hogwarts supplies?

Question: What happens if a Muggle-born wizard/witch receives a Hogwarts acceptance letter but their family is very poor and doesn't have money to buy the school things on the shopping list? Would Hogwarts give them some kind of financial help?
Comment: Makes me wonder where someone from an orphanage (naming no names that must not be named) would get supplies
Comment: A good question, but alas a topic already covered (in significantly more detail) in a duplicate.
Comment: if it's a fan game: a bunch of sidequests, that double as a tutorial
Answer: We do know from one of Dumbledore's memories that Tom Riddle could go to Hogwarts with a fund from the school, which is presumably available to students in financial hardship.

When [Tom] had finished he turned to Dumbledore and said baldly, "I haven't got any money."
"That is easily remedied," said Dumbledore, drawing a leather money pouch from his pocket. "There is a fund at Hogwarts for those who require assistance to buy books and robes. You might have to buy some of your spellbooks and so on secondhand, but —"
 - Harry Potter and the Half Blood Prince, Chapter 13: The Riddle Secret
Answer: In "Harry Potter and the Half-blood Prince", you see in Dumbledore's memory that he gave Tom Riddle a sack of gold, in order to buy school supplies.


What is the optimal grid size?

Question: What is the optimal grid size for high density commercial / residental areas?
(also in order to avoid too many cross roads for traffic jams)
Answer: The largest growable building footprint in the game is 4x4, so if you want to maximize the efficiency of your grids, you'll want to make sure the greatest distance between two parallel roads is 8 tiles, otherwise you'll leave a gap in the middle that can't be filled.
As far as the perpendicular roads go, that's going to depend on your situation. Residential and Office zones produce less traffic congestion, so larger grids with fewer access roads can work just fine (Some of these zones in my cities can be as large as 20x8 or 30x8). With commercial, you may consider smaller grids, as it attracts more traffic. Also, as suggested in the comments, a "brick" pattern using three way intersections is helpful, as it eliminates a potential left turn that can back up traffic.
The main thing though is not to attach too many intersections to your large, "main artery" roads. You need to find a balance between giving the AI options on ways to get into and out of the grid and onto and off of the main roads to avoid bottlenecks, but you also don't want them stuck trying to get through three dozen traffic lights to get to the store.
Comment: Nope. Think of it like a "+" sign verses a "T" shape. You can turn left from any of the "+" sign's arms, but on the top of the "T", there's nowhere to turn left when coming from the left side.
Comment: *a "brick" pattern using three way intersections is helpful, as it eliminates a potential left turn that can back up traffic* Does it mean that the road has to be 1-way?
Answer: Someone Did The Math (Practical Engineering: The Optimal Square Grid by me22.ca) and I have summarised that content here - note that their numbers refer to the size of each square including roads, but I will use the sizes between the roads as this is more natural to most.

The optimal square grid size with standard 2-lane roads is 10x10 which leads to a density of 66.666...%, even though it leaves a 2x2 "dead zone" in the middle. This is also cheapest in terms of road-building.

The most obvious 8x8 grid is "only" 64% efficient, which may not sound much worse, but requires 50% more road length and is therefore that much more expensive than the previous option.

For grids bounded by 4-lane roads, the optimal size is 12x12 but density drops to a meagre 50%.

You can get higher density by using rectangular zones instead of grids - e.g. 8x14 is 70% density and 8x30 is 75% - but there are obvious disadvantages to this, notably in terms of traffic flow.
Comment: @me22 I'm sorry, I wasn't aware that the site I originally linked to had stolen your content. If you would like for me to delete this answer so you can post your own, please let me know.
Comment: No worries.  You writing the answer here is totally fine by me.  The citation is all I wanted.
Answer: I use the 'Battery' Method for starting (Google YouTube Battery City Skylines). This provides a 4 x 8 grid, either side of a large one-way system.
Most importantly, turn off Traffic Lights ALWAYS. When Traffic lights went out in London, it was found that there were fewer snarl ups on the roads and traffic moved more smoothly - it's worth remembering that. The reason is that a red light will stop traffic, even when it's not impeded, whereas no traffic light will not.
Comment: Hi Judi, please incorporate the information from the link you provided into your answer. This way, the answer will stay valid (and it won't get closed as "link-only"). Also, the comparison with (what I assume is real life) London seems far-fetched, as, even though the example might work in this particular case, C:S has limited artificial intelligence (unlike, AFAIK, real Londoners).

What is the optimal grid size?


Aquiring a Dutch Passport - married for 30 years

Question: My husband of 30 years has a Dutch Passport, my two sons as well.  We lived in The Netherlands from October 1992 - September 1995. We went back to South Africa in 1995.  Can I apply for a Dutch passport even if we are not living in The Netherlands (We live in SA).  I have a 5 year Visa allowing me to be in the 90 out of 180 period.  My sons live in the Hague for 6 months of the year (Husband has rented an apartment).  We travel quite often and the 90/80 day is becoming a problem. Do the 3 years we lived here in 1992 count at all in my favour?
Comment: I do not think so. See [Becoming a Dutch citizen](https://www.government.nl/topics/dutch-citizenship/becoming-a-dutch-citizen)
Answer: The qualifications for naturalizing as the spouse or partner of a Dutch national are listed at Can I become a naturalised Dutch citizen abroad?  Among them is a requirement not to live in your country of nationality.  Therefore, if you are a South African citizen, it seems that you won't qualify.  The full list is

you are 18 or older
you have passed the naturalisation test
you are not a national of the country where you live
you meet the conditions for a Dutch residence permit for non-temporary purposes of stay
you have not committed a criminal offence in the past 5 years
if necessary, you are prepared to renounce your current nationality
you are prepared to attend the naturalisation ceremony and take the citizenship pledge.

I believe the renunciation of your current nationality is not required because you are the spouse of a Dutch national, but I'm not sure about it.
In any event, you see that it might be possible in your case but it would require an investment of a good deal of time.
You should also be aware that as the spouse of a Dutch citizen, you are entitled to stay with your Dutch husband in any other EU or Schengen country without regard to the 90/180 rule and with very few administrative requirements.  For more information, see the summary or the directive itself.


Polynomial term in logistic regression

Question: I've made a logistic regression model that includes a polynomial term to degree 2. I'm aware that logistic regression models the response variable as a non-linear function of the predictors. Does it make sense to include a polynomial term in logistic regression?
Comment: This is fine. If you'd like, you can see an example in my recent answer here: [CDF and logistic regression](http://stats.stackexchange.com/a/91947/7290).
Answer: Logistic regression models the log odds of a "1" or "success" response as a linear function of the regression coefficients (i.e. the parameters), but there's no need to insist that the log odds be a linear function of predictors.
[This model is linear in parameters & the predictor:
$$\operatorname{logit}\pi_i = \beta_0 + \beta_1 x_i$$
This one is linear in only the parameters:
$$\operatorname{logit}\pi_i = \beta_0 + \beta_1 x_i + \beta_2 x_i^2$$
]
Just as with ordinary least-squares regression, polynomial predictor terms can be used if required by theory or simply to allow for curvature in empirical models.
Comment: luciano: If you want to think of it in terms of the probability; then yes, its a curved relationship, but still restricted in form - rotational symmetry around the point of inflection at the inflection point at $\pi=\frac{1}{2}$ - you can only shift or stretch the logistic curve when you fit the two parameters. Polynomials allow more flexibility. See @gung's link for an example.
Comment: Correct me if I'm wrong, but the formula to convert predicted values from log odds to probabilities (values between 0-1) is non-linear. So doesn't logistic regression already allow for curvature?

Polynomial term in logistic regression


How to order a beer without garnish, simply?

Question: Is there a simple word for ordering a beer sans garnish?  Say for instance I want a Hoegaarden...  It's a great beer in it's own right, and I don't want it to come decorated with a slice of orange that I have to take responsibility for disposing of.  How can I order the beer without it, quickly and easily?  I've tried "no decoration," but that sounds pretentious.  For a scotch, I would say "neat."  Is there a way to do that for beer?
Comment: I figured when writing this that Europeans wouldn't do something like that.  American's seem to want more flavor though...  Mais, ce n'est pas pour moi. ;)  Merci pour la réponse !
Comment: How kind of you to respond in French. However I do speak French and my name suggests I am French speaking, I am from the Dutch part of Belgium (Northern part) :).
Comment: +1  I hate it when they put a slice of lemon or lime in a [Negra Modelo](http://www.beeradvocate.com/beer/profile/75/667/?ba=bros).  Might as well put lime in Guinness - Bleugh!  I usually specifically ask for NM "with no lemon".
Comment: I am from Belgium and I have never heard that people put a piece of fruit on a Hoegaarden beer. In Belgium, we never do that. I guess saying the beer without fruit or anything is fine :). Oh, and mention they shouldn't forget the glass, then it sounds funny :P.
Answer: For me, I usually just ask for "no fruit" or "no orange/lime/garnish" and it has always seemed to work. Sometimes I will say "straight up" though I do still get the garnish on occasion I've come to find. I am not sure if this was because the bartender was busy and forgot or if there was some other reason, but I just tend to not say this as much anymore. I've never felt pretentious when I ask, I feel like I am just asking for a beer as is because I just happen to not want the garnish in it. Just be polite about ordering it and I am sure you won't come across as pretentious.
Comment: I'm thinking that there really isn't a word for it, but you get props for saying what I would say...  Thanks!
Comment: I try to say "no fruit" as well, and you're right, it's not super pretentious.  It's just not smooth, which is what I'm after.  Using "neat" for scotch is smooth and non-negative.  That's really what I'm going for...
Comment: A friend of mine always says "no salad" when ordering her corona. Maybe not as clear but definitely funny!


PowerShell Socket object different if created through function, vs. through the CLI

Question: I have a function:
function QuerySMTPServer ([string]$strSMTPServerName) {
    # open up a socket to the SMTP server
    $socket = New-Object System.Net.Sockets.TCPClient
    $socket.connect($strSMTPServerName, 25)
    $socket # output for testing

    # read response data (should be a line starting with 220; cf. RFC821)
    $stream = $socket.getStream()
    $stream # output for testing
    ...

If I run the function and pass it our (well-configured and running) SMTP server address, the $socket and $stream objects that are outputted tell me I have 0 bytes available on the socket, and No data available on the stream:
PS C:\Users\dan.maftei\Documents> QuerySMTPServer "internal-smtp.XYZ.com"

($socket)
Client              : System.Net.Sockets.Socket
Available           : 0
Connected           : True
...
($stream)
DataAvailable : False

However, there IS indeed data available, since I can create a byte array and read into it with the read() method off the $stream object. In fact this is precisely what I do in the remainder of the function, and it all works without error. (!)
Weirder yet, if I manually input into the PowerShell executable the exact same cmdlets my function calls, my $socket suddenly (and rightly) claims it has 79 bytes of data, and my $stream likewise says it has available data:
PS C:\Users\dan.maftei\Documents> $socket = New-Object System.Net.Sockets.TCPClient

PS C:\Users\dan.maftei\Documents> $socket.connect("internal-smtp.XYZ.com", 25)

PS C:\Users\dan.maftei\Documents> $socket

Client              : System.Net.Sockets.Socket
Available           : 79
Connected           : True

PS C:\Users\dan.maftei\Documents> $stream = $socket.getStream()

PS C:\Users\dan.maftei\Documents> $stream

...
DataAvailable : True
...

What is going on?? Why do I get different objects if I run those very few cmdlets via the CLI as opposed to via the function? Why can I still read data off my $stream even though apparently it has none according to the output in the function?
Answer: cf: http://social.technet.microsoft.com/Forums/en/winserverpowershell/thread/d6420c96-3cdc-4af8-86d3-224b61a3b52f
2nd post, by jrich: PS is hasty in scripts, it doesn't wait for remote data; making the script sleep for a second (which is probably overkill) fixes everything.


How is the key obtained when I login via VPN?

Question: So, I configure my VPN (let say which uses PPTP protocol), enter the server name, username and password. Then, I visit a website. Before that, my request is encrypted using AES with some key. That request is sent to the VPN. How does that VPN decrypt data? How can it know what the key is? How is that key obtained between two parties? Or is the first request is sent with my username and password, VPN checks if user exists, generates the key, and sends it back to the user? But it would be insecure to do that. Also, a different key should be created when I login via mobile.
Comment: PPTP doesn't use encryption -  it relies on being tunneled within another protocol for security.
Answer: The precise details will depend upon the specific VPN software you use, but generally, the same cryptographic key will be pre-loaded into both ends of the VPN.  It may be specified in a configuration file, or derived from a passphrase, or in some other way made available to both endpoints.  That's how the VPN software on your machine encrypts data and how the VPN software on the end end can decrypt the encrypted data.
Answer: PPTP itself, as specified, does not include any encryption; but the most widely used PPTP implementation, shipped with Windows, includes a non-standard encryption layer, which turned out to be quite poorly done and thus crackable in many ways, some of them generically deadly. In this specific case, the key used for encryption was computed deterministically (through a simple hash function invocation) over the concatenation of the hashed user password, and a random nonce which was exchanged (as cleartext) during the initial authentication step.
In general, for a symmetric key to be shared between two systems, there are two choices:

The key is derived from an initial shared secret, which was set through some initialization procedure. This is what Microsoft was doing with PPTP, the "initial secret" being the (hash of) the user's password. The derivation can include some random values (which must be sent from one system to the other) so that a different key is generated each time.
A key is generated dynamically with a key agreement protocol. This is the model of SSL, and, indeed, there are VPN implementation which use SSL (e.g. OpenVPN). In order to prevent Man-in-the-Middle attacks, some sort of authentication must occur; SSL uses X.509 certificates. See this answer for some explications on how such a thing as created a shared secret out of thin air can actually work. Differences between a VPN, and a browser-to-Web-server HTTPS connection, are not relevant here: the same concepts apply.


How to monitor output sound from terminal

Question: Is it possible to read current volume or frequency of outgoing sound from terminal? I am using OS X Mavericks
Comment: Volume maybe since it is one single value (a number). Displaying a frequency as a single number is a problem.
Answer: You can get the volumes of the currently selected input, output and sound effects/alert device as a percentage value with an AppleScript one liner:
osascript -e "(get volume settings)"

which gives something similar to:
output volume:56, input volume:63, alert volume:28, output muted:false


Anxious dog howls and screams when we take our other dog out

Question: So we have three dogs of ages: 5, 3, and 7 months. We take the two older dogs outside to go potty at the same time and take the puppy separately because she gets distracted to easily. Whenever we take the puppy out our 3 year old starts jumping on the gate and screaming as loud as he can and absolutely freaking out. We tried switching it up and taking him out with the puppy and taking the 5 year old out alone, and he did the same thing. Is this some form of separation anxiety? Is there anything we can do to stop it? I'm at a loss as to what to do at this point.
Comment: You say "we", so you have a partner who can stay behind with the dog? Is the dog who howls bloody murder food oriented?
Comment: There's always somebody inside with him when the puppy gets taken out.
Answer: It sounds like your dog is indeed very anxious.
The answer of user14052 has the potential to solve the problem, but depending on how you interact with your dog, it could make it so much worse.
Let me explain: For the sake of simplicity I'll refer to the 7 months old dog as "Puppy" and the 3 years old as AD (anxious dog).

"Puppy outside" is a stimulus that is connected to negative feelings. AD expresses these negative feelings by yowling.
Eventually, Puppy comes back inside while AD is still yowling. He connects his action (yowling) with the positive outcome that Puppy returns. This is a self-amplifying behavior.
If you talk to and pet AD while he's yowling, you actually reward his yowling, which amplifies the behavior even more.

But you could use the same mechanism to change and eventually stop the behavior in a process called "Classical conditioning". (This is actually the foundation on which any type of pet training is based.)
The Stimulus
We already established that AD reacts to Puppy going outside alone. Fortunately, you are completely in control of when and how long AD is subjected to this stimulus.
The New Reward
You need to analyze what is the best possible reward for AD. Most dogs react best to:

Food. Almost all dogs react positively to treats. For the training, you should choose a very special treat that smells absolutely, irresistibly delicious and he never gets outside of the training (like a hotdog wiener or cheese).
Play. Some dogs won't accept treats when they're too excited, but a short play session is always welcome. This works best for dogs that are very focused on toys, like the typical "ball junky"

Bad choices are:

Verbal praise. Since AD is very verbal and loud, he wouldn't perceive your praise as a reward, but probably as you joining him in his yowling.
Petting. Most dogs love to be petted in a calm situation, but in a training situation, petting was proven to be inefficient.

The Conditioning
The training is simple in theory, but will most likely require several weeks to change the behavior of AD.

One person goes outside with Puppy, one stays inside with AD
Before Puppy goes outside, you prepare the reward (get the toy or food)
When Puppy is outside, you distract AD with the reward. Be absolutely blunt and hold it right under his nose. He must notice the reward over his own anxiety. It's absolutely vital that AD sees Puppy go outside first (his stimulus) before you introduce the reward.
When you caught his attention, move the reward slightly away, so that AD has to turn his back to Puppy in order to get the reward. If he's too focused on Puppy, you can skip this step for the first few training sessions.
Reward AD intensely for a long time to make this reward better than his yowling. That means: play with him enthusiastically until Puppy returns or feed him one tiny piece of treat after another to stretch it out.

If the third dog wants some of the reward as well, either share it or lock him into another room for the duration of the training if he's disrupting too much.
Eventually this will connect the stimulus of Puppy going outside with positive feelings. After a few weeks of training, you can start to decrease the reward in small increments until, eventually, you can go outside with Puppy while ignoring AD.
Comment: Thank you for the very detailed response. I'll definitely give that a go, I usually hold onto him and make him sit until the puppy gets brought back inside but he bowls and yells the whole time, I never thought I could be making the behavior worse.
Answer: Have you tried just 1 of you walking the pup and the other staying behind to comfort and console the other? The 3 year old for sure has anxiety. Have some one stay back with him and pet and talk to him in a calm voice over time he should adjust. Say things like its ok, calm down ect and as he starts to calm down reward him with a treat.
Comment: This sounds like great advice. I guess it's more about the tone of your voice than what you say?


Ukranian зозуля cuckoo

Question: I unfortunately did not find the etymology of Ukranian word зозуля zozúlja cuckoo. May it be a satemization ?
Comment: Have you looked in Vasmer? He lists a number of cognates under _зегзица_
Comment: I can not good enough read Russian texts.
Comment: there are german editions of Vasmer, I believe, just not as widely available online.
Answer: As Jk wrote in his answer, the regular sound changes stop working regularly when it comes to onomatopoetic words. However, it does not mean that the sound changes do not occur and cannot be researched.
To give you some data points, here is the article from
Vasmer's etymological dictionary which lists some possible cognates from Slavic, Baltic and Germanic languages. (I have translated the language names and key words from  Russian to English, but not the references)

WORD: зегзи́ца
GENERAL: "cuckoo", dialectal жегозу́ля, заго́за (Novgorod), заго́ска, зазу́ля, зозу́ля, Ukrainian  зегзи́ця, зезу́ля, Belr. зозу́ля, зязю́ля,
  Old East Slavic зегзица (СПИ), зогзица (Срезн. I, 994), also жегъзуля (Толк. Палея; см. Соболевский, Лекции 143), Chech žežhule, Slovakian žežhulica, Polish gżegżóɫka.
ORIGIN: Pra-slavic *žеgъzа with various distant assimilations; cognate with Lithuanian gegužė̃, hence gegà, gẽgė, Latvian dzęguze, Old Prussian geguse, further: Old Icelandic gaukr, Old High German gouh; see Меіllet МSL 12, 213 и сл.; Trautmann ВSW 81; Аltpreuss.Sprd. 336; М.--Э. 1, 539 and futher.
  There is no reason to assume borrowing from West Slavic into Russian, contrary to Bulakhovsky (ОЛЯ, 7, 108). Doubts regarding the affiliation of the
  Old Icelandic gaukr see Holthäusen, ZfslPh 24, 451.

As one can see, palatalisation might play a role transforming former g into z or ž, but in that case it happened in the Balto-Slavic period, long after satemization.
Answer: Words like cuckoo or зозуля zozúlja are onomatopoetic and thus impossible to tract by historical linguistic methods. Because they are linked to natural sounds (in this case the call of the bird) they do not follow the regular sound laws. They also tend to be re-created anew ex nihilo (i.e., just from the natural sounds they are imitating).
TL;DR Nothing conclusive can be said about this one.

Ukranian зозуля cuckoo


Posting links to executable files and security

Question: If someone is able to post on the forum of my website links to executable files (malware) hosted on remote websites: can we say that my website suffers from a security hole ?
Comment: When malware links are shared between security professionals, it is often modified to prevent accidential clicks. example: hxxp://site/dragonsbehere.exe - this modification is done as a gesture to keep the recipient safe from what the link leads to. If it is shared with malicious intents, it will surely not be defused like this
Answer: If you are simply talking about someone posting a link on your forum maliciously (in other words intended to actually hurt the end-user not for sharing between security professionals) I would not necessarily consider it a security hole.  I would, however, inform your visitors that they are leaving your site and you have no way of knowing if the site is safe.  This is probably the route I would take.
You could also try and a script that would scan the link and make sure it is not an executable using CURL.  If I went this route I would probably white-list Content-Types to: html and image types and still display a warning as it is not fool-proof.
Fleche gave a good answer, and I advise you read it too.   I would also like to point out that most websites that allow links to other websites do it without any kind of warning.  So, you should be okay to do the same.  The only places I've seen diferenet are places like oDesk.
Answer: A link by itself doesn't do anything. The question is how your webserver reacts to the request.
If the server simply sends the file content to the client, this doesn't cause any trouble (at least for the server). It's just a static file. But if the file gets executed by the server, then you have a problem. This depends on the webserver configuration. For example, a file ending with ".php" might be regarded as a PHP script and run on each request.


Relativity: correct way expressing energy?

Question: In relativity, if two particles are moving together, which way is the correct way expressing their total energy:
$$ E=\sqrt {((m_1+m_2)c^2)^2+((p_1+p_2)c)^2}$$
or:
$$E=\sqrt{(m_1c^2)^2+(p_{1}c)^2}+\sqrt{(m_2c^2)^2+(p_{2}c)^2}$$
Or does it depend on frame of reference?
Comment: Where does the half in the second expression come from?
Comment: Sorry, My mistake. The 1/2 is wrong
Answer: The total energy of the particles will depend on the reference frame. Any particle in its rest frame has only its rest mass energy $E = mc^2$. In any other frame, it will also have energy of motion in addition to rest mass energy.
In the center of mass frame, then, if neither particle is moving the total energy would be $E_\text{cm} = (m_1+m_2)c^2$. You can then translate this to other frames if you like.
More generally, to get the total energy of a set of particles in any given frame, just add up the energies of the particles individually---the second method proposed by the OP.
Comment: To clarify, the center of mass energy wouldn't be $(m_1+m_2)c^2$ unless both the particles are also at rest in the COM frame. I guess this is nonetheless correct for the case OP is interested in, assuming they mean the two particles are at rest with respect to each other when they say "two particles are moving together". It's a bit unclear to me what the OP meant with that phrase, thus the comment.
Comment: I edited this answer in order to make it more compete and thus less misleading.
Comment: Yes, what I wrote was for the case where the particles are moving together. Thank you for clarifying.
Comment: How do I then transform the energy back to lab frame?
Answer: Let us see an example :
In the lab frame of reference, there are 2 particles A and B of the same mass $m$ approaching to each other with the velocity of $v_{A,lab}=\frac{3}{5}c$ and $v_{B,lab}=-\frac{4}{5}c$, with $c$ is velocity of light.
The total relativistic energy $E$ and momentum $p$ in this lab frame are
$E_{lab}=E_{A,lab}+E_{B,lab}=\gamma _{A,lab}mc^2 + \gamma _{B,lab}mc^2=(1.25\, +1.6667) mc^2 =2.9167 mc^2 $
$p_{lab}=p_{A,lab}+p_{B,lab}=\gamma _{A,lab}mv_{A,lab} + \gamma _{B,lab}mv_{B,lab}=(0.75\, -1.3333) mc =-0.5833 mc $
, with $\gamma =\frac{1}{\sqrt{1-\frac{v^2}{c^2}}}$ .
In particle A frame of reference, $v_{A,A}=0$ and
$v_{B,A}=\frac{v_{A,lab}+v_{B,lab}}{1+\frac{v_{A,lab}\times v_{B,lab}}{c^2}}=\frac{35}{37}c$ (use relativistic velocity addition formula).
The total relativistic energy $E$ and momentum $p$ in this A frame are
$E_{A}=E_{A,A}+E_{B,A}=\gamma _{A,A}mc^2 + \gamma _{B,A}mc^2=(1\, +3.0833) mc^2 =4.0833 mc^2 $
$p_{A}=p_{A,A}+p_{B,A}=\gamma _{A,A}mv_{A,A} + \gamma _{B,A}mv_{B,A}=(0\, -2.9167) mc =-2.9167 mc $
We see that $E_{lab}\neq E_A$ nor $p_{lab}\neq p_A$ .
However, the invariant quantity is
$E_{lab}^2-p_{lab}^2 c^2=E_A^2-p_A^2 c^2 =8.1667 m^2 c^4$ .
Comment: Wow thank you!!
Comment: To improve your answer, can you answer the question directly before providing a numerical example (which contains the answer... but one has to go through it to see or else know enough to recognize it)?


What does Encryption at REST and HTTPS mean?

Question: What does it mean when apps claim they encrypt at REST and HTTPS? I find this a little difficult to understand how different they are from the rest of the encryption-based Apps.
Comment: @GxTruth The term "encryption at rest" has nothing to do with the REST API architecture.
Comment: Using all caps for REST makes this post much more confusing for some. REST encryption is a very different topic than encryption-at-rest.
Comment: @GxTruth actually I'd like to see an app developer use the term "encryption at REST" and see if the developer made this mistake ...
Comment: @AdrianLarson yes, but that's the whole point of the question: there is confusion on that very point. This is inadvertently one of those "meta" questions where the question is itself the answer. To correct the capitalisation in the question is to fundamentally alter the question.
Comment: PLEASE **do not edit the question to change the capitalisation**. To do so will only irreparably harm the whole basis for the question.
Comment: Edit: Scratch that, see Mike Scott's comment... ~~Can you provide an example of an (web)-app claiming this? As REST is basically a HTTP(S) API it's a best practice to encrypt it using TLS.~~
Comment: @MikeScott Thanks for pointing that out. I never heard the term REST outside of API-context. Something new learned again.
Comment: I guess you could do another encryption at the application layer, there are some HTTP headers you could use for that.
Comment: Please give an example of such a claim.  hypothetical hearsay is hard to answer.
Answer: HTTPS is one form of "encryption in transit", which means that data passing over the network to or from the application is encrypted. "Encryption at rest" means that the data the application stores on its local storage is encrypted, so that an attacker who can access the storage but not the application itself can't read the data.
Comment: @OrwellIsRight it all depends on what the "encryption based app" is designed to do.
Comment: @OrwellIsRight No, they dont. In the majority of cases a compromise in data storage also means a compromise of the application runtime (especially for apps running and storing data on the same physical machine). If the application runtime is compromised, encryption wont save you.
Comment: A perfect example would be a web browser. Even though a webpage is served over encrypted HTTPS, the content is often stored unencrypted on the disk-based cache. (@marstato In this example, code signing would help prevent compromise of the browser)
Comment: Perfect, Between don't all encryption based Apps do that ? I as a user would also like my local App data to be Encrypted.
Answer: HTTPS a protocol with which an application can communicate securely with a backend service, such as a database. It is the encrypted companion of another protocol, called HTTP. You've most likely seen those 2 protocols being used if you've ever used a web-browser on a Desktop machine.
When an application claims that it's using HTTPS, it's telling you that information you provide is transmitted using a secure, encrypted connection. This is especially important for sensitive tasks, such as credit card transactions, where a potential badguy otherwise would be able to eavesdrop and steal your creditcard information.
Thus HTTPS provides you with encryption in transit which leaves us to the next part.
encryption at rest is a term used by applications to notify you that they employ some sort of encryption scheme to protect the data that they store. Building on the example above, once your credit card transaction is complete, the app might ask you if they should save the provided information to make the next purchase quicker (I'm not quite sure that's okay if you want to stay PCI compliant, but bear with me here). If you agree, and the application claims to use encryption at rest, then you can be pretty sure that they encrypt the stored credit card details.
Please do remember that using encryption at rest does not mean that everything is encrypted. It also doesn't mean that the encryption in use is of sound design or is safe to use. Look for information where they specifically state what algorithms and ciphermodes being used. If they're willing to part with that information, you can be pretty sure they know what they are doing.
Comment: Mads, can you give an example of data which was encrypted using algorithms or ciphermodes NOT of "sound design" and resulted in a high-profile data breach?
Comment: @darkin: Many application used to (in the old days) store passwords hashed but not salted. Though the hashing was secure if you know one password and see its hash then you can determine any password with that hash. That would be an example of secure algorithm but not a sound design. Hopefully all sites have fixed this kind of issue by now.
Comment: @MartinYork: Of course, that's assuming the people storing the password had even the *slightest* clue about hashing vs. encryption, which is [surprisingly often not the case](https://nakedsecurity.sophos.com/2013/11/04/anatomy-of-a-password-disaster-adobes-giant-sized-cryptographic-blunder/).
Comment: @daikin: One example could be the broken encryption scheme in Office 97-2003: https://hashcat.net/forum/thread-3665.html and another one could be the Heartbleed vulnerability in OpenSSL which, if I remember correctly, was estimated to have cost 500million USD worldwide.


Time Capsule external connections

Question: I recently purchased a new 2TB Time Capsule. Can I connect my old Time Capsule to it to serve as an external drive?
Answer: Yes. You can use the New as main router and create a WiFi network. Then have the Old join in (as an Access Point in jargon). It's the same is accessing a shared disk on another Mac laptop/desktop.
Or you can link them with Ethernet cable.

Time Capsule external connections


Proper way to show popup data on a web page?

Question: I have a list of items for which I want to show a couple of items, then a "more" button.  I would like the more button to show the new items in a popup box. There are many ways to make this work, but I'm trying to figure out what is the best practice.
Here is my approach. We use MooTools and Clientcide on our site:
Directly following the "more" button, I include a div that contains the content I want to put in the popup (the full list, including a duplication of those items that are visible by default), with a class that includes the style "display:none".
I attach an event to the more button that runs a script called "popupNext". popupNext takes the next element after the button (using getNext from mootools), and creates a new StickyWin (via Clientcide and stickywin.ui) with that element as its content. Then (and this is the part that feels especially hacky) it removes the class that includes the "display:none" style from the content element.
Finally, I use element.store() (from mooTools) to store the StickyWin (with the key "win") in the event element.  I neglected to mention above: when popupNext runs, it first checks via element.retrieve() whether there is an existing StickyWin, and shows it, if there is.
This all seems OK, I guess--the biggest disadvantage is page bloat--while I'm showing only first couple of elements of each list, there may be more that are loaded with each page but never seen.  But I'm curious whether there is some better, standard way of doing this. For example, I could reduce bloat by retrieving the elements via ajax, at the expense of slower response when a user wants to see the full list.
Answer: Check out StickyWin.Ajax - it seems to be closer to what you need than the plain StickyWin.
Comment: Thanks for the suggestion. While I use StickyWin.Ajax in many places, I'm concerned enough about speed that I'd rather not use Ajax for these cases.


Find My iPhone issues

Question: This answer, or something extremely similar, has already been asked before, at MacBook Pro locked with Find My Mac and won't let me boot. That said, this question is not a duplicate, as I need an answer not listed there. One of the solutions was holdign down command-option-P-R as the computer turned on. This does not work for me, even though it should. Apple support has said I would need to come in to a store, but as it's a long drive, I would prefer to find an answer that does not require me to drive there. If nobody can answer this, please tell me what they would do at the Apple store, if you know.
Comment: In the link you provided, "MacBook Pro Locked..." one of the answers indicated that the person took their Mac to the Genius Bar and they "unlocked the firmware" and only then were they able to start it up with command + option + P + R.
Comment: Right. I'm just trying to find a way without making the long drive to the apple store.
Answer: What they would do in the store is work with you to make sure you don't really have access to the Apple ID. They would also seek to identify you as the original purchaser - if you can provide proof of identity and proof of purchase, they might have a procedure to erase the lock.
I would work with AppleCare on the phone or internet to see if they can help with the Apple ID. Then you can decide to drive in person to Apple or perhaps see if there is a closer Apple Technician that could assist you with an unlock. The benefit of Apple is they don't charge money for this service - and you might pay someone else to assist.
Comment: I have already worked with the AppleCare people, and they simply told me to go to the technician. The reason why I ask here is that it is a long drive away, and I'd rather figure out a way to fix it myself.

Find My iPhone issues


Making brownies but don't have a hand whisk? Can i substitute with electric mixer?

Question: Hey guys im making brownies but i don't have a whisk. Can i substitute with a electric mixer on low switching on and off occasionally? Would that lead to overbeating the mixture
Comment: Does the mixer have a whisk attachment?
Answer: Brownies don't need whisking. Whisks are handy tools that make it easier to blend the ingredients in together but a fork to beat the eggs and a spoon to mix everything will do just fine. You won't get any real benefit from using a mixer, you'll just make more dishes dirty.
Answer: A mixer with whisk attachment is generally a good substitute for a whisk. Both are used to integrate air into a mixture or combine the ingredients. If the recipe calls for a whisk and I have non at hand, I simply use a mixer. Overbeating shouldn't be much of a problem, if you stop as soon as everything is combined/airy enough. In case I don't have a mixer, too, or it is just a very small amount, for which a mixer would be overkill, I simply use a fork. It is basically a very rudimentary whisk. It takes longer and is definitely more tedious, however, i even made meringue with a fork once (here it helps to add a little bit of salt and have the egg whites at room temp).
That said: For brownies a good spatula or spoon should work quite fine. No mixer needed.


Server Sent Event isn't (flushing?) properly with Flask and Redis with nginx front

Question: I'm trying to stream call data from a PBX server. I have a Golang backend that receives this data and publishes it to a channel in Redis. The idea is to get realtime call data in a webapp.
This is composed of two Flask apps: One is the app itself. It's filled with api and ajax calls. The second is simply a route that streams the call data.
I had to split the apps in two due to deadlines to solve a problem with threading the main app and ajax calls.
To avoid CORS issues, I setup a nginx front. Here is my config:
http {
include       mime.types;
default_type  application/octet-stream;

keepalive_timeout  65;

    server {
        listen  80;
        server_name <domain>;

        location / {
            proxy_set_header    X-Real-IP $remote_addr;
            proxy_set_header    X-Forwarded-For $remote_addr;
            proxy_set_header    Host $host;
            proxy_pass  http://127.0.0.1:5000;
        }
        location /stream {
            proxy_set_header    X-Real-IP $remote_addr;
            proxy_set_header    X-Forwarded-For $remote_addr;
            proxy_set_header    Host $host;
            expires off; # I set this trying to debug.
            proxy_pass  http://127.0.0.1:5001;
        }
    }
}

Here is the streaming code:
@app.route('/stream/', methods=['GET'])
def event_socket_stream():
    def event_stream():
        stream = redis.pubsub(ignore_subscribe_messages=True)
        stream.subscribe('eventsocket')
        for message in stream.listen():
            print(message)
            yield 'data: {}\n\n'.format(message['data'])

    return Response(event_stream(), mimetype="text/event-stream")

I'm threading the above by by doing threaded=True in the app.run() call.
On the first app, I serve up some jQuery that uses the JavaScript SSE api:
$(document).ready(function() {
    // Skipping above non-related functions.
    // Event Socket Stream
    var eventStream = new EventSource('/stream/');
    eventStream.onmessage = function(event) {
        console.log(event);
        fsEvent = JSON.parse(event.data);
        parseEvent(fsEvent);
    };
});

The problem occurs on both Chromium and Firefox. This event should be sent when I call the PBX, however, the first call is never sent. I can see the browser connecting to it when the page loads, though.
GET XHR http://<domain>/stream/
When I call the PBX, the browser receives aboslutely nothing. If I call it a second time, I see the call data that I should have received during the first call.
To illustrate:
call -> Nothing -> call -> Call 1 Data -> call -> Call 2 Data
This is why I call it a "flushing" problem. It looks like the stream isn't flushing the data when a call is received.
If I set ignore_subscribe_messages=False, then I receive the redis subscribe message upon the first call.
Also, if I kill the streaming app process, the browser receives the last event that should have been received.
Any solutions are 100% welcome.
Thanks!
Answer: Turns out Nginx didn't have the needed headers to make it work. This got it working:
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;

Now, all is well.
Thanks to friends in #redis on freenode!


Moving photos from iphone to ubuntu

Question: From Ubuntu 10.04 onward, you can access your iPhone photos by simply connecting it and navigating to the DCIM folder.
However, I've noticed that when I move photos from my iPhone by cutting them from the DCIM folder and pasting them somewhere on my ubuntu setup, the photos' thumbnails remain in the camera roll however when clicking on a photo to view it, the screen turns white. Restarting the phone doesn't help as well.
How come?
How can I move photos out of the phone without keeping its thumbmail in the camera roll?
I'm using ubuntu 14.04, iphone 5S with iOS 7.1.1
Comment: Here's the [same question from an iPhone perspective](http://apple.stackexchange.com/questions/136102/photo-thumbnails-remain-in-camera-roll-after-moving-photos-to-computer/136225)
Answer: A hacky and maybe risky workaround which worked for me was suggested here:

Go to PhotoData folder
Delete Photos.sqlite
Restart the iPhone
Comment: I'd definitely appreciate another answer which explains why this happens and that offers a non-hacky-risky solution
Answer: Shouldn't be too much risk to deleting Photos.sqlite if you're moving all of your pictures manually. That's a SQLite database file that is generated by the iPhone photo app that contains metadata and an autogenerated thumbnail for each photo as it's taken. If you delete it, your iPhone will just make a new one.
Be it known that if you're only moving some of your pics, I have no idea what deleting the DB file might do. It might rebuild with the photos you still have, it might just lose access to them through the app but leave them on internal storage, it might lose them forever.

Moving photos from iphone to ubuntu


Advice on Old Art

Question: I have a picture of an old print of a painting I found in my attic. Is there a site where I might ask if anyone can help me identify when it was made or who the artist might be? Or at least give ideas on how to determine these things? I considered photography, but couldn't for sure tell if that would be on-topic.
Answer: Unfortunately we do not yet have such a site. Our Arts & Crafts site is more directed at homemade items, so identification and general art appreciation are not within the scope of that site.
Answer: If there is any connection between it and your family history, you may want to post it in a question at the Genealogy & Family History Stack Exchange, to explore that connection.
G&FH SE often gets old photos, old handwriting, and occasionally old paintings (usually portraits) to try and make sense of.  As long as there is a connection to family history such questions are on-topic there.
Comment: Unfortunately there is not. Left there by the previous owner and I just bought the house. Maybe it had a connection to their family, but I know little about them. Good idea though.

Advice on Old Art


What algorithm paradigm is a recursive solver of Sudoku?

Question: I am interested in knowing what algorithmic paradigm are the usual recursive sudoku solvers. Can I consider it a local search? or are they Dynamic programming, greedy, divide and conquer, backtracking?
Comment: Check Wikipedia: https://en.wikipedia.org/wiki/Sudoku_solving_algorithms. The standard recursive solution is straightforward backtracking. It has nothing at all to do with local search, dynamic programming, greedy, or divide and conquer.
Comment: Well, for each of these paradigms, have you looked up what they mean? Have you tried looking at, e.g., the wikipedia article for "dynamic programming" and tried to see whether the description fits your understanding of a recursive sudoku solver? I'm afraid that just telling you the answer won't help you understand the underlying concepts, so try solving this exercise on your own first. Perhaps you can formulate a more specific question if you are still unsure after looking up what these algorithmic paradigms mean.
Comment: @TomvanderZanden I have but I feel it combines one from every paradigm. For example, the recurrence relation of breaking the sudoku into smaller simpler to sudokus feels like DP or divide and conquer. The recursive "backtracking" when we encounter a problem feels like backtracking. It also feels like a local search because you're going from one possible solution to the nearest next possible solution and backtracking along the line. It just feels there are many paradigms mixed together and I'm not sure which one is it
Comment: Just a note: you could implement an efficient (though exponential-time because the problem is NP-complete) sudoku solver with a dozen of lines of code if you use a [constraint programming](https://en.wikipedia.org/wiki/Constraint_programming) library ( "CP paradigm"). See this [minizinc example](http://www.minizinc.org/downloads/doc-0.9/mzn-tutorial.html).
Answer: Let us go over your paradigms one by one:

Local search: In this paradigm, we start with some solution and try to improve it by local changes. Local search can be applied to Sudoku in at least two ways:

Start with a non-legal solution (either not satisfying the Sudoku constraints or not conforming to the filled cells), and try to make local changes (say, one cell at a time) that make it more legal.
Same as before, only we also allow partially filled boards. In this case we might as well start with the board as given, and at each step pick a cell and fill in some legal value. When we get stuck, we can choose a cell and erase it, and so on. This is a stochastic form of local search which in some sense goes against the essence of classical local search, which is completely deterministic and strives to reach an arbitrary locally optimal solution.

Dynamic programming: In this paradigm, we reduce our instance to smaller instances in such a way that the "repertory" of smaller instances is small, and each could be reached in many different ways.  One way you could try to implement this paradigm to Sudoku is as follows. Pick an empty cell and fill it in all possible legal ways. For each such filling, check whether it leads to a solution. Each filling is a smaller problem since it has fewer empty cells. However, the number of possible smaller instances is huge, and each is reached in a unique way, so while this is the same as your recursive solution, it's not really in the spirit of dynamic programming.
Greedy: In this paradigm, you repeatedly make choices that you cannot later change. In the case of Sudoku, this corresponds to identifying unfilled cells which have only one legal filling. This is the approach used by most humans to solve Sudoku, though some puzzles require rather elaborate case analysis to find such safe fillings.
Divide and conquer: In this paradigm you divide your instance into independent instances which you solve separately, and then use their solutions to solve the original instance. One way this could be applied to Sudoku is by finding all possible solutions of 3×3 squares, and then try to combine them together. This is not only a terrible algorithm, but also the recursion is very shallow, whereas in divide and conquer we are aiming at deeper levels of recursion.
Backtracking: The standard recursive approach for Sudoku (pick a cell, enumerate all values, and recurse) is a great example of backtracking, which is the paradigm that best describes this algorithm.
Comment: Thank you, that's exactly what I needed to take away my confusion!
Answer: You can ask the following 4 x 81 questions:
<code>Where in column c does the number x go
Where in row r does the number x go
Where in 3x3 block b does the number x go
Which number goes into cell l
</code>
Obviously you leave out those questions that are already forced by the filled out cells. Now if any of the remaining questions has 0 possible answers, then the Sudoku cannot be solved. If any of the questions has exactly one answer, then fill a cell according to that answer. If each question has two or more answers, then you use backtracking with all possible answers of one of the questions that had the smallest number of answers.


Scalar field theory with two scalars

Question: Consider the following scalar field theory with a kinetic term as follows
$$ \mathcal{L} = \frac{1}{2}\partial_{\mu}\phi_1\partial^{\mu}\phi_1-\frac{1}{2}\partial_{\mu}\phi_2\partial^{\mu}\phi_2 + V(\phi_1, \phi_2).$$
Notice the $-$ sign used in the second kinetic term. Is this a valid QFT? If we were to redefine the field variables as $\phi_{\pm} = \phi_1\pm\phi_2$, then
$$ \mathcal{L} = \frac{1}{2}\partial_{\mu}\phi_+\partial^{\mu}\phi_- + V(\phi_+, \phi_-).$$
We see that this almost looks like a complex scalar field theory which it isn't. And in this field-redefinition one of the field seems to be non-dynamical (if you used integration by parts and shifted the derivatives around). Are such QFTs allowed? Are there examples of such fields in particle physics?
Answer: The kinetic term in OP's model is not positive definite/contains ghosts. The corresponding Hamiltonian $H$ is not bounded from below.
In quantum theory we usually require that the Hamiltonian $H$ is bounded from below and that the system has a ground state. This is intimately related to unitarity.
Comment: You should probably explain why unitarity mandates a ground state.
Comment: Nice and clear answer
Answer: Particles with negative kinetic energy are usually known in the literature as ghosts. While in some cases they can be dealt with, they do have some spooky properties.
As noted in Qmechanic's answer, this theory has a Hamiltonian that is unbounded from both above and below. A problematic thing about this is that it allows for the vacuum of the theory to decay: if you have modes with negative energy, then the vacuum can decay to a state $|\mathbf{p}_{\text{ord}} \mathbf{q}_{\text{gh}}\rangle,$ composed of an ordinary particle and a ghost. Since the ghost still has negative energy, the total energy is still zero. Notice also that there is a ridiculously large amount of ways this decay can happen: the new particles can have any energy whatsoever (as long as they cancel out) and so on. This implies that the decay rate will often diverge, meaning the vacuum is unstable to the point it decays immediately. Of course, the same argument applies to any other state. Hence, in this sense, the theory becomes unstable.
There are some contexts in which these objects appear in quantum field theory, although they are usually undesirable and one often wants to bust the ghosts. A notable example is that of the Ostrogradsky instability, in which the presence of higher-derivative terms on the Lagrangian lead to the occurrence of ghosts in the theory. A recent review on this topic which uses a multitude of examples from Classical Mechanics and discusses applications to theories of modified gravity is arXiv: 2007.01063 [hep-th]. Another interesting reference is arXiv: hep-th/0107088, which is a famous paper by Hawking and Hertog discussing the occurrence of ghosts in quantum gravity and how to "live with them".
Answer: The kinetic part very much resembles a relativistic scalar field theory on a Schwinger-Keldysh contour. In this context, the transformation you have performed is often referred to as the "Keldysh rotation", while $+$ and $-$ fields are usually called classical and quantum components, respectively. There are certain caveats, however: for instance, one should then also have (at least infinitesimal) $\sim \phi_{-} \phi_{-}$ term, etc. For details, see any decent literature on non-equilibrium QFT (Kamenev, Calzetta-Hu, etc.).

Scalar field theory with two scalars


MacBook Pro failed the OS update, and now disks are unavailable

Question: My 2010 MacBook Pro that has been functioning without issues before failed a High Sierra update today, and then started showing a blinking folder icon, which indicated that it was not able to locate a startup. I rebooted it with Command + R and opened the Utilities. Now, if I use Restore from Time Machine, it's unable to locate a Time Machine.  If I go to Reinstall MacOS, it's unable to locate any disks for the install.  Disk Utility is not showing anything except of "OS X Base System" and its parent "Apple Disk Image Media".  If I run "diskutil list" in Terminal, I get a bunch of little disks that have nothing to do with the main one.
Does it mean that the update failed my hard drive completely?  Is there a way to restore data files from it if I get a new MacBook?
Answer: That is an older MacBook and while some Macs do last quite a while (I have a working SE/30 in my office...) it could be that the drive just failed and it was coincidental with the OS update you were applying.
If Disk Utility does not show the drive in Recovery Mode that would point to the SSD itself having (possibly) failed. Yes it could be another component or even the system board or connectors, cables, etc that connects to the SSD. But the logical first step would be to try that SSD in an external case on another Mac. If it is still not working then I would replace the SSD.
ifixit.com is a good source for instructions, tools and links to replacement drives. I have no relation or interest in the company, other than they provide an excellent resource.
Note that while it SOUNDS like a possible SSD failure, diagnosing hardware via web forum can only give you possibilities you can try. Depending on your needs it may be better to just get a new(er) Mac or have a trained Apple repair person have a look at it.
That is if you don't feel qualified to do this work yourself. After all, if you are not familiar with working on the guts of your Mac you run the risk of damaging it even more in your repair attempts.
Comment: Thank you for your answer.  I am planning to buy a new Mac, and my question was mostly about the possibility to recover data files.  Coincidentally, my pretty new external backup drive failed a couple weeks ago, and I was getting ready to buy a new Macbook and a new drive all together.
Comment: While there are commercially available data recovery software packages, I've never used one and can't speak on how well they work. There are companies that you can send a drive or SSD to to recover data, but they can be expensive.


How do i enable click tracking in UI

Question: I am using SparkPost for mail delivery of CiviCRM mass mailing.  SparkPost analytics show targeted and bounced emails etc but shows zero for clicks and opens.  How can i enable tracking of clicks and opens?
Answer: Go to your sparkpost account(https://app.sparkpost.com) and click on 'Account' and then 'SMTP RELAY' and click on radio button 'Enable Tracking'. This will make sure tracking of clicks and opens.

How do i enable click tracking in UI


Movie redraws contour lines

Question: I made a contourfm plot with white contour lines.
I used 'LineColor', 'white' but in a movie, the white lines propagate after each image instead of redrawing. The colors on the image itself redraws automatically. What am I doing wrong?
Also, when viewing the image, it shows up small on the top left hand corner. A similar script before did not cause this issue. Anyone know why?
% Create movie
nFrames = 893; % Number of frames
for k = 1:nFrames % Create movie
    % Eqdconic script
    % Define figure and axes
    fg1 = figure(1);
    axesm('MapProjection','eqdconic', 'MapParallels', [], 'MapLatLimit',[-79.625 -59.625],'MapLonLimit',[190.625 250.625])
    framem on; gridm on; mlabel on; plabel on; hold all;

    % Plot data
    frame = dataSST_movie(:,:,k);
    image = contourfm(Y,X,frame, 'LineColor', 'white'); % Change contour lines to white

    mov(k) = getframe(gcf);
end

close(gcf)

% % Save as AVI file
movie2avi(mov, 'SST_20110101to20130611_0.25grid.avi', 'compression', 'none', 'fps', 4);

The image = contourfm() part is what I'm talking about; is there some command like redraw that I need to use?
Answer: Just use clf before end. As for the size issue, check MapLatLimit and MapLonLimit. If they are correct, it should work.

Movie redraws contour lines


Taking care of the dying

Question: What advice did the Buddha give to laypeople or monastics about taking care of a dying loved one or anyone dying in their deathbed?
Comment: Ask for a Lama or Monk near you to bless them. They might have a better rebirth or after life.
Comment: related topic: (with answers): [What do you do to prepare for death?](https://buddhism.stackexchange.com/q/28418/254)
Answer: First of all, good householder, it's important to take care of yourself, meaning staying within the frames of references.
Second, may good householder gain firm faith into the first Noble truth, and then firm investigate of what else the fear of losing beloved form, sound, smell, taste, touch and giving of thoughts could be.
Once good householder is clear about this first three points it would be good to establish the beloved in Dhamma and faith into the Gems.
If already a follower, or once gained, there are some suttas on how to approach a fellow, either lay or monastic: Advice for sick uninstructed lay people by instructed lay people
In all cases, it any possibility, inviting wise Monks, encourage beloved to make merits and let the Venerable(s) teach the Dhamma for all of you. An hour, a day, 10 days, again and again..
May good householder have the effort to cancel all other useless stuff and spend the whole time in paying gratitude and being generous at one of the right times. Much success toward the Deathless for all of you and your's.
Answer: Please read "Ministering to the Sick and the Terminally Ill" by Lily de Silva.
All teachings from the suttas related to this topic are summarized in this essay.
Here's a quote from it.

The Sotapattisamyutta contains a valuable discourse on the question of
counseling the terminally ill (S.v,408). Once Mahanama the Sakyan
inquired from the Buddha how a wise layman should advise another wise
layman who is terminally ill. Here it should be noted that both the
counselor and the patient are wise lay Buddhists. The Buddha delivered
a whole discourse on how this should be done.
First, a wise layman should comfort a wise layman who is terminally
ill with the four assurances: "Be comforted friend, you have
unshakable confidence in the Buddha, Dhamma and Sangha, that the
Buddha is fully enlightened, the Dhamma is well proclaimed, and the
Sangha is well disciplined. You also have cultivated unblemished
virtuous conduct which is conducive to concentration."
Having thus comforted the patient with the four assurances, he should
ask him whether he has any longing for his parents. If he says yes, it
should be pointed out that death will certainly come whether he has
longing for his parents or not. Therefore it is better to give up the
longing.
Then, if he says he gives up his longing for his parents, he should be
asked whether he has longing for his wife and children. With the same
reasoning he should be persuaded to give up that longing too.
Then he should be asked if he has any longing for the pleasures of the
senses. If he says yes, he should be convinced that divine pleasures
are superior to human pleasures, and should be encouraged to aspire
for divine pleasures.
Then he should be gradually led up the scale of divine pleasures and
when he comes to the highest heaven of the sense sphere, his attention
should be diverted to the Brahma-world. If he says he has resolved on
the attainment of the Brahma-world, he should be admonished that even
the Brahma-world is characterized by impermanence and the rebirth
personality.
Therefore it is better to aspire for the cessation of the rebirth
personality. If he can establish his mind on the cessation of the
rebirth personality, then, the Buddha says, there is no difference
between him and the monk who is liberated.

Taking care of the dying


Serrated vs flat-edge knives

Question: Each has their purpose, I'm sure. So for what activities is each better? When would I use one over the other? What about half-serrated blades?
Answer: Flat-edge knives are the best choice for wilderness and campsite activities. A lot of times you have to use beating stick to split wood and that will dull out any serration you might have anywhere on the knife.
Serrated knives (and partially serrated) come in handy in suburban environment where you have to cut man made materials like plastic and rubber. They are also good in self-defense since they go through clothing better than straight edge (but there are different options on the self defense aspect of it).
Comment: Serrated are also a lot more difficult to keep sharp.
Comment: Serrated knives are better for cutting climbing or sailing ropes.
Comment: Let me quantify that then, they are much more difficult to sharpen if all you have is a whetstone.

Serrated vs flat-edge knives


White noise seasonality

Question:
Is the above graph a white noise?
I'm confused by the spikes at certain places.
The above plot has been obtained after doing a first order differencing on a time series. How can I justify whether there is seasonality present/absent in the data after differencing?
Comment: The presence of spikes alone does not indicate anything specific related to seasonality, unless the spikes occur in regular intervals.
Answer:
How can I justify whether there is seasonality present/absent in the
  data after differencing?

Plot the amplitude of the Fourier transform of the signal.
If there is seasonality, you will see a peak at the appropriate frequency on the Fourier plot. This should be close to the plot's origin, because seasonality means slow changes and thus low frequencies.
Comment: I obtained a periodogram but there are many peaks at different frequencies but no particular peak stands out from the rest.
Comment: can u add it in your post?
Answer: There are several ways to identify seasonal cycles in time series data.
First, if the seasonal pattern is very clear, you may be able to detect it in a plot of the time series (time = t on the X axis; X at time t on the Y axis).
Second, you can obtained a lagged autocorrelation function. For example, if each data point represents a measure for one month, and there is a 12 month cycle, a graph of the lagged autocorrelation function should show a relatively large positive autocorrelation at lag 12, with smaller peaks at lags 24 and 36 (if larger number of time lags are examined).
Original source

White noise seasonality


What is best practise of using DateTime in different cultures

Question: I have asp.net site. On many pages is used datetime to be putted from user and then inserted or updated some db's table with it. My problem is that I have two version of site: local for testing (Ukraine) and production (USA). Because these sites have different culture datetime format are different. What is the best way to unificate workflows with datetime format?
For example, I have page with textbox to be entered datetime in it and reqular expression validator. How can I do correct working with datetime in my local site ( dt format is dd.mm.yyyy) and production (mm/dd/yyyy) ?
Thanks.
Answer: Just make sure you use the correct CultureInfo for parsing and formatting. Where you get the cultureinfo from is the tricky question, you could for example deduce it from the users browser language. On the server side, always store culture-neutral values, i.e. never store dates & times as strings in a database for example.
DateTime validation should always be culture aware. For server side validation, use e.g. "TryParse()" to validate. For client side validation you need to be equally careful with cultures. There probably exists numerous javascript libraries that will validate dates in different cultures.
Answer: You can define culuture in web.config and code correspondingly.


Extreme cold resistant flora

Question: My world has no axial tilt. Therefore instead of having seasons from axial tilt it gets its seasons from actually moving farther away from its parent star. In the mid latitudes the temperature fluctuates from a balmy summer in the mid-high 70s (Fahrenheit of course) to a brutal -20 or -50 degree winter in the worst areas (average temperature). My question is what kind of mechanisms would plants, namely trees, develop to cope with this extreme swing? A full day is fairly normal at 25 hours.
Comment: `mid-high 70s ... to a brutal -20 or -50 degree winter`. When I lived in the north midwestern US, the summers got to over 100 F and the winters got down to below -40 F (though admittedly that was only for a few weeks). Your planet may not be as extreme as you think.
Comment: Just as a quick note, you're looking at a pretty strongly elliptical orbit there to achieve such seasonality. Summer will be noticeably shorter than winter because of orbital dynamics (objects in elliptical orbits move faster the closer they are to their primary), so that probably needs to be factored in.
Comment: ??? The [taiga or boreal forest](https://en.wikipedia.org/wiki/Taiga) covers 17 million square kilometres (6.6 million square miles) in Russia, Canada, Sweden, and Finland, or 11.5% of the Earth's land area. WInter minima of −34 °C to summer maxima of 24 °C are nothing exceptional for that gigantic forest. You are asking about ordinary real-world conditions.
Comment: @AlexP I suppose the key that in taiga, seasons change is present while OP postulates there are no seasons.
Comment: @KlausHaukenstein I'm talking about average temperature not absolute lows. I will adjust my question to better communicate that.
Answer: Thermogenic roots.
Thermogenic plants generate metabolic heat.  These are plants on our world!
On your world, the deep roots of your trees make heat - enough to prevent themselves from freezing.  Insulated underground, the heat does not escape.  The roots are big with mighty sugar reserves.  Thus they overwinter.  When things warm up, the roots and cells wintering there flow back up and reconstitute the tree above.
That deep zone in the forest is considerably warmer than the surface, with all the root warmth.  The animal life takes advantage of this, hunkering down deep for their hibernations where the trees will keep them warm.
Comment: There are plants that generate heat to melt snow ice a bit early to buy them extra time in the sun. But what you suggest here... Very expensive from a thermodynamics point of view. Providing heat to keep from freezing of months is very energy intensive. especially compared to just making sure the cold won't do damage.
Answer: The climate you describe is not unlike the highest settlements in Tibet, e.g. Nagqu. It's too cold for trees to grow, but as you can see from e.g. Google Maps photos, grass grows just fine. Wikipedia mentions some other herbs as well.
Answer: You are describing most of the Boreal forest that covers the northern hemisphere. Look up temperatures for Cities in the region. Yellow Knife has recorded extreme low -50C/-60F recorded high +35C/80F.  Yellow Knife is below the tree line, further north can get colder.
Look into Boreal, alpine, and tundra biomes.
Comment: I failed to mention that the -20 to -50 degree temps are not lows, they are averages. How low it really gets depends on your latitude much like here in earth.
Comment: @BradleyKnauer the wiki page says average low -30C. So same ball bark? Once it  dips below -40 for 4 weeks, If the vegetation was going to get damaged, Its difficult to get more frozen at those temperatures, Lakes are frozen to meter to three depending on how much snow is on the lakes. So suggesting all plants are frozen.
Answer: Truly extreme cold resistant flora exists on earth.
Have a look over at the article written here:
https://www.frontiersin.org/articles/10.3389/fpls.2015.00884/full#T1
This is a study compiling data from experiments to discern the low temperature tolerance of woody tree species.  It was found that a significant amount of cold-tolerant species can survive even liquid nitrogen (at -196 °C / -321 °F): Their seeds or bark was found to be capable of reproducing after being slowly cooled to freezer temperatures, then quenched in liquid nitrogen.
This isn't too surprising. Temperatures in the siberian taiga can drop down to -70 °C / -94 °F with -50°C / -58 °F being average for the coldest months (climate change has upped this to -40 to -45°C / -40 to -50°F in modern times), and the difference between that and -196°C / -321 °F, to a living organism, is not much.
In other words, plants can potentially have absolute cold tolerance. I.e. only absolute zero is enough to guarantee that you can wipe out a plant within a short amount of time.
Cold, in general, has two main deleterious effects on plants.

Freezing of the liquid contained within the cells.
Dehydration as water is extracted from living plant cells into surrounding ice.

How does a plant survive winter?
Plants can combat the effects of cold thorugh a  variety of ways:

Changing the chemical composition of the liquid within their cells1
Reducing the permeability of cell membranes to prevent/reduce dehydration.
Burning sugars to remain warm.
Having a cell or root structure that is more isolated form the environment.
Allow part of the plant to die to reduce its surface area.

1: Sugars and alcohols can have lower freeze temperatures of cellular lipid (fats and oils) by up to 57°C / 103 °F , see https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1300786/, and thus reduce the energy a plant needs to expend. The rate of osmosis can be reduced this way too.
Plants on alien worlds can have additional adaptations. For example, you could have a different atmosphere. Or the plants may have deep roots with access to abundant geothermal energy.
Variations
Not all species have all cold adaptations. There's some cost associated with them. There appears to be significant groups of plants that die off after temperatures go below -40°C to -50°C / -40 to -58 °F, and another big group that tolerates down to about -70°C to-80°C or -94 to -112 °F. (Coinciding with typical minimums possible in Northern hemisphere boreal climates with and without oceanic influence)
How does a plant then grow?
If a climate has monthly temperatures below  -3 °C / 25 °F year-round, there's not enough liquid water, hence no plants. The local surroundings are either a glacier, or (when very dry) a rocky wasteland.
In order for plants to grow, they mainly need three things. Liquid water, carbon, and sunlight. Then, they need enough of this during the short summer to not lose more in the long winter (I.e. to produce enough sugar to last through winter and have a surplus in an average year). Liquid water forms at temperatures above 0 °C / 32 °F, the higher above zero, the more quickly snow will melt.
Permafrost
In these extreme climates, average (yearly) temperatures are sometimes far below 0 °C / 32 °F. Underground temperatures (isolated by the earth) at low depth are usually equal to the average yearly temperature, excepting volcanic hotspots. This creates a problem: the ground is frozen and hard for roots to permeate or extract nutrients from. Thus don't expect to see the largest and tallest trees when there is permafrost. The size of root systems is restricted to how much of the permafrost melts each year (I.e. the amount of degree-days above 0 °C / 32 °F is correlated with how tall trees can get).
Climate classification
Look up https://en.wikipedia.org/wiki/Trewartha_climate_classification, especially the sections on group E and group F.
We can see how much trees need by observing where the Tree-Line is on tall mountains and in the arctic north, the separation between a boreal and alpine or tundra climate. This is the limit at which the above condition is met for a plant that actually survives through the winter itself (a perennial plant). A quick rule of thumb for an earth-like climate is that you need about 50 out of 360 days with average temperatures above 0 °C / 32 °F during which the top layer of permafrost melts, or about a 10 °C / 50 °F maximum in the warmest month. This is what common climate classifications are based on. They're fairly accurate, though exceptions may exist due to specific local conditions.
There's also a second category, plants that die off, but their seeds survive through winter. This strategy is even hardier than the above (as a plant can invest a large amount of energy in keeping a very small amount of cells alive), and is the only way plants survive in the Tundra climate.  A quick rule of thumb for this climate is that you need about 2 weeks of frost-free days (0 °C or above average daytime temperature).
On the border between these two climates, you'll find Krummholz, where some local spots (like rock formations or valleys) provide some cover against freezing wind, but the landscape as a whole is in the Tundra category.
Length and Depth of winter
These figures are written with respect to Earth. On your alien world, if the year lasts longer (typically, your year will be longer if your orbit is more eiliptical, unless you make your star lighter than the sun is to compensate), then you might need a bit more time above 10 °C / 50°F before you hit the Ec Trewartha climate (read, the ability to have Trees). Similarly, if winters are even colder than in siberia, you might need a bit more energy during summer to compensate (say, 40 days above 10 °C / 50°F instead of 30 days). These rules of thumb work for Earth, the more alien your custom planet, the more you may need to adjust them.
Comment: Excellent, very well researched. Thank you for your thoughtful response!

Extreme cold resistant flora


Sharing of standard object according to role

Question: I have a scenario where i have 3 roles in org , owner ,supervisor and associates .Owner is like CEO, supervisor reports to owner and associate reports to supervisor. I need to make sure CEO of one company does not see data from CEO of another company and the same goes with supervisor and associates .The data here is in leads, account , opportunity and contact objects which are all standard objects . How can i make this happen?
Answer: Give a different profile for different CEO's. And give the basic access I.e CRUD operations on profile. For standard objects, Grant Access Using Hierarchies option is enabled. So, the data of subordinate is accessible for the superior. Follow the same for rest 2 roles.
Answer: Thanks @rk_cloud for the answer. I still feel this might not work as even members from different company will have the same profile . As we cannot keep increasing the profiles. I feel we might have to introduce territory management here.


How to answer phone calls in another phone via Bluetooth?

Question: I have two Android phones which I wanted to set up one as the one that answers calls for the second that could stay in the backpack. Is it possible to use a Android phone as a Bleutooth accesory, like a hands-free device?
Answer: According to the answer to this Stack Overflow question: you can't. (It is possible for land lines though.)
Or you can forward your calls from one phone to the other, either by changing the settings in your phone or downloading an app that does it all for you.
The alternative solution that comes closest to what you're after is to install mysms mirror, which is an app that tells you when your other phone receives a call or text message, and lets you call back.  See their blog.
Google Voice might also work for you. It's mentioned in the answer to this question: Answer my phone on my Tablet?
Comment: HI @Monozygotic have you solved your issue.I am also looking for such type of work.
Comment: Hi @justchill, it was not my issue. I just supplied an answer. Please ask Gabriel Diego if it solved his issue.


connect audio interface to amp's power amp

Question: I want to try to use amp sims on logic pro with a real cab. I have a laptop with an apogee one audio interface. My idea was to plug the guitar to apogee, then apogee to logic and finally, connect the apogee's headphone output to an amp's Effects Loop return (in order to use the power amp in the amp) and then the amp is connected to a cab. Apogee's headphone output is 1/8", will a regular 1/8" male to 1/4" female adapter work, using a regular guitar cable to connect to the power amp?
Answer: It may work, but it's a risky proposition. Headphone outputs generally have a low impedance (0.5 - 50 Ohms) and relatively high level signal (5-20 dBu). Apogee One nomimal specifications state a 14dBu output without indication of impedance.
Generally an effects return is a "line level" input, it expects (depending on the specific equipment) anywhere from -10 dBv ("consumer line level") to +4dBU ("professional line level"). So rather less "potent" signal than the Apogee's headphone output.
So depending on the specific characteristics of your amp you may be able to drive it by means of the effects return, provided you keep rather low the output volume from the Apogee. If you turn it too high you almost for sure are going to saturate the amp, and damage may even be possible.
Also, due to impedance mismatching you may also loose signal quality, namely (I think) high frequencies content. Headphones typically have an input impedance of a few dozens to a few hundred ohms, so the output of the Apogee (not specified) may be optimized for that. But that's less probably a problem, as line level inputs have typically an input impedance of around 10 kΩ or more and any source with a LOWER output impedance will probably be fine.
In summary, for the price of jack adapter (~1$/€ in eBay) I say it's worth a try, but being EXTREMELY carefull controlling the output volume of the Apogee (starting from 0, increase VERY slowly and see what happens).
Also perhaps worth trying is using the lineout from the PC's motherboard. I know the audio quality may be not as good as the Apogee's, but the signal level is probably better adapted to feed the amp. Even if you only have a single "line/headphones" output in the PC, typically these output drivers are built to compromise between several types of load (headphones, recorder inputs, etc.) and
respond in a more flexible way to the load applied to them than an optimized headphones output.
For that, you would need to route audio in the PC to the motherboard audio output. This brings in another host of possible difficulties, but apparently from the Apogee description, the bundled software would facilitate that, as well as avoid internal latency.
Comment: I am not well versed enough in electronics to know if all that technical stuff you said is correct.  I am willing to upvote if for no other reason than you made a valiant effort to answer the question.  However I am hopeful that someone with more knowledge of these type things will weigh in with a comment to your answer or a new answer.  But I certainly want to commend you on taking time to post an answer and hope you will continue to participate on Stack Exchange.
Comment: Thank you very much for your extremely detailed yet easy to understand answer.

I read the apogee one's manual and found this:
Select an output operating characteristic in the Audio Output Source menu:
Select Stereo when connecting ONE to headphones, powered speakers, a mixing console or a home stereo; Select Amp when connecting ONE to an instrument amplifier.

Maybe, by selecting Amp as the output, i can get the 'line level' you mentioned, thus not damaging the amp.
Comment: Thanks Rocking Cowboy for the encouragement, I fully subscribe your concern and encourage peer review as way of ensuring qualified answers.
Comment: Tsuo, that's good news. The Amp option will probably give what is called "instrument level" (the type of signal coming what of an electric guitar),  which is a weaker signal even than line level. This option will probably work best with the input (not effects return) of the amp. As per the manual description option "Stereo" will probably work ok too with the effects return. Any way with these options I'm pretty sure that you'll find a working solution, just be careful initially with the output volume.