Multiple Database in One Server Problems

Question: Our company has 5 different databases. None of the multiple databases relate or utilize cross database joins.
We have ample resourcing and budget.
Our company is debating between:

5 databases on 1 server instance,
or 5 databases on 5 different servers.

Question: What are some specific problems, obstacle issues which can occur, if we place everything on 1 single server? My background is not DBA, so would like to learn examples I can discuss with team.
Background:
The argument for 1 server instance at company: We have "Resource governor" and "AlwaysOn Availability Groups" with Failover clustering.
Resource governor will handle Memory, Cpu, io workloads between databases. So along with AlwaysOn DR, it can handle runaway queries, bad design, memory issues.
Databases are 100GB each, critical company information, 50 million rows minimum
We process 300 transactions/sec
RTO = 10 min
Answer: The answer is classic -"It depends !"
Sit down with your stake holders and present then the pros and cons of the 2 options. Being in the business of client hosting, I have faced this situation and below is my view point :

None of the multiple databases relate or utilize cross database joins. We have ample resourcing and budget.

This means that the dbs are decoupled or independent. I would say, club the dbs depending on the criticality and uptime SLAs and then distribute them between 2-3 servers (VM would be another option as well). This way, you dont put all your eggs in the same basket.
Why ?

Putting all 5 dbs on one server will be a single point of failure. An issue with a single DB puts all your other DBs at risk. Isolate your risk as much as possible but that will cost you additional licensing and maintenance overhead which you have by saying - ample resourcing and budget.
Even if you have Resource Governor enabled, it does not govern buffer pool. It only governs "working memory of a query e.g. sort, hash etc". In 2014 and up, you can limit IOPS using Resource Governor.
You have one solution for a given server hosting all your dbs to do backups - full and log, integrity checks, index maintenance. If there is an issue with your server and that job fails midway, other dbs will be impacted except you have inbuilt mechanism to detect and fix the issue and continue with the rest.
An external issue with OS affects all your estate being in one place.
Even with AGs, you have a fix amount of worker threads and they get shared with all your dbs on a single server. Having dbs spread out depending on the criticality will alleviate that problem.
Tempdb is one per server. So imagine all your dbs being on the same server might be a bottleneck.
Problem isolation will be difficult if you have one server serving all your dbs.

I have written a sort of similar answer Which is better: one database per application, or just one database?
Answer: I agree it does depend, but there are some questions that @Kin is not asking. These are important when you are deciding how to move forward on a project.

What is your budget for this project?

What version of SQL best fits my needs for this project?

What does your infrastructure look like?

VM, Spinning disks or solid state, if VM how many cores are you willing to pay for (licensing question)

Will you need to replicate your data off for reporting purposes (best practice is to not let reporting queries run against your OLTP database (yes, there are exceptions to this))?
How do you plan to handle security for each database?

Is there any sensitive data in these databases? If so, how do you plan to handle that.
Is there one account that is used to access each database, or are there

This is how I would start, as I have about 20 plus servers that fit your requirements. First option would be one server

16 cores on 2 sockets
96 gigs of ram (16 gigs to the OS and 80 to SQL)
Different drive for OS partition
Different drive for SQL installation (not os partition)
Different drive for your data files
Different drive for you log files (minimum of 100 gigs)
Different drive for tempDB datafiles (minimum of 100 gigs)

minimum of 8 tempDB files or more depending on need (start these guys off at 2.6 gigs and allow them to grow at 16mb increments)

Second Option: 5 individual instances

1 main IP address for the server, and 5 additional IPs for each instance

This allows you run each instance on that IP on the default port of 1433
Then configure each instance with a port like 6019 so you can connect via SERVER\Instance.
Assign a DNS alias to the IP address for each of the 5 instances so you can configure your applications to connect to that instance via an alias or use servername\instance

Adjust memory to 136 gigs. Assign each instance 24 gigs of ram (adjust accordingly based on load)

Also make sure to adjust your Cost Threshold for Parallelism and Max Degree of Parallelism settings for both options. Once you have your server in place work with your SA and Network teams to configure and setup your HA and DR plans.

This is how I would go about it.  :)


Question on returns of scale in isoquants

Question:
What does the dotted line in the diagram show and what are they called?
I am also wondering why the steepness of the isoquants changes at Q=3 for the third diagram.
Thanks
Answer: I've computed this in WolframAlpha and I think it'll help you understand just what exactly a production function is. Remember, the production function $Y=f(K,L)$ is defined by $f:\mathbb{R}^2 \to \mathbb{R}$. When you see a graph with axis in $K$ and $L$, you`re seeing a part of a 3D object, the surface that a function with domain in $\mathbb{R}^2$ generates. The isoquants are just contour lines of it.
The change in the isoquant's steepness is a consequence of the shape a Cobb-Douglas Produtcion Function's surface. The non-linear nature of Cobb-Douglas model makes its contour lines change steepness as $f(K,L)$ gets bigger, as production goes up. There's an interesting economic intuition behind it. The more inputs a firm employs in its production process, the smaller the marginal rate of technical substitution of the optimal plant is because of diminishing marginal returns. As a firm employs more of an input, the smaller is that input`s marginal productvity. As a firms employs more and more of two inputs, capital and labor, both the marginal productivity of capital and labor get smaller, meaning a smaller marginal rate of technical substitution.
Answer: The dotted line is just to help you read the scale and compare the isoquantas at each production level. It touches all the isoquantas at the point where you have equal inputs of labour and capital.
The rest of the explanation is on the figure itself - it's just an example of increasing / constant / decreasing returns to scale.


Samsung galaxy note 3 root void warranty

Question: I have read several articles pertaining to rooting a Note 3 and voiding it's warranty.  I know a custom rom, or custom rom app would change the binary counter.  Would I be safe rooting and using Titanium backup or similar to remove / freeze samsung bloatware?
Answer: No in fact there's the Knox void warranty flag that will be set to 0x1 if you are on the 4.3.
Knox is not yet really understanded but so far something is sure, if you flash any rom that does not contains the knox security (official or not official) it will void your warranty.
So even if you flash a 4.2.2 version of stock rom from samsung it will set the knox void warranty to 0x1 and your phone will not be supported by Samsung.
Edit 1 : Well according to comment, it might be possible to avoid the change of th knox flag, with the root method from root de la vega. But still if you are in USA (where voiding warranty with a simple logical flag is possible) be carefull while proceding because it still tricky.
Souce:
xda forum about Knox behaviour
Comment: Just to add on this, many people on XDA have actually gotten a service from Samsung, and their support are giving very dispirate answers on the issue, despite tripping the Knox flag. There is a method to root it without tripping knox, but any custom kernel/firmware will trip it to 0x1 immediately. However, I find it is best to assume that once you root you lose warranty. Here's the "Knox Friendly Root" http://www.xda-developers.com/android/knox-friendly-root-for-multiple-galaxy-note-3-variants/   So the OP could root it and use TB to freeze bloatware in theory, but it COULD trip still.
Comment: Well thank you for the knox friendly method, I wasn't aware.
Comment: My pleasure! Knox is a pain in my side, so anything to get around it makes me happy! It's worth nothing that a few people who had their devices repaired by Samsung got them back with Knox back to 0x0! That is without any motherboards etc being replaced. It seems not to be an eFuse but any answer to fixing it / changing it is still up in the air!
Comment: It looks like de la vega would work for my Tmobile Note 3  according to this thread: http://forum.xda-developers.com/showthread.php?t=2481330&page=2


Render checkpoints during long renders

Question: I've tried to render a complex scen for my first time. The reported time was 23 hours but after some 14+ hours the computer restarted for unknown reason. In case I'll face a similar situation in the future, is there any way to save a checkpoint image of an ongoing render? Or even better, is it possible to create checkpoints of the entire rendering for crash recovery?
Comment: Possible duplicate of [How can I pause a render in progress and then resume it at a later time?](http://blender.stackexchange.com/questions/582/how-can-i-pause-a-render-in-progress-and-then-resume-it-at-a-later-time) Basically the same, as there is no way to resume a single frame render at this time.
Answer: It's standard practice to do this with animations, as described in this video.  If your scene has no animation, you can use the same technique for still images by rendering one vertical strip at a time, by animating the camera settings.
For example, to render the image in 20 vertical strips, set the horizontal resolution of your image to 1/20 of the desired image width, and set the Frame Range to 1...20.  Then with the camera selected, add keyframes to the X Shift property:

Set X Shift to -0.95 in frame 1 and 0.95 in frame 20.  Go to the graph editor and make sure the property is using linear interpolation.  The curve should be a straight line like this:

After rendering your scene as an animation (using the method described in the video), you will have twenty images that you can stitch together using Photoshop or Gimp.
Comment: This looks like a complete hack, but at the same time it has some beauty to it. Thanks!
Comment: @Hyperdrive I guess I can't argue about it being a hack.  :-) I hope you find it useful anyway.

Render checkpoints during long renders


Do bitcoin miners calculate the hash value of current block or next block?

Question: I'm new in bitcoin and my question seems be stupid. I appreciate your help.
Miners calculates blockhash as picking a proper nonce.
And he is awarded.
To calculate block hash, he will need 6 values. 2 of them are merklehash and nonce.
I'm gonna say about merklehash and blockhash. Suppose that miner A is trying to calculate.
To calculate blockhash, merklehash is needed. But merklehash is a hash of all transactions of the block. The first transaction data is that a miner is awarded(?). That means merklehash is calculated after awarded miner is determined. What's the difference between awarded miner of this block transactions and A? I really don't understand.
Comment: @Murch that's not what I asked.
Comment: It seemed to me that you were asking about the order in which the coinbase transaction and the nonce are found. The coinbase tx is picked first, then the miner tries nonces to make their block template a valid block. This is described in the linked question. If you are asking something else,  please edit your question to clarify. I'll reopen the question.
Answer: After reading your question, you are a little confused, so i will try to explain:
Miners do double round of SHA256
What they hash?
They hash the blockheader...
What's the blockheader?
The blockheader is build from data
What data?
It's Build from:
Version: The version of the block.
Previous block hash: The Block Hash of the block that this block is being built on top of. This is what "chains" the blocks together.
Merkle root: All of the transactions in this block, hashed together. Basically provides a single-line summary of all the transactions in this block.
Time: When a miner is trying to mine this block, the Unix time at which this block header is being hashed is noted within the block header itself.
Bits: A shortened version of the Target.
Nonce: The field that miners change in order to try and get a hash of the block header (a Block Hash) that is below the Target.
All this is in little endian
Answer: If I'm a miner, I only want to mine a block that awards me. So I'll create a block that awards me the reward and see if I can find a nonce that makes the block valid. If so, then I am successful.


How to load your own GUI app without the rest of the GUI in Linux?

Question: Is there a way to load my own GUI app without the rest of the GUI in Linux?  It's something like running Winamp only, and practically turning your PC into a music player.
Answer: X-Windows has a kiosk mode that can be used to start an application, usually a web browser, as the only running app, and not loading the full window manager.  I don't know that it will work with Winamp, but you could try (from the console):
<code>startx /path/to/winamp --kiosk
</code>
Comment: Woah~  Thank you so much.  Will try.
Comment: Actually, the `--kiosk` option here has nothing to do with `startx`: it is interpreted as an option for `/path/to/winamp` instead. But the idea still works: `startx ` makes `startx` to start only the specified application and a bare X11 server for it, nothing more. In this way, not even a window manager is started unless you specifically say so, and so the "window decorations" (usually the top bar and borders) you may be used to seeing will be omitted. This will also severely limit the possibilities to move or resize the windows.


What signals does OS X send for the Quit and Force Quit commands?

Question: What happens behind the scenes when a user gives a Quit or Force Quit command from outside the target application (e.g. from Activity Monitor)?
Answer: As a general rule, the "Quit" operation is not a signal; it is an Apple Event, which is the same type of inter-process communication used for AppleScript scripting and for opening files or URLs in already-running applications, and comes from the Mac OS lineage rather than Unix.
A process has to specifically register to receive Apple Events, and such processes are either GUI processes or at least associated with a desktop session (which, outside of Activity Monitor, is the only way they can end up being told to quit at all).
However, if you "Quit" a process from Activity Monitor and that process has not registered to receive Apple Events, it will send SIGTERM (15) instead.
Comment: @Alexander-ReinstateMonica Typical Mac applications will not register signal handlers, so if they are killed with a signal, no cleanup will be done, including prompting the user to save work (for applications that do not have full autosave) or confirm cancelling tasks in progress. (The quit event also permits the application to communicate that the user answered "Cancel" to such a prompt, which will immediately abort a logout/reboot/shutdown in progress, as distinct from the app simply failing to quit and possibly needing a force quit, which has to be a timeout.)
Comment: What's the benefit of apple events vs signals, for quitting apps?
Comment: Hey Kevin, thanks for reach back (on this 8 year old post!). Interesting, I'm curious why AppKit wouldn't implicitly add a handler for `SIGTERM` to do all that.
Comment: @Alexander-ReinstateMonica Interesting question, and it'd require some research to get a good answer; the design decision _probably_ existed in NeXTSTEP as well as OS X even though _Apple Events_ didn't. I suspect that it boils down to the presumption that (a) there's a _lot_ of communication with the window system that a proper desktop app needs to participate in, and supporting only quitting is practically worthless, and (b) it's not particularly valuable to add the compatibility signal handler you propose. Personally I would have added such a handler, but it's not the system we have…
Answer: You can use dtrace to see what signals are sent to processes:
sudo dtrace -n 'proc:::signal-send /pid/ { printf("%s -%d %d", execname, args[2], args[1]->pr_pid); }'
If you force quit an application that is shown in the Dock, the signal is usually -15 (TERM). But if you force quit a background process from Activity Monitor, it is usually -9 (KILL).
Comment: I didn't test it with that many processes, but I meant processes that don't have a menu bar or are not shown in the Dock or the force quit window.
Comment: Interesting. How is the distinction made between apps and background processes?
Answer: You can view Force Quit events for GUI applications sent to system.log. Or, use dtrace as posted in this thread. With dtrace you get more granularity but need root privileges.
Comment: @BlacklightShining Try launching TextEdit.app and Force Quitting it via Activity Monitor.app. You should see a line like this
`Apr 28 13:04:21 com.apple.launchd.peruser.501[136] ([0x0-0x3e13e1].com.apple.TextEdit[5336]): Exited: Terminated: 15`
It doesn't register the Quit event though.
Comment: Granted, this works for GUI apps. However, if you start some other process and signal it, it will not be logged. Thus you can't, in general, "view the signals sent" in `system.log`.
Comment: @BlacklightShining I emended my post to reflect your comment.
Comment: -1 (inaccurate): `/var/log/system.log` doesn't record signals.


What is spacetime 'made' of?

Question: General relativity is often explained as saying spacetime is curved by gravity, what does this mean? How could we perceive a curve in spacetime when there is no external "straight" reference frame for instance?
Comment: I think your title and your question are two quite different topics, albeit related. I assume you mean "What (not _where_) is spacetime made of". The answer to that is somewhat philosophical, but a physical discussion is probably better fit in the physics.SE forum. The answer to "What are gravitational waves and how do they work" is more tangible (although not super-easy to understand), but should also be asked in the physics forum, I think.
Comment: Quantum vacuum and Higgs field
Comment: Dimensions. Think about dimensions.
Comment: If an area of space that was devoid of any matter and devoid of any energy can be said to have some residual characteristic, it must in some sense be composed of something. Otherwise it would have no zero point energy or quantum foam. IM undeducated O.
Comment: Very hypothetical, but some scientists are actually trying to figure out whether this is true or not: https://www.quantamagazine.org/20160119-time-entanglement/
Answer: Space-time is not "made" of anything, it is merely a medium or coordinate system. Think about the grid lines on a map, they aren't "made" of anything, they're just a representation of the geometry of the Earth. Space-time is a concept envisaged by Einstein when he wrote his theory of Special Relativity that the properties of space and time become intrinsically linked at relativistic speeds. One of the consequences of this is that you cannot go forward in space without going forward in time, this can be visualized in a light cone:

This is by no means a representation of what space-time looks like, only how it behaves in 2 dimensions of space and one of time. Gravitational waves are caused when two massive objects (binary stars) orbit each other, and they cause "ripples" in space-time. Again another 2D visualization is needed:

This shows how the gravitational potentials of two stars interact in the fabric of space-time as they orbit, causing the radiation of gravitational waves.
Both of these are only visual guides, we will never be able to "see" gravitational waves or space-time itself with our own eyes, that is why we need detectors such as LIGO or VIRGO to infer their existence.
Comment: This answer is rather misleading because it suggests that curving a coordinate system is what spacetime curvature means. That would be very wrong, e.g. taking curvilinear coordinate system in flat spacetime in *some* sense represents a nontrivial change in gravitational field (specifically, in the sense of changing the connection coefficients), but it definitely isn't physically significant, nor it does not introduce any curvature. Coordinates just aren't physically important; they're labels we give events.
Comment: So when I say space is nothing real but just an theoretical instrument of analysing than it is ok?
Comment: Space is real, otherwise we simply wouldn't exist, yhere is nothing theoretical about it. Gravitational waves on the other hand are still a theory because they haven't been detected yet. I dont understand what you mean by a "theoretical instrument of analysing"?
Comment: I thought that the current dogma was that everything is made out of something else. Kicking the can down the road.
Comment: By '"theoretical instrument of analysing" I mean that this is just the theater everything is going on. Imagine that next week it appear that gravitywaves exist, What is the necessity of space while the interactions between planets are arranged by just gravitons, do we than really need space as a real thing?
Comment: Ah okay, well if we assume gravitational waves exist then that just proves Einstein's theory of General Relativity is correct, it doesnt alter the physical properties of space. If a graviton is also discovered, this would simply be a gauge particle that mediates the force of gravity, just like photons mediate EM radiation. They would still require space to exist to be able to mediate the force of gravity between planets and stars.
Comment: @Dean, can you explain your last sentence a bit more? Why do gravitons need space to mediate?
Comment: @Marijn Gravitons are not a replacement for space, they are merely a mechanism by which gravity acts within space (if discovered). Without space all fundamental forces would become meaningless, they would simply have nowhere to exits, and neither would we!
Comment: I don't understand: " Without space all fundamental forces would become meaningless". Why is that? Can you explain a bit more why space is needed?
Comment: If you remove the 3 dimensions of space then the universe just becomes a point. Can you really visualise a universe in which you dont need space to move through? You cant play football without a football pitch, you can introduce a new surface (gravitons instead of grass) but you cant remove the physical dimensions of the pitch or it will become meaningless.
Comment: @Marijn "Imagine that next week it appear that gravitywaves exist" - looks like its coming true...
Comment: Isn't all media made of something? If space-time is a medium and it is not made of something, then what is nothing? Space is not nothing, and is not something. What is it then?
Answer:
General relativity is often explained as saying spacetime is curved by gravity, what does this mean?

It means that general relativity can be formulated in a way in which its mathematics have a very direct analogue to differential geometry on a curved four-dimensional manifold. In other words, the way test particles would behave under the influence of only gravitational forces is exactly how they would behave if moving freely on a curved four-dimensional manifold. The mathematics have a direct correspondence: nothing more, nothing less.
Electromagnetism has a description in which the electromagnetic field strength is the curvature of a connection on a line bundle. I realize that this statement is very cryptic to someone who hasn't studied gauge theory, but it's important to realize that an essentially geometric description is not special to gravity. What's special to gravity is that it couples to all stress-energy-momentum equally, and gravitational freefall of a test particle is completely independently of composition.
Because of this universality, it is possible to interpret the properties of the gravitational field as properties of spacetime, i.e. as property of the arena on which everything else happens. We don't have to do so, and indeed there are some presentations of general relativity (e.g., Weinberg's) in which the geometric interpretation is relegated to an unimportant side note, but we can--and geometry is how general relativity was originally developed.

How could we perceive a curve in spacetime when there is no external "straight" reference frame for instance?

We could measure it.
As a conceptually (but not practically) simple way to do so, we could set up a small ball consisting of initially comoving test particles. With no curvature of the gravitational field, every such ball would keep the same shape and volume because they're all the test particles are moving in the same direction with the same speed. But if the gravitational field has Ricci curvature, the volume of the ball would either start shrinking or expanding. Similarly, changes in the shape of the ball would give information about Weyl curvature.
This is the same kind of answer as in the case of electromagnetism: the field strength is also a kind of curvature (though not of spacetime), but how do we perceive it? Well, we could measure it by seeing how test charges behave.
Answer: A mathematicial primer.
A triangle on a flat surface has three angles, and these three angles add up to 180degrees - This is a well known theorem from geometry.  It is also well known that if you draw a triangle on a ball, then the angles will add up to more than 180 degrees, due to the curvature of the ball. (and if you draw on a pringles crisp, the angle sum will be less than 180).
An creature crawling on the ball could, by observing only the angles, discover that the surface of the ball was curved. So curvature can be observed by a creature inspecting only local parts of the ball, the creature doesn't need to be able to move away from the ball to observe its curvature. Curvature is an intrinsic property.
Similarly we don't need to be outside of spacetime to observe that spacetime is curved. It is actually the case that the angles in triangles don't add up to 180 due to the gravitational curvature of space (but this effect is too small to be noticeable). We can perceive a curvature in space-time without space-time having to be "in" anything else.
The most obvious consequence of spacetime being curved is that things fall down towards the centre of the Earth.
At some level you should remember that general relativity describes a theoretical model of how gravitational mechanics functions. That model includes coordinates for time and space, and in this model space-time is a mathematical construct, which allows us to predict with extreme accuracy the behaviour of objects under gravitational influence.
Comment: @Marijn That's not a good analogy, because the second part of your statement is a reflection of the fact that the Pythagorean theorem is only valid for right triangles.
Comment: "space-time is a mathematical construct": So it doesn't have to exist, like the theorema of Pythagoras is not necessary to have a triangle?
Answer:
General relativity is often explained as saying spacetime is curved by gravity, what does this mean?

This OP's comment narrowed the question down:

So [the spacetime] doesn't have to exist, like the theorema of Pythagoras is not necessary to have a triangle? – Marijn Feb 4 '16 at 20:24

The spacetime is a map and not a territory. Spacetime is a model. In other words it is something that exists in human brain, to help that brain exactly predict the future experiences out of previous experiences. For example, the concept of spacetime (in context of the General Theory of Relativity) helps you to predict that the gravitational lensing exists. Your brain is better equipped to process on that level, rather than calculating the same picture by  taking a bunch of individual photons and applying the equations to each photon.

A "model" inside a brain is made by imagining something very close to reality and then by deliberately removing the details until you got something so simple that is becomes computable. You forget all the attributes of a star (color, alien civilizations around it, its prehistory, its internal dynamics) and you only think of the star as the mass, etc. This way you turn "enlightening imagination" into a "primitive mechanism usable for predicting experiences".
Marjin, I'd like to say I love the style of your questioning, and I've signed up especially to attempt to answer this one question.
Comment: I know what your saying about the map and the territory, I just think its a poor choice of words that could be misinterpreted that spacetime is just a fabrication of the human brain. Its like most mathematics, we didnt invent it we just discovered it. I dont understand your question of experiences, do you mean like the force of gravity?
I have a question for you though, if spacetime is the map then what is the territory?
Comment: @Dean whether mathematics is discovered or invented is a philosophical matter that's certainly questionable in either direction, but neither claim has any scientific content. Let's just say your position on that is far from universally shared.
Comment: I cant decide whether to disagree with what your saying about "spacetime just exists in the human brain", I can see what your trying to say but I think its a bad choice of words, if you remove the human brain spacetime will still exist, just that it wont have any human beings to give it the name "spacetime"
Comment: No @Dean. You seem to mix the map with the territory. Let me ask you: does your additional assertion "spacetime exists outside of my brain" let you predict any additional *experiences*? As a scientific theory, is it experimentally falsifiable?
Comment: Experiences, especially experiments, are the signals that come into your brain like for example "oh I see these galaxies seem to *curve* around in that picture". You use math to try and predict future experiences. You do that *inside* your brain. Predicting future experiences is good for you, because it lets you kill that great mammoth and have a lot of fat meat for the winter. Arguing that math *also* exists *outside* the brain is pointless because it doesn't help to catch the meat - they also call it Occam's razor.
Comment: If said that spacetime is an invented model, what about distance? Is the word distance enough to express the curvitures and is distance also just in your head?
Comment: @Marijn Note: kubanczyk did not say things only exist inside your head. They merely said that it adds nothing scientifically to assert things do exist outside your head. As Stan Liou alluded, asserting things *only* exist inside your head also adds nothing scientifically. They are philosophical questions of no relevance to science, because science cannot resolve them. Indeed, I'm not sure the question can be resolved at all. How would you go about knowing whether reality was an illusion? If you stop experiencing reality, you have no way of knowing whether it persists without you.
Comment: @Marijn But this is philosophy so out of scope for this site.
Answer:
General relativity is often explained as saying spacetime is curved by gravity, what does this mean?

This sounds dodgey.
Gravity is a manifestation of spacetime curvature which is caused by, among other things, massive objects like stars, planets etc. In other words gravity is a consequence of spacetime curvature.

How could we perceive a curve in spacetime when there is no external "straight" reference frame for instance?

Like the answers above, this is achieved through experimental observations or measurements. For e.g. Eddington measured the bending of light around the limb of the Sun which would not have been possible where it not for curvature.

What is spacetime 'made' of?


Create a view block for display of taxonomy term children

Question: I am trying to create a View of Taxonomy Terms which lists the child terms for the currently displayed term.  Is this even possible for taxonomy terms or is it only possible for Content Nodes?
Answer: yes,you can do this by :
on CONTEXTUAL FILTERS add "Taxonomy term: Parent term" and on once you've chosen it, there's a set of radio buttons entitled When the filter value is NOT available. Set this to provide a default value and then, in this case, choose "Taxonomy term id from url" from the drop-down menu.you are good to go.
Comment: tnx for your solution "Shirin", This is good solution , who down vote this ? !!!
Comment: you're welcome.I really don't know why somebody would do that ! :(
Comment: Sometimes there is discrimination , anyway I think your solution is good and correct, he/she should not down vote it, I upvote your answer ;)  I am glad to see IRANINAN DRUPAL DEVELOPER girl here :)
Answer: What you need to do is to create a contextual filter by making a new View and add a Block Display to it. From there you add the contextual field of Taxonomy to parse the URL path. Then pass an argument into the contextual filter which selects the Taxonomy vocabulary. From there you add in the fields you want to show.
Watch this as it will help you out on setting up a contextual filter: http://nodeone.se/en/learn-views-with-nodeone-part-19-contextual-filters-with-paths
Comment: What you describe would be selecting terms of the same vocabulary.  I'm trying to select terms that have, as their parent_id, the term id of the current term from the URL.


What version of JBoss Enterprise Edition supports JDK7?

Question: I need to determine what version, if any, of JBoss Enterprise Edition supports JDK7. It is unclear from the RedHat documentation and forums if there is currently any support for JDK7. I do believe support for JDK6 is certified as of JBoss 5.1.1 Enterprise Edition.
Answer: JBoss 5.1 EAP is compatible with JDK 1.7 as can be confirmed here:
https://access.redhat.com/site/articles/113083#Compat_5


Canon EF telephoto on a crop body

Question: I know it has been asked before, but I'm still not sure if I understand the focal length issues of EF-lenses on APSC cameras in Canon system. I already have the EF-S 55-250 IS STM and I'd like to buy a longer telephoto - if I get the EF 70-200 will it give me effectively more range than EF-S 55-250 (200 x 1.6 = 320 mm)?
Comment: See also: [Canon FoV comparator](https://www.learn.usa.canon.com/resources/articles/Comparators/fov-comparator.shtml) and [Nikkor lens simulator](http://imaging.nikon.com/lineup/lens/simulator/).
Answer: No, a 70-200mm lens will give you less range than a 55-250mm lens on both ends of the focal lengths. In order to understand the comparative fields of view yielded by an EF-S and an EF lens on an APS-C camera body in terms of the same field of view on a full frame/35mm camera, you must multiply the focal length of both lenses by the 1.6X crop factor.
Your EF-S 55-250mm f/4-5.6 IS lens gives an FoV equivalent to an 88-400mm lens on a FF camera.
An EF 70-200mm f/4 (or any other 70-200mm lens) mounted on your Canon APS-C camera gives an FoV equivalent to a 112-320mm lens mounted on a FF camera. What the 70-200mm "L" Series lenses give you is significantly better image quality and wider, constant apertures. The faster speed of a wide aperture telephoto lens is vital when shooting action or sports under challenging lighting.
A 70-300mm telephoto lens mounted on your Canon APS-C camera would give you an equivalent FoV of a 112-480mm lens mounted on a FF camera. But most 70-300mm lenses are not much, if any, better optically than the 55-250mm lens you already have. They also usually have the same f/4-5.6 slower variable aperture.
For more, please see Why do Full Frame lenses and crop body lenses exhibit the same crop factor when used on a crop body camera?
For more on the optical differences between the EF 55-250mm f/4-5.6 IS II, the EF 70-300mm f/4-5.6 IS, and the Canon 70-200mm "L" series lenses,please see this answer to What improvements I could expect upgrading from Canon EF 55-250mm IS to a Canon 70 - 300mm?  (Hint: Not a whole lot)
Answer: A full-frame lens of any focal length (let's say 200mm) and an APS-C lens of the same focal length (i.e. 200mm) are the same (in this context). The difference is only in the size of the 'image circle' that the lens projects; the full-frame lens projects a larger image circle to cover the larger size of the full-frame sensor.
So in your comparison, there are no complications like having to multiply one lens by some crop factor and not the other. A 200mm lens is a 200mm lens. A 55-250mm lens has a wider/longer range than a 70-200mm lens. The entire range of the 70-200mm lens falls within a portion of the range of the 55-250mm lens.
Answer: No, it'll give you a smaller range. The numbers quoted on any system camera lens are the actual focal length, not the equivalent.
You can get a longer range with a 70-300mm fairly easily, but the difference won't be huge - you'd barely notice it in reality. More than that is available but expensive and heavy.
I'd suggest you'll do best by looking at the subjects you're interested in shooting, then look at examples of that sort of photography on Flickr and review their EXIF to see how they've been taken. Better fieldcraft and practice, hard work as that can be, is likely to be your best answer.

Canon EF telephoto on a crop body


How to display superscript % character as string in UIlabel?

Question: How to display superscript % character as string in UIlabel? I know % does not exist in unicode as a superscript but is there is any way we can display % as a superscript instead of using html tags??
Comment: This article might do what you want: http://sketchytech.blogspot.co.uk/2013/12/drawing-nsattributedstrings-with.html
Comment: Thanks for sharing this information. Now i am able to display the % as superscript for label using that article
Answer: I found this post on Stackoverflow on superscript styling text using attributed string:
NSAttributedString superscript styling
So using that, I hacked up this demo:
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    UIFont *font = [UIFont fontWithName:@"Helvetica" size:20];

    UILabel *textBlock1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height / 2.0)];
    textBlock1.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1.0];
    textBlock1.textAlignment = NSTextAlignmentCenter;
    textBlock1.font = font;

    textBlock1.text = @"57%";

    UILabel *textBlock2 = [[UILabel alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height / 2.0, self.view.bounds.size.width, self.view.bounds.size.height / 2.0)];
    textBlock2.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1.0];
    textBlock2.textAlignment = NSTextAlignmentCenter;

    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:@"57%"
                                                                                attributes:@{NSFontAttributeName: font}];
    [attributedString setAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"Helvetica" size:10]
                                      , NSBaselineOffsetAttributeName : @10} range:NSMakeRange(2, 1)];

    textBlock2.attributedText = attributedString;

    [self.view addSubview:textBlock1];
    [self.view addSubview:textBlock2];
}

The result:
Comment: I also want to point out that NSBaselineOffsetAttributeName is not good for all scenarios, because you have to set a magic number, if you ever set a min/max font size this will not scale right.
Comment: thanks for sharing the source. I have achieved the same using the tutorial http://sketchytech.blogspot.co.uk/2013/12/drawing-nsattributedstrings-with.html suggested by trojanfoe.
Comment: @Zhang Can you make a small translation into Swift? Since some commands are changed and I try hard to archive the same. Thanks
Comment: @Nicholas it's pretty much the exact same thing in Swift, not sure what you mean by some commands are changed, but it's a pretty copy paste/convert translation....
Comment: @TheCodingArt Thanks, I'll give it a second try. My main issues are related to this kind of use in other contexts such as uiswitches and uibuttons not only uilabels
Answer: For a simple to use Swift solution, you might want to checkout HandyUIKit. After importing it into your project (e.g. via Carthage – see instructions in README) you can do something like this:
import HandyUIKit

"57^{%}".superscripted(font: UIFont.systemFont(ofSize: 20, weight: .medium))

This line will return an NSAttributedString which will look exactly like what you're looking for. Just assign it to a UILabels attributedText property and that's it!

If you're looking for subscripting a text, simply use subscripted(font:) instead. It will recognize structures like CO_{2}. There's also superAndSubscripted(font:) if you want to combine both.
See the docs for more information and additional examples.


Always drop the first column after performing One Hot Encoding?

Question: Since one of the columns can be generated completely from the others, and hence retaining this extra column does not add any new information for the modelling process, would it be good practice to always drop the first column after performing One Hot encoding, regardless of the algorithm of choice ?
Answer: This question, in a slightly different form, was discussed herein earlier.
You are kind of right, but the best and safest way is to do One-Hot-Encoding and drop at the end because which column you want to drop at the very beginning?
In fact in pandas.get_dummies there is a parameter i.e. drop_first allows you whether to keep or remove the reference (whether to keep k or k-1 dummies out of k categorical levels). Please note drop_first = False meaning that the reference is not dropped and k dummies created out of k categorical levels! You set drop_first = True, then it will drop the reference column after encoding.
Answer: This has something to do with Mutli-colinearity in case if Multiple Linear Regression. Beacause, Keeping k dummies for k levels of a categorical variable is good idea, but there is a redundancy of one level, which is here in separate column. This is not needed since one of the combination will be uniquely representing this redundant column. Hence, its better to drop one of the column and just have k-1 dummies(columns) to represent k levels.
This Overall approach reduces Multi-colinearity in the dataset, which is one of the prime Assumption of Multiple Linear Regression.


different types of rear shock suspension and their uses?

Question: explain me about the rear suspension of mountain bike.
Comment: This question as it is is far to broad to give a concise answer. Think about explicit questions and ask separately.
Answer: Here is a very rough answer to your very generic and open ended question:
A rear suspension (or shock), together with the front suspension (fork), allows the bike to handle more terrain roughness. This gives you:

safety
traction
ability to go faster

The main two types of rear suspensions are:

air sprung
coil

Generally air suspensions are lighter and better for XC, all mountain, enduro. Coil shocks are heavier, more linear and better for downhill. See What's the difference between All-Mountain, Cross Country, Freeride, Downhill bikes? for a reference on mountain bike types.


How to download a big area OSM by JOSM editor

Question: I download a small rectangle of data osm using JOSM, but when trying to download a big area the message error shows that the server will not allow it.
Answer: OSM API doesn't allow to download areas greater than few sq km. Try to use downloading using overpassAPI - it's in File menu, but this also doesn't allow you to download all planet. Keep in mind that more data = less performance in JOSM.
Answer: Try some download sources listed at https://wiki.openstreetmap.org/wiki/Planet.osm and make use of tools like "osmconvert" and "osmfilter" (see OSM-Wiki) to get raw OSM data for bigger areas.
Comment: I think that there is an extension on JOSM enable downloading big area by spliting it to small rectangles
Answer: The main API is essentially an editing API only. It should not be used to perform bulk downloads.
See the country and area extracts. If they are still too large for you then see OSM file formats which has some notes about processing these files and splitting them into different geographical regions, e.g. by using osmium.


The simplest way to deploy to production with builds

Question: I must confess I'm new to maven world after years of living in the world of monstrous debuild/ant/makefile chimeric constructions. I just don't have yet that very feeling which helps seasoned developer to choose right decisions, and it's looks like there are plenty different ways in maven.
So, I have a simple project containing of web-app.
I want basically following:

deploy to development Tomcat (I'm using tomcat:deploy), then do nothing.
deploy to production Tomcat, but before deployment update git repo, add tagged commit and upgrade build version.

For distinguishing between development and production I've created profiles, dev and prod. The dev profile is activated by default. When I want to deploy something to production, I just type mvn -P prod tomcat:deploy
I've read about release plugin, as well as about buildnumber plugin.
But I'm just not sure I'm going the right way.
So, the question is - what is the most succint, self-contained and "mavenish" way to resolve the task I'm asking about.
Answer: Shabunk, as I was commented out, Maven is driving you on the best way to do what you want, inheriting from years of developpers experience.
I would explain what I would (and what I myself really) do.
So you're right to use Maven Release Plugin, plus another one (cargo for instance)
You're trying to do two differents things :

Identifying a unique version, which means tagging it, and updating pom for a new version
Deploying your app (no matter which environnement it is)

Maven Release Plugin
Consider that your own process is maybe ligher than other dev teams are used to. I mean that there is more steps between unit testing and production deployment in larger teams (Q&A, user acceptance, non regression campains). It seems that you make a shortcut linking tag and production deployement.
If you want to deploy your webapp on different environnements (integration, user acceptannce, performance, preprod, and so on) you had to identify your version and had to be able to  build it again (sure and "repeatable").
That what maven-release-plugin is intended to. It helps you to verify that your source code is clean (all files under source control, with no modification), can compile and pass all tests phases. Then, it deals with pom version and tagging, and finish by storing it for later use in you Maven enterprise repository.
You have many configurations to set up (ditributionManagement, SCM, maven plugin release configuration). But once it is in place, releasing version stand in one simple command line :
mvn release:prepare release:perform

If you want some examples, I can give you some.
<scm>

    <url>scm:svn:http://svn.myorg.corp/svn/repository/</url>

        <developerConnection>scm:svn:http://svn.myorg.corp/svn/repository/trunk/project1</developerConnection>
  <connection>scm:svn:http://svn.myorg.corp/svn/repository/trunk/project1</connection>

</scm>
<build>
    <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-plugin</artifactId>
                <version>1.6</version>
                <configuration>
            <username>${from.settings.xml.user}</username>
            <password>${from.settings.xml.password}</password>
                </configuration>
    </plugin>

    <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.2.2</version>
                <configuration>
                <tagBase>http://svn.myorg.corp/svn/repository/tags/</tagBase>
            <scmCommentPrefix>[DEV#SCM]</scmCommentPrefix>
        </configuration>
    </plugin>
</plugins>
    [...]
</build>
<distributionManagement>
    <repository>
        <id>enterprise_repo</id>
        <name>Enteprise Repository on Artifactory - Stable versions</name>      <url>http://repo.corp:8080/artifactory/prj-xxx-releases</url>
    </repository>
    <snapshotRepository>
        <id>enterprise_repo</id>
        <name>Enteprise Repository on Artifactory - DEV versions</name>
        <url>http://repo.corp:8080/artifactory/prj-xxx-snapshots</url>
    </snapshotRepository>
    <site>
        <id>corporate_site</id>
        <name>Corporate public site</name>

        <url>ftp://...</url>

    </site>
</distributionManagement>

Deployement
Once again, you may have multiple environnements on which you want to test your app against.
There is many plugins that allow you to send and deploy your war : the general cargo-plugin, or more specific ones tomcat-plugin, glassfish-plugin, ... Plugins are giving you the hability to do what you want. Then, configuration can be performed in many ways.
Full Maven way :
The full integrated way with Maven is to use Profile and maybe Filters. Profiles let describe properites and behaviour, as you seem to know. Filters are kind of .properties grouping a set of variable that will be used to replace patterns in you xml configuration file into the war (for instance, db connection). It's not the one I use because I find it less flexible than externalizing files. But no matter
Maven with its ecosystem:
The way I prefer is to build my apps with Maven and Jenkins (or Continous Integration tool). This is why I'm agree with Aaron when he says that you had to konw limitations of your tools. Using Jenkins, I run every hours/day my application against Unit Tests, generatio Q&A reports, documentation, ... I have a release build that help me to produce all I want to deliver it (to my test team or my customer), and I provide some information to my jobs to deploy it onto different environnements (using maven profiles or jenkins built-in configuration).
It works really fine for me, and I'm pretty sure this is the right way to do.
[EDIT]

Deployment
Once again, deployment mean different phases of Lifecycle.
Local / Dev environnement
I'd never use tomcat:deploy until now, but only because I'd prefer using jetty as light web container (and well integrated with maven). But I'm pretty sure that every kinf of configuration would fit your needs here.
Continuous Integration Environnement
In an continous integration environnement, I usually copy the war directly with Jenkins (exporting *.war on the desired machine). The way I do depends on many things :

if CI soft is on the same (physical|virtual) server than your app server (Tomcat, Jboss, Weblogic, Glassfish, ...), or distant one => copy time will outstand server refresh time and will produce unsafe deployement (generally corrupted archives)
if server is supporting hot reloading (exploded war in web-apps for Tomcat) or at least aware of file system modifications (full war in /deploy for JBoss)
if you need to stop your server before, ...

Most of time, it's a simple copy. If I can't, I use some integrated maven plugins (like jahia:deploy plugin for the famous CMS : www.jahia.com), or just cargo plugin : http://cargo.codehaus.org/Maven2+plugin. I don't have any example, but it's really easy to find some on internet because this configuration is often recommanded.
Q&A / Acceptance / Production environnement
For those kind of environnements, which often (as far I as I saw in my job) deals with Service Level Agreement, we (I or admin team) wrote some specific scripts. I'm sure you will be desapointed, but as I mentionned, I don't rely on Maven for everything, and for deployement in particular.
IMHO, this is one limit of this tool. You can maybe rely on cargo plugin, or specific ones, but releasing a version, or building one don't match (in time sequence) with real deployement. Even more, I didn't find any plugin that allow me easily to deploy on multiple instances ... and even worth you had to shutdown instances in a specific order (SLA's needs).
That said, I didn't mentionned external properties, or SQL scripts, or anything else. They are additional reasons to rely on a dedicated tool.
So, generally, we wrote our own ant / sell scripts. If somebody else have better solutions, I'm obviously interrested in !
I hope I was clear enough.
Regards.
Answer: The original question asked for "the best practice" to do production deploys with Maven. I expected to get more than one "best practice" and offered the bounty to see different solutions and learn from them. I do not care if they are pure maven solutions or if they utilize different tools.
Parallel to this thread I did also some researching and would like to post here the different approaches I am seeing. I tried 1) and 3), they are pure maven and regardless what Aaron is saying, they are working also.
In my current project I have a development environment, a test environment, a staging environment and a production environment. From my maven pom I would like to work with the development environment and deploy only to the test environment. I see the following approaches with maven pom:

profiles with filtering properties
When working with this approach the deliverable (the war file) has to be rebuilded for different environments. This forced me to offer the bounty because I didn't like that.
profiles wit Maven WAR overlays or assembly plugin
This also generated different artefacts for different platforms. But instead of rebuilding the war file it will be unpacked/patched/repacked (for the war overlay) or build and packed with different settings (assembly plugin). I didn't like this solution either.
A deployment plugin (eg. Cargo plugin) without profiles
Specify the complete build with installation and also include the cargo plugin doing a remote deployment but not connect it to any phase. So I always work with the development environment but when I explicitely call the cargo plugin it deploys the war from the repository to a container (the test environment). I can even use profiles to distinguish between different containers just for the deployment via cargo.

In all solutions I am using integration test (surefire plugin), version plugin and release plugin for building the war. For the deployment I am implementing approach number 3 following the arguments from https://stackoverflow.com/a/1151870/734687 (a post which expresses very good what I also prefer).
Since the application has to work unchanged in all environment you have to distinguish the different settings on runtime and that can be very complicated. Our operational team wants to have settings per application outside the container so I support an environment var which points me to the proper directory but is optional. If nothing is set then I use the development settings inside the war. See a Spring sample here:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="ignoreResourceNotFound" value="true"/>
    <property name="locations">
        <list>
            <value>classpath:META-INF/spring/*.properties</value>
            <value>file:///${picservice.configdir:-}/*.properties</value>
        </list>
    </property>
</bean>

The properties in the META-INF/spring dir are loaded always. Additionaly I integrate properties from the file system which can override the properties above. If no properties are found this will not trigger an exeception because I set ignoreResourceNotFound. If the property picservice.configdir is set it directs me to an directory, if not than I provided a default value with :. The - says that I want to have no value which is the current directory.
For logging I have a similar solution. You can find very interesting articles about properties file handling with Spring at following links:

http://springtips.blogspot.co.at/2008/09/configuring-applications-with-spring.html
http://www.summa-tech.com/blog/2009/04/20/6-tips-for-managing-property-files-with-spring/
and a similar discussion here: Using Maven for multiple deployment environment (production/development)

I found an interesting presentation about this topic, see Automated Deployment with Maven and friends.
Comment: Thanks for the bounty.
As you said, cargo is not binded with any phase because there is no logical, or at least obvious, order to perform it. This is a consequence of what I said : releasing and deploying are two differents things.
No matter, this discussion was really interesting !!!! Thanks again.
Comment: This is a very good conclusio: "releasing and deploying are two differents things". But some approaches using releasing for deploying issues which could make problems. For me this discussion was also very interesting. Thanks for your participation.
Comment: -1 How do you update the git repo using a profile? How does a profile increment a build number? How do you all these things when the standard maven plugins don't work the way you do?
Comment: 1) Your answer still doesn't show how this can be done with Maven. I have the same problems with my build and the standard plugins just don't do what I need. 2) I use Maven for all my builds. It's my standard tool. I have written plugins for it and patched existing plugins. And most important of all, I know what it's limits are.
Comment: Great link that you provided !
Answer:
update git repo, add tagged commit and upgrade build version.

-

I've read about release plugin, as well as about buildnumber plugin.
  But I'm just not sure I'm going the right way.

Yes, using the release plugin is the recommended way. You can use the buildnumber plugin if you want the buildnumber in some document, e.g. CHANGES.txt
Answer: I think the simplest way to accomplish what you've specified (if I understood well) is to configure Maven Release Plugin as follows:

<plugin>
  <artifactId>maven-release-plugin</artifactId>
  <configuration>
    <releaseProfiles>prod</releaseProfiles>
    <goals>tomcat:deploy</goals>
  </configuration>
</plugin>

For dev deployments proceed as you're doing: mvn tomcat:deploy -P dev (if dev is active by default remove the -P dev argument).
When releasing proceed in two steps as Maven Release Plugin expects:
mvn release:prepare

This goal will increase the version and tag as you want (and more). Notice that you will also need to specify what SCM Maven should use by configuring this tag in the POM:

<scm>
  <connection>scm:git:ssh://yourrepo.url</connection>
</scm>

SCM plugin supports a wide variety of SCM managers and protocols (you might be interested in git:http or git:https).
And then
mvn release:perform

This will use the profile prod and simply run the goal tomcat:deploy, exactly what you configured.
I hope this is what you needed. Regards.
Answer: The Mavenized solution is not to use Maven when you have an exception to the common case. Maven is all about common cases. Exceptions are handled elsewhere which means the POM (should) never contain any surprises.
Since you need a custom deployment process, write a shell script or an Ant build.xml which does the necessary steps and uses Maven in the process to do the deployment.
That way, each tool does what it can do best.
From the "What is Maven?" page:

Making the build process easy
Providing a uniform build system

(my emphasis) So yes, there are things for which Maven isn't the best solution for. If the standard release process works for you, use the release plugin.
But when it doesn't, then look elsewhere instead of falling for the "everything looks like a nail" mind trap.
One of the major personal development steps is to understand your own limits and the limits of the tools that you work with. When a tool isn't suitable for a job, try a different tool instead of trying to warp reality. Your live will be happier.
Comment: In which way does a profile support you with tagging in a git repo and incrementing the build version? Maven is a tool like a hammer - it's not suitable for every task.
Comment: I'm totally agree with you Aaron. Maven is one of the better tool I know for driving developpement lifecycle on the best practices. If you fail to use it, it's probably because you're not on the right way (regarding the best pratices). So you must delegate to another tool, generally Ant, Jenkis, or something else. It's difficult, often impossible on legacy project, but it stands for the right way to do it ... +1 !
Answer: maybe phing its another tool to solve your problem, its simple, and u can make custom processes
Phing website
Comment: the question was about Java not PHP


Federated SSO for salesforce1

Question: I have configured Federated SSO with ADFS successfully. But we use sso on salesforce1 it will redirect to the full UI instead of the mobile UI. Salesforce document says we need to handle the relaystate in correct way. Can anyone knows how to handle the relaystate?
Answer: The RelayState parameter is defined here
The important thing to note is that it has now been changed as mentioned

When a service provider initiates login, the default RelayState is now
  /. In previous releases, the default RelayState was /home/home.jsp.

It is required that your IDP echoes this back correctly

Ensure your IdP is properly receiving the RelayState param AND
  correctly echoing the RelayState back per the SAML assertions (Request
  / Response)

You should be able to log/ check the value of this param on the IDP end.
Comment: Hi Gaurav, Can we set the RelayState in salesforce itself?

Federated SSO for salesforce1


What kind of chocolate should I use to coat homemade turtles?

Question: I am making chocolate treats with mini Presley's caramel and chocolate. Can I use a regular Hershey's bar or use baking chocolate or can I mix them to make a harder coating or will the regular harden?
Answer: There are certain kinds of chocolate that are formulated for coating. Couverture is one of the names.  My local grocery store has discs of chocolate that come in packages that are meant for this.  Here's a link to a good explanation of the differences.
http://gourmetcandymaker.com/select-the-best-chocolate/
Answer: Any couverture or compound chocolate (milk, dark or white) will work fine. Compound is cheaper and easier to work with, whereas couverture is the real deal and requires tempering if you want a glossy/snap finish. Feel free to use buttons, chunks, chips or whatever you can find.
Careful not to burn either. I generally microwave my chocolate at 50% power level for 45 second intervals to desired temperature or just to melt (depending on the application). Safest way is a double boiler.


What was in the package Nicholson gives to Damon?

Question: After Matt Damon's character in The Departed graduates the state police academy, he is picked up by Costello ("no more pencils, no more books"), and given a box as a graduation present. Though what is contained in the box is never identified, what are some probable theories as to the box's contents?
Comment: It is nothing specific, you decide what is in the box. Sometimes a director doesn't spoon feed every detail. I like the badge answer, it makes a lot of sense.
Comment: I think a watch for some reason too (cliche i guess) after a few viewings i kinda thought it was the knife, only thing is its not that amazing a knife and doesn't seem like a gift so much as something he bought himself. idk i guess its just up to the viewer.
Answer: The box is a pure Macguffin.
I've heard some theorize it contained the mobile phone he would go on to use, but I doubt this.
Another theory is that it contains money, or at least something valuable to help him get started up - hence why Costello tells him he's earned it.
Having said that, my own theory is that it is just something personal to Sullivan. It doesn't really matter what it is, just that it is something personal which evokes emotion from Sullivan and effectively further establishes the father-son dynamic between Sullivan and Costello for the viewer.
You might be interested to read the script for more information. It goes out of its way to point out that the box could contain anything:

COLIN walks over to the car. COSTELLO gives COLIN a BOX.
            COLIN flips open the top and then quickly closes it. NOTE:
            The box could contain an eyeball, money, drugs, a picture of
            Colin fucking his school teacher...we will never know.
COSTELLO
  School's out. You earned it. Yeah, no more teachers, no more books.
Answer: It doesn't matter what was in the box. What matters is that Sullivan became a cop moments earlier, and is already accepting gifts from a known criminal. He's fresh out of the academy and has already sold his soul to the devil.
Comment: He "sold his soul to the devil" long before he became a statie. Costello had been mentoring Colin to advance his ventures since Colin was a kid, as shown in the movie's intro. Costello wanted Colin to join the State Police so he'd have a man on the inside, as evidenced by Colin being in a position to warn him that phones were being used to track those involved in a suspected deal to sell computer chips to the Chinese. "School's out," because Colin made it into the department like Costello wanted, and his real work was just beginning.
Answer: whats in the box is the knife, same knife that he kills the asian in the back street with
Comment: Welcome to [Movies & TV](http://movies.stackexchange.com/tour). Can you provide any sources or proofs to back this claim?
Answer: I think it's his detective badge because next scene is him walking to the police plaza as a detective.
Comment: How would Costello, a gangster, have gotten ahold of the badge?
Comment: @JohnnyBones magic!


How to create a protected RSS feed

Question: We are planning to provide an RSS feed (from a Drupal site) to someone who is going to display it on their site. Is there a way to limit access to only this specific site or maybe provide an embed code they can use to display the feed on their site?
Answer: If you use Views to provide it then you can limit it by role/ permission (which will tie your user to a REST login process), else the Views RSS Feed Authentication module allows you to utilise basic auth or oauth.
There are plenty of options, but what you do will depend on how you intend to implement the feed.
Comment: Thank you for the suggestions Pobtastic. While we are updating to D8, we are still in D7 now. Any modules that will work with a D7 site?

Also, can you say a little more about how we might implement the feed? We have not provided a feed to a specific site in the past.
Comment: As I say, there are various methods of doing it - it really depends on the requirements of the site? At the very simplest, you could just use CORS? There is a module, but you could also achieve it with a few lines in your htaccess or apache config. If I were you, I'd stick with implementing it in Views - but it really depends on your developers, and how confident they feel about updating to D8?

How to create a protected RSS feed


Difference between application from VS08 Professional and Express

Question: Can I distinguish between compiled application from VS2008 Professional and Express?
Answer: No.  The same compiler is used by both.  The main difference is in the tool set included with Visual Studio, not the compiler.
Answer: No.  They both compile down to the same MSIL.  You are free to make, sell, and distribute applications written in the Express versions.  The difference is not in what the products produce, but in the tools that you have at your disposal.  The Professional version just gives you more bells and whistles, and makes development easier.
Comment: Visual Studio doesn't always compile into MSIL (ie: if you're using native C++), but otherwise, your answer is true.


Which registers should executable loader install before start a program?

Question: For example, I have simple C program that only have main function that just returns 0. What registers should loader (Linux exec loader, I guess) install before start a program? I didn't find information about this except stack pointer register.
Comment: Why do you need to know that? Possibly your problem can be solved in a different way? C standard does not discuss registers, and any answer given here would be necessarily platform-specific, and may vary from one version of the platform to the next.
Comment: Are you asking what an OS has to do to prepare the environment for a newly launched process (this does include quite a bit more than just setting a few registers)?
Comment: @user8734617 It's just satisfying my interest, there is no specific task.
Comment: @Mael In global - yes. I understand that it is more than setting some registers and it really depends on platform. I just want to know about main registers which set is necessary to start a program. Maybe the question is more about how exec create new process.
Answer: This functionality you ascribe to the loader is usually called crt0 or crt0.o.  It usually has an entry point called __start, that the operating system will transfer initial control to.
It is part of the basic C library code and it takes control of the new process, ultimately to invoke your main.  Depending on the environment it runs in it might have to actually open stdin & stdout, and collect the command line parameters into an argv array to pass to your main.  Initially as you suspect it may establish the stack pointer register, however, that may be done already by exec, depending of course.  It may also establish a (global) data pointer again depending on the architecture (if it uses one) and the operating system (whether it has already done this or not).
Since the C main is a 100% normal C function, the arguments will be passed to it using the same calling convention and register usage as most any other function with the same signature.  The calling convention varies across different compilers and operating systems, so a good bet is to decompile your C main and see how it accesses it's parameters.


How to prove H^2(g,J(g)) is nonzero for a semisimple Lie algebra g, where J(g) is the augmentation ideal of g?

Question: Suppose g is a fiinte dimensional semisimple lie algebra over a field with characteristic 0. This question is related to Whitehead's second lemma, which says for finite dimensional g-module M, H^2(g,M)=0. The solution of this question gives a counterexample to Whitehead's second lemma for infinite dimensional g-module.
Comment: I've voted to close as "too localized", as I think this is homework; but even if it isn't, this question is certainly not on the level appropriate for this site.  See FAQ for further information.
Comment: Alain- it's the ideal generated by the Lie algebra in the UEA (the kernel of the action on the trivial representation).  Every Hopf algebra has an augmentation ideal, which includes the group algebra and UEA examples.
Comment: Sounds like homework to me.
Comment: The question makes no sense to me, until the OP makes precise what is the augmentation ideal of a Lie algebra - I know of augmentation ideals for group rings, see http://en.wikipedia.org/wiki/Augmentation_ideal
Answer: This is false.  Consider the example of $\mathfrak{g}=\mathfrak{sl}(2,\mathbb{C})$, and let $J$ be the augmentation ideal of $U(\mathfrak{g})$.  Firstly $H^2(\mathfrak{g}, J) = \operatorname{Ext}^2_{U(\mathfrak{g})}(\mathbb{C},J) \cong \operatorname{Ext}^1_{U(\mathfrak{g})}(J,\mathbb{C})$ by Corollary 7.2 of Auslander-Gorenstein Rings by Ajitabh, Smith and Zhang.  Then by dimension shifting $\operatorname{Ext}_{U(\mathfrak{g})}^1(J,\mathbb{C}) = \operatorname{Ext}_{U(\mathfrak{g})}^2(\mathbb{C},\mathbb{C})$ which is zero by the second Whitehead lemma.
The question appears as Exercise 6.3 in Hilton and Stammbach's A course in homological algebra.  I guess they meant to ask about $\operatorname{Ext}^2_{U(\mathfrak{g})}(J, \mathbb{C})$ since they say to use the previous exercise which shows $\operatorname{Ext}^3_{U(\mathfrak{g})}(\mathbb{C}, \mathbb{C})\neq 0$
Answer: It seems that the idea of the question partly was to have a
counterexample to Whitehead's second lemma. However this can be easily given by considering Verma modules (which are infinite-dimensional).  F. L. Williams has computed the structure of the cohomology of a finite-dimensional complex semisimple Lie algebra with coefficients in an arbitrary Verma module, in the paper The cohomology of semisimple Lie algebras with coefficients in a Verma module, 1978. The results show that
the cohomology $H^2(\mathfrak{g},M)$ does not vanish in general for Verma modules $M$.


Is 4.5 hour layover long enough to leave Montreal airport?

Question: I have a 4.5 hour layover in Montreal, on my way to Europe.  Is that enough time to leave the airport and have a quick glimpse of the city?  As an American citizen, is there anything similar to TSA precheck to make the line back in quicker?
Answer: Probably not.
Depending on your airline, you may or may not be able to stay airside when connecting. However, if you chose to leave the airport, you would need to clear customs to enter Canada, which would take additional (potentially significant) time.
In terms of the trip to Montreal itself, it would minimally take about 30 minutes each way by car to get from Montréal-Pierre Elliott Trudeau International Airport (YUL) to somewhere interesting like the Old Port of Montreal. If you wanted to give yourself some amount of time to do anything there (say 1 hour), and a bit of wiggle room for traffic (say 30 minutes), and then time to get back through security (let's say another hour), you're looking at 3.5 hours alone. You also need to give yourself enough room to get to the gate before the doors to the plane close, which depends on the airline, but 10-15 is the absolute minimum.
Sum that all up, and you definitely don't have enough time to comfortably make a trip. If you had maybe 6 hours, or didn't have to clear customs, I might consider it. But there are too many risks of significant delays, particularly in traffic, customs and security lineups that add up to making this short of a layover not a good idea.
To answer your question about a TSA PreCheck equivalent, if you have a NEXUS card, you would be able to use the express line through the security checkpoint. This would also grant you expedited customs clearance when entering Canada, and access to the Global Entry lines when re-entering the United States, and access to TSA PreCheck.
Answer: A glimpse is possible within that time although you certainly won't be able to see much.
Assuming an on-time arrival and that your luggage is checked through, you can exit the airport fairly quickly. As anyone exiting the airport after arriving from another country, you need to do exit immigration which is generally quick, particularly for Americans. Figure about 15-20 minutes to deplane and arrive that immigration and then it rarely takes more than 15-30 mins unless arriving at particularly busy time.
Once exiting from the secure area, you walk less than 5 mins to the taxi stand and wait another 5-10 for a taxi which takes 25-40 minutes until downtown, depending on traffic and outside of rush hour. Even in rush hour, the
trick to take a taxi to Metro Angrignon which takes 20 mins and then you can will be downtown in the old for in 22 minutes from there. Totaling all this gives you up to 1:45 to get anywhere central.
For the return, use the same path, either taxi or metro followed by taxi which brings you to the airport in 45 mins. Nexus is available to get you back into the secure area quickly and Canada does not have exit immigration, so you can get to the gate within 30 mins. Then you have to be there early enough for boarding which happens at 30 mins to departure.
This leaves you exactly an hour downtown with virtually no margin for getting lost, stuck in random traffic behind construction, a snow plow, the metro breaking down or anything else that happens in Montreal.


Contact Form Magento2: move success message to form

Question: How to move success (not error) message into contact form?
Answer: hello dear I will implement your functionality in my project. please check the below code with the screenshot.
Please go to your theme directory
app/design/frontend/Magento/customtheme/Magento_Contact/layout/contact_index_index.xml

The above path "customtheme" is my theme name so please go to your theme. after in theme created a new folder "Magento_Contact"

this Magento_Contact folder created a new folder "layout" and in this folder created a new file contact_index_index.xml

Please add below code your new file contact_index_index.xml
this XML file in the body section adds the below code.
<code> <move element="page.messages" destination="page.wrapper" before="footer-container" />
</code>

I hope this solution works. so please accept my answer and give an upvote.
Comment: Sorry, but this doesn't work for me :(
Comment: ok means you want only the error message shown on the above footer and success message shown on the columns' top.?
Comment: I want to show success and error messages under the button submit which is into contact form. For now all messages are showed on the top of the page as you can see in my example
Comment: ok I understand you can go with the jQuery only contact page.
Comment: because I will share the code for this work for div. container wise. not any particular div add you want to. so, please you may go with jQuery.


What is this feature of IntelliJ IDEA (set build target in project's properties)?

Question: If you go to "Project Structure -> SDKs" and click on some Android SDK, you will see the screen below.

When I add some Android version for the first time, the build target is set to 1.5. It seems that IDE's intellisense is relying on this selection, because in the initial use (e.g. when the target is set to 1.5) I cannot use features like android:installLocation or android:targetSdkVersion. They're just not showing up in the intellisense. When I change the build target to, let's say, Android 2.2 and reopen the same project, these attributes appear in intellisense.
Could anyone explain what is the purpose of this and why does it set to Android 1.5 by default? It just makes no sense to me. I also haven't noticed this option in Eclipse.
Answer: Build target defines the platform that is used. So you normally don't need to change it. And it doesn't default to 1.5, it defaults to the platform version that you've chosen when adding the new SDK platform. So, if you add Android 3.2 Platform, build target will default to Android 3.2. I've verified it with IDEA 11.0.1.
If you change it to something else, it's the same as changing your project/module dependencies to use another Android platform, however the old SDK name remains that can make it really confusing. We are considering to make the build target and SDK home path settings read-only to avoid confusion.
Comment: Hm, all build targets in my IDEA has been downgraded to 1.5 and I am sure I did not do that. I will change all target to its corresponding levels manually. And instead of making this read-only, you could make a warning if the build target gets changed to something unordinary. I'm against read-only because how can a user revert build target to the right level if it somehow drops to 1.5, like in my case. Am I right?!
Comment: It should not revert, it's most likely a bug that needs to be fixed. If you'll find what triggers it, please submit and issue at http://youtrack.jetbrains.net/issues/IDEA.
Comment: Unfortunately, I do not know. I can guess that it's not a new thing as I previously had problems with using some SDK-specific attributes, but I did not know how to solve it. I think that it started in the late summer with the first update after IDEA 10.0.3. I'm sorry I cannot help more


How do I create a paragraph break in Google Form help text?

Question: I've looked on Google's product forums, and I can't find anything. The help text field is designed for brief text, but I want to insert a mulit-paragraph article. Without paragraph breaks, I wind up with a bunch of text that's difficult to read.
Answer: This has been bugging me for a long time and I've came up with a not so elegant but efficient solution based on Apps Script. Pavel Agarkov had the same idea! My version also works with multiple occurences and can be re-run if Google Forms removes the line breaks when you edit the text.

When editing a form, open the Script Editor from the main menu.

Create a new script, replace the content with the code below. Save it and return to your form.
Reload the page. You will notice a new option in the main menu, looking like this

That "Scripts" menu was added by our script. Don't use it for now, it won't do much.
When editing content, use fours spaces as a placeholder for line breaks.

Run the script from the Scripts menu. Now celebrate ♀

Some things worth noting:

You will get a permission request the first time you run the script. It's ok, read the message and do what you have to do.
Once the line breaks are there, Google Forms, god bless its heart, will remove them every time you edit the field. Mildly infuriating. Just run the script again.

The script you need to use is:

// From https://stackoverflow.com/questions/22207368/

function onOpen() {
  var ui = FormApp.getUi();
  ui.createMenu('Scripts')
    .addItem('Replace 4+ spaces with line breaks in Title and Description', 'addLineBreaks')
    .addToUi();
}

function addLineBreaks() {
  var theForm = FormApp.getActiveForm();
  var theQuestions = theForm.getItems();
  var thePlaceholder = new RegExp(/\s{4,99}|\n/, 'gi');
  for (i = 0; i < theQuestions.length; i++) {
    var theText = theQuestions[i].getHelpText();
    if (theText.search(thePlaceholder) > 0 ) {
      theQuestions[i].setHelpText(theText.replace(thePlaceholder,'    \n'));
    }
    theText = theQuestions[i].getTitle();
    if (theText.search(thePlaceholder) > 0 ) {
      theQuestions[i].setTitle(theText.replace(thePlaceholder,'    \n'));
    }
  }
}

Comment: If you change `thePlaceholder` to `var thePlaceholder = new RegExp(/ {4}(?![\n\r\t$])/, 'gi');` you can put multiple line breaks in.  With this regex, *each* 4 spaces will turn into a newline, and it checks to make sure there isn't already a newline there so that it doesn't keep adding newlines each time you run the script.  Also, use ` ` (space) rather than `\s` (whitespace chars) so it doesn't include anything besides spaces.
Answer: I found that you can't do it through the editor but it is possible via the script.
Go to main menu -> script editor;
past the following code to the editor;

function addLineBreaks()
{
  var form = FormApp.getActiveForm();

  // find form items you need
  var questions = form.getItems(FormApp.ItemType.MULTIPLE_CHOICE);

  for(i = 0; i < questions.length; i++)
  {
    var title = questions[i].getTitle();
    // if no replacement has been done yet
    if(title.indexOf("\n") < 0)
    {
      // this will add line break after <double space> like in markdown
      questions[i].setTitle(title.replace("  ", "  \n"));
    }
  }
}

then set up trigger to start this method on form open.
Comment: hey...   I think we definitely want  .indexOf  > 0 ,  no?
If you get this, maybe change :)   We can't Edit only one character :)
Comment: @MikeM - no, since this will be executed multiple times you need the replacement to be done only once. At least it was true for my case with `"B:"`
Comment: ah, I get your point...  I was thinking of other examples where the text in the string was also \n .  My bad :)
Comment: This doesn't work for me. I run this code and I get no CRs:

```javascript
  form.addMultipleChoiceItem().setTitle("What category does the project fall under?").setHelpText("http://github.com/alexa/alexa-skills-kit-sdk-for-nodejs\n\nThe Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.").setChoiceValues(['API','EDUCATION', 'GENERAL', 'DATASET'])
```
Comment: as I mentioned before - each time form is edited manually - all line breaks will disappear - you have to keep replacing something and adding `\n` each time.
Answer: I struggled with this question myself for too long!
However, when you know how its simple:
Go to "Add Item"
Choose "Section Header"
This option allows you to put paragraphed text into your Form.
Answer: As of June, 2018, the following work (but only the second option is documented):

Just put new lines in the description and it will be shown in the form - try using two for a paragraph.
If you want a bit more style - add a 'Title and Description' - see the second option in the tool bar showing 'Tᴛ'. The Title will always add extra space (even if it's empty) and will show any title as inverted, larger, text. You can disable the description if you just want a 'heading' followed by questions.
Answer: None of the above solutions worked for me, SO I added a unicode character https://www.compart.com/en/unicode/U+2002 pasted 4 to 5 times and this is how it looks
Answer: Sorry for the bad news, but this seems impossible to me.
Answer: I found the answer!  While in the box into which you are entering text, go to  Properties in the Developer tab.  You will get a drop-down menu.  At the bottom of the menu is "Plain Test Properties" with a check box for "Allow carriage returns (multiple paragraphs).
Comment: where do i find the developer tab in a google form? i cudnt find it
Answer: This is a better solution but based on the above.  It allows you to edit the form which amazingly the above solutions don't:
// Version 2020-10-07a: by Dennis Bareis
//         Handles "{nl}" in form & question descriptions
//         Forms API: https://developers.google.com/apps-script/reference/forms
// Based on     https://stackoverflow.com/questions/22207368/
// This code @: https://stackoverflow.com/a/64216993/3972414
//     [0] ... -> Script Editor -> Create New Script
//     [1] Paste into script editor
//     [2] Run onOpen()
//     [3] On first run authorise script
//     [4] This adds 2 scripts under a new button in the edit form UI
//         (to the left of the "Send" button)
//     [5] Use "START" before re-editing form
//     [6] Use "END" to publish the changes
//         5&6 required as otherwise you end up with "line1Line2Line3" etc

String.prototype.replaceAll = function(search, replacement)
{
        var target = this;
        return target.replace(new RegExp(search, 'g'), replacement);
};

//This doesn't perform the function on open, just adds it to the UI, you run when finished.
function onOpen()
{
  var ui = FormApp.getUi();
  ui.createMenu('Scripts')
    .addItem('[1] Prepare for RE-EDITING this form (restore {nl})',   'editFormStart')
    .addItem('[2] Publish the form (finished editing, remove  {nl})', 'editFormEnd')
    .addToUi();
}

function editFormStart()
{
  swapLineBreaks("\n", "{nl}")
}

function editFormEnd()
{
  swapLineBreaks("{nl}", "\n")
}

function swapLineBreaks(FromText, ToText)
{
  var form = FormApp.getActiveForm();

  // find form items you need
  var oForm     = FormApp.getActiveForm();
  var questions = oForm.getItems();

  // Fix the form's description
  var formDesc = oForm.getDescription()
  oForm.setDescription(formDesc.replaceAll(FromText, ToText))

  // Work through each question
  for(i = 0; i < questions.length; i++)
  {
    //var QTitle = questions[i].getTitle();
    //questions[i].setTitle(  QTitle.replaceAll(FromText, ToText));

    var QText  = questions[i].getHelpText();
    questions[i].setHelpText(QText.replaceAll(FromText, ToText));
  }
}


Are humans the only animal that requires "clean water"?

Question: I've seen a number of animals - dogs, cats, squirrels, ducks and geese, etc drink from puddles, some of them were muddy, others had green flora growing under water. Same goes for lakes and rivers. A human would not drink that. Do animals experience gastrointestinal discomfort or can they die from drinking water like that?
At the same time I hear about the problem of "clean water" in 3rd world countries and how diarrhea is the #1 killer of children under 5.
Are humans the only animals that require a certain purity of their drinking water? Why is it that a dog can drink from a puddle, but a human is likely to get sick from doing the same? Do baby animals get sick from drinking "dirty" water?
Comment: Humans are not naturally drinking animals. With a natural raw food diet high in fruit like the rest of our primate cousin we obtain all the water we need from food.
Answer: I wouldn't say that a human is "likely" to get sick by drinking from a puddle, I'd say "at some risk". It isn't desperately dangerous, although don't take that as a recommendation. There are many infections you can get from water (bacterial, viral, amoebal, and I presume fungal). You don't want to risk them, but probably won't actually encounter them in that puddle in your garden you see your dog drinking from. If the water is stagnant then the list of things in it that might hurt you is longer than if it's flowing. If you can avoid the mud, and anything that's been standing long enough to grow algae, fresh rainwater is a pretty good bet as these things go.
The same is true of other species, but the risk per drink is lower, since they drink it more and develop resistance to more of the things on the list. Humans are no different. For example some areas tend to have Hepatitis A in the tap water. The local population is immune after they've been infected once, and most childhood infections cause no symptoms, so it's not a problem for the locals. But to an unvaccinated visitor, the water's not safe. Hep A normally won't kill you, but is still well worth avoiding since it will make you sick for several weeks.
So basically, humans drink clean water because we can, not because we absolutely need to.
The lifespan of humans living "in the wild" (that is, populations prior to or independent of human agriculture) is pretty well agreed to be rather less than that of typical modern lifestyles. Water-borne disease is only one of many things responsible for that. The expected lifespan of a person used to purified water and so on, dropped into "the wild", is even lower again.
The "clean-water" problem in developing countries is primarily one of high population, relative to what the same area could possibly support in the absence of agriculture and other technology. The biggest risk of water-borne disease comes from contamination by human waste (although there are other sources, for example rats can contaminate water with Weil's disease). A small group of humans living in a large area doesn't have to worry about human contamination, they just drink upstream of where they defecate. This strategy doesn't help much once the population is dense enough that someone else is doing the same thing 20 metres away from you.
And of course, human agriculture also supports a much higher rat population than would otherwise be present (they're omnivores too, so they'll eat pretty much any food humans do). I suspect most human disease can be blamed on agriculture one way or another: if not on the animals then on the close-quarters living. If the population of humans was closer to what it was in the palaeolithic (a few thousand or tens of thousands of people in Europe), and was used to drinking from natural sources, then the water would be mostly (not entirely) safe.
So it's not so much that humans need perfectly clean water, it's that humans have figured out how to live in populations so large that we tend to make all the nearby water particularly dirty. Other species aren't completely unaffected by this, but they are less affected because our waste is specifically contaminating the water with diseases that affect us.
Comment: @Pacerier: (1) I don't know the mechanisms, but there are several diseases which are less severe if contracted in childhood. I would guess that a visitor who happens to be a young child similarly would most likely suffer no symptoms from Hep A, but don't take my word for that! (2) Other animals do ruin water for their own use to some extent, but their populations tend to be limited by other things first. Humans have developed technologies to work around many limits on our population density, to the point where we gained the opportunity to make fouling the water a limiting factor.
Comment: Dense population sounds plausible.
Comment: @Steve, Btw, **1)** for the local population, why does "childhood infections cause no symptoms" yet "it will make you [visitors] sick for several weeks"? Also, **2)** regarding your last sentence, why is our waste contaminating the water with diseases that affect us, yet " contaminating the water with diseases that them" doesn't happen for other animals?
Comment: Just to add to the above: faeco-oral/waterborne transmission is a classic example of a density-dependent transmission pathway - increased population density results in more frequent transmission, so modern population densities are certainly a key factor.
Answer: Animals do sometimes experience health problems from microbiologically polluted water. But they drink it, because they probably don't have as many options to choose from as humans have. Additionally, wilderness is very harsh, sick animals get eaten by predators quickly, so the short term evolutionary selection pressure in wilderness works very strongly in favor of good immunities in animals. So yes, I would expect animals would be a little less sensitive than humans, but still susceptible to illnesses. When I searched for examples about dogs I found:

"Giardia and Cryptosporidium [...] can cause inflammation of the intestinal tract and diarrhea when in gested by dogs (or people) even in small numbers. Most dogs with healthy immune systems are able to recover from this infection but severe diarrhea may, in some cases, lead to dehydration and significant illness. Puppies and older dogs with other underlying health issues may be more severely affected. Leptospirosis is a less common [...] illness transmitted by bacteria. [It] may lead to fever, lethargy, vomiting, kidney failure, liver failure, and even death in some untreated individuals."

Another webpage talks about wildlife water-borne illnesses. Giardiasis, leptospirosis and tularemia affect animals as well as humans.
Answer: Also, I guess civilization would have its effects on the human immune system (both positive and negative).
The more exposed you are to microbiological pathogens, the better the chance of developing a more robust immune system.
In a very civilized (or rather a very clean) environment, humans would not be exposed much to external pathogens and hence would not have developed immunity to many of the diseases caused by those pathogens.
In comparison, people who live in "less clean" environments (take some of the 3rd world countries for example), would be exposed to a higher level of pathogens and would naturally develop immunity to more diseases.
There's a Reddit discussion on this.
The same applies to humans vs animals I guess. Animals don't usually live in artificially clean environments and hence develop a better immunity.
Comment: Scientific sources for this guess would be great. The reddit-link is great.


View endpoint in glassfish is not visible when webservices project created using intellij

Question: I am quite new to Java EE and as my first project I created a webservices project in Intellij according to the method described here. When I run the project and deployed it using glassfish and viewed the application in http://localhost:4848/ I can't see view endpoint link in the grid Modules and Components when I had clicked on the app I deployed. Any idea what might be wrong with my methods?
Answer: Dose your web-service in the default package ?
I have came across with same issue, and as i passed the web service to custom package and redeployed it ,the view endpoint appeared..
Comment: What do you mean default vs. custom package?
Answer: I had the same problem today but I use Eclipse Oxygen and Glassfish 5.0 with JDK1.8.0_151 : It miss last line in the array at the bottom of this screenshot :

After a lot of search and tests, I found a blog ( http://meveekay.blogspot.fr/2016/09/view-endpoint-is-not-available-on.html ) that propose the content of the following file :
WEB-INF/web.xml
In fact, you have just to replace the older content by a more recent.
Explaination :
Situation 1 : When I open a new Maven project from Eclipse Oxygen based on archetype "webapp"; the project contains an older web.xml. The content use again DTD for  declaration.

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
  <display-name>Archetype Created Web Application</display-name>
</web-app>

Situation 2 : When I open a new JavaEE project from Eclipse Oxygen, the web.xml content use XML schema for  declaration.
Finally the good web.xml content for today is this one :
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
    http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
    id="WebApp_ID" version="3.1">

  <display-name>Archetype Created Web Application</display-name>

</web-app>

After "mvn clean install" to regenerate war file, redeploy it and constat the line with "View Endpoint" link appear ... Enjoy !!!


deploy a war into EC2 using cloudfoundry console

Question: I have been trying hard to deploy a java application through cloudfoundry into an Amazon EC2 instance using the console as described in this screencast video on cloud foundry.
http://classic.cloudfoundry.com/screencasts.html
but only failing to get the console where I can deploy by choosing a war from the local file system, as explained in the video..
What is the correct URL where I can find a console similar to the one shown in the video ??
And I have already tried signing up for the url http://classis.cloudfoundry.com, but not getting an approval or acknowledgement mail from the team even after 4 days..
Did anyone face similar issue in the recent times?
If yes please help!
Answer: The Cloud Foundry Classic service (at http://classic.cloudfoundry.com) is no longer accepting new accounts.