Assumption of normally distributed residuals in linear regression

Question: Let us consider the simple linear model $y = \beta_0 + \beta_1 X + \epsilon$, where $y$ is real number, $X$ a matrix of reals and $\epsilon$ is the random "noise". The least-square estimate of the coefficients $\beta_0$ and $\beta_1$ does not depend on the nature of the "noise" term $\epsilon$. It is reasonable to assume that the expectation of $\epsilon$ is zero. For the regression problem really computes $E(y|X)$. It is also reasonable to require that $\epsilon$ has the same variance across the range of $X$. Why do we also require $\epsilon$ to be normally distributed? What goes wrong if it is not normally distributed but has a distribution symmetric around zero?
Comment: Do other questions on this site like https://stats.stackexchange.com/q/395011/40036 or https://stats.stackexchange.com/q/362284/40036 help you?
Comment: There are very few responses that answer the question. Those that do seem to suggest that the assumption is only for convenience.
Answer:
Why do we also require ϵ to be normally distributed?

IID normally distributed $\epsilon$ are needed to ensure that the parameters $\beta_0$ and $\beta_1$ provided by ordinary least square corresponds to the maximum likelihood estimators. If it is not the case, you don't have a guaranty of optimality of the OSL solutions.
So basically, if noise is not gaussian you are using the optimal solution of a problem to solve another problem ; which may cause some troubles.
Actually, if the noise is considered symmetric wrt 0 and iid (but not necessarly gaussian) the Gauss-Markov theorem ensures OSL is the best linear unbiased estimator. However, there is no reason to limit ourself to linear estimator.
The answer given by @Davide DN give you some illustrations about what may happen in practice. Another illustrating example is when using a uniform noise on [-1,1] (so symmetric), where you can easily build settings where the OLS provides solution corresponding to a probability 0.
Comment: Definitely a better answer, I just gave a counter example on why it is not enough to ask for exogeneity and spherical errors :)
Comment: @DavideDN Well, our answers completement each others. However, I really think your first sentence "The reason is that the normal distribution is fully defined by its mean and variance, while other distributions are not. " is missleading and think it should be removed/repharse
Comment: You're right, I removed the "the reason is". Definetly misleading since I was giving an example and not a full explanation!
Answer: The assumptions of OLS are vague, and they only ensure optimality within a very restrictive set of estimators, specifically those which are linear estimators of the mean of a distribution. What this basically boils down to is that the best way to construct a weighted average for estimating a mean is to choose weights that are inversely proportional to the variance. This is a very restrictive consideration that does not consider, for example, the possibility that the median may also be a valid measure of location, since it is a nonlinear estimator. The reason normality is often assumed is that if you are trying to estimate the mean of the distribution, then certain general inferential practices are justified.
First, if the distribution is normal, estimation and inference based on F-tests and t-tests are valid for any sample size. Second, if the distribution is not normal, but it is symmetric, unimodal, and has finite constant variance with a reasonably large support, then for sufficiently large samples, inferences based on t-tests and F-tests will be approximately valid due to the Central Limit Theorem.
If the mean of the distribution is not a reasonable measure of location, then OLS is not a reasonable method of estimation. For example, if the errors are either bimodal or skewed, one would not use the mean to summarize such a distribution.
If the errors are such that the mean is reasonable, it may well be that another estimator that is nonlinear could be an improvement. For example, if the errors follow a Laplace Distribution, then the MLE (sample median) is an improvement over OLS. However, in practice, it can be difficult to distinguish errors that follow a Laplace Distribution from those which follow another distribution that has similar properties. Since, in these situations, there may not be a large price to incorrectly assuming normality if the sample size is sufficiently large, then the OLS estimation with normality assumptions will likely produce valid conclusions anyway.
So, to summarize, the main reasoning for normality assumptions in OLS is more based on the idea that as long as it is not grossly violated, the Central Limit Theorem will save you in large samples. It provides exact inference, if normality is justified. If normality, specifically, is not valid but is not grossly invalid, other methods may be superior, but the cost of a wrong assumption is likely to be small, relative to the fact that it may be too difficult to verify that the errors follow a specific distribution.
Answer: Among all the distributions with the given expectation and variance, the normal one is the one with the highest entropy. Therefore, by assuming normality we impose the fewest restrictions on the error distribution in our models, which allows them to be be as data-driven as possible. A more restricted distribution family would mathematically incorporate certain prior beliefs about the processes or phenomena being modeled, limiting the capability of the models to discover information in the data.
Another reason is that the error of your model may be due to the combined effects of a number of unknown and/or unaccounted for factors. If your model is acceptably good, then it will be reasonable to expect that each factor's contribution to the error will be more or less the same. Therefore, if you treat the factors as random variables, you can consider them as iid. Under the central limit theorem their sum will tend to be normally distributed. Since many processes and phenomena in nature and human society are highly complex, it's not unreasonable to assume that the number of factors missing from your model and contributing to its error is fairly large. So, however those random variables are distributed, normal distribution should be a fairly good approximation of their sum's true distribution.
From a more practical point of view, the normality assumption proved to work well in many applications, so it's not that surprising that we came to assume it by default regardless of theoretical and more abstract justifications.
Comment: Thanks, Milos. I had not come across the points in your first and second paragraphs.
Comment: You're welcome, @AmeyJoshi. The basic idea of the first one is usually mentioned in information theory textbooks, whereas the other one can be found in some books on statistics, but not all. I would have pointed you to the literature, but don't recall where I read them exactly.
Answer: The normal distribution is fully defined by its mean and variance, while other distributions are not. Therefore, when residuals are centered and with fixed variance but not gaussian, you can end up with some tricky situations.
Example 1: Skewed residuals
In this example residuals come from a lognormal distribution, and I normalized them to mean 0 and std 1. It is quite evident that this is NOT a good regression model.

Example 2: Bimodal residuals (high kurtosis)
Here I sampled the residuals from a beta distribution. Again, they are centered around 0 and with variance 1 and yet, this is a very bad model.

So, all and all, you would have to fix mean and variance, but also skew and kurtosis, which means 4 total moments. I imagine also further moments can affect the goodness of fit of a regression, so in the end, the solution is fixing just two moments and asking for normality. Of course, the more moments you fix, the closer you're getting to a normal distribution, as your moment generating funciton will be getting more and more similar to a normal's.
EDIT:
As pointed out by @peuhp, the reason is that in those examples we are not maximising likelyhood when doing OLS.
Comment: Thanks. Can you please elaborate more on "the more moments you fix, the closer you're getting to a normal distribution,as your moment generating funciton will be getting more and more similar to a normal's."?
Comment: What I am saying is that my counter examples only shows that you need to have the first four moments to match the normal's (zero mean, fixed variance, zero skew, zero kurtosis). I am quite sure you can find some more counterexamples with some further moments, but as you set more and more moments to 0 to match the normal's (all the ones after the 2nd are 0 for a Gaussian), your characteristic function will become closer and closer to a normal's, converging in distribution.
Comment: @DavideDN "The reason is that the normal distribution is fully defined by its mean and variance, while other distributions are not. " This does not look at good reason to me : i) other distributions are fully defined by these two parameters, ii) second parametrization is not related to OLS.
Comment: @peuph - The second distribution is perfectly pertinent, it's a linear function with added noise with 0 mean and variance 1, coming from a beta distribution. Shows quite clearly why only fixing the first two moments is not enough.
Comment: I changed the params of the beta so it's a little less split, hope it helps show my point..
Comment: @DavideDN Sorry I don't understand your point
Comment: @peuph My point is simply that fixing the first two moments is not enough. Even though through OLS you do have the Best Linear Unbiased Estimator (both of the one in the pics are unbiased), they are far from being good regresison models. And you actually explained the reason below - it is quite evident that the likelyhood of a sample being on the regression line in those examples is extremely low, as OLS did not correspond to MLE for those.
Comment: It is not at all clear what *you* mean by "It is quite evident that this is NOT a good regression model. " or "Again, they are centered around 0 and with variance 1 and yet, this is a very bad model." Can you spell out your reasoning behind these assertions?
Comment: From a mathematical perspective, a point on the blue line would have a very low Likelihood in both cases. If you're using the blue line to predict you're actually picking up points that "stand out" from the actual distribution, which is usually not what you're aiming for.


how to open several MXD files at the same time ( within the same window )in Arcgis10

Question: I have  a simple question. How can I open several MXD files at the same time in Arcgis 10?
Whenever I try to open the second MXD file Arcgis asks me to save the first MXD file and then it closes it and opens the second one. How can I have these two MXD files open at the same time?
Comment: This is because the ArcMap container application is designed to be a Single Document Interface (SDI).
Comment: @MichaelMiles-Stimson ArcView 2/3 was a Multiple Document Interface (MDI) and my understanding is that MapInfo is/was too.  Maybe Mike is new to ArcGIS for Desktop and comes from one or other of those products that enabled more than one map in the mapping container at a time. ArcGIS Pro seems to be an SDI with only one project (but multiple maps, multiple layouts, etc) open at a time.
Comment: Are you trying to open from ArcMap or Explorer? I had a similar problem once where whenever I tried to open an existing MXD it tried to open into the already open document... I think there was a problem with the file associations, it was set to ArcMap.exe instead of ArcGis File Handler (found in C:\Program Files (x86)\Common Files\ArcGIS\bin).
Comment: That was it @PolyGeo, by trying to open a second (or subsequent) document by double clicking in explorer it wanted to *replace* the existing open document rather than opening in a new window. Changing it to the ArcGis file handler meant that I could have more than one ArcMap session active... I think that was when I upgraded from 9.3.1 to 10.1. Mike, why do you want to open more than one in the same document? Is it because you want to use another maps' data frame?
Answer: If you are referring to opening multiple mxd's within the same window, this isn't possible. You can open multiple mxds at once thought the windows explorer though. (This is what I would usually do if I needed multiple sessions)

Select the mxds you require within the folder (ie Folder, Desktop, My Computer, etc.)
Then the Enter Key

This should boot up all the mxds at once.
Answer: When I want two .mxd files open at the same time, I launch ArcGIS for a second time. I do this by right clicking on the ArcGIS icon shortcut in my task bar and choosing the option to open ArcMap. Once it is launched I can open a second .mxd file and I now have two ArcMap windows going. I can even drag and drop features between them.


moto g cyanogenmod 11 android 4.4.4

Question: Are there any links for cyanogenmod 11 for moto g android 4.4.4?
If there are then please suggest me the one which is stable,equipped with the theme engine and is under 100mb.
Answer: You can find all official CyanogenMod downloads for Moto G (falcon) here.
Although you must understand that Android custom ROMs virtually were never under 100MB in size; if they were, it was before Android 2.x. KitKat ROMs nowadays usually fall within 200MB.

moto g cyanogenmod 11 android 4.4.4


Show a list of locations on google Map

Question: I have a map view and a listview on the same screen. Half is map and the other half is listview. I have a list of locations(ie ,lats and lons). When I Start my activity it should load all the locations on the map and it should point to the first location in my list and others should not be visible.There is a button on each listview item. When I tap on any of the button on listview item, map should animate  to that particular location. There is one more button at the top of the screen to see all the locations, when I tap on this button, it should show all the locations in the list, on the Map. The number of list item may vary. How can I do it
Answer: Try do the things,
 such as creating overlays on mapView on click of each item(button) of listView
 just use AnimateTo() to animate to the location converting location(lat,lng) to point using Point methods.You have to create overlay for each location(i.e. when item click) and add it to list of Overlays.
But this approach will not work to display all locations on one click of button on to overlay you have been created on mapView.
If you create overlay for each location and add it to list of  overlays and try to display may be it works fine but the locations which are plotted first may be not visible properly(try to set transparency of overlay) instead you can make search for Google api which takes list of locations and plot them.
Hope this explaination works for you.
Answer: Since you know the locations before loading them, you can write code to present the list in the sidebar. If you load KML files, then it is completely different and it requires parsing the file yourself in order to get the data inside. I did this once myself with string parsing, but the whole project was extremely slow. I'd found JAK but it required registering and I didn't use it

Show a list of locations on google Map


Badge for someone who has over 100 or 200 or whatever number of accepted answers

Question: I think there should be a badge for those that have authored over a certain amount of accepted answers.
Comment: @AviD I assume he means a person who has authored 100 accepted answers, which I agree is a commendable thing.
Comment: I like that idea - but do you mean the answerer of 100 accepted answers, or the question asker that accepted 100 answers?
Comment: how about both?
Answer: First off: yes, that is a nice idea and I like it. But also consider that as of now, +15 is given for each accepted answer.
This has also been suggested on The Meta, with very little conclusive results. Although it does appear that badges are a constantly-changing thing, so I wouldn't say it'll never happen. We'll just have to wait and see...
[AviD's comment has also been discussed here]
[for more exposure, consider posting this question on The Meta]
Comment: While it would certainly garner more voting on Meta.SO, all site metas *are* monitored by SEI staff, so as far as thats concerned no need to post over there.
Comment: @AviD: more voting — and more discussion. A suggestion can be refined (e.g., what number of answers should trigger the badge?), for example.
Comment: With the logic of the answer there should be no badges for an answer that receives 10, 25 or whatever number of votes, as +10 is already received +10 for each vote.


Download vagrant box file locally from atlas and configuring it

Question: I want to download a vagrant box file from Atlas for using it later locally with my vagrant file. How can I do this, and how can I configure it?
Answer: To download a file you have to add version and provider in the URL. For example for downloading trusty64 First you need its URL which is
https://app.vagrantup.com/ubuntu/boxes/trusty64/
then you have to add version and provider afterwards, for our example the download URL would be.
https://app.vagrantup.com/ubuntu/boxes/trusty64/versions/20180206.0.0/providers/virtualbox.box
Then you have to add it locally from your vagrant file.
To add it locally to vagrant file use the following command
vagrant box add foo-box /path/to/vagrant-box.box
vagrant init foo-box
vagrant up

This will create the vagrantfile and you can configure the vagrant file.
Comment: This will not maintain the version number of the box locally. Online install does. It will keep showing that a new version is available, without an actual newer version being available. See below for fixing this issue.
Answer: However, this will add the box as version 0.
○ → vagrant box add ubuntu/trusty64 ~/Downloads/trusty-server-cloudimg-amd64-vagrant-disk1.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'ubuntu/trusty64' (v0) for provider:
    box: Unpacking necessary files from: file:///Users/ram/Downloads/trusty-server-cloudimg-amd64-vagrant-disk1.box
==> box: Successfully added box 'ubuntu/trusty64' (v0) for 'virtualbox'!

vagrant does not allow to specify a version number of the manually added box
○ → vagrant box add ubuntu/trusty64 ~/Downloads/trusty-server-cloudimg-amd64-vagrant-disk1.box --box-version 20151021.0.0
==> box: Box file was not detected as metadata. Adding it directly...
You specified a box version constraint with a direct box file
path. Box version constraints only work with boxes from Vagrant
Cloud or a custom box host. Please remove the version constraint
and try again.

To update the version number of the box, change the folder name '0' in ~/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-trusty64/0 to the version number you downloaded. For example '20160120.0.0'
 |2.2.3| MacBook-Pro in ~/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-trusty64
○ → mv 0 20160120.0.0

now you are all set to update the version next time with vagrant command too
○ → vagrant box list
ubuntu/trusty64 (virtualbox, 20160120.0.0)

Comment: vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/ubuntu-16.04'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/ubuntu-16.04' is up to date...
The box 'bento/ubuntu-16.04' is not a versioned box. The box was added
directly instead of from a box catalog. Vagrant can only
check the versions of boxes that were added from a catalog
such as from the public Vagrant Server.
Comment: In order to avoid the problem described in @abuhurayra's comment, a `metadata_url` file needs to be added inside the `ubuntu-VAGRANTSLASH-trusty64` directory. The content of the file must be `https://atlas.hashicorp.com/ubuntu/trusty64` in single line, without end-of-line character.
Comment: @WillingtonVega can you please update the above link as it is broken
Comment: @shankbond I think `https://app.vagrantup.com/ubuntu/boxes/trusty64` is the new version of that URL, but can't really test whether it works right now. If that works, then for other outdated URLs you can replace `atlas.hashicorp.com` with `app.vagrantup.com` and add `boxes` between the box owner `ubuntu` and the box name `trusty64` (separated by `/`).
Answer: First: check latest version from this link Here
Update:you can try by go to the mentioned link above ,to get the number of latest version,then try to change the version in bellow URL
for now the latest version is:7.2.1
for virtualbox:
https://vagrantcloud.com/laravel/boxes/homestead/versions/7.2.1/providers/virtualbox.box
for hyperv:
https://vagrantcloud.com/laravel/boxes/homestead/versions/7.2.1/providers/hyperv.box
for vmware:
https://vagrantcloud.com/laravel/boxes/homestead/versions/7.2.1/providers/vmware_desktop.box
for parallels:
https://vagrantcloud.com/laravel/boxes/homestead/versions/7.2.1/providers/parallels.box
Maybe in the future the link changed so try to get download vagrant box by using command on your terminal/CMD by command
vagrant box add laravel/homestead

choose your virtualization method
then you will see the download link *ended with .box, after that you can cancel it CTRL+C and copy the download link  and download it locally by using IDM/aria2c -x16 etc.
Second: Use this command
vagrant box add laravel/homestead {Path of file from your local computer}

Third:add metadata by go to
1- you create a file called metadata_url
NOTE: There is no extension for metadata_url
2- Then add this link and save the file
https://atlas.hashicorp.com/laravel/homestead

3- Copy metadata_url file to:

for windows go to
%userprofile%.vagrant.d\boxes\laravel-VAGRANTSLASH-homestead

4- Then rename the folder named 0 to the version of the current homestead version = 7.2.1

I hope this help
for more information
Laravel
metadata
Comment: the laravel/homestead box download link takes to a 404 page. here is the link that works: https://vagrantcloud.com/laravel/boxes/homestead/versions/6.3.0/providers/virtualbox.box
Answer: I faced the same issue not being able to download from script. So manually downloaded the box and added to vagrant as below,
you can get versions you want from here - https://atlas.hashicorp.com/ubuntu/boxes/precise64
wget https://atlas.hashicorp.com/ubuntu/boxes/precise64/versions/20160818.0.0/providers/virtualbox.box

cd my_vagrant_project
vagrant box add precise64 ~/Downloads/precise-server-cloudimg-amd64-vagrant-disk1.box

vagrant init precise64
vagrant up

Answer: Download virtualbox.box:
https://app.vagrantup.com/laravel/boxes/homestead/versions/6.4.0/providers/virtualbox.box

You can change the version(6.4.0) of homestead box with the Current Version.
Current version: 6.4.0.
Check for the latest version here: https://app.vagrantup.com/laravel/boxes/homestead

After downloading the box, rename it to virtualbox.box

Don't forget to include the .box extension.
Add the downloaded homestead box to vagrant:
vagrant box add laravel/homestead file:///f:/virtualbox.box

Change the Drive( c: or d: or e:) or Path(c:/folder1/folder2/virtualbox.box) to the location where you have stored your downloaded homestead box.
You will get success massage like image below:

Update homestead box
Navigate to vagrant directory:

c:/users/YourUserName/.vagrant.d/boxes/laravel-VAGRANTSLASH-homestead

After that, Create a file called metadata_url

NOTE: There is no extension for metadata_url

Then add the link below and save the file
https://app.vagrantup.com/laravel/homestead

Do not add a newline after link in above file.

Rename folder 0 to 6.4.0

6.4.0 is your homestead box version.
And it's Done. Hope it help.
Answer: If you have the ubuntu-VAGRANTSLASH-trusty64 folder from someone else machine you can simply copy paste the folder to
~/.vagrant.d/boxes

and use the vagrant up to start the servers. This way you do not need to add the trusty64 box manually.
Answer: Instructions for OSX/Fusion:
wget https://vagrantcloud.com/hashicorp/boxes/precise64/versions/1.1.0/providers/vmware_fusion.box
# For some reason, the downloaded filename was set to an uuid
# mv <uuid> vmware_fusion.box
vagrant box add hashicorp/precise64 vmware_fusion.box
cd vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64
mv 0 1.1.0
echo -n "https://app.vagrantup.com/hashicorp/boxes/precise64" > metadata_url
vagrant box list

Answer: I try to use vagrant up and I got URL to download box file:
https://vagrantcloud.com/centos/boxes/7/versions/1801.02/providers/virtualbox.box
Comment: `atlas.hashicorp.com` not woking. We should use `vagrantcloud.com`
Comment: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.


Computing (lagged) correlations (or similar) between multiple time-series from a VECM or its levels-VARM

Question: Ok, after trying to find a way to get all lagged and non-lagged - correlations from multiple time-series (behavioral series with length around 180) I've confined myself to the following:
I have multiple (5 so far, more coming) sets of 12 time-series with equidistant measurements, same sampling-times $t_1, t_2, ... ,t_{180}$. Not all of them are stationary, but I'm assuming for the moment, most if not all of those will be participating in some cointegration-relation. (Will have to check that, but just assuming for the time being...)
For each set (containg 12 parallel time-series) I would like to estimate a VECM and, based on that, would like to get some unique measure of intra- and inter-series correlations for lags=0..p (where p is the order of the VECM - i expect p to turn out 2..3, 4 at the max).
Now, all I'm really interested in are unique parameters of "connection", it doesn't have to be actual correlation, as long as it is unique and thus comparable between different sets of the 12 series.
(I would like to compare a certain subset of the parameters of one of the sets of series with the parameters of the other sets of series).
For now, I also don't really care, wheter the parameters are partial (correlations) or not.
My idea is to estimate the VECM and (supposing I can get a good fit for the model by some criterion) reformulate the VEVM(p) as a levels-VAR(p+1) and then using the VAR's Matrix-Parameters as measures of (lagged) "connections" between the series. Only problem (I see) is: How can I ensure uniqueness of the estimated VAR-model's parameters - I know the cointegration vectors in the VECM are unique only wrt. scalar multiplication by some constant, so I could just normalize the cointegration vectors to length=1. Would this yield a unique VAR?
Also, I've found this post, which gave me the idea to Z-transform the series beforehand, I'm quite new to the cointegration/VECM/VAR-business, but I would assume this (combined with normalized cointegration vectors) should give me unique VAR-parameters.
Does anyone have some advice on this, confirmation or criticism?
Answer: My answer to your question "Would this yield a unique VAR?" is yes.
A vector error correction (VECM) model has an equivalent vector autoregression (VAR) representation.
(VECM) $\;\;\;\Delta y_t=\Pi y_{t-1}+\Gamma_1\Delta y_{t-1}+...+\Gamma_{p-1}\Delta y_{t-(p-1)}+\varepsilon_t$
(VAR) $\;\;\;\;\;\;\;\; y_t=A_1 y_{t-1}+...+A_p y_{t-p}+\varepsilon_t$
where on one hand
(A) $\;\;\Pi=-(I-A_1-...-A_p) \;$ and $\;\;\Gamma_i=-(A_{i+1}+...+A_p)$
while on the other hand
(B) $\;\; A_1=\Pi+I+\Gamma_1$, $\;A_i=\Gamma_i-\Gamma_{i-1}$ for $i=2,...,p-1$, and $A_p=-\Gamma_{p-1}$.
The problem the of lack of uniqueness is "inside" the matrix $\Pi$ (if you factor it into a loading matrix $\alpha$ and a matrix containing the cointegrating vectors $\beta$, then you could ask what happens if you multiply $\alpha$ by a constant and divide $\beta$ by the same constant). However, there does not seem to be a problem once you go to the VAR representation; the possible factoring of $\Pi$ does not matter there. The VECM-equivalent VAR representation is unique.


Regeneration vs vaporization

Question: Could someone capable of regenerating from a single cell or cell nucleus survive their body being vaporized? It doesn't have to be perfect vaporization, it just has to look like they've been turned into a fine mist. No blood stains or gore. More practically speaking, I'm prepping this character to have a nuke dropped on them and wanna know if it's possible for them to survive after being reduced to a nuclear shadow like the ones in Hiroshima.
Comment: It's really up to you to decide what the limits of your handwavium solution is.  Can the intense heat of a nuke burn away everything that regenerates?  Will a regenerated cell retain the personality of the original?  What if two cells regenerate independently?  All of these are choices you have to make.  That being said, it's *really* hard to survive a point blank nuke.
Comment: @RobWatts it is possible, as far as I know it is possible recreate plants from single cell as example. something like that [Callus Culture](https://en.wikipedia.org/wiki/Micropropagation#Callus_Culture). For mold slime  it is not a problem, etc. For human like you need just nucleus from cell to clone human. Science is not a problem with that question. Some handwaving might be required, but over all not something super exceptional compared to other WB questions.
Comment: just solve them in acid, satisfaction guaranteed.
Comment: @MolbOrg Yeah, except cloning a human is not exactly "regrowing them." Unless you think the identity of a human is 100% genetically determined, and not at all related to their upbringing, experiences, memories, physical and chemical interactions with their environment, or their epigenetics.
Comment: yes it is possible, many animals can be cut into minuscule pieces then each piece regenerates into a new individual.
Comment: "capable of regenerating from a single cell" - this is key to answering your question, but as this isn't scientifically possible you're going to have to explain a lot more about how this works.
Comment: @Salmoncrusher I mention that some handwavium is needed. My perception of that someone is more like something, animal like agents, as humans do not possess such regeneration ability so clearly we do not talk about humans. Less obvious is that it is not about high organized intelligence, first because it is unethical, second probably with such capabilities they will give no chance for such attack. Most likely this is about brainless creatures, on reflexes. this way restoring as described by OP is not a unsolvable problem.
Comment: @MolbOrg, I think the question is pretty clearly talking about a person. That's more than a little "handwavium."
Comment: @Salmoncrusher there is no such thing as little handwavium - they constantly break that universe))
Answer: "Dune" proposed that the DNA of a person stored not only their memories but those of all ancestors. But that was written at a time when our understanding of data compression and memory was way more sketchy. (Assassin's Creed does the same thing, but they make no pretense of being hard SF.)
Given today's state-of-the-art... much harder. You'd need an animal that stores all memories in every cell of its body. Maybe its brain does the active thinking, but backups are stored elsewhere. Maybe the backups are made during sleep? But! you'd need not just the memories but the instructions to reconnect the neural net as part of regeneration to be stored in that single cell. The data density would be incredible. I bet you can find some chemistry that would support that kind of storage, but I doubt it could be done from ANY cell. Maybe there are a couple hundred at most scattered through the body. And restore would only be as complete as the most recent backup. Maybe you can have real-time back up, but that would press my suspension of disbelief, personally.
Also, you'd have to be careful... any live reboot cells that flaked off would turn into a full copy of the person.  Another reason to make it only a few cells in the body, not every cell.
Comment: And not to mention, it would take years for a single cell to grow to the size of a human. Odds are the regeneration process would be corrupted at some point, producing a slightly different human.
Answer: Aside from the points mentioned by SRM there is the issue of growth time and mechanism.
The single cell would have to be able to act independently collecting resources and replicate with virtually no DNA damage. It means that the cell must be by itself a living being, and it fits the description of bacteria.
Given that each of the cells have all the memories of the being (somehow), they would be acting as a colony, exchanging information cell to cell.
Note: acting as colony also implies that if you cut it into pieces they don't have to grow into individuals (which all would have the same memories). If the pieces can join they would merge in a single colony.

Given that the human body has around 3.72 x 10^13 cells in their body, and taking red blood cells for template, which can replicate at the speed of 2.5 x 10^6 per second. We could estimate the time to reach the biomass of a human being from a single cell...
For ease of calculation, I will say that:

the cells have eternal life (no natural death, no DNA damage)
the cells duplicate in number each iteration
the cells after 1 second reach the total count of 2^21 = 2097152 (approx. 2 x 10^6)

This means that in 1 second there are 21 iterations. With 2 cells after the first iteration, 4 cells after the second one, 8 after the third, and so on.
They would reach 2^45 = 35184372088832 (approx. 3.5 x 10^13) after 45 iterations. Given that there are 21 iterations per second, this takes approx. 2.57 seconds.

Although we are disregarding the nutrients! - the blood cell can divide very fast because they are in a nutrient rich environment.
Say, if we want 64kg of biomass in 2^45 cells, each one (under the uninformed assumption that there is tissue differentiation) would be approx. 1.8189x10-12 Kg. That is also how much that single cell would have to absorb in 1/21 seconds and we assuming that the conversion is 100% efficient.

Of course, you could say that it goes directly into animal form, perhaps building a feet first and then a leg and so on. Yet all the built structure is there wasting resources. So doing it this way is bound to be slower.
If we assume that only the ground is nutrient rich, and only a fraction of the cells is able to access it (because it is in direct contact with the ground) then it will be a bottle neck for the replication process. Only as much as cell are in contact with the ground will be able to replicate per iteration.

We already calculated the minimum time in approx. 2.57 seconds. For the maximum it would be if only one cell can replicate at a given time. I calculate that to be approx. 53128 years. How fast or slow would depend on the nutrients intake. Consider that it would be absurd to keep re-growing an inefficient form, in particular after you have a decent fraction of the biomass of a human adult.
So... there is no reason why this super intelligent bacteria has to build a humanoid. For the initial phase it is more efficient to spread in the ground as to get more resources in the same time. Or perhaps the initial phase it acts like a plant, growing roots into the ground to extract nutrients.
The being could choose any form. In fact, with some effort (and down time) it could change from the form of an animal to another. At least for the growth phase the idea is to choose a form that allows to absorb more nutrients as to minimize the bottle neck.
With that in mind, it could start moss-like/plant-like, and then move to a small animal (perhaps some insect, such a fly or an ant). Once it is in the form of an small animal it can move more easily to find good source of energy, continue to grow until a different from is more efficient (for instance it will eventually be too big to be supported by exoskeleton, so it would need to grow an internal skeleton).
In the meantime it would be moving away from absorbing nutrients by direct contact to using a dedicated digestive system that can process more complex molecules and deliver them to the rest of the body via a circulatory system. Yet there is no reason to think that the ability to absorb nutrients by contact is lost, or that humanoid is the final (let alone preferred) form.
Answer: The main problem lies with regenerating the person from a single cell. Problems with regrowing all those cells to become a whole body are problems are enough. But other answers have dealt with them, so it's game over there.
Regenerating an entity from a single cell will only produce an organism that is to all intents and purposes a biological copy of the original, but now mostly vaporized person. This is a clone in the strict biological sense. It won't be a duplicate of the original person.
To regenerate the person, that single cell needs to contain the complete memories and the neurological and psychological profile of the brain and mind of the person. Even if you could rebuild, recreate or whatever it takes to regenerate the biological bit, that is, their body, this body or its brain has to have the information imprinted on its brain and nervous system to make that regrown body into an accurate replication of the vaporized person. Now if that could be done then regeneration could be plausible and possible.
The brain is a massively complex structure and what constitutes a person is more than just our brains it is the entire panoply of experience that shapes and moulds the mind of the person. To migrate this brain and mind information from a vaporized body via a single cell to a regenerated body is an incredibly complex task. Possibly this information could be stored externally to the original body itself and the single cell used as the template for the regrown body.
Now, hypothetically, our person could be regularly uploading the total contents of his mind to some kind of computer system (the sort of computers 1990s science-fiction was so keen on) and his mind could be downloaded into the regrown body. This, if it could be done, would constitute the form of regeneration the OP is interested in.
There were suggestions that DNA could be used as an information storage medium. So, hypothetically, the person could have his information translated into DNA storage. But for him to be regenerated this information has to be stored in exactly the right cell that survives vaporization.
The system to make this work would have to include the following. A scanner to copy all the information needed to regenerate the whole person. A mechanism to translate this information into DNA and lay it down in a sufficient number of cells that just in case the person is vaporized, at least, one cell will survive to enable the person to be regenerated. It's not difficult to imagine all this machinery might be bigger and bulkier than the person they are trying to protect. This is a trifle difficult.
The technology to do this, either the regular uploading or the DNA storage, will be so highly advanced that only far future civilizations are likely to possess it.
If someone can devise a way to make this regeneration work, it would have to be something totally marvelous.

Regeneration vs vaporization


How to role play a character with low constitution in DND

Question: So I have rolled up stats for a new character in one of my friend's campaigns. I am a ranger, and the party is stuck in a forest. As such I am "the leader of the party".  As it stands the stats I rolled after applying racial modifiers: 12 strength, 20 dexterity, 6 constitution, 15 wisdom, 12 intelligence, 9 charisma. I'm pretty new to role playing, so how would this character act?
Comment: Related, and not closed, questions: [How do character stats affect the personality of the character?](https://rpg.stackexchange.com/q/89827/23547), [Are there any rules that specify that a player must roleplay their characters stats?](https://rpg.stackexchange.com/q/77028/23547).  For the second link, the consensus answer is "No" and it comes with advice from the venerable SevenSidedDie: "Let's not use comments to conduct a debate on the nature and meanings of ability score numbers."
Comment: @MiloArmendariz Hi Milo, generally closing a question is done by the other users of the site and only when it is considered a bad question - or at least one in need of editing before it can be answered well.  If you are happy with your answer, great, but leaving the question open allows it to be seen by other users who might have the same question.  We want this to be an archive of great advice, not a passing discussion forum.  Leaving your question open also means that someone else might post an answer later, which you will perhaps find just as useful as the one you first accepted.
Comment: @Kirt Milo didn't close the question
Comment: @Jason_c_o Yes, but in a since-deleted comment they asked "I have an answer, how do I close the question now?"  They were assuming that one closed one's own questions when accepting an answer.
Comment: supposedly I am the "leader" of the party because we are stuck in a forest, os yeah ranger is very useful there
Comment: My bad! I skipped the usual schpeel because I saw badges but the [tour] is a great place to start, and you can also find some help in [chat] and [meta]. Happy Stacking!
Comment: Welcome to the site Milo. This site is not a traditional discussion forum, so open ended idea generating questions like this don't work well with our format. For more detailed guidance on question asking here, see [questions to avoid asking](https://rpg.stackexchange.com/help/dont-ask) and [how do I ask a good question](https://rpg.stackexchange.com/help/how-to-ask).
Answer: Fantastic Flaws
Roleplay and rollplay very rarely line up better than when a character has certain attribute based flaws. So when we talk about a lack of Constitution, we must respect  what mechanics say about the stat as well as how the narrative plays well into it. I will give examples (with one known and dnd-famous character example) as well as suggestions. But first, remember that your character has strengths too that shouldn't be counteracted by their flaws.
Constitution vs. Health
The easiest answer is to conflate constitution and healthiness. A character with low con might get sick easily, lack stamina, or generally be pallid and malnourished. But in my view this is almost always going to end at odds with the idea of your character. And at worst, it could make a DM's job harder or leave a player out in the cold (but would be a great way to navigate a player having a less than consistent schedule). In this example, we have the Wizard of Dragonlance fame, Raistlin Majere. Born as twin to Caramon, he was the brains of the two but always physically weaker and left even more so after his trials at the Test of High Sorcery. For many books, it's commented on how Caramon cares for his brother and how Raistlin was constantly in poorer condition than the other adventurers.
Subtle Stamina
Stamina is not used nearly as much a measure in DnD terms and can lead to effective communication without need for overworking. Consider the idea that you talk about taking breaks (in character) more frequently and in worse positions. It will come off more effectively that a character is easier to wind when they call a time out mid dungeon crawl. It also helps to have "aids" like the character being the first to get horses for travel or willing to spend on caravan trips or the like. In example, maybe a chase starts and, instead of sprinting with the party, you immediately go for the stealthy option and try to walk instead.
Combine Stats for Greater Effect
A character with the stat line up that you have says many interesting things. They are very nimble and decently wise while being fit and knowledgeable. But they are meek and easily winded. So my advice to how I would play this stat line up would be the "anti" hero. They think about plans, none of which call for glorious battles or daring theatrics. They prefer roads and well trodden paths to roughing the countryside, even if they know the land (like a ranger in their forest might). They might act the part of a hypochondriac or get a buzz from a whiff of alcohol. And, if all else, they might have a deathly fear of poisonous/venomous things.
A Summary on Statistics
D&D is always foremost about heroes. Any suggestions for roleplay ultimately will only guide you toward how you would like to portray a character. And I would encourage you to mix and match mechanically focused roleplay as well as narratively minded roleplay. There are a wealth of ways to portray a character like this that range from innocuous to damaging mechanically. And as always, talk with your DM about whatever you decide. That way they know how best to play off your weaknesses and strengths in the character you make.
Answer: What does Constitution mean?
The PHB section on using ability scores tells us:

Constitution
Constitution measures health, stamina, and vital force.

Constitution Checks
Constitution checks are uncommon, and no skills apply to Constitution checks, because the endurance this ability represents is largely passive rather than involving a specific effort on the part of a character or monster. A Constitution check can model your attempt to push beyond normal limits, however.
The DM might call for a Constitution check1 when you try to accomplish tasks like the following:
Hold your breath
March or labor for hours without rest
Go without sleep
Survive without food or water
Quaff an entire stein of ale in one go

What is a ranger?

Warriors of the wilderness, rangers specialize in hunting the monsters that threaten the edges of civilization—humanoid raiders, rampaging beasts and monstrosities, terrible giants, and deadly dragons. They learn to track their quarry as a predator does, moving stealthily through the wilds and hiding themselves in brush and rubble. Rangers focus their combat training on techniques that are particularly useful against their specific favored foes.

Putting these together
You are a wilderness warrior, skilled in things like hunting, tracking, and fighting monsters.  And yet you are frail - for the typical person of your race and age, you would be considered delicate - easily injured, not able to stand up to a solid blow or take much damage.  As a ranger, you can cast spells - but if these spells require concentration, you are unlikely to be able to maintain your focus on them (including your best friend, hunter's mark).
So what does this mean?  The easy or obvious answer is all about mechanics - you are a missile combat specialist.  With your Dex of 20 you are a crack shot with a bow, but your Con of 6 means you will never want to face your foe in melee.  You have a slight, willowy build and can glide effortlessly through the forest (at least until you tire), but a single solid hit will stagger you.
Something a little more complicated means leaning in to your roleplaying.  Examine your flaw, and your favored enemy, and see what you have to work with.  Perhaps you are haunted (not by literal spirits, but by premonitions).  Your eyes dart about, you are restless, you can never sit still long enough to eat well, you sleep but fitfully.  You are agitated, unable to overcome your dread about...that roleplaying thing.
Another possibility is that you are unwell.  You have some sort of wasting  disease or condition - a wracking cough, a wound that won't heal, or some such.  This is similar to "haunted", but instead of being filled with dread about your next encounter with [X], you are still suffering from your last one.  You barely escaped alive, and it left you somehow scarred or maimed.  This one depends a lot on your campaign, because if clerics have the ability to cure physical diseases, you might be able to get rid of the roleplaying reason for your low Con score without changing the score itself, which will give you some difficult choices.

1 For the not-obvious distinction between Constitution checks and Constitution saves, see: How are Constitution-based checks and saves differentiated in these circumstances?


If I highlight and annotate a PDF in iBooks, will those highlights be kept if in Adobe Acrobat?

Question: If I highlight a PDF in iBooks on an iPhone and save the PDF, will those highlights be present if I open the PDF in Adobe Acrobat? Or vice versa?
Comment: Perhaps this would be time for you to test.
Answer: The PDF specification explicitly describes annotations and highlights, so any app that can read PDFs should be able to display them, and any app that saves PDFs should save them.
Apple's PDFKit produces annotations and highlights that are to spec, so they should be compatible with other readers. I would suggest it's a bug if they aren't.
The only non-standard implementation that I know of is that MacOS's Preview uses proprietary Bookmarks, which cannot be read by other non-Apple applications. Bookmarks from Acrobat and other PDF apps will appear in the Table of Contents sidebar in Preview and other Apple PDFKit-based apps.


My sourdough starter is thick with small bubbles but isn't rising

Question: I started my sourdough starter on the 17th. I was doing 1/2 cup water, 1/2 cup flour with one feeding a day, discarding half before each feeding. It rose with bubbles the first two days and then began having hooch every day. I started feeding it twice a day on the 23rd (which would have been day 6). On the 24th I switched to 1/2 cup flour and 1/3 cup water to get rid of the hooch and create a thicker consistency. Since switching to the different amount and continuing to feed twice a day, the starter is thick with bubbles on the top but still isn't rising. Should I start over? Should I be patient? Today is day 9 and I am one feeding in. Please help!
Comment: As a recommendation, you might want to try feeding it only once a day.  I've done a number of  starters, and feeding twice a day only makes sense if the starter is in a very warm place (26-32C).  You could be turning it over so fast that the culture doesn't really have time to grow.
Comment: I will only feed it once today instead of twice and see how that works!
Comment: as an aside, sourdough starters work equally well with a tablespoon or two as with half a cup, but you waste way less flour that way.
Answer: Your problem is an American one: you are feeding equal volumes instead of weights. Since water is a lot denser than flour, this results in a very liquid sour dough.
Since it is liquid, it can't really rise, it needs to be thicker for that.
Switch to feed equal weights of flour and water, and you should get a thicker, rising sourdough.


Observer in Many Worlds Interpretation

Question: Something has been bothering me about the Many Worlds Interpretation. Proponents of it (e.g. Sean Carroll) often claim that it does away with the observer, or at least the paradox-inducing status the observer has with Copenhagen. However, my impression is that Many Worlds instead displaces the interpretation of probability, and gives the observer, if anything, a more mysterious role than in Copenhagen. Many Worlds seems to take the probabilism Copenhagen ascribes to the wave function and transposes it onto the observer. In Many Worlds, every possibility of the wave function is realized, so the probability becomes about the observer, and which "world" the observer ends up in. Is this a correct way of thinking about Many Worlds? This doesn't seem to me to do away with the observer, or make its status any less confused than Copenhagen does.
Comment: Possible duplicate of [The role of the "observer" in quantum theory?](https://physics.stackexchange.com/q/413364/)
Answer: I think most of the confusion about "observers" in interpretations of quantum mechanics comes from assuming that an observer is something other than a physical system- something supernatural, perhaps.
A physically reasonable definition of "observer" would simply be any system capable of storing a history of its interactions with other systems.  Per that definition, a photographic plate would qualify as an observer.  In MWI the plate would exist in a superposition of states corresponding to whether or not it recorded each photon incident upon it.
Answer: There is some notions that some physicists try not to abandon. For example, the principle of locality. In this case, behind the Many Worlds interpretation there is this idea of determinism, the fact that the wave function could be in principle some kind of undeterministic reality bothers some physicists, and this interpretation try to maintain the determinism just by saying that all possible results are "real" in some sense. Maybe the strange fact would be to think in the free will of the observer.
Comment: -1: Not all physicists think the same - so that ought to be 'some physicists'; by omitting 'some', one understands all - and this is not the case: Einstein, according to a major biography and contra the usual mythology was not disturbed by the loss of determinism in QM.
Comment: Sorry, my error. Some physicists. You are right, in fact, great physicists in the past were ok with this idea of indeterminism.
Answer: It is not necessary to invoke Many Worlds in order to perform a straight forward statistical prediction.  If using such a devise makes one's computations easier, fine; but, the Many Worlds concept only has credence if one feels compelled to grant a tangible ("real") existence to the Wave Function.
The Wave Function is far easier to understand if we treated it as a mathematical representation.  The idea that a wave function "collapses" and can only do so if observed by a consciousness is pure fantasy; the function is resolved (meaning probability = 1.0) occurs with any encounter with another particle or force field.  Feynman's Path Integral precisely describes any such encounter.  The wave function is re-initiated after the encounter based on the phase state changes resulting from the encounter.
Physics was never really the deterministic process so worshipped by Einstein.   It was always a statistically probabilistic set of occurrences that was undetectable at the macro-level. QM merely made our system of approximations apparent.  Newton showed that where enough atoms gather together, they will act as one predictably in accordance with macro-physics. So, why are quantum physicists driven to mysticism to explain mathematics found everywhere in our daily lives?
The wave function is a probability distribution function like any other.  It is an algorithm that describes the accumulative effect of our predictive error until the next encounter or "measurement."  It is not a phase-space state of a particle anymore than the other mathematical symbols used in the Path Integral equation. Why does the function "collapse" when we observe the particle?  Because at the QM level, we cannot observe without disturbing the particle's phase-space states.  Thus, the wave function must reset based on this disturbance.
What seems to unnerve so many is our inability to measure at once all the relevant states of a particle.  But that's true at the macro-level as well.  In order to measure my automobile speed, I must travel some distance; but, in so doing I have smeared my location over that distance.   We can make both measurements close enough together so it doesn't matter for a car.  In QM, however, it matters!  That's all.
Entanglement is not spooky communications at distance, and it is not determined by some unknown local variable.  The classic case is merely our lack of knowledge about what is happening inside this "cat's box."  We know that when two electrons are entangled, one spins up and the other spins down.  We simply don't know which.  later, at some distance of separation, we find that one spins down and simultaneously find the other spins up.  All we did was open the box to see if the cat was dead yet.
Sean Carroll is far less prone to bait the lay reader with flights of fancy; his ontological themes remain grounded in "observable" reality. He also appreciates the need to explain that the English words used by scientists mean different things when talking physics. At another extreme is the mathematically rigorous and startling interpretations of Roger Penrose; no doubt, his ground-breaking postulates have spawned hundreds of science/math careers. It is the broad range of authoritative differences in interpretation that make the study of physics so exiting and revealing.
The novice is probably best served by starting with the currently accepted Core Theory. Need a starting point? Wikipedia continues to build a depth of offerings to get you started. Also, consider the Feynman Lectures on YouTube. From there one can appreciate how and why such theories as Many World gain traction.
It remains undisputed, however, that the mathematical logic of the Core Theory is astonishingly accurate and prescient.  The Copenhagen Interpretation adherents, while still the largest single group among practicing physicists, represent an every-decreasing minority view among at least a dozen other viable interpretations. So, the oft spoken truism still applies: "Shut up and compute." -- Mermin
Comment: -1: Feynmans path integral is the Lagrangian method in QFT; whereas the canonical approach is the Hamiltonian.
Comment: This answer is so far off the mark. Measuring the spin of an electron is absolutely not like measuring the velocity of a car, it is proven experimentally that there is not some fact about the spin of the electron, some constant fact that is always true that we just later measure. This is the point of Bells Inequality, and the experiments that verify it

Observer in Many Worlds Interpretation


Pass/route/thread a chain? (Terminology)

Question: What is the most common term referring to when you pass the chain through the RD when installing
a chain?
"Pass the chain through the RD"
"Route the chain through the RD"
"Thread the chain through the RD"
Thanks.
Answer: FWIW, Shimano, in their Dealers Manuals discussing the installation and set up of their rear derailleurs use the term, "pass(ing)." As in, "When passing the chain through the derailleur..."

When I speak of this action or checking the set up, I use "route." As in, "check that the chain is routed through the derailleur cage correctly." Or, "are you routing the chain on the correct side of the anti-derailment tab?"
Any of your suggestions would be correct, and I submit that if 100 professional bike mechanics were polled on which they most often used, each of those terms would get some percentage.
Answer: I'd generally use "route" in this case, but any of the terms you've listed will work and are understandable. It's not a significant point of conversation.
Answer: They all work perfectly well in normal English.  Anyone familiar with a rear derailleur would know exactly what you mean.
Additionally one could say  Install the chain or Fit the chain.
Doing it right is implied.
Answer: As a non native English speaker, to me the term "pass" sounds more casual, and more apt to be used when it is understood that it implies installing a chain, for example, when talking among people of similar technical skill and where the main topic is something else. For example, if talking about replacing a front derailleur that most of the times implies opening the chain and it may be removed completely for some reason.
On the other hand, "routing", to me, seems more appropriate when the main topic IS the rear derailleur or the re-installation of a chain, and it has the implication of properly observing where the chain should or should not go. Also, is is perceived as more adequate when there is an exchange between people of different skill levels, like during a training, tutorial, etc. It sound more formal.
To me, "threading", even though understandable, seem like a word adopted from some other activity, particularly from using sewing machines, where before starting you have to meticulously route the thread through many holes, loops, springs and around some shafts, etc...
Also, note that "Routing" may apply to other components, particularly cables or hoses for brakes, derailleurs, dropper posts or electrical cables. In that context, "passing" sounds like the hose or cable is there just by chance, as if it is the middle point between two more important points, whereas "Routing" sounds like the cable has actually something to do there, like when it goes through a fastener or a grommet, inside a liner, etc.
In conclusion, at least for me, "Routing" is the preferred word as is sounds more formal, is more widely applicable and is does not sound as dismissive as "passing".
Comment: There's nothing casual or dismissive about "pass"; it's just a standard verb of motion commonly used when something goes beside or through something else.


Howto: execute a custom application from pcmanfm in lubuntu

Question: I run Lubuntu 14.04.3 LTS and I have downloaded and installed castnow to stream videos from my PC to my Chromecast.
The only alternative I know is to do this via Videostream using Chromium. But that uses so many more resources that my poor old laptop barely cannot take it...
I find that castnow works really well. But it is a command line tool and to start it I have to go to a terminal window and run:
castnow --address [ip address chromecast] --myip [localip] [path to video]

This works, but I would find it much easier if I could navigate to the video using my file manager (pcmanfm) and open the video.
I have tried to create a script file that runs the above command using the selected file as an input parameter (%f) but I have failed misserably...
And my dear friend Google has not been able to help me so far.
Can anyone help me to get this done?
Update 16 Oct:
I have nearly done it!
The thing that took most time was to find the bug in pcmanfm that it does not execute shell scripts. The following article describes this well and gives a workaround: https://bugs.launchpad.net/ubuntu/+source/lubuntu-default-settings/+bug/975152
I have created a .desktop file that executes a script and passes the file as a parameter. This appears as an option in the menu and that way you can also select it in pcmanfm.
The script takes the filename as a parameter and runs castnow with all the parameters.
Unfortunately it doesn't work.
The script I created goes like this:
filename=$1
filename=${filename:7:$((${#filename}-7))}
filename=${filename//%20/\\ }
echo castnow --address 192.168.0.21 --myip 192.168.0.47 $filename
castnow --address 192.168.0.21 --myip 192.168.0.47 $filename

The result is:
castnow --address 192.168.0.21 --myip 192.168.0.47 /home/joost/Videos/American\ Horror\ Story\ Season\ 1\ Complete\ 480p\ BZINGAZ/american.horror.story.s01e11.720p.hdtv.x264-compulsion.mkv
Error: Load failed

And when I copy the command to another terminal window it works.
How can this be?
And how can it be solved.
Another update:
The problem seems to be related to the spaces in the path.
The desktop file sends the path to the bash script with the %u parameter.
And as the folder has some spaces in it, they are converted to %20
In the script I convert these back to "\ ".
If I test my stuff with a file that has no spaces it works (!!!).
But spaces are part of life.
How to get around this?
And another update:
I did it!
With a bit of tricking, but it works.
I have added some lines in the script to replace all spaces by underscores on the file system:
#!/bin/bash
# replace all spaces by underscores in the Videos-folders and -files:
find /home/joost/Videos/ -name "* *" -type d | rename 's/ /_/g'    # do the directories first
find /home/joost/Videos/ -name "* *" -type f | rename 's/ /_/g'
filename=$1
# remove file:// from the file-variable:
filename=${filename:7:$((${#filename}-7))}
# new films may contain spaces in the path. They have been replace by underscores. This also needs to happen in the parameter:
filename=${filename//%20/_}
# now we are ready to go:
castnow --address 192.168.0.21 --myip 192.168.0.47 $filename
read

It works and I am happy with it.
But if someone knows how to get around the spaces I'd be happy to know.
Update 18 Oct:
I have found out how to get around the spaces (and other special characters).
First of all I found out how to urldecode the paramater.
But the trick to get around the spaces (and other special characters) turns out to be to add 'eval' to the statement.
So the final statement in my script is now:
    eval castnow --address 192.168.0.21 --myip 192.168.0.47 $filename
So, that's it.
Only remaining issue is that castnow doesn't seem to be able to play avi files. I have created an issue for this at github.
Comment: Is skipping the middle man, setting up Samba, and then just accessing it from your Chromebook an option?
Comment: I don't have a Chromebook.
I do have a Chromecast, but I don't believe I can start on the Chromecast and access files on my Lubuntu. If this is possible, I'd really like to know how.
However: it does work now and I am quite happy with the way it works.
Answer: You can set the default application to use for the relevant file type: Right-click a video file, select "Properties", change the "Open With" selection, and press OK.
Comment: Thanks for your reply.
Unfortunately castnow does not appear as one of the programs to choose from.
Besides, I would not be able to pass parameters like --address en --myip


Casting Shadows in BGE

Question: In the blender game engine, are there any ways to cast shadows aside from using a sun lamp or a spot lamp?
Comment: I would be really interested in this, it could be useful for the new BGMC project coming up.
Comment: You could bake your shadows as a texture on your objects, that way you don't need to use any lights at all.
Answer: If you are talking about just the "normal" lamp types (Point, Sun, Spot, Hemi, and Area), then no. The Sun Lamp and Spot Lamp are the only two that cast real shadows in the BGE. (FYI the sun lamp has only been able to cast shadows since 2.64).
You can use lighting tricks, like a fake shadow texture on a plane. Or transparent planes with the light cast pattern and beams.
You could even bake the lighting to textures and then use all shadeless materials in game.

Casting Shadows in BGE


what happens when cookies file exceeds maximum size?

Question: What really happens when cookies file exceeds maximum size?
Comment: var i = 0;
while( true )
{
   i++;
   document.cookie = i + "=" + i + ";" + document.cookie;
}

Try it out.
Comment: worth pointing out that the above comment will result in an infinite loop, since browsers tend to discard old cookies when there are more than 20-ish of them for the same domain... also, it does not answer the question of a maximum file size, only maximum number of cookie files per domain
Answer: The typical behavior of most browsers, to my knowledge, is to simply truncate the oldest data that does not fit.
For example, create cookies 1 through 9.  When creating cookie 10 and the data size is going to overflow, cookie 1 is simply discarded.
In general practice, if you are worried about bumping into the limit and loosing cookies to overflow, it is probably time to rethink your strategy of what you are storing and start caching the data server-side and limiting the cookie to a value to access the cached data.
Answer: The file is truncated to the maximum length.
Answer: I think that would be browser dependent, since RFC2965 does not define a maximum size for cookies or any standard behavior for when the maximum is exceeded.


replacement valid UK visit visa to a new passport because the old passport lost

Question: i am looking to replace my UK visit visa from lost passport to a new passport
it is valid visa , I have copy of it and it had been used for entry UK before
what is the procedure ?
it was issued in UAE Abu Dhabi via VFS in 2017
Comment: Where are you now? Is your lost visa a long-term Visit Visa (multiple entry)? When does it expire? Do you have a police report for the lost passport?
Answer: You would need to apply for a replacement visa and show evidence of the loss.

2. ECB17.2 Replacing a visa (or leave) where this has been lost or stolen (excluding 30 day short validity (travel) vignettes)
If the applicant loses their passport and visa, or has their passport and visa stolen, they are applying for a replacement using transfer of conditions. There will be a vignette transfer fee for the service. (See the visa fees page on GOV.UK for the current fee.)
You will need to see a police report or other evidence that satisfactorily establishes that the passport is no longer in their possession. This also applies if an applicant had 'leave to remain' granted in the UK (excluding on a BRP) and is now applying to have it replaced overseas. See Biometric information: case working for further information on replacing a BRP lost overseas.
If required, you may ask for supporting documentation to establish that their circumstances have not changed. ECOs should use i-search to obtain information on an applicant's leave granted in the UK. If information is not available on i-search you must make a referral to Evidence and Enquiry Unit.


Anyone know the name of a cabinet hinge that will "kick out" 3 inches (see image)?

Question: What is the name of a hinge that will kick out when open? (See image below - click to enlarge.) I have an adjacent blind that won't let me open my kitchen cabinet.
Answer: I've never seen a cabinet hinge sold for this specific purpose but it's a good idea.  I hope you find it.  If not:
You could try adapting a double action hinge:

They are meant for doors swinging both ways.
When one of those is spring loaded (and usually ornate) it's a saloon hinge.
You could also possibly adapt a tandem hinge which is meant for double doors layered one on the other.

Alternate approaches, if you don't find a hinge that works here, would be to

reverse the door.  It looks like it would clear the window if the hinge was on the left.
Move the cabinet a little to the left, if that's possible.  You could install a "gap fill" strip that you can buy at any hardware store given it's a common wood finish.
Answer: A concealed hinge offers this functionality, or at least similar to what you seem to have:

(but the ones in my closet only do one inch, not three...)


Where can I access a NXT public testnet node?

Question: Was wondering where can I access a public NXT testnet node?
Answer: Start up Nxt on your local system in Testnet mode and display peers (on the Settings Menu (gear graphic) in the header bar). The peers with a domain name are likely to be public nodes. Here are a few:
nxt.noip.me, raspnxt.hopto.org, node1.forgenxt.com
For example, put node1.forgenxt.com:6876 in your browser to open the Nxt Wallet.
Some of the non-domain name (IP address only) will work too.
Answer: You can also look at the nxt.defaultTestnetPeers setting in nxt-default.properties
However, if you are planing to make changes to the client it makes sense that you run your own testnet node on your development workstation and download the testnet blockchain first.


How do contact lenses work?

Question: I understand how telescope, microscope and glasses work.
But how do contact lenses work?
Answer: Your question is really "how does the human eye work?", since the contact lens is designed to adjust the optics of the human eye.

This image from the wikipedia article on the anatomical lens shows how the cornea and lens focuses incoming light from the left onto the retina (right).
Previously, I'd written that the biological lens in the eye was responsible for the optics; however, as pointed out in the comment of David White below, the cornea actually performs most of the focusing; according to wikipedia, it contributes about 2/3 of the focusing power. Most of the rest is due to the lens, which also performs an important role in the process of accomodation, which is how we change our focus between objects at different distances.
For people who are nearsighted or farsighted, the light coming into the eye does not end up in focus.  See this picture for the case of nearsightedness:

You should imagine the contact lens being placed over the cornea (left surface) and causing the rays to adjust so that the image ends up in focus.
Comment: @j.c., the cornea does most of the focusing, and the lens fine tunes it.  I know this from personal experience ... in 2003, an eye surgeon removed 100 microns from my corneas and corrected a -8.5 diopter focusing error in my eyes.
Comment: I think he really meant 'how do contact lenses work'. As far as I know, the same way that spectacles work.
Comment: @DavidWhite That's a great point! According to Wikipedia, apparently the cornea contributes about 2/3 of the focusing power https://en.wikipedia.org/wiki/Cornea and the lens is responsible more for dynamic adjustments https://en.wikipedia.org/wiki/Accommodation_(eye)
Answer: The thing that confused me at first about contact lenses was that they didn't look like "normal" lenses, in which each side of them curved in the opposite direction to each other.
As I understand them, contact lenses are Meniscus lenses - wherein the sides are curved in the same direction as each other, but more curved on one of the sides. You can see some examples here.
Comment: The inner surface of a contact lens doesn't do very much. Since the refractive index of the glass/plastic of the lens and the (mostly) water of the cornea is similar it has very little power - and it's constrianed to be that shape to fit comfortably
Answer: Contact lenses work in the same way as glasses, by adding or subtracting wavefront curvature.
This basically adjusts where the focal point of light entering the eye is, glasses and contact lenses are designed to adjust it so that the focal point of the light lies on the retina.
The main differences I can see between glasses and contact lenses, is that the contact lens faces are both curving outwards like this (( rather than this () or this )( like traditional glasses.
This is so that the lens can rest comfortably on the outside of the eye.
If we remember the laws of optics, we remember that the light is only affected by the changes in refractive indices, in the boundaries between air and glass for example.
In normal glasses the two surfaces are air to glass and glass to air.
In contact lenses we have again two surfaces, but it's air to contact lens then contact lens to eye.
Note I say contact lens not glass as contact lenses are made from a variety of materials.
The focal point adjustment in a contact lens happens mostly at the outer boundary - the one between air and the contact lens.
The fact that the other surface is curved the 'wrong' way (for some types of lens requirements) means that it's effect must be calculated and compensated for by the outer surface.

How do contact lenses work?


how to insure that after inactivity of 15 min in userpage will goes for logout with a popup message in salesforce?

Question: Can anyone tell me to  ensure that after 15 minutes of inactivity our customer portal logs out the user and prompts them to log back in after inactivity?
Answer:
In you session settings for the organization select the options as shown.
1)Set Force logout to true
2)Select Disable session timeout warning popup to false
Note that this will apply to all the users and profiles .Not only to portal users .


Approval workflow for the page edits

Question: We have a lot of pages where critical information is provided to the users. Only a select few have access to edit the pages. I would like to know if there is any way that a supervisor can see and approve the changes made by the contributes before the publishing is done. Like a workflow attached to the page to sent details when a contributor makes changes and once the supervisor approves it the changes made will get saved.
Answer: There is publishing web page in SharePoint on premise, but I haven't had any change to check that feature in online.
Here how you do Require approval of items in a site list or library, under library setting:

Set "Require content approval for submitted items?" to Yes
Set "Only users who can approve items in the list, and the item author"
Give user "Approve Items  -  Approve a minor version of a list item or document." or just set up a SharePoint group with that permission and add that user to the group.

To inform approval, we could create a workflow.
Comment: @Rinu I saw your attachment, give user Approve permission that's what they need. Approver can Approve it from the page, is there tab Publish when you open those page? In on premise you can approve that page from there.
Comment: Thanks Ariwibawa. I was able to do the above skiping  the 3rd step and providing contributed access to the user. I coudnt find "Approve Items  -  Approve a minor version of a list item or document." fom the permission list as shown in the link https://keoftpwu.blob.core.windows.net/ftp/temp/ess0rd3t.nsc.zip
Comment: I usually work with share point designer, When item is created or edited and providing the link to the current list item. in this case the link sent will be the page itself right? and is there any way we can present the changes to the approver  so that they know what they are looking for rather than going through the entire page and figuring out what changes are made to the page. and is it possible for the approvar to approve it directly from the page rather than going to the page library?
Comment: @Rinu I'm afraid I haven't had any idea how to present changes side by side. You can use Page History hopefully that will be enough for your need. http://wiki.plexhosted.com/kb/Microsoft_SharePoint_2013:Page_history_and_versions

Approval workflow for the page edits


Why the real book and original recordings sound a lot different?

Question: I am trying to learn jazz standarts from the real book and for example when I play "autumn leaves" or "black orhpeus" with guitar from the real book it sounds simpler than original recordings of Paul Desmond. What causes this and how can I practice in a way that is more similar to their music?
Comment: I think you are giving too much credit to the Real Book, or expecting too much.  See my answer for more.
Comment: Paul Desmond is not the original artist for either of these tunes.  Black Orpheus (actually,
Manhã de Carnaval) is by Luis Bonfa (composer and performer) for the movie Black Orpheus.  Autumn Leaves (originally Les Feuilles Mortes) was composed by Joseph Kosma with original lyrics by Jacques Prévert in French, and later by Johnny Mercer in English.  It was first recorded by Yves Montand in French, and by Jo Stafford in English.  The history is actually a bit more complicated.
Comment: The real book doesn't sound like anything.  It's barely a score.  They are like cliff notes or cheat sheets for full scores.  Are you saying that the notes or chords are different and can you give an example?  Or is it that there isn't enough info in the book to replicate the recording?
Comment: @JeffLearman makes a great point: many Real Book transcriptions were not even made from the original recordings!
Comment: When I play the score on guitar something feels missing. Maybe it is because I only play notes not the chords and I am not doing any improvistation neither
Comment: A true score, with all parts, should be a more faithful representation, unless for example it's a Big Band chart version of a small group tune.  In that case voices are distributed and filler added.
Comment: The Real Book was a joke title; some Berkelee students in the 1970's thought they could do better than the existing fake books, or focus on newer or more esoteric material. What they produced is another fake book called The Real Book.
Answer: The Real Book is meant to give you the basic ingredients for these standards, they are not full scores or transcriptions.  I would hope that at least the head is correct but sometimes it isn't.  The chords may or may not come close to those on the recording and much of unique elements of the recording are completely missing, like intros etc.
You can learn the tune and make it your own from the Real Book (and that's the intent), but you will never get the authentic feel of the original from it.  That is why they list the recordings in the Real Book.  You are supposed to find them, and listen.  Your ear is the best way to learn.
Comment: There's the additional issue that realbook versions aren't necessarily written from one specific recording. They may be generalisations of several versions, companded in the author's head, as a 'decent average' of how it goes.
Comment: This is of course an issue, not only with the Real Book, or with any jazz transcriptions, but with all musical notation: it's always an abstract and does not contain all the information present in a performance.  Listening and playing are the only way to make music from paper.
Comment: One clear example is "The Girl From Ipanema". The real book version is quite wrong compared to the original. In that case they didn't even go to the original for their transcription!
Comment: @ToddWilcox, You are right about programming a score in comparison to human performance but with a full score I can imaging what it might sound like, I have a chance.  With a lead sheet and no other experience all hope is lost.
Comment: @Tetsujin Good point
Comment: @ScottWallace Good point! If you program Beethoven's fifth symphony into a DAW with an orchestral sample library exactly as written, the timing won't sound anything like how it is conducted 95% of the time. To get the most out of music, you can't be a slave to the score, unless that's clearly the composer's intent. Counter examples would include a lot of movie soundtrack scores, which have to be written fairly precisely to synchronize. But even then there's a lot of wiggle room in the dynamics and balance of the parts.
Comment: @ScottWallace - and, of course, the Real books aren't meant to be full transcriptions of any piece. Which isn't what jazz players need or want in any case. They just want a blueprint to work from, and that's what they get. Hardly a blueprint in reality. More a sketch.
Comment: @ToddWilcox - true enough. I guess OP was considering that a lead sheet might be the same as a score. Wrong!
Answer: Real and fake books are skeletons of classic tunes. They're the bare bones - containing minimal information. The basic tune (lead) and the harmonies (chords), sometimes with alternative chords shown. They're really not meant to be any more, any less. They're enough for musicians to have in front of them to play, straight off, any of those tunes.
Because it's mostly jazz, even a simple rendition may deviate from what's written - it's what jazz does - so expecting anything in the Real book to be a faithful copy of any recording is folly. And if one only plays the tune, bare, or the chords, with no melody, well, it's hardly going to sound like a trio or quartet track.
Listen to ten different recordings of, say, Autumn leaves, and you'll recognise the melody (at least first time round!), but then you'll hear ten different  - often very different - 'translations' of the piece. All probably initially gleaned from a Real book.
Plus - they're going to sound rather different unless you use the same instrumentation as on tha recording, and maybe  - even the same players!
Comment: This is the best advice.  The fact that the author knows it doesn't sound right indicates that they've heard it.
Comment: Indeed.  It might be noted (hehe) that the beginnings of musical notation in the West were derived from cheironomy, the use of hand gestures to indicate where a melody went up and down, and were only intended as a _pons asinorum_ or mnemonic: an aid to the memory, not an attempt to convey all the information necessary to perform the piece. The evolution of notation over the centuries gradually added more and more information, but the idea that written music should make it possible for one who doesn't know a piece to reconstruct it completely is a very modern one, and arguably not possible.
Comment: I guess I should add, to be historically correct, that by "beginnings of musical notation in the West" I mean the neumatic notation, which gradually evolved into our modern notation.  There were earlier forms of notation, for instance the Greek symbols indicating steps of the scale, which died out.
Answer: A Real Book chart is often based on the most popular version of the tune, not necessarily the original.  For example, Autumn Leaves and Black Orpheus are from the Sinatra versions.
And, as stated in other answers, these charts are intended to show the conceptual framework of a tune, rather than capture nuance of a particular version.
Comment: An even more notable example where the Real Book is based on somebody's adaptation of an original song would be "Alice in Wonderland".  The song for the movie is in duple meter (probably 4/4), but the Real Book version is in 3/4.
Answer: As the other answers point out the Real Book is just a collection of lead sheets.
You must be just starting out with jazz so you should look at both:

Fake books and lead sheets, and get some books or lessons about how to play from a fake book. There are lots of lessons for that.
Jazz transcriptions, which is when someone writes down in notation a recorded jazz improvisation.
Original published sources. Depending on the song you can get the original music many standard songs come from Broadway musicals.

My personal peeve was with rhythm changes and the song I Got Rhythm. There literally is no one definitive version of rhythm changes. There are endless examples of the changes and lead sheet versions. I finally got a copy of the Gershwin music from a published copy of the musical Girl Crazy. But, even that was surely not the notation pages used by the orchestra for the original production. It was just a piano reduction. You can also find various piano solos which are probably the work of various editors/arrangers and not necessarily a transcription of anything Gershwin played himself!
Eventually you realize this kind of music - jazz and pop music - is not about a definitive score. I suspect many famous tunes started as some combination of composer's notebooks, band charts, etc. used to make a first recording and those sources are not published. Then some sheet music version was published for people to play at home, either to promote the tune or to meet demand for a popular tune. Other musicians perform and record the tune. In jazz the first fake book was developed and people wrote lead sheets that sketched a general outline of songs.
There is no "urtext" like in classical music. You need to look for the resource that fits your purpose...

how can I practice in a way that is more similar to their music?

get some resources about how to play from a fake book, you don't simply play the lead sheet exactly as written
look for transcriptions of specific performances you like, the traditional jazz way is to do it by ear, "quote" parts of their playing or emulate it in a general sense

One final thought. You tagged your question with guitar, but compared the fake book to Paul Desmond recordings. You will probably have an easier time learning how to play guitar from a fake book if you compare to recordings or jazz guitarists.
Comment: A friend of mine was MD for Buddy Rich (don't ask;)) He would frequently have to arrange tomorrow's gig on the bus to it, back in the days when it was all pen & paper. Buddy would see & hear it for the first time **at** the gig, onstage, & woe betide if he didn't like it!!


Where should I insert data into the database?

Question: I am making a pretty standard PHP sign up form that will validate the data the user entered and then redirect to a page with a success message. I would like to store this data in a database. Should I insert this information into the database before I redirect the page or after it is redirected?
Comment: The way I like to do it is to make kind of a data-submit page that doesn't have any visible output but which on success redirects to success-page and on failure redirects to failure page. Just make sure to get your headers right. Original page --submits--> datasubmitpage --onsuccess-->successpage.
Comment: If the redirect is the success message then you might send a success message even when the entry in the database fails.
Comment: So you would favor doing all the operations on the initial form page and not redirecting until everything is done?
Comment: Why do you store the data? Would storing the data still be meaningful if the next page never showed? Could the user enter the information again? Why is the thank you note on a separate page?
Answer: The pattern for the success case:

Read POST request
Validate POST data
Pre-process POST data
Store
Redirect
Read GET request
Display success message

And in the failure case:

Read POST request
Validate POST data (if fail, go to 5.)
Pre-process POST data (if fail, go to 5.)
Store (fails)
Display error message

In your code, this structure looks somewhat like so (pseudocode, obviously):
if (is_post_request) {
    data = empty_data()
    try {
        data = read_post_data()
        validate(data)
        preprocess(data)
        store(data)
        redirect()
        exit
    }
    catch (ex) {
        display_form(data, error_message = ex)
    }
}
else {
    data = empty_data()
    display_form(data, error_message = NULL)
}

The reason you're redirecting is that you want to avoid a second database update when the user reloads. Because of this, you need to first store and then redirect. In fact, I recommend you make a habit of calling exit immediately after each redirect. There is no point in doing anything whatsoever in the current request once you've redirected (except cleanup, such as closing open file handles).
The reason you don't redirect in the error case is because nothing has been stored yet - if the user reloads, they'll just run into the same error again. If you were to redirect in the error case, you'd have to carry the error messages over the redirect, which is possible but not really pretty, and you'd have an unnecessary round trip.
Answer: The short answer: Make the database update before the redirect.
You should always use the get-post-redirect pattern when the user submits a form that alters application data. (Props to @WyattBarnett and @PieterB for answering in comments.) In order to work well with browsers, only GET requests should display a page to the user, and GET requests should never have side-effects like database changes, email messages, etc.
So you POST** the form to a processing script, which handles validation, writes to the database, sends emails, whatever... and redirects to another page, which will be requested with GET and will not do any of those things. It just displays stuff.
** Read about REST for an approach to http methods that goes beyond GET and POST. It's most likely not necessary for this application, though.
Comment: Thank you for your answer - would it be a bad practice to include the processing script in the original form page, and redirect through a header() to a success message?
Comment: @fdsa: What really matters is the pattern of requests and responses between the client and server, not which code lives in which file. You could put all of the code in one file and use $_POST and $_GET to determine which action to take or view to render. Or you could use a separate file for everything, or something in between.
Answer: You could avoid redirecting, You could have the form Action field submit to the current page and have a snippet of PHP higher up on the page to watch out for the form submission, save the data and show a Thank you message then.
For example:
<?php
if($_POST['submit'] == 'Sign up')
{
// place some code here to save the details and thank the user
}
?>

<form action='sign_up.php' method='post'>
<form>

Comment: @fdsa : yes. You really want to be using get-post-redirect (http://en.wikipedia.org/wiki/Post/Redirect/Get) here; -1.
Comment: Would this cause any problems with refresh?
Comment: +1. If the only reason to use redirect is to avoid duplicate insertions on refresh at all costs, then other means must be used, like having an unique value on a form. If, on the other hand, there *is* some valid reason to redirect, then I'm wondering what is this reason.
Comment: @MainMa : why fight that battle when get-post-redirect is simple and easy?
Comment: @Wyatt Barnett: firstly, because the perfectly valid answer was downvoted; secondly, because too many beginner programmers believe that get-post-redirect is the best (the only?) way to submit data, while it's neither the only, nor the best one.
Answer: Insert the data into database after an individual signs up using a post method and then redirect using header('location:whateverpage.php?message=success') and on the other page use
if(isset($_GET['message']) == 'success') {
//Show some message
}


Is it possible to drive led strips using a halogen driver?

Question: I have a 12v halogen setup in my kitchen which I'm looking to replace with 12v led strips. I have everything working and the light strips work, until I unplug the halogen lamps at which point the leds start turning on and off very slowly. Is it something like there isn't enough load?
Comment: [changing 12v halogen lighting to 12v LED](https://electronics.stackexchange.com/q/330366/27928)  ,
[Efficiency of Halogen lamp Transformer when used with LED lamps](https://electronics.stackexchange.com/q/98765/27928)
Answer: Your power supply doesn't like the LEDs.  That's not a surprise. Either

because there isn't enough current flowing (the halogen acted as a dummy resistor to create some load), in which case more load will cure the problem.  Or
the power supply needs to be able to leak current in both directions (AC) through the light. Halogens can do that, LEDs cannot.  Try reversing the polarity on some of your LED strips.  If they still light and it solves the problem, that's actually bad news - it means this power supply is outputting AC and it's not fit for LED strips. (not least it will make them shimmer at 60Hz, which will be very noticeable and much worse than 120Hz shimmer from obsolete fluorescents).  It's time to replace this power supply with a DC supply, that will both work with LEDs with no shimmer whatsoever, and also support halogens.


Can I see from the PSD if a system is a LTI system?

Question: I am studying the meaning of the power spectral density (PSD) and I am wondering whether I can see from the PSD of the input signal and output signal if a system is a LTI system?
Comment: Note that the power spectral density is a function describing a *time series*, not a system. This is why your question as it is formulated now does not make any sense.
Comment: Thank you  @MattL, you're right. I slightly changed the question.
Answer: Suppose that the input signal to the system has power spectral density (PSD)
$S_i(f)$ while the output has PSD $S_o(f)$. Then, if the system is an LTI
system, then it must be that
$$S_o(f) = |H(f)|^2 S_i(f) \tag{1}$$
where $H(f)$ is the transfer function of the system. So, for a given pair
of PSDs, is there a $H(f)$ such that $(1)$ holds? One obvious case when
$(1)$ cannot hold for any choice of $H(f)$
is when the supports of $S_i(f)$ and $S_o(f)$ are different (in the sense
that there are frequencies $f$ for which $S_o(f) > 0$ while $S_i(f) = 0$).
So in this
case we can say unequivocally that the system is not an LTI system.
What about when the supports of $S_i(f)$ and $S_o(f)$ are identical or
the support of $S_o(f)$ is a subset of the support of $S_i(f)$ (think
bandstop or notch filter)?
Well, in this case, we do have a $|H(f)|^2$ from which we can
deduce $|H(f)|$. Throw in a conjugate-symmetric $\angle H(f)$ and we
have constructed the transfer function $H(f) = |H(f)|e^{\angle H(f)}$
of an LTI system whose output
PSD is $S_o(f)$ when the input PSD is $S_i(f)$. Note that there can
be infinitely many LTI systems that will provide this specific
input-output relationship.

But, the above does not allow us to say that the system that actually
produced the given output PSD from the given input PSD is an LTI
system, let alone one having the specific transfer function that we have
constructed. The actual system that we are looking at might be nonlinear
or time-varying, etc. We cannot say. After all, the
$|H(f)|e^{\angle H(f)}$ that we have come up with
might be a physically unrealizable transfer
function.
Comment: "... nonlinear or time-*varying*" is probably what you meant.
Comment: @MattL. Thanks for the careful reading. I am editing the answer right away.
Answer: Yes, the PSD of a time signal can give you infos about the linearity of the system under study.
For example, assume you are studying a symmetric duffing's oscillator described by the equation:
$m \ddot{x} + c \dot{x} + k x + k_2 x^3 = p(t) $
$p(t) = A \sin{\omega t}$
If you compute the PSD of the acceleration signal you will see a peak at the excitation frequency and then some harmonics generated by the non linearity.
Since the nonlinearity is odd, the harmonics will be at odd multiples of the excitation frequency, so if $\omega$ is the excitation frequency, the harmonics will be at $3\omega$,  $5\omega$ and so forth.
For linear system these harmonics are not present, because the response of a linear system excited by a monoharmonic signal will be monoharmonic at the same frequency (after transients have died out).
I suggest you to read the book written by Worden and Tomlinson if you are interested in nonlinear dynamics.