Should/could the first "In Him" (ἐν ᾧ) in Ephesians 1:13 be tied to verse 12?

Question: Because of full stops/commas/capitals in the NASB, ESV, KJV, the first "In Him" (ἐν ᾧ) is written as though it's tied to verse 13. Because it seems to me that the first "In Him" could be tied to the end of verse 12, with the conjunction "And/Also" (καὶ) starting the next clause with its own "In Him" later in the same verse. Would tying it to verse 12 be grammatically correct in the greek text?
Comment: theres only one antecedent there in the v12, in Christ, in him you....
Answer: The first "in Him" in Ephesians chapter 1 is not verse 12 or 13, but is in verse 4.
It next appears in verse 10.
Yet in the translation I'm using to answer this question, it does not occur either in verse 12 or verse 13.
I'm using a literal translation, which is the closest possible to the actual Greek text. It was produced in 1862 and my edition is the final revised  one of 1898. Most modern translation are somewhat removed from some of the Greek manuscripts used in this translation, so I suggest that if this translation is consulted, all the difficulties you mention will be cleared up. Square brackets denote words added for the sake of English language comprehension. Note also how verses 3 to the end of verse 14 comprise but one sentence, which is the way Paul had it. Further, note how a capitalised "He" or "Him" identifies the Father. Christ is written as "he". I now copy this one sentence from verses 3 to 14, which speak clearly about being "in" Christ (who is the 'him' you ask about).

"Blessed [is] the God and Father of our Lord Jesus Christ, who did
bless us in every spiritual blessing in the heavenly places in
Christ, according as He did choose us in him before the
foundation of the world, for our being holy and unblemished before
Him, in love, having foreordained us to the adoption of sons through
Jesus Christ to Himself, according to the good pleasure of His will,
to the praise of the glory of His grace, in which He did make us
accepted in the beloved, in whom we have the redemption through
his blood, the remission of the trespasses, according to the riches of
His grace, in which He did abound toward us in all wisdom and
prudence, having made known to us the secret of His will, according to
His good pleasure, that He purposed in Himself, in regard to the
dispensation of the fulness of the times, to bring into one the whole
in the Christ, both the things in the heavens and the things upon the earth - in him; in whom also we did obtain an
inheritance, being foreordained according to the purpose of Him who
the all things is working according to the counsel of His will, for
our being to the praise of His glory, [even] those who did first hope
in the Christ, in whom ye also, having heard the word of the truth - the good news of your salvation - in whom also
having believed, ye were sealed with the Holy Spirit of the promise,
which is an earnest of our inheritance, to the redemption of the
acquired possession, to the praise of His glory." (Young's Literal
Translation)

Because the first "in Him" occurs in verse 4, then verse 10, this throws your question into disarray, from my point of view, and I cannot answer it as it stands. However, the point of your question (if I am not much mistaken) is to establish whether verses 12 and 13 speak of being "in" the same one - the Christ. Your idea is to put the conjunction 'and' at the end of verse 12. Then it would make more sense to you.
All I can say is that the Y.L.T. translation makes it perfectly clear that "the Christ" of verse 12 is exactly the same Christ of verse 13. This answers your query. Christians are found "in him", by the power of the Holy Spirit, who guarantees our inheritance in Christ (see Romans 8:1-39, which equates being "in Christ" with being "in the Spirit" who testifies with our spirit that we are children of God - and contrasts that with being "in the flesh" and so subject to corruption.) The theology of Romans 8 harmonizes perfectly with the theology of Ephesians chapter 1.
Answer: Technically, Ἐν ᾧ is "in whom," but Paul's long Greek sentences are usually broken up in English translations.  One of Paul's sentences is 14 verses; not a style we use in English.  So, basic to your question is what does Ἐν ᾧ (dative masculine singular) refer to?
Notice ἐν Χριστῷ (v3), ἐν αὐτῷ (v5,9,10), Ἐν ᾧ (v7,11,13[x2]), ἐν τῷ Χριστῷ (v10,12).  That along with "ἐν τῷ Χριστῷ.* 13 Ἐν ᾧ" (NA28) makes it clear that the relative pronoun refers to Christ.  The connection includes 1:3-14, which is one sentence all tied together.  However, the relative pronoun introduces a relative clause, Ἐν ᾧ καὶ ⸀ὑμεῖς ἀκούσαντες τὸν λόγον τῆς ἀληθείας,* τὸ εὐαγγέλιον τῆς σωτηρίας ⸁ὑμῶν (NA28), "in whom ye also, having heard the word of the truth, the gospel of your salvation" (ASV).  Thus, in that sense, it is more closely tied to v13.  Because Ἐν ᾧ is a preposition phrase with a relative pronoun, it would not be correct grammar to sever it from the rest of the relative clause.
The American Standard Version preserved Paul's sentence structure.

3Blessed be the God and Father of our Lord Jesus Christ, who hath blessed us with every spiritual blessing in the heavenly places in Christ: 4even as he chose us in him before the foundation of the world, that we should be holy and without blemish before him in love: 5having foreordained us unto adoption as sons through Jesus Christ unto himself, according to the good pleasure of his will, 6to the praise of the glory of his grace, which he freely bestowed on us in the Beloved: 7in whom we have our redemption through his blood, the forgiveness of our trespasses, according to the riches of his grace, 8which he made to abound toward us in all wisdom and prudence, 9making known unto us the mystery of his will, according to his good pleasure which he purposed in him 10unto a dispensation of the fulness of the times, to sum up all things in Christ, the things in the heavens, and the things upon the earth; in him, I say, 11in whom also we were made a heritage, having been foreordained according to the purpose of him who worketh all things after the counsel of his will; 12to the end that we should be unto the praise of his glory, we who had before hoped in Christ: 13in whom ye also, having heard the word of the truth, the gospel of your salvation,—in whom, having also believed, ye were sealed with the Holy Spirit of promise, 14which is an earnest of our inheritance, unto the redemption of God's own possession, unto the praise of his glory.
(Eph. 1:3–14, ASV)
Answer: Grammatically, the antecedent for the explicit and implicit pronouns in Eph 1:3-14 are found in V3 and are thus either "God the Father", or, "our Lord Jesus Christ".
Let me quote a larger section of Eph 1 with the antecedents inserted:

3 Blessed be the God and Father of our Lord Jesus Christ, who [the Father] has blessed us in Christ with every spiritual blessing in
the heavenly realms. 4 For He [the father] chose us

in Him [Christ] before the foundation of the world to be holy and blameless in His presence. In love 5 He [the father]
predestined us for adoption as His sons through Jesus Christ,
according to the good pleasure of His [the Father's] will, 6 to the
praise of His [the Father's] glorious grace, which He [the Father] has
freely given us in the Beloved One [the Son].
7 In Him [Christ] we have redemption through His [Christ's] blood, the forgiveness of our trespasses, according to the riches of
His [the Father's] grace 8 that He [the Father] lavished on us
with all wisdom and understanding. 9 And He [the father] has made
known to us the mystery of His [the father's] will according to His
[the Father's] good pleasure, which He purposed in Christ 10 as a
plan for the fullness of time, to bring all things in heaven and on
earth together in Christ.
11 In Him [Christ] we were also chosen as God's own, having been predestined according to the plan of Him [the father] who works
out everything by the counsel of His [the father's] will, 12 in
order that we, who were the first to hope in Christ, would be for the
praise of His [the Father's] glory.
13 And in Him [Christ], having heard and believed the word of truth—the gospel of your salvation—you were sealed with the
promised Holy Spirit, 14 who [the Holy Spirit] is the pledge of
our inheritance until the redemption of those who are God's
possession, to the praise of His [the Father's] glory.

Note the structure of this passage containing four "in him", namely, in Christ we receive all these promises.


Is a one class naive bayes possible?

Question: I have a simple question - I think.
I have recently read a paper:
https://www.google.co.uk/url?sa=t&source=web&rct=j&url=http://www.cs.columbia.edu/~kewang/paper/DMSEC-camera.pdf&ved=0ahUKEwiI9um_8LbKAhWDMBoKHSmlDPgQFggaMAA&usg=AFQjCNFYXFLNLcWt350pbZMKhOB9MJu_Yw
That uses a one class naive bayes. My question is - can I do the same as a one class multinomial bayes when I use a Gaussian distribution.
The above paper used a threshold to identify their class of interest in a test dataset.
If I make the following assumptions:
The standard deviation is greater than one for my features in the training data
Add the log sums of the Gaussian pdfs for all variables for each sample
Could I use a threshold, some standard deviation derived from the normal - maybe 3, to identify data points that are close to my one class training data.
Answer: According to the paper One-class document classification via Neural Networks of Manevitz and Yousef it seems to be possible to construct a one-class Naive Bayes classifier, even without a standard deviation.
I cite the relevant passage where the authors mention how to implement the core of the classifier:

We calculate $p(d|E)$ as the product of $p(w|E)$ for all words in the
dictionary that appear in the document $d$. Each of the $p(w|E)$ is
estimated independently using the formula:
$p(w|E) = \dfrac{n_w + 1}{n + |dictionary|}$,
where $n_w$ is the number of times word $w$ occurs in $E$, and $n$ is the total number of words in $E$.
We calculate a threshold $\delta$ by the minimum over all examples in
$E$, of the value $p(d|E)$ for each document in the set of examples.
Then we experiment with values $\lambda\cdot\delta$ for $0 < \lambda \leq 1$ as in the previous algorithms using $F_1$ to find the optimal
threshold for acceptance. That is, given a new document $d$, we accept
it if the calculated value $p(d|E)$ is larger than the determined
$\lambda\cdot\delta$. For this classifier algorithm we store $\delta$
and $\lambda$.

A more detailed picture of the algorithm is explained in the doctoral dissertation Characteristic Concept Representations of Piew Datta.

Is a one class naive bayes possible?


Why is it called a story spike?

Question: I understand what a story spike is for, but I'd like to know what the significance of the term is. I don't immediately see the relationship between the word "spike" and what it represents in agile practices. Google searches only seem to reveal a hundred articles about what a story spike is for without answering that question.
Comment: I see the title was modified to include the word "story". I've literally never heard anyone say "story spike". But I suppose it doesn't hurt anything and helps SEO?
Answer: If I remember correctly, the term comes from XP.
XP relies on technical practices such as TDD. See Why are TDD 'Spikes' called 'Spikes?.
And then a lot of Agile ideas were "borrowed" from XP. And Spike became synonym with an Experiment.
Answer: TL;DR
Most of the easily searchable answers are wrong about the etymology of the term outside of (relatively recent) agile or software development usage. The term actually has a much longer historical context, some of which is more relevant than others to its current usage in agile program and project management.
If you're asking specifically about the fixed phrase [user] story spikes then you can find the term attributed to various agile frameworks and practices including Extreme Programming. However, the historical context may do a better job of explaining why it's a useful metaphor besides simply attributing it to "so-and-so applied it to user stories because..." The application of an historical term to a new context to denote a specific type of activity has less utility value than understanding the various connotations of the term.
Etymology & Metaphors
Physical Form and Business Functions
A physical spike is essentially a type of long nail that holds or pierces things, but such a shape has a much larger set of applicable business and process functions. In particular, physical spikes have a history in offices and other workplaces where they functioned as real-world last in, first out (LIFO) stacks.
In the software sense, Microsoft Word has (or possibly had) a feature called the spike that functioned as a stack. In pre-computerized offices and other workplaces, spikes were also used as FIFO stacks for non-electronic "data containers" such as stationary, restaurant orders, notes, messages, and documents. It was widely used both literally and metaphorically in journalism, copywriting, and publishing as a noun similar to a slush pile, or as a transitive verb largely attributable to journalism that generally meant killing a news story.
Regardless of the original intent in applying the term to user stories, today most practitioners use the term "story spike" as analogous to a skunkworks project for validated or targeted learning. However, thinking of it as a LIFO stack has some useful properties, too.
Metaphors Adapted to Agile Frameworks & Practices
As a metaphor for physical spindles or spikes, a story spike can be:

Something pushed onto the top of current stack of work to explore an idea, where the "spiked story" must be popped off the stack before the work underneath can continue.
A temporary holding place or transitional state for a work activity, in much the same way as messages or restaurant orders would be placed onto a physical spike for short periods of time to facilitate another activity such as returning a set of phone calls or batching up restaurant orders for the cook. This metaphor is particularly useful in conceptualizing the extremely time-boxed nature of a user story, where the spike is specifically intended to be short-lived and/or temporary.
As a place where ideas that don't pan out get killed off or deferred, much like the news editor's physical spike. In this sense, much like the journalism term, it doesn't necessarily equate to failure even of the agile "fail fast" variety; it just means the user story won't continue its journey through the rest of the iterative process at the present time. The output of such a story spike can either be discarded as in "killing the [news] story", or placed into the project's icebox or on the bottom of the backlog as in "putting the story into the slush pile."
As a place where the results of time-boxed learning or exploratory activities are held until they can be examined in batches, such as during Backlog Refinement or the next Sprint Planning event.

I will certainly grant that these metaphors aren't agile formalisms or directly attributable to any particular statements by early agile practitioners. I am deliberately providing definitional metaphors rather than appeals to authority on the matter.
These contextual metaphors provide a way of visualizing the utility value of story spikes. Since visualizing the work is itself a valuable practice that often confers agility, using relevant metaphors to visualize the various use cases for story spikes may help in the same way.
Comment: I feel like this answer belongs on https://english.stackexchange.com/, lol. (that's intended as a compliment, if you were wondering). Thanks for the insight!
Comment: @BVernon Thank you. Yes; as a moderator, I was on the bubble about the question as etymology is often off-topic here, but allowed on English Language & Usage. However, I looked at some of their existing answers on the topic, and they were...um, less than illuminating for this context. Since it was scoped specifically to agile terminology, I thought the question fit better here even if a correct answer might not be strictly scoped to project management. At any rate, thank you for your kind comment and keen eye for topicality!

Why is it called a story spike?


ForEach ADO Enumerator

Question: I have an Execute SQL Task which runs a simple query
datatype filename varchar(255) filenumber int id uniqueidentifier
select i.filename , i.filenumber,s.id , 'Files loaded over days' as ErrorMessage from table I inner join tableB s on i.filenumber = s.filenumber where datediff(day,i.filedate,i.adddate)>=5
I have added the resultset as user:ObjServiceID
Now I have used a Foreach ADO Enumerator and in Ado Object Source variable called user::objServiceID
Variable mappings User:ID 0 User::Filenumber 1 User::Filename 2 User::Errormessage 3
and inside the ForEach Loop container I have another Execute Sql task that calls a Stored procedure Parameter Mappings User:: ID GUID 0 -1 User::Filename Varchar 1 -1 User :: Filenumber Numeric 2 -1 User::ErrorMessage Varchar 3 -1
The stored procedure Exec XYZ has variables @filename varchar (255), @filenumber int, @id uniqueidentifier, @Errormessage varchar(2000)
I am constantly getting an error that says "[Execute SQL Task] Error: Executing the query "exec XYZ" failed with the following error: "Procedure or function "XYZ" expects parameter '@ErrorMessage', which was not supplied.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."
Even if I try to remove the Errormessage from the parameter and variable mappings it still throws this error. Could someone help with this. Thanks in advance
Answer: The m in Error message needs to be upper case in your mapping. It says ErrorMessage was not supplied because you have it as Errormessage.

ForEach ADO Enumerator


Making sticthes in leather

Question: What method is the best to make stitches like the leather foot stool example? I am using UV texture for my chair.  Thank you for your reply.
Answer: Blender isn't too great for stitches in my experience since it lacks proper texturing tools like a world space based brush size. But I found 2 decent ways:

Make the stitches in 3D by modelling one simple stitch, adding an array and curve modifier combo, extract edge loops from your model, convert them to curves, and assign those curves as target for your array and curve modifiers. This will create believable stitches.
Paint the stitches in Texture Paint mode to affect diffuse and height map, you can use this images I made as a texture for your brush, mapping : 'view plane' and stroke method : 'line' with big spacing. But be careful as your brush size won't change on your screen when you zoom in and out so you have to manually adjust, unlike in Substance Painter.
Comment: Thank you very Much!

Making sticthes in leather


Does light or observation collapse wave functions?

Question: I hear that observation is what causes the wave function collapse, but that doesn't make sense considering that an eye or camera is just a physical system with no particularly special properties. In explanations it say that light causes the collapse if that's the case why do you need an observer? If you shined a light while not in the room of the double silt experiment would it still act as a particle?
Comment: possible duplicate of [What counts as "observation" in Schrödinger's Cat, and why are superpositions possible?](http://physics.stackexchange.com/q/63278/)
Comment: I've flagged what I think is a close duplicate of your question. See also [How isolated must a system be for it's wave function to be considered not collapsed?](http://physics.stackexchange.com/q/20964/) If these don't address your question maybe you could edit your question to indicate what specific points you're unsure about.
Answer: Physically having a human in the room is not necessary to spoil the interference. In the double slit experiment you get interference between particles passing through each hole. However this interference is spoiled if you put any sort of "indicator" on each hole so you can check which hole the particles are going through (for concreteness lets consider electrons).
Microscopically, this "indicator" can be two streams of very low energy photons that scatter off the electrons, one for each hole. Then to know which hole the electrons went through you could in principle check where a photon was scattered. It does not matter that there is an actual observer in the room. However, it does matter that in principle you could use the photons to measure where the electron is. Furthermore, to fully spoil the interference pattern, the photon must be produced often enough that each electron will interact with a photon.
That being said, if the light was on in a room you could still see interference since the probability of an electron scattering off of the photons in the room is low. This will occur occasionally and smear your interference pattern a bit, however you will still see interference.


A person who creates problems for himself

Question: What is the definition of a person who creates problems for himself?
I already tried slumpy trumpy trouble maker.
Comment: Can you provide more context or an example?
Answer: I would certainly not use "slumpy trumpy trouble maker" unless you're talking to a toddler.
You might say the person shot themselves in the foot:

inadvertently make a situation worse for oneself.

See also: What does it mean 'to shoot oneself in the foot'?
Answer: Other expressions that might apply are:
"to make a rod for your own back", and
"to be hoist by your own petard" (a primitive bomb)


Phonegap: How to use geolocation without GPS in android and enableHighAccuracy: true

Question: I'm using geolocation in my app in build.phonegap.com but I have a little problem (or question) about how to use it in android without GPS enabled.
Using this code in android it GPS is enabled in the device it works fine, but it the gps is disabled the code give an error (default error in my script)
watchID=navigator.geolocation.getCurrentPosition(handle_geolocation_query, handle_errors, {timeout: 600000, enableHighAccuracy: true});
}

function handle_errors(error)
{
    switch(error.code)
    {
        case error.PERMISSION_DENIED: window.localStorage.setItem("geo_aviso", "latitud", position.coords.latitude);
        break;

        case error.POSITION_UNAVAILABLE: window.localStorage.setItem("geo_aviso", "No podemos encontrar localizaión verifica que la tienes activada en tu dispositivo");
        break;

        case error.TIMEOUT: window.localStorage.setItem("geo_aviso", "Tiempo de espera agotado para encontrar tu localización vuelve a entrar en la app");
        break;

        default: window.localStorage.setItem("geo_aviso", "No podemos detectar tu localización, comprueba que tienes el GPS activado en tu dispositivo");
        break;
    }
}

function handle_geolocation_query(position){
    if (position.coords.latitude!=null)
    {
        some code here
    ;}

If I use the same code without enableHighAccuracy: true gives the geolocation in both situations (with and without gps enabled) but GPS never is used.
Is that the expected result or shall I have to use a diferent code?
Another issue is that when GPS is avaliable but the app can't get a location (if your are not in open air) no location is given (It must give the location based on the mobile network or wifi)
Tested in android: 4.3 (HTC One)
Answer: That definately seems like the expected result to me. What is happening is your device behind the scenes is smart enough to cycle through all the ways it can get its current location from most to least accurate.

GPS
wifi location(location of nearest access point)
cell tower location(known location of cell tower you are currently connected to)

If you disable gps location, the device will keep going down this list until it gets to a location method that works. You can most easily tell this by looking at the "accuracy" attribute return with the position object. In my experience an accuracy < 100 indicates gps location, < 1000 indicates wifi location, above that you are definately on cell tower based location. These are of course just rough guidlines, depending on line of sight to a satellite and availability of wifi/cell towers the the accuracy could differ a great deal. The point is disabling gps doesn't stop you from getting a location it just forces the phone to use less precise methods.


Should a question be flagged for having no research at all?

Question: For example: https://stackoverflow.com/questions/25728688, the OP didn't research by any possible means. Is there a flag for this case? Or does this question just deserve a downvote if I think it's of  low quality? (I guessed this by the number of the downvotes)
Comment: How would you expect the moderators to respond to a "no research" flag?
Comment: Downvote/comment if you wish. Could flag to be closed as "too broad". But I don't see any reason for a custom flag
Comment: @KugBuBu When you flag a post you're saying that you feel some action should be taken, but you don't have the ability to perform that action yourself.  For example, you might feel a post should be deleted, or closed, or migrated, but if you can't do those things, you'd flag for a moderator to do them.  If you're going to flag a post, you should generally have some idea of what you expect the moderator to do.  If you can't think of what they could possibly do to resolve the situation, then why are you bringing it to their attention?
Comment: Downvote, close vote if it's too broad, but **don't** flag. These kind of ill-researched posts should be handled by community. Flags are for situations which the community can't handle.
Comment: @Yannis I don't get what you mean.
Comment: @codeMagic I think my reason is that it's similar to fix my code question by the mean that the user not particularly chose to debug\research and do the whole effort for it? It's a bit hard for me to explain I think.
Comment: @Servy I think that closing the question won't help or is the most effective. Didn't thought of it.
Comment: With the extensive ability of the *community* to moderate the site, about the only thing you need to use a moderator flag for anymore is "delete this immediately".
Answer: Moderator flags are for situations that cannot be handled by the community.
The proper response for a poorly researched question is a downvote.
Answer: Not having done research is a reason to downvote, but it is not, by itself, a reason to flag, or to take any other moderation action.  Posts that are very poorly researched often do have other problems with them though.  By all means take the time to look at the post and see if it has any of those other problems, such as being unclear, too broad, etc.  If you notice other problems that do have a corresponding flag, then flag for those reasons.


Best alternative to WITH(NOLOCK)?

Question: I'm making a self project in C#.Net, by using a 3-tier app, I wan't to make my sql statements transactional, these statements are used in several stored procedures, I've been using the WITH(NOLOCK) approach in order to query those tables that have been used for inserts or updates during the transaction, and on the C# side I've been using TransactionScope, but I recently read that using WITH(NOLOCK) is not recommended because it can lead to phantom reads or using dirty and inconsistent data. My question is, in order to use data that has been inserted or updated during a transaction, when it comes to a select, What is the best approach in terms of transactional operations?, whether it is database side or business code side.
Comment: The best "alternative" is simply to remove it. Any data movement inside a transaction is still visible within that transaction.
Comment: I think it's better to ask this on DBA community if you want comprehensive answer. http://dba.stackexchange.com/
Comment: Consider using snapshot isolation if wait-free reads are critical to you; but it comes with its own bag of worms so be careful to research it first.
Answer: Have you considered snapshot isolation? It provides perfect read consistency and does not take locks on data at all.
SI is standard on many RDBMSes and default on. Not sure why SQL Server people are so hesitant to use it. The drawbacks are mild, yet you need to research them.
Comment: It will be nice if you can provide a couple of drawbacks, since you mention about it.
Answer: You simply don't need it. If you modify some data and later query it in the same transaction, you will get the modified data.
Your transaction will hold an exclusive lock on the modified data, so it can do anything with it - query, modify again etc.
If you specify WITH(NOLOCK), you allow your query to ignore exclusive locks from OTHER transactions. It will cause your queries to return incorrect data.
Answer: Maybe you don't know what you want.
The WITH(NOLOCK) returns dirty and inconsistent data.
If you want clean data, you must remove this clause, and wait eventual concurrent updates on the table you want to read.
Answer: Link: https://learn.microsoft.com/en-us/sql/connect/jdbc/understanding-isolation-levels?view=sql-server-ver15#remarks
The following table shows the concurrency side effects allowed by the different isolation levels.

Read from the above link and understand the meaning of each of the column headers.
Most database have the default setting as Read committed. So when you fire the query with or without NOLOCK, and assuming your database is in the default Read committed mode, you are faced with the problems of non-repeatable read and Phantoms.
When you use NOLOCK, you additionally also face dirty reads problem. This means that you are able to read the modifications made by transactions even before they are committed or rolled back.
There is also the problem of missing rows (for example assuming your select query has read past the updated row), and duplicate rows (for example assuming the row that has already been read has been updated to a value that isn't yet read by the select query). NOLOCK results in an allocation order scan rather than an index order scan which can cause the missing or duplicate rows problem.
You need to think pragmatically about how the above issues affect you and decide whether to use the NOLOCK hint.
Here is an example: https://dba.stackexchange.com/questions/306994/what-are-the-problems-with-using-nolock-given-an-approach-to-handle-the-short-co
Following answer gives an example about reading certain rows twice: https://stackoverflow.com/a/2268078/1779091 (answer is pasted below)

NOLOCK hint causes dirty read anomallies, and one such anomaly is a
duplicate read. Such reads are frequent if an update changes the
position of the row in the index scanned by the query:
say you have 2 rows in the table, with an ID key, rows with key values 1 and 2
one request (T1) runs UPDATE table SET key=3 WHERE key=1;
second request (T2) runs SELECT ... FROM table WITH(NOLOCK);
T1 locks the row with key value 1
T2 ignores the lock T1 has and reads the row with key value 1
T2 continue and reads row with key value 2
T1 update
the row, and the row is moved in the index int he new position for key
value 3
T2 continues to scan and reads the row with key value 3
So the
SELECT has read a row twice, once while it had the key value 1 and
once while it had a key value 3. This is just a trivial example of
what can happen. In reality more complicated queries can run complex
plans and use other indexes, all subject to such anomalies.
In short: NOLOCK hint is evil. If you want to avoid contention, use
snapshot isolation.

Best alternative to WITH(NOLOCK)?


Why conductors don't scatter light?

Question: Air molecules can be oscillated by E field and re-radiate EM waves in different directions. However, if light is shined to a conductor the E field oscillate the free charges but the effect is to reflect the light or dissipated the energy by electrical resistance. Why there is such a difference?
Answer: I'm guessing this is related to your earlier question, Will neutral particles be affected by EM waves?, and you're puzzled that Rayleigh scattering by air and reflection/refraction by solids and liquids seem so very different.
The answer is that in Rayleigh scattering each scattering object behaves as an independant scattering centre, so the scattering is incoherent. When light is reflected or refracted in a solid/liquid this is a collective phenomenon involving the collective electron density of many atoms and the scattering is coherent.
You do get coherent scattering in gases, which is why air will reflect and refract light just like a liquid or solid does. Rayleigh scattering is an additional (and small) incoherent scattering superimposed on the coherent scattering.
Comment: @KelvinS: It isn't just conductors that reflect light. Glass reflects light as well, though admittedly conductors reflect more strongly. Reflection and refraction happens because the solid (non-)conductor scatters light in a coherent manner so all the scattered rays interfere. You only get constructing interference at the reflection/refraction angles. In Rayleigh scattering the scattering is incoherent so no interference occurs and the scattering is just random.
Comment: my concern is that why air molecules scatter in all directions but conductors mainly reflects light and dissipate energy by resistance?
Answer: Since the comparison is to air molecules I assume this is a question regarding very small conductors. The premise of the question is incorrect. This can be seen qualitatively by observing that the reason Rayleigh scattering by a dielectric particles occurs is that they reduce the electric field impressed on the particle. For a perfect conductor, the electric field is reduced to zero, effectively giving an infinite dielectric constant, so Rayleigh scattering is maximized by the conductive nature of the particle. A more rigorous presentation can be seen in section 2.1 of the paper http://www.physics.princeton.edu/~mcdonald/examples/small_sphere.pdf
Answer: The solution for oscillating charges or plasmons has an evanescent field that exponential decays in the z direction (out into the "air").  This is currently being postulated as a way to subvert the diffraction limit. For more info regarding the lens : http://www.sciencemag.org/content/308/5721/534.

Why conductors don't scatter light?


Why the stores sell trees that look like bushes

Question: I just bought a Eureka lemon tree. It is in a one gallon container but it looks more like a bush than a tree. It is about three feet from the bottom of the pot to the top of the branches. Does this mean it will be a small tree like a bush and is it better to be a bush or a tree? Is the bush going to produce smaller lemons than a tree? If it is a tree at what length does it need to be cut at the trunk in order to produce more branches?
Answer: The size just means it is a young tree. Full sized trees are much more expensive to buy, because the nursery has to grow them for several more years till they reach full size, and transporting and planting a large tree isn't a simple task either. The roots also grow in proportion to what is above ground, so you have to transport a huge ball of soil, and dig a very big planting hole.
Big trees also need more substantial stakes to stop them blowing down until their roots get established, and in hot dry climates they may need lots of watering for up to a year after transplanting them.
According to one UK supplier, a fully grown Eureka lemon will be about 10 feet tall and 6 feet diameter. A US website said 20 feet tall. Your choice which to believe!
You can also grow these trees permanently in a container (but a bigger one than the one you bought it in!) in which case you would probably want to keep it pruned to something like its current size.
A young tree may not produce any fruit at all for the first years of its life. A small tree will produce fewer lemons, but not smaller ones.
If seems they don't need any special pruning. Just cut out any dead or weak-growing wood, and any branches which are rubbing against each other (because the damaged bark can allow pests and diseases to develop), and trim the tree to the shape you like. The best time for pruning is in spring when the tree is just starting to grow again after winter.
You can prune the lower branches as the tree gets taller if you like, but don't rush into doing any pruning till you have seen how it is going to develop. It will probably take another 10 or 20 years to get to its full size. The shock of being moved will slow down its growth in the first year, as well.


On multibit how do I update my sending address?

Question: I have bitcoin in my transactions but it does not appear in my wallet.
It says updates stopped
Answer: You can get the 'updates stopped' if MultiBit detects some other user or process has edited one of the MultiBit files.
If you close down MultiBit and restart it it reloads all files.
There is more help on if transactions don't appear in your wallet in the multibit.org help so also have a look through there.


Snapping window floating in QGIS 3.4.1?

Question: I tried to dock the snapping panel by double-clicking on top of the panel but it's still not docking with the main QGIS window.
Answer: Because you opened it via Project > Snapping options...
Close your floating window, right click on some empty toolbar area and under Toolbars activate Snapping Toolbar as shown below:

But note that the toolbar and the Snapping options partially show the same options, but the Snapping options (rsp. Project snapping settings) are well needed when turning to Advanced Configuration:

In this case you are able to set up snapping properties for each distinct layer:

Comment: I opened the snapping option through the project because through the toolbar it's not showing on screen although it's checked in.
Answer: To dock a floating toolbar
Click on the end of the toolbar (see the circled area in the image below) and drag it to any side of the QGIS window until it snaps into place.

That toolbar will re-appear in the same place the next time you turn it off and back on again.
This allows you to customize the QGIS interface to your personal taste. Personally I like having the Manage Layers and Datasource Manager toolbars on the left side of the screen next to the Layers and Browser panels.

Snapping window floating in QGIS 3.4.1?


Custom Taxonomy List, Selection floats to top

Question: I have a custom post type called Slide set up:
register_post_type('slide', [
    'labels' => [
        'name' => __('Slide'),
        'singular_name' => __('Slide'),
    ],
    'public' => true,
    'has_archive' => true,
    'capability_type' => 'post',
    'capabilities' => array(
        'create_posts' => false,
    ),
    'map_meta_cap' => true,
    'menu_icon' => 'dashicons-universal-access',
]);

I then have a custom taxonomy for it, called Group:
$groupLabels = [ ... ];
register_taxonomy('Groups', 'slide', ['hierarchical' => true, 'labels' => $groupLabels]);

This works fine - I can create Groups, nest them, and tag a Slide with them. The problem is when I go into the edit page for a Slide ( /wp-admin/post.php?post=202&action=edit ) and select some Groups then save it, the Groups I selected float to the top of the list, out of hierarchy order. The weird thing is if I go to the Quick Edit (while still on the list page) it displays correctly.
Does anyone have ANY idea what's going on? I don't even know where to start looking, and Googling for anything like this just brings back completely unrelated results because it's too specific.
Answer: After way too much Googling, here's a fix :)
add_filter('wp_terms_checklist_args', function ($args) {
    $args['checked_ontop'] = false;
    return $args;
});


Why my nexus 5 is not getting on air update for Android 4.4.2

Question: In India there are some Nexus 4 which got updates for Android 4.4.2 but my Nexus 5 is not even updated to 4.4.1, Who can let me know how this OTA works with Google?
Answer: The roll-out for all (or at least most) OTA updates is staged in case there is an issue which has not been noticed. The 4.4.2 update seems to be being rolled out quicker than the 4.4.1 update, but it won't be available to all devices at the same time. You should receive the update in a few days.
This post by an android engineer explains the process a bit better but i've extracted some of their post here:

Morrill mentioned how they "typically" begin with 1 percent of devices
  for the first day or two. This small batch is sent out and Google then
  watches for "return rates and resulting device checkins and error
  reports."
Assuming the initial 1 percent rollout goes according to plan, the
  process then expands. Again, the word typically was used. But in this
  case Morrill said the updates then go to 25 percent, 50 percent and
  100 percent "over the course of a week or two."
Comment: I think you intended for "this post" to be a link, but there isn't one. It would be useful for people who are interested in which devices get the update, especially given that the same post explains why mashing "check for updates" doesn't make any difference.
Comment: I've added the link to the original Reddit post.


What makes the neurons of the auditory nerve with such high-speed?

Question: What makes the neurons of the auditory nerve with such high-speed? So the most labile are the fibers of the auditory nerve, in which the frequency of the generation of PD reaches 1000 Hz, while for skeletal muscles, it corresponds to 200 pulp / s, for smooth - 10-20 imp / s.  Motor nervous ending can be transferred to the skeletal muscle and at all no more than 100-150 excitations in 1 s
Comment: By "high-speed", are you referring to propagation speed or frequency? It sounds like you are talking about frequency rather than speed.
Comment: It's a very good question, but there are grammar mistakes and lack of precision and context. Perhaps you can rewrite it for a general audience?
Comment: There seems to be a verb missing from the title and first sentence of this question (between "nerve" and "with"). Not being a neurophysiologist I can only fire a guess. But I may be wrong.
Answer: High Speed vs High Frequency
For starters, what you are describing is a high frequency signal, not necessarily a high speed signal.  High speed signals are caused by myelination (a sheath of fat deposits that encases neuron fibers), and by minimizing the number of actual dendrite/Axon junctions you need to pass through to get from point A to point B.  In this respect, the nerves responsible for muscle control tend to be very long and have similar myelination to the cells in your ear; so, muscle control neurons would if anything transfer a signal faster than the more densely packed neurons in your ear.
Now to Answer the actual question: Why the Higher Frequency?
No one nerve in your ear actually needs to transmit a signal at a higher frequency than those nerves used by muscles.   Instead you have a number of different nerves detecting for different audio frequencies, and your brain then receives a combination of signals that tell it that various Audio Frequencies are being detected 1.  Each of the hairs in your inner ear tapers from the base to the apex such that the apex begins being stimulated by low frequencies, but the base only begins being stimulated by higher frequencies 2.
Each auditory nerve fiber is actually a cluster of nerves that work together at different frequencies to create a more complex signal. This results in a number of parallel signals that is interpreted as a complex (high frequency) signal.
Here is a simple diagram showing how low frequency signals can merge to make a higher apparent frequency.
Answer: Some animals can respond to sound in the microsecond range. They think that it's by using big groups of neurons working at the same time. Indeed, 1 cubic millimetre can contain 50,000 neurons / many receptors.
ref:https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2006422

Echolocating bats are powerful models for investigating the underlying mechanisms of auditory temporal processing, as they show microsecond precision in discriminating the timing of acoustic events. However, the neural basis for microsecond auditory discrimination in bats has eluded researchers for decades. Combining extracellular recordings in the midbrain inferior colliculus (IC) and mathematical modeling, we show that microsecond precision in registering stimulus events emerges from synchronous neural firing, revealed through low-latency variability of stimulus-evoked extracellular field potentials (EFPs, 200–600 Hz). The temporal precision of the EFP increases with the number of neurons firing in synchrony. Moreover, there is a functional relationship between the temporal precision of the EFP and the spectrotemporal features of the echolocation calls. In addition, EFP can measure the time difference of simulated echolocation call–echo pairs with microsecond precision. We propose that synchronous firing of populations of neurons operates in diverse species to support temporal analysis for auditory localization and complex sound processing.

If you search for "auditory microsecond" that's the measure in which the science is studied, so you will find lots of results there.


Adjust Fixed width option in Text to Columns without a mouse?

Question: Is it possible to apply "Text to Columns" without a mouse (we can use only keyboard)?
If yes, then how can we CREATE/DELETE/MOVE a break line for Fixed width Original data type?
Answer: Any Microsoft program, including Excel, can be navigated with just the keyboard.  Start with the Alt key and then follow the highlighted letters on the Ribbon.  For example, Alt,A(Data),E(Text to Columns) will open the Text to Columns Wizard.  Then the down arrow will move you to the Fixed Width option.  You'll need @pnuts answer to address that option, there is no keyboard work-around for setting the widths manually.
Answer: There is a workaround by ensuring Row1 has the spacing desired, something like say XXXXX...  XX...XXX...XXX (here the dots represent spaces) should serve as the template for skipping Step 2 of 3. Hopefully there IS a better answer, but it is not a question I have ever had to address, so sorry no key combination for this from me.


Does anyone know how I can convert DNA code into FASTA for this TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC

Question: TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC this is the DNA code Sequence. I have tried converting each into the amino acid and ended up with this LKHWMNEKPCFATPQX but I was told that this isn't right.
Comment: So you googled what fasta format looks like for DNA, and you concluded from what you read that it meant to translate the DNA into protein?
Comment: FASTA is a sequence format, and it is used for any sequence, including DNA and protein sequence. Translating DNA to protein sequence does not require FASTA or any format, for that matter - the sequence itself is enough. Please clarify your question.
Answer: This is your nuc seq as a fasta:
>sequence_1
TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC

To translate it use an online tool (ie https://web.expasy.org/translate/) or do it in biopython:
from Bio import SeqIO
for record in SeqIO.parse("/path/seq1.fa", "fasta"):
    print ('nuc', record, sep='\n')
    print ('prot', record.translate(), sep='\n')

Which gives:
nuc
ID: sequence_1
Name: sequence_1
Description: sequence_1
Number of features: 0
Seq('TTGAAACACTGGATGAATGAAAAGCCCTGCTTTGCAACCCCTCAGC', SingleLetterAlphabet())
prot
ID: <unknown id>
Name: <unknown name>
Description: <unknown description>
Number of features: 0
Seq('LKHWMNEKPCFATPQ', ExtendedIUPACProtein())

Note, this defaults to the human codon table. Other codon tables are available with the parameter 'table'.


What happens in the case that the incident light on an atom has photons with insufficient energies to excite an electron?

Question: When an atom of an element is irradiated with a monochromatic light, what will happen in the case that the frequency of the light does not match the frequency needed for any of the several possible electronic transitions? Will the photon just pass through the atom? Or will it collide with the nucleus and get deflected or reflected?
The nucleus only occupies a tiny space as compared to the atomic volume and so will a whole collection of such atoms be transparent to the respective monochromatic light as most photons just pass through the empty space in the atom?
Comment: I'll comment on the part of the question about the size and empty space. The quantum world is different from classical. Atoms and other particles are not little balls. There is no such thing as a "direct hit". Size is not well defined there either. So the size of the nucleus and empty space are irrelevant. Even if the nucleus were the size of an atom, if a photon does not interact, it would just pass through regardless. No such thing there as "solid matter", but rather waves of probability of interactions.
Comment: @safesphere     I do have some very basic information about how the quantum world behaves and the fact that particles like the electron are defined by a superposition of wavefunctions and not by classical properties like position and momentum. However, in this analogy what would it actually mean for a photon to not "interact" with a particle, say an electron for example? What is an inherent property that a photon of particular wavelength has that allows it to "interact" with certain particles but not others? Thanks!
Comment: Two questions in your comment. (1) To not interact means the photon (or wave, if you prefer) will pass as if through the empty space. (2) What propertirs define photon interactions? Photons interact only with electrically charged particles (ignoring higher orders for now). Energy is important, but may vary in scattering. There also always is probability (even with the ideal parameters the photon sometimes may just pass through). I will leave the rest to the experts (like spin, etc.) to say if it matters or not.
Answer: first of all, you need to understand the use of frequency of light in abstracting elctrons from the metallic surfaces.we have a fix threshold frequency for a metallic surface, for which the incident light should have the frequency equal or greater than the threshold frequency.if any incident light have the same frequency as threshold frequency,then electrons will come out the attractive forces of electrons but never escape from the metal surface(this term is call work function of metal).elcetrons required a frequency above the threshold fruency because to overcome the attractive forces and remaining frquency will use to escape from metallic surfaces by gaining kinetic energy.
Comment: Apologies but I don't see how the OP refers implicitly or explicitly to metallic surfaces.


Is it a Shakespear's quote or does that quote come from Shakespeare?

Question: I was in the seminar the other day and the speaker quoted a line. I wanted to ask a question - so can you tell me which one of the above would have been appropriate ? Is there any difference ?
Answer: The following variations are all correct.  They all mean the same thing:

Is it a Shakespeare quote?  (Using his name as an attributive noun.)
Is it a Shakespearean quote?  (This is the adjective form.)
Does that quote come from Shakespeare?

If you had a few quotes to choose from (such as one from the King James Bible, one from Milton, and one from Shakespeare), it would be appropriate to ask "Is it Shakespeare's quote?"  In this usage, the possessive is used to indicate the particular quote.  This makes the indefinite article "a" redundant.  It is incorrect to ask "Is it a Shakespeare's quote?"
By the way, Shakspere could spell his own name... several different ways.
Comment: "Shakespearean" means more like "in the style of Shakespeare", which would be strange to say in my opinion if you are directly quoting Shakespeare.
Answer: Though I cannot say that it is grammatically incorrect, I don't think I've heard of English Speakers using possessive before the word "quote."  You could say it's a "quote from Shakespeare", or it's a "Shakespeare quote".  I think the difference is that when people talk of Shakespeare in this sort of context, they mean "Shakespeare's collective works", and not the man himself.
You could even possibly say "quote by Shakespeare", although then in this phrase, Shakespeare must be the man who created the quote, and not his collective works.


Android: Saving a Bitmap Graph to the Image Gallery Using OnClick Listener

Question: I am a high school student looking for help saving a bitmap image creating using a modified version of the "Sensor Graph" tutorial available here: http://code.google.com/p/amarino/downloads/detail?name=SensorGraph_02.zip&can=2&q=
This creates an oscilloscope graph based on external sensor activity, and I need to save the image (currently a bitmap) as a JPEG to the Android phone Image Gallery. I would like to do so using a button.
I have enabled OnClickListener in my SensorGraph class, an extension of the Activity class; however, the actual bitmap is created in the View class.
I would appreciate if someone could provide some code to help me save the bitmap.
I can also use a general "OnClick" command in the main.xml file; however, I believe that the method specified there would just refer back to the Activity class, so I still do not know how to save a bitmap created in the View class using a method in the Activity class.
Thank you very much.
Answer: Please try following code,
<code>ImageView v1 = (ImageView)findViewById(R.id.mImage);
v1.setDrawingCacheEnabled(true);
Bitmap bm = v1.getDrawingCache();
</code>


How to download records and save in Excel Format through Visualforce page

Question: My Scenario is I have a search page.when I click on search then I got 500 records in 50 pages( Here Pagination is using…Means 10 records per each page).
 what I am doing here is when click on Download button then only that 10 records are getting saved in Excel.But I want total 500 records in Excel.
 Please guide me how to achieve this..
Comment: Without pagination how many records will available in a page?
Comment: I created two VF pages and one controller..everything working fine. I need all records need to get saved in Excel.Only first page records are saving in Excel.
Answer: You can use readOnly annotation in controller and @readOnly annotation in your controller/extn to process more than 1000 records in your list page.
Here is a sample code you can use,
Step1: Create a controller/extn to get the records with your personal limit and make it readOnly to expand your SOQL limits.
public class contactslistExtn {
    public static List<Contact> mycontacts = null;
    public contactslistExtn(ApexPages.StandardSetController controller) {
    }

    @readOnly
    @RemoteAction
    public static List<Contact> getMycontacts(){
        if(mycontacts == null){
            mycontacts = [select id, name, mailingCity, phone from contact limit 1000];
        }
        return mycontacts;
    }
}

Step2: Create a new VF page just to create the excel:
<apex:page standardController="contact" extensions="contactslistExtn" recordSetVar="contacts" contentType="application/vnd.ms-excel#mycontacts.xls" readOnly="true">
<apex:pageBlock >
        <apex:pageBlockTable value="{!myContacts}" var="contact">
            <apex:column value="{!contact.Name}"/>
            <apex:column value="{!contact.MailingCity}"/>
            <apex:column value="{!contact.Phone}"/>
        </apex:pageBlockTable>
</apex:pageBlock>
</apex:page>

Step3:
Create a list button with Javascript (window.open("/apex/contactlists", "_blank");) or a salesforce to open the create VF page (contactlists).
Step4:
add it to your list page "search layouts".
Answer: You have to create VF page without paging.
But I don't think that it is perfect solution.
Standard salesforce generated excele file still consist some html tags.
So In my opinion best solution will be generate CSV file.
Such file can be still useful as data backup and if you open it in for example Calc you can work with it like with spreadsheet.


bash: disable new process PID message

Question: It may look like this: [2] 2847. I guess the first digit is just an enumeration of processes created from the shell. The second is the PID. Anyway, I never care about that information so it is just annoying to see. Is there a way to turn it off? (I found that set +bm in .bashrc disabled the process termination message.)
Comment: AFAIK no there isn't.
Comment: Alright, good to know so I don't waste time looking.
Answer: The first number is the job index; job-related commands (jobs, fg, etc.) use them. So for example, if you get the output [2] 2847, you could run fg 2 to foreground that job.
As far as I could tell from skimming the source, there isn't a way to disable the message. The one check it does do is to ensure the shell is interactive, so if you run the command in a non-interactive shell you won't get that output. For example, you could run it in a subshell:
$ (your_command &)

That's equivalent to running the command in an entirely different shell though, so it might have other undesired side-effects
If you're willing to patch bash, you can just get rid of that particular output. In bash 4.2 it's in jobs.c on line 1428:
fprintf (stderr, "[%d] %ld\n", job + 1, (long)pid);

It gets called in other circumstances; if you just want it gone for this particular case, you can comment out execute_cmd.c, line 762:
DESCRIBE_PID (last_made_pid);

Comment: Hm, this would be one way: `alias skype="(skype &)"` - it works, and you don't have to type the extra stuff - but 1) you'd like a general solution, as you never know what tools you'll use, and 2) It'll break those tools for any other usage, say you'd like to add an option flag, so patching is much better. I'll get to it :)

bash: disable new process PID message


What is the distance between Minas Tirith and Minas Morgul?

Question: Does anyone know how far these cities are? I've looked at the maps, but also read the books. It seems like a far and wide world, but on the map it looks like a day trip.
Comment: https://i.stack.imgur.com/WTMxf.png - 36.25 miles
Comment: The map in Return of the King has a mile scale on it.  The design of that map makes it hard to judge an exact number, but it isn't an especially large number.  My guess is something like 40-50 miles.
Answer: As highlighted by @Valorum in the comments:
This annotated map of Middle-earth by Tolkien gives us an insight into distances 1
note, a small addendum will be made to the below to fix the starting point from Osgiliath to Minas Tirith, we know this is around a days March, and ~ 12 miles.
Which suggests it was around 40 miles (~64 km). Thanks to Valorum's helpful annotation, we can see that this is about 36 miles (~58 km), (click all images to embiggen):

The Tale of Years in Appendix B and some of the Return of the King puts it to around a 3/4 day March from Minas Tirith, possibly quicker if it's a small party instead of the Host of the West or a healthy group rather than Frodo and Sam

9 Gandalf reaches Minas Tirith. Faramir leaves Henneth Annûn. Aragorn sets out from Erech and comes to Calembel. At dusk Frodo reaches the Morgul-road. Théoden comes to Dunharrow. Darkness begins to flow out of Mordor.
  10 The Dawnless Day. The Muster of Rohan: the Rohirrim ride from Harrowdale. Faramir rescued by Gandalf outside the gates of the City. Aragorn crosses Ringló. An army from the Morannon takes Cair Andros and passes into Anórien. Frodo passes the Cross-roads, and sees the Morgul-host set forth.
  11 Gollum visits Shelob, but seeing Frodo asleep nearly repents. Denethor sends Faramir to Osgiliath. Aragorn reaches Linhir and crosses into Lebennin. Eastern Rohan is invaded from the north. First assault on Lórien.
  12 Gollum leads Frodo into Shelob's lair. Faramir retreats to the Causeway Forts. Théoden camps under Minrimmon. Aragorn drives the enemy towards Pelargir. The Ents defeat the invaders of Rohan.

The vanguard passed on through the ruins of Old Gondor, and over the wide River, and on up the long straight road that in the high days had been made to run from the fair Tower of the Sun to the tall Tower of the Moon, which now was Minas Morgul in its accursed vale. Five miles beyond Osgiliath they halted, ending their first day's march.
  The Return of the King - Book 5, Chapter 10: The Black Gate Opens

1 This was found annotated in one of Pauline Baynes' copies of the LotR annotated by Tolkien himself and Baynes.
Comment: @Sekhemty good spot, I thought the North-South road was the river, will fix when I can.
Comment: I'll try to remember to add in some better details!
Comment: 40km = 24.85 miles. 36 miles = 57.94km. It can be 40km or it can be 36 miles but it cannae be both.
Comment: @TheDarkLord I was writing it up on mobile trying to remember and it all went wonky in my head, fixed now
Comment: In the portion of the map where you superimposed the mile scale, it seems that point 0 is starting from Osgiliath, not from Minas Tirith, at least judging by the position of the River Anduin. For what I can tell, Minas Tirith lies farther to the west, very close to the depiction of Mt. Mindolluin. But it is very hard to give a precise evaluation, given the small proportions of that map.
Answer: The order of magnitude is about 50 miles, or 80 km.
The Pauline Baynes' annotated map, as linked by Edlothiad, was based on one of the maps included in the novels, and its printed form was not meant to be extremely large; because of this, it is depicted in a somewhat small scale, where its details are large and out-of-scale, meant to be easily visible and identifiable1.
Also, the purpose of the map was not only strictly geographical but also had a somewhat artistic role, the emphasis is put more in quality than quantity, and it is meant to resemble more cartography from the Middle Ages rather than modern one, as in Tolkien's times.
Despite of this, it is still an official map from the author himself and should be taken into account.
Given this premise, a rough estimation can be done, and by measuring we can find that the two cities are depicted as being about 60 miles apart:

On another source, Karen Wynn Fonstad's Atlas of Middle-earth, in itself an unofficial but generally well respected source, the two cities are distant more or less 45 miles from each other.
The maps in the Atlas are depicted on a larger scale than the official ones like those on the various novels, and because of this distances could be measured a bit easier.
Also, they are drawn in a more modern way, putting more attention in the actual geographical and geological features rather than a pretty artistic depiction of all the objects (cities are shown as simple dots).
But it is not an official source, and the depiction is based on Fonstad's reasonings and speculations, that even if often reasonable and convincing,  are not from Tolkien himself.
Anyway, the map of Mordor and its surroundings clearly shows the relative position of the two cities:

A detail of the area discussed here, with the mile scale put in place:

The distances here are a bit different from the official map, but they are more or less in the same order of magnitude: the official, less detailed, map gives about 60 miles, while the unofficial, but more detailed one, shows about 45 miles. These values are a bit different, but if we don't need an exact figure and we can content about an estimation, we can approximate by saying that they are more or less 50 miles, or 80 km, apart.

1. In example, Minas Tirith and Minas Morgul are shown as "cones" with a respective width and height of about 5 and 10 miles (clearly not the real size of these cities).
Answer: RotK pp. 747

....he broke off and lifted his eyes above the river, and it seemed to him that all he could see was a vast and threatening shadow. Perhaps it was mountains looming on the verge of sight, their jagged edges softened by wellnigh twenty leagues of misty air....

This passage is from Pippin's perspective as he and Beregond gaze out from the walls of Minas Tirith. It follows Beregond explaining the history of Osgiliath, so Pippin's gaze rising directly up would be to Minas Morgul, which is directly east of Minas Tirith. 20 leagues would be about 70 miles. Author says "wellnigh twenty leagues" and 15 leagues would be about 50 miles. So somewhere in between there. This is in contrast to other sources that put it between 30-40 miles, but I didn't see anyone else sharing this excerpt and thought it was worth consideration, being Tolkien's own writing direct from source.


How to calculate service ceiling and absolute ceiling in PA-44 Seminole?

Question: I am hard to understand to calculate service ceiling and absolute ceiling in PA-44 Seminole. Is there anyone know how to calculate it in the condition(T/O weight: 3599.24 L/D weight: 3354.44 PA:2329 Temp:20)
Answer: You can use the given chart to define (single engine) ceilings. There should be separate graph for both engines running case.
Note: it is important to understand that the definition absolute ceiling is absolute: zero climb rate while service ceiling is defined by local regulations.
In Europe, in commercial operations for class B aircraft (which Seminole is) service ceiling is the altitude where both engines running aircraft is able to climb at 300 ft/min at present gross weight and local OAT. A single engine service ceiling is defined as "positive gradient" so it is the first usable altitude below single engine absolute ceiling.
To define required altitude enter the graph from the right from the desired vertical speed, go upwards until you meet your current (or estimated) gross weight. From there draw a horizontal line all the way across the left side of the graph. The point where to local OAT (at an altitude) and your horizontal lines cross is the ceiling according to the selected climb requirement.
When interpolating between the altitude lines make sure to go perpendicular between altitude lines - not up and down along the grid.
Answer: With the chart you uploaded you don't calculate the ceiling, but the climb rate when you have only one engine operating. The TO weight and LD weight don't matter, what you need is the GW (which should lie somewhere between the TO weight and the LD weight).
I have added red lines to the chart to show you how to use it:

Select your OAT (20°C in your case)
Move up until you meet your PA (2329 in your case)
Move right until you meet your weight (let's say 3599 at take off)
Move down and you get your climb rate (in this case 120ft/min)*

*At your LD weight it is 190ft/min
NOTE: at the bottom of the chart you see dashed lines with arrows. Those are used to understand the order in which you have to read the chart.
Comment: Thank you so much!
Answer: Service ceiling I believe is the altitude at which an aircraft will no longer climb at a rate of 100 ft/minute.  It should be published in the POH for the plane.
For example, in a 1977 Cessna 150

SERVICE CEILING .....  14, 000 FT

That is a single engine, 2 seat propeller plane, with no turbocharging/turbonormalizing.
The Seminole POH should have a similar number.  Absolute ceiling can be higher but it will take a while to get higher. Use of O2 is required above certain altitutes, and after certain time periods above a lower altitude as well.  If one departed a hot California airport at 45C (110F, definitely possible out in the desert areas), say Rosamond Skypark (L00) at 2415ft, then 14000-2400 = 11,600 feet x 2C/1000 ft = 23.2C, and 45C - 23.2C = 21.8C!
Will feel nice & cool while airborne, but really hot when that door is opened.
We were flying the US southwest a few years ago, July 4th weekend. Flying southeast away from Albquerque, New Mexico, to Carlsbad, Arizona, we couldn't climb above 9,000 ft, my 180 HP normally aspirated engine just couldn't make any more power to get higher. So the rated Service Ceiling for my plane,

SERVICE CEILING ------------ 14,600 FT

made no difference. 107F on the ground.  Hot!
Comment: Thank you so much!
Comment: to acheive a density altitude of 14,600 at a pressure altitude of 9000 you would need an OAT of 50c(122f); the ground in Carlsbad is about 3200 which implies the ground air temp would be about 61.6c(143f) (9000-3200=5800, 5.8*2c=11.6c)
Allowing for a rather low(storm low) altimeter setting 29.00 this is a pressure altitude of 9862ft and would need an OAT of 39.5c for a density alt. of 14600, and an implied surface temp of 51c(124f). In Pheonix (yes slightly different, just data I have), the average low altimeter setting is 29.6 and the average high in summer 30.0. (add 0.6 to winter highs)


Why have heater blocks on hotends?

Question: I understand that heater blocks act as kind of "low-pass-filter" on the temperature change of the hotend, but why do we need that?
Wouldn't it be better to have as little metal as possible in order to be able to control temperature changes quickly and precisely (using PID, PWM plus maybe some predictions based on printed G-code)?
Comment: [Deltaprintr](https://reprap.org/forum/read.php?1,641939) has a mini hotend that doesn't really have a heater block.
Answer: Let's look at the elements and what they do:
The Heater Cartridge (blue) is the device that converts electric to thermal energy to melt the plastic. 30 and 40 W are common.
The Thermosensor (red) is there to give feedback to the mainboard.
The Filament Path (gold) in this area is made up of the nozzle and the heatbreak, it contains the meltzone.
The Heater Block (transparent green) is the mounting for all parts. It also acts as the medium to transfer the thermal energy from the Heater Cartidge to the Thermo Sensor and the Filament Path. It also acts as a dampener for the control circuit.
Now, let's put things together and omit the wires and cold end (and internal geometry of the filament path, cause I am lazy):

Now, the construction gives us several reasons for the shape of the heater block:

Ease of construction. Taking a simple block and adding a couple of holes and one cut allows very fast production.
Maximum contact surface. To get the maximum contact surface to the heater cartrige, the heater block has to make contact along its whole length, dictating a minimum size in 2 direction. The same is true for the thermosensor.
The heater block transmits temperature pretty much radially from the heater cartridge. Because it is metal, the gradient between areas is very low, but it is measureable. These would be the thermal equivalent lines on heating up:

You may easily notice that the temperature lines appear more straight as they come closer to the filament path and thermosensor. This helps to give the filament in the heatbreak and nozzle more even heating and better printing.
The mockup I made has a deliberate flaw though: a change in temperature first affects the filament and then shows up on the sensor, making the temperature in the filament path wobble to the extreme. The Heater Block acts pretty much as a transmitter just as much as a time dilation between the heating command and the pickup.
Because this arrangement is not very good, let's swap sensor and filament path around and look at the same lines.

Now we have a much shorter feedback loop, allowing our printer to react quicker to temperature changes and the filament path also gets heated more evenly. The temperature inside the filament path does change less around the target temperature. The whole block now acts mostly as a distribution medium but also as a storage for heat energy:
Up to this point, we did not take into account a very simple fact: the hotend drains thermal energy via two areas:

The outer surface of the heater block emits heat to the air.
Filament gets molten and extruded.

Factor 1 is simple and here a bigger heater block actually is positive: The thermal 'storage' capacity is dependant on the volume, so goes with $xyz \approx a^3$. The surface to emit heat from goes with $2\times(xy+xz+yz)\approx 6\times a^2$. Plotting a graph of that shows us the square-cube law: the capacity increase for one unit does increase the surface just by a fraction of that, so the storage gets better the larger the heater block is.
Factor 2 is why we need to have a storage of thermal energy in the first place: the flow of filament is not exactly the same all the time. Of course, we have moments of even flow, but we also have moments of low or no flow when the printer moves between parts of the print. This alteration of the drain of thermal energy from the heater block means that if we would go down to a bare minimum size, we'd heat up the block fast whenever we are on a move action and cool as the extrusion starts till equilibrium is achieved again. The more thermal capacity is there to store energy, the less the lack of extrusion will immediately affect the print and the more even the temperature will be in the filament path.
Fast printing?!
How is faster printing achieved with a special hotend? Well, 4 factors are used in hotends meant for very fast or very hot printing:

Longer, more powerful heater cartridge.
Longer filament path.
Extra large Heater Block to even out the temperature changes under extrusion more.
Insulating the Heater Block to the air.

One of the prime examples would be an e3D-Volcano.
Comment: @VincentAlex no. Oozing is a result of bad installation
Comment: These pictures are fantastic.  I which I could vote more than once.
Comment: @user77232 all the mentioned parts, yes
Comment: Bigger block also means more oozing.
Answer: I think the idea is to not change the temperature fast. You want it to maintain a certain temperature so you have consistent flow. The extra mass at the hot end provides the mass which is needed to maintain the heat. If you don't maintain the heat while you print, you'll have inconsistent filament flow, which will screw up your print.
Comment: @user1282931 - If you want to "extrude fast" you need to keep heat in the hot end. You can't do that unless you have mass. Without the mass, the faster you extrude, the faster you're going to cool the hot end and the funkier the extrusion is going to be.
Comment: It doesn't seem I'm going to convince you that's why there's mass in the hot end. You have mass to keep the temperature constant. You DON'T WANT it to be changing temps fast ... you want it to be constant. The only reason to change temps is when you change filaments (ie: say from PLA to PETG or whatever). Running the heater cartridge all the time will be hot spots. The closer to the cartridge, the hotter it'll be. The mass in the hot end also helps to distribute the heat so hot spots won't happen.
Comment: But if we want to extrude fast, we have to heat the filament faster. One way to do that is creating longer heat zones (volcano), but that leads to more oozing as well as increased friction (larger contact area). It seems a better approach would be to pump in more heat - but then we need to be able to stop quickly if extrusion stops or slows down
Comment: It seems all the heat that exits the hotend needs to be provided by the cartridge anyway, whether there is a block or not. Can't I compensate for that by keeping the heater cartridge on and having the nozzle always a bit over the target temperature?
Comment: We don't really care about the temperature of the heater block.  We care about the temperature of the molten plastic.  We want the plastic temperature to be constant, which is difficult under varying extrusion rates.  We aren't measuring temperature, and we can't change the temperature of the heater block fast enough to use feed-forward compensation.  We can't change the heater block temperature as fast as we change the extrusion rate.  Instead, we compromise and try to limit the thermal resistance between the thermistor and the plastic.
Answer: Heater blocks are used on hot ends because they are the current engineering compromise between the design factors of cost, reliability, lifetime, maintenance, and performance.
Ideally, there would be no heater block, the heater would have infinite wattage, the nozzle would heat and cool instantly while transferring heat to the filament, and the temperature of the molten plastic would be measured instantly.
But as this is engineering instead of magic, none of these conditions is the ideal.  The engineering problem is to find the right compromise.
Each of these can be treated separately.  How do we measure the temperature of the plastic?  Assume we have a tiny thermocouple in the plastic flow.  Why thermocouple?  Because it is smaller, less prone to manufacturing tolerance, and is good for higher temperatures.
Imagine a heater where the heater wire forms the threads into which the nozzle screws and also where the nozzle has thinner walls to reduce the nozzle's thermal mass.  Further, the nozzle is made of diamond which has almost ten times the thermal conductivity of brass.  Yes, machining diamond is not easy, and the supply of large enough diamonds is limited, but we're trying not to compromise yet.
In this scheme, there is no heater block.  We instantly know the temperature of the plastic, and we can dump large amounts of heat into the system to get a high enough temperature.  We still must hold the nozzle in place and connect it with the filament source (typically the job of the "heat break"), so let's make that of thermally insulating ceramic so it stays out of the heat transfer process.
With this, we have a hot-end where we would have great control.  We are directly measuring the parameter we care about -- the temperature of the plastic.  We can deliver heat rapidly.  When the extrusion rate increases, the temperature drops a little and we dump in more heat.  The thermocouple is fragile (don't try a cold-pull), and is subject to wear.  The nozzle is very expensive and difficult to make.
Ok, move the thermocouple to the outside of the nozzle's tip.  Now we have a heater intimately wrapped with the threads of the nozzle.  That is probably hard to make, so let's use a conventional heater cartridge that is very close to the nozzle threads.  Let's put in as many heaters as we can pack together near the threads.  If we angle the heaters they won't hit each other, so suppose we can put in four heaters spaced around the nozzle.  More heat, less distance from the heat to the nozzle.  Make this new heat block of silver, just like the nozzle.  Silver has 80% higher thermal conductivity than aluminum.  (Or we could use diamond, but really, who has diamonds that big?)
I was assuming a thermocouple to measure the nozzle temperature, and it is small enough that it could nestle into a small home in the nozzle.  We could use a thermister pressed into a hole in the nozzle, but experience has shown that thermisters are fragile.  We have found that the tiny glass beads are prone to either breaking of the glass, separating from the thin leads.  The electronics to measure temperature with a thermistor is simpler and less expensive than a thermocouple and seems to have good enough resolution, accuracy, and temperature range.  If we follow that experience, we will package the thermistor in a cartridge housing that is easier and more reliably placed and protects the thermistor from damage.  But the cartridge is too large to connect directly with the nozzle, so we'll put it in the same block with the heaters.  After all, they are silver and conduct heat very well.
This may be a better hot-end than the conventional system.  It heats faster and more accurately measures the temperature of the plastic.  But there are problems. Silver is heavier, and four heaters and their wiring have more mass than one.  And, the holes for the heater cartridges are each in a different plane, so it is more expensive to machine.  And the price for the silver may be a factor.  Silver costs (today) \$215/lb, where aluminum is $0.80/lb.
In this answer, I have tried to show how heater blocks are useful for coupling the heat from the heaters to the nozzle and to show that there are alternatives with perhaps superior performance but problems with reliability or cost.
Edit:  In a comment, the OP asks why we do not machine away extra material that is not required to couple heat to the nozzle, and correctly raised the issue of cost.  There may also be a performance issue.
The conventional heater is only on one side of the nozzle.  When the heater is cooled by the filament, it draws heat from all sides.  The thermal mass on the non-heated side helps with stability by providing a source of heat from which the nozzle can draw.
On the heater side, a factor to consider is the coupling of heat from the heater cartridge to the heater block.  Removing additional material should be evaluated to assure that it does not increase the thermal resistance from the heater to the rest of the block and the thermistor.  This is important to help with thermal stability, and also to assure that the heaters do not overheat themselves.
For thermal conductivity values, I used this reference.
For metals pricing, I used Google to find spot metal prices on 6/3/2019.
Comment: This is a great answer, thank you! It does suggest though that less mass in the block is in any case desirable. One question remains then: why not machining away any material from the block that isn't necessary to directly connect nozzle, heater cartridge and termistor? Is it simply the added machining cost of cutting away corners/drilling holes that is preventive or is there some other reason?

Why have heater blocks on hotends?


Visual Workflow - Create multiple records based on dynamic choices

Question: I have two objects that are related via Master Detail through a junction object. Lets call it ObjectA, ObjectB, JunctionObjectC.
I have flow that creates Object A and stores the new record ID. Later in the flow I have a Dynamic Choice List of ObjectB records. I am showing the name of the record as the label and the record id as the value.
I want to create a new junction record associated to the newly stored ObjectA record and every ObjectB record that was chosen in the Dynamic Choice List.
I thought I could achieve this by using the Dynamic Choice list as the value for the ObjectB Value via Record Create.
Can Record Create be used to create multiple records? Any other thoughts would be appreciated.
I suspect the answer is no - any workarounds?

I found this doc...
http://blogs.developerforce.com/developer-relations/2012/09/visual-workflow-freedom-of-choice.html
From what I understand - you cannot dynamically create records based on a multi select dynamic choice list.
I have to place a limit on the number of record creates simply because I cannot dynamically create variables from alist of multi select dynamic choices.
All the same - How do I assign dymnamic multiselect checkboxes to vairables?
Answer: http://blogs.developerforce.com/developer-relations/2012/09/visual-workflow-freedom-of-choice.html
Feedback posted on the discussion of this post. "Collection Management in Flow" is on the road map and is top priority. From the discussion it sounds like Collection Management will better incorporate Dynamic Choices in Flow.
Currently the only way to accomplish this is via a Apex Plugin.
Comment: If this answers your question, please mark it, so other users can see it.
Comment: Here is good example of the Process.Plugin Interface (I got this from SFDC support) http://blogs.developerforce.com/developer-relations/2012/03/visual-workflow-converting-leads-with-an-apex-plugin.html
Answer: I struggled with this for a while.  I really needed a way to have Flow walk my users through a wizard that would collect the necessary data to automatically create a contract.  The issue is that I wanted to use the Dynamic Choice to load the product list as multi select checkboxes.  The flow would then create the contract, and take the multiselect checkboxes and add detail records to a junction object (junction between Products and Contracts).  Flow cannot do this, so I have flow do an Assignment step to store the multiselect fields in a variable.  It is a bunch of Ids separated by semicolons.  This is saved in a long text field on the contract that doesnt appear on the layout.  I then wrote an after insert Apex Trigger for the Contract object that takes the text field, parses it for Ids that are stored in a list, then are inserted as detail records.  Voila!  Creating ObjectA in Flow (along with the necessary info for the Trigger to work) and a Trigger to create the child ObjectBs!
<code>trigger AddProductstoSOW on PS_Contract__c (after insert) {
try{
for(PS_Contract__c c : Trigger.new){
    List<String> strProductIds = c.Initial_Services_Selected__c.split('; ', 1000);
    System.debug(strProductIds);
    List<SOW_Task__c> tasks = new List<SOW_Task__c>();
        for(String i : strProductIds){
        SOW_Task__c s = new SOW_Task__c();
        s.PS_ServiceNo__c = i;
        s.PS_Contract__c = c.Id;
        tasks.add(s);
        }
     insert tasks;
    }
}
catch(DmlException e) {
System.debug('An unexpected error has occurred: ' + e.getMessage());
}
    }
</code>
Answer: In the Winter '15 release of Salesforce, they are introducing new collection support in Visual Workflow (aka Flow).
http://docs.releasenotes.salesforce.com/he-il/winter15/release-notes/rn_forcecom_process_collvar.htm

Store multiple values together—so that you can operate on them—by using the new collection variable flow resource. Collection variables can store both manually entered values and values from flow resources, such as email addresses entered in a flow's screen. Using collection variables can help you conserve limits by not querying the Salesforce database for that information.
Previously, you couldn't store manually entered values or values from another flow resource. Both sObject variables and sObject collection variables can store multiple values, but they must be field values.
Create a collection variable from the Resources tab in the Cloud Flow Designer by double-clicking Collection Variable.
Unlike with variables, sObject variables, and sObject collection variables, you can't use Record Lookup or Fast Lookup elements to populate a collection variable. To populate a collection variable, add values whose data type matches the collection variable by using an Assignment. In other words, don't try to add a variable of type Text to a collection variable of type Number.
Answer: This can (now?) be done totally in Flow. The trick is, you'll need to store all the objects in the picklist (your object b) in an sObject collection. So, before or after your dynamic choice is made, you'll need to have a step to perform a quick lookup and store the same results in the sObject Collection, let's call this collection "sOC". Now that you have all of the possible choices one could pick in the sOC, after the dynamic choices are made, you need to run a loop to match the choices made to the sOC, using the sOC as the loop controller.
Here comes the cool part. In your loop, your first step will be to have a decision step to compare the results from the dynamic choice step to the object you've created in the loop step (I would have called it sOCObjectContainer). Don't forget, you need to use the sOCObjectContainer.Id as the value to compare to the values of the dynamic choice variable. Once you get a positive match, leading into the further steps in the the loop, you need to assign the values of the sOCObjectContainer into a new sObject collection. Something like "sOCObjectsToSave". You can also assign values to another variable for a confimation page, which you can show the user before the final save of sOCObjectsToSave is made (and after your loop is finished). Also don't forget, the other side of the decision to match the dynamic choices (No Matched decision path) has to go back to the loop to have it continue on no match.
I hope that makes sense and helps.
Scott


How can I create this transparent embossed text effect in Adobe Photoshop?

Question: I saw this on social media and was wondering if someone could help me recreate it?
Answer: It won't work with the emboss because it overshadow's (haha) the stroke.
I think they used two inner shadows (one white on lighten, one black on multiply) for the relief effect, a regular white stroke and drop shadow. You'll have to play around abit with the adjustments. Also it seems like they upped the saturation of the text (see at the H) with an Adjustment Layer > Hue/Saturation (use the mask to select only the text)
Since the background picture is a bit too detailed it doesn't look the same. I'm also not sure if my method IS the same as used in your image but at least it comes close.
Answer: 1, prepare background and text layer, use appropriate text font and size.

2, in layers panel, lower text layer's FILL to 0.
3, in layers panel, double click text layer's blank area(or right click->blending options), create some shadow.

4, now do some emboss effect:

5, now white edge:

6, All effects are done. Now fine tune all done effects in step 3~5 until satisfaction.
Answer: Follow these steps:

Create a new file and adjust the file size as per your requirement.

Now, create a new layer for background. Then, select the image tool for taking image or paint bucket tool for fill the background.

Select the background layer and add gradient with Layer > Layer Styles > Gradient Overlay and reduce the opacity 8%.

Now, add text through type tool and make it transparent.

Select the text layer and click "Layer" >Layer Style> Stroke. Similarly, add gradient and shadow in the text. Now it's done…


Why can't Docker use aufs or overlay2 on Raspberry Pi

Question: In reference to this question, the only answer states you can't use aufs or overlay2 with berryboot on raspberry pi.  I want to know why I can't use at least overlay2?
Answer: The various storage drivers in docker are built on various Linux filesystems, like Overlay and AUFS. Each of these filesystems have their own requirements, and in particular, they depend on a specific backing filesystem on the host. For overlay2, that backing filesystem must be ext4 or xfs (with ftype=1). To see more on the various storage drivers and their requirements, see Docker's documentation.