GIT Rebase a Branch that is collaborated on?

Question: After reading this article, it makes sense to rebase to gather changes from the main branch on to my feature branch:
Git workflow and rebase vs merge questions
clone the remote repo
git checkout -b my_new_feature
..work and commit some stuff
git rebase master
..work and commit some stuff
git rebase master
..finish the feature
git checkout master
git merge my_new_feature

This works great if the feature branch is local to my machine and I can rewrite history as I please.
But what if I collaborate with someone else on the feature branch.  How do we get the latest changes from the main branch into our feature branch now that our feature branch is held in the remote repository?
So we do merge?  Or is there another slick GIT method to do this?
Thanks in advance!
Answer: If you are working alone the rebases do nothing. You did not commit anything new to master.
Your merge will be a fast forward merge and you could do it by not checking it out at all with
git push . HEAD:master

Whether you are working with someone or not, merging work that is in master into your feature branch is a bad practice. It is called a back-merge. The reason that it is bad is that you now do not have an atomic piece of work. the history of master is now entangled with your feature making working with this feature, such as rebasing, impossible in many situations.
You need to think about your branching strategy and what you want to achieve. Here is mine:
http://dymitruk.com/blog/2012/02/05/branch-per-feature/
You can see that each branch starts from the same place. You have a separate integration branch and release candidate branch to mix and match the features you want while not contaminating them.
As for collaborating on one feature with a colleague, it depends on how large a feature is (the granularity of your work). If it's large, you can apply the process above to the feature itself and branch per task instead.
If it's a small feature you can merge or rebase on that branch - it won't matter much. At  this point it comes down to what the team is comfortable with.
Comment: Dynmitruk: Thanks for the post and link.  From the link, it sounds like cherry-picking is about as close to a solution as available.  Thank you for your time!
Answer: There is solution for your case without switching to a completely different workflow.
Regarding getting fixes from your main branch into feature branches, as you already found out, the best is to cherry-pick those particular commits. But I prefer to have topic branches even for hotfixes instead of fixing in the mainline, that way I can properly merge those fixes into every feature blocked by them.
To maintain feature development history as clean and linear as possible all collaborators must use git pull --rebase to get updates so no meaningless merge commits gets in the way.
If you still want to rebase a collaborative feature branch over current main development branch (for continuous integration testing or other purposes) or rewrite its history in any other way, you can do it once the feature is complete/done, just before the merge to main branch, but you should do it in a new separate local/private branch.
Here is how to recreate your on-topic changes (skip cherry-picks) in a new branch from master:
$ git checkout -b feature_final feature # jump to a new branch for grooming
$ git rebase [-i] master                # rebase topic changes onto master

From there is up to you what to do with the rebased branch —push upstream for QA or directly merge to master (with --no-ff if you like to make it explicit in history).


Is there a road shoe cleat adapter (from road to mountain) that could be used in a cyclo cross race?

Question: So Im aware that you can buy (3 hole) spd pedal to (2 hole) mtb pedals so you can own one pair of shoes like this one offered by crank brothers. Has anyone ever seen a cleat adapter that could aid traction when running in a cyclo cross race (i.e. a pair of studs right at the front of the pedal)?
Comment: I would imagine MTB shoes would be better for a cyclocross race than road shoes, having been designed for traction in mud.
Comment: Old mountain bike shoes are best as the sole has lost some stiffness letting you run better during dismounts.  A stiff road style shoe (even with bolt on toe cleats) would be very difficult to run in.
Comment: I would not dispute this, I am merely trying to avoid having to purchase any MTB shoes.
Answer: I have never seen a three to two hole adapter that also included toe studs.  Even if one existed you still have the problem of inadequate heel tread.  When you come into a barrier at full running speed and dismount, unless you have an aggressive heal tread (like on most mountain bike shoes), there is a good chance you will slip and crash.  Hitting barriers at speed sucks (I know this too well)!
If cost is an issue I suggest looking for used MTB shoes on a site like craigslist.  Used MTB shoes are actually the best as the sole has lost some stiffness letting you run better during dismounts.
Even if you came up with a method of adding a toe spike and heal tread to a road shoe, the typically ultra stiff road style shoe would be very difficult to run in.
Half of the fun of cross is running!  Well at least for me :-)
Comment: I wouldn't buy used cycling shoes (or any sort of footwear for that matter). There are hygiene issues involved, as well as fit (which isn't the same as when the shoes were purchased and has to be gauged on a per model basis) if they've been used for a reasonable amount of time.


ItemAdded not firing with REST

Question: I have an ItemAdded on a list which creates a Document Library for each item added, and updates some fields of the item.
It fires perfectly when items are entered manually.
It doesn't fire when items are added via REST - for testing sake I am authenticating with system administrator account.
I'm using SharePoint Foundation 2013.
Any hint?
UPDATE
The client is a Linux VM running a python REST client.
Both the SP and the Linux VMs are connected to a 192.168.21.x network; digging into the logs with ULS I see many "Cannot find site lookup info for request Uri http://192.168.21.8:25011/"
I'm investigating on AAM
Answer: AAM was the answer.
The starting point is this link

ItemAdded not firing with REST


When Jagadguru Ramanandacharya was born?

Question: With historical evidences can you prove when did Jagadguru Ramanandacharya was born?

Kindly give proper references of it.
Answer: Actual Dating of Jagadguru Ramanandacharya:
There are many myths on the dating of Bhagvan Ramanandacharya many says it's 1299 CE few says it's 1410 CE. So what is the Actual Dating of Bhagvan Ramanandacharya? In this post I will try my best to solve this problem.
According to Narad Pancharatric texts like Vaiśvānara Samhitā and Valmiki Samhita, Bhagvan Ramanandacharya is considered as incarnation of Bhagvan Sri Ram. Agastya Samhitā (not pancharatric) gives details about the life of Bhagvan Ramanandacharya. Sadashiv Samhita also gives information of appearance of Sri Ram as Jagadguru Ramanandacharya.
For clarification: Agastya Samhitā's are two, one which is related to Narad Pancharatra and another which is independent, in which the shlokas like "वेद-वेद्ये परे पुंसि जाते दशरथात्मजे।", Janki Stavaraj and life details of Sri Ramanandacharya is found. So don't get confused between these two, eminent scholars like Pandit Saryudas ji has raised these points in his works.
Jagadguru Ramanandacharya has 12 main disciples in which Bhavanandacharya, who, according to Agastya Samhita ch. 132 considers as incarnation of lord Shiva, was initiated by Sri Ramanandacharya and He was non-other than "Sri Vitthal Pant", written by Sri M in his book "The Journey Continues A Sequel To Apprentice To A Himalayan Master", Page No. 210.

And he was the father of Saint Dnyaneshwar, famous commentator of Bhagvad Gita known as Dnyaneshwari Tika. According to Digambar Balkrishna Mokashi in his book "Palkhi: An Indian Pilgrimage", Saint Dnyaneshwar was born in 1275, Page No. 38.

If Saint Dnyaneshwar was born in 1275 CE than his father Sri Vitthal Pant would have been born atleast 30–40 years before Saint Dnyaneshwar. So 1235 CE to 1245 CE would be his year of birth.
So, 1299 CE Year Of Birth of Ramanandacharya can't be taken as right as 1235 CE to 1245 CE was Year Of Birth of "Sri Vitthal Pant" who was initiated by Sri Ramanandacharya and 1275 CE is the Year Of Birth of His son Saint Dnyaneshwar than how it is possible that Ramanandacharya would have been born at 1299 CE?
This is also mentioned by Gita Press Gorakhpur Kalyan Magzine Bhagvan Naam Mahima Aur Prarthana Ank, Page No. 310;

And infact Maharashtrian author Surya Ashoka while mentioning about Saint Dnyaneshwar also mentions this incidence in His work "Amritvani" Page No. 34:

Surya Ashoka clearly writes that "Sri Vitthal Pant" became the disciple of Sri Raghavanandacharya at Kashi. This again rejects the notion of Sri Ramanandacharya being born at 1299 CE.
❝And infact Sri Malook Peethadhishvar Srimad Rajendra Das Ji Maharaj has also cleared this through his words, He also accepts 1199 CE as the Year of Appearance of Ramanandacharya. As in one of His Bhaktamaal Katha, He raised this point that Sri Vithhal Pant was initiated by Sri Ramanandacharya❞
And infact Malook Peeth (one of the most prominent peeth of Sri Ramananda Sampraday) and other Peetha of Sri Ramananda Sampraday and eminent scholars like Dr. Yogiraj Govats in his work clearly says that year of birth of Bhagvan Ramanandacharya is 1199 CE as that will be absolutely right.
The Year which is popular among scholars and in Sri Ramananda Sampraday for Saint Ravidas birth, who was one of the main 12 disciples of Bhagvan Ramanandacharya is 1267 CE:
According to Datta, Amaresh in Encyclopaedia of Indian Literature Vol 1, Page No 79

Saint Ravidas was born in 1267 CE than how it is possible that Bhagvan Ramanandacharya would have been appeared in 1299 CE? It clearly marks that the time line of Sri Ramanandacharya would have been much before Saint Ravidas.
Now directly coming to the disappearance year of Bhagvan Ramanandacharya; Although there is no fix year when Sri Jagadguru was disappeared. Let's try to decode it:
Everyone known about famous saint Narsi Mehta but few knows that He was also initiated by Swayam Bhagvan Ramanandacharya at Kashi:
पुरी काशीं समागम्य नरश्रीभर्त्तराट् स्वयम् ।
रामानन्दस्य शिष्योऽभूद्विष्णुधर्म विशारदः ।।
Śrī Narsri (prolapse—Narsi), the supreme Vaishnava devotee, came to Kashipuri and became a disciple of Śrīmad Ramananda.
(Bhavishya Purana, Pratisarga Parva, Vol. 4, Chapter 17, Verse 66)
According to Munshi, Kanaiyalal in Gujarata and its literature Sri Narsi Mehta was born in 1414 CE which is quite close to Ramananda Sampraday's dating, it dates him around 1425 CE.
Another evidence, according to Bhavishya Puran, Bhagvan Ramanandacharya has given initiation to Sri Guru Nanak Dev Ji as mentioned:
रामानन्दं समागम्य शिष्यो भूत्वा स नानकः ।
स वै म्लेच्छान्वशीकृत्य सूक्ष्ममार्गमदर्शयत् ।।८७।।
Sri Nanak came to Sri Ramananda and became his disciple. He subdued the Mlecchas and showed them the narrow path.
(-Śrīmad Bhavishya Purana, Pratisarga 4.17.87)
And also according to Historians Sri Guru Nanak Dev Ji was the disciple of Jagadguru Bhagvan Ramanandacharya.
And Sri Guru Nanak Dev Ji was born at 15 April 1469 CE as written in History of the Sikhs: The Sikh Gurus, Page No. 50

Here the year has been written in Vikram Samvat and by minus of 57 years the year will be of CE. So 1526-57 = 1469 CE.
And if 1469 CE is his year of birth than atleast at the age of 20, he would have got initiation from Bhagvan Ramanandacharya.
So, disappearance year is not specified but around 1490 CE to 1495 can be considered as true. As Sri Guru Nanak Dev Ji would have not taken initiation as he born, so atleast if we consider 20 years gap between his appearance and till time he was initiated than the Year 1490 CE to 1495 CE would be absolutely correct.
So, for the time Bhagvan Ramanandacharya was present on earth was around 291 to 296 years.
As Sri Bhaktamaal author Sri Nabhadas ji also writes about the same longevity of Jagadguru Ramanandacharya:

"बहुत काल वपु धारिकै, प्रणत जनन कौं पार दियो ।" which means for a very long years Bhagvan Ramanandacharya was present on earth and make people to cross this cycle of birth and death.
(-Sri Bhaktamaal Chappay 36)
This kind of longevity is not seen for any Acharya in Bhaktmal, which clearly states that the duration of Bhagwan Ramanandacharya was extremely long. And infact Dr. Ramavatar Sharma of Patna University writes in his book 'Ishwarvad' about the appearance year of Ramanandacharya:

(-Excerpted from Vaishnav Kabir By Dr. Yogiraj Govats, Page No. 47)
1257 Vikram Samvat is equals to 1200 CE which is extremely near 1199 CE.
Although there are 15 more historical evidences I may put here but due to fear of expansion, concluding it here.
Remarks:

Jagadguru Ramanandacharya was appeared on 1199 CE which is proven all by historical and Sampradayak evidences.

His total time of presence on earth was 291 to 296 years. Such an extreme longevity. And how Ramanandacharya lived so long? Although according to scriptures he was incarnation of swayam Bhagwan Sri Ram but besides that he was great master of Yoga as Swetasvatara Upanishad Ch 2 says "पृथिव्यप्तेजोनिलखे समुत्थिते पञ्चात्मके योगगुणे प्रवृत्ते सति योगाग्निमयं शरीरं प्राप्तस्य तस्य न रोगः न जरा न मृत्युः॥" When the fivefold perception of Yoga, have appeared to the Yogin, then he has become possessed of a body made of the fire of Yoga, and he will not be touched by disease, old age or death. And also written in Hatha Yoga Pradipika खाद्यते नच कालेन वाध्यते नच कर्मणा साध्यते न सके नापि योगी युक्तः समाधिना । means "He who has achieved samadhi by conquering the breath through the great practice of yoga cannot be devoured by Kaal, All his karmic bonds are broken, and he remains untouched by any tantra or mantra; he becomes completely free." And according to Agastya Samhita Chapter 135 Verse 5 Ramanandacharya is denoted by the names योगिवर्यो योगगम्योयोगज्ञोयोगसाधनः । योगसेव्यो योगनिष्ठोयोगात्मायोगरूपधृक् ॥५॥ means "Yogivaryah: The best among all Yogis. Yogagamyah: One who can be known through yoga. Yogajnah: One who knows yoga. Yogasadhanah: Always practicing yoga. Yogisevyah: Worthy of service by yogis. Yoganistah: Steadfast in yoga. Yogatma: The one who knows the essence of yoga. Yogarupadhrik: One who embodies the essence of the goal of yoga." So, longevity of Bhagvan Ramanandacharya can't be questioned as Great Maharashtrian saint Eknath emphasized a similar concept in Marathi: "प्राण वायुचें धारण तेंचि स्वच्छन्द मत्युचें लक्षण." This means that a yogi who has mastered the control of the life force (prana) through pranayama can have control over their death, essentially being able to live or leave their physical body at will.

The case of longevity is quite normal for the one who is practising Yoga as written in 'Auto biography of a yogi' Published by the philosophical Library. 15 East 40 Streat, New York:

According to all evidences Jagadguru Ramanandacharya lived for a very long time in front of people his timing will be 1199 CE to 1491–1496 CE which will satisfy the lines of Sri Nabhadas Ji "बहुत काल वपु धारिकै, प्रणत जनन कौं पार दियो"

Thank You For Reading


alexa speaker only shows up as a microphone and not a bluetooth speaker

Question: I used ubuntu before where the alexa connects as a speaker and plays audio from the computer.  Now I have elementary OS and the alexa connects as a microphone with no option to play sound.  I have tried "forgetting" and adding the alexa many times it always shows up as a microphone.  How do I make the alexa show up as a bluetooth speaker the way it has worked on ubuntu and osx?
Answer: First, update your system. This steps probably won't work if you are not using Loki (elementary OS 0.4).
Bluetooth is buggy sometimes. Delete alexa from the Bluetooth settings inside System Settings and reboot your computer. Go back again to the settings menu and press <code>+</code> to add a new bt device.
Now turn on BT on Alexa. When it appears on the menu you've just opened, click on it and accept all windows on both devices until it connects.
Now it should work automatically.

There's a thing called bluetooth profiles for audio. You have A2DP for high quality audio and HSP/HFP for mono audio and microphone.
Basically when you want to use the mic you have to switch to the HSP/HFP profile (you can do it from an option inside Sound Settings). But since Bluetooth is broken in linux, when you want to switch back to the A2DP profile it won't work most of the time.
So I recommend you to just use Alexa as a speaker or as a mic so you don't have that problem. Or follow this guide every time you want to switch back to the A2DP profile, it's up to you.
This bluetooth bug is a upstream issue and it will take a while to fix. It has nothing to do with elementary so please be patient :)
Comment: This fixes it but now the alexa doesn't show up as a mic.  How is it possible to control if the alexa is a mic or a speaker?
Comment: I've updated my post answering your question, check it out :)


Do massless particles follow the curved spacetime or not?

Question: I am assuming that zero (rest) mass particles don't interact gravitationally with each other and other particles. Does that mean they experience a "flat" spacetime instead of a curved one? I find it a little hard to imagine that. Also, does this mean massless particles can pass through an event horizon (not the singularity itself, I assume there would be some other way of interaction that would prohibit that).
Comment: As @M.Herzkamp edited into his answer (though not explicitly) and netom states in his (again not explicitly), mass and energy are two sides of the same coin. They are equivalent. And as John Rennie points out in *his* answer, all physical objects in GR obey the geodesic equation.
Answer: The trajectory of an object, whether massless or not, in a curved spacetime is given by the geodesic equation.
$$ {d^2 x^\mu \over d\tau^2} + \Gamma^\mu_{\alpha\beta} {dx^\alpha \over d\tau} {dx^\beta \over d\tau} = 0 $$
Solving this is a formidable problem unless there is some helpful symmetry that simplifies the working, but in the particular case of light we have a short cut because any massless particle will follow a null geodesic, and these are usually a lot easier to calculate. For example in my answer to the question Why is a black hole black? I calculate the null geodesic for light trying to escape from a black hole and show that light at or below the event horizon can't escape.
So the answer to your question is that massless particles do indeed experience the curvature of spacetime in the sense that they are deflected by it. As M. Herzkamp says in his answer, this is why gravitational lensing of light happens.
Answer: No, a massive body is able to bend light around it, which is called gravitational lensing. This has been observed multiple times.
EDIT
Photons are massless. Otherwise, they would not travel at the maximum speed, which is called speed of light.
Keep in mind, that gravitational lensing is not a part of Newtonian mechanics. You need general relativity for that. And in the context of general relativity, it is not mass, which exerts gravitation, but energy. And photons clearly carry energy. So, you could produce a gravitational well (even a black hole) entirely without massive particles.
Comment: Ok, so you are saying: 1) photons are massless (are they?) and 2) photons are affected by gravity. But doesn't this make gravity non-symmetric in that a mass-ful particle interacts with a mass-less particle through gravity, but not the other way around? All other forces seem to be more symmetric (on the other hand, we havn't observed gravitational repulsion, have we ;-) )
Comment: updated answer to answer your questions.
Answer:
I am assuming that zero (rest) mass particles don't interact
  gravitationally with each other and other particles.

That's not a valid assumption in general relativity.  Particles with zero invariant mass have energy and momentum and, thus, gravitate.  Essentially, in general relativity, the density and flux of energy and momentum are the sources for spacetime curvature.
For example, see "Do two beams of light attract each other in general theory of relativity".


Do you have to defend Fort Condor in the mini-game to get the Phoenix and Huge Materia?

Question: In the last battle for Fort Condor, you are able to get the Phoenix summon materia and a Huge materia.  Do you have to actually win the Fort Condor mini-game to get these?  Or, if you fail the mini-game but still defeat the boss triggered by failing, do you still get them?
Answer: The short answer is No, you can obtain the materia by other means outside of Fort Condor. As far as winning it at Fort Condor, you can lose the mini-game, but must defeat the boss (CMD. Grandhorn) at the end of it.
CAUTION: May contain spoilers for those wishing to figure this out on their own.
From the Wiki:

Phoenix Materia is obtained at Fort Condor if Cid and the party manage to protect the Huge Materia inside from Shinra. If they do
so, the Condor sitting atop the fort dies and its baby hatches. During
the condor's death the fiery wings of a Phoenix are seen, and
afterwards a Phoenix Materia can be found lying on the floor near the
nest.
If the player loses to the boss fought atop Fort Condor after failing the minigame
to protect the fort, they will not obtain Phoenix, but it can still be dug from Bone
Village after the event.

If you miss out on the Phoenix materia at Fort Condor, here is how you can obtain it:
You can obtain it by digging at Bone Village from Location 4 on the map below.

More details can be found about Bone Village on the FF7 wiki.
Comment: @Jeff Just have to win the boss battle if I recall correctly
Comment: Thanks for your answer.  But if you lose the mini-game and win the boss battle, do you still get the Huge Materia?  Or do you HAVE to win the mini-game to get it?
Comment: Halfwarr is correct. I'll edit my post to make this more clear.
Comment: @Jeff and fyi, if you can't be bothered to visit the place after every major story event, you can just give them some money to do the battles for you.


How to fix .htaccess corrupted

Question: I was working on the live site, I think the plugin cause file .htaccess corrupted so my site is down "500 Internal Server Error", I read a solution to rename .htaccess but when I use Filezilla to do it get "550 rename failed" so I can not rename it, I try to go setting -> save permalinks but not working. is there anyway other way to fix .htaccess error? please help me its emergency.
Comment: You could try just deleting the .htaccess and then re-saving the permalinks to regenerate a completely new .htaccess file. Also, what plugin did you install before this happened?
Comment: Custom permalinks - oh my god, it works very great at first but then it actually has something to do with woocommerce - WMPL cause my whole site went down. thanks for your help but it not .htaccess can fix it but I try
Answer: Try reverting back to the default .htaccess file with the following code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

If you're using some other "flavor" of WP (e.g. multisite) view the htaccess docs on the Codex for the appropriate .htaccess setup.

How to fix .htaccess corrupted


Fusion Power and Plasma Propulsion

Question:
In the classic idea of a Tokamak Fusion Reactor, plasma races around an electromagnetic track. Is it plausible to "spin" off some of this rapidly moving plasma and direct it to nozzles for use in propulsion? Or is it more reasonable to generate plasma at the engine itself, as in the Vasimr Drive.
Answer: You probably could but doing so would likely induce instabilities in the Tokamak.  Getting fusion to work in a Tokamak reactor is really difficult with regards to optimally turbulent conditions so shunting out heated plasma and injecting cold hydrogen seems like an inefficient and highly error prone way to create plasma for thrust.
A better approach would be to use the Tokamak to power electric generators that then heat the plasma to be used as thrust.  This avoids problems with turbulence in the Tokamak and allows variations in thrust.
Answer: There are a lot of theoretical devices to generate fusion energy for propulsion, and most involve creating the plasma in a barrel or tube like reactor with "a hole in the end" for the plasma to accelerate out of. This is essentially a "flow through" type of reactor, and is significantly simpler and lighter than a Tokamak, and much better suited as a spacecraft engine.
The other common idea is some form of inertial confinement, where a pellet of fuel is "zapped" by powerful lasers or particle beams and the plasma reflected off magnetic fields to direct it for usable thrust. These are generally depicted as large parabolic reflectors mounted on the back of the ship, with the associated pellet injection and laser/particle beam apparatus mounted around the edges and the centre of the shield. Once again, while they can be physically large, they are still smaller and lighter than a Tokamak, and have the virtue of directly driving the plasma out the back with potential ISP's as high as 1,000,000 sec.
Since real world Tokamaks are massive devices (ITER is has a size and capital cost of a small aircraft carrier with all the associated systems attached), I would suggest that you consider purpose built fusion engines for your spacecraft.

Fusion Power and Plasma Propulsion


Why has my question been closed as "Opinion Based"?

Question: Why has this question been closed as "opinion based"? What did I put in the question that is making it an opinion?
Answer: It does not to me look like you were asking for people's opinions. I imagine you consider this a matter of fact, not opinion. It is possible that the close voters consider it only a matter of opinion, not of fact. But I do not know this for certain.
At least two of the three close voters will have to have voted that way. They're the only ones who know why they voted that way.
But as written your question is nonetheless a little unclear and unresearched. It's unclear because there are dozens of such words but you only thought of two, and because asking why we don't spell just the same way that we spell gust is a deeply confusing question of itself.
So it feels like you are unaware of two thousand years of intervening history  between classical antiquity and today's spelling. Or even the history of the letter J as in Gaius Julius Caesar — not to mention C as in Gaius, and yes, Latin also didn't have a G for the longest time, so C is the abbreviation for Gaius.
It's unresearched, or at least shows no research, so we don't know where to start. We don't know what you know or don't know, because you haven't shown your research.
In any event, that's way too much of an open-ended question for our format here to cover.  Books are written about this.
So your question is still very hard for us here to answer in a satisfactory fashion.
Comment: If the OP knew how to ask the question the right way, then they'd probably be able to answer the question for themselves. There are lots of 'why' questions that one can ask about English orthography and many of them are answerable, even if it is simply 'we don't know'. This kind of question is exactly the kind that is interesting for language enthusiasts.
Comment: I cannot answer for the closers. I cannot answer the original question because it requires a vast knowledge of consonant and other shifts over centuries. I know an academic linguist who could have answered rigorously within the bounds of contemporary knowledge. In principle the question therefore should not have been closed. In practice, the question deals with a tiny part of linguistics that touches on a huge area of linguistic theory that is inevitably tinged with opinion despite the rigour of approach. It asks too much of us.


An estimate like $\left\vert\frac{f(x+y) - f(x)}{|y|}\right\vert \le K(\Vert f \Vert_\infty +\Vert f' \Vert_\infty)$

Question: Let $f \in C^1(\mathbb{R})$ bounded and with bounded derivative. Is it possible to have an estimate like  $$\left\vert\frac{f(x+y) - f(x)}{|y|}\right\vert \le K\Vert f' \Vert_\infty$$
or
$$\left\vert\frac{f(x+y) - f(x)}{|y|}\right\vert \le K(\Vert f \Vert_\infty +\Vert f' \Vert_\infty)$$
where $K$ is a constant?
Comment: Is there some integration in a part you do not show or is there another reason for the $dx$ in the first formula?
Comment: @LutzL That was just a typo. I edited it out. I originally meant to write $f'$ as $\frac{df}{dx}$ and then changed my mind.
Answer: By the mean value theorem, you get
$$
\frac{f(x+y)-f(x)}y=f'(x+\theta y),\qquad\theta\in(0,1)
$$
so that your first inequality holds with $K=1$.
See also Lipschitz continuity and its connection to bounds on the first derivative.

For the general case use the fundamental theorem and write
$$
f(x+y)-f(x)=\int_0^1f'(x+sy)y\,ds
$$
which implies for the vector norms
$$
\|f(x+y)-f(x)\|=\int_0^1\|f'(x+sy)\|\,\|y\|\,ds\le \|f'\|_\infty\,\|y\|
$$
Comment: Thank you. I edited my question, the formula should have been $\frac{f(x+y) - f(x)}{|y|}$. Does this change anything in your answer?
Comment: No, since the absolute value commutes with division. The vector valued version, where you really need the norm in  the denominator, is not that different, the mean value equation gets replaced by a mean value inequality.
Comment: Thanks. Would you mind adding to your answer some details on the following similar cases too?That is: $\frac{f(x+y)-f(x)}{\Vert y \Vert}$, with $x,y \in \mathbb{R}^N$ and $\frac{f(z,x+y)-f(z,x)}{\vert y \vert}$, with $x,y,z \in \mathbb{R}$.
Comment: @Hideki If you Google the mean value inequality, you will find that precisely answers your first question (and the second is simply a special case).


D3DImage using DX10

Question: Is it possible to use DirectX 10 (I am using SlimDX) with WPF's D3DImage? The only examples and docs I can find only show using DX9 surfaces.
Answer: Yes, you can use DirectX 10, 11, and DirectWrite using the D3DImage in WPF by creating your render target surface as shared, and then creating a DX9 texture based on that shared texture handle to use in WPF.
This means that essentially you can use 10, 11, and DirectWrite the same way you use DX9 with no additional overhead, and no airspace issues.
A sample WPF project with DX9, DX10, DX11, and DirectWrite integration can be found referenced in this blog post here:
http://blogs.windowsclient.net/rob_relyea/archive/2010/04/30/gizmodo-posts-wpf-direct2d-sample-wow.aspx
The Microsoft Code Pack contains a thin managed wrapper for Windows 7 components including DX9, DX10, DX11 and DirectWrite in addition to various other unmanaged libraries in Windows 7.
The SurfaceQueueInteropHelper is a WPF control that manages automatically creating DX9, 10, and 11 contexts in WPF and managing D3DImage updating and various other aspects of the rendering system including device lost events.
Comment: Seems like the link is broken now :(
Answer: Not out of the box as far as I know. WPF is based on DirectX, but as WPF is also supported on Windows XP it's based on DirectX 9.
I do know that it's possible to use DirectX 10 with WPF, but then your application won't be able to run on XP.
There's a library for WPF called Bling which supports DirectX 10 (on Vista and Windows 7) which might be of interest to you. You can find it here. I don't know how mature it is though.
Also, I ran into this blog (mostly in french) who speaks about using DirectX 10 with WPF.
Lastly there's a good introduction to using D3DImage with DirectX over at CodeProject
I know this doesn't exactly answer your question, but I thought I'd share it with you anyways. Best of luck.
Answer: If you're willing to use SlimDX for the DirectX calls, you can try SlimDXControl (slimdxcontrol.codeplex.com) -- it is a WPF content control I wrote which explicitly only supports D3D10 instead of '9.
-mpg

D3DImage using DX10


How to find unused variables /methods in VS Code?

Question: In VS Code is there a way to see if variables /methods are not referenced? There are some posts like this that reference eclipse, but I couldn't find anything that's recent.
Answer: There's no tool like that as of yet for Apex. However, there's options available, as outlined in this knowledge article. The complication comes from trying to detect variables that are "unused" within code, but is used in other domains (e.g. Visualforce, Lightning).
For Lightning (Aura and LWC), variables whose names are dimmed are not used. For example:

Here, you can see the event parameter is unused, and a darker color than the other variables. This is true for local variables and parameters in methods.
That said, it would be theoretically possible to do so; there's already an API for this (see the KB from above), just that nobody's apparently written this yet. It could be you, if you were so inclined. All extensions can be shared, so if you did so, it'd be a valuable addition to the community.
Alternatively, it may be possible to write a ruleset for Apex PMD to find unused methods and variables and report them as errors. I'm not familiar enough with the syntax yet, but it's definitely not outside the realm of possibility, as far as I can tell.


Recover deleted files from Filevault 2

Question: On one partition of an external drive encrypted with Filevault 2, I have accidentally deleted a folder and files. Does decryption also decrypt the deleted files?
Answer: No - encryption/decryption is a completely separate process that will not affect what the OS sees as data (files/folders) versus available space.
You will need to run a file recovery program, such as DiskDrill or Data Rescue; the chance of success at retrieving your files will vary.
Finally, you should seriously consider a proper backup solution, anything from Apple's built-in Time Machine to 3rd party solutions like CrashPlan or BackBlaze.
Comment: Ok - Any pointers on a technical article that describes how Filevault 2 handles deletions of files? I've looked around extensively and come up short.
Comment: FileVault 2 doesn't have anything to do with deletions - that's handled by the OS instead.  FileVault encrypts the drive, waits for a successful challenge at boot to unlock that drive, then the OS runs as normal.  You should be focused on the specific version of OS X you're using and the format of the drive (likely jHFS+).

Recover deleted files from Filevault 2


How many times should one train a convolutional neural network?

Question: ML engineers usually train 50-100 times a network and take the best model among those. I am wondering how many times a CNN should be trained as training a CNN is costly and time-consuming too.
Answer: If you're looking for an exact number I'm not entirely sure what the answer is to your question, but I believe the error surface complexity of neural networks is determined by the complexity of your network (number of neurons, connectivity and layered structure). It follows that in a highly dense network it is extremely likely to get stuck in a local minimum due to the high gyrification, so retraining is necessary to find the lowest practical point, and more training should be necessary in more highly complex networks. It would be nice if someone formalized a calculus to predict error surface complexity from network complexity and data parameters. Maybe they have but I'm not aware of it.
It is possible to calculate the mean and variance of the correlation of targets and outputs over a number of training sessions, so this could be useful, but higher precision is not always desirable due to overfitting. As a professor of mine once said, working with neural networks is a bit of a dark art.
edit: just wanted to mention that it is possible to iterate over training sessions (including permuted data shuffling both within the training set and between training and test sets) until a certain predictive power that you're happy with is reached. Obviously cost and time are important, but assuming you need a model that predicts to the extent you need it to is the main issue. It should become apparent quite quickly if this process is within your budget.


Is coRE closed under concatenation?

Question: I know that RE is closed under union, intersection, and concatenation (but not complement). It is likewise easy to show that coRE is closed under union and intersection (but not complement). What about concatenation? I don't even know which way to conjecture...
Comment: @BartoszBednarczyk: OP is talking about sets of finite words over an alphabet. But since you ask, the concatenation of 42 and 23 is 4223.
Comment: Yes, this is the standard definition given in every textbook.
Comment: What is the concatenation of two sets of integers?
Comment: Yes. Or, alternatively, one could set up a 1-to-1 correspondence between strings and integers (in any way you like), and that extends the concatenation operation from strings to integers.
Comment: But languages are neither integers nor strings, but *sets* thereof. Concatenation on sets of strings is, apparently, in this context defined by $L_0\cdot L_1=\{w_0\cdot w_1:w_0\in L_0,w_1\in L_1\}$.
Answer: Yes coRE is closed under concatenation:
Let $L_1, L_2$ be coRE, witnessed by Turing Machines $M_1,M_2$ whose domain is the complement of $L_1,L_2$ respectively.
We then build a Turing Machine $M$ whose domain is the complement of $L_1\cdot L_2$: on input $u$, $M$ will enumerate the finitely many ways to decompose $u$ into $u_1u_2$, and for each of them run $M_1$ on $u_1$ and $M_2$ on $u_2$ in parallel. If one of the machines halts, it means that the decomposition is not a witness that $u$ is in $L_1\cdot  L_2$, and $M$ continues with the next decomposition. The machine $M$ will halt once all decompositions have been tried. Therefore, $M$ does not halt on $u$ if and only if $u\in L_1\cdot L_2$.
Comment: Very nice! Should've seen that myself...

Is coRE closed under concatenation?


Do preterists who profess the two-age model believe that Jesus is still with us?

Question: Many preterists (full or partial) hold to the two-age model of eschatology (the Jewish age ended in 70 A.D., ushering in the Gentile age). How do preterists reconcile this perspective with Jesus' promise in Matthew 28:20 that He will be with Christians "all the days until the completion of the age" (literal translation). Does that mean that Jesus is no longer with us since the age to which He was referring has ended from a preterist perspective?
Comment: Yes, in the church. Jesus said, "Wherever two or more are gathered in my name, there I will be also."  And don't even get me started on the Eucharist :)
Comment: And that's why it wasn't an answer :)
Comment: I agree with you, but I'm looking to hear someone reconcile preterism with the two-age model because I tend to subscribe to this position but have not yet resolved this dissonance. I definitely believe Jesus is still with us, but I'm curious for how someone presents that argument in light of Matthew 28:20.
Answer: Not necessarily. Technically one could take the two-age model literally where one age would end in 70 (and thus Jesus would no longer be with us), but most who hold to this believe that the ages overlap. So Jesus was talking about the present age that overlaps the former age when he said it. Thus he will be with us to the end of the current age, which overlapped the former age.
Comment: I edited this so that it would make more sense. I'm hoping I was understanding you correctly. Please review my edit and correct it if not.
Comment: That's fine, yes this is what I tried to say. I mostly just access Internet on my phone so my typing is harder
Answer: Although I'm not a preterist (none of that is important to me), this is the argument you would need to consider.
Matthew 28:20

Teaching them to observe all things, whatever I have commanded you, and behold, I am with you always until the end of the age. Amen.
διδάσκοντες αὐτοὺς τηρεῖν πάντα ὅσα ἐνετειλάμην ὑμῖν καὶ ἰδού, ἐγὼ μεθ᾽ ὑμῶν εἰμι πάσας τὰς ἡμέρας ἕως τῆς συντελείας τοῦ αἰῶνος ἀμήν

It is natural for us in English to think of the conjunction ἕως (heōs), translated as "until," as the terminus ad quem of an action.
That is to say, most read this scripture and think, "Jesus will be with the disciples until the end of the age, but after that, he will no longer be with them." In other words, the "end of the age" is the terminus ad quem or "limit to which" Jesus will be present with them, and after the end of the age, he will no longer be present with them.
However, ἕως is a bit more flexible than simply pointing to the terminus ad quem of an action.
Consider 2 Samuel 6:23.

And Mikhal, the daughter of Sha'ul, did not have a child until the day of her death.
καὶ τῇ Μελχολ θυγατρὶ Σαουλ οὐκ ἐγένετο παιδίον ἕως τῆς ἡμέρας τοῦ ἀποθανεῖν αὐτήν

Mikhlal did not have a daughter until she died. Quite plausible, possible, and probable.
However, if ἕως points to "the day of her death" as the terminus ad quem, then we must admit that Mikhlal had a child after she was already dead.
Such is impossible. Clearly, ἕως does not always point to a terminus ad quem. Mikhlal did not have a child to the day of her death, and thereafter. Likewise, Jesus would be present with his disciples to the end of the age, and thereafter.
Answer: Good question.  As a Full Preterist I would respond "No".  Some nuances can be lost in translations and this is a good point.  If my child were facing a surgery I might try to comfort them by saying "I will be here for you, even through this end of this surgery".  I'm not saying after the surgery I am suddenly leaving them.  The major point is I will always be there for my child, even through this painful part of their life.  Yeshua established the major point in the first part of the statement then followed with an example of his faithfulness. The other part of the statement that should prove his ongoing relationship is context.  In this context, the typical translation, albeit misleading, is "end of the world".  This has lead many dispensationists to point at a non-point.  Translation is "completion of the age".  The Jews understood two ages: This Age and The Age To Come. They were living under the Mosaic Age and looking forward to The Age To Come. They had total understanding of what Yeshua was telling them: that even after the transition of the "Ages" Yeshua would still be there for them.  Not a problem for them but can prove to be an issue for believers living under different cultural conditions 2000 years later. One thing to consider about the middle 15th-16th century, their means of communication varies a lot from how we speak and understand each other.  Their particular explanation of "heos" might have been "through" for us.  Therefore, the verse might as well read "I will be with you all the days, even through the end of the age".
Comment: This answer would be much stronger if you showed, with sources, that it doesn't merely reflect your opinion.  I hope you'll take a minute to review [how this site is different from others](http://meta.christianity.stackexchange.com/a/1809/21576), and better understand how [your answer can be supported](http://meta.christianity.stackexchange.com/q/692/21576).
Comment: Yes, I appreciate your perspective, however, the question was how a Preterists professes a two-age model.  I was only giving them my perspective of how I personally reconcile their question.  There really are no references existing when opinion or belief are involved. I did give a variation on the Greek word for "until" which is closer to the statement made in the Scriptures.  Thanks.


How to change the screen resolution for the GDM login screen?

Question: I use a login list with faces and the icons and text are tiny in GDM. Is there an easy way to change the resolution of the login screen? I'm currently using 10.04 Lucid.
Comment: I think it was not in the 10.04 version but in the 10.10 there is an option called "make default" which changes the resolution of the GDM also.
Comment: An option **where**?
Answer: On newer systems, you will want to place your monitors.xml file into the gdm configuration directory, the resolution will be picked up there:
This, of course, assumes that you have gon into Settings > Displays, and have selected the resolution you want, click 'Apply', this will create a monitors.xml in .config of your home dir.
sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/monitors.xml
More details available at
https://wiki.archlinux.org/index.php/GDM#Setup_default_monitor_settings
Comment: Thanks, this worked! I additionally ran `sudo chown gdm:gdm /var/lib/gdm3/.config/monitors.xml`
Answer: Gaurav has the right solution for Ubuntu 10.10 (use "Make Default" in System > Preferences > Monitors), however this requires a bit more work in Ubuntu 10.04 LTS. It also means your GDM will have the same resolution as your desktop's.
First find out which resolution your display can take and what its name is. In the following example my laptop display is LVDS-1 and its rated resolution is 1280x800:
<code>$ xrandr -q
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096
LVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800       60.1 +
   1024x768       59.9*
   800x600        59.9
   640x480        59.4
   720x400        59.6
   640x400        60.0
   640x350        59.8
VGA-1 connected (normal left inverted right x axis y axis)
   1024x768       60.0
   800x600        60.3     56.2
   848x480        60.0
   640x480        59.9
TV-1 connected (normal left inverted right x axis y axis)
   720x576        50.0 +
   1024x768       50.0
   800x600        50.0
   720x480        50.0
   640x480        50.0
   400x300       100.0
   320x240       100.0
   320x200       100.0
</code>
Note in the above output the resolution currently used is marked by an asterisk (*). Next you want to test if such resolution works and find the right command to set it up:
<code>xrandr --output LVDS-1 --mode 800x600x32
</code>
In the above command you can change the depth (32 bit) for 24.
Next you want to add such command to the /etc/gdm/Init/Default file before /sbin/initctl ... [1]. The beginning of such file will look like this:
<code>#!/bin/sh
# Stolen from the debian kdm setup, aren't I sneaky
# Plus a lot of fun stuff added
#  -George

PATH="/usr/bin:$PATH"
OLD_IFS=$IFS

#if [ -x '/usr/bin/xsplash' ];
#then
#        /usr/bin/xsplash --gdm-session --daemon
#fi

xrandr --output LVDS-1 --mode 800x600x32
/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=gdm
</code>
Once you've done this you can logout to see the results. I tested this in a VM environment only but it should work on a standard install ("bare metal").
[1] https://wiki.ubuntu.com/X/Config/Resolution#Setting%20xrandr%20commands%20in%20kdm/gdm%20startup%20scripts
Comment: Thanks, in my "what happened" answer. I was just stating a fact along with the recognition that I don't know exactly what changed in the xorg.conf file.  MagicFab as I would expect your answer does offer the same results and I'll accept it unless someone has one that better qualifies as "easy". However can you give a really quick explanation of why it is better to use this method than the xorg.conf changes. If I was talking to someone who wasn't comfortable with the command line and had an Nvidia card I would still be tempted to send them the GUI route unless there is an unforeseen danger.
Comment: The method I described should work for all graphic cards. The method described by Dennis works only with NVidia binary drivers, which come with the nVidia config tool which happens to generate / modify xorg.conf etc. - unless you want to dig into xorg.conf syntax, which is another option.
Comment: I'm having the same problem as the OP in Natty, but this solution is ineffective. In fact I added a debug call to xrandr in the Init/Default script, and it logs the normal setting for the monitor, with 1366x768 resolution. Nevertheless, the login screen is stuck at 1024x768. I even added the monitor setting app to the login window setup, and it won't allow any resolution except the three "safe" ones (1024x768, 800x600, 640x480 I think).
Comment: For 18.04 the answer below is the correct one. There is no `..initctl` line in the newer `.../Init/Default` file
Answer: OK for me the answer was in the xorg.conf file.  I don't even know exactly what the pertinent lines are, but previously I didn't have a /etc/X11/xorg.conf file.  Because I didn't want to screw anything up I didn't really investigate it.  After installing a new video card and switching to the Nvidia binary drivers I used the configuration tool to change the screen resolution.  However it was not persistent between logins so I tried the "Write settings to xorg.conf file" button. Next time I logged out the user login menu had the same resolution as all the other users screens. I'm sure this would be a problem if everyone wanted different resolutions but for me that isn't the case.
Answer: It can be a isolated problem with the current theme. Which theme you are using now in GDM? Did you check if you have the same problem with others themes?
You also can try to reconfigure your GDM using the commands (You will lose your X11 session doing so) below:
<code>$ sudo dpkg-reconfigure gdm
$ sudo /etc/init.d/gdm restart .
</code>
You may need to run the gdmsetup (just works for Ubuntu before 2010):

Press Alt + F2, type gdmsetup and press Enter (will open a desktop application).
Comment: Latest ubuntu version are using a different gdmsetup tool. None of the current or previous gdmsetup tools allow you to change the resolution.
Comment: He did not have mentioned the Latest Ubuntu (he is using 10.04 Lucid). Anyway, gdmsetup is not useful... I'll fix my Answer. Thanks!


Book from possibly 20 years ago, first of series?

Question: Protagonists were current Earth residents (maybe rock band members??) who are transported to another universe. I believe written by duo authors. Not sure this is enough, but thanks if yes.
Comment: Definitely need more details. Do you remember them playing music? Or was it a matter of a particular look, say leather and chains, that makes you think of band members? Was it in English? Do you remember any aspects of the other universe? Was it a different culture of humans? Entirely alien? Different physics? Magic? :) Feed us.
Comment: Sounds like Bill & Teds Excellent adventure to me.
Comment: only other detail is perhaps one of authors was Weis? (I am not sure why this search.... I have quite eclectic sci-fi tastes, but remember this as an early read that led me to more) perhaps more fantasy than sic-fi, and definitely not russian! and it was english
Comment: For duo authors with Weis, Margaret Weis comes to mind. She did a lot of books with Tracy Hickman, but also a lot of others. Check the listing at http://www.isfdb.org/cgi-bin/ea.cgi?671 and see if anything tickles your memory.
Comment: Thanks. No, not them... I had checked that option previously. I do realize so very little info, I hoped the rock band identities might help. Not very important.
Comment: It couldn't be the Beatles fanfiction "With Strings Attached," by any chance?
Answer: Spellsinger by Alan Dean Foster features a protagonist, Jonathan Thomas Meriweather or Jon-Tom, who is an amateur musician from Earth; he is transported to a fantasy world of anthropomorphic animals and is given a special guitar which can be used to change reality (cast spells) based on the songs (generally rock-n-roll) he sings using it.  There is only one person though, not an entire band.  He does get occasional accompaniment in later books.
Answer: You didn't give too many details, so I think multiple books might match.  Ok, so was it the novel Arkady and Boris Strugatsky, The Doomed City (original title Град обреченный)?

The novel is set in a mysterious world where enigmatic Mentors run a sociological experiment. The mentors gathered volunteers from Earth from various places and times: from Germany of the 1940s, the USA of the 1960s, Sweden of the 1970s, etc. The volunteers do not know the goals or conditions of the experiment. In spite of different native languages the people can effortlessly communicate with each other. Most of the people live in the City that is skirted by a swamp on one side and a desert on the other. Apparently, the experiment runs out of control, the City is shaken by a social unrest and an egalitarian system of job rotations is replaced by a dictatorship.
The main character — Andrei Voronin — is an astronomer from Leningrad of the 1950s. He struggles to find his identity and his place in the strange city, at first being a vehement opponent of the dictatorship, and later becoming a leading adviser of the dictator. Naively idealistic at the beginning of the novel, he seems to have become crass in the second half.
However, eventually, he leads an expedition to explore the desert. The expedition proves difficult in the extreme. The members are exhausted, they turn back or perish. Eventually, only Andrei and Izia (Joseph Katzman) forge ahead. They encounter deserted cities and ruins of Earth cultures that show that the mysterious world is very old and the humans inhabited it for a long time.
As Andrei and Izia proceed, they ponder the strange world and the meaning of human existence. They run out of supplies, but they keep going on eager to learn what is beyond the "zero point". Andrei dies on the border shooting at his double. He then finds himself back in the Leningrad of the 1950s, where his Mentor tells him that he passed the First circle, but "there are many of them ahead".

I don't remember any rock band members though.


Determine if site is open as web app or through regular safari on ipad?

Question: Is there a way to determine if a visitor is viewing our site as a web app on their home screen or regularly through safari on ipad?
Answer: I figured it out:
Make sure proper web app meta info is there:

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />

Then add this script

So, window.navigator.standalone will be true IF they are viewing in the fullscreen web app mode. Super.
Source: This is for iphone but it works the same and is where i figured out how to do it: http://www.bennadel.com/blog/1950-Detecting-iPhone-s-App-Mode-Full-Screen-Mode-For-Web-Applications.htm
Comment: Thanks for answering your own question! Helped me out heaps just now.
Comment: perhaps `window.location.protocol == 'app:'` would be more general and explicit?
Answer: I'm not sure how far back this behavior goes, but iOS will present different UserAgent strings to the server which can be used to detect if the page is being requested by a webapp or safari browser.
Safari Browser

Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B436 Safari/600.1.4

Home Screen Button/Web App

Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12B436

Notice it does not include 'Safari' in the UserAgent. I've confirmed that this behavior goes back to at least iOS 7, but I'd imagine even further.
Answer: If you are looking for only a style change you can also just use a media query for the max-height of 700px.  In safari the screen height it 660px while in a web app it's 740px (in landscape mode).  You would need a height/width combo if your app works in either orientation.


Why do I always screw up when people are watching?

Question: I'm wondering why people are more likely to fail when they know people are watching and or counting on them. For example in a football game where there is 2 seconds left in the game, and team A has the ball and they're 2 points behind team B. They go for a field goal and the kicker misses by a mile after going say 20 for 20 field goals all season before that kick. What explains the cause for underperformance when the stakes are high, or someone is watching, etc?
Comment: Interesting to note that this phenomenon goes both ways, as some people perform extraordinarily *well* under pressure. In sports, these are called "clutch" and "choke", and there are good objective measures for study in this domain.
Comment: It would be about the self-confidence. People with high level of self-confidence would feel like SHOWING others what they can do, while people with low level of self-confidence would feel like PROVING others they can do it combined with the fear of not being able to do it. This can also relate to how previous unsuccessful experiences were perceived.
Comment: speaking from analyzing this very thing in myself, i'd say it largely because your attention is divided. i think you divide it among three things: the task itself, the audience, and your own fears and feelings about it.
Answer: There are quite a few studies on this, but a nice recent one is this:
Lee, Taraz G., et al. "Limiting motor skill knowledge via incidental training protects against choking under pressure." Psychonomic bulletin & review 26.1 (2019): 279-290.
(https://link.springer.com/article/10.3758/s13423-018-1486-x)
They consider a few possible mechanisms, but end up leaning towards a 'high incentives are distracting' story. (Another candidate that can't be ruled out is 'high incentives encourage top-down control processes, and those are just not very good at driving motor sequences'). The main evidence hinges on differences between implicit and explicit learning of a key-sequence task: only the people who got explicit instruction show choking under pressure, even though both groups are doing the same task. If you just want the final take-home, it's "our results lead us to conclude that a training regime that seeks to restrict awareness of movement strategies and structure could lead to more stable performance under pressure, potentially via reduced performance deficits in the face of distraction." but underneath that claim there's a bunch of cool structure in the patterns of performance across the two groups that they dig into in some detail.
Answer: I think the answer is pretty easy: stress. As Wikipedia states it,

When people think the demands being placed on them exceed their ability to cope, they then perceive stress.

The player might feel that the expectations of them are too high and also if they fail, that the negative consequences will be big in terms of being blamed etc.
This stress then occupies certain part of player's mental capacity, which means they are not fully concentrated on the task. I'm sure there's plenty of literature on the effects of stress on performance.
Now, certain amount of stress can actually be beneficial for the performance because it increases arousal, but the Yerkes–Dodson law tells us that if there's too much arousal, performance will decrease.


QGIS Query Builder button greyed out

Question: I want to query features under [Layer Properties] -> [Source] -> [Query Builder] but the query builder button is greyed out. The layer I'm using is from a shapefile with multiple demographic fields by US county. I'm using QGIS 3.16.
Comment: Welcome to GIS SE ! Please post your solution as answer (you can answer at your own questions) (you can even delete your question but maybe it helps other people).
Answer: I must have made an error while familiarizing myself with QGIS. I removed the layer then re-added it and I'm able to Query it's features now.

QGIS Query Builder button greyed out


How do I find the width of a given section of an ellipse?

Question: How would I be able to find the width of a horizontal ellipse (with a major axis of 120 and a minor axis of 5) at any given point along the major axis?
Comment: Can you please define what you mean by width?
Comment: By width I mean the length of a segment between the top and bottom curves of the ellipse that intersects and is perpendicular to the major axis. For example, if the ellipse were a wing then the width would be the chord length.
Answer: To solve your question you just need to write the equation of the ellipse.
The most natural coordinates for writing the equation are the ones where the origin coincides with the center of the ellipse and the major and minor axes are along the $x$ and $y$-axes respectively. In this coordinate system, the equation of your ellipse is $x^2/(60)^2+y^2/(2.5)^2=1$. Now given a point $(a,0)$ on the major axis, all you need to do is find the values of $y$ which satisfy the equation $a^2/(60)^2+y^2/(2.5)^2=1$. The difference of these values of $y$ is the width of the ellipse at $(a,0)$. Can you see why?


Printing reports in CUPS

Question: how can i get detailed printing reports from the CUPS printing server? for example, the user sending the job, IP address, especially number of pages sent to printer
Answer: Assuming your CUPS is on Linux, installed with all components into their default path. Then have a look at the file
<code>/var/log/cups/page_log
</code>
This file holds all information about jobs having been completed by CUPS. To understand the file's format, have a look at

http://localhost:631/help/ref-page_log.html or
http://www.cups.org/documentation.php/doc-1.3/ref-page_log.html or
http://www.cups.org/documentation.php/doc-1.4/ref-page_log.html or
http://www.cups.org/documentation.php/doc-1.5/ref-page_log.html

Each line in the file tells you for each job, copy and page the following info (if it's format is not customized):

Printer Name
User Name
Job-ID
Date+Time of Printout
Page Number
Copy Number
Job Billing Info (if submitted)
Print Client's Host Name
Job Name (if provided)
Media Name (if provided)
Sides: one- or two-sided? (if provided)

Printing reports in CUPS


Why does squinting make hard-to-see objects clearer?

Question: So I, like most other astronomy enthusiasts, have, at some point, not been able to see something clearly, such as a star, and have had to squint to be able to see it better. When this happens, the object seems to become clearer, but the light seems to gain a cross, or sometimes a hexagon, or an irregular line shape when doing so. I've noticed a similar effect on different models of telescopes, especially the newtonian reflector series. More on this here: (http://www.youtube.com/watch?v=ipe3NN1yPzM). Is this a similar effect on the eye? But more importantly how does squinting improve the quality of the picture?
Answer: Squinting works the same way as a pinhole camera.
Ideally, light from a single point source entering your eye anywhere on your pupil will be focused on a single spot on your retina. But this works perfectly only if you have perfect vision; otherwise light entering near the top of your pupil may be directed to a slightly different spot on your retina than light entering near the bottom.
By squinting, you block out some of the light from the edges, effectively making your pupil narrower, creating a sharper but dimmer image on your retina. (You may find that it improves the vertical resolution more than the horizontal resolution.)
If you happen to be nearsighted (as I am), you can see a similar effect by looking through a small pinhole, or through a small aperture made with your fingers. If the light is bright enough, you'll see a dimmer but sharper image.
The irregular shapes may be interference from your eyelashes.
Comment: +1 and from this same effect cometh the [pinhole glasses](https://en.wikipedia.org/wiki/Pinhole_glasses) :)
Comment: Is this right? Isn't it that when squinting you are only using the center of your lens which focuses light better than the edges of your lens. This is why when using a camera there is an optimal aperture to use. If you close the aperture too much then you begin to lose sharpness due to diffraction effects. Referring a pinhole camera does not seem to be quite correct since a lens is involved. What do you think?
Comment: @ehsteve: Well, I *think* that my answer is correct -- but I'm not an optics expert, and my answer is based just on my own common sense and personal experience. I do get a sharper image either by squinting or by looking through a small aperture made with my fingers. And I think the pupil is substantially smaller than the lens (at least in daylight), so you're not really using the edges of the lens anyway. I think that squinting *combines* the effects of a pinhole and a (likely imperfect) lens. But if someone who actually knows this stuff has better information, I'd be glad to hear about it.


Is it right to presume that the top hose to heater matrix is always the hot hose?

Question: Is it right to presume that the top hose to the heater matrix always comes fom the engine goes to the heater matrix and then exits, cold, to the lower radiator hose?
I have an o series engine installed in a sherpa van.
Comment: The pump drives the flow around the engine **and** heater circuit.
Answer: No, that is not a good assumption. Not that I can tell you off the top of my head even which way the coolant flows through the heater matrix, it could flow either way. It can flow all the time when the HVAC isn't even putting air through the heater core, meaning both hoses would be hot all the time. I can also be that there could be a valve in the coolant stream to the heater core where, when shot off, neither side is hot. There is nothing saying it has to be engineered so the hot fluid has to go into the top and cool out the bottom. It could flow either way ... there's nothing in physics or engineering which dictates it only flows one way.
Comment: That vehicle did not have ac as standard , just a bare minimum heating for winter - summer cooling was "open the windows"... , but could have had an aftermarket roof mounted ac unit but these tended to have their own engine driven compressors and were for refrigerated delivery trucks - very very rare, think I only ever saw one like that.


Which note to start the melody on?

Question: I am trying to learn to play melodies by ear. I was trying to play Twinkle Twinkle by ear. Justin Guitar taught that a melody can be played anywhere on the fretboard and when I tried to do so, I found out that starting from any note and going relatively from there doesn't sound right. The starting note has to be accurate for me to find the rest of the melody accurately. How do I find the starting note on the fretboard?
Answer:
The starting note has to be accurate for me to find the rest of the melody accurately.

This makes me suspect you are working from your memory of a recording or of a particular edition of notated score. Normally I would expect this to be the case with a pop song, not a nursery or folk tune like Twinkle, Twinkle, Little Star, because pop songs are usually know from a single recording and nursery/folk tunes have many performance versions.
When you say the "the starting note has to be accurate" I think it means you need it to the the specific pitch you know from your memory of the song. When you work out the rest of the melody you are matching pitches to your memory using your "inner ear."
The really issue we are circling around is melodies can be transposed from one key to another (or relative to some central pitch if the music isn't strictly speaking in a key.) What defines a melody (pitch-wise) is not the specific pitches but the relative intervals between the tones, and hearing pitches as degrees within a tonality/key.
Twinkle, Twinkle, Little Star is not really C C G G A A G G... As a series of intervals it's unison, ascending perfect fifth, unison, ascending whole step, unison, descending whole step, unison... or as tonal degrees it's tonic tonic dominant dominant submediant submediant dominant dominant...
A good way to improve playing by ear from any arbitrary starting note is practicing tunes (playing on an instrument and singing them) and transposing to other keys. Personally I think it's more effective to transpose to "distant" keys - those that differ by several sharps or flats. A quick way to transpose to a distant key is to raise or lower the starting pitch by either one half-step (5 sharps/flats) or a minor third (3 sharps/flats.) This should help you break out of memorizing melodies as fixed pitches and hear the relative interval changes as well has hearing pitches as tonal degrees like tonic, leading tone, mediant, etc.
Comment: I think the majority of folk would prefer '1,1,5,5,6,6,5', or 'do, do, so, so, fa, fa, so' than 'tonic, tonic, dominant, dominant... it's already unsingable..!
Comment: @Tim, I wasn't providing song lyrics. Solfege is of course another way to show the tonal degrees.
Answer: Your problem, if I understand the question, is that many songs do not start on the tonic.
Those that do are far easier to play from that note, but if you try something like Fur Elise, which starts on 5, or With a Little help from my Friends, which starts on 3, and assume that's actually the root or tonic, you come unstuck.
So, you need to establish what any start note is - which number in the scale, whether it's do, me, so or whatever.Then play up your scale till that is your start note.
However, if you mean how do you find a start note that matches the beginning of a tune you're listening to, that's rather different.
Listen to just the first note, sing it, and simply play up a string one fret at a time, until it sounds like a match. But then you're in the realm of the original problem.
Assuming you can play scales - and without them, frankly, your job is far harder - move on to plan C.
Plan C is to listen further into the tune in question, and stop it at the note you feel is most likely a 'home' point. Where the tune could stop and end. In fact, more often than not, it is the end note. That gives you the key to the tune. Then play its scale, and decide which is the start note.
After all that, I hope I understood what you are asking!
Comment: For Eg. The tune for In My Life goes like E5-C6-E5-F5-G5-B6. But if I start from G4 then accordingly C6 should be converted to D5 since C6 is 8 semitones apart from E5 and so is D5 from G4. But the correct note after I start from G4 is G#5. Why is this? Its somehow that the shape of melody is preserved over the fretboard rather than the relative semitonal distance(E5 to C6::G4 to D5)
Comment: If Tim hasn't already solved it for you... Play your new starting-note again and again before trying to play the tune. And sing it maybe. It can be hard to chase the sound of the *old* position from your mind.
Comment: There's something badly wrong with what you've just commented on. Makes no sense at all. E5>C6 is nowhere near the same interval as G4>G#5. Should be G4>E5 - E>C is M6, and that interval will be the same whatever key you're in. So G>E is also M6.
Comment: @Tim Yeah you are right, I have confused some things and need to start learning music theory
Comment: @Tim - typo? G> E♭. Start note E [makes the song in C] E>C is 3>1[8]. G start makes the key E♭.
Comment: I don't think the melody note where the tune could start or end (satisfactorily) is necessarily the same as the tonic of the tune. For example, I've always thought that the best place to end the loop of Mario Kart Double Dash's circuit theme (e.g. Luigi Circuit) is at the end of its first measure, where the ending note is an E, not the tonic of C.
Comment: @Tetsujin - yes, should be Eb.Put it down either to me being an idiot (part-time), or a typo...
Comment: @Dekkadeci - not necessarily, but 9 times out of 10. If not, chances are it's one of the other two from the root triad - as in Mario's case. Certainly narrows it right down, and if OP knows scales, should be easy to reconcile.
Answer: Try first to play the scale do-re-mi-fa-so-la-ti-do (with the halftone steps mi-fa and ti-do).  You have to know the whole and semitones of the major scale! If you find the melody is fitting to this scale, you will also be able to identify the starting note of the melody, this may be the 1st, 3rd, 5th (very seldom  another, or even chromatic approach to one of  these degrees).
If the major scale doesn't fit, your song is probably in minor or a different mode.
You can start the scale on any string and fret just as you like. Learn the note names and the orientation of the tones on your guitar.-

Which note to start the melody on?


Persisting unauthenticated user on AWS Cognito and AWS Amplify with React Native

Question: I'm trying to implement AWS-Amplify in a React Native app so that events can be sent to Pinpoint for analytics. A user doesn't need to be signed in to use the app, so they would be unauthenticated with Cognito.
I am noticing that the identity of the unauthenticated user doesn't seem to persist, so when I close or uninstall the app, a new identity id is generated when I launch the app. The docs suggest that this should be cached, but it seems the cache is clearing out when using AWS Amplify.
Is there a way to set or reuse an identity id for a returning unauthenticated user on AWS-Amplify or Cognito so new identity ids don't get assigned ?
I looked through amazon-cognito-identity-js to see if there was a way to do this with an unauthenticated user and wasn't able to find what I am describing: see here.
I'm new to AWS Amplify/Cognito/Pinpoint in general, so any thoughts or suggestions to do something similar would be greatly appreciated!
Answer: This is a known issue in the AWS Amplify and should have been fixed in the latest version.
Comment: For your answer to be useful, you should provide some code.


What's the name of the Major scale that has 6th and 7th degree lowered?

Question: What's the proper name for a scale that follows 1  2  3  4  5 b6 b7
Comment: I think the word "major" is important. Otherwise, "the scale that has 6th and 7th degrees lowered" means nothing, since it could be *any* scale. OP is looking for the name of a concept, and I think s/he described that concept very clearly as it is.
Comment: I'd suggest removing the word 'Major' from the question title, because if a scale has flat 6 and flat 7 it's not a Major scale by definition.
Comment: @BrianTHOMAS the Ionian, Lydian, and Mixolydian modes are sometimes called the 'major modes', as they have the same 'major' third as the major scale. What the question describes could be thought of as (in that sense) *a* major scale, even if it isn't *the* major scale.
Comment: If I asked what Major scale has a flat 3, I doubt you'd tell me the resulting scale was still Major. All I was trying to say is that if you start with a Major and modify any of its degrees it's not, by definition, Major any more, it's a scale *derived* from a Major.
Comment: @BrianTHOMAS - generally, a scale with a major third  interval between root and 3 is regarded as 'major' in some form or another.. Can't think of any exceptions. So, the way the question is posed is reasonable.
Answer: Mixolydian b6. So called because it's mainly Mixolydian, with a maj.3 and b7, with the change of M6 to m6. The 5th mode of melodic minor.So, less of a scale, more of a mode, maybe.
Comment: I've heard this scale called the "major minor scale" before, although I can't find a source for it as of now. Either way Mixolydian b6 is more clear.
Comment: "major minor" because the first 4 degrees are from the major scale and the last 4 (incl. the octave) from the natural minor (aeloic).
Comment: @JoséDavid - I guess the melodic (ascending) would then be called the 'minor major' for similar reasons?


Compound binomial distribution distributed as binomial

Question: Suppose we have independent family of random variables $\{Y\}_{i\in\mathbb{N}}\cup\{N\}$, where $Y$s are identically distributed.
Next consider a sum of random number of random variables $W_N\equiv\sum_{i=1}^NY_i$, where $N\sim Binomial(n,q)$ ($n>1$ is a number or trials, and $q$ is success probability). Distribution of $Y$s is given by:
$$
\mathbb{P}(Y_1=1)=\alpha,\quad\mathbb{P}(Y_1=2)=1-\alpha\quad(\alpha\in(0,1)).
$$
Additionaly I have information that $q=0.36$ and I am asked about a value of $\alpha$, for which $W_N$ is distributed as binomial. I have a hint to use concept of Moment Generating Function (further represented as $M_{r.v.}(\cdot)$). So I made deriviation:
$$
M_{W_N}(t)=\mathbb{E}(e^{tW_N})=\\\mathbb{E}(\mathbb{E}(e^{tW_N}|N))=\\\mathbb{E}(\sum_{i=1}^\infty\mathbb{E}(e^{tW_N}|N=n)\mathbf{1}_{\{n\}}(N))=\\\mathbb{E}(\sum_{i=1}^\infty\mathbb{E}(e^{tW_n}|N=n)\mathbf{1}_{\{n\}}(N))=\\\sum_{i=1}^\infty M_{W_n}(t)\mathbb{P}(N=n)=\\\sum_{i=1}^\infty [M_{Y_1}(t)]^n\mathbb{P}(N=n)=\\\mathbb{E}([M_{Y_1}(t)]^N)=\\\mathbb{E}(e^{N\ln(M_{Y_1}(t))})=M_N(\ln(M_{Y_1}(t))).
$$
Next I calculated $M_{Y_1}(\cdot)$ and plugged in $M_N(t)=(1-q-qe^t)^n$:
$$
M_{Y_1}(t) = e^t\alpha+e^{2t}(1-\alpha)\\M_{W_N}(t)=(1-q-q(e^t\alpha+e^{2t}(1-\alpha)))^n.
$$
To obtain Moment Generating Function of binomial random variable, it must be in a form $(1-Q+Qe^t)^m$ for some $Q\in(0,1), m\in\mathbb{N}$. Here I have trouble to go further: by the fact that $Y$s take values in $\{1,2\}$, I am concluding that $N\leq W_N\leq 2N$ and $m=2n$. Even if my reasoning is correct, I would prefer some formal mathematical translation of this argument (which I cannot grasp).
But then when I am proceeding and equating polynomials, I am getting $\alpha>1$; steps below:
$$
(1-q-q(e^t\alpha+e^{2t}(1-\alpha)))^n=(1-Q-Qe^t)^{2n}\quad (x\equiv e^t)\\(1-q-q(x\alpha+x^2(1-\alpha)))=(1-Q)^2-2(1-Q)Qx+Q^2x^2\\(1-q)-q\alpha x-q(1-\alpha)x^2=(1-Q)^2-2(1-Q)Qx+Q^2x^2\rightarrow\\1-q=(1-Q)^2\land q\alpha=2(1-Q)Q\land-q(1-\alpha)=Q^2.
$$
Solving, I obtain equation:
$$
q^2\alpha^2-4q(1-q)\alpha+4(1-q)q=0.
$$
Solving for $\alpha$ gives solutions of the form:
$$
\alpha^*=\frac{2[(1-q)\pm\sqrt{(1-q)(1-2q)}]}{q}.
$$
After substituting $q=0.36$ I obtain 2 numbers bigger than $1$, which is incorrect, since $\alpha$ is probability of event $\{Y_1=1\}$.
I would be grateful for any hints!
Comment: Your calculations should produce $\alpha =1$ as a solution as you would then have $W_N=N$ which is normally distributed
Answer: We can recognize that the sampling process has resemblance to a multinomial distribution and we take the sum of two categories. Alternatively we can see it as a sum of a categorical distribution with probabilities
$$P(X_i = x_i) = \begin{cases}
1-q & \quad \text{if $\quad x_i=0$}\\
q\alpha & \quad \text{if $\quad x_i=1$}\\
q(1-\alpha)& \quad \text{if $\quad x_i=2$}
\end{cases}$$
And your variable is $$W_n = \sum_{i=1}^n X_i$$
Now the trick is to

figure out the moment generating function of $X_i$
apply the rules for moment generating functions of a sum of independent variables
compare it with the formula for the moment generating function of a binomial distribution

Without applying moment generating functions, we can already see that the case $\alpha = 1$ reduces $X_i$ to a Bernoulli variable for which we know that the sum is a binomial distribution. My intuition tells me that it is the only case, but with the moment generating functions you can prove it and I guess that the exercise also wants you to practice with such functions.
Comment: I didn't read your question thoroughly. It looks like you already correctly derived the moment generating function and the step is to realize that the form $(1-Q+Qe^t)^m$ is only obtained with $(1-q-q(e^t\alpha+e^{2t}(1-\alpha)))^n$ if $\alpha = 1$ in which case the $e^{2t}$ term disappears.


More co-authored than solo papers in the Humanities

Question: I am halfway through a PhD in History in the UK, in a highly unusual subfield. As my competences are quite rare, I have already been asked to help out with, and be a co-author of, two different papers with postdocs/professors in other areas of the Humanities. The results are interdisciplinary articles that I am quite happy with. I am also writing an additional article with a fellow PhD student (I will be the first author there).
As I am only now finishing up my first solo paper, I am concerned that having more co-authored papers (3) than solo ones (1) will hurt my CV when I apply for postdocs/jobs. Will institutions look down on me for co-authoring more papers than the norm in the Humanities?
Comment: I am not in the humanities (rather, in math where solo papers are still the norm), but in my opinion it is not the percentage of coauthored papers that could be problematic but rather whether *all* of your papers are coauthored, and (worse) coauthored with the same senior people.  If you have one strong solo publication, then at least in my neck of the woods that would allay people's worries.
Comment: Do the articles specify the author's contributions? If so, it would be clear what you did, and how your unique skills are a good asset for whomever wants to hire you. (But I am not in humanities, so I don't know if they will be seen like that by most people).
Comment: Thank you for your comment. The three papers have only one other author each; these are three different people and none is my advisor. So hopefully that is not problematic!
Answer: In the UK, up until last year, hiring for lectureships was all about the Research Excellence Framework (REF). Going forward, hiring will likely be all about the REF. We just made two hires in my department and the keys questions were what did the applicants look like for the last REF and what might they look like for the next REF.
Co-authorship in my field is the norm and for the last REF where on the authorship list you were did not matter. I am pretty sure this was true across all assessment units, but you should check with someone in your department. For REF 2014, the same paper could be returned multiple times if the authors were spread across multiple universities (and possibly even multiple units of assessment). For REF 2020, we do not know what the rules will be. Potentially, they will attempt to assign partial credit to publications or only allow a paper to be returned once, but this would be hugely messy.
If REF 2020 devalues co-authored papers in History, and by 2020 you won't have N (last time N was 4, but could be reduced for new lecturers) single authored publications, then the joint publications will be looked at unfavourably.


Could one sample be enough for a perceptron training?

Question: I need to compare a picture and decide whether or not it is similar to another one. In this case, I would like to use a simple perceptron that compares pixelmaps of both pictures. But I have only very basic understanding of neural networks and I am not sure whether this approach will work if there is only one source picture (to train it with). Anything I could do in this case?
Comment: Not sure I understand correctly: are you saying you have one "source" picture and lots of "comparison" pictures, and for each "comparison" picture you want it to tell you how similar it is to the "source"?
Comment: Yes, exactly. There is one original and I want to say whether any other picture is similar or not. Because from what I understand, the weights should be adjusted with each example and having just one means it will not be that accurate.
Comment: Having one "source" shouldn't cause any problems, as long as you don't want to change it later. What you need is lots of images to compare it to, to use as your training data.
Answer: When you train a neural network, you need both positive and negative inputs.  If you were to say, only indicate to a neural network that when given an image that it should return 1, when given an image which is not similar, it may return 1 all the same.
And in this circumstance, while there is only 1 image you'd like other images to be similar to, there are many many many images which are not similar that should return 0 or close to 0.  Before the neural network will return results similar to what you'd expect, you must be the one to show it what you expect.
Supposing you wanted to have it match photos containing the same person's face.  You would train your neural network to return 1 in these with precisely that person's face inside the photo.  You would then show it photos of other people's faces and return 0.5.  Then you would show it photos of bridges, buildings, people without closeups and have it return 0.  At this point, you have what would be a very crude face recognition neural network.  I doubt if you would be able to have a neural network provide any value of meaning with just one photo.
Answer: As always with neural networks, it's difficult to say anything for sure without actually trying it out. But I think the fact that you've only got one "source" is unlikely to cause problems. In fact, it might simplify things. The important thing is to have lots of images to compare it to for training.
For the structure of the network, I don't think you'd need to supply the source as an input: as it would be the same for all of the training data, it wouldn't actually be doing anything! Instead, the perceptron should learn it from how similar each of the other images are.
Just bear in mind that the perceptron would become trained to that one source, i.e. you wouldn't be able to change the source picture without completely re-training. Also as I said above, make sure you've got a large training set (i.e. the comparison images).
Note: I haven't done much at all with images in neural networks, so I can't comment on some of the other points such as whether pixelmaps would be suitable.


Coalescence of soap bubbles and its impact on the resulting volume

Question: Suppose I have two spherical soap bubbles of volumes $V_1$ and $V_2$. Suppose, they are found to coalesce under isothermal conditions to form another bubble. Is the volume of this resulting bubble the direct addition of the volumes $V_1$ and $V_2$? Why, or why not? The total quantity(moles) of air must remain conserved, but what can we say about the resulting volume? Should the resulting volume be always greater than the individual volumes, or can the two bubbles coalesce to form an even smaller bubble? Can someone explain this to me briefly?
Answer: Volumes actually depends upon their respective radii and the surface tension of the respective materials. Let me explain this to you briefly.
The number of moles must be conserved which can be said from Principle of Atomic Conservation. Thus let their initial moles be $n_1$ and $n_2$. The final number of moles will be
$$n_f = n_1 + n_2 \tag{i}$$
From the ideal gas law, we can say that
$$n_f = \frac{P_fV_f}{RT} \tag{ii}$$
$$n_1 = \frac{P_1V_1}{RT} \tag{iii}$$
$$n_2 = \frac{P_2V_2}{RT} \tag{iv}$$
Where the pressures and the volumes are of the respective bubbles.
Note that all three equations have the same temperatures $T$ as the conditions are isothermal.
We can obtain an expression for the pressures from surface tension. You might get its related information at this Physics LibreTexts article.
Thus the excess pressure inside a soap bubble is
$$P_i - P_o = \frac{4T}{R} \tag{v}$$
Where $P_i$ and $P_o$ are the inside and outside pressures respectively and $T$ is the surface tension of that material. For simplicity I am taking same $T$ for both the bubbles and $P_o$ as atmospheric pressure.
From this expression we can get the values of $P_f$, $P_1$ and $P_2$, which are the internal pressures of the bubbles, by plugging in their respective radii.
Volumes, $V$ will obviously be $\frac{4}{3} \pi R^3 \tag{vi}$
From the equations $\mathrm{(i)}$ through $\mathrm{(vi)}$ you can get the final volume of the bubble.
$V_f = V_1 + V_2$ might be a specific case. And from the answer obtained you can compare the final volume with the initial volume.
Comment: Another thing- since the soap bubble is having two exposed surfaces, I think the excess pressure should be 4T/R and not 2T/R.
Comment: I want to know if you can always account for a possible resulting volume. If you could kindly explain why does the resulting volume differ from the direct addition of the individual volumes, it'd be very helpful.
Comment: We cannot always account for a resulting volume unless we know the values of surface tension and also the radii. Also, when you solve the equations, you get some value of $R$ which can be used to get the volume. And from the final expression which is obtained it is easy to say that the resulting volume will not be equal to the sum of the two.  I would better suggest you to go ahead and solve for the resulting volume.
Comment: Actually I've solved for the resulting volume and it isn't equal to the sum of the two volumes indeed! I just want a practical explanation of the situation(without any math involved) as to why does it differ at all.
Comment: I think that this can only be explained mathematically as explaining this practically would require too much to imagine


Specifying the Rights Mask for a custom permission level

Question: I have a custom action that I want to be disabled if the user does not have the ability to edit the item. However, I am using a custom permission level, not Contribute. The permission level is essentially the same as Contribute but with Adds and Deletions removed. I won't have a good way of testing this out until next week, but would the EditListItems mask work for this or is it more specific to Contribute?
Answer: I was able to find someone to run a test with last night, and we confirmed that the custom permission level only needs to have the "Edit Items" permission in order for custom actions to hide/show based on the "EditListItems" rights mask.


How would I configure etherchannel for this particular topology?

Question:
How would I setup and configure etherchannel from switch0 to all the other switches?
Switch0 has been configured as the root bridge, Router0 has been configured to be the gateway for each Vlan and as a dhcp server, and all the switches are properly connected (as access and trunk interfaces)
Comment: You need multiple connections from Switch0 to the other switches, but you are not showing that in the drawing.
Comment: What Ron said. What the exercise wants you to do is add dual connections to all other switches from Switch0 and configure them as portchannels.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: Since all "education, certification, or homework" questions are off-topic here, we will not give you the answer (and you don't include enough information for that, anyway), but below is enough information for you to figure out the answer for yourself.
On the distribution switch (Switch0), you need to create port channel interfaces to each access switch:
interface Portchannel<channel number>

Then place all the interface configurations in common for that channel to an access switch under the channel interface. After that, you add the physical interfaces to an access switch to the channel under the physical interface configuration. It depends on the particular channel protocol you want to use.
Unconditionally channel:
channel-group <channel number> mode on

PAgP:
channel-group <channel number> mode desirable

LACP
channel-group <channel number> mode active

You then do the same thing on the access switches for the interfaces back to the distribution switch.
The distribution switch will have one channel interface for each access switch, and each access switch will have one channel interface back to the distribution switch.


Can I send funds from Shelley Wallet to Byron Wallet?

Question: I've got a very simple question, is it possible to transfer funds from Shelly to Byron or Byron to Shelley Wallets? If it's possible, do I need to consider anything else different than sending as usual between two Shelley Wallets?
Answer:
No, transactions where the destination address is a Byron era address are no longer valid. I think you can send funds in Byron era addresses to Shelley addresses.
If you still have a Byron era wallet I highly recommend that you upgrade it to Shelley sooner rather than later. At least in the Daedalus wallet, this is trivial.

Turns out that the answer I gave above is actually incorrect. The following is from my IOG colleague Sam Leathers.
Byron addresses are just as valid as Shelley in the ledger, although have a slightly larger minutxo because of their size. A number of large exchanges still only use Byron addresses. Its probably not a good idea but it is valid.
Answer: Yes, you can send funds to Byron address from Shelley address and vice-versa. You can spend ADA and native assets like that. Nothing special is required.


Why does rotating a double bond break the bond?

Question: It is well known that double bonds are "stiff" and make particles less likely to rotate around the bond. But why? What makes it so that the bond has to be orientated a specific way?
Comment: What do you know about how the second bond of a double-bond forms?
Comment: Reduce overlap.
Comment: https://youtu.be/nxVO2cz4OCM
Answer: Besides the thermodynamic barrier with respect to double bond rotation, we could also look at it from a symmetry perspective.
Rotating a double bond, without breaking the $\pi$ bond first, requires that you rotate the left or right orbitals that participate in the $\sigma$ and $\pi$ bonds (but not both atoms' orbitals, because that would be rotating the molecule, not the bond).
Suppose that we are looking at a $2p_x-2p_x$ $\pi$ overlap for a $\text{C}=\text{C}$ bond. If we rotate the $2p_x$ orbital $90^o$ about the internuclear ($z$) axis, we can transform the $2p_x$ orbital into a $2p_y$ orbital. Ethene, for example, is a molecule of $D_{2h}$ symmetry, and contains a $\text{C}=\text{C}$ bond.
According to this D2h character table, in ethene, the $2p_x$ orbital transforms under the $B_{3u}$ IRREP, but the $2p_y$ orbital transforms under the $B_{2u}$ IRREP.
Two orbitals transforming under different IRREPs cannot overlap, so the $\pi$ bond can no longer be made if one of the orbitals is rotated.
Beyond that, if you rotate one of the $2p_x$ orbitals about the internuclear axis by some small angle (instead of specifically $90^o$), you would change the orientation of the x-axis for only that orbital, and they would technically not be the same orbital anymore because each would be following a different x- (and y-)axis convention.
Comment: It is quite easy to break a double bond with a photon of the appropriate energy. This promotes an electron into an 'antibonding' LUMO from which rotation is far easier as $\pi$ electron overlap is reduced.
Comment: What you say about symmetry is true, but in essence the lack of  rotation is about the stability of the double bond vs. thermal energy available. The double bond's strength is far greater than this and so is stable wrt rotation. The bond has to have two similarly oriented p orbitals as these otherwise do not overlap, i.e. we say that px, py , pz etc are orthogonal to one another.
Comment: @porphyrin therefore can we say that cis-trans forms are interconvertible at high temperatures
Comment: Yes, technically they are interconvertible any any temperature  but both the rate constants will become bigger as the temperature increases, as per Arrhenius for example.


Are there keyboard shortcuts to move paragraphs up or down while editing text?

Question: Microsoft Word on Windows has this really handy feature where you can move the current paragraph up or down.  I think you type alt+ctrl+up or alt+ctrl+down, though I don't have a Windows PC in front of me and I can't test that.  The shortcut is far easier than selecting the paragraph, cutting it, moving to the start of the previous (or end of the next) paragraph, then pasting it.
Answer: I had to disable two default shortcuts in the keyboard control panel (within System Preferences), that were designated for "Mission Control" and "Application Windows". They were getting in the way of me using this shortcut on Mac Word. Once that is disabled, you can use Shift + option/alt + up or down arrow.
Answer: Mac Word
Control+Shift+Up and Control+Shift+Down both work in the Mac version of Microsoft Word.
Text Edit
In Textedit the following should move the paragraph up

Alt+Up
Alt+Shift+Down
Cmd+X
Alt+Up
Cmd+V

Other options
If you are seriously interested in text editing power, then you might like to check out MacVim. In Vim you you could use a command like dip{p (i.e., delete in paragraph, navigate up a paragraph, and paste).
Comment: I like the idea of recommending `vi` to somebody currently using MS Word :-)


How do I change parental controls without pin/call to nintendo

Question: My friend gave me a 3DS XL that I want to change the pin on to access the internet and format the system memory.  My friend doesn't know the pin or the answer to the forgot PIN question and I really don't want to call nintendo for  this.  Can anyone help me?
Comment: Why would someone just give you a 3DS XL? Your scenario sounds pretty dubious.
Comment: It was broken so he had no use for it and gave decided to give it to me.  I fixed it (I just had to fix the charging port and bottom screen LCD) and now I have to get past the parental controls to format it and connect it to my NNID.
Comment: Keep in mind that if you format the system, they will not be able to access their purchases anymore. You may want to do a system transfer instead of formatting once you get the pin reset.
Comment: About that, does the target's NNID get replaced with the source's NNID?
Comment: After the transfer the target 3DS will be linked to the NNID that was previously on the source 3DS. But you don't want there to be an NNID on the target 3DS at the time of the transfer. If you transfer to it, that target's NNID will still be stuck to that 3DS. It can never be used on any other 3DS unless it is transferred first.
Answer: The standard way of dealing with a forgotten 3DS parental control code is to following the official guide for resetting the pin which does involve contacting Nintendo. Alternatively you can find various tools online that should be able to accomplish the same task without needed to contact Nintendo. One such tool available at this time is called 3DS Parental Tool.
Answer: The 3DS Parental Tool does not work with the 3DS XL, the code you have to input is too long.
I found a link to a tool that worked, and it's online with nothing to download.
https://mkey.salthax.org/
Comment: saved my day, i don't understand why this was downvoted