A new javascript KOTH challenge, Fastest gun of the west!

Question: Sometime ago i wanted to make a KOTH challenge, but i wanted it to be more interactive and easier to test, i didnt really come up with anything good. But then i saw this awesome thing Red vs. Blue - Pixel Team Battlebots from calvins-hobbies. Essentialy it pulled the code directly from the answers and the users just had to paste their stuff into their submissions. After i got his permission to use that part of his code i made my own challenge and now i just need to put it up for a test to see what i missed and if the instruction are clear.
Everything after this line is going to be posted in the real post!
This is a king of the hill challenge everybody vs everybody. Its a battle the find the best gunman of the west!
You be able to compete in this contest you need to make two functions, the first one determines the stats of your gunman and the second is the main logic function.
Stat function
function () {

    var bot = {
        name: "testBot",
        numbOfBullets: 7,
        reloadSpeed: 1,
        shotsPerTurn: 1,
        moveSpeed: 2
    }
    return bot
}

The stat function includes 5 variables that you will need to set according to some rules (except the name which can be anything). You can spend a total of 15 points on your gunman, the points are spend differently on every stat and you need to spend all 15 for your gunman to be eligible. Here is how the stats work:

numbOfBullets, defines how many bullets your gun holds
the base and minimum value is 1, each addititional bullet costs 1 point with the maximum being 16 bullets with 15 points spend.
reloadSpeed, defines how many turns your gunman needs to reload his gun after he ran out of bullets. The base and maximum value is 4 with the minimum being 1, each decrease of this stat costs 2 points
shotsPerTurn, defines how many times your gunman can shoot in one turn
the base and minimum value is 1, each increases costs 3 points so you can have a maximum of 6 shots per round with 15 points spend. Raising this stat above the number of bullets your gun can hold is counter productive since you cant shot more bullets then your gun can hold.
moveSpeed, defines how many spaces your gunman can run in one turn
the base and minimum value is 1, each increase costs 3 points with a maximum of 6 speed with 15 points spend. The gunman can run either left or right every turn up to a maximum of his move speed, he can also stand still which gives him a bonus, more on this later.

So the example above has 6 points spend on bullets, 6 points spend on reload speed and 3 points spend on movement.
Main function
function main(bulletsLeft, yourShots, enemyShots, yourMovement, enemyMovement) {

    var shots = [];
    shots.push(Math.floor((Math.random() * 24) + 1));
    var move = yourMovement[yourMovement.length - 1] + 2
    var play = [];
    play.shots = shots;
    play.move = move;
    play.reload = false;
    return play;
}

Paremeters:

bulletsLeft, number of bullets left in your gun
yourShots, this is a array of arrays of all past position your gunman has fired at.
Example for a gunman who can shoot 1 bullet per round:
[[12],[4],[22],...]
Example for a gunman who can shoot 3 bullets per round:
[[12,13,14],[11,15,16],[9,14],...]

enemyShots, same as above but for your enemy
yourMovement, is a array of all your past positions
enemyMovement, same as above but for your enemy

What you need to return:
You are required to return a variable which has 3 attributes

shots, is array of numbers which determine at what space your gunman will shoot
move, is a single number that determines to what space your gunman will try to move
reload, a true/false value with which you can make your gunman reload

The duel
The contest follows a round robin 1vs1 system. Each gunman has 50 rounds against every other gunman a round lasts until someone is hit by a bullet or a maximum of 66 turns with one turn being one shot of each player.
The gunman can earn either 2 points by killing their opponent, 1 point if they both die in the same turn or 0 points if they reach the 66 turns limit.
The shooting field is 25 spaces width (1-24 inclusive). Here is a step by step guide on how a duel works, this also covers all invalid comands and special rules:

At the start of each duel both players are put on space 12 and their revolvers are fully loaded
The main function is called and the gunman make their first move command and choose where they want to shoot
First the gunman move to the new location, if any invalid input is made at the move command (positions lower then 1 or higher then 24 or they moved more spaces then they are allowed too) they stay at the same position
Next reloading is checked, if you ran out of bullets the previous turn or you called reloading yourself your gunman goes into the reload cycle. He is reloading for as many turns as you set your reloadSpeed value. If you decided to stand still(staying on the same field or just inputing a invalid value) you reload counter goes down for 2 turns instead of one
Now comes checking your shooting values, every turn you can enter as many shooting location as you like they will always be cut off to the actual valid amount which is determined by: The number of shots per turn and the number of bullets in your revolver whichever is lower. Your shotsPerTurn value is increased by 1 if you decide to stand still this turn, so you can make a extra shot if you decide to stand still. If you are in the reload cycle you have 0 shots.
Now comes the actual shooting, there are 2 ways this can go down. If both bots have the same movespeed stat then they both shoot at the same time and can both kill eachother at the same time. In the case that they have different movespeed stats the bot with the higher movespeed stat starts shooting first and if he kills his opponent he wins this round. If the bots have more then one bullet to shoot in one round then it follows the same rules as above except in more cycles as a example: Lets say that bot1 has 3 bullets and is faster and bot 2 has 2 bullets it would go like this:
Bot1 shoots, Bot2 shoots cycle 1
Bot1 shoots, Bot2 shoots cycle 2
Bot1 shoots              cycle 3

This would look the same if they had the same movespeed only that if now Bot1 hit Bot2 in the same cycle Bot2 could also hit Bot1 and it would be a tie.
RULES
First i am copying some rules from calvins-hobbies entry that also applys here.
When declaring a new JavaScript variable, you must use the var keyword.
This is because a variable declared without var becomes global rather than local, so it would be easy to accidentally (or intentionally) mess with the controller or communicate freely with other players. It has to be clear that you aren't trying to cheat.
When declaring functions it is best to use the var keyword as well. i.e. use var f = function(...) {...} instead of function f(...) {...}. I'm not entirely sure why, but sometimes it appears to make a difference.
In your code you may not...

attempt to access or modify the controller or other player's code.
attempt to modify anything built into JavaScript.
attempt to communicate with other players except by using getMsg and setMsg.
make web queries.
do otherwise malicious things.

My additional rules:

The users can create as many gunman as they want and change their functions for any period of time
I will remove any entry from the game that either takes a excessive amount of time or trys to cheat in anyways that i see fit

Your answer should be in this format, the first function being the stats and the second being the actual logic, notice that i used a exclamation mark because if you just make new lines between code blocks the parser wont see two different code blocks so you have to use any symbol(just use a exclamation mark) to seperate them:
var bot = {
    name: "testBot",
    numbOfBullets: 7,
    reloadSpeed: 1,
    shotsPerTurn: 1,
    moveSpeed: 2
}
return bot

!
var shots = []
var testBot_moveUp = true
if(Math.random() * 2 > 1)
    testBot_moveUp = false
shots.push(Math.floor((Math.random() * 24) + 1))
var move = 0
if (testBot_moveUp)
    move = yourMovement[yourMovement.length - 1] + 2
else
    move = yourMovement[yourMovement.length - 1] - 2
move = 12
var play = []
play.shots = shots
play.move = move
play.reload = false
return play

And here is the controller: http://jsfiddle.net/vajura/sh4wr82r/23/ .Just open the link and wait for the bots to load, then select which one you want in the fight(probably all) and press the start button.
Comment: Becuase of the way the answers work
Comment: Why is this a separate post and not in the sandbox?
Comment: `The shooting field is 25 spaces width (1-24 inclusive)` That is only 24 spaces. 0-24 would be 25.
Answer: var bot = {
    name: "testBot",
    numbOfBullets: 7,
    reloadSpeed: 1,
    shotsPerTurn: 1,
    moveSpeed: 2
}
return bot

!
var shots = []
var testBot_moveUp = true
if(Math.random() * 2 > 1)
    testBot_moveUp = false
shots.push(Math.floor((Math.random() * 24) + 1))
var move = 0
if (testBot_moveUp)
    move = yourMovement[yourMovement.length - 1] + 2
else
    move = yourMovement[yourMovement.length - 1] - 2
move = 12
var play = []
play.shots = shots
play.move = move
play.reload = false
return play

Test bot


International transfer in Tel Aviv?

Question: In the airport in Tel Aviv (Ben Guirion) I noticed a sign for "international transfer passengers".  This piqued my curiosity... is there actually a "city pair" (with both cities outside of Israel) where it would make practical sense to change planes in Tel Aviv?  I can't think of any pair like that.
Answer: Because of the lack of diplomatic relations with so many countries to the East, El Al has a very limited number of flights that go Eastbound from Tel Aviv, and most of those flights (Beijing, Bangkok) take very circuitous routes to avoid flying over countries which are technically at war with Israel including Iran, Iraq, Afghanistan, etc. So if you were going East-West, Tel Aviv is almost never the best place to do it.
That means that the number of possibilities to use El Al and connect in Tel Aviv is miniscule, and although there IS an international transit route through Ben Gurion airport, I've never seen anyone use it.
One possible use would be for tourists who wish to visit a combination of Israel and Jordan. They might connect through TLV on their way to Amman, for example, then go overland back to Israel, and fly home through TLV.
Comment: What about Johannesburg to St. Petersburg, as mentioned in a previous answer?
Answer: Geographically, it might make sense if you are travelling from Johannesburg to St. Petersburg; there don't appear to be any direct flights between those two cities, yet they are both serviced by El Al (with a transfer in Tel Aviv).
Comment: There are only 3 flights a week between TLV and Johannesburg and only a 6 flights a week between TLV and St. Petersburg. There is no reasonable connection unless you like the idea of spending a day or so sleeping in Ben Gurion Airport. There are much better connections through Amsterdam, Frankfurt, or Dubai.
Answer: Well all airlines have a home hub out of which they operate, and sometimes other hubs.
This means that it's very common to fly between two cities on the same airline via one of these hubs.
If you don't understand why anybody would want to fly via a hub rather than a direct flight, there are many reasons including frequent flier points and cheaper tickets.
So my answer is any two cities serviced by El Al would be such city pairs, and quite possibly other airlines too.
Comment: Yep. Just have a look at http://www.elal.co.il/
Answer: I have a friend from Australia who some years ago wanted to visit Israel and Russia on the same trip. So they did a transfer at TLV. SO it does happen. But I would expect that it is not a hugely common thing. But even so I would expect that a bunch of folks do it every day.
Answer: As others have noted, it might make sense going North/South.
I recently travelled from Johannesburg to Bucharest via Israel. I think it probably was a relatively cheap way to make the trip - first leg with El Al, second leg with Wizz Air - but I wouldn't necessarily recommend it: El Al is pretty bad, and it was a pain to 1) get subjected to 40 min questioning in Johannesburg airport before getting on the flight to Israel (maybe less likely if you're not a man travelling alone) 2) have to transfer terminals and go through security again at Ben Gurion.
(FYI, my trip wasn't as a result of finding the cheapest or most convenient flights - it was because I already had a return flight to Israel booked from Johannesburg and then moved the outbound flight one week earlier to get a work trip to Bucharest in.)

International transfer in Tel Aviv?


Which measure to check in analysis (p-values or $R^2$)?

Question: In an analysis e.g. OLS regression which measure would you look at?
$R^2$, $adjusted-R^2$ or $p-value$?
How would you consider a regression with p-values >0.15 but with an $R^2$ of 40%?
In general in economics, what have you seen?
Comment: When someone asks this question, I always think that the most important answer is that they really shouldn't be doing any regressions at all until they've learnt why those measures are so problematic and misleading.
Answer: R-squareds and p-values give different information. For example, suppose that you regress birth weight on mother's smoking. The p-value tells us whether the association is indeed nonzero (in the statistical sense), and the R-squared tells us how much of variation in birth weight is explained by mother's smoking.
p-value > .15 and R-squared 40% would mean that (1) we can't say that the association is nonzero (2) but the explanatory power for the given sample is quite large. The two neither reinforce each other nor are contradictory.
Comment: Thanks a lot. I know from a theoretical econometric and mathematical point of view how they are defined. I would have liked to know in practical research in the economic field in which cases you look at one and when you look at another one and if in papers, usually, it is not uncommon to find results with high R^2 and high p-values. (For instance in forecasts do you look more at pvalues or R^2?)
Comment: Got it. Thanks. When we are interested in causal relationships, we look at p-values. For predictions and forecasts, R-squareds seem to be paid more attention to. But the usefulness of rsq and adj rsq is more or less limited even for forecasts (eg financial econometrics) because of the over fitting issue. Here I don't count rsq as a means to compute test stats.
Answer: If you are running a regression analysis I would say you should look first at p-values to check if the explanatory variables you added make sense. I mean if you have a hypothesis about a relationship among two variables and you find the explanatory one not significant (large p-value) I would check for possible mistakes or alternative explanations.
It makes sense to have a look at $R^2$ if you are comparing two different specification, it does not really make sense looking at it alone.
I have seen many papers, have a look at Nunn, Wantcheckon, (2011) as an example, which have been published on top journals (AER in this case) even with $R^2$ around 16%, not really an high value.
Comment: The only thing I would add here is that one limitation of $R^2$ is that they generally increase as you throw more variables into the model, which is why the adjusted $R^2$ is "better," since it takes into account the # of model covariates
Comment: It does make sense to inspect $R^2$ of just one model as $R^2$ estimates the fraction of variance explained by the model. So $R^2$ is a meaningful measure on its own.
Answer: There is in fact a theoretical answer to this and it may be of importance to you in the long run.  There are three main schools of statistical thought and several minor schools.  The three are, in the order of discovery, the Bayesian, the Likelihoodist and the Frequentist.  The differences matter because they can provide different answers using the exact same data and running the same formula.
From the language of your posting, you are not using the Bayesian methodology.  Bayesian methods do not have a null hypothesis, so they cannot have a p-value.  Rather than compute a probability that the null is as extreme or more extreme than you would expect if the null is true, Bayesian methods compute the positive probability that each separate hypothesis is true.  It does not falsify a null, it assigns a positive probability to each competing possible hypothesis.  It does not limit itself to two hypothesis, though you can have two.
The second is the Likelihoodist model and this is where the language in your posting seems to go.  The likelihoodist model has p-values, but no cut-off value, $\alpha$, while the Frequentist school as a cut-off value $\alpha$, but there is no such thing as a p-value.  Both schools are part of a broader scheme called the null hypothesis method.
In the null hypothesis method, you choose a null and grant 100%  probability that it is true, ex ante.  Statistics is a branch of rhetoric and not a branch of mathematics.  Like physics, it uses mathematics intensively, but it is not part of the field of mathematics.  Rather, it is about how to decide arguments.  The ordinary null used in statistics is the "no effect" hypothesis.  That is you argue that all $\beta=0$, that is the independent variables have no effect at all on the dependent variable.  If you falsify it, then you are arguing that it does have an effect and the null is falsified.
In the case of the Likelihoodist school, there is no magical cut-off value for the p-value.  You just report it.  It is the weight of the evidence against the null.  A p-value of less than .15 leaves a lot of room for chance, but if you are okay with that level, then it is significant to you.  This is an either-or discussion.  It either is good enough, or it is not good enough.
If you believe it is good enough, then you use the values of the OLS equation because they are the most probable value based on your data.  From that point onward, the adjusted $R^2$ gives the best measure of the amount of variability that your model provides.
If you do not believe that a  p-value is good enough, then you are faced with a peculiar problem.  You need to throw away your OLS equation, according to theory.  If the null is not falsified then no new information exists and you ignore your results.  It is as if you had never performed the analysis in the first place.  The Likelihoodist school is epistemological, that is it is a knowledge seeking tool.  If the p-value is not adequate for your purposes, then there is no added knowledge and you need to spend your life looking at something else rather than waste your time on this topic.
On the other hand, if you use the Frequentist school, the results have a different interpretation.  In the Frequentist school, the OLS equations are not the maximum likelihood estimator(MLE) as they are with Likelihoodists, but instead the equations are the minimum variance unbiased estimators(MVUE).  It happens to work out nicely that the two schools have the same answers for the simple problems, such as regression.
The Frequentist school is behavioral.  It tells you how to behave.  For example, if you were doing quality assurance on batches coming out of a factory and you got results indicating poor quality, falsifying the null of good quality, then you destroy the batch, otherwise you accept the batch.  You do not know the batch is bad just because it tests bad.  You do not know if a batch is good, just because it tests good.  This is not about knowledge, it is about how you should behave.  Do you destroy the batch when you reject the null and accept the batch when you accept the null?  Yes.
In order to create this, before you collect the data, you set a value called $\alpha$, which is your cut-off.  This value is set with respect to both the importance of false positives and the importance of false negatives.  If the test statistic is in the rejection region, then you behave as if the OLS parameters were the true parameters.  The adjusted $R^2$ then provides the degree of variability explained by the model.  If the test statistic is in the acceptance region, then you have accepted the null.  The null was that all $\beta=0$, so you are obligated to behave as if there was no relationship between any of the independent variables and the dependent variable and the $R^2$ doesn't matter because it is the the $R^2$ of a model that you are not using.
It is difficult to determine what is going on with your model using null hypothesis methods.  It could be spurious correlations  that explain a lot of the variability of your sample, but not the variability that you would find out of sample.  It could be that the effects are close to zero, but not zero, but the effect size is too small for it to be clearly significant.  That is to say, your sample lacks the power to detect the effect.  The problem with null hypothesis methods, in general, is that there is no way to distinguish a null that is truly false from one where the result was due to a weird sample.  It is impossible to distinguish truth and chance effects.
If you have a professor around that uses Bayesian methods, and they are uncommon in economics, you could have them run it as a Bayesian model.  Bayesian hypotheses are combinatoric, so that if you have three regressors, $x_1, x_2, x_3$, the researcher has to run all possible combinations of dependent variables and test each submodel for the probability that it is the true model.  This may help distinguish between the various parts and the things that can go wrong with MLE and MVUE models such as multicolinearity, small effects and so forth.
Comment: (+1) Although I largely agree with the explanations given of the various possible approaches, I find some confounding of terminology possibly misleading. For example, "equating" the Frequentist approach to probability with Decision theory should be avoided, since everybody needs to and does make decisions - and Bayesians and Likelihood aficionados have developed methodologies to reach  decisions based on their approach to inference.
Answer: Well, adjusted R2 has more merit than R2. R2 will always rise (or at least stay the same) as you add more variables (even if the variables are not statistically significant). Thus in theory you could achieve a very high R2 by just bunging a load of nonsense variables into your regression. Adjusted R2 compensates for this by adjusting the R2 by a penalization factor that increases as the number of variables rise - hence adding a new variable will always raise r2 but will raise adjusted r2 only based on its explanatory power. Information criteria such as the Bayesian information criterion (also called Schwarz criterion) or Akike information criterion can be used to choose between competing models. Intuitively, they measure explanatory power but penalize for "bigger" models which are more prone to overfitting and other problems. The BIC penalizes additional parameters more heavilly than the AIC, for example. You would prefer the model which minimizes the information criterion score. Note that, unlike R2, the values of information criteria are not inherently very meaningful - you cannot say "this is a good model because it has a BIC of -50", but you can use them to choose between.
What matters more than either P values or measures of goodness of fit is that the model is theoretically sensible and that the Gauss-Markov assumptions hold. This is what makes a "good" model - ability to explain a high proportion of the variance is the icing on the cake, nothing more. If I regress rainfall in the UK on US GDP for instance, I will get a P-value of close to zero and an R2 of above 0.95 - yet obviously there is no genuine economic relationship here.
So a sensible model with solid theoretical foundations which satisfies the OLS assumptions is a good model even if its explanatory power is limited. Conversely a model with high r2 / low p values which doesn't satisfy econometric assumptions or lacks theoretical credibility can never be a "good" model.
Answer: If you want to forecast it is common practice to split your sample up into two parts - the "estimation sample" and the "forecast sample". The estimation sample is used to, you guessed it, estimate your model, which you then use to forecast the data for which you already have true values contained in your forecast sample. You then compare your forecast predictions to known data and to those of other forecasts.
You can do this using r2 or adjusted r2 over the forecast sample. We also commonly use measures like means squared error, mean absolute percentage error, Theil's U, etc. etc.


Biblical basis for the separation of church and state

Question: I know there are a lot of non-biblical arguments for the separation of church and state. Some Christians also support it on biblical grounds, but I've never looked into the matter myself. Which passages of the Bible support the idea?
Comment: @DanielStandage I disagree. The separation of church and state goes far beyond the de-regulation of worship. Many of our forefathers came from societies that used protection of religious values as a mask for political and economic oppression, even war. For example, while England and its neighbors worshiped the same God, they warred for centuries because the monarchs of England (recognized as the religious as well as political authority there) sought to prevent Catholics from recognizing the Pope.
Comment: Many people cite the phrase as if it was included in the founding documents of the United States (Declaration of Independence or Constitution or Bill of Rights), when in fact as your link shows, it comes from Thomas Jefferson's personal correspondence. It is also not intended to keep religious faith and civic involvement completely separate (as some suggest), but to insure that government does not interfere with religious worship.

In this light, the question can be read "what is the biblical basis for making sure government does not interfere with religious worship?"
Comment: @HedgeMage Are you implying that religion itself is not used as a mask for political and economic oppression and even war?  The majority of the founding fathers were [deists](http://en.wikipedia.org/wiki/Deism).  Who didn't want to be forced into a specific religious dogma.  It is one of the big differences between America and other countries - that you can be the religion of your choice and practice it as long as you do not harm or impede others.  If we force people into a religion or dogma, we're doing a disservice to America and the religion which we are pushing AKA tyranny of the majority.
Answer: Some people use Mark 12:17 towards this goal.

17 And Jesus answering said unto them, "Render to Caesar the things
  that are Caesar's, and to God the things that are God's." And they
  marvelled at him.

The argument goes something like this:  The government is here to govern the society here on Earth.  God has been given to us to govern our hearts, minds, and souls.  So, we should allow the government to do what it does best and allow God to be in control of all the other things.
The argument is generally followed with the idea that we need to elect Christians into government and pray for our government officials, but that religion should be separate from the state.
Personally, I think this is a bit of a stretch.  The more solid arguments are the non-biblical ones (prevention of the majority overriding the minority, insuring freedom of religion, etc.)
Comment: I don't think this is a strong argument at all. If anything, Jesus is saying that this government is not of us, that God's law is the only law. When he looked at the coin, it was as if he was looking at something that had no meaning to Him in anyway.
Answer: I think this article should help:

The Bible does not articulate a full-blown doctrine of the separation of church and state. Yet, its seeds are clearly present. Jesus at least foreshadowed the concept when he said "[g]ive therefore to the emperor things that are the emperor's, and to God the things that are God's." (Matthew 22:21) Jesus' behavior was consistent with his words. He never took a coin from Caesar or sought the help of Herod in his ministry and mission.
In many places, the New Testament outlines the contours of the separate realms of the kingdom of God and the kingdom of Caesar. The church is given the tasks of spreading the gospel (Acts 1:8), teaching doctrine (Matthew 28:20), and discipling believers (Ephesians 4:11-13). The state is divinely ordained to resist evil (Romans 13:3) and keep order (I Peter 2:13-15). Although these realms sometimes overlap and do not necessarily clash, the New Testament bears witness to a two-kingdom world — each with separate duties and each engendering different loyalties.
Answer: 1 Corinthians 5:9-13 seems to tell Christians not to use man-made laws to force non-believers to live or behave according to Christian beliefs.  Instead, it tells them to disassociate themselves with those WITHIN THE CHURCH who behave immorally, and to leave those outside the church to God's judgment.

1 Corinthians 5:9-13 King James Version (KJV)
9 I wrote unto you in an epistle not to company with fornicators:
10 Yet not altogether with the fornicators of this world, or with the
  covetous, or extortioners, or with idolaters; for then must ye needs
  go out of the world.
11 But now I have written unto you not to keep company, if any man
  that is called a brother be a fornicator, or covetous, or an idolator,
  or a railer, or a drunkard, or an extortioner; with such an one no not
  to eat.
12 For what have I to do to judge them also that are without? do not
  ye judge them that are within?
13 But them that are without God judgeth. Therefore put away from
  among yourselves that wicked person.

This is, to my knowledge, the Bible's strongest statement relevant to the idea of church and state separation.
Answer: Matthew 6:24 says that no man shall serve two masters for he will hate one and love the other or hold to one and despise the other.   For me this is what it means to separate church and state: we cannot be Christians and politicians at the same time unless we are truly moved in Holy Spirit.
There are too many Christians who say it is our "duty" to vote or else we have nothing to say about how our government functions.  I disagree. I do not vote because it would consume me. I would get swallowed up by the world. I would begin to serve government instead of my heavenly Father and would love one and hate the other.
Instead, I pray that all the matters of state be in the hands of my heavenly Father and his will be done. I prayed this last election for God to put it in my heart to vote if that was what he wanted of me. I did not vote and I have heard the Lord my God speak many things to me. I think if an individual is moved in the spirit to vote, then it is God's will for them to do so. However, if you vote out of duty, you do a disservice to God by serving two masters and not Him alone. If you are caught up in who this man is and what he said, and this is how you vote, then how do you serve God? There has to be a separation unless your involvement is the movement of Holy Spirit. It is only in this way that you serve God and God alone.
Comment: This question is a little dicey so I excuse the confusion in answering it, but in general you need to understand something about how this site works: [we're not here to sort out who is right or wrong about issues](http://meta.christianity.stackexchange.com/a/1380/30). As such what you think is right (and in the case of this question even what any group believes) is not really relevant. This question is asking what the basis for a belief is. Whether that belief is right or wrong doesn't matter, this should only be answered by documenting what people who believe it see as the basis for it.


Difference between Spherical Harmonics and Spherical Harmonics Lighting

Question: What is the difference between Spherical Harmonics and Spherical Harmonics Lighting in OpenGL?
Answer: Spherical harmonics lighting use spherical harmonics to approximate a lighting lobe on an object.
It has property that make it cheap to compute in real time (dot product vs the normal) and to store (7floats per channels generally, for example in unity engine, but it vary based on the use, The movie avatar used spherical harmonics with 81floats per channel). However it's low frequency and don't handle specular well, so it is use mostly for diffuse representation (incoming radiance). It's a cheap and compressed representation for lights.
There is several uses:
1. To compute a lot of diffuse lights at a single object.
Because each light need a pass, it's cheaper to accumulate lights in a single spherical harmonic representation and apply it to objects. However this does not handle specular lighting, so you need passes for at each principal lights.
2. To store baked global illumination.
Spherical Harmonics can be blended linearly to quadrilinearly in a volume. It allow to store light in point of space then interpolate to find the light at objects position.
3. To store lightmap
Being able to be interpolate linearly makes spherical harmonics good candidate for lightmap intensity as you can store second order spherical harmonics (4 floats) in a regular rgba texture (could be stored at vertex value too). It works like above and allow to modify or move normal of a surface, or tesselate it, and retain the correct baked global illumination. Basically it allow to add correctly lit high frequencies for cheap.
4. More
It can be use to store better AO map, secondary bounce for radiosity, thickness map, smooth shadow casting (the last of us), time of day etc ...
Spherical harmonics is well documented at that point but all are very math heavy, I understand the overall idea, but I can't manipulate it because it's written in an opaque manner and the community was VERY unhelpful so far, pointing at document without clarifications. It mean that the entry level stays high unlike other aspect of learning shader (like physically based rendering).
So if you can find a competent mentor, cherish him!
http://www.research.scea.com/gdc2003/spherical-harmonic-lighting.pdf
http://nccastaff.bournemouth.ac.uk/jmacey/MastersProjects/MSc11/Ravi/msc_thesis_ravi_acharya.pdf
http://sebh-blog.blogspot.com/2010/04/spherical-harmonics-lighting.html
https://dickyjim.wordpress.com/2013/09/04/spherical-harmonics-for-beginners/
http://ppsloan.org/publications/StupidSH36.pdf
http://www.gamasutra.com/view/news/173409/Indepth_Photon_mapping_and_baking_light_maps.php
http://sebastien.hillaire.free.fr/index.php?option=com_content&view=article&id=60&Itemid=71
Answer: Spherical harmonics is a general mathematical concept that can be applied to a number of problems.  One of those problems is modeling the behavior of light for use in 3D rendering.  There's not really a difference, just a scoping of the application.  It's sort of like asking "What's the difference between Fourier Analysis and Fourier Analysis of Sound Signals?"


How to run Bitcoinj on Heroku?

Question: Does anyone know where I might find a tutorial on how to deploy a bitcoinj server (essentially a replica of a bitcoind server with an rpc API) on Heroku?
Answer: I had a horrendus time doing this because of the fact that the jar is not available in a public site. Their docs to install it in a local repo and point maven at it seemed promising, but in the end I can tell you the best way:

Start by forking a Java Maven project. Instructions to do that are here: http://java.heroku.com/
Clone your project.
Clone bitcoinj from git.
Copy the dependencies from the pom.xml of both the top level project from bitcoinj, AND the one in the 'core' directory into your project's pom.xml. You'll also have to include some version numbers which are set in properties in the pom.xml to make it work.
Copy everything from bitcoinj/core/main/src/java/ into your project.
Assuming you've done all this, you should now be able to compile your project, including bitcoinj which you copied in from step 5 into your project, because you copied all the required dependencies into your pom.xml in step 4.
Make a main class with a main method and get a static network parameters for production, make a block chain, a block store, and a peer group, and wire those up. Make a new wallet and a new ECKey, add the key to the wallet and the wallet to the block chain.
Modify your pom.xml to point the appassembler plugin at your main class so it runs when you deploy the app.
git push heroku master
Send yourself some coins, watch your wallet onCoinsRecieved fire.

How to run Bitcoinj on Heroku?


What is the difference between 仏 and 釈迦?

Question: Both 仏 and 釈迦 are defined as "Buddha" in my dictionary. Is there a difference between these words?
Comment: The answer to this question appears to greatly depend on which sect of Buddhism one subscribes to (http://timeisbunny.hatenablog.com/entry/2015/03/27/213750). Do you want an answer about *common* usage or technical usage?
Answer: 仏 basically means (lowercase) buddha, that is, past participle of a verb that means to wake in Sanskrit or one who are awaken, not limited to Gautama Buddha. 釈迦 refers to Gautama Siddhartha himself.

What is the difference between 仏 and 釈迦？


How do Flight Test Engineers plan and execute sortie profiles?

Question: Can someone from the field explain with a simple example the process of planning and executing a sortie profile as an FTE. Any reference books for an insight into the subject would be appreciated.
Answer: Three main factors influence the flow of a flight test sortie: data requirements, test point priority and flight efficiency.  For example, consider a test sortie that requires evaluation of stall handling qualities.

Data requirements specify which altitude, weight and cg, and configuration are required for each stall test point, for example.
Test point priority comes from the test team or test plan. One test point may be more important than others.
Flight efficiency refers to the need to minimize time between test points, minimize wasted fuel, and consider geographic position or airspace boundaries that may affect the test.

Balancing all of these things requires experience and judgment.  At the beginning of the flight, the aircraft is heaviest, so it makes sense to do test points that require heavy weight.  The second most important thing is to consider high priority test points. What points of high priority combined with heavy weight should be considered.  Finally, deciding the flight path that accommodates these two characteristics is the last factor.
This combination of judgment and knowledge and skill is difficult to describe accurately, and often two experienced professionals will come up with different, and equally acceptable, answers.
Answer: EASA has a general guideline on the topic here
Comment: The FAA provides guidance by a/c type. [AC 23-8C - Flight Test Guide for Certification of Part 23 Airplanes](https://www.faa.gov/regulations_policies/advisory_circulars/index.cfm/go/document.information/documentID/1019676), [AC 25-7D - Flight Test Guide for Certification of Transport Category Airplanes](https://www.faa.gov/regulations_policies/advisory_circulars/index.cfm/go/document.information/documentID/1033309), and [AC 90-89B - Amateur-Built Aircraft Flight Testing Handbook](https://www.faa.gov/regulations_policies/advisory_circulars/index.cfm/go/document.information/documentID/10274290)


Use of se ... tiam ... in logical statements

Question: When writing mathematics or logic, one uses the construction "if A, then B" such as "if triangle ABC is equilateral, then its angles are all equal".  I know the translation is se A, tiam B.  But I find tiam a little jarring, as it is supposed to be specifically temporal, while in the sentence above, the triangle is equilateral independent of time.  It doesn't suddenly have all equal angles, it always had all equal angles.  In a phrase such as "if the weather is good, then we will go camping", the temporal meaning is the right one.  I know I could drop tiam and just say se A, B, but mathematicians on purpose put "then" in the construction as the hypothesis can be complicated including having several commas, so you need some word to say when hypotheses (A) stop and the conclusion (B) begins.  So the question is, is there another solution that doesn't bring in time?  Or is tiam always used even in this context, and I should get over my unease about it.
Answer: The most common word to indicate the conclusion of a se-phrase is tiam, and it doesn't have a temporal meaning when used in this function. So you can use it without qualms.
Some authors also use do instead of tiam in this function, but it is much less common, and not supported by Zamenhof's usage. Here are two examples from the Tekstaro de Esperanto:

Se A estas B, do ankaŭ B estas A.
se du sistemoj A kaj B termike ekvilibras kun la tria sistemo C, do ili nepre termike ekvilibras inter si.

The usage of tial in this function seems to me to be non-existent, or at least even much less common than do. So if you feel the urge to avoid the common tiam, and just dropping it is problematic, go for do. But really there is no reason to avoid this common usage of tiam.
Answer: The translation of tiam even in its temporal sense can be considered appropriate here. As the PMEG states, tiam is "en tiu tempo / en tiu fojo" i.e. "in that time / on that occasion".
The "if" in your construction is essentially "in the event that..." or "on the occasion that...". It sets up the definition of a scenario, and when that scenario is true, then the conclusion follows.
Perhaps because of the definition stretching this far, Zamenhof didn't see the need in complicating things by changing the ti- word usage under this scenario?
Answer: The relationship se - tiam seems to be well established in Mathematical terminology. See this page for example.
http://www2.cs.upb.de/extern/fb/2/Kyb.Paed/INT/01-int.htm
I asked Francisko, who often lectures on mathematical topics at the Aŭtuna Renkontiĝo de Esperanto and who has an in-depth knowledge of mathematical terms in Esperanto, and he replied with the following example.

Ekzemple: se x = 0, tiam 2x = 0.
Answer: In his dictionary J.C. Wells gives tial for 'therefore'; that might be a better fit in this context, as it expresses the cause rather than the chronological aspect as tiam does.
Comment: The usage of *tial* in this meaning is practically non-existent. As explained in my answer, one can use *do*, but there is really no reason to avoid the much more common *tiam*.
Answer: The most common word is tiam (directly mirroring the English "then") but you can use do ("therefore"), and maybe tial ("because of that") e.g. Se la kondiĉoj teniĝas, tial..., and even tie in the form En la okazo kie X, tie...
There are plenty of other ways to phrase it:

X [logike] implicas ke Y.
Se X, sekvas ke Y. Se X, sekve Y.
El/de X, sekvas ke Y.
Se X, tiukaze/tiuokaze Y.
Se X, dedukteblas/indukteblas ke Y.
Se X, konkludeblas ke Y.
Se X, la sekvo/konsekvenco/rezulto estas ke Y.

And for "if and only if":

X se kaj nur se Y.
X implicas ke Y, kaj inverse.
X estas necesa kaj sufiĉa kondiĉo de Y.
Comment: Are your answers here examples of use from actual mathematical texts? *Se... tial*, it turns out, is not at all common and often means something different.
Comment: The examples given above are all correct.
Comment: I certainly didn't mean to suggest that you would use incorrect examples on purpose. I would contend (as others have) that *se ... tial*, as just one example is in fact **not** correct. My question is where did these examples come from. Are you quoting from somewhere or are they your own?
Comment: These are straightforward examples of how logical implications can be expressed in Esperanto. I remember them from reading. If you like, I can google specific examples. It is hard to google *se X, tial Y* but it is valid when X is the cause of Y.
Answer: Even if "tiam" is not strictly correct, it is convenient to override its literal meaning with the "logical" meaning in such contexts. Convenience rules as strongly in mathematical / logical contexts as elsewhere, and this particular convenience is far less qualms-giving than the practice of using "if...then" in definitions to mean "if, and only if," – for example: definition: if an integer x > 1 has only 2 positive integer divisors, then x is a prime".


How do the vortices affect the flow of the horizontal stabilizer upon leaving the wing?

Question: Other than the downwash effect, what other factors that affect the flow to the horizontal stabilizer? such as Dynamic Pressure? Air Flow Disturbance?
Answer: The answer depends on the relative position of both. If the wake from the wing directly hits the elevator, its reduced dynamic pressure will reduce elevator effectiveness.
Next, when near the stall angle of attack, the wing root will already exhibit some flow separation, and the turbulence of that flow will show up in buffeting on the tail. This is sometimes desired as a stall warning, but having the tail move into the wing wake just when the aircraft stalls is generally a bad idea.
To address the lift-related vortices: Those will reduce the angle of attack change on the tail relative to those on the wing. The increased strength of the downwash speed with lower flight speed (and, consequently, higher angle of attack) means that the effective angle of attack on the tail will be reduced. This narrows the range of angles of attack in which the tail needs to work and helps to ensure that the tail will show a linear response to changes in the flow even when the wing leaves the linear range already (in other words: When the wing stalls.)


Where does the Kyuubi inside Naruto exist?

Question: Whenever Naruto sees the Kyuubi that Minato sealed inside him, we see this room with water on the floor and a big door behind which the Kyuubi stays. What is this place and where is it?
Comment: There's not a specific place he stays, it's probably the link between chakra which allows them to see each other. Whenever someone entered to see Kyuubi, they used chakra to see him. Like Minato, Sasuke, etc. edit - sasuke used a genjutsu, my bad.
Answer: The place that we see is within Naruto's subconsciousness and its as a result of the Eight Tetragram pattern which is the sealing formula used by Minato to seal the Nine tails within Naruto.

According to the Wiki, When Naruto wants to speak to the Nine-Tails, he enters a subconscious plane that resembles an underground complex, with pipes running along the ceiling and various hallways. The floor is flooded with a shallow layer of water; the Nine-Tails' growing influence over Naruto is sometimes depicted as the water level rising.
Comment: Although its never been explicitly mentioned, one can hypothesize that the Nine tails stays inside the eight tetragram seal on Naruto's abdomen but that's just a magnet for some serious debate lol
Answer: The seal is an anchor that binds the two together. The Kyuubi in theory is a mass of chakra that was given sentience by the Sage of Six Paths. Fuinjutsu or the art of sealing allows them to seal them away. The Tailed beast exist in a sub-conscience as a by-product of the seal. Depending on the nature of the seal defines how they are locked up. Kushina is in a field with Kyuubi chained up while Naruto has it in a cage in a complex similar to a sewer. In theory, the Kyuubi exist in a sub-conscience while it's chakra is sealed aswell, slowly to merge with Naruto's. If your wondering about the shared space where they all meet, it is a result of the Sage's link he made when telling the Tailed Beast he's dying.
References:
https://naruto.fandom.com/wiki/Tailed_Beast
https://naruto.fandom.com/wiki/Eight_Trigrams_Sealing_Style
https://naruto.fandom.com/wiki/F%C5%ABinjutsu
Add corrections if i'm wrong.


Telescope showing high chromatic aberration

Question: Hi i have made a telescope with 1100 mm focal length objective lense and 21mm plano convex as eyepiece. Both these lenses are not achromatic. But when is looked through it , the images were completely blurry. Is this because I have not used achromatic lense.?? Can it be resolved if I used any coated eyepiece.? The diameter of objective is 7.5 cm and eyepiece is 1cm. Is this issue is because the size of eyepiece is so small.
Comment: Did you adjust the optics to focus on your object of interest (i.e. adjusting the lens separation slightly) so that your image becomes sharp? Like with manual photo lenses you have to manually set to focus on what you look at.
Comment: Yes. I tried it but still kind of blurry...
Comment: How do you make sure they are axially well aligned?
Comment: Actually I didn't. I am kind of new to telescope making. This is just a first try... Can u guide..?
Comment: The two focal lengths are f1 = 1100 mm and f2 = 21 mm, in principle the two lenses should be placed f1+f2 = 1121 mm apart. If not, you may see a blurry image, together with the chromatic aberration. Also, the diameter of your eyepiece is too large in that only beam radius of 21/1100*7.5 = 0.14 cm can travel through, much smaller than the 1 cm aperture size -- which is okay and does not relate to a blurry image.
Answer:
Is this because I have not used achromatic lens?

An easy way to check for the effects of chromatic aberration will be to look at a narrow wavelength source. These days that's easy because the spread in wavelengths from single color LEDs is only 10 to 20 nm1 depending on the specific LED. If you can find something with red, green or yellow LEDs (not the white ones) can you check to see if those can be focused more clearly? All you need is one small LED to do this, maybe across a room. If your focal length is 1.1 meters and the LED is 10 meters away, you'll have to pull your eyepiece out by another 10 cm farther than you would for focusing at infinity.
1random example
Note also that chromatic aberration is stronger in the blue than in the red.
You can also estimate the effect with a bright white object with a sharp edge (like a white piece of paper) on a black or dark background. If the edges are blurry with strong color effects (blue and red in different places) then this may indeed be the problem.
If so, you might have to invest in an achromatic objective to get rid of this problem, or look only at things that are monochromatic (and in Astronomy there aren't many of those!)
In addition to making sure the eyepiece lens is centered on the objective lens' axis, you also have to make sure the eyepiece lens isn't tilted. Both of those will cause problems and the point-like LED spot will show this. It might look like a fuzzy comet coma aberration.

Can it be resolved if I used any coated eyepiece?

No, don't worry about that for now. Adding antireflection coatings to lenses reduces reflections which are a big problem when there are multiple lens elements with air gaps between them within the eyepiece or the objective. Those cause lens flare usually only a big problem if there are very bright, point-like objects in the field of view. But in your case each is a single element, so not an issue.

Does this smartphone photo show Mars just below the Sun?
Apparently two objects in Solar Eclipse image
Weird Blob near Polaris?

Is this issue is because the size of eyepiece is so small.

No, I think it's because of some combination of the eyepiece not being positioned properly and chromatic aberration, and a test on an LED might be one way to separate the two effects for diagnostic purposes. If the blurriness has a lot of color associated with it, especially around white objects on black backgrounds, this is your primary culprit I think.


Is there a way to improve the appearance of a covered front porch roof that uses corrugated plastic roof panels?

Question: We are planning to retrofit a 5'x7' corner porch cover to fit under the eaves/gutter. We will be using corrugated plastic roof panels because they are light weight and we can made a 1/4"/12" pitch.  We need ideas on how to make this look architecturally attractive so the plastic panels don't show, making it look like a cheap mobile home.  What is a facade concept we could use to make it look like it 'ties' into the house a little better?
Comment: Is this some you want to add to improve the curb appeal, but once you get closer a person can see that it is purely non functional?
Comment: We want to add a covered area over the front porch to keep out the rain.
Comment: Since the cover framework would be installed underneath the gutters we need to use a lightweight material to keep the pitch at a minimum ~ anything heavier would require a greater pitch, which would drop the roof way too low in our situation.
Comment: I understand that, my question above was to get your feedback on how the added roof would look like around the plastic roof. The added roof to make it look good will or could look great from the roadside, but may not look so good from close up. If that mattered to you or not. I was going to mention adding a mansard-like roof around the perimeter only leaving the center open to the plastic roof, but up close it may not look that well, but from the roadside it would look good
Comment: Wondering:  does anyone make a version of those panels colored / embossed to suggest Spanish tile roof?
Answer: One of my business partners is a roofing and gutter company in Eastern NC.  It varies, but code requires a membrane roof on a .25/12 pitch and I have seen a number of houses around here with a small covered entry like what you describe with a EPDM (black rubber membrane) roof.  Typically it will be trimmed with a metal edge band and doesn't look bad at all.
My concern, at least around here, would be when we get a good rain with wind involved.  The water may not drain off fast enough and if the wind pushes it against the house, you have potential for water to find it's way in.  Therefore, I would recommend flashing the membrane up behind the siding or fascia depending on how you frame the roof.
EPDM (rubber membrane) roofs this small are within the realm of possibilities for a do it yourselfer.  Be sure to do your homework on how to install these and take your time to get any and all wrinkles out of it.
Answer: We really need to see a photo of the house to make specific suggestions. Here's one that would lead to a more modern look. The idea is to frame out a 'level' frame with the roof inside it. From the ground, it appears to be a horizontal awning and you can clad it any way you see fit. Here's a crude ascii sketch showing a side-view cutaway:
<code>----------------------------------------------------
|****************                                  |
|                ****************                  |
|                                ****************  |
----------------------------------------------------
</code>
Dashes = 'box'
Asterisks = sloped roof within.
For an entirely different look...rustic, consider going with exposed corrugated steel...perhaps pre-rusted. again, it all depends on the aesthetic you are looking for.
Finally, it sounds like the low-slope is due to a desire to install below the existing gutter. I'd suggest not doing that and install above the gutter. There are a number ways to do this. Here's an example of one:
Answer: Best way to improve looks is to rebuild it so that the roof has a real slope to match other parts of the house 4/12, 5/12 6/12 etc. To get that slope tie the rafters up higher on the side wall of the upper level or merge into the upper roof. Then roof this with roofing to match the rest of the house.
Nearly flat roofs with corrugated plastic / fiber glass are always going to look tacky.
Comment: The house has a hip roof. We don't want to do a complex fix, just want a covered front porch to keep rain, etc out.  We agree, the plastic panels do look tacky, but we hoped there was a way to 'disguise' the material.
Comment: Because the porch area is only 5' x 7' , and we will install the roof frame below the gutters, we cannot use a heavier material due to the pitch ~ anything more than 1/4"/12 would bring the roof too low.
Answer: The supporting structure (a pergola) is what's going to 'hide' the corrugated material. If I can see corrugated roofing from the ground, I expect it to be supported by one. Otherwise it does look really tacky.
Pergola With Corrugated Roof: (Google image search)

Although I'd suggest going with metal for durability (and as pictured), neither material in and of themselves have as much say on aesthetics as the entire design aspect does. You don't hide it: you incorporate it.
I will say though, that no matter how you support it, using metal instead of plastic is the first step in making me think you ever cared about aesthetics. The house I grew up in had a plastic one that turned ugly yellow, developed cracks and eventually shattered.
With no picture of your house, I can't advise on how to tie it in, but my point is that it doesn't have to. It can be its own 'thing'. And if your house is plain looking, it may BE the only thing, and then you can (and should) design it to your heart's content.
An alternate way of looking at it, is to ask yourself how you can make it stand out in lieu of hiding it. When I say "it" I mean the entire project, not just the roofing. Also with the proper artistic touch (and especially once it starts rusting), using metal puts you into the realm of shabby chic or rustic, both are far from the land of cheap mobile home.


Property Management Company looking to set up VPN for Tenants

Question: We are a property management company seeking the best way and most affordable way to set up a VPN for our tenants in both a 2 & 3 story (22 units) apartment complex and also for a cafe in a commercial complex.  We have contacted Verizon but they seem eager to provide the same old box setup to increase their sales instead of helping to create a "bubble" network that EVERYONE can tap into.  PLEASE HELP!  Everyone seems to be selling their service and not their expertise in the field.
Answer: Do you mean wireless network that only the residents could use?
If so you could put in A wireless point and connect it using wireless repeaters to ensure good signal strength throughout the building.
You could lock it down by using a strong password and by requiring users to give their Mac address and then you could turn off DHCP and statically allocate IP addresses using MAC address, or only allow certain MAC addresses to use the router.
thats how the company who ran our student halls did it. (Roughly)
Answer: Assuming you are talking about wireless and not VPN, placing one or more access points to cover the area that you need and securing them is what you need to do.  You could do like Joe suggested an lock everything down by MAC address, but that can still be spoofed and creates a headache on your end if someone gets a new computer.
I would suggest getting access points, leaving them wide open, but installing a captive portal like http://dev.wifidog.org/ so that only users that you have given access will be able to actually use the wireless.  This is similar to the way that most hotel's and coffee shops provide wireless internet services.


What is the source of the Apple logo?

Question:
What is the source of the Apple logo? I heard that it was a reference to Alan Turing, who died of cyanide poisoning after eating an apple.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/131565/discussion-on-question-by-neil-meyer-what-is-the-source-of-the-apple-logo).
Answer: This seemingly well-researched article from a design magazine says

According to Janoff [designer of the logo], the reason for choosing this bitten apple logo is to prevent people from confusing the shape of the apple with some other fruit like cherry or tomato, having a similar form.

It also mentions the byte/bite pun, but says that was just a coincidence.
I've never heard the idea that the logo might be related to the apple found by Turing's bed. It seems extremely unlikely, both because it would be in incredibly poor taste and because (as mentioned in comments) Turing wasn't nearly the celebrity in the 1970s that he is now. The wartime codebreaking at Bletchley Park was only declassified in the mid 70s, and the biography Alan Turing: The Enigma wasn't published until 1983, years after the Apple logo was designed.
Incidentally, there's little evidence that he died from eating a poisoned apple. He died of cyanide poisoning, and a partially eaten apple was found by his bed. The apple was never tested for poison, and he could easily have been exposed in some other way (ref). I'm not sure anyone would even have known about the poisoned apple story before 1983, regardless.
Comment: @NeilMeyer Mothers aren't always the most reliable sources on these matters, but when you add the fact that he was in good spirits by all accounts, didn't leave a suicide note, and did leave a note listing chores he was planning for a date after his death, it really doesn't look like suicide. The BBC article that I linked suggests that the coroner concluded suicide on the grounds that someone deranged enough to be homosexual would also be deranged enough to snap and kill themself without warning. The whole article is worth reading.
Comment: We certainly did know about Alan Turing. "Turing machine" was part of the lexicon then.
Comment: @benrg: About 90% of suicides leave no note.
Comment: Turing was recognised as a distinguished computer science pioneer in the 1970s. But his work at Bletchley wasn't public knowledge, nor was his personal life. It's unlikely that Apple were particularly interested in him.
Comment: How did the Turing award factor into this? He must have been somewhat well known in the mid 70s if they were giving out computer science awards bearing his name.
Comment: Yes, his own mother also did not think he committed suicide. She believed it was just an accidental death.
Comment: He also had cyanide at his house and regularly conducted experiments with it... so accidental exposure is actually quite plausible.
Comment: @benrg "The BBC article that I linked suggests that the coroner concluded suicide on the grounds that someone deranged enough to be homosexual would also be deranged enough to snap and kill themself without warning." Or that they were covering up a government assassination, by deeming it a suicide. The article you linked says that murder can't be ruled out, either.
Answer: According to official sources, the name Apple came first.  In an interview with Steve Jobs and Steve Wozniak, recorded to an internal Apple video, it is explained that the name just… appeared.  The recording is kept in an archive at Stanford; while the video itself is not available publicly, Terence Chea of the Associated Press transcribes it as follows:

WOZNIAK: I remember driving down Highway 85. We're on the freeway, and Steve mentions, 'I've got a name: Apple Computer.' We kept thinking of other alternatives to that name, and we couldn't think of anything better.
JOBS: And also remember that I worked at Atari, and it got us ahead of Atari in the phonebook.

Many sources take this as indication that appearing before Atari was the primary motivation for the name, but this is only weakly implied above.
So the initial impulse to associate apples with computing wasn't through Turing.  And while this connection may have appeared later, this is also pretty doubtful, as @benrg's answer explains.
Comment: @akostadinov "fear of being sued" sounds like more of a reason to keep very good records of where the idea came from, so that you can prove that you own the rights to it.
Comment: I don't think anybody sane would keep a written reference of where logo came from because it can later be used to due the company for using somebody else's IP. Especially when logos are designed the competition is being investigated. So designers will be careful not to keep record of where ideas came from.
Comment: @akostadinov You think someone could have copyrighted the apple that was found next to Turing?
Comment: @user3840170, I don't know anything. If it is known that idea came from something, I guess it is a potential lawsuit danger. Logos and other official names are cleared by lawyers but no record is kept as to how was that done and in case of rejection, no explanation is given. This is what I have observed.
Answer:
That apple by his deathbed has become the most famous in science since
Isaac Newton's windfall, with claims that Turing poisoned it so he
could mimic the one in his favourite fairy-tale, Disney's Snow White,
and – repeatedly – that it inspired Apple's famous once-bitten logo.
Although writer/actor/presenter/technophile Stephen Fry says that when
he asked Apple founder Steve Jobs if the story is true, Jobs replied:
"God we wish it were. It's just a coincidence."
Source: bbc.com

Here you can see the clip in its context:
https://youtu.be/A1Ds2eq1E5o?t=560
Comment: This doesn't quite answer the question about the origin of the Apple logo, though it does clarify the context of OP's mistaken claim.
Comment: @V2Blast https://imgs.xkcd.com/comics/duty_calls.png
Answer: It probably has something to do with the fact that Jobs was at one point on a diet of almost nothing but apples. He was spending his college time looking in on all sorts of courses from philosophy to calligraphy. It was also the time of "dropping out" of mainstream society and questioning everything about diet, drugs, people living in groups, relationships, etc. The health food shops we take for granted today, many of these started as commune co-ops back then.
Jobs eventually had to give up on the apples diet as he was showing signs of ill-health from it. But I guess he retained a fondness for the apple and its form may have occupied a prominent place in his mind.
Answer: Based on the cover of the Apple 1 Operation Manual, I'm going to go with "Isaac Newton."

What is the source of the Apple logo?


In Gmail, when sending emails as another account yy@gmail, keep trace of these messages in yy@gmail?

Question: I have 2 email accounts with gmail; eg. first@gmail second@gmail, and. I am forwarding the emails from the first account to that of the second. I have a filter in the second account which labels the first account's incoming emails, and I can send emails from the second account as if they were originating from the first.
What is not happening is: when I send an email from the second account under the name of the first account, a copy of it is not kept under the first account's sent folder. So when I log into the account of the first email the transaction record is not kept.
I tried to do things like enable/create a POP3 connection but that did not work and am not sure if this was a path to a solution. I wonder if the ability to use an address as an alias would create such an action.
Answer: Add the email@example.com to TO, CC or BCC fields.


Are PX_BID and PX_ASK on Bloomberg closing bid/ask? or are they daily averaged?

Question: Bloomberg provides PX_BID and PX_ASK on a daily basis, but it's not clear exactly where these numbers come from. Are they closing bid and ask prices, or are they averaged over the entire day? For stocks, are they pulled directly from Nasdaq/NYSE dealers/specialists? Also, if anybody knows, were they pulled from the exchanges even before Regulation NMS?
Answer: PX_BID and PX_ASK are the static equivalents of BID and ASK, the latter two of which populate in "real time" (i.e. as they are dynamically updated). So the PX_BID and PX_ASK values are dependent upon when you pulled the data.
Bloomberg's source depends on the asset in question and the exchange on which they are listed, but the data does come from the exchange, an associated MM, or an ECN initially. I'm not sure about data pre-Reg NMS.

Perhaps a sidebar, but something that might be of interest: because there is less incentive to reduce publishing delays for trades relative to quotes (i.e. since trade delay allows transient post-hedge advantages for the traders, while old quotes are penalized), trades are more stale than quotes. This could account for unusual PX values for last trade vs. the quotes. However, propagation delays in quotes can also be significant, often artificially reducing the NBBO given a delay-induced offsetting effect, which sometimes shows a locked or crossed market. This should also be considered when pulling quotes.
You might find Rosenthal (2011) useful, as well, if you are interested.
Answer: They represent the current BID and ASK at the time you query them.
If you look up those fields in the terminal FLDS<GO> you will see they are marked as reference data, that means they are not continually updated.
They are refreshed each time you query them.  They come from the NBBO quote at the time you query them.
Answer: You said that the PX_BID and PX_ASK values are dependent upon when you pulled the data. But if I pull historical data (e.g. for the last month) only the value of today would be changing but not the past ones...
So there should be a point of time when the final PX_BID and PX_ASK values for a day are calculated. Or am I wrong?
Answer: For historical data they are the latest bid and ask prices (ie the closing bid/ask prices):

Source : From bloomberg documentation :
PX_BID
Also available as Historical field
Highest price an investor will accept to pay for a security.
Fixed Income:
   This will return the last available bid price.
Loans:
   The price at which an investor offers to pay to purchase all or part of a loan.
Equities:
If the market is closed, this will return the last bid from the last day the market was open. If the market is open, and there is not a bid in the market, this will return 'N.A.'
PX_ASK
Also available as Historical field
Lowest price a dealer will accept to sell a security.
Fixed Income:
   This will return the last available ask price.
Equities:
If the market is closed, this will return the last ask from the last day the market was open. If the market is open, and there is not an ask in the market, this will return 'N.A.'
Economic Statistics:
   Provides the current release of statistic.
Comment: Kindly ask to inform in what Bloomberg documentation can we see description of px_bid quotation that published above? Thank you in advance.
Comment: sure, it was a copy-paste from an help window of the bloomberg addin for excel.


Alcohol in checked-in baggage in transit through Saudi Arabia with Saudi Airlines

Question: I am looking for cheap tickets from Germany to India via Saudi Arabia with Saudi Airlines. While I am not interested in carrying or having alcohol or any sort on board, I would like to know if it is permitted to carry it via checked-in baggage. Is that fine to do so, or is it prohibited as well? I could only find information with respect to alcohol for cabin baggage. I will be in transit at Riyadh and will not leave the airport. Googling shows people have different opinions but most of them are hunches or assumptions. Does anyone here have first-hand experience?
Answer: In addition to the "better safe than sorry" case, I finally found a link which makes it explicitly clear:
http://www.iatatravelcentre.com/SA-Saudi-Arabia-customs-currency-airport-tax-regulations-details.htm

Prohibited (also for transit passengers): alcoholic beverages,
  firearms or other lethal weapons; drugs of narcotic nature (except
  medicines for personal use and if holding prescription); pork
  products; natural pearls.

Hope this helps others!
Comment: What's up with pearls?
Answer: On their website it says "SAUDIA does not serve or permit passengers to carry or drink alcoholic beverages on its flights."
http://www.saudia.com/HOW-CAN-WE-HELP/More-Information/Terms-and-Conditions/SAUDIA-Terms-Conditions-Passenger-Advice-Notices-Liability#11430b3f2a847210VgnVCM1000001f64e80aRCRD
 I read that as meaning you may not have alcohol checked in since it amounts to carrying it.
Comment: I think that is open for interpretation. I would read the same as only restricting carry-on, but I understand why you read it the other way. I don't think this is a definite answer yet.
Comment: Agreed. But I personally would find another way to move my alcohol, to avoid any risk of having to discuss that with KSA's famously conservative authorities.
Comment: agreed :) it's certainly one of those "better safe than sorry" cases


Why do brisket recipes move to the oven to finish?

Question: In the Cooks Illustrated BBQ brisket recipe and many others I've seen, they call for moving the brisket from the grill where they are being smoked to the oven to finish.  I'm wondering why the recipes call for this step rather than finishing in the grill.
Answer: Convenience: It's more convenient and easier to monitor the temperature inside the home.  The oven has a thermostat, where the grill temperature needs to be monitored and adjusted manually.
No smoke left: Is could be assumed that the smoke has been exhausted.
Too much smoke: The smoke flavor could become too strong if finished on the grill.
Answer: There's really no reason to move the brisket into the oven aside from convenience and ease of temperature control, with the contrasting point also being true that there's no rule that says you have to leave your meat on the grill for the entire cook. After a few hours, the brisket will have taken on about as much smoke as it can/should. So if it makes sense to finish cooking it in the oven, there is nothing keeping you from doing so. Also bear in mind that a gas grill is not the most efficient means of cooking with indirect heat. You will use a lot of propane to maintain even relatively low roasting temperatures, while an oven requires far less energy to achieve the same effect.
If it were me, I would be inclined to keep the brisket in the cooker if I were using a charcoal grill, or a smoker, where the cooking chamber is more suitable for retaining ambient heat. I would be less inclined to keep it on a gas grill the entire time, as it's not worth blowing through the bulk of a propane tank for no discernible benefit.
Answer: All of your postulations are valid.  A couple more below.  These would my main concerns:

A normal grill has a tendency to be wilder in control and cooking to the centre properly might become unpredictable.  Though I have seen full grill recipes with the Big Green Egg.  This you can mitigate using an insertion probe thermometer.
Purpose of the grill is deliver flavor to the outer layer of the meat.  It doesn't do much for the center and it tends to dry out the meat in long term since the humidity escapes.  In the oven it reaches a saturation point and prevents turning the outside into leather as the center is being cooked.  This you can't easily mitigate on the grill.  If you look carefully at their picture, you can see a break in color and texture at about 1/2" depth where it goes from gray-ish brown to moist pinkish color.  They are trying to prevent that break line to get too deep in the meat.
Comment: Your first bullet point is can be true in some cases, but your latter point bears no merit.


Are there any schools of thought which consider the science of Fiqh to be Bidah?

Question: We see that today an Islamic ruling is derived using a set of guidelines and scientific process. Each of the four schools may have different rules to derive a ruling , so can this intricate  process be a Bidah motivated by the hadith of Hair splitting in religious issues? Are there any sects or schools of thought which consider fiqh to be  Bidah?
Comment: Would there be a reason for it to be Bid'ah?
Comment: What's so fundamentally wrong with ruling on hypothetical cases? And it is very intuitive that total abandoning of any guiding criteria for identification of Sharia rules will lead to mislead as there is an abundance of contradicting, unreliable or ambiguous hadiths.
Comment: The elaborate Fiqh system can lead to hair splitting. Like giving fiqh ruling for hypothetical cases as a pure academic interest
Comment: To compare: English common law complex and contradictory, which is why in law, one learns how to argue by principles; there seems to be, *prinae facie*, considerable overlap...
Answer: The Ahl-ul-Hadith movement of the 19th century, in the sub-continent, would qualify as a school of thought that comes very close to rejecting Fiqh. (Ahl-ul-Hadith not to be confused with primitive precursors to organized schools of Fiqh). Ahl-ul-Hadith do not ascribe to any school of Fiqh themselves and consider the association itself to be a Bida'h. One of their main theses is the absolute rejection of Taqlid, with an associated importance on deriving the rulings directly from sources. They are often compared to the now extinct Zahiri school of Fiqh but unlike the Zahiris the modern day Ahl-ul-Hadith don't consider Ijma to be a source.
Another school of thought are the Quranists. They reject the Hadith and tacitly the Sunnah as a source of guidance besides the Quran. Unlike Ahl-ul-Hadith, though, they are not particularly concerned with the concept of Bida'h.
Quranists are often classified as Modernists, though there are other modernists who accept Sunnah and Hadtih as source of legislation, while rejecting the organized schools of thought e.g. http://www.al-mawrid.org/
Answer: Very unlikely; no system of law can do without principles to guide judgement; and in Islam these principles are called Fiqh.
Bi'dah, is pejorative innovation in the Islamic Sciences; it can't be applied to the notion of Fiqh in toto.
(This doesn't mean to say that in day to day life, the 'Hadith of hair-splitting' won't be applied by the slightly over-zealous).


Light field based camera or dslr? Which should I choose?

Question: Should I buy a lytro (light field) camera or a dslr one? I know that the light field based cameras are new. Do professional photographers use it? Or will they?
Comment: If you do purchase a Lytro, I suggest verifying that the software is compatible with your computer, as I purchased the Lytro Illum and it does not work with my particular mac. The camera is more of a toy that can be used to create SOME interesting shots but the conditions have to be right.
Answer: In a decade, light-field cameras and computational photography are going to be the mainstream. As computer power gets faster, smaller, lighter, and more power-efficient, the advantages will exceed optics — maybe not completely in a decade, and probably not in every case in a hundred years, but there will be a crossing point.
But the current technology on the market — the Lytro — is essentially a toy camera serving as a tech preview. You'd buy it in order to tell your grandkids that you had the first camera of that type. It doesn't really do anything useful right now: the images it makes are postage-stamp sized, and the nifty tricks the camera offers only work when you upload the images to the company's special web site. You can't really do anything yourself.
They've promised an SDK but as of Spring 2012 that has not yet materialized. If you're a hacker (in the original sense), you might find that interesting and productive when available. But even then, it'll be more about playing with the technology than getting real photographic results.
That doesn't mean a DSLR is necessarily the only option for good results. You may also be interested in a small-sensor compact camera, or a large-sensor "mirrorless" camera, with or without interchangeable lenses.
Comment: In a decade… Six more years to go to ***mainstream*** acceptance. I'm skeptical about the acceptance and fascinated with your confidence in predicting the future. How's your stock portfolio? Meanwhile, I think the camera will be relegated to a small pile of gimmicks such as the stereo-view, panorama, and the new multi-lensed "Light" camera vapourware.
Comment: Looking back, from 40% of the way into my predicted ten years, that might have been a _bit_ optimistic. Still, I'm confident that it will happen.
Comment: @Stan Meet you back here in 2022, okay? :)
Comment: God willing. : )
Comment: @mattdm Well...I had a small chance to use the "new" Lytro Illum and...heck, your 10 years prediction could be even a bit pessimistic. What that camera can achieve is amazing from an artistic point of view. Obviously is not the solution to everything, but the next iteration from Lytro will probably blow out the market.
Comment: @motoDrizzt - God willing. : )
Comment: the "new" lytro illum is already old - now they boast about lytro cinema and this time it looks like something professionals might really use (for video)
Answer: It really depends on what kind of photography you want to do, but I would personally avoid a light field camera at present because it is such new technology. Remember the first range of camcorders that came out - they were shoulder mounted behemoths with ancillary battery packs. Now you get full HD widescreen camcorders that fit in the palm of your hand. So, I suspect, will it be with light field cameras - give it 5 years and they will be half the price and twice as good.
The image quality with current light field cameras is nowhere near as good as a DSLR, and you have none of the flexibility afforded by interchangeable lenses or control of all the other photographic variables like shutter speed etc.
There may come a time when light field technology replaces traditional cameras, but I think it will be little more than a sideshow for some years to come. Personally, I think it has more of a use in, say, mobile phone photography than any serious application.
Answer: Ignore our answers. We don't have a clue.
Get whatever you want. It's your life. Nobody here knows what the future will bring or what will make you happy.
As far as professional photographers goes, a pro earns money and that's the only difference between an amateur and a professional. It says NOTHING about talent, equipment, or ability.
Practically every dentist on the face of the earth outspends practically any professional photographer I know.
As far as earning money goes, "Currency brings currency." Get a Lytro and see how fast you gather a crowd around you. After you monetize the event, you'll be a professional in any sense of the word, albeit in a specialty niche market.
Answer: Buy a DSLR or similar.
The only reason to buy a light field camera instead of an SLR is if the LFC's special abilities suit your needs very very precisely indeed and if you value this ability very highly above all else. In almost every case, what the LFC can do for you can be emulated well enough functionally by many DSLR's.
Overall the current LFCs are a very poor alternative to almost any DSLR except in their one specialist niche.
Answer: If you purchase a DSLR you are able to emulate the features of the Lytro camera to an extent by following this guide: Camera Hack: DOF-Changeable Photos with a DSLR :

The gist is that we created a similar effect using a basic digital SLR
  camera and shooting video (getting depth-of-field information by
  capturing it over time instead of over space as Lytro does)

The main downside of this is that the camera will not be able to take moving shots.
Hope that helps!
Comment: …not be able to take moving shots. So far!
Comment: link is broken.
Comment: fixed link in the post


What happened to the power of the tailed beast that was inside Naruto?

Question: For a while, Naruto hosted all the tailed beast and when they left him their powers should have stayed. When Gaara came back to life he lost Shukaku but he still had the power to control sand. Another example is when the Gold and Silver brothers were reincarnated they still had their powers just like the 7 Jinchuuriki that were reincarnated. So how did Naruto lose his powers?
Comment: Gaara's power to control sand did not come from Shukaku.
Answer: I think you are misunderstanding the premise of the situation. Naruto was not a host of the other tailed beasts, he only had their chakra.
Naruto Uzumaki

Naruto had also received chakra from the other tailed beasts during the Fourth Shinobi World War, which made him a human pillar for the power of Ten Tails. This allowed him to access their unique abilities himself, or infuse them into his Rasengan and its variants.

At the end of the Fourth Great Ninja War, Naruto still has the chakra of the Tailed Beasts within him

The tailed beasts spread out through the world, free to live as they want; both Gyūki and Kurama decide to return and stay with B and Naruto. However, though they are apart, the tailed beasts' chakra fragments remain within Naruto, allowing his body to act as their "meeting ground"

To expand on your examples, the Gold and Silver brothers ate the flesh of the 9-tails and inherited large chakra reserves and similar abilities to the tailed beasts. This become a part of their being, thus maintaining these powers when resurrected.

The brothers survived inside Kurama for two weeks by eating the beast's flesh; this would eventually lead to the fox regurgitating them. This left them with unusually large chakra-reserves and abilities similar to those of a jinchūriki.

As @Akira Mahisaseru stated, Gaara did not get his ability control sand by the 1-Tailed. Even the Fourth Kazekage wrongly assumed this

Gaara's ability to manipulate sand remains even after Shukaku is removed from his body. Indeed, the Fourth Kazekage, upon seeing how much sand Gaara can control at once, wrongly assumes it is Shukaku itself doing so, not Gaara.


Rock/Mineral Ore Eating Organism

Question: How would an alien organism survive on a diet of rocks and mineral ores, and what kind of materials would be the most sufficient? Also, what kind of teeth and evolutionary traits would they possess in order to support this geophagic diet? I've researched animals such as the chiton, limpet and sea urchins, who also have strong teeth made of magnetite, goethite and calcite respectively, sea urchins possessing self sharpening teeth as well. I'm currently playing with the idea of this organism being an evolved humanoid chiton similar to how an Inkling from Splatoon is an evolved squid humanoid. The only other fictional race I am aware of that has a geophagic diet are Gorons from Zelda, but I am not sure why they eat rocks other than the fact its fantasy.
Comment: I don't have enough to make a proper answer, but for some ideas look into lithotrophs: https://en.wikipedia.org/wiki/Lithotroph
Comment: Why not plants? Photosynthesis for energy and rocks for minerals
Comment: https://www.livescience.com/65739-newly-discovered-clam-eats-rocks.html
Answer: Lithotrops. That's the name.
The comment by @starfish prime is correct: the consumption of reduced inorganic compounds (RIC) is essential: Energy is derived via oxidation. That is why hydrothermal vents are the main source of RIC. There are no large organisms on Earth feeding on RIC.

Known chemolithotrophs are exclusively microorganisms; no known macrofauna possesses the ability to use inorganic compounds as energy sources. Macrofauna and lithotrophs can form symbiotic relationships, in which case the lithotrophs are called "prokaryotic symbionts"

It is possible, however, that larger organisms develop a symbiotic relationship with those microorganisms. One good solution to your large human-like creatures living on land is to live close to volcanoes. They live on a geologically-active planet with abundant sulfur vents. They eat sulfur deposits and derive energy by oxidizing sulfur to sulfates. The energy drives growth and metabolism that uses additional minerals as building blocks. Also, by saying "inorganic" you exclude carbon almost completely. It is possible to absorb carbon dioxide for biosynthesis rather that handwaving a silicon-based life
Comment: One problem with lithotrops as a dominant macroscopic life form is that they are limited by their food supply.  There's really not that much of (or perhaps that fast of) a "lithocycle" that corresponds to the protosynthesis-driven carbon cycle that powers most life.
Comment: Yes, I mentioned that in the quote. The sulfur-based chemosynthesis may offer some partial solution. Other freshly-exposed minerals can be oxidised for energy as well. I still think that if such large organism evolves, it may be sluggish and cold-blooded for the same reason you stated.
Answer: These animals can eat whatever releases energy upon reaction with another chemicals.
For example if they live on a planet with an oxygen rich atmosphere, they can eat carbon, iron or any other oxidable metal.
Their metabolism will use the oxidation path, which for carbon would be $C+O_2=CO_2 + Energy$ to get energy and sustain themselves.
Comment: You will of course have problems finding oxidisable metals in their native unoxidised state for very long, once the planet has developed an oxygen atmosphere (see also: history of Earth). We do however have excellent reserves of carbon-rich minerals derived from dead trees.

Rock/Mineral Ore Eating Organism


Does anyone know of any good Asubha sites?

Question: Does anyone know of any good Asubha sites?  Am interested in suitable objects for contemplation for the overcoming of lust.
Comment: Requests for link lists are off topic, but requests for thematic material for ashubha/Patikulamanasikara is on topic. A link list would be low quality info, since the links rapidly turn into 404s.
Comment: We haven't really come to a consensus on this @MatthewMartin; see [here](http://meta.buddhism.stackexchange.com/questions/11/should-requests-for-materials-be-considered-on-topic): maybe this will be a good test - anyone want to cast close votes?
Comment: I would vote to close, but don't have the rep to do it yet. My problem with this question is not that is is asking for resources, but that it is a list question. There is no single definitive answer on list questions and there will always be one more site to add. That's why list questions are off-topic on most SE sites (with some exceptions, but in those cases list questions are usually made community-wiki questions)
Answer: I think these might be helpful:
http://www.youtube.com/watch?v=w2JroFk5Ke8
http://www.youtube.com/watch?v=cgDHJzBt-YU
I found it more helpful in daily life to be more aware of and look more at old people. I find it also develops helps develop a sense of respect towards fellow humans around. Old people are worthy objects of respect.
No need then for so much blood and gore. Or I have not seen the advantage of it.
I think it all depends from where one works. A sense awareness that there is the same awareness in the object, being bound to this existence, growing old, sick and dying, from my experience, is a very powerful support. More than looking at dead bodies.
Might be different for others.
After that one incident, where I looked at a woman like this, because "fallen in love", could not maintain such enamoured state, because somehow it was demeaning, my thought was I wanted to disappear into the forest and only look at my own mind, to find freedom.
Then looking at any woman at all I was not inclined to have any sexually motivated perception or fantasy anymore for months on end. Feeling very light and freed.
So, this sense, that we are all imprisoned here, going to die. Developing this at the "living object", developes some kind of compassion that one would not be able to have sexual thoughts about this.
Perhaps a bit gone of-topic, because just I find some other ways to be more useful.
Just some not so professional ideas. Hope it may help.
_/_
Comment: And another one: http://www.youtube.com/watch?v=56LMAamf78A
because could only post one link at once with only so many "credit" points.
Answer: See and memorize dissected cadavers. Blood filled bodies after accidents. Imaginate the stools and think that they from inside the body are good points.


primitive residue classes modulo 32

Question: $\mathbb Z_{32}^*$ is the primitive residue classes modulo 32. How is it possible to show that $\mathbb Z_{32}^*$ is generated by 5 and -1, without showing it for every element of $\mathbb Z_{32}^*$=$\{1,3,5,7,9,11,...,31\}$
Answer: The number $32$ is small, so it is easy to show by computing that $5$ has order $8$. Note that we only need to compute $5^{2^k}$ modulo $32$. For $\varphi(32)=16$, so the order of $5$ must be a power of $2$.
The following is severe overkill. We show that for any $n\ge 3$, $\mathbb{Z}^\ast_{2^n}$ is generated by $5$ and $-1$.
Lemma: Let $n\ge 3$. Then $5^{2^{n-3}}\not\equiv 1 \pmod{2^n}$, while $5^{2^{n-2}}\equiv 1\pmod{2^n}$.
Proof of Lemma: We show by induction on $n$ that if $n \ge 3$, then $5^{2^{n-3}}\equiv 1+2^{n-1}\pmod{2^n}$. This easily yields both parts of our assertion.
The result is easy to check for $n=3$.   Suppose now that
$$5^{2^{k-3}}\equiv 1+2^{k-1}\pmod{2^{k}}.\tag{$1$}$$ We show that $5^{2^{k-2}}\equiv 1+2^{k}\pmod{2^{k+1}}$.
 Square both sides of $(1)$, and simplify modulo $2^{k+1}$. We get
 $$5^{2^{k-2}}=(1+2^{k-1} +n2^k)^2\equiv 1+2^{k}\pmod{2^{k+1}},$$
 since $2^{2k-2}$ is divisible by $2^{k+1}$ if $k\ge 3$.  This ends the proof of the lemma.
Now it is easy to finish.  The order of $5$ modulo $2^n$ divides $\varphi(2^n)=2^{n-1}$, so the order of $5$ is a power of $2$. It follows from the results above that the order of $5$ is exactly $2^{n-2}$.
No power of $5$ is congruent to $-1$ modulo $2^n$. It follows that if $n \ge 3$, then $5$ and $-1$ together generate all of $\mathbb{Z}^\ast_{2^n}$.
Answer: Let $n > 1$ be an integer.
We consider the group $G = (\mathbb{Z}/2^n\mathbb{Z})^*$.
Clearly $|G| = 2^{n-1}$.
Let $e \ge 2$ be an integer.
Let $k$ be an odd integer.
$(1 + 2^e k)^2 = 1 + 2^{e+1}k + 2^{2e} k^2 = 1 + 2^{e+1}(k + 2^{e-1}k^2)$.
Note that $k + 2^{e-1}k^2$ is odd.
Hence, by induction on $m \ge 1$, $(1 + 2^e k)^{2^m} = 1 + 2^{e+m}k'$ for some odd integer $k'$.
Since $5 = 1 + 2^2$, $5^{2^m} = 1 + 2^{m + 2}k'$, where $k'$ is odd.
Hence the order of $5$ in $G$ is $2^{n-2}$.
Let $H$ be the subgroup of $G$ generated by $5$.
Suppose $-1 \in H$.
There exists integer $m$ such that $-1 \equiv 5^m$ (mod $2^n$).
Since $5 \equiv 1$ mod $4$, $-1 \equiv 1$ (mod $4$).
This is a contradiction.
Hence $G$ is generated by $-1$ and $5$.
Answer: Working modulo $\,32\,$:
$$5^2=-7\;\;,\;\;5^3=-35=-3\;\;,\;5^6=(5^3)^2=9\;\;,\;5^8=5^6\cdot 5^2=9\cdot (-7)=-63=1$$
$$\Longrightarrow 5^8=1\Longrightarrow ord_{32}(5)=8$$
$$(-1)^2=1\Longrightarrow ord_{32}(-1)=2$$
Finally, since $\,\langle 5\rangle\cap\langle -1\rangle=\{1\}\,$ , we get that
$$\langle 5\rangle\langle-1\rangle\cong\langle 5\rangle\otimes\langle -1\rangle\cong\Bbb Z_{32}^*$$
since $\left|\Bbb Z_{32}^*\right|=\phi(32)=16\,$
Comment: You also need to show that $5^4\neq 1$, so that the order of $5$ is exactly $8$ and no less.
Comment: Correction: the OP needs to show that, not I. Since I made the calculation for $\,5^3=-3\,$, the work left is trivial.

primitive residue classes modulo 32