Why is everything created spiritually before physically?

Question: According to LDS doctrine, why are we created as spirits before we can receive a body? On earth, all creatures are born with the same bodies as their parents. In the preexistence, why are the children of God born/created out of different matter (spirits) than our heavenly parents? Our Father in Heaven is a physical being. If we are literal offspring of our Father in Heaven, then why aren't we born in the pre-earth life with a physical body, the same as our Father in Heaven?
Comment: Maybe you could consider the analogy of a frog being born as a tadpole.
Comment: We are physical and spiritual beings. Our spirits receive bodies, and we become body and spirit. When we die, our spirits and bodies separate, and when we're resurrected, they're reunited again. So, spirits aren't different matter from our Heavenly Father. He has both body and spirit (glorified and perfected). The following is speculation: Maybe we're children of his spirit, not his body. Further speculation: If we were all children of his body, then we wouldn't be able to be parents and children during our mortal life, and we'd miss out on a lot of experience and physical nurturing.
Comment: In your question title, it seems like you're paraphrasing Moses 3:5. "All things" being prepared spiritually first could be interpreted a few different ways – maybe it just means all things were planned out in detail before they were physically created, or maybe it means that everything – from rocks to people – has a spiritual equivalent.
Comment: We are spiritual offspring, not physical offspring (except Jesus Christ).
Answer: Technically, we are not first created as spirits. This is a simplification. We existed as intelligences, which are not clearly explained, and later formed into our spirits by God.

Man was also in the beginning with God. Intelligence, or the light of
truth, was not created or made, neither indeed can be. D&C 93:29

Speaking of this topic, Marion G. Romney has said:

In origin, man is a son of God. The spirits of men "are begotten sons
and daughters unto God" (D&C 76:24). Through that birth process,
self-existing intelligence was organized into individual spirit
beings.

After that physical form was created to house the spirits.

Our bodies, my brethren, our minds, are the tabernacles of our
spirits. - Gordon B. Hinkcley

By extension, it is reasonable to believe that all life also came from intelligences, which may not have been suited to become human. Therefore things are created or organized spiritually first, because without the spiritual existence there is no purpose in the physical creation.
For further reading, I recommend the article on Intelligences in the Encyclopedia of Mormonism
Comment: Very good answer. So then do the children of god undergo a type of metamorphosis during their lifecycle? We begin as intelligence; then undergo a birth process into a spirit body; a pupal stage on earth; then we're resurrected with perfect immortal bodies?
Comment: `"The question of whether pre-spirit intelligence had individual identity and consciousness remains unanswered."` I had never even considered that "pre-spirit" intelligence *could* have had consciousness. That article pretty much answers my question.
Comment: @ShemSeger Yeah, it's not really been revealed specifically. But I would assume there was no consciousness at least not in any meaningful sense. Consider that are bodies are created out of a careful combination of otherwise inert substances, there's no good reason to believe that our spirit bodies are any different. The fact that _we_ can't create spirits only makes sense. "All spirit is matter, but it is more fine or pure, and can only be discerned by purer eyes;" [D&C 131:7](https://www.lds.org/scriptures/dc-testament/dc/131.7?lang=eng#6)
Comment: While Moses 3:7 states that before anything was created physically it was created spiritually. This is as true for the earth we stand on as the human race.  John A. Widtsoe has a great discussion on this topic in his book [_Joseph Smith as Scientist A Contribution to Mormon Philosophy_](http://www.gutenberg.org/ebooks/34362).
Answer: God is both spirit (John 4:24) and physical (Luke 24:37-39).  Also, spirit beings (unembodied or disembodied) may be more physical than we realize.  Joseph Smith taught, "There is no such thing as immaterial matter. All spirit is matter, but it is more fine or pure, and can only be discerned by purer eyes" (Doctrine & Covenants 131:7).  Moreover, a careful read of the creation in Genesis suggests a spiritual and then a physical creation (https://rabbidaniellapin.com/the-chimp-and-i/).
Comment: JST John 4:26 For unto such hath *God promised his Spirit*. And they who worship him, must worship in spirit and in truth.
Comment: ShemSeger, Good point.
Comment: All add from lds.org:  "[God the Father's] eternal spirit is housed in a tangible body of flesh and bones" (https://www.lds.org/manual/gospel-principles/chapter-1-our-father-in-heaven?lang=eng).
Answer: Let's walk through this logically.  Christ was The Great Jehovah in the Old Testament.  He was a spirit.  He didn't magically conjure a physical body.  He was born of Mary into a physical-mortal body.  So, it's plausible that we had a similar or the same kind of origin: existing as spirits first, and then gained physical-mortal bodies.
Christ passed through death - just like we all pass through death.  He was resurrected.  Resurrection isn't being resuscitated or brought back to life to finish living in a mortal body.  It's gaining an eternally alive body.  We will also all be resurrected.  So, it's plausible that we had similar origins and destinies as Jesus Christ.  See Romans 8:16-17.
If you believe the words of modern-day Prophets, you have assurance that this isn't only plausible, but is true.  But more important than citations and facts, all the words of the Prophets, and many scripture references is the whispering of the Holy Ghost.  You can know for yourself through study, experience, and prayer if you have that promise.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Answer: God knew us before we were born here ( of water/woman).( Jeremiah 1:5; Psalm 82:3-4)
We were formerly with him as his sons ( Angels/spirits).
Jesus said "you must be born of water and the spirit to enter into the Kingdom of God."( John 3:5)
A third of the Angels sinned and were removed, cast to earth.
( Ezekiel 28; Isaiah 14; Revelation 12:4)
Our allotted time here is to 'run a good race and finish and return to our Father. (2 Timothy 4:7-8;,Ecclesiastes 3:21; 12:7; )
I think this life and time here is a time and place for testing; to come into relationship with our Heavenly Father and His Son, our brother Jesus.
( Mark 3:35)
Comment: Welcome! Sadly, this answer seems to just express your opinion, which isn't what this site is about. It would be much stronger if you demonstrated that it reflects the teaching of the LDS church, as requested in the question. I hope you'll take a minute to [how this site is different from others](http://meta.christianity.stackexchange.com/a/1809/21576), and review how [your answer can be supported](http://meta.christianity.stackexchange.com/q/692/21576).


Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

Question: while runnig the ssis package i'm calling sp in the ADO.net source,but getting this error
Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.I have set the command timeout to 0(infinite time),but still getting the error.The sp is working fine in sql server and taking approx 31 seconds for executing it,but in ssis its throwing error..please help me on this.Thanks in advance.
Comment: Check out [this post](http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/eeff8fe6-620d-425e-b939-08c2cb66e3e2).  It turns out you may see a timeout error when it's really a truncation error.  Also, you can extend the client timeout, but still hit a server timeout.  Extending the server timeout uses syntax like `EXEC sp_configure 'remote query timeout', 6000`
Answer: Check out this bug report - there is a sp in the SSISDB database in SQL Server 2012 causing packages to time out before they start running.  I had error message "Failed to execute IS server package because of error 0x80131904" and "Description: The operation failed because the execution timed out" when calling multiple (more than 10) packages from my scheduling tool via DTExec.  Please vote for the issue on the connect site so that MS can release an official fix.
Answer: Today, I was experiencing the same error while using the ADO Net Source, my sp works fine on the SSMS, but fails in the package, while In the package, it errors our with a long laundry list of errors, but basically it is timing out.
Solution is Right click on the ADO Net Source - Show Advanced Editor - Component Properties - Custom Properties - CommandTimeout - Increase the time here
Comment: it's solved my problem after a long search!
Answer: I had the same problem in SSAS.
The way I sorted this out was extending the client and server time out settings.
you can see more details in the link below:
routine to backup ssas databases fails with: The XML for Analysis request timed out before it was completed


Tape substitutes to prevent flats in mtb inner tubes?

Question: There are products (tapes) on the market that protect mtb inner tubes from flats.  Apparently, these tapes go over the inner tube and are puncture resistant.  I'm wondering if there are substitutes for these commercial tapes that some of you are already using.
Comment: I assume the idea is to get puncture protection as cheaply as possible.  Is that right?
Comment: Just buy a tyre with a good built-in flat protection. For experienced people, tubelesss is also a good option, depending onmany factors.
Answer: They're more often known as tyre liners, and are usually polyurethane, about 2mm thick.
I've used them on a cheap bike, that was worth less than a decent set of tyres, and eventually had trouble with the end wearing a thing patch in the tube - but they kept the broken glass and other debris out successfully.  Tyre liners are already the cheap option.tyre liner material
I'm not aware of a substitute source of the same material, which is rather thick, unlike most things sold as "tape".  What people have been known to do in the past is put an old (unpatchable) inner tube, with the valve cut off, into the tyre before installing the real tube.  That effectively triples the thickness of the tube where it matters.  PU sheet that I can find easily is far more expensive in practice, because it's sold in large pieces
It should be possible to put an old tyre in there, with the beads or the whole sidewalls cut off.  That would be thicker still than the old tube, and of course is tougher rubber.  You'd need to cut across it so it would fit flat, and probably trim off the overlap.  This could be a bit of a pain to fit.
Generally speaking the best option is puncture-protected tyres.
Answer: They're puncture resistant-ish, they can be a faff to install, they will increase your rolling resistance... I had them in my commuter's tyres as the spikes came through the tyre and pierced my tubes, but it's more a stopgap.
It WILL protect against something coming through your tyre, however with MTBs the most common punctures are snakebites, and they don't protect against that. And when you get a snakebite you'll have the additional faff of putting them in again after you patch up the tube. They do kinda work, but the question is, is it worth it? To me, no.
Comment: In my commuter I found they took the shape of the tyre after a while, but I used duct tape to secure the ends when installing; that helps a lot


How is a judge to evaluate a witness's credibility?

Question: How is a judge to evaluate a witness's credibility?
Answer: canada
I suspect this approach is consistent with most common-law jurisdictions, but other answers for comparison would be great.
First, there is a distinction between credibility and reliability. R. v. T.T., 2020 ONCJ 368:

... I note the differences between credibility and reliability.  Credibility relates to a witness's sincerity, whether he is speaking the truth as he believes it to be. Reliability relates to the actual accuracy of his testimony.  In determining this, I must consider his ability to accurately observe, recall and recount the events in issue.  A credible witness may give unreliable evidence.

And also, R. v. Morrissey (1995), 22 OR (3d) 514:

Testimonial evidence can raise veracity and accuracy concerns. The former relate to the witness's sincerity, that is, his or her willingness to speak the truth as the witness believes it to be. The latter concerns relate to the actual accuracy of the witness's testimony. The accuracy of a witness's testimony involves considerations of the witness's ability to accurately observe, recall and recount the events in issue. When one is concerned with a witness's veracity, one speaks of the witness's credibility. When one is concerned with the accuracy of a witness's testimony, one speaks of the reliability of that testimony. Obviously a witness whose evidence on a point is not credible cannot give reliable evidence on that point. The evidence of a credible, that is, honest witness, may, however, still be unreliable.

About credibility, see R. v. Gagnon, 2006 SCC 17, paragraph 20:

Assessing credibility is not a science. It is very difficult for a trial judge to articulate with precision the complex intermingling of impressions that emerge after watching and listening to witnesses and attempting to reconcile the various versions of events.

Other courts have listed some of the factors that might be relevant.
R. v. J.T., 2019 BCCA 180 says the factors include:

"a witness's demeanor in the witness box, although it is recognized that it would be dangerous to rely wholly on demeanor to convict";
"internal inconsistencies in a witness's testimony at trial and/or external inconsistencies in a witness's testimony with prior testimony or out-of-court statements";
"any explanation by the witness for the inconsistencies";
"any consistent evidence or corroborating evidence to support the witness's evidence, although corroboration is not a requirement"; and
"how a witness withstands cross-examination."

There are prohibited approaches to assessing credibility. Section 276 of the Criminal Code says that "evidence that the complainant has engaged in sexual activity... is not admissible to support an inference that, by reason of the sexual nature of that activity, the complainant... is less worthy of belief." It is an error to infer from a delay in reporting sexual assault that the complainant is less credible: "the trier of fact must not make an adverse inference on the complainant's credibility based purely on the stereotype that any delay in disclosure indicates falsehood." R. v. D.D., 2000 SCC 43. It is also an error to "[judge] the complainant's credibility based solely on the correspondence between [their] behaviour and the expected behaviour of the stereotypical victim of sexual assault." R. v. A.R.J.D., 2018 SCC 6.
Answer: When it comes to determining a witness's credibility, judges and juries acting as finders of fact have several factors to take into account. For brevity, let's call those just "judges".
First and foremost, they will look at the witness's testimony itself. Does it make sense? Are there any inconsistencies? Are there any other witnesses who can corroborate the story?
Judges will also consider the witness's demeanor on the stand. Is the witness composed and relaxed, or are they nervous and fidgeting? Witnesses who seem nervous may be less credible, especially if they are changing their story from what they originally said.
Finally, judges will also consider any biases or ulterior motives the witness may have. For example, a witness who is related to the defendant may be more likely to give favorable testimony. All of these factors will be considered when a judge is determining whether or not to believe a witness's testimony.
Comment: This stems from a civil law jurisdiction, such as [tag:Germany] or [tag:France] where there is no jury, yes?
Comment: @Trish French has a jury system for serious crimes (since the Revolution, though recent changes have abolished the jury in the first instance in certain cases). But for this purpose, jury members are also "judges" and deliberate conjointly with professional magistrates.
Comment: @xngtng Gotcha, so you mean Judge as stand in for "finder of fact"


How to convert my Android contacts to iPhone?

Question: I was using an Android phone which has 1500+ contacts, and I don't want to miss them because now I am using an iPhone and I want to convert all Android phone contacts to iPhone. Is there any solution which can help me?
Answer:
Download and launch iTunes.
Connect your iPhone to the computer.
Open the handset's device summary page.
Click the Info tab.
Check "Sync Contacts With" and then select "Google Contacts".
Type your Google account's username and password.
Click Apply.
Comment: Nobody mentioned Google. Maybe the contacts only exist in the phone itself...
Answer: There's an Apple app available on the Google Play Store designed to help you migrate - Move to iOS
From iMore - How to move your photos, contacts, and more from Android to iPad and iPhone which also has pictures & additional links to Google software available for iOS

Set up your iPhone or iPad until you reach the screen titled "Apps & Data".
Tap "Move Data from Android" option.
On your Android phone or tablet, open the Google Play Store and search for Move to iOS.
Open the Move to iOS app listing.
Tap Install
Tap to accept the permissions request.
Tap Open after it's installed.
Tap Continue on both devices.
Tap Agree and then Next on the Android phone or tablet.
On your Android device, enter the 12-digit code displayed on the iPhone or iPad.

After entering the code, the Android device will connect with your
  iPhone or iPad over a peer-to-peer Wi-Fi connection and determine what
  data will be transferred.
It will ask whether you want to transfer your Google Account info (so
  that you can quickly log in on your new Apple device), Chrome
  bookmarks, text messages, contacts, and the photos and videos in your
  camera roll. Select everything you want to move over.
Connecting to the iPhoneSelecting what data to transferTransferring
  data
Your Android phone or tablet will transfer the selected data over to
  your iPhone or iPad and place the appropriate content into the correct
  apps. The two devices will disconnect and Android will prompt you to
  take your old device to the Apple Store, where they'll recycle it for
  free, although you could just sell it yourself.
Once the transfer process is complete, tap on Continue Setting Up
  iPhone or Continue Setting Up iPad on your device and carry on
  setting up a new Apple ID or logging into your existing one.
Once the setup process is completed, you'll be prompted to log in to
  the accounts you transferred from your old Android device. Do that,
  and then you're good to go!


What is the distribution of min{0,X} when X follows some general normal distribution?

Question: What is the distribution of $\min\{0, X\}$ when $X$ follows some general normal distribution?
Comment: Maybe it can help to know that $\forall x,y\in\Bbb R,\;\min(x,y)= \dfrac{x+y-|x-y|}2$.
Answer: Suppose $X\sim N(\mu, \sigma^2)$ with CDF $\Phi(\cdot; \mu, \sigma^2)$. Then you can calculate the probability $p$ that $X>0$, by taking
$$ p = 1- \Phi(0; \mu, \sigma^2) $$
Then $Y:=\min\{0,X\}$ is a mixture between

a point mass at $0$ with weight $p$
and a truncated normal distribution with parameters $\mu$ and $\sigma^2$, truncated from above at $0$, with weight $(1-p)$.

This is also known as a "censored normal distribution". You may be interested in previous threads tagged both "censoring" and "normal-distribution". We have a thread on the mean and variance in the multidimensional case.
Comment: +1.  However, censoring may be a little more refined than suggested here.  You describe a "delta (truncated) normal" distribution or "zero inflated" truncated normal, rather than a censored normal.  The distinction is that in the present case the zeros will be evaluated as zeros whereas with censoring the zeros are considered to be the intervals $[0, \infty).$ This isn't a superficial difference: it changes likelihood calculations for instance.
Answer: We have a simple answer for the distribution of $\min(0,X)$ for any random variable $X$ in terms of its distribution function.
Suppose $Y=\min(0,X)$. That is, $$Y=\begin{cases}X&,\text{ if }X\le 0\\0&,\text{ if }X>0\end{cases}$$
Trivially, a plot of $y=\min(0,x)$ for real $x$ would look like

Then distribution function (DF) of $Y$ is simply
$$P(Y\le y)=\begin{cases}P(X\le y)&,\text{ if }y<0\\1&,\text{ if }y\ge 0\end{cases}$$
For $X\sim\mathcal N(\mu,\sigma^2)$, we get
\begin{align}
P(Y\le y)=\begin{cases}\Phi\left(\frac{y-\mu}{\sigma}\right)&,\text{ if }y<0\\1&,\text{ if }y\ge 0\end{cases}
\end{align}
, where $\Phi$ as usual is the DF of standard normal distribution.
As already mentioned, $Y$ has a mixed distribution as it contains the mass point $0$ for $X>0$ as well as having a continuous part for $X\le 0$.


Software to convert midi to sheet music

Question: I am a music student looking for software that can convert midi files to sheet music. Are there any programs for Ubuntu like the Windows programs Notation Musician or MidiNotate Player?
Answer: Try MuseScore. It's also in your package manager:
sudo apt install musescore

Or install it via snapcraft.io. Using terminal:
sudo snap install musescore

Answer: There is the package abcmidi that provides the application midi2abc, capable of converting midi files to abc file.
sudo apt install abcmidi
midi2abc prelude.mid > prelude.abc  # midi to abc notation format
yaps prelude.abc  # abc format to postscript
evince prelude.ps  # open with evince

abc files can be easily converted to something printable with yaps from the package of the same name.
Answer: Rosegarden is mainly a full blown MIDI sequencer but it also comes with a quite professional notation feature to convert MIDI data to scores:

Depending on your needs in case you only need a small piece of MIDI to transform it to scores this may be overkill, but if you need to edit these files or start composing you may need one or the other of it's additional features.
Comment: excellent tool, easy to use and powerful features. however, the pdf export ("print preview") is very buggy for me, to the point of not being usable.
Answer: TuxGuitar is similar to GuitarPro for Windows. You can import midis, edit sheet music, and export to ASCII, PDF, and others.
sudo apt install tuxguitar

Software to convert midi to sheet music


Did some early jet engines catch on fire at higher power settings?

Question: Recently I've being playing some IL-2 1946, and in this flight simulator jet engines had a strange problem where if I suddenly throttle up more than 60% the engines would catch on fire. Is this a real thing? The engines that this happens on are the Jumo 004 and the BMW 003 on the Me 262 and the He 162.
Answer: Yes indeed. For the Jumo 004:

[A] shortcoming of the engine, common to all early turbojets, was its sluggish throttle response. Worse, it was fairly easy to inject too much fuel into the engine by throttling up too quickly, allowing heat to build up before the cooling air could remove it. This led to softening of the turbine blades, and was a major cause for engine failures.

To avoid rapid movements the levers of that era (and still being used on some types) had a friction setting that can be increased on decreased. High friction results in more force required to move the thrust lever.
Advancements in the hydromechanical units and the introduction of engine control units made controlling a jet engine much easier.
I remember reading (but I can't seem to find it now) that Frank Whittle had problems shutting down one of the early jet engines he worked on. It would just keep running and speeding up.
Comment: The materials shortages that prevented production J004s from using the high-temperature alloys the engine was designed to use surely didn't help in that regard...


What happens when you grow your plants in essentially worm castings?

Question: I've heard of people adding worm castings to their garden soil, but what happens if you're on the worm casting extreme, and plant directly into worm castings?
Answer: While vermicompost does provide many nutrients it will not provide all the nutrients that  plants need to grow properly. For instance, vermicompost lacks magnesium; also consider it's pH is roughly >=7 which is neutral, if not akaline, on its own. Most plants enjoy growing in a medium which is slightly more acidic (5.5-6). So while you might find some success planting directly into vermicompost I believe that if you compared the growth of the same species of plant in, say.. a 50/50 mix of vermicompost and peat, then you would see: healthier, faster and more vibrant growth from those plants then you would from the ones that have been planted directly into vermicompost.


Safety regulations (USA) for high-power LED brightness (e.g. 1+ W)

Question: For a "mostly" shielded sequence of 1 W where a user will see light bleed through small gaps in a device and (for argument's sake) might see a direct reflection of one of these 1 W LEDs (a multi-die LED with red and green sources), are there any obvious national/international regulations I'm going to need to be in compliance with that relate specifically to optical brightness? Not EMI/EMC restrictions, not electrical compliance, just optical brightness, like for lasers with e.g. 3A/B classifications.
Comment: ANSI z136.1 covers exposure of high powered light sources to the retina.  You should make sure you are under the exposure limits defined in the spec, which is usually not too hard with LEDs unless you're relatively close to them.
Comment: How far away are the people's eyes from your 1W leds?  Are there any lenses or curved mirrors?
Comment: So why did you tag this EMC if that's not what the question is about?
Answer: Obviously, for any safety-related work, it's your responsibility to ensure you're complying with up-to-date legislation for the appropriate jurisdiction.  The following is from experience in the UK installing laser systems. The following should be taken as guidance on general principles only.
The legislation on non-ionising radiation defines limits in terms of how much energy can reach which parts of the body.  As the most sensitive part is the retina, and the highest (spatial) density energy is from lasers, we normally concentrate on those, but the same regulations cover other kinds of bright lights such as welding arcs, other parts of the body in particular skin.  I believe the core documents are IEC and are substantially the same in most jurisdictions.
It boils down to this:

You work out the divergence of your light source.  In a laser, all the energy is a in a small beam, with a divergence of a small angle, perhaps 1 mrad.  For a wider beam, the energy is limited by the human pupil, nominally a 7 mm circle
The blink response is nominally 0.25 s, which limits the time of exposure
Your overall system will allow people to get only within a certain distance by physical limitations (perhaps it's mounted on the ceiling)
You calculate your irradiance (power density) from your optics and power and exposure distance. Result in W⋅m-2  And then the energy in J⋅m-2
You compare your energy with the maximum permissible exposure (for skin or eye as appropriate), which is typically calculated for a given length pulse with MPE = 18⋅ t0.75 J m-2 (eyes visible light, 1 ms to 10 s duration, from EN60825-1:1994 via HSG95.)

In practice you're using a reflected source with high divergence, so you're almost certain to be way within limits for the light exposure from the brightness. But you still have to do the calculations, obviously.
You're still going to have to address risk factors other than specifically brightness per your question.  (For example, in ships there are regulations about disturbing the eye's night-adjustment for devices on the bridge.)
A common other issue for regulation is for stroboconvulsive triggering, which is normally done by keeping strobing below 5 Hz.
References

AOR A very good starting point is the guidance on "artificial optical radiation" from the Health and Safety Executive, a British government body. link.
CAORAWW The Control of Artificial Optical Radiation at Work Regulations 2010 link
HSG95 A good summary is in in The radiation safety of lasers
used for display purposes (HSG95) from the Health and Safety Executive, copy.
EN60825-1 European standard Safety of laser products - Part 1: Equipment classification, requirements and user's guide The IEC and the BSI have matching numbers for the same standard. Superseded 2007 version
Changes in IEC 60825-1 The new edition of the international laser
product safety standard IEC 60825-1 link
Comment: As a simple rule of thumb, would the laser safety thresholds be a good guideline for when you need to run the calculations? It other words, if your LED, treated as laser, would be considered safe under the laser safety regulations, then you should be fine, whilst if it is higher power than that you should run the calculations to ensure its safe? Because it seems like a laser is the worst case for divergence.
Comment: @user1937198 yes this is absolutely correct, you can use lasers as a worst case and consider yourself safe by a large margin.  The only difficulty with this is the margin is *enormous*.  For example, a projector with image of 1 m2 is 25,000 pupil-areas, which dilutes the power a lot.  Typically, too, non-focussed systems have such high divergence that once you get even  a metre or two they no longer count as "bright".
Comment: Therese probably a large margin, but I was more thinking of lasers as the point at which you are safe enough you don't need to think about it, vs as you said, you need to run the calculations and work out appropriate precautions. After all, your projector could still be dangerous if someone is stupid and decides to sit directly in front of the lens and stare into it. Or are there some tables somewhere of equivalent power levels for 'so long as you stay 1m away whilst its active you are fine'?
Comment: @user1937198 For the most part, safety specs define permitted energy per angle/area onto the retina without specifically defining the generation mechanism. So if X is safe generated by a gas laser, it's also safe generated by a laser diode or a diode that is emitting without lasing. In practice though lasers are much brighter so it's usually a laser that, after calculating, you find is dangerous.
Comment: @user1937198 I use 1 metre square at 1 metre distance for my benchmarking (approx 1 steradian), and either blink-time or indefinite.  For indefinite, the limiting case is a power 0.01 W/m2 (in HSG95 and IEC), and as that is 25984 retina areas, it is is 260 W.  By normal standards this is very bright indeed!  Full overhead sun is approx 1000 W/m2.  **All of these are too bright for sustained viewing**  But that shows you how bright, or how localised, you need to be to violate the intensity exposure MPE.
Comment: A fabulous answer, thank you! This is something I can work with to at least get a sense of whether I need to do a lot more work, or whether I can call it a day :)
Comment: Glad it helped you.  It's a summary from the specific laser training course I went on and the required development for some laser installations.  If you're using 1 W leds, you're going to need a lot of them, or have focussing optics, or put them right next to your eye to get anywhere near the limits of these regulations.  To repeat, things which are unbearably bright (like a few 1W led on a workbench) can be very, very unpleasant but are not close to these limits.  But obviously do your own calculations based on your power, optics etc.  Let us know how you get on!


Updated Ruby to 1.9.3, Gems on existing app now causing errors

Question: I have written a Rails app in Ruby 1.8 with various gems all working without issue. Via RVM, I'm now running 1.9.3 (and yes, I do need 1.9.x), but the development server won't start, instead throwing the following error:
<code>$ rails s
/usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bigdecimal-1.1.0, bundler-1.2.4, io-console-0.3, json-1.5.5, minitest-2.5.1, rake-10.0.3, rake-0.9.2.2, rdoc-3.9.5, rubygems-bundler-1.1.0, rvm-188.8.131.52] (Gem::LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:1208:in `gem'
from /usr/local/bin/rails:18
</code>
So, I imagine the app at least is still looking for 1.8 gems. What do I need to do?
<code>$ ruby -v && gem -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
1.8.25
</code>
UPDATE
Running
<code>gem install railties
</code>
appeared to work, but railties still didn't show up in gem list and the server still wouldn't start. For the hell of it, I tried it again, and this time the gem (and its dependencies) do seem to have actually installed.
However, I still need to run bundle install, which (after specifying the correct Ruby version in my Gemfile) gives me the following ..
<code>$ sudo bundle install
Your Ruby version is 1.8.7, but your Gemfile specified 1.9.3
$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
</code>
Comment: Have you tried `gem install railties`?
Comment: @Linuxios I hadn't - just did, and while the install proceeded as normal, the same error is thrown (although it now complains about

    /usr/lib/ruby/vendor_ruby/**1.9**/rubygems/dependency.rb

at least). Weirdly, gem list doesn't show railties.
Answer: This was being caused by a conflict with Ruby 1.8. Removing that (by plain old apt-get) fixed the issue.


User Path not included by default in the command prompt Path

Question: Windows XP used to set the environment variable Path of a command prompt to <system_PATH><user_PATH>.  Perhaps after a software installation, its behavior changed to picking up <system_PATH> only.  How do I configure it to pick up <user_PATH> again?
Answer: The above answer by prrao didn't apply because they didn't understand the question.
I am noticing the exact same behavior on a VirtualBox WinXP install.
I created a new user and went over to it via log out and log in and it worked properly there.
But, as soon as I came back to the user account having the problems, it remained broken.
So, at least I ruled out that it was something specific to that actual user profile.
The solution I then finally discovered was what appears to be a size limitation. I trimmed the contents of the user's Path environment variable down to a much smaller size and moved some of it into the system environment variable block and then it started working again. So, I recommend that you try and shorten it up and see if that will make a difference.
Comment: yes, i found the size of the path must be under 1024.
Comment: exactly the problem solved.
Answer:
Click on Start > Run, type regedit.exe. Navigate to the following branch:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
In the right-pane, double-click Autorun and put in CD /d <user_PATH>
If Autorun is missing, you need to create one (of type "string") in the above location
NOTE: In the user path, use backslash (\) as the path separator; eg: C:\Users\[Username]
Open an instance of command prompt. The default start path should have changed back to <user_PATH>


Sharing Browser Links between PC and Phone

Question: I'm starting a wiki to compile a short list of browsers, apps, extensions, etc. that allow users to easily link or bookmark webpages between their PC and phone. This is ultimately just a "best apps" question, so answers should be made CW. I placed an answer below. Any other suggestions are appreciated!
Answer: If you're running Android 4.0+, just use Google Chrome both on PC and Android, and associate it with the same Google account. This allows you to sync your browsers so that you can see open tabs from both locations on all devices. You can even have multiple PCs/OSs synced, just use the same Google account.

"Sign in to Chrome to sync your open tabs, bookmarks, passwords, and omnibox data from your computer to your phone or tablet.  Pick up right where you left off."
Comment: Ah... I can open 'History' in Chrome desktop then go to "Tabs from other devices" and find links from Chrome on the phone there
Comment: I enjoy this feature. If it wasn't limited to Android 4.0+, it would be perfect.
Comment: Does this feature still exist? I have Android 7 and use Chrome signed into same account on my phone and my Macbook. I can't find any option to share a link or tab from phone to desktop browser though.
Answer: No-one seems to have said Pushbullet yet; it's trivially easy to share a webpage to Pushbullet from a phone and push it to the Windows/Mac app or Chrome extension, and the Chrome extension only needs 2 clicks to share any link, whether it's the page you're on or a link you can right-click.
Comment: AirDroid works more consistently for me. PushBullet (at least with Android) seems to not connect. Also AirDroid does mirroring too, and i think the notification actions are richer.
Answer: I was looking for bookmark sync for my Android phone too and initially considered Delicious but for some reason none of two available mobile clients worked properly (2.3.6).
I ended up registering and using service diigo.com
Answer: If you have Google Keep, nothing beats it. Pretty instant. The above fly-by-night apps (except for some, like Pocket and browser addons) are un-dependable.
Comment: Look like there's 2 Google keep extension: "[Google Keep](https://chrome.google.com/webstore/detail/google-keep-notes-and-lis/hmjkmjkepdijhoojdojkdfohbdgmmhki?hl=fr)" and "[Google Keep Chrome Extension](https://chrome.google.com/webstore/detail/google-keep-chrome-extens/lpcaedmchfhocbbapmcbpinfpgnhiddi/related)". I guess you choose the one with the latest update.
Answer: These are all the ones I've used.
Both ways:

Chrome sync (current open tabs and bookmarks, chrome with chrome for android)
Firefox sync (current open tabs and bookmarks, firefox with firefox beta)
Opera link (bookmarks only, opera with opera mini)
Pocket (bookmarklet/share with)

One way (desktop to phone only):

Chrome to phone
Fox to phone
Answer: MAXS (Modular Android XMPP Suite) is able to exchange the contents of the clipboard over XMPP.
Note: According to the FAQ I have to disclose that I am involved into MAXS. MAXS is an open source GPLv3 licensed Android app. Everyone can contribute.
Answer: You can always use social bookmarking and sync with your existing bookmarks. Look into Papaly for easy to use user interface. Just as long as you have the internet on your Android devices, you'll be able to look at all your bookmarks anywhere.
Answer: I create a QR code from Edge, transport to Android, read it with Lens.


What would it take to win a presidential campaign with no staff?

Question: Imagine a person does not need to campaign to win, they are just adored by 60% of the country (USA) and does not need to do any press. How much work would it take to do all the paper work needed to become president by yourself with no staff?
Comment: Just being adored by 60% of the country doesn't mean that they will vote for you or be in the right places to get enough electoral college votes to win. Also are you asking about just the needed paperwork to get on the ballot?
Comment: the main point was not needing to campaign to win. I am thinking of getting on the ballot in all fifty states, providing that documentation and all other things i have no idea about.
Comment: Considering there are different requirements to get on the ballot in each state and DC this becomes a very broad question.
Answer: It is as a practical matter impossible.
While some states allow ballot access by paying a fee or being a nominee of a major political party, others require that petitions with certain numbers of signatures be signed for ballot access. There is no practical way that a Presidential candidate could meet those petition requirements in enough states that require petitions for ballot access without the assistance of at least significant numbers of volunteer supporters to win the required number of electoral votes and to be nominated by a political party if running as a major or minor political party candidate.
If the Presidential candidate runs under the banner of a major political party, the candidate also has to supply and approve delegates for the national convention and delegates in connection with state caucus processes. The petition requirements for general election ballot access are much more onerous for independent and minor party candidates than they are for major party candidates.
A Presidential candidate also has to name several hundred volunteers to serve as Presidential electors for his or her campaign, cannot carry out this step personally, and must authorize the proposed electors to serve on his or her behalf.
It is theoretically possible to do all of this without paid staff or paid advertisements, but it is not possible to do this without significant numbers of volunteers if one doesn't have paid staff to do it.
CAVEAT: There are a couple of back door possibilities that could avoid this necessity, even though they aren't strictly in the spirit of the question.

A major political party candidate could pick our candidate to be his or her VP nominee, while our candidate simply agrees to serve as VP and does nothing. Our candidate's ticket wins the election. The electoral vote is held confirming that our candidate's ticket wins. The top of the ticket Presidential candidate then dies before being sworn in. Our candidate becomes President.

Both the Presidential and Vice Presidential nominees whose electors win a majority of the electoral vote on election day die before the electoral college vote is held. The electors of the various state confer with each other about who to nominate in lieu of their pledged candidates on the day of the electoral college vote and they vote in favor of our candidate, due to our candidate's wide popularity, quickly reaching a consensus in favor of this candidate. Our candidate wins the electoral vote and becomes President.

In the scenarios above, deaths could be replaced with voluntary resignations from campaigning at the relevant junctures (the classic reasons is "to spend more time with family").


Why do my tubes fail with a small area of rubber missing?

Question: My last three punctures weren't punctures at all (ie not a flint or thorn) but each time i looked at the tube it was like a small area of rubber had been rubbed away or just fell off. These are continental tubes. What could i be doing wrong when putting new tubes in? I always check the inside of the tyre too! The most recent case was a slow puncture, but the two before that were pretty quick.
When I looked at the tyre, there was quite a long cut, about 15 mm, presumably caused by a stone, running around the circumference of the tyre. My guess is that the deformation of this part of the tyre pushed the 2 edges of the cut in on every turn of the wheel which after a few hundred miles rubbed right through it.
Comment: Photos of the punctured tubes would be helpful in diagnosing the cause.
Comment: Where on the tube does this occur?  Kind of sounds like a spoke is rubbing on the inside diameter of the tube.  Another vague possibility is that the tubes you're using are too large and are doubling over inside the tire.  And, of course, ALWAYS check the inside of the tire for any foreign object when fixing a puncture.
Comment: If memory serves the damage is always on or near the outermost part of the tube, ie away from the wheel rim. I would go and take a pic now but i foolishly repaired yesterday's tube. Thanks for all input. Is it possible to put a tube in which claims to be slightly too small?
Comment: When did you change the rim-tapes last? Could they be too narrow or too wide?
Answer: It sounds like either something is rubbing a hole in the tube or it's a defective tube.
If it's a wear hole you might be able to locate what caused the wear hole.
Your wear point was either the tire, rim, or sometimes a tube gets folded and wears against itself.
I always put my tubes and tubes on so that the pressure rating on the tire is above the valve stem and on the freewheel side of the rear wheel or on the non-lever side for the front wheel. Doing this makes it easy to find pressure ratings and it allows me to more easily find where a hole in my tube came from.
Even if you don't know exactly how the tube was laying inside the tire looking at the hole in the tube in relation to the valve stem can help you find the wear spot.
Finding a rim wear point
If the hole is on the valve side of the tube in the narrow band that contacts the rim you can put the tube back on the rim and line up the hole with the rim to find the wear point. The wear point would be in one of two spots on either side of the valve hole in the rim. Look for something about the rim that might cause wear and correct it. Everything should be smooth and abrasion free.
Finding a tire wear point
If you know how the tube sat in the tire - because you put it on a specific way or because you remember then trace the hole back to the tire and look for a rough spot or something that could cause wear.
If you don't know how the tire sat in the tube feel around inside the tire and make sure everything is smooth. Be sure to check the inside of the tire bead.
Folded tube
If the hole is due to the tube rubbing on itself there are sometimes fold marks on the tube around the hole. When installing a tube make sure that it lies smoothly inside the tire with no creases or folds.
Defective tube
If the tube is defective it will look like the tube material gets thinner around the hole or the seam is thinner than the rest of the material. If the hole looks rubbed or abraded then it's not a defect. Your local bike shop should have someone with an experienced eye who can identify defects.
Comment: Defective tube: There may be an entire batch of tubes with the same defect.  // This problem also underlines the importance of always putting the label of the tyre next to the valve. It makes relating a tyre-caused puncture to its location.
Answer: Ar you using a tyre liner? I was too cheap to put decent tyres on my beater bike so used liners, which worked well against glass but eventually the end of the liner wore through the tube.  This was easily solved with a bit of tape, after smoothing the very slightly rough edge.


Does weight influence Earth's spin?

Question: If put enough weight on a particular point on Earth's surface disturbing the balance between hemispheres, is it possible that the Earth's spin could change like an unbalanced spinning top?
Comment: Answered here: http://physics.stackexchange.com/questions/156744/changing-earth-angle-of-revolution
Comment: By the way I think this is on topic here in Astronomy too, because true polar wander has been studied (modelled) on, for example, Io.
Comment: @Andy This has been addressed early on in the community. Just because a question is applicable to other worlds doesn't mean asking that question about Earth is on topic, unless the question is broadened to include other worlds as well.
Comment: @Andy The reason for that is that early on on this site we received a relatively large volume of questions about Earth that drew attention away from more astronomy-focused questions.
Comment: @called2voyage thanks, understood. I was confused by the blurb above "unless directly related to phenomena observable on other celestials", but of course that would mean most of Geology would become astronomy :)  But I get it now.
Answer: The Earth does spin like an unbalanced top. The Earth's rotation axis is not fixed. It instead moves in a complex manner due to a combination of external torques exerted by the Moon and Sun, a torque-free nutation due to the oblate shape of the Earth, and also due to changes on and in the Earth.
The torque-induced motions are called precession and nutation, distinguished by period. The largest and slowest of these motions is the axial precession. This causes the Earth's rotation axis to trace out a cone over the course of 26000 years.

(source: nasa.gov)
The torque-induced nutations are also cyclical motions induced by the Moon and the Sun. These are much smaller in magnitude and have a much shorter period. The largest of these has a magnitude of about 20 arc seconds and a period of 18.6 years. All other nutation terms have much smaller magnitude and have shorter period.
The torque-free nutation would have a period of about 305 days if the Earth was solid. The oceans, the atmosphere, and the outer core alter this. The Chandler wobble has a period of about 433 days and a magnitude of less than an arc second. Because the Chandler wobble isn't as predictable as are precession and nutation, it's lumped into a catch-all category called "polar motion." The redistribution of water over the course of a year (e.g., snow on Siberia in the winter but not in the summer) results in a yearly component of the polar motion.
There are lots and lots of other factors, all small. Polar motion is observed after the fact.
Comment: @WayfaringStranger - That is a calculated result. The noise in the measurements are orders of magnitude higher than that.
Comment: How the Japan Earthquake Shortened Days on Earth: http://www.space.com/11115-japan-earthquake-shortened-earth-days.html "analysis of the 8.9-magnitude earthquake in Japan has found that the intense temblor has accelerated Earth's spin, shortening the length of the 24-hour day by 1.8 microseconds"

Does weight influence Earth's spin?


How to say "Indiana Jones" in Latin?

Question: I know that usually we do not translate names, but how would you translate Indiana Jones into Latin?
According to Wikipedia, Jones is literally John's son in Welsh, and it's related to Latin Ioannes and Iohannes.
Comment: It seems an option is "_[Indiana Cicero](https://translate.google.com/?um=1&ie=UTF-8&hl=en&client=tw-ob#view=home&op=translate&sl=en&tl=la&text=Indiana%20Johnson)_". (0.0) Hilarious.
Answer: Perhaps surprisingly, "Indiana" is already Latin! It comes from something like terra Indiāna, "Indian territory", because when it was first colonized it had a larger Native American population than any of the surrounding states. So you could either keep that the same, or put it into the masculine (meaning "the Indian man"), Indiānus.
"Jones" is a patronymic, as you mention, meaning "son of John". Classical Latin didn't really do patronymics, but Greek did, so an educated Roman would certainly recognize them. One method was to just put the father's name in the genitive, which would be Jōannis. Another method, the fancier/more poetic one, was to use the suffix -idēs, giving Jōannidēs.
Comment: Would be better to replace `J` with `I`. Both because `J` was developed after Roman Empire fell, and because it was plot element in `The Last Crusade`, IIRC.
Answer: I would translate Indiana Jones to Latin as Indiana Jones.
This is common practice in contemporary Latin: names are used as such, and sometimes given names are Latinized slightly.
Here the given name Indiana — which was not actually the name given to the character as we learn in the movie Last Crusade — fits Latin language perfectly and no adaptation is needed.
It is not an issue that a male's name looks like a first declension feminine, and such names existed in ancient Rome too.
If you want more justification, there is a classical Latin precedent for this.
The Romans wrote about a number of Greeks but they were (almost?) always called with their Greek names.
They were transliterated to the different alphabet and the endings might have been Latinized (from -os to -us, for example), but the names were not translated.
Many Greek names mean something and the Romans did know enough Greek to form Latin versions if they wanted to.
But they didn't; names were kept mostly intact.
Of course one could translate or adapt a number of names to be fully Latin, but I don't think that's a good idea here.
My own last name is a meaningful Finnish word, but I still use the name Ionas Ilmavirta in Latin; my first name is a Finnish variant of something of Biblical origin, but translating the last name would make it very hard for people to connect my actual name to the Latin one.
After all, I do use the same name in all languages.

How to say "Indiana Jones" in Latin?


Current in a circuit

Question: I know that to have a current in a circuit we need a potential difference that creates a gradient that makes electrons move from low potential to high potential. My question is that how, in a circuit, potential difference makes the charges move so perfect ( along the wire because that would need a constantly changing force on the charges along the wire) Thanks
Comment: Electric field which provides the drift velocity and hence electrons drift or say pushes each other and hence appear to be doing slow motion.https://en.m.wikipedia.org/wiki/Drift_velocity Maybe this could provide some insights.
Comment: Ok but how does the electric field point in the direction we need it to ie. perfectly along the wire
Comment: see for that you should know the direction of electric field which is from positive to negative or say high potential to low potential.
Comment: If I made a circuit with alot of loops then how would the electric field manage to point along the loop
Answer: Two points here.
First, you would need quite a strong force to make an electron escape the wire. It would usually be a lot easier for the electron to follow the wire. Second, in a steady state, the electric field is perpendicular to the wire. If a voltage is applied to a bent conductor, surface charges accumulate in curved parts which leads to a net electric field in axial direction.
Comment: I know my question would sound silly but can you also tell why electric field in a wire is perpendicular to the wire
Comment: This is actually a consequence of the electric charges accumulating on the wire surfaces. If the electric field is not perpendicular to the wire, it will force charges to reorganize in such a way that the field is perpendicular to the wire again.
Answer: Think of the battery as having plenty electrons stuffed together at its terminal (its internal electromotive force carries them there). They all repel and want to move away. They can't, since the surrounding air is non-conductive. The resistance in an insulating material is much stronger than the repulsion force.
Then you attach a wire. They now move because there is a path with much less resistance than the repulsion force. When an electron has moved away from the terminal, we might think they it slows down since the repulsion reduces with distance. Indeed, yes, but the electron is not alone. Behind it is the next electron, pushing forward. They all queue up behind one another and move at the same pace.
Now bend the wire. An electron moving forward due to it being pushed from behind, now cannot continue moving forward. The insulating material outside the wire resists it more strongly than it is being pushed. So it must take another path. And there is only one other path along which the resistance is small enough - that is to continue along the wire.
Was there no available path, then it had to stop. Then it would stay where it is and start repelling lyver electrons from arriving. It's own repulsion force is still small compared to the combined push starting from the battery, so more electrons will arrive. This gradually increases the repulsion which in turn gradually reduces the current. Soon that repulsion balances out the battery push, and everything stops moving.

Current in a circuit


Is it allowed to believe on the personality told on the basis of stars like Aquarius, Cancer etc

Question: I read a  personality description which was based on my star and it was matching with my personality.  I want to ask that is it allowed in Islam to read and believe these kind of descriptions ?
Comment: Basically horoscopes are written in a way which makes the majority feel it matches with their day or personality. Read about how they are written, a good subject would be reading about "cold reading". Matching this technique with a star or something is just a trick.
Answer: It's haram (forbidden).  Astrology and horoscopes are considered among "fortune telling", "soothsaying", etc.  These are considered as contradicting None in the heavens and earth knows the unseen except Allah (Qur'an 27:65), and stricter scholars interpret belief in astrology as a form of kufr.
Believing Fortunetellers and Astrologers is major sin #46 in Major Sins by Al-Dhahabi (pdf).  He lists the hadith (listed as "Reported by Ahamd and AI-Hakim"):

Whoever goes to a psychic (`Arraf) or a fortuneteller and believes what he says disbelieves in what has been revealed to Muhammad.

A similar hadith is listed at Islam Q&A.  There's other ahadith quoted in various fatawa: SeekersHub, albalagh.net, and IslamWeb, all firmly against astrology.

Also astrology is scientifically a load of rubbish:

Where astrology has made falsifiable predictions, it has been falsified.
Astrology and science, Wikipedia


Appropriateness of ANOVA after k-means cluster analysis

Question: The notification after the ANOVA table after K-means analysis indicates that significance levels should not be looked at as the test of equal means, as the cluster solution has been derived based on Euclidean distance to maximize the distance.
What test should I use to show whether the means of the clustering variables differ among the clusters? I have seen this warning in k-means outputs' provided ANOVA table, but in some references I see that post-hoc ANOVA tests are run. Should I ignore k-mean ANOVA outputs and run one-way ANOVA with post-hoc tests and interpret them in a traditional way? Or can I only imply about magnitude of F value and which variables contributed more to difference?
Another confusion is that clustering variables are not normally distributed violating assumption of ANOVA, then I could use Kruskal-Wallis non-parametric test, but it has assumption about the same distributions. The inter-cluster distributions for the specific variables do not seem the same, some are positively skewed, some are negatively...
I have 1275 large sample, 5 clusters, 10 clustering variables measured in PCA scores.
Comment: You have the right to assess differences between clusters by the characteristics used to cluster - in order to find out the most discriminative ones. When doing so, you may compute relative differences, F's, and even p-values. As indicators of effect size. _Not_ as indicators of statistical significance (which refer to populations).
Comment: As @James pointed in his answer, you are "snooping". What could be a reason to test for significance between groups which you (your clustering) _preselected_ to differ as much as possible? Here is no any mark of random or proportional sampling from populations which are distinct on the basis of some _external_, backgroud characteristics.
Comment: Why do you need to test the equality of means? Can't you just test how your model works out of sample?
Comment: I wanted to determine which variables' means differ among clusters, i.e. whether mean of v1 in cluster1 is different from mean of v1 in cluster, 2, 3, 4, 5. I can of course see that by making a graph, but it does not tell about the statistical difference. Test for statistical difference made me confused, as for ANOVA my data did not meet normal distribution assumption, but for Kruskal Wallis test same shape distribution assumption among cluster groups.
Comment: Thank you for the answers! My confusion appeared as in some sources I see that statistical mean comparisons are not appropriate in this situation as you have also pointed,but e.g a quote from 1 book's chapter indicates opposite: "we usually examine the means for each cluster on each dimension using ANOVA to assess how distinct our clusters are. Ideally, we would obtain significantly different means for most, if not all dimensions, used in the analysis. The magnitude of the F values performed on each dimension is an indication of how well the respective dimension discriminates between clusters"
Comment: I have same question as you. This is regarding my PhD work. I would like to connect with you over mail. Please share your mail id My mail id firstname.lastname@example.com
Comment: At least based on this article the use of anova would appear to be legitimate: "Differences of means between clusters were tested by analysis of variance (ANOVA) adjusted as appropriate (Fisher, 1925). Post-hoc comparisons between means using Tukey correction were performed." (Direct quotation from Vieux, F., Privet, L., Soler, L. G., Irz, X., Ferrari, M., Sette, S., . . . Darmon, N. (2020). More sustainable European diets based on self-selection do not require exclusion of entire categories of food. Journal of Cleaner Production, 248 doi:10.1016/j.jclepro.2019.119298)"
Answer: No!
You must not use the same data to 1) perform clustering and 2) hunt for significant differences between the points in the clusters. Even if there's no actual structure in the data, the clustering will impose one by grouping together points which are nearby. This shrinks the within-group variance and grows the across-group variance, which biases you towards false positives.
This effect is surprisingly strong. Here are the results of a simulation that draws a 1000 data points from a standard normal distribution. If we assign the points to one of five groups at random before running the ANOVA, we find that the p-values are uniformly distributed: 5% of the runs are significant at the (uncorrected) 0.05 level, 1% at the 0.01 level, etc. In other words, there is no effect. However, if $k$-means is used to cluster the data into 5 groups, we find a significant effect virtually every time, even though the data has no actual structure.

There is nothing special about a k-means or an ANOVA here--you would see similar effects using non-parametric tests or logistic regression and a decision tree, even just taking the min/max.
After you impose some kind of structure on the data, you cannot to test whether some structure exists, since it obvious does!.  As a result, validating clustering algorithms' performance is tricky, particularly if the data are not labelled. However, there are a few approaches to "internal validation", or measuring the clusters' quality without using external data sources. They generally focus on the compactness and separability of the clusters. This review by Lui et al. (2010) might be a good place to start.
Answer: Your real problem is data snooping. You can't apply ANOVA or KW if the observations were assigned to groups (clusters) based on the input data set itself. What you can do is to use something like Gap statistic to estimate the number of clusters.
On the other hand, the snooped p-values are biased downward, so if ANOVA or KW test result is insignificant, then the "true" p-value is even larger and you may decide to merge the clusters.
Answer: I think you could apply such an approach (i.e. using the statistics, such as F-statistics or t-statistics or whatever), if you toss out the usual null distributions.
What you'd need to do is simulate from the situation in which your null is true, apply the whole procedure (clustering, etc), and then calculate whichever statistic each time. Applied over many simulations, you would get a distribution for the statistic under the null against which your sample value could be compared. By incorporating the data-snooping into the calculation you account for its effect.
[Alternatively one could perhaps develop a resampling-based test (whether based on permutation/randomization or bootstrapping).]
Comment: Right, that's the idea behind the Gap statistic.
Answer: Not exactly an answer, but a proposal on how one would find the solution.
I was thinking about that cluster problem. The test would require sampling from the full dataset and deriving kmeans and seeing if the same kmeans occurs within a distribution (example with clustergram) from various samples (normally kmeans itself produces different kmeans depending on it's starting point.  An algorithm that hones in on the same kmeans over multiple iterations like clustergram might be more apt). Just as a mean is derived from samples in statistics. But k means has various proportion sizes for its clusters but the point is do the same means appear within a distribution.
But how would one compare the distributions of the various vars in the cluster? Normally coefficients are derived from a covariance matrix (or predictor matrix?) which is based on a given y. This has no y. So im wondering if each cluster could be whitened using zca (or even pca). Something w eigenvalues. Use this to derive some type of meaningful means or coefficients. Else one has a set of means. Then one needs to derive the standard error. The standard error is definately based on the covariance matrix (again substitute pca or zca)? But I'd have to brush up on standard error. I believe standard error is a function of standard deviation but instead of a variance of a sample its a variance of a mean
Edit:
For statistical significance
Use the gap statistic method as discussed here
http://www.datanovia.com/en/lessons/determining-the-optimal-number-of-clusters-3-must-know-methods/#at_pco=wnm-1.0&at_si=609664423560aa01&at_ab=per-2&at_pos=0&at_tot=1
I also recommend this article for a discussion of other related measures
https://medium.com/@haataa/how-to-measure-clustering-performances-when-there-are-no-ground-truth-db027e9a871c


Passing domain-specific objects to a domain-specific task in jBPM 6 workbench

Question: I've been struggling with this for a few days and haven't had much luck. In jBPM 6 workbench running on jboss wildfly, I'm trying to invoke a custom work item handler and pass in an instance of a domain-specific object.
Here's my process so far:

Define a domain-specific class acme.datamodel.UserBio in an external jar: datamodel.jar.
Upload "datamodel.jar" to jbpm-console via the "Artifact repository"->Upload feature.
Create a new repository in jbpm-console and create a new jbpm project.
Add datamodel.jar as a dependency to my jbpm project via the Project editor.
Create a new process in the jbpm project.
Create a new process variable of type acme.datamodel.UserBio.
Create a new work item definition for my domain-specific task (Greeting.wid) like so:
import org.drools.core.process.core.datatype.impl.type.StringDataType;
import org.drools.core.process.core.datatype.impl.type.ObjectDataType;
[
  [
    "name" : "Greeting",
    "parameters" : [
        "UserBio" : new ObjectDataType("acme.datamodel.UserBio")
    ],
    "results" : [
        "Result" : new ObjectDataType("java.util.Map")
    ],
    "displayName" : "Greeting",
    "icon" : "../../../global/defaultservicenodeicon.png"
  ]
]

Add the domain-specific task (Greeting) to my process workflow.
Map the process variable from step 5 as the input parameter for the Greeting task.
Define my custom work item handler in an external jar (workitems.jar) like so:
package acme.workitem.greeting;

import java.util.Map;

import org.kie.api.runtime.process.WorkItem;
import org.kie.api.runtime.process.WorkItemManager;
import org.kie.internal.runtime.StatefulKnowledgeSession;

import acme.datamodel.UserBio;

public class GreetingWorkItemHandler implements WorkItemHandler {

        private StatefulKnowledgeSession ksession;

    public GreetingWorkItemHandler(StatefulKnowledgeSession ksession) {
            this.ksession = ksession;
        }

    public void executeWorkItem(WorkItem workItem, WorkItemManager workItemManager) {

        // Extract required parameters
        UserBio bio = (UserBio) workItem.getParameter("UserBio");

        // Do something

        // Notify manager that work item has been completed and return results
        Map<String, Object> results = new HashMap<String, Object>();
        workItemManager.completeWorkItem(workItem.getId(), results);
    }

    public void abortWorkItem(WorkItem workItem, WorkItemManager workItemManager) {
        // Can't abort a greeting work item handler
    }
}

Copy workitems.jar to the jbpm-installer/dependencies directory.
Edit jbpm-installer/conf/META-INF/CustomWorkItemHandlers.conf and add the following line:
"Greeting" : new acme.workitem.greeting.GreetingWorkItemHandler(ksession)

Re-install jbpm demo (i.e. jbpm-console) and restart jboss.
Load jbpm-console in a browser, start an instance of my process and attempt to invoke the domain-specific task.

After all this, when the domain-specific task is loaded and the custom work item handler is invoked, I get the following error in jbpm-console but nothing displayed in my jboss log:
Unexpected error encountered : java.lang.NoClassDefFoundError:acme/datamodel/UserBio

Are custom work item handlers not loaded with the same classloader as the process instances that invoke them?
I've tried adding the datamodel.jar into my workitems.jar under the META-INF/lib directory but that didn't seem to change anything.
Do I need to add datamodel.jar as a dependency to the Greeting.wid? How do I define the location of the jar file when it's already been uploaded to jbpm-console? Do I just copy datamodel.jar to the dependencies directory like I did for the workitems.jar and re-install the jbpm-console? Won't this cause potential collisions with the version uploaded to the jbpm-console in step 2?
These are just some of the things I've been wrestling with over the past few days. All the examples I've seen for dealing with custom work item handlers only ever seem to pass in primitives, never more complicated objects.
If anyone can explain where I've gone wrong or point me to better examples I'd very much appreciate it.
Answer: I was able to successfully invoke the custom work item handler by deploying the datamodel jar along with the workitem jar. A few more details can be found here.


Christoffel symbols and torsion of the connection

Question: Suppose we have a metric tensor $g_{\mu \nu}$ defining a Riemannian manifold. The Christoffel symbols related to this metric are not tensors. Their difference anyway is a tensor:
$$T^k_{ij}=\Gamma^k_{ij}-\Gamma^k_{ji}$$
This $T^k_{ij}$ defines the 'Torsion' of the connection. Why is there this link between this tensor and the torsion?
Thanks in advance
Comment: $T^k_{ij}$ measures how much the metric $g_{lk}$ is an-holonomic, i.e. the tangent basis is far from a coordinated one
Answer: In advance: I know this should be a comment, but I do not have the required
repution,yet...
Idk what you are asking for.
It is pretty much how torsion is defined in this setting,
at least in local coordinates, which
is evident from
$$T(X,Y):= \nabla_XY -\nabla_YX -[X,Y] $$
and
$$\nabla_{\partial_{i}}\partial_j = \sum_{k=1}^n \Gamma^k_{ij} \partial_k$$
where $\{\partial_1,...,\partial_n\}$ are the vector fields corresponding to
some (local) coordinate system $\{x_1,...,x_n\}$.
By definition, $T$ is the Torsion Tensor.
So... Is your Question:

If this equation is ineed correct?
If $T$ is indeed a Tensor?
If this definition of $T$ is equivalent or related to some other definition?
Something completly different?


Can I really have just one column in UITableView?

Question: From the docs:

A table view in the UIKit framework is limited to a single column because it is designed for a device with a small screen.
Answer: Yes... unless you add subview in cell that looks like more than one column...
i.e 2 label in each cell with same size and horizontally aliened can look like Table with 2 column...
Answer: Have look in the developer docuementation A Closer Look at Table-View Cells how to setup multiple columns in a table view cell.
Answer: What about putting another tableview next to that one and synchronize the movement (scrolling)? :)


Is it permissible to wear a turban-style hijab with visible earrings?

Question: There is a style of hijaab worn by wearing the headscarf as a "turban".  Typically but not always the lower part of the ears are displayed with earrings (earrings aren't tucked under the scarf). The neck is not covered by the headscarf so a Turtle Neck top is worn to cover it. Is this style permitted by any scholars in the Sunni world? Doesn't seem to make sense to wear visible earrings in front of non mahrams as they are a form of attraction for them no?
Comment: Salam and welcome to Islam SE the Q&A site about Islam. Please consider taking some time to learn more about our site and model by taking our 2 min. [tour] and checking our [help].
Answer: It's impermissible in two ways:

A woman's ears are ordinarily considered part of her awrah and thus it is impermissible to expose them to non-mahram men.  Example fatawa making this claim:

While wearing the 'hijab' (to cover the head) it is farz (essential) for a woman to cover the ears. It is haram (unlawful and sinful) for women to show their earrings while wearing their hijab. -- Mufti Waseem Khan, sourced from IslamQA.org (Hanafi, Sunni)
The fuqaha' are agreed that a woman's ears are 'awrah and it is not permissible to show them to non-mahrams. -- Islam Q&A (Salafi, Sunni)
The ears are not considered part of the face as far as the obligation of covering the ʻawrah (body parts that must be covered as per the sharee'ah) is concerned. The woman is obliged to cover the ears as part of the head. -- IslamWeb
The ears are not part of the face, therefore it is obligatory to cover them. -- Ayatollah Sistani (Shia)

Exposing one's adornments to non-mahram men is further impermissible:

And tell the believing women to... not expose their adornment except that which [necessarily] appears thereof... -- Qur'an 24:31

However, I would not interpret wearing earrings (whether or not she's exposing her ears) as an attempt to attract men.  There's plenty of other reasons that a woman might want to wear earrings, e.g. expressing her femininity.  We should assume the best in other Muslims and avoid suspicion.
There's debate as to what constitutes hijab.  As an example, Lamya Kaddor (whose scholarly credentials have been contested in the comments) regarded the "headscarf is obsolete".  At worst, she is merely mistaken.  Likewise, it's possible that the women who wear this turban-style hijab believe it is permissible and are, at worst, mistaken.  (The point of this is: let's go easy on our Muslim sisters who wear the turban-style hijab.)
[NB. In the previous version of this answer, I mentioned Sheikh Mustapha Mohamed Rashed, although this is reported as fabricated.]
Comment: Apparently [Al-Azhar denies](https://muslimvillage.com/2012/08/12/26678/our-soul-deserves-better-than-a-facebook-islam/) that anyone by the name of Mustapha Mohamed Rashed submitted a thesis, or that a thesis suggesting the headscarf is obsolete was presented by anyone, let alone accepted, and they reject the suggestion that they would grant a PhD for such a thesis as "literally impossible". The story seems to be a hoax.
Comment: Lamya Kaddor is by no stretch of the imagination an islamic scholar, she is a reformist liberal with muslim background. Some of her views include that disbelief is not related to whether someone will end up in hell, she rejects at least some hudud as obligatory parts of fiqh, she vehemently stands for equality of men and women, she rejects polygyny and slavery as a matter of principle.
Comment: I agree with G.Bach, Lamya Kaddor is certainly not an islamic scholar, and the other one is just a student who is defending his thesis, which does not make him an islamic scholar by any mean. There are no islamic scholars who say that women should not cover their head. Evidence of that in Quran and Sunnah is more than one can count. I don't think it is a good practice or even fair to cite those people as credible sources of Islamic teaching.
Comment: Fascinating.  I also regard covering one's hair as obligatory (and wear it myself).  I write the last part to establish that there are other interpretations.
Comment: @RebeccaJ.Stones If that's what you're trying to establish, then references to people that actually exist and are authorities in fiqh (as opposed to inexistent people and laypeople) would be necessary.


Understanding compactness of metric spaces

Question: I have been studying a basic course in metric spaces. I really get confused whenever the notion of compactness arrives. I know that any subset of $\mathbb{R}^n$ is compact iff it is closed and bounded. Is this theorem true for any arbitrary metrics defined on space or is it true only under the metric induced from $\mathbb{R}^n$? I am really sorry if the question is of too low standard as per standards of maths stackexchange.
Comment: No, that's something special. It's not _only_ in $\mathbb{R}^n$ (with the Euclidean metric) that all closed and bounded subsets are compact, but it's something very special.
Comment: could you please elaborate the answer.
Answer: The general definition is via open covers, this remains valid in any topological space: A metric space $X$ is compact, if any open cover of $X$ has a finite subcover. In other words, if you take any collection of open sets $\mathcal{U} \subset \mathcal{P}(X)$ s.t. $\cup \mathcal{U} =X$ there is a finite set $F \subset \mathcal{U}$, such that $\cup F = X$.
Let me share some of my personal heuristics on this: Compact sets are "small" in a very specific sense.  A metric space $X$ is compact if and only if it is sequentially compact (in the context of real numbers, this is Bolzano–Weierstrass theorem). This means that if you take any countable set of points $(x_n)$ in a compact metric space $X$, they will inevitably stack around a point in $X$. I like to think that there is no room in the set $X$ to spread an infinite number of points to the set in a way that they would not stack anywhere. In this sense e.g. the unit ball in the sequence space $l^2$ is not small, since you can put an infinite number of points there that are a constant $c > 0$ away from each other.
Hope this helps.
Comment: Might help to show that in $\ell^2$, the unit ball in question **is** closed and bounded. +1
Comment: @Matias Heikkilä thanks for your answer, i know that the notion of closeness between points  in a space will exactly depend on the metric defined on it and therefore you have given me an idea of what compactness actually means,but,my question is: does heine borel theorem on $R^n$ applies on the space equipped with any metric space??
Comment: It does not. For example the closure of the unit sphere $B$ in $l^2$, which is clearly closed and bounded, is not compact. Take any orthonormal basis $\left\{ e_i \right\}$ for $l^2$. The sequence $x_n = e_n$ satisfies $d(x_i, x_j)=1$ for all $i \neq j$ and hence has no subsequence that is Cauchy. Still $x_n \in B$ for all $n$. Thus $B$ is not sequentially compact and it cannot be compact either.


How to identify a user (Oracle) that is locked due to unsuccessful login attempts

Question: How to differentiate in oracle a user deliberately locked by the security administrator and locked due to unsuccessful login attempts
Answer: Select the user information from dba_users and look at the ACCOUNT_STATUS. If the status is LOCKED then the user was deliberately locked. If it is LOCKED(TIMED) then it is locked because of multiple wrong passwords. If you have set the PASSWORD_LOCK_TIME then the user will be unlocked after this time is reached.
select   username, account_status
from     dba_users
where    username='A-USERNAME'
/

Comment: Thanks. This was the case until some policy was recently modified by our DBA -set something to "default" (I am just an end user monitoring user access to our several systems). After this policy was implemented, either way the status is simply LOCKED. Should I ask the DBA to set the policy to whatever it was earlier?
Comment: The DBA sets the user profiles. You can ask him to either change (back) the profile. Perhaps he is not aware that it changed or he had some reason for the change. If you want more information about the user profiles then check the documentation or ask your DBA.


Why http microsoft connection in netstat check?

Question: I checked established connections with "netstat" command in command prompt, and I found that there are some connections with ip's of microsoft (I checked ip online) that have http (and not https) connection established, they bring to some svchost.exe in a Win32 folder of the system. I know that http connections are not safe, but I guess they are safe since they have microsoft ip, but why these connections are not encrypted (http)? Is it normal?
Answer: I don't know know what connections in particular you observed, but here are some candidates that a Windows service (the background tasks or "daemons" that run in svchost.exe processes) might be using:

Reporting basic diagnostics and telemetry. Lots of software does some of this but Win10 in particular has a lot of telemetry that lets Microsoft know things about how the OS is used, and most people don't disable it (it's actually quite hard to disable on most Win10 editions). The data is not supposed to be personally identifying or tied to a specific user, so there's no particular need for it to be secure.
Checking for or retrieving Windows updates. I would certainly expect this to be done over a secure connection, although in theory with enough signatures and timestamping on the traffic TLS isn't required for security (it's not like the patches themselves are secret, they just absolutely must not be tampered with).
As part of Windows Defender, checking whether unrecognized files have been categorized as safe or not (it generally doesn't need to transmit the files themselves for this, just a non-reversible cryptographic hash, though it might upload the full files sometimes). Like the update checks, this is something I would expect to be done over TLS but in theory doesn't have to be.
Retrieving certificates or related metadata from Microsoft (which issues its own certificates and also provides updates to the Windows ones sometimes). Since certificates are inherently signed - their entire security hinges upon it - this can and often is done over insecure connections (a TLS server sends its certificate to the client over plain text as part of, but before actually establishing the secure connection).
Querying Microsoft servers for the time, to help keep your PC synchronized. This is often done over an insecure protocol but it's usually NTP (Network Time Protocal) which uses UDP on port 123, rather than HTTP which uses TCP on port 80.
Checking for updates to, or downloading packages for, "Windows Store" apps. As with the Windows Update possibility, I'd be surprised if this wasn't using a secure connection.

There are probably many more that I missed, but those seem like some of the most likely to be running unexpectedly in the background, as a Windows service, and communicating with Microsoft.
Doing a reverse DNS lookup on the IP address (where you try to see what domain names are associated with the IP address), or examining the network traffic (using a tool such as Wireshark or Microsoft Message Analyzer), might help you determine what that connection is being used for.
Incidentally, Windows ships with a graphical utility called Resource Monitor that can, among other things, provide a real-time view of network connections and traffic similar to netstat, and may make it easier to trace the connection back to the service owning it.


Hide reply button after moveForm is called

Question: When user clicks on Reply button for a specific comment, how can I then hide the reply button under said comment? Do I have any access to the javascript onclick function that it calls?
Answer: Ended up using jQuery to solve this. The form moves around using javascript anyways so it doesn't break anything for users with js turned off.
//when reply button is clicked hide it
$(".comment-reply-link").click( function() {
    $(this).hide();
});

    //when cancel button is clicked reshow reply button
$("#cancel-comment-reply-link").click( function() {
    $(".comment-reply-link").show();
});

Answer: You can "wrap" the function by renaming it and defining your own function with the same name, that calls the renamed function. The "cancel" handler is internal, so you can't access that.
var oldAddComment = addComment;
addComment = {
    moveForm: function(commId, parentId, respondId, postId) {
        var retVal = oldAddComment.moveForm(commId, parentId, respondId, postId);
        // Your code to hide the link here
        return retVal;
    }
};

You could also unregister the comment-reply Javascript, and register your own version. Or you can hook up extra handlers to the click event, with plain Javascript or with jQuery, as you have done.
Comment: Very clever. Thank-you for showing me this. How would I have figured this out on my own?
Comment: I'm going to end up marking my own solution as correct because I think it is easier to implement. +1 to you though for what seems like a very appropriate solution(s).
Comment: @mrtsherman: No problem, you should accept the answer that helped you solve the problem - even if you found the answer yourself! And your solution is more complete, because you also handle the cancel event.


Correct long / lat referencing typo in vector layer

Question: This layer is completely misallinged in terms of the standard WGS84 referencing system. I played around a lot with affine transformations and the like. But I presume it is just a typo in the underlying long/lat (e.g. instead of -655 it should be -6.55).
Is there any way to "retype" long/lat manually in QGIS or gvSIG?
Comment: Didn't affine transformation with scale=0.01 work for you?
Comment: It did! Thanks a lot, somehow I didn't see the obvious solution. But I'm still curious if there is a possibility to manually change long/lat.
Answer: You can test this (in gvSIG 2.2):
1. Start editing
2. Use the tool "Move"
3. First point:  with right button you can write the coordinates of the point. You can use the coordinates of one of the nodes[*] (X:-331.89819999999963 Y:617.5137999999997)
4. Second point (with right button): X:-3.3189819999999963 Y:6.175137999999997
As result, gvSIG move all the selected features to the new position/coordinates.
[*] In gvSIG 2.2 you can go to the properties of the table and check the GEOMETRY column. Then, you can view this column in the Table of attributes


Why would Cedric become a Death Eater?

Question: Cedric was a good, and modest lad. Why would he join the death eaters?
Answer: Per the script, his fall from grace stemmed from Scorpius and Albus mucking around with his timeline.

DELPHI: Voldemort ruled? He was alive?
SCORPIUS: He ruled everything. It was terrible.
DELPHI: Because of what we did?
SCORPIUS: Humiliating Cedric turned him into a very angry young man, and then he became a Death Eater and — and — it all went wrong. Really wrong.

As to why Cedric would turn evil, it's fairly noticeable that although he's superficially friendly and charming, he's also quite ambitious and driven. He (just about) passes one test of character by giving Harry a hint about the egg but then systematically fails the second by not rescuing the other hostages in the lake task.
In short, we really don't know enough about his character to know whether him turning evil is out-of-character.
Comment: Regarding the lake task, I don't think that says anything about his character one way or the other. Wasn't the point that you weren't expected to rescue the other hostages? I never got the impression that was the secret goal of the task. More of a "let's pretend for now that your hostage is the only hostage. Don't worry, they aren't in any real danger, so you can ignore the others."
Comment: @Alarion - Well, Harry got extra points for moral virtue in that task. Cedric and Krum didn't.

Why would Cedric become a Death Eater?


Are there famous examples of left-wing reforms blocked by the French Senate?

Question: The French Senate is often described as a bulwark of the right and of the rural areas, due to the indirect way in which it is elected (more or less by local councilors, as I understand). I've looked through the English and French wikipedia pages on the French Senate, but they don't seem to mention any examples when the Senate has made its right-wing composition felt, e.g. by blocking some notable left-wing initiatives. So, are there some well-known examples of that kind? (Apparently, the blocking powers of the Senate are limited to "constitutional laws", with the National Assembly being able to override in other cases, which might be why the examples aren't common, but I could be mistaken.)
Comment: For the sake of clarity - is the question strictly about the Fifth Republic Senate, i.e. since 1958?
Comment: @DanilaSmirnov: yes.
Comment: @DanilaSmirnov: I did manage to find some clear examples in the 3rd Republic, during the 1st Clemenceau government, when the Senate delayed a number of social reforms, but some were ultimately adopted shortly before WW1.
Comment: Not sure, if this is related to the current reform, where *vote bloqué* has somewhat different (rather specific) meaning - government demanding the Senate to pass a law in a single vote (according to article 44.3 of the constitution, invoking never fails to upset lots of people.)
Answer: In 2021 the French senate blocked a referendum on adding a clause to the French Constitution to enshrine the fight against climate change.

The French Senate has voted to block a referendum promised by President Emmanuel Macron on whether to enshrine the fight against climate change in the French constitution.

The clause's original wording had been proposed by a panel of 150 citizens established by Macron to draw up policy proposals for battling climate change.


Can sulphur from low-flying planes be cause of silver tarnishing rapidly?

Question: My silver dishes, tea set, etc. that previously needed polishing once or twice a year are now turning black in just a few weeks. This area has low-flying planes.  Could they be releasing sulphur which causes the blackening of silver?
Comment: Planes normally don't release all that much sulphur.
Comment: Related: [Abundance of sulfur containing compounds in the air](https://chemistry.stackexchange.com/questions/78882/abundance-of-sulfur-containing-compounds-in-the-air)
Comment: In general, yes, this *theoretically might be* one of the reasons as sulfur is imminently present in the majority of jet fuels (e.g. International Standard for Jet-A1 fuel allows up to 0.30 w/w% S (mercaptanes mostly)), but before suing the airline companies I'd check out local analysis reports on sulfur dioxide air content.
Answer: There are 3 main culprits for the silver tarnishing reaction: hydrogen sulfide, water, and oxygen. Please note that sulfur dioxide doesn't (directly) contribute to this. Airplane exhausts are principally CO2, H2O, and NOx with small amounts of ozone, sulfur dioxide, and particulates. Note: no H2S (hydrogen sulfide). Increased humidity is one obvious reason why you might see an increase in the rate of tarnishing - have you changed the heating/air conditioning that your silver is exposed to? Is the weather wetter now than in the past? It's also been established that NOx accelerates tarnishing - and anything that burns (in air, which is 78% N2 and 21% O2 and about 1% H2O) makes NOx. (NOx is shorthand for a family of nitrogen oxygen compounds). It gets worse: the more you polish silver the faster it tarnishes. So, you'd expect the longer you own the silver that you'd find an increasing need to polish it if you wanted to maintain its silvery appearance (and didn't use it much). There are other environmental sources of H2S: volcanoes, gas wells (frakking has increased dramatically in the last 2 decades), chemical plants, sewers, water treatment pools, landfills. So, while it's possible that increased emissions from near-by internal combustion engines (cars and planes and boats) could be making the problem worse, I'd not expect aircraft emissions to have much of an effect. I've read (but have no personal experience with) anti-tarnish bags, cloths and strips do wonders. Also, you should consider a well sealed cabinet perhaps with a desiccant (remember humidity accelerates tarnishing) if you display your silver. The experts use activated carbon and zinc oxide in their cabinets to absorb the H2S, but that seems excessive for home use. I'd try the 3M strips and as small an air volume as possible. I'd also be willing to try large desiccant packs but have some doubts that they'd work for long enough to be worth while (unless you kept the cabinet or bags really well sealed and almost never opened it). Just my 2 cents, HTH. I should also mention that kitchens (and compost) can be a significant source of H2S.
Comment: great explanation, just a small suggestion: Would you mind editing your posts to make them easier to read? Like spacing, formatting mathjax blockquotes etc. Thanks for sharing great knowledge!


Learning PHP Framework for ecommerce site

Question: Are there any books that can teach a good/useful PHP framework to build an ecommerce site? Please recommend.
Answer: PHP 5 e-commerce Development starts by creating a simple MVC-style framework, then continues to teach you how to build an e-commerce system with PHP.
Effortless E-Commerce with PHP and MySQL teaches custom e-commerce development with PHP.
WordPress 2.9 E-Commerce shows how to use PHP, WordPress, and the WP-Commerce plugin to build an e-commerce site.
Joomla! E-Commerce with VirtueMart builds an e-commerce site using Joomla.
Drupal E-commerce with Ubercart 2.x demonstrates e-commerce site builds using Drupal.
Building PHP Applications with Symfony™, CakePHP, and Zend® Framework gives an overview of working with three popular PHP frameworks, with concepts that could be applied to developing a shop.
Comment: Since there are so many frameworks out there, which would you use to create a simple ecommerce site (complete with checkouts, users, etc)? Or would you just create it from scratch?
Comment: I've built online shops with WordPress, CodeIgniter, and custom PHP, and find doing it from scratch easiest. You code only what you need, have a better understanding of what every line does, and need not worry about the initial learning curve or inevitable code refactoring when YourFramework 3.0 comes out.
Comment: Thanks, is there a place that I can learn to do this with custom PHP?
Answer: The Zend framework can help you with your project.  A good book is "Zend Framework in Action".  Get it here.
Comment: That's not a book. It's software.
Comment: I also don't think it's a Framework, but since I'm new to php I could be wrong...
Comment: Changed my answer to be more in line with the question asked.
Answer: Any particular reason why you're looking for a framework to aid you with this task?
I'd say with the complexity of e-commerce applications (Yes, you can make a 'simple' one, but it's still going to be pretty complicated by the time you're done with frontend/backend, order management, payment gateways, etc etc) that you might want to consider possibly writing your own framework so you fully understand what your code is doing - this way you can also ensure what you're doing is 'secure' - which is pretty key when it comes to money changing hands.
Granted, Magento uses the Zend framework, but it's all heavily customized etc to be their own.


How do I get the rating for a source in activerecord-reputation-system

Question: I'm using Twitter's activerecord-reputation-system gem which has been easy to get set up but running into a challenge getting the rating a source provided on a target.
My model looks like this with the user bing the source (the one doing the rating)
class Item < ActiveRecord::Base

has_reputation :ratings,
:source => :user,
:aggregated_by => :average

I'm able to add ratings for users easily enough with:
@item.add_evaluation(:ratings, 3, @user)

I can then see if that user has already rated an item with
has_evaluation?(:ratings, @user)

This returns the boolean.  What I'd like to get is the value of the rating that the user gave to that item (not just its existence).  I guess what I want is a has_evaluation_value function or something which doesn't seem to exist that.  Am I missing something?
Answer: You can read everything you need on the GitHub repos README.
@item.reputation_for(:ratings)

Comment: Thanks, but that gives me the average rating for the item (average over all user ratings).  I'm looking for the rating on the item that current_user gave it.  In other words I'd like to show the user the average rating as well as his own personal rating.