Why are there only 5 abelian groups of order 48?

Question:
I am trying to understand exactly how this works. I am following this procedure up until it shows the second equivalences. For example, why is $\mathbb{Z}_{2^3}\times \mathbb{Z}_{2} \times \mathbb{Z}_{3} \cong \mathbb{Z}_2 \times \mathbb{Z}_{24}$? Furthermore, why isn't it isomorphic to $\mathbb{Z}_{48}$, or any of the other products on the RHS of the second equivalence?
Comment: This may help: [Product of two cyclic groups is cyclc iff their orders are co-prime](https://math.stackexchange.com/questions/5969/product-of-two-cyclic-groups-is-cyclic-iff-their-orders-are-co-prime)
Comment: That is true, as I realize now your question is more about why those groups are isomorphic. In that case, a better resource would probably be [this Wikipedia article on Direct Products](https://en.wikipedia.org/wiki/Direct_product#Group_direct_product). It doesn't give any specific examples, but the discourse on isomorphisms throughout might yield better understanding.
Comment: I find [this resource on the OEIS wiki](https://oeis.org/wiki/Number_of_groups_of_order_n) quite helpful
Comment: Thanks, but this resource gives me an answer, not an explanation.
Comment: Is theorem 51 the structure theorem? You might want to see a few examples of how it's used
Comment: Please do not rely on pictures of text.
Answer: $48=2^4×3$.  The number of partitions of $4$ is $5$.  They're $$1+1+1+1, 1+1+2,2+2,1+3,4$$.
Now apply the structure theorem. It implies (along with the Chinese remainder theorem) the general result that if $n$ has prime factorization $p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$, then the number of abelian groups of order $n$ is $p(a_1)p(a_2)\cdots p(a_k)$, where $p(x)$ is the number of partitions of $x$.
Answer: I have to assume that "Theorem 51" is the classification of finite abelian groups. If we recall, this says that

Every finite abelian group can be written as a direct sum of cyclic groups of prime power order
$$ \bigoplus_\alpha \mathbb{Z} \big / p_\alpha^{k_\alpha} \mathbb{Z}$$
Moreover, this decomposition is unique up to (noncanonical) isomorphism

So, let's start small. If we want to understand all abelian groups of size $12$, we can factor $12 = 2^2 \cdot 3$. Now there are two ways to get all of these prime powers:

$\mathbb{Z} / 2 \mathbb{Z} \oplus \mathbb{Z} / 2 \mathbb{Z} \oplus \mathbb{Z} / 3 \mathbb{Z}$
$\mathbb{Z} / 2^2 \mathbb{Z} \oplus \mathbb{Z} / 3 \mathbb{Z}$

The "uniqueness" clause of the classification tells us that these decompositions are not isomorphic. Of course, we can also see this directly: the latter has an element of order $4$ while the former doesn't. So they cannot be isomorphic!

Let's see another example. What are the possible abelian groups of order $2^3 \cdot 3^2 \cdot 7$?
Well, we have to have $3$ copies of $\mathbb{Z}/2\mathbb{Z}$ somehow. We can do this as either

$\mathbb{Z} / 2\mathbb{Z} \oplus \mathbb{Z} / 2 \mathbb{Z} \oplus \mathbb{Z} / 2 \mathbb{Z}$
$\mathbb{Z} / 2 \mathbb{Z} \oplus \mathbb{Z} / 4 \mathbb{Z}$
$\mathbb{Z} / 8 \mathbb{Z}$

(do you see why?)
Then we have to have $2$ copies of $\mathbb{Z} / 3 \mathbb{Z}$. We can do this is either

$\mathbb{Z} / 3 \mathbb{Z} \oplus \mathbb{Z} / 3 \mathbb{Z}$
$\mathbb{Z} / 9 \mathbb{Z}$

Lastly, we have to have $1$ copy of $\mathbb{Z} / 7 \mathbb{Z}$, and there's only one way to do this

$\mathbb{Z} / 7 \mathbb{Z}$

All in all, this gives us $6$ groups of this order (again, do you see why?)

In general, then, how do we figure out all the possible abelian groups of order $n$?

First we factor $n$ into prime powers.
Then we list all the ways of partitioning each prime exponent into a sum of integer pieces.
Lastly we have to choose one of these partitions for each prime, which completes the classification.

As for your followup question, "why is $\mathbb{Z} / 8 \mathbb{Z} \oplus \mathbb{Z} / 3 \mathbb{Z} \cong \mathbb{Z} / 24 \mathbb{Z}$". The answer is the Chinese Remainder Theorem.

I hope this helps ^_^
Answer: The fact you need is the Chinese Remainder Theorem: if $(m,n)=1$, then $\mathbb{Z}/mn\mathbb{Z}\cong \mathbb{Z}/m\mathbb{Z} \times \mathbb{Z}/n\mathbb{Z}$. Here's a quick proof: we have a map $\pi: \mathbb{Z}\rightarrow \mathbb{Z}/m\mathbb{Z}\times \mathbb{Z}/n\mathbb{Z}$ given by $\pi(a)=(\bar{a}, \bar{b})$. Clearly $mn\mathbb{Z}\subset \ker\pi$. Conversely, if $x\in\ker\pi$, then $x$ is divisible by both $m$ and $n$. Since $m$ and $n$ are coprime, $x$ must be divisible by their product $mn$. Thus $mn\mathbb{Z}=\ker\pi$. Now it suffices to show that $\pi$ is surjective. Let $(\bar{r},\bar{s})\in \mathbb{Z}/m\mathbb{Z}\times \mathbb{Z}/n\mathbb{Z}$. Since $m$ and $n$ are coprime, we can use Bezout's identity to find $p,q\in\mathbb{Z}$ so that $pm+qn=1$.Then $\pi(spm+rqn)=(\bar{r},\bar{s})$.
We can use the Chinese Remainder Theorem to establish some of these isomorphisms you're seeing. For instance $\mathbb{Z}/8\mathbb{Z}\times \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/3\mathbb{Z} \cong \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/24\mathbb{Z}$ since 8 and 3 are coprime.
Comment: @iateawalrus -- Yes, that's right. $\mathbb{Z} /8 \mathbb{Z} \times \mathbb{Z} /2 \mathbb{Z} \times \mathbb{Z}/3 \mathbb{Z} \ \cong \ \mathbb{Z}/ 24 \mathbb{Z} \times \mathbb{Z} / 2 \mathbb{Z} \ \cong \ \mathbb{Z} / 8 \mathbb{Z} \times \mathbb{Z} / 6 \mathbb{Z}$.
Comment: In this case, can we say that $\mathbb{Z}/8\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/3\mathbb{Z} \cong \mathbb{Z}/8\mathbb{Z} \times \mathbb{Z}/6\mathbb{Z}$, since 2 and 3 are coprime? Sorry, I'm really trying to grasp this.


Is ground state and vacuum state the same thing?

Question: Vacuum state is the lowest possible quantum energy state but isn't this also the definition of the ground state?
Answer: OP is asking whether "ground" and "vacuum" refer to the same thing in quantum mechanics. The answer is
No.
A ground state is a proper eigenvector of the Hamiltonian $|0\rangle$ such that any other state satisfies
$$
\langle\psi|H|\psi\rangle\ge\langle 0|H|0\rangle\tag1
$$
A vacuum state is a ground state that is also invariant under the Poincaré Group,
$$
U(a,\Lambda)|0\rangle=|0\rangle\tag2
$$
up to a phase (which can WLOG set to $1$), where $\{a,\Lambda\}\in\mathrm{ISO}(1,d-1)$ and $U$ is a unitary representation of this group.
In this sense, being a vacuum state is more restrictive than being just a ground state. For one thing, the former do only exist in Poincaré invariant systems, while the latter exist for any physically meaningful system (that is, whenever $H$ is bounded from below).
In fact, one could argue that the property $(2)$ is the one that is really important in QFT; the property $(1)$ is just accessory. If we could find a (normalisable) Poincaré invariant state, even if it was not a ground state, then most of the standard manipulations of QFT (the Feynman rules, the LSZ theorem, etc.) could be performed using that state. In other words, the fact that $|0\rangle$ is the state with the minimal energy is not really fundamental; but it being Poincaré invariant is. This is usually obscured in most books because they tend to use $(1)$ to simplify the analysis, but a careful investigation proves that that property can be lifted, and most of the results remain valid.
Comment: N.B.: for non-relativistic quantum-field-theories, one should replace *Poincaré* by *Galilei* (or *Bargmann*) in the definition of vacuum states.
Comment: What about quantum chemistry and solid state physics where Hamiltonians are oftentimes not translationally invariant (as ions are assumed to have fixed positions), yet the notion of vacuum is actively used in the literature, especially in the context of second quantization and Fock space construction.
Answer: We use the term ground state in quantum mechanics to describe the lowest-energy state of a particle or a system of particles.
On the other hand, the term vacuum state is used to describe the lowest energy state in a field theory, which typically is a state with no physical particles.
Comment: @SuperCiocia That is not correct. $\langle \phi \rangle$ can be non-zero in the vacuum; this is true of the Higgs field in the Standard Model.
Comment: In the Standard Model, yes. But non-zero expectation values of fields in the vacuum is characteristic of *spontaneous symmetry breaking*, which occurs in many models in high energy and condensed matter physics.
Comment: The vacuum has no excitations, which means the expectation value of the field $\langle \phi \rangle = 0$.  However you can still have a standard deviation from zero because $\langle \phi^2 \rangle \neq 0$. This is how Lamb shift, Casimir effect etc. come up.
Comment: Ah, yes, that's correct. The Higgs field is the only example surely no?
Answer: The term "vacuum state" typically refers to the ground state of a weakly coupled second-quantized quantum field theory, in which the low-lying excitations can be interpreted as particles, so the ground state is the absence of excitations/particles. This terminology can be a bit misleading for a strongly-coupled system, as it implies that the ground state is simple and nothing interesting is going on, when in fact the ground state can already be highly entangled and difficult to understand.
So "vacuum state" is usually a special case of "ground state". But people who work a lot with QFT often get lazy and use the phrase "vacuum state" to refer to the ground state of any quantum-mechanical system, even if it's first-quantized or has a finite number of degrees of freedom.


What is the use of the Pilot's Armor in SW:TOR?

Question: After buying and subscribing to Star Wars - The Old Republic, I received multiple packages with Pilot's Armor. What is the use of this Armor and why is it called Adaptive Armor? Is it of any use for me as Juggernaut? Does wearing it give me any benefit in a space battle? As far as I can see, it is less useful than my current, Medium Armor. (Didn't replace it yet with Heavy Armor)
Answer: In SWtoR, there are four primary armour types: light, medium, heavy and adaptive.  Adaptive is special in that it is automatically the heaviest that your class can use.  That is, if you're a Consular/Inquisitor, it is light, if you're a Vanguard/Juggernaught, it is heavy, and so on.
Once upon a time, before adaptive armour, all custom armour sets such as those purchased from social vendors had a specific armour type, which limited their usefulness.  So you wouldn't see a (viable) juggernaught tanking while wearing Leia's slave armour, for example.  Adaptive was added so that these custom sets could be worn by and useful for everybody, with the exception of some male/female-specific sets, which are only appropriate for characters of the respective gender.
The pilot's armour you link is a custom armour set that is a thank-you from the devs for being a subscriber during the Galactic Starfighter beta.  Like any other adaptive armour, its armour type will be the highest you can use (if I read correctly in this case, that would be heavy), but it grants NO bonuses during starfighter combat; you can just wear it during normal play.  That said, just like any other armour set, it's as good as the armouring and mods you put in it.
Answer: I haven't played for a while, but as far as I know adaptive armors are wearable by every class and adapt to the armor type your class uses. You just have to upgrade your Armoring slot to increase it's armor value.
You can think of it as a cosmetic armor where you can just take the modifications from another armor and put it into the adaptive one. Or if you know WoW you could say it's an armor where the stats are entirely dependent on gems.
Just make sure to only use modifications that are usable by your level, since you can't wear the armor if you have a level 30 armor modification but you are level 29. (same of course for the other two slots)
Answer: In addition to the other answers, note that the Shield icon on this armor means it is Bind to Legacy (also indicated in the tooltip).  Legacy gear can be mailed to any of your characters on the same server.  This is primarily useful at endgame, where you can share the same gear between a Marauder and a Sentinel (for example) in order to gear up faster and have good gear from day 1 if you start another character.


Who sings "Open Your Mind"?

Question: Who sings the old 80s or 90s song "Open Your Mind", the one where you do all the slow dance around the mind of the (say, somewhat quiet) person whose mind you want to prop open to see inside?
P.S. What do you nowadays call what you used to call 'dance', in the nineties. I see there is no 'dance' tag. Is there something that replaces it?
Answer: A few dance-oriented songs from the 80s or 90s with a similar title:

"Open Your Mind" by U.S.U.R.A. (1993)
"Open Your Mind" by Kleeer (1980)
"Open Up Your Mind (Wide)" by The Gap Band (1979)

I think it's still just "dance" music, maybe "club" music. I'm not sure why there isn't a tag for it at the moment, perhaps no one has asked a question about it yet?
Comment: Yeah, maybe there should be a 'club tag'. :-D . Thank you for your answer.
Comment: I guess club would be vague. I mean, a long time ago club still meant many music styles, depends on the club. Now even more.

Who sings "Open Your Mind"?


Where to cut the throat for halal slaughter?

Question: Is there some specific location along the neck where a cut must be made for it to be halal slaughter? Or can one cut anywhere along the neck?
Answer: According to the Department Of Halal Certification:

The windpipe (throat), food-tract (oesophagus) and the two jugular veins must be cut.
Slaughtering must be made in the neck from the front (chest) to the back.

This is just a partial answer, I'll try to find evidence from the Hadith and Quran to suppprt this but if anyone finds it, feel free to edit this answer with the revelant quotations.
Comment: So there is no specific place? These run through the entire neck.
Comment: The requirement is for these parts to be cut so there is no specific place.
Comment: @user28669 I've found more informations which may help


Is there any research or statistics that show adding share links to your site content areas increases sharing?

Question: Just wondering if there is any documentation out there that having share links to your content actually encourages and increases sharing of the content?
Answer: I don't know of anything for websites, but I found this about email. Admittedly it's from a vendor selling share-to-social service, but it does have some stats:
http://www.silverpop.com/news/press/share-to-social-performance.html
Answer: If your question is, "does having sharing buttons on your site result in more shares compared with having no sharing buttons", then I think the answer's likely to be a resounding "yes!", purely from experience of adding social buttons to my own sites and to customers' sites; it has always increased shares, even on low-traffic sites.
If you're still in any doubt, though, you could test it for yourself. The AddThis service has a detailed analytics feature that gives you an overview of the numbers of shares and incoming traffic you're getting from each social network.
Answer: We don't think much happens here as we had added addthis share / connect on our website, only  for initial few days there were few clicks thereon nothing is happening.


Does a permanent with multiple types count in all cases as all types

Question: Spell is cast which says choose one of each '  Creature, Artifact, Enchantment' sacrifice the rest.  If you have a creature which is also an artifact, or creature who turns into an enchantment as a result of the sacrifice. If you choose a permanent with more than one type does it count as more than one type in this case.
Comment: It's always a good idea to mention the specific card in question (or an example of a card if it's not specific), because sometimes specific wording can make all the difference.
Answer: A permanent counts as each of the types it is. So an Artifact Creature (like Darksteel Colossus would be both an artifact and a creature.
For a spell like Cataclysm, you could choose an artifact creature as the choice for the artifact, or for the creature, or choose it for both if you want (which would cause you to sacrifice more permanents than you have to). If you had 2 artifact creatures, you could choose one of them as your artifact to keep, and one as your creature to keep; thus keeping them both.
See the Gatherer Rulings on Cataclysm

If you control a permanent with more than one type, you can choose that same permanent for more than one of the choices if you want to. This makes it possible to select an artifact creature as both your artifact and creature, and then select a land and thereby keep only two cards.

and

If you control a permanent with more than one type, you can choose that permanent to be the representative of either type. This makes it possible to have more than one creature (or other permanent type) on the battlefield. For example, if you select a creature for your creature and an artifact creature for your artifact, you get to keep both of these creatures.

From the comprehensive rules:

205.2b Some objects have more than one card type (for example, an artifact creature). Such objects satisfy the criteria for any effect that applies to any of their card types.
Answer: Specifically the enchantment creature that changes as a result of the sacrifice (presumably a God from the Theros block), it's still a creature before the sacrifice, and only becomes not a creature when the ability resolves. So you can choose it as the creature, an artifact creature as the artifact, and another enchantment creature as the enchantment. Or choose the God as the enchantment because it's always the enchantment. Or any number of different scenarios.
Long story short, if you have permanents that are multiple types, you get to choose how they are defined so that you get the most benefit.


Disabling Global for Regex

Question: I want to turn off the Global setting (as it is set default to be used on .NET) as what I am trying to do only needs to change the first part of a string, however there is the the chance that it will occur twice in the string, for example I wish for

C00000WPF0000SAND

to only change the first instance of 0's.
if (Regex.IsMatch(text, "^[a-z]+00+", RegexOptions.IgnoreCase))
{
    text = Regex.Replace(text, "0{1,}", "00*", RegexOptions.IgnoreCase);
}

This is how I am currently doing it, however this seems to take every single instance of the "00+" and change it but this messes things up.
Answer: You need to specify a match limit; the documentation for Regex.Replace(string, string, RegexOptions) specifically states that it replaces all instances of the found pattern.  There is no static overload of Regex.Replace that takes both a match limit and regex options, so you will have to construct a Regex object and then use the Replace(string, string, int) overload.  Try this:
text = new Regex("0{1,}", RegexOptions.IgnoreCase).Replace(text, "00*", 1);

Comment: Kotlin documentation specifically stating that it replaces all instances: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/replace.html
Answer: You could alter your regex slightly so that it matches the intended pattern and only replaces the first set of zeroes. That also helps cut out the IsMatch call.
The pattern you can use is: (?<=^[a-z]+)00+
This pattern is similar to your first one, except it uses a look-behind, (?<=^[a-z]+), to ensure that the match occurs as intended at the beginning of the string with letters. The usage of a look-behind will match, but not consume, so the replace won't affect that portion of the string.
string text = "C00000WPF0000SAND";
text = Regex.Replace(text, "(?<=^[a-z]+)00+", "00*", RegexOptions.IgnoreCase);
Console.WriteLine(text);

Answer: Another solution is:
text = Regex.Replace(text, "(?i)^([a-z]+)00+", "${1}00*");

In which case you don't need the if at all.

Disabling Global for Regex


Specific heat capacity vs KE gain of particles

Question: To increase the temperature of 1kg of water by 1C you need 4200J of energy. However, the KE gain is only $\frac{3}{2} k_B \Delta T \cdot 6.02\cdot 10^{23} \cdot \frac{1000}{18} = 692.3$J. Where does the other $5/6^{th}$ of the energy provided go?
Comment: The equation you used for K.E. is it valid for liquid?
Comment: Perhaps you are looking at the problem from the wrong perspective. We need molecular orbitals analysis; take a look at how IR are "stored", etc [Assignment of the IR vibrational absorption spectrum of liquid water]  http://www1.lsbu.ac.uk/water/water_vibrational_spectrum.html
Comment: The specific heat of water is very close to the value of the Dulong and Petit law when one includes the hydrogens: three times the gas constant per mole av atoms.
Answer: Water molecules in the liquid phase do not only have translational degrees of freedom. The "missing" energy goes into those other degrees of freedom, such that the molar heat capacity is actually about $9R$ and so water acts as if it had 18 degrees of freedom.
In the gas phase, a bent, triatomic molecule like water has 3 translational degrees of freedom (dof), 3 rotational dof and 6 vibrational dof (3 kinetic and 3 potential) - which would correspond to a molar heat capacity of $6R$.
In the liquid phase, water has some of these additional degrees of freedom, but more importantly is strongly affected by hydrogen bonding. Each water molecule can form up to four hydrogen bonds with other water molecules. Some of the additional energy required to heat water goes into reducing the potential energy of these bonds or breaking them altogether and this acts to increase the effective number of dof.
So to sum up - the additional energy goes into making water molecules rotate and vibrate and into loosening and breaking hydrogen bonds.
Some further reading:
http://www1.lsbu.ac.uk/water/water_hydrogen_bonding.html
https://arxiv.org/ftp/arxiv/papers/0706/0706.1355.pdf
Comment: So are you convinced that provided there is not much attraction between particles then such differences will not be much apparent?
Comment: @Utkarshfutous A molecular liquid has more degrees of freedom than a monatomic gas, even without hydrogen bonding between molecules. The OPs "calculation" would I expect still show a discrepancy in the absence of  H-bonding, but it would be smaller.
Comment: I've heard the hydrogen argument before but don't quite understand how it can be true. The strength of bonds depends primarily on how close the molecules are to each other. Water does not significantly expand when heated.
Comment: The "hydrogen argument"? @EdwardGaremo The fact that water molecules form hydrogen bonds is not arguable? Why does the breaking of bonds require expansion? The bonds are made and broken on short timescales and certainly will hinder the translation and rotation of the molecules. In any case, that is only part of the answer to this question - the majority of degrees of freedom are not in translational motion.
Comment: Hydrogen bond argument. And I wasn't saying it wasn't correct, I was simply asking for an explanation to how it can be correct considering the water doesn't expand by much i.e. the water molecules do not move away from each other much i.e. they don't gain much potential electric energy.


Does "Glass Half Full" affect PvP in Destiny?

Question: All damage is equalized among players in PvP. So, perks like "Upgrade Damage" are meaningless. Does this also apply to perks like "Glass Half Full"?
Comment: I'm not positive, but I think it does work in PvP. While damage is equalized, some guns do more damage than others, so this would be a way to increase damage. If I remember, I'll try to test it next time I play.
Comment: Thank you. I just bought the auto rifle "For the People" and wondered this while looking through its upgrade tree. So, it's going to be a while until I can test. Let me know what you find! :)
Answer: I was able to test this today. I used the Vanquisher VIII that you buy from the New Monarchy vendor.
Normally it does 22 damage when you hit the opponent's body. The bottom half of the clip did 23 damage, so Glass Half Full does work in PvP.
I wasn't able to tell how much headshots increase in damage, but I would assume that it is by a similar amount.
Comment: Now that 1.1.1 patch is out (with auto rifles nerf), numbers can be a little bit different. It does not affect the fact that perk works though.


How to get disappeared keyboard back?

Question: I am using Android 5 and, on rare occasions, my keyboard disappears or becomes unavailable when I enter editable fields in different apps (browser, FB, etc).  Once that happens, what can I do, other than rebooting, to get the keyboard to reappear once I am in editable fields?
Answer: I have seen this on rare occasion. Often simply backing out of the app, and optionally removing it from the list of recently-used apps (which quits an app a bit more calmly than an End/End All), will restore functionality once the app is relaunched.
Sometimes a web page or web-based app, like Facebook, will refresh itself in the background, and that can disconnect the keyboard from the field being edited. Sometimes it's a slowdown elsewhere in the phone.
Answer: Usually changing focus away from the text element then refocusing by tapping on it should work but if it doesnt then you can open the app again by removing it from recents and relaunching it.
Answer: I have the keyboard disappearance problem and temporarily fixed it by going into Settings -> Apps -> (All Apps) -> Google Keyboard and clicking on "Uninstall Updates". But it keeps automatically updating the keyboard and the problem comes back. So I did not get at the root of the problem.

How to get disappeared keyboard back?


Why was there such tension between the Ottoman Empire and Russia during the Armenian genocide?

Question: I'm researching the Armenian genocide on a very basic level, and I've learned that a lot of the tension between Armenians and the Turks was because the Armenians were seen as supporting the Russians, who the Turks hated. Why was there such tension? What did Russia or Turkey do to prove one another?
Comment: https://en.wikipedia.org/wiki/History_of_the_Russo-Turkish_wars includes a list of 11 (!) wars between the two empires from 1500s through the 1800s.
Comment: What time period are you talking about? If you mean strictly the Armenian genocide (starting 1915), then Russia and the Ottoman Empire were fighting each other as a part of WWI. If you mean to include previous conflicts between Turks and Armenians, please specify it so.
Comment: This was partly religion (Christianity vs. Islam), partly cultural (Western vs. Muslim) and partly because Russia wanted warm water ports and the Turks were in the way.
Comment: Thank you for your question; please consider revising it to be more in line with our community expectations. Like other stacks, we expect questions to [provide evidence of prior research](https://interpersonal.meta.stackexchange.com/a/3227/1599). That helps us to understand the question, and avoids our repeating work you've already done. Our [help], and [other stacks](https://interpersonal.meta.stackexchange.com/questions/3224/how-do-i-write-a-good-question) provide additional resources to assist with revisions. Please revise your question to document your preliminary research.
Answer: When you do research on the subject, even on a very basic level, you should know that at the time of Armenian genocide, the Ottoman Empire was in the state of WAR with Russian empire. This war is called WWI, or the Great war.
And a war can be considered as a maximal possible "tension" between two states.
Answer: Turkey and Russia were in each other's way. And Armenia was caught between both of them.
Russia started around Moscow in the late 15th century, and spent the next four or five centuries expanding south. The Turks captured Constantinople in 1453 and spent the next three centuries expanding north.
By the 18th century, Russia occupied Crimea and formerly Turkish held lands on the north shore of the Black Sea. That gave it naval access to modern Bulgaria and Romania, which Turkey considered its sphere of influence. More to the point, Russia's Black Sea holdings were a dagger pointed at the heart of the Turkish heartland, with Armenia being Turkey's "chest." Russia wanted a warm water port, and the primary path would have been through the "Straits." A second means to a warm water port would be through Armenia (which was divided between Russia and Turkey at the time), "Kurdistan" (divided between Turkey, Syria and Iraq), and ultimately Syria, which is why the Russians are involved in Syria to this day.
Armenia (at least in Russian hands) was an existential threat to Turkey, now based in Ankara. Which is why when the Armenians tilted towards Russia, the Turks hated them.
Comment: `which is now divided between Russia and Turkey` Nowadays the former Soviet Republic of Armenia is an independent country. https://en.wikipedia.org/wiki/History_of_Armenia#/media/File:DistributionOfArmeniansInTheCaucasus.png


How to use slack auth running in docker from within a private IP addressed enterprise network

Question: We are deploying our application in docker within our enterprise. The host machine has an RFC1918 space in the 10/8 network and the docker containers are on 172.21/16 space.
I'm trying to use slack authentication to authenticate our node/react application which works locally in development mode, but I believe the second layer of private address space may be throwing a wrench into the communications. The redirect url for the node/react app is using the IP of the host machine, which is what you are hitting when you attempt to login to the server via the web interface. I've tried many combinations but basically you navigate to 10.1.1.4:3000 which is configured in the Slack API as our redirect URL and is also configured in the .env file for our node app. Once you click continue on the slack auth page the page doesn't load but just hangs.
I've changed the redirect URL to localhost, the gateway IP of the docker network, and the IP address of the host machine the docker container is running on, which I think is the way to go, but nothing lets me hit my app.
Comment: locahost can not work. Please review this answer: https://stackoverflow.com/questions/44726200/how-to-integrate-internal-apis-not-accessible-outside-office-network-to-slack/44726440#44726440
Answer: If you're using Linux docker hosts, you could try using the host network mode.


How to leave a gap between two objects [Illustrator]

Question: So for a while now I've been wondering how to put a gap between two objects like in the example given. ,
, between the wings and shield, there is an even gap.
Is there a short cut or do I have to go in and move each point individually? its a bit frustrating
Comment: Its just a stroke?
Comment: It might be, but I was wondering if there was a way to make that spot transparent
Comment: Strokes can be expanded, as explained below. You can also make strokes transparent but still carving out shape from the local group. Thisway you can change the thickness on the fly.
Answer:
Select the front object.
Copy cmd+c
Paste in Back cmd+B
Add a stoke and set it to the width you want the gap to be.
Expand the object with the stroke: Object > Expand...

make sure all 3 boxes are checked "object, stroke and fill"

In the pathfinder pallet click on the combine objects icon (first one on the top row)
Now hold shift and click on the object in back.
With both selected click the "minus front" icon in the pathfinder pallet. (second icon on the top row)
The front shape plus the stroke have now been cut out of the back object.
Answer: Another way to do this:

Select the front object
Use the Object-->Path-->Offset path and input the width of the gap you want.
You will be left with two paths, the original one and a larger one. Select the larger one and the back object
Use the "minus front" option in the Pathfinder palette
Comment: I think this is better than my answer.. simpler. Good idea. I have always used the stroke method because it is how I first figured it out. Not sure why it never clicked to use offset path. Thx for adding this.


1TB 2.5" in unibody macbook pro?

Question: The 1 TB WD scorpio blue drive is a little bit thicker than ordinary 2.5" drives - does it fit inside the 2009 unibody macbook pro 13"?
Answer: Unfortunately no, that thing is a beast of a drive!
The scorpio is 12.5mm and has 3 platters inside, the unibody Macbook has a 9.5mm bay. I believe the 17" MacBook Pro can, but not the unibody models.
Answer: It Fits in a 15" Unibody!!!  I've done it.  I'm running a scorpion blue in my 15" 2.6Mhz macbook pro unibody (all aluminum).  I was nervous at first but once installed the HD cover fits.  I've got 500GB of Snow Leopard and 500GB of Win7.  Only wish they made a 7200K RPM model.  5400K works OK, but I love the snappy response of a 7200K.

1TB 2.5" in unibody macbook pro?


Why did almost every ancient civilization have a found religion?

Question: I'm studying to be an Anthropologist and I've always had this question but I cannot get a definitive answer. Almost every ancient civilization I have studied, whether it be in the Old or New World had some sort of religion. Why did all of them think that there was a higher power or powers? Why is it so consistent throughout the world?
Comment: Because apparently it's an innate trait of humans to attribute the unknown to supernatural entities.
Comment: Because it is nonsense - Confucianism is NOT a religion, and China is one of the greatest civilizations. But set of morals, of course MUST exist. Because it IS the civilization. Read Gumilev.
Answer: We can't know for sure, because our information is so scanty about very early civilisations. The two obvious possibilities are:

Humans have an innate tendency to invent explanations for things they don't understand, and to treat them as having personhood.
Rather than being innate, this happened to be a cultural value among early humans, and has been passed down to us since then.

It's extremely hard to distinguish between these possibilities at this distance in time. While experiments could be designed to distinguish between them, they would involve bringing up newborn children without human contact. This is considered profoundly immoral, and thus the experiments should not be done.
Comment: I did always think that humans might just have the tendency to create an explanation for their world/lives.
I did find out that there was a tribe in Africa that had no religious belief, rituals, superstitions or any type of burial rites which I found was very interesting.
In regards to the experiment you mentioned, that would be very interesting but again highly immoral.


Nikon Transfer & Memory Cards

Question: I recently began using Nikon Transfer to download images from my memory card. For a trip, I purchased 2 Lexar SD cards & also brought along an older ScanDisk.  At the end of a day of shooting, I downloaded pictures from the Scandisk (used in one small Canon) and from the Lexar used in my Nikon D3100.  I had the program delete the photos from the cards after download.  When I went to use the cards, in two different cameras, they would not retain the image. Fortunately, I still had an unused Lexar and used that.  I was able to download pictures from that card and re-use BUT I didn't have Nikon Transfer delete the pictures from the card.  As soon as I did have Transfer delete the pictures from the card, the card became unusable.
Anyone have experience with this problem & can offer some suggestions? I feel that this should be fixable with some clicking around but don't know where to begin.
Thanks.
Answer: I have not ever used Nikon Transfer before, so I don't know if I can address the issue directly, but it is a good practice to format your cards in the camera after you have cleared them off using the computer.
This is where you format a card with the d3100.

Nikon Transfer & Memory Cards


how does desire can kill your focus?

Question: I often experience my focus dropped when my desire increases. How does both related?
Comment: Welcome to Philosophy.SE. Unfortunately, I would interpret this question as more focused on psychology. I am not sure it is a proper question for this forum. Please take the time to read through the tour and help center information to help frame what questions should be included on the Philosophy.SE. They suggest limiting questions to the following; technical philosophical questions about metaphysics, aesthetics, logic or epistemology, The history of philosophy, Critical strategies for reading. Thank you. [LINK](https://philosophy.stackexchange.com/tour)
Answer: I think desire and intensity are Proportional to each other. so focus should be gain and become more steady. it could only happen if you have multiple desire that are non-relative to each other and that leads to confusion.
And your confusion is the factor that dropping your focus. you need to prioritize your desire and than determined your objective so you can gain focus to achieve satisfaction to your desire.
good luck.
Comment: if you have multiple desire that are non-relative to each other and that leads to confusion.  Very good point.
Comment: @user3796318 thanks you can up-vote or accept if you like. i would like to know was it your case?

how does desire can kill your focus?


Merged C with another drive, Windows 7 not booting

Question: I am running Windows 7 and my C drive had very little space left on it. I used Easus Partition Manager to extend my E drive. I of course took a backup of my E Drive. However, after performing the operations and attempting to reboot the computer, it would open onto a black screen with the mouse pointer on it. I waited for 5 minutes and no change, I could only assume it had hung. I can boot it in safe mode with no issue. How do I boot normally?
Comment: tried repairing using the f8 tools - first option during boot?
Answer: To repair booting windows, follow these steps

Boot From the Windows Install Disc
And then click through until you see the "Repair your computer" link
in the lower left-hand corner
You'll need to choose the correct installation of Windows and then
click the Next button
And then you'll get to the System Recovery Options screen, where you
can get to the Command Prompt.
If you want to restore the master boot record,

you can simply type in the following command:
bootrec /fixmbr

You can also write a new boot sector onto the system partition with this command (which is often more useful):
bootrec /fixboot

Also you can using the Automated Startup Repair, just use the Startup Repair option from the Recovery menu .
see this page for screenshots ...
Comment: If they are able to boot up in start mode, then the MBR and the boot sector are already good.
Answer: Building on MYamanT's comment, you should try bootrec /REBUILDBCD, if that doesn't work, you can use BCDEdit to look for errors in your BCD store.


Unknown title 60's sci fi book possibility started with a G or the word star

Question:
I remember finding this book in my dad's old college collection so possibly publish in the 50-60's
Cover had a white or silver tower on a background of a lot of orange or an explosion
A boy or man laying on his stomach on a silver metal plate that looked to be zooming from the tower.
a winged bat/pterodactyl like creature with claws flying above the man
I remember a young man in a rookery of sorts raising said winged things. The man had an amulet. Something happens where the man escapes to a tower the amulet reacts to the tower and he and one of the winged creatures he was caring for
were transported far away
Comment: You can accept an answer by clicking on the checkmark by the voting buttons as per the [tour].
Answer: I remember seeing a cover on a paperback book by Andre Norton with a boy riding a device like a surfboard flying in the air.  I don't remember if there was a tower or a "terror dactyl" on the cover.
If my memory is correct I probably saw the cover in the 1960s so a book or edition published after 1970 would probably not be the one I remember.
Unfortunately Andre Norton was very prolific, so that does not limit it down very much.
But after searching at the Internet Speculative Fiction Database I found a cover which should be the one I remember, the cover of the 1963 Ace Books edition of Star Gate.

From the plot summary on Wikipedia:

Riding his larng Cim, the four-eyed analogue of a horse, and accompanied by his pterodactyl-like hunting mord, Vorken, he leaves the only world he has known, following a map that his grandfather gave him. Falling in with a party of cross-breeds and a Star Lord, he helps them fight off outlaws and follows them through a pair of luminous webs to another Gorth. As they pass through the Star Gate Kincar is burned by an amulet, a Tie, that he wears. Joined by others, the group takes refuge in an abandoned keep that they find on their new world. Kincar meets a healer, Lady Asgar, who treats his burn while Lord Dillan tells him about many worlds and of travel between them. They have come to a Gorth that they had not intended to occupy, so they will have to build another Star Gate.
Comment: Well caught sir! Yes this is it. The "amulet" is called *The Tie* and is worn by a young man called *Kincar*. the pterodactyl like creatures are *mords*.
Comment: The large aerial predators (pictured) are _sa-mords_; _mords_ are smaller and domesticated, like Kincar s'Rud's companion Vorken.
Comment: Ha. I have that one too... but didn't remember the cover. I guess my memory is biased to Vance vs Norton.   Good sleuthing!
Comment: Holy guacamole, 45 cents for a novel? I did a quick inflation calculation, and I guess that's about right calculating from 1960. It'd be about $8.66 today, but wow.
Comment: Thank you so much! This is exactly the book I remembered. I have since found the book. It did my heart good to read it again after so much time. It had not lost it's luster! Thank you again.


How to remove label from the right sidebar?

Question: I want to remove the label from the right sidebar of Gmail. I have tried to find a way to remove unwanted labels from the sidebar and keep the sidebar cleaner by just having important labels there and when I press More then all of the labels should appear. How do I do that?
Answer:
Hover over it—a small drop-down arrow will appear at the right of it
Click on the drop-down arrow
From the list, select Hide under In label list:
Comment: You can also do this all at once from the Label settings: https://mail.google.com/mail/#settings/labels


Could Accio Be Used to Un-Mix Things?

Question: For example, if a wizard were to dissolve some sugar in a bowl of water, or absorb some water into a sponge, or make some cake batter, could that wizard then Summon ONLY the sugar from the solution, the water from the sponge, or any specific ingredient from the cake batter but leave behind the water/sponge/batter?
Comment: @CBredlow Maybe, but who know how precise this would be.  Theoretically, your logic is not flawed, but practically...I'll have to try it out.
Comment: Wouldn't the case of the sugar water be similar to the brains in the tank, just on a smaller scale?  If we look at it like that, then yes it is possible. It should work in almost all cases as we have seen in OotP that it is possible to summon something that is suspended in a fluid.  During the department of mysteries struggle we see that ron was able to summon a brain that was suspended in a tank of fluid.
Comment: This has made me curious, so I made a related question about how small you can go.  If I get an answer from that, then I'll convert my comment into an answer using evidence from my question.
Comment: @CHEESE I suppose it is derived from my question.. I was going to ask that :D....
Answer: I don't think Accio charm can be used to change chemical composition of different substances e.g. a solution of sugar and water.
My reasons are following:
In Half blood Prince's chapter "Birthday surprises", we come across the following activity of antidote making when Slughorn says:

"... which means, of course, that assuming we have achieved correct
  identification of the potion's ingredients by Scarpin's Revelaspell,
  our primary aim is not the relatively simple one of selecting
  antidotes to those ingredients in and of themselves, but to find that
  added component which will, by an almost alchemical process, transform
  these disparate elements--"

If Accio spell could work that way, instead of distilling different elements from the concoction, students would have just said "Accio [ingredient name]", measure their quantities right away to form an antidote. Of course always assuming that they would already know the ingredients using revealing charm. (Though vague commands did work too, like Harry saying "Accio Horcrux" instead of "Accio Slytherin's locket").
When hermione's Polyjuice potion went wrong in Chamber of Secrets, she could have just pointed her wand at herself and said "Accio Polyjuice poition" and wham, Poly juice potion would have been removed from her blood and system
When Arthur Weasley got attacked by Nagini in Order of the Phoenix, Healers at St. Mungo's could just use accio charm to extract the poison from his body immediately.
Comment: I would also assume that Accio's threshold for bonds is very, very low. Otherwise it would make for a killing curse on par with Avada Kedavra with some serious Crucio mixed in. "Accio skull!" - no thanks.
Comment: There's also the dragon's blood Slughorn uses - he siphons it up, but it's dusty - which suggests that things can't be unmixed.  Dust doesn't dissolve, usually, and can be visibly seen - but it seems like it can't be removed via magic any better than we can without it, ie, by picking it off or skimming it out.  Something that is mixed or dissolved in is probably equally inaccessible.
Comment: for one thing, Accio charm was far too advanced for a second year...
Comment: So was the poly-juice poition @prakharlondhe. Anyhow my premise isn't solely based on that one example.
Comment: Forcibly removing a liquid from your system seems like it would be bad for you. As in, burst blood vessels bad.
Answer: Every instance of the Summoning Charm is used on a discrete and tangible item - broom(s), books, brain etc. While the instructions might be somewhat vague ("Accio Firebolt" knows enough during Goblet of Fire to realise that it needs to bring the caster's Firebolt, while theoretically Harry could have used it in an instance where he was summoning someone else's with the same words, his intent was clear enough).
Separating a solution is an entirely different concept. You're not only talking about something that a person cannot easily visualise, the reality of how it would work is that you would need to remove every particle of a substance from another substance. That renders it fundamentally different from removing a visible brain from a tank of water. Even if you could convey the intent, it's unlikely that you could ever do it perfectly unless you were dealing with two substances that are already discretely separate, and maybe not even then (chemistry and physics being what it is).
Consider this too - do you expect the brain that Ron summoned was completely dry? Or that by summoning his broom, Harry coincidentally removed all the dust, stains, etc. that might have been on it in its original location at the same time? There's no evidence to suggest that is how the spell works, and it would need to work that way to have the effect you're asking about.
Comment: Well, it moved a determined object in every example given, where the caster can make a concrete distinction of what the object is. Arguably, one valid distinction demonstrable can be the ability to visualise the object that you're attempting to summon (I think that's held true throughout). Maybe you have seen what molecules through a microscope in the past, and that can make it work?

Also to note: summoning moves the object from one place to you, nothing more. If you summoned a broom through water, it would presumably get wet. Sugar through water might just bring the water with it.
Comment: I think it's not impossible in theory, but it is simply too hard for anyone to achieve because it's so complex. Ultimately the words don't matter much, they only serve to focus the intent (as shown by the existence of equally powerful, but harder to achieve, nonverbal spells). (Unfinished, continuing)
Comment: What Accio does is, it moves a determined bunch of matter towards the caster. What gets moved or not is decided by the caster's intention. Separating a solution would be the same thing on a much smaller scale, that of molecules. It could be done in theory, but it would probably require much greater focus and mental capability than most people have, and I don't suppose it could be done perfectly. It would involve Summoning a very large number of very small items
Comment: Yes, it might bring some of the water, so no perfect unmixing.

Could Accio Be Used to Un-Mix Things?


Session Time-out in Typo3 website and impossible to open with Mozilla Firefox

Question: I have a website build on Typo3 and when I go to update it, I need to use IE, I can't
get to edit anything when I open it with Firefox. Cookie Problem? Then the second problem, much harder to manage, is the session Time-out. Somehow it's logging me out after a few minutes, so I can't work on my translations... I already updated the configuration file (typo3conf/localconf.php) and set up the time to 1000000 seconds with this line "$TYPO3_CONF_VARS['BE']['sessionTimeout'] = 1000000;".
If anyone finds something for me, it would be divine...
Thanks.
Comment: You didn't tell us the OS and the TYPO3 version you are using. I run several TYPO3 sites (just now v4.2.8) and have no problems to access the backend with IE6, IE7, IE8, FF3.0 and FF3.5.2. But this was not the case with older versions of TYPO3 which had problems with some features of the backend or even RTE.
Comment: I'm using Typo3 4.0.3, and I run Windows XP. Do you think I could export the Website and all the files into a 4.2.8 to try? I'm always scared that files will get lost.
Thanks for you help.
Comment: Yes of course you can and probably should do this. First have a look at the TYPO3 security pages http://typo3.org/teams/security/ if some of the issues apply to your version.

There are several possibilities how to perform the update. You might find them discussed in the TYPO3 FAQ and wiki. Which way you want to go depends on the size of your site, if you have a lot frontend user interaction with forums, comment systems etc. in place, if you have patched some code yourself, etc.
Answer: I think you should do a new clean install, as I wrote in my comment above. Your installation is somewhat outdated and reinstalling everything might cure those problems. I think I remember there are also some security issues mentioned for all older versions beneath 4.2.8.
I myself, running Linux/Apache with a couple of virtual hosts, install all our TYPO3 sites into subdirectories like t3/ and use php-redirects on the corresponding web-roots.

When performing a major update I create a parallel directory like t3.new/ containing the empty default installation in the web-root and a new source directory in the document-root of the account. Then I update all my extensions and eventually patch them again to my needs. After this I copy the larger files and all those lots of resources which I do not want to down- and re-upload directly on the server and export/import the rest via .t3d files, excluding all those files from the backup. Then I set and check all the backend permissions for my editors. This is a little tedious but quite clean. When everything works as expected I delete the old t3/ directory and rename t3.new/ to t3/.
For smaller updates I only update the source-directory, re-link it and perform some DB checks and cleanups from the BE.

Of course your have to check the functionality of your site carefully. Use a tool like Xenu's Link Sleuth to check for broken links, etc., etc.
Comment: Ok, thank you. I will check this out and I'll come back to you.
Answer: Most likely it's a problem with cookies and caching, I had a similar issue in Firefox when I upgraded my own blog (not Typo3).  If you go into Tools -> Options then Privacy, then click 'Show Cookies...' you can type your website's URL into the search box and then easily select and delete all the cookies.  After that, hard refresh the login page (Ctrl F5) and try logging in again.
Comment: Tried but still the same problem. I also authorised in Typo3 all the IP addresses I use as Admin with NO logout, but always the same problem.


Eager loading in "both directions"

Question: Eager loading does not work as I expect.
I have Products that has_many Variants, and of course each Variant belongs_to a Product.
I use code like this to load a product and all its variants:
products = Product.includes(:variants)

This works: all products and all variants are loaded with only two queries. However, the product of each variant is not loaded, so the following code causes another SQL-query:
puts products[0].variants[0].product.title

Why is that, and how can I fix it? I suppose Product.includes(:variants => :product) would work, but it causes one extra big and unnecessary SQL-query, since the Product-data is already available.
Answer: Active Record will only eager loading an association on the level you've specified. In its point of view, variant.product will be treated as another level of association. So, if you want to eager loading it, you'd have to do:
products = Product.includes({:variants => :product})

Comment: That's what I wrote in the original question, but as I said that still requires an extra SQL-query.

Eager loading in "both directions"


Different radiation intensities from a black body

Question: I am a high school student and was wondering about the radiation curve of a black body. Why do the emitted wavelengths from a black body have different intensities? What happens at the atomic level that makes some wavelengths stronger than others resulting in a radiation peak?
Comment: Related: https://physics.stackexchange.com/q/645671/247642, https://physics.stackexchange.com/q/639995/247642, https://physics.stackexchange.com/q/644253/247642, https://physics.stackexchange.com/q/648273/247642
Answer: TL;DR: The density of electromagnetic modes increasing with frequency, while the number of photons contained in each mode drops with frequency.
According to the Planck's law, the spectral radiance is given by
$$
B(\nu, T)=\frac{2\nu^2}{c^2}\frac{h\nu}{\exp\left(\frac{h\nu}{k_B T}\right)-1}$$
The factor $\nu^2$ originates from the density of states, i.e., the density of electromagnetic modes per frequency interval, which increases with frequency, $\nu$. On the other hand, factor $h\nu/\left[\exp\left(\frac{h\nu}{k_B T}\right)-1\right]$ is nearly constant at low frequencies and decays expinentially when $h\nu\gg k_BT$: $h\nu/\left[\exp\left(\frac{h\nu}{k_B T}\right)-1\right]\approx h\nu\exp\left(-\frac{h\nu}{k_B T}\right)$. Thus, at small frequencies the radiance increases, but then drops - hence there is a peak in between. In essence, it is the competition between the density of electromagnetic modes increasing with frequency, while the number of photons contained in each mode drops with frequency.


Can a small thrust in the horizontal direction generate a large force on the slope?

Question: This is a closed container, which is filled with liquid (blue). We give the piston a horizontal force (red). Will there be a greater force on the slope of the piston? Why?
According to Pascal's law, it seems that a greater force will be obtained. But I'm not sure.
Answer: Pushing the piston increases the pressure in the liquid. This pressure will be the same throughout the liquid if we neglect the increase in pressure with depth due to gravity. The liquid exerts a force at right angles to the surface on all surfaces with which it is in contact. The force it exerts per unit area of surface is equal to the pressure.
Let the sloping part (area A') of the piston be at an angle $\theta$ to the end face (area A) of the piston if it were shaped as usual. Then $$A'= \frac{A}{\cos \theta}$$So the force on the sloping part of the piston will be greater than it would be on the end of the piston if shaped as usual, since $pA'>pA$ simply because $A'>A.$.
The component of this force parallel to the axis of the piston is $$pA' \cos \theta = p \times \frac{A}{\cos \theta} \times \cos \theta =pA$$
So this force component is exactly the same as if the piston were shaped as usual.
Comment: That is to say, a small force can produce a large force?
Comment: You could say that, but you don't need a specially-shaped piston in order to make this happen. The walls of the container itself, being of greater area than the piston (conventional or sloping), will have a greater force on them than the force you are applying. Recommend you read about Pascal's principle and the 'hydraulic press'.


C# method that is executed after assembly is loaded

Question: I write some C# class libary and I want to use Ninject to provide dependency injection for my classes. Is it possible for class libary to declare some code (method) that would be executed each fime the class libary is loaded. I need this to define bindings for Ninject.
Answer: It sounds like you are looking for the equivalent of C++'s DllMain.  There is no way to do this in C#.
Can you give us some more information about your scenario and why you need code to execute in a DllMain style function?
Defining a static constructor on a type does not solve this problem.  A static type constructor is only guaranteed to run before the type itself is used in any way.  You can define a static constructor, use other code within the Dll that does not access the type and it's constructor will never run.
Answer: Have you tried the AppDomain.AssemblyLoad event? It fires after an assembly has been loaded.
AppDomain.CurrentDomain.AssemblyLoad += (s, e) =>
{
    Assembly justLoaded = e.LoadedAssembly;
    // ... etc.
};

Answer: I have used Ninject quite a bit over the last 9 months.  Sounds like what you need to do is "load" your modules that exist in your libray into the Ninject kernel in order to register the bindings.
I am not sure if you're using Ninject 1.x or the 2.0 beta.  The two versions perform things slightly differently, though conceptually, they are the same.  I'll stick with version 1.x for this discussion.  The other piece of information I don't know is if your main program is instantiating the Ninject kernel and your library is simply adding bindings to that kernel, or if your library itself contains the kernel and bindings.  I am assuming that you need to add bindings in your library to an existing Ninject kernel in the main assembly.  Finally, I'll make the assumption that you are dynamically loading this library and that it's not statically linked to the main program.
The first thing to do is define a ninject module in your library in which you register all your bindings -- you may have already done this, but it's worth mentioning.  For example:
public class MyLibraryModule : StandardModule {
  public override void Load() {
    Bind<IMyService>()
      .To<ServiceImpl>();
    // ... more bindings ...
  }
}

Now that your bindings are contained within a Ninject module, you can easily register them when loading your assembly.  The idea is that once you load your assembly, you can scan it for all types that are derived from StandardModule.  Once you have these types, you can load them into the kernel.
// Somewhere, you define the kernel...
var kernel = new StandardKernel();

// ... then elsewhere, load your library and load the modules in it ...

var myLib = Assembly.Load("MyLibrary");
var stdModuleTypes = myLib
                       .GetExportedTypes()
                       .Where(t => typeof(StandardModule).IsAssignableFrom(t));

foreach (Type type in stdModuleTypes) {
  kernel.Load((StandardModule)Activator.CreateInstance(type));
}

One thing to note, you can generalize the above code further to load multiple libraries and register multiple types.  Also, as I mentioned above, Ninject 2 has this sort of capability built-in -- it actually has the ability to scan directories, load assemblies and register modules.  Very cool.
If your scenario is slightly different than what I've outlined, similar principles can likely be adapted.
Answer: Can you control the client code? If yes, instead of trying to do magic when loading assembly, I would go for implementing a single class like Registry which does the bindings, implementing an interface IRegistry. Then during loading you can look for the implementation of IRegistry in your assembly and fire necessary methods.
You can also have attributes on your classes:
[Component(Implements=typeof(IMyDependency)]

look for these attributes and load them to the container on the client side.
Or you can take a look at MEF which is a library for these kind of situations.
Answer: As far as I know the answer is no
.As I understand you want to configure your IoC container in your class library and If that's the case it's not a good idea to do that.If you define your bindings in your class library then what's the use of dependency injection? we use dependency injection so that we can inject dependencies at runtime then we can inject different objects in different scenarios.Although the best place to configure an IoC container is the start up of your application (since an IoC container is like a backbone for an application :) ) but it should be placed at a bootstrap that is responsible to start the application.In simple applications it can be the Main method.
Comment: There are plenty of situations where you'd like to define bindings in a class library.  You could potentially have different implementations of the same service in different libraries, both of which may be relevant in the same application at the same time based on the context in which the service is used.  Ninject (as do other IoC's) offers the ability to define contextual bindings, thus having the ability to activate different concrete services based some supplied context.


Is there a way to track which tabard you have already worn?

Question: Unlike pets and mounts, you can't actually look up which tabard you've worn on the WoW Armory. Is there a way to tell? My memory doesn't always serve me the way it's supposed to.
Answer: No - unfortunately there isn't any method of tracking the individual tabards you have worn. I generally keep all of mine stored in my bank as a method of keeping track of which ones I have worn to date but if you've gotten rid of any of your tabards then you're just going to have to work through them all until your progress counter increases.
Don't forget that you can easily reclaim any tabards that you have destroyed by using the tabard vendors in your faction city, Dalaran and Shattrath.
Answer: Your best bet may be to download a tracking addon such as Tabard Addict.
This comment on Wowhead's Thirty Tabards achievement page suggests that the following macro may be able to give you a complete list. However, another comment says this does not work post-5.0.4. (I have not had the chance to verify.) See the comment for further details, it may require some editing.
<code>
/run y=GetAchievementCriteriaInfo for z=1,87 do a,b,c,d,e,f,g,h,i,j = y(1021,z); k,l,m,n,o,p,q,r,s,t = y(j) if m==false then print("\124cffff0000\You have NOT YET equipped:\124r",k) else print("\124cff00ff00\You have equipped:\124r",k) end; end
</code>


Are there any Catholic medieval directives (rubrics) about what to do/pray/think during Eucharist Adoration?

Question: Are there any medieval (from the 5th to the 15th century) directives (some kind of manual or rubrics) about what to do/pray/think during Eucharist Adoration?
Comment: Using the catholic tag is no substitute for explaining in the question itself that you require Catholic sources.
Comment: Maybe the Orthodox did? I don't know. Not really relevant to specifying the denomination in the question itself.
Comment: Related: [What is the earliest instance of Eucharistic adoration?](https://christianity.stackexchange.com/questions/68725/what-is-the-earliest-instance-of-eucharistic-adoration)
Answer: Eucharistic Adoration as it is known today didn't exist between the 5th and 15th centuries.  Even Quantore (or forty hours devotions) did not begin until the 16th century.  Apart from religious houses, perpetual Eucharistic adoration did not begin in earnest with the laity until the 18th and 19th centuries in Italy and France. (Wikipedia)
Comment: @Geremia What makes you think that the Feast of Corpus Christi involved Eucharistic adoration?  The Feast was simply one more step in recognizing the importance of the Real Presence and the veneration of the Sacrament.
Comment: It involved carrying and adoring the Blessed Sacrament in procession.
Comment: I don't believe the question is asking about Eucharistic processions.
Comment: Adoration certainly existed since at least the Feast of Corpus Christi, which St. Thomas Aquinas composed (13th cen.).
Comment: No, the answer denies that Eucharistic Adoration *as it is known today* existed in the Middle Ages, and that is correct. Eucharistic Adoration today would be entirely foreign to a medieval catholic. Edit: I see you mentioned the "as it is known today" part as well. It seems like zippy2006 already clarified that he at least meant that perpetual adoration was not a thing back then. In addition, it wasn't until the 14th century (according to Wiki) that the Host was even elevated at Mass for adoration during the liturgy, much less was it being placed before groups of lay catholics in a monstrance.
Comment: @jaredad7 It cites Wikipedia where Eucharistic Adoration in the Middel Ages is described, but denies its existence. Either this answer is just false or it means very specific things with "as it is known today".
Answer: Are there any Catholic medieval directives (rubrics) about what to do/pray/think during eucharistic adoration?
There are certainly some directives about what to do during Eucharist Adoration, but they are extremely hard to find , if not quasi impossible to find.
(This is going to be an incomplete answer, at best since genuine original source are lacking in this subject matter.)
Eucharistic Adoration does not originate in the Middle Ages, not with Corpus Christi nor with Lateran IV. It has a lengthy pedigree that takes us from the Middle Ages back through the Eucharistic controversies of the 11th century to the flowering of the monastic age and the desert fathers - right on down to the New Testament itself. Those who consider Eucharistic Adoration a strange aberration of the Middle Ages should consider that Eucharistic Adoration not only was practiced in the early Church, but that the principles upon which Eucharistic Adoration is based are all developed from apostolic teaching.
First of all, let us deal with when Eucharist Adoration was first historically documented.
Eucharistic adoration began in some form early in Church history but it was clearly promoted by a succession of popes beginning in the Middle Ages, including Pope Urban IV who established the Feast of Corpus Christi in the 13th century and Pope Pope Clement VIII who in 1592 instituted 40 Hours Devotion.

On 11 September 1226, in compliance with the wish of Louis VII, who had just been victorious over the Albigensians, the Blessed Sacrament, veiled, was exposed in the Chapel of the Holy Cross, as an act of thanksgiving. So great was the throng of adorers that the bishop, Pierre de Corbie, judged it expedient to continue the adoration by night, as well as by day, a proposal that was subsquently ratified by the approval of the Holy See.
Exposition and consequently adoration became comparatively general only in the fifteenth century. It is curious to note that these adorations were usually for some special reason, e.g. for the cure of a sick person, or, on the eve of an execution, in the hope that the condemned would die a happy death. The Order of the "Religiosi bianchi del corpo di Gesù Christo," a Benedictine reform, united to Cîteaux in 1393, and approved later as a separate community, devoted themselves to the adoration of the Blessed Sacrament. Philip II of Spain founded in the Escorial the Vigil of the Blessed Sacrament, religious in successive pairs remaining constantly, night and day, before the Blessed Sacrament. But, practically, the devotion of the Forty Hours, begun in 1534, and officially established in 1592, developed the really general Perpetual Adoration, spreading as it did from the Adoration in one or more churches in Rome until it gradually extended throughout the world, so that it may be truly said that during every hour of the year the Blessed Sacrament, solemnly exposed is adored by multitudes of the faithful. In 1641 Baron de Renty, famous for devotion to the Blessed Sacrament, founded in St. Paul's parish, in Paris an association of ladies for practically a Perpetual Adoration; and, in 1648, at St-Sulpice the Perpetual Adoration, day and night, was established as a reparation for an outrage committed by thieves against the Sacred Host. - Perpetual Adoration (Catholic Encyclopedia)

From this point on Eucharist Devotion increased in various locations amongst the faithful in various countries.

The lay practice of adoration formally began in Avignon, France on September 11, 1226. To celebrate and give thanks for the victory over the Albigensians, King Louis VII of France asked the Bishop of Avignon to have the Blessed Sacrament exposed in the Chapel of the Holy Cross. The throng of adorers was so great that the bishop decided to have the adoration continue day and night.
During the Middle Ages, many more of the faithful began to adore the Blessed Sacrament apart from the Mass. At first, the custom was to worship the host reserved in the tabernacle. Eventually, some came to practice the devotion with the tabernacle doors open. Later still, solemn exposition of the host, in a monstrance, became the norm.
The practice spread through Europe and culminated in the establishment of the Feast of Corpus Christi—Latin for "the Body of Christ"—in 1264. The feast itself, now celebrated each June, helped spread the devotion. - History of Eucharist Adoration

Wikipedia has this to add at this moment:

In 1264, Pope Urban IV instituted the feast of Corpus Christi ("the Body of Christ") with the publication of the papal bull Transiturus. He asked the Dominican theologian Thomas Aquinas to write the texts for the Mass and Office of the feast. This included such famous hymn as Panis angelicus, and Verbum Supernum Prodiens the last two strophes of which form the Benediction hymn O Salutaris Hostia. The last two verses of Pange Lingua are sung as the hymn Tantum Ergo, also used at Benediction.
As of the fourteenth century in the Western Church, devotions began to focus on the Eucharistic gifts as the objective presence of the risen Christ and the Host began to be elevated during the liturgy for the purpose of adoration, as well as to be seen by the congregation since the priest stood facing the same direction in front of the altar.
A common early practice of adoration known as Quarantore (literary forty hours) started in the 16th century. It is an exercise of devotion in which continuous prayer is made for forty hours before the exposed Blessed Sacrament. This practice started in Milan in the 1530s and 1540s by Capuchins such as Giuseppe da Fermo who promoted long periods of adoration. From Northern Italy it was carried to elsewhere in Europe by the Capuchins and Jesuit.

Now let us start with medieval directives for Eucharist Adoration which I Will try to complete as time permits:

In the Middle Ages, the worship of the Eucharist was ultimately an expression of reverence toward the holiness of God. Following consecration, the maiestas Domini, divine majesty became present on the altar. According to Jungmann, the elevation following the consecration came in use in Paris, in the 12th century, allowing the congregation to worship Christ in the Eucharist. Starting from the 13th century, we have solid data to prove that elevation followed the words of consecration. However, Nußbaum shows that in Germany elevation was practiced already before the 12th century. The first synodal resolution on the practice of elevatio following consecration was issued by the Council of Paris, in the time of Bishop Eudes de Sully (1196–1208). In 1219, Pope Honorius III commends the practice of elevation in his letter to the English bishops. In the 13th century, Saint Albert the Great already regards elevation a common practice. According to Browe, the two additional presentations of the consecrated elements following the great elevation – during the doxology following the canon and that following the Agnus Dei – originate in this practice.
Starting with the 13th century, during elevation, the congregation made the sign of the cross or beat their breast as a sign of reverence before Christ. Later, following elevation silent prayers and hymns were prayed. Ringing hand-held bells and the church bell to call the attention of the congregation was not yet a general custom in this period. As the faithful desired to see the elevated Eucharist, candles had to be lighted at early morning masses for the Eucharistic species to be visible. In the 14th century Carmelite monasteries the elevated host was also venerated with incense. In the 16th century Spanish and English churches, a black veil was hung in front of the altar to enhance the visibility of the white host against the dark background. This practice became widespread in France as well; in the churches of Chartres, Rouen, and Orléans purple veils were used as background. The priest celebrating the mass moved the elevated host left and right to ensure its visibility.
Elevating the chalice was a later and slower development. The first clues lead to France. The practice is mentioned in Wilhelm Duranti[s]'s (Guillaume Durand, +1296) Rationale divinorum officiorum. According to the missals, elevating the chalice became widespread starting from the 15th century. The Council of Constance presents the elevation of the chalice as a self-evident practice. The 1570 Roman Missal of Pope Pius V already mentions double elevatio. The diversity of the forms of worship glorifies Christ present in the Eucharist and the faithful grasped every opportunity to see and worship the sacrament. - Eucharistic Devotion

So are there any Catholic medieval directives (rubrics) about what to do/pray/think during Eucharist Adoration?
The usual position for the faithful to pray while exposition of the Blessed Sacrament is kneeling in prayer on both knees. I grew up with this custom in full force. Nowadays, many simple sit down while the Blessed Sacrament is exposed. All genuflect (bending both knees) when adoring the Blessed Sacrament unveiled, as at Expositions. This liturgical custom dates back to the Medieval Catholic Church.
Historically, the Church has never told the faithful what order  how to pray while in church, whether the Blessed Sacrament is exposed or not.
Since illiteracy was quite high during the Middle Ages, it is logical that many of the faithful would pray the rosary. Those who could read possibly would read some biblical passages.
Certainly, some religious, such as Benedictine monks would pray the Divine Office while the Eucharist Adoration is going on. This is an actual monastic tradition in some regions.


How to execute a shell command in Opa?

Question: I couldn't find in the API anything that would allow me to execute a shell command, something on the line of what system or exec do. Is using the Foreign Function Interface the only way to achieve this at the moment?
Answer: You can add this in your code:
 exec = %%bslSys.process.exec%% : string, string -> string

This function was added in Stdlib.System (import stdlib.system) from the build 739
Answer: Yes and that's a design choice, not a limitation. Executing shell commands can be very dangerous from a security standpoint; in Opa security is paramount and therefore we decided not to expose it to the users. If you really need it (and know what you're doing) then it should be very easy to expose one of Ocaml's Sys functions to your program via FFI.

How to execute a shell command in Opa?


Heat equation energy estimates

Question: We consider the following  3D and periodic Heat equation $$\partial_t u-\Delta u=0,~~~u(0)=u_0\in L^2(\mathbb{T}^3)~~\mbox{for } (t,x)\in \mathbb{R}_+\times \mathbb{T}^3$$
Where $u(t,x)$ stands for the unknown heat at the instant $t$ and the spatial position $x$. We approximate the aformentioned Heat equation by Galerkin method as follows $$P_nu=u_n=\sum_{|k|\leq n}\hat{u}_ke^{ikx}\Rightarrow \partial_t u_n-\Delta u_n=0,~~~u_n(0)=P_nu_0\in L^2(\mathbb{T}^3)$$
By taking the inner product of the approximated Heat equation by $u_n$ we obtain $$\langle \partial_t u_n,u_n\rangle_{L^2}-\langle \Delta u_n,u_n\rangle_{L^2}=0$$
My question is how to get in a detailed and rigorous manner please the following energy estimate $$\|u\|_{L^2}+\int_0^t\|\nabla u(\tau)\|_{L^2}d\tau\leq \|u_0\|_{L^2}$$
with taking into account all details like the passage to the limit as $n$ goes to infinity and how to close the energy estimate etc (because the details are needed).
Thank you in advance
Answer: Hint: integrating by part over $\mathbb{T}^{3}$, you'll find  $$\frac{1}{2}\partial _{t}\left\Vert u_{n}\right\Vert ^{2}+\left\Vert \nabla
u_{n}\right\Vert ^{2}=0$$
inegrating again over $(0,t)$ to find
$$\frac{1}{2}\left\Vert u_{n}\right\Vert ^{2}+\int_{0}^{t}\left\Vert \nabla u_{n}\left(
s\right) \right\Vert ^{2}ds=\frac{1}{2}\left\Vert u_{n}\left( 0\right) \right\Vert ^{2}$$
therefore, $u_{n}$ is bounded in $L^{2}(0,T,H^{1}(\mathbb{T}^{3}))$, use the Lions-Aubin lemma to pass to the limit.
Answer: Passing to the limit when $n$ tends to infinity: to obtain a strong convergence you can use the aubin-lion lemma or in general a compactness method;  Finally: don't forget to close you energy estimate, in your case this is simple since your equation is a linear one.

Heat equation energy estimates


Android mail client using Exchange Web Services?

Question: I'm looking for an Android e-mail client that connects to a hosted Exchange 2010 server via Exchange Web Services (EWS). I know there are several mail apps (including the stock mail client) that can work with Exchange through ActiveSync and/or WebDAV, but my server supports neither of these.
Comment: can you please tell me how you fixed it
Answer: Here's what I've found:

AquaMail

"Support for standard Internet email protocols: IMAP, POP3, SMTP; Exchange: EWS" (reference)

Blue Mail

"Support for … Exchange (ActiveSync, EWS, 365)"
cloud-involved

Email TypeApp

"Supporting … all Exchange protocols including Exchange Web Services (EWS)"
probably cloud-involved

MailCal for Exchange

"email and calendar client that uses EWS/OWA/Webmail"

MailDroid

various forum postings discuss EWS support

MobiMail

"Exchange Web Services (EWS) is required on the Exchange server"

Newton Mail

"Supports Calendar for Gmail, Google Apps, and Exchange (EWS)"
cloud-involved

Stack Mail, a.k.a. Ginger Mail, a.k.a. Squash Mail

"Please make sure that EWS (Exchange Web Services) is enabled on your Exchange server"
this says Google was refunding purchases

Honorable mention:

AOL Alto - discontinued November 9, 2017
Answer: JWebServices for Exchange is Java API for Microsoft Exchange 2007/2010/2013 and Office 365. The API offers complete Exchange Web Services functionality including the ability to create/update/move/copy items and folders, search items and folders, send messages, send meetings requests and more. Supports JDK 1.5+ and Android 1.6+.
Answer: You can use Microsoft's EWS API which is Open Source for Android by doing the following steps:

download the source code available in the URL: http://archive.msdn.microsoft.com/ewsjavaapi
EWSJavaAPI_1.1.5.zip
Make the changes to above API to work for JDK 1.4 in Eclipse like remove override annotations, etc.
Download source code of javax.* package available in below URL
http://www.java2s.com/Code/Jar/j/Downloadjsr17310srcjar.htm
jsr173_1.0_src.jar.zip
Download source code of stax API available in below URL,
http://dist.codehaus.org/stax/distributions
stax-src-1.2.0.zip
Keep all the sources under the single Java project in Eclipse
Open the project explorer and select the package which are starts with "javax" and rename to your company name (e.g., com). Note: Eclipse will ask for all the naming contexts will change then click OK.
Export all the Java sources to one single jar file.
Then You good to go to use the jar in Android application with out any problems.

I used the same way explained above and it worked in Android application 100% perfectly.
Comment: This may be viable for someone who is familiar with programming, but isn't going to be helpful for most users.
Comment: it is not working for me, are these steps complete ? please help


How to get Logitech C510 webcam working in Cheese/Skype

Question: I have a Logitech C510 webcam connected to my desktop running 64-bit Ubuntu 11.10, but it doesn't seem to be working when I run Cheese and Skype. After doing some search, it seems this webcam should just work out of the box. However, Cheese and Skype don't seem to work with it. With those programs loaded, the webcam appears in the list of video devices in their configurations, but the orange light indicator on the webcam does not turn on. However, I was able to get the webcam to work with the Adobe Flash plugin running in Chromium. I can open Flash settings and click on the webcam icon to get an image to show up. So the webcam seems to work fine, but Cheese and Skype can't seem to operate it. Any ideas about what might be causing this? Thanks.
Answer: Try experimenting with the hacks on this site:
https://wiki.ubuntu.com/SkypeWebCams
The following worked for me:
Open Text Editor and enter:
<code>#!/bin/sh
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype
</code>
save as skype.sh
And set in permissions : Allow file executing as a program.
Edit the menu item by opening "Main Menu" from launcher or running alacarte in the command prompt. Find Skype and change the command to point to the script file.
Comment: Thanks for the advice. I tried that script but running it I get "ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored." Any idea what might be causing this? Also, it's not just Skype, it seems Cheese and Gstreamer can't operate the webcam either, but it works perfectly in guvcview. Could it be some issue with the webcam needing special drivers to turn on?
Comment: The position of the v4l1compat.so might be different on different versions of Ubuntu. On my system (11.10) the path is:
/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so

Also make sure you have the libv4l package installed.

Instead of the script you may try to modify the menu loader to:

env LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype


SF story about a blood-drinking but harmless alien and a boy

Question: I remember to have read as a child a story where an alien being, I guess being left behind by his friends, is wounded and has to hide, maybe in the attic of a house. His kind of aliens are being persecuted by the humans because they use blood as food that they drink directly from other organisms without killing them (vampire-like). A boy knows that the alien is hiding in the attic and though he is afraid, he helps him by letting him drink his blood. The alien is portrayed as a harmless, friendly creature. It is possible that they communicate telepathically, not sure.
Comment: I don't want to spoiler too much, but: everybody is incredibly panicked but ignorant, and the boy as well as the alien are saved by an old wise man?
Answer: Somewhat reminiscent of Hal Clement's "Assumption Unjustified" in which a benevolent blood drinking alien feeds on a young boy. Differences are that the aliens are unknown to the humans and the boy's donation is not voluntary.
Answer: I found the book again. The story is by Thomas N. Scortia, and the German translation I read is titled "Der Fremdling" ("the stranger", or "the alien"), but I wasn't able to find out the original title or publication year.
Edit based on the comments: the original title appears to be "Blood brother", published in 1974.
Comment: I did find a couple sites-- like [this one](http://www.worldcat.org/title/reise-in-die-unendlichkeit-science-fiction-geschichten/oclc/213451887) -scroll to the line reading "Contents"- that show the German translation of "Blood Brothers" as "Der Fremdling".
Comment: There is a 1974 Scortia story called Blood Brother, based on the title alone that could be it.  Published in a Roger Elwood anthology that year called Future Kin, and reprinted in a Reader's Digest anthology in 1977.  Data from isfdb.com


24VAC to 5VDC or 12VDC Trigger - Maybe optocoupler?

Question: What I'm trying to achieve is taking a 24 to 30 VAC signal from an HVAC thermostat and converting it to possibly a 5 VDC or 12 VDC Trigger Input to a what I believe is a
optocoupler/isolator type relay. The relay then closes the COM and NO contacts turning on a 12 VDC LED (Labeled either FAN, Heat, and/or Cool). I'll post a photo of what I'm working with.
Comment: To clarify, you want to trigger (energize) an isolated relay(s) when there is 24Vac to 30Vac voltage across the secondary windings of a transformer, and when there is close to 0Vac the relay should be de-energized (in it's default state)?
Is the goal to make a  PCB, Stripboard assembly, or use off-the-shelf electronics?
Comment: (Off the shelf electronics)Sorry so I have a mains 120VAC 40VA to 24VAC transformer which powers my thermostat, then I want the tstat to send the 24VAC signal to the ac to dc device that can be accepted with the right voltage so it will trigger the relay (without causing 60hz humming) then turning on a 12vdc led that's shared from the 12v source to power the off the shelf optocoupler
Comment: This is what I'm using It requires 5vdc to 12vdc to trigger the octocoupler relay.
 https://www.amazon.com/dp/B00LW2GA5Y/ref=cm_sw_r_cp_apa_fabc_4SB3ZX9J01K5GQB9H2R2?_encoding=UTF8&psc=1
Comment: Would suggest the optocoupler solution with bridge rectifier since some have very wide tolerable input from trigger to max current which allows a wide detection range with a correctly sized serial resistance, and provides isolation.
Comment: @NicSavage Please see community guidelines where it states this forum is not about asking for buying recommendations [link](https://electronics.stackexchange.com/help/on-topic)
With that said, you could use off-the-shelf SSR part with socket ED06E5 Crydom with socket DRSED Crydom. I'd recommend spending the time to learn and follow answer given below
Answer: Relays may jitter with a half-wave triggered coil current so a full-wave low current diode bridge gives 120 Hz pulses which need a filter cap.
However, I assume 24Vac is intended to activate the Opto input which is inverted active low so an NPN transistor is needed.

simulate this circuit – Schematic created using CircuitLab
Variations of R2C choices but this is easy to drive and pulls up R prevents noise false triggers.
Comment: Any known products that can do this pre built or can you post what materials you would use, bridge rectifier or reccomended diodes? And sorry I'm still learning the lingo R2C? Thank you for such fast response time and amazing support!
Answer: I also thought TonyStewart's rectification methord. You can use 1N4002 diode which can hold 70 V rms, yours 40. Capacitor need over peak voltage. Use 100 V one(yours 60)


Merge QGIS projects

Question: is there a way to merge different QGIS project-files? For example, i have one project with water supply data. The project organizes the relations of the tables, the styling etc. In another project, the topic gas pipes is organized. One customer wants this topics combined in one project. Is it possible to merge those two existing ones?
Comment: Have a look at the "solution" for a similar problem I am using: https://gis.stackexchange.com/a/348706/109646
Answer: Option 1 should suit your case better as you could get all layers group in one go.
PS: if you use filesystem for some of your layers and not a database, you may have to change/copy your files for layers and also change data source to make the project "portable" relatively to the project path after applying the recipe from my answer.
Option 1:
Open your first project, then go to "Layer" > "Embed Layers and Groups...", select the project you want to borrow/import layers. Select the layers/group you want to import and it's fine.
Option 2:
You can also open two QGIS instances and copy from one project to another (right click on layers/group layer tree to choose "Copy layer" or "Copy group") and paste in the layer tree from the other project.
Option 3:
In the layer tree, right click on layer, choose "Export", then "Save As Layer Definition File..." from the project you want the layer(s). Then import it in another project with "Layer" > "Add from Layer Definition File..."
Option 4:
In the latest QGIS 3.14, you can now drag and drop layers between projects of different QGIS instances e.g https://changelog.qgis.org/en/qgis/version/3.14/#feature-allow-dragndrop-layer-across-several-qgis-
If you know other ways, curious to know how.
Comment: brilliant! thank you, option 3 was the only one i came up with and that would have been a hustle!
Comment: ok well, this works perfect for the layer styling. Appart from that it unfortunately imports not the "project" settings - how the layers are related (1:n relations etc) - which is important as some virtual fields depend on that relations
Comment: Not aware of friendly way to do it. Could be possible to copy from projet to another by using PyQGIS to export relations as a config and then import them in your other project with PyQGIS also, after layers/group import.
Comment: My PyQGIS abilities are rather weak but i will try and research a bit how this would work. I'll update the question if i find something
Comment: Maybe, you should ask another question only for the PyQGIS part instead of here.

Merge QGIS projects


In what ways will taxing corporations reduce inflation?

Question: President Biden Tweeted to the effect that taxing corporations will reduce inflation. When I look at what goods are experiencing the most inflation it seems to be things like groceries and rent. What hope is there that taxing corporations more will reduce inflation on these goods? It seems to reason that the only way taking money out of the economy will reduce inflationary pressure on these goods is to ultimately take it out of the pockets of those buying the goods. How does increasing taxes on corporations target the inflation I experience without also targeting the people buying those goods (also me)? It seems like whatever mechanism you use, you are ultimately stuck undoing stimulus spending. Is this just political maneuvering to do just that?
Answer: It is actually not crystal clear whether corporate taxes reduce inflation. There are both demand and supply effects to consider (see Tanzi 1982).
Lets start by considering the demand side of things. Aggregate demand (AD) depends positively on government spending and negatively on level taxation. Increasing the level of taxation will suppress AD. Although a priori we can't say whether increase in taxes will suppress to fully reverse previous stimulus (which boosted AD) as you suggested. These taxes could either suppress AD to more then offset previous stimulus, to exactly offset it or to less than offset it.
Nonetheless, in any case from demand side perspective the taxes would have negative effect on rate of inflation whether they are sufficiently high or not to offset previous stimulus. However, it is worth noting that this would come at cost of depressing economy that is probably  headed into recession caused by Russo-Ukrainian war.
Now, if US government would levy lump-sum non-distortionary taxes the above would be end of a discussion. However, taxes that depend on level of economic activity (such as corporate taxes), also can have negative supply effect as they distort incentives  to invest in companies (e.g. see  Federici & Parisi 2015; or see the famous Mirlees Review especially the first volume). This would reduce long-run aggregate supply (LARS) which depends, among other things, also on level of investment.
How big these distortions are is again empirical question, depending on parameters of the economy the effect could be smaller or large. Below I drew a picture for you showing two scenarios where depending on whether the shock to LARS is high (H) or low (L) the price level will either increase or decrease leading to either higher or lower inflation in the process (inflation is positive change in price level).  The new price level is given by intersection of $LARS_i$ with $AD_2$ which represents the effect of increasing taxes on shift in aggregate demand from the original aggregate demand ($AD_1$).
Not much more can be said based on the vague tweet. In fact the tweet does not even mention the taxes will increase. Biden just says that inflation would be reduced by corporations paying their 'fair share' which could in principle be even lower than their current tax burden depending on how he defines fairness.
Answer: Its highly unlikely that increased taxes of any kind would decrease inflation. Taxes like corporate taxes have substantial deadweight losses, some estimate 30% of what's collected. Government spending is also generally much less productive than private spending.
These deadweight losses would have the affect of increasing prices.
The only way I can imagine this could possibly hold true is if the tax is used to offset monetary inflation that would otherwise have been created if not for the tax. But this isn't how things work in the US. The Fed has control over monetary inflation of base money and banks have control over M2 monetary inflation. Neither of these are at all connected to taxes.
So this seems like just another political lie.