Is squash much more dangerous than tennis?

Question: This article places squash on its list of sports with the highest risk of joint injury, while it places tennis on its list of lowest risk sports.  Assuming proper protective equipment is worn (e.g. goggles), does squash still have a much higher injury risky than tennis?
Answer: It's been a long time since I've played, but I could see why they'd consider squash more dangerous.

First, it's pretty much tennis, but shoved into a shoebox. There's no division between the players, and they have less reaction time. This all adds up to an increased probability of running into each other, and imparting damage to joints, e.g., sprained ankles, sprained wrists, etc.
Second, the rackets are lighter and the handles are much shorter and smaller in diameter, than in tennis, while the strokes are either similar or smaller, but surely more compact. This is fairly more difficult to articulate through text, but here goes:
In tennis, the way to avoid joint injuries is to strive for near-perfect technique, which will minimize pressure on the joints. This can be achieved in a few ways:

Hold the racket with the butt cap in the palm of your hand.

This allows you to hold the grip looser. Which not only aids in staving off carpal tunnel, but can also allow the ball to go in the intended direction if accidentally shanked. I do not believe this is possible in racketball since the handles are significantly smaller and the racket is more likely to fly out of your hand. Gripping hard, and frequently doing so, causes carpal tunnel, cubital tunnel.

The motion of hitting the ball in tennis is similar to bunting the ball in baseball.

I explain this to people by telling them to imagine throwing the racket at the ball instead of hitting the ball with the racket. This also encourages looser grip and less tension in the body. Again, with racketball, since there's not as much mass to the racket, and since the stroke is so much more compact, I don't believe this is possible to accomplish, or at least not to the same scale. This means you're relying solely on muscle for power, which will cause swelling in the muscles, and pressure on the joints, not to mention higher impact on the joints since you're actively gripping harder, again, causing carpal tunnel, cubital tunnel, etc.

Step into the ball for power.

While this is obviously possible to do in racketball, since the proximity to other players is so small, it makes it more difficult to do consistently. Since you're not stepping into the ball for power, this means the only other way to get power is to "muscle through it", which encourages more tension in the muscles and in turn more pressure on the joints.

After dealing with the fallout of cubital tunnel syndrome, which resulted in nerves being surgically relocated, I pretty much understand the idea is to avoid tension as much as possible. I hope that helps.


Is some i2p outproxies for tor only?

Question: I believe outproxy to Tor network is safer than outproxy to normal Internet.
So, is more I2P outproxy available for Tor than false.i2p?
Answer: The default port 4444 has the outproxy "false.i2p" but I check http://127.0.0.1:7657/i2ptunnelmgr then I find out The default port 4445 has the outproxy "outproxy-tor.meeh.i2p".
When I  try to use 127.0.0.1:4445 as the proxy for Tor-Browser, I get a lot better experience than use 127.0.0.1:4444
Answer: Well, the ones you've mentioned - are very long-term ones and yes, they are using Tor. I2P has got some good amount of non-public outproxies, and that is how it has to be:

Same as Tor's exit nodes, outproxies are diversifying the ways/IP zones of the exiting traffic
Instead of Tor, private outproxy can be easily specified on-flight and used by the I2P client natively, there's no private ExitNode in Tor, sadly - and using proxy/VPN as a hidden service has some additional work to do and has nothing in common with the Tor itself
I used to spot some in I2P directories - check them

Is some i2p outproxies for tor only?


GUI Tool to configure SFTP in Mac OS X Server?

Question: Is there a GUI tool out there to configure SFTP for Mac OS? I have SFTP running fine, but I have no idea if it's possible to restrict access to certain Shares etc. Server Admin just lets you configure options for FTP.
Answer: SFTP doesn't work with shares. It is part of the SSH server bundle, and allows access to whatever the user login in has access to, no more, no less. There is a GUI to enable SSH (Remote Login), the rest is editing configuration files, there is no GUI that I know of for this.
Answer: While there isn't anything that will give you a GUI utilizing the built in SSH setup in OS X, there are programs such as CrushFTP (shareware) or MySecureShell (OSS, but not exactly user friendly). With these programs you can set accounts and where they are restricted to.


Is is OK to ask questions on how to use font editors?

Question: Everything is inside the title.
So is it OK to ask technical support questions about font editor software ?
Answer: I think Font Design is on topic here which means the tools used to do it are also on-topic. Be aware with all software specific questions we have implemented a policy of What have you tried?.
If someone comes in and asks "How do I make this E in Adobe Font Lab" then it would get closed under that policy.
If they show instead ask, "How can I fix this curve on my E that isn't aligning properly", and indicate let's say a particular curve that doesn't seem right to them using a screenshot and asks about ways to fix it, then it would be on-topic.
Answer: I personally do not have a problem with this and I also would likely upvote the question in regards to developing fonts.  That said it might depend on how you word the contents of the question and if some would consider it as technical support.
I know as a community some have expressed they are burned out on Adobe software but some of the questions I see that get answered or upvoted that are technical appear to be better written and show effort.
You could always give it a shot, and we can encourage an edit or some could help edit to make it better, but I do appreciate you actually coming to meta and asking.
Comment: I saw many typesetting questions though on-topic are poorly received, because they involve considerations which look opinion based, whereas they involve fact with studies. The purpose is to find more off-topic content on Graphics Design in order to make [this proposal](http://area51.stackexchange.com/proposals/88060) different.
Answer: I think you'll find that well written questions on just about anything related to Graphic Design are accepted here. That would largely include typography questions.
The primary issue with questions as they relate to software, including font software is the type of question it may be. Asking something which would take a higher-level understanding of the application is often answered. Asking something which the help files would answer is generally down voted and/or placed on hold due to lack of effort primarily.
There has been thread after thread after thread here on meta about what may or may not be technical software support. If your questions skirt that, then there's a higher probability they won't be accepted well by the community.
I think asking veiled questions such as this is a bit of bait-and-switch. Will this sight automatically close anything related to FontLab, Fontographer, BirdFont, Glyphs? Heck no. In fact we have questions already related to those software packages. Do we have questions as they relate to type usage? Yes we do. But again, a bad question is just a bad question regardless of the software being used or intent of the question.
If you are merely searching for things which would be seen as off-topic here, but on topic at a typography stack, you should ask that question. not a bunch of loosely worded, hard to define, tangent questions that are open to interpretation.
Comment: +1 to last paragraph


What is the difference between coinbase address and normal address?

Question: i am unable to find the difference between these two addresses. Do coinbase address also change after each transaction?
Answer: They're just normal addresses. I'm not sure what you're referring to with "also change" as addresses don't really change.
The term "coinbase" typically refers to mining: coinbase address is the address where minted coins are sent. But, as I said, it's a regular address to which you should have the private key.
Comment: Oh.. I thought about coinbase exchnage. lol
Comment: Yeah it can be a bit confusing at first.


ModuleNotFoundError: No module named 'qiskit.extensions'

Question: Environment
Qiskit Finance version: 0.5.0
Python version: Using the Qiskit Lab v1.0.0
Operating system: Windows 11
Hi, technically I am new to this quantum computing stuff.
I see that an upgrade of Qiskit to 1.0 was made, and that this pretty much removed the qiskit.extensions.
However, in the Qiskit_finance repository trying to make the tutorial, they say it runs even for this new version of Qiskit.
I am trying with tutorial 09_credit_risk_analysis.ipynb but in this part:
<code>from qiskit_finance.circuit.library import GaussianConditionalIndependenceModel as GCI

u = GCI(n_z, z_max, p_zeros, rhos)
</code>
It should extract a Gaussian function previously located in qiskit_finance.circuit.library
I get the error in the title.
Is there something I need to install?
Answer: Qiskit Finance has been updated in its repository with some compatibility fixes for the recently released Qiskit 1.0, but an official release has yet to be done that contains these fixes. For now you would have to install Qiskit Finance from source from the main branch there, or revert to the earlier 0.46 Qiskit.
Comment: The best is to make a virtual environment and in that venv, fix the versions of your installs like `%pip install qiskit==0.46.0` and `qiskit_finance` as well


How to recover a database from a failed Availability Group?

Question: We are currently testing a SQL Server 2012 AlwaysOn HA implementation where we have 2 out of the 3 nodes are synchronous.  The third, asynchronous node, does not have a vote in the quorum.  There is a scenario in which the first two nodes experience complete failure.  When this happens, the third node is up and running but it has it's database in the AG marked as "Recovery Pending".  How can I get this database out of this state and make it available?
Answer: The first attempt would be to try to get either the primary replica back online, or to get the synchronized secondary replica online to ensure that there is no data loss.  But provided this is a true disaster recovery scenario (as your original question implies), then it would seem as though your actual cluster (WSFC) has failed.  With the database entering the recovery_pending state, you can't unjoin the database to recover it.  Likewise, you would need the cluster in order to do a failover.  So the following assumes that you can't force quorum on either of the sync replicas, and you need to failover to the async.
The next step at this point to recover to the async secondary that is currently online, would be to force quorum (WSFC) and then perform a forced failover (with the potential for data loss).
For more information, I highly recommend you read up on BOL regarding the topic Perform a Forced Manual Failover of an Availability Group
Comment: Thank you for pointing me in the right direction.  Unfortunately I am unable to get the cluster to start on the 3rd node.  According to this msdn article, I should be able to launch Cluster Manager and select Force Cluster Start in the actions pane. http://msdn.microsoft.com/en-us/library/hh270275(v=SQL.110).aspx  However, there is no Force Cluster Start option in the pane.  It also looks like I'm not connected to the cluster and when I try to, it states the cluster is in the process of being started.
Comment: Have you tried any way besides fc admin?


French Post: What is the difference between "post export" and "lettre prioritaire"

Question: I am sending small items, less than 50 grams, from France to the US mostly, and normally use "lettre Prioritaire" which takes 1-4 weeks for 1.78 Euro.  I just sent something "post export" for 6.73 Euro because they said 4 days to California. (without tracking)
Has anyone else used "post export"? Are the expected delivery times accurate?  Is this similar to the US Priority mail? Is it worth the extra 5 euro?  Thanks!
Comment: That's interesting, the help center states these are "site worthy" - "Complications in every day life due to living in a foreign country as a non-citizen" The French Post is complicated.  Others may have similar questions, and I found this site was the place to ask this.
Comment: I had a [**related question**](http://expatriates.stackexchange.com/q/1365/133) a few months ago.
Answer: After a search on the french Poste site, you can see on this page (in french) that Postexport documents is an offer for a pre-stamped pack/enveloppe. The price therefore includes this package but the delivery system is described as Lettre Prioritaire, so not different from your 1.78 € stamp for a letter under 50g.
On the same page, you can see that there's an offer called Export Suivi, that you can add over a letter already stamped as a Lettre Prioritaire to benefit tracking of your letter, with no mention of a faster delivery.
So my feeling is that you will not benefit of a faster delivery by using Postexport, neither Export Suivi.
This document (in french) mentions a 4 to 11 days for delivery of Prioritaire in the USA outside LA and NYC.
Comment: Reviewing these pages, it seems you may be right.  The post export may just be a convenience (costlier) envelope. It will be interesting to see if it arrives sooner than later.


Why semiregular polyhedra exists

Question: Yes. There are already many explanations for those five platonic solids and many other semiregular polyhedra such as Archimedean and prisms and antiprisms. My question is why they all exists.
For example, if we want to find a regular polyhedra with faces consist of equilateral triangles, we may first specify the number of triangles at each vertex, say 3, 4, 5 and then by means of many methods e.g. Euler characteristics and double counting, can find the total number of faces and so on. And analyzing the angles between faces, one can prove that those cases are all feasible. Now there arose a question. Why that all the cases are feasible? E.g. it may be the case that tetrahedron and octahedron exist but icocahedron, during actual construction we may met a kink at the last stage so that it may not be able to be formed. However, this kind of situation does not happen.
For every combination of expected combinations of regular polygons, we have almost always a corresponding really existing semiregular polyhedra. Can we give a explanation for existance of those combinations without invastigating individual cases?
At my opinion, this is not trivial. For example, suppose that we want a polygon with faces given non-regular triangle with prescribed rules at each vertex how they are linked. Can we expect resulting solid almost surely exists? At my opinion, for this case, the answer would be 'no'.
Answer: "One can prove that those cases are all feasible."
Actually, no.  For example, a 5-5-3-3 vertex that is seen in the pentagonal orthobirotunda does not occur in a semi-regular polyhedron.   Peruse the Johnson solids and make a chart of all the regular polygon vertex types which cannot be realized.
Here is a disproof that the 5-5-3-3 polygon arrangement could occur in a semiregular polyhedron.  Label one of the pentagonal faces $ABCDE$. Say that two pentagonal faces are shared along an edge $AB$.  Then the remaining polygons around $B$ are both triangles including the face sharing edge $BC$.  Thus the pentagonal face shared with edge $AB$ is alternated with a triangular face shared with edge $BC$.  For the polyhedron to be semiregular this alternation must continue around the edges of $ABCDE$.  Thus $CD$ is shared with a pentagonal face, $DE$ with a triangular face, $EA$ with a pentagonal face, and ... $AB$ is shared with a triangular face.  Uh-oh, $AB$ was set up as shared with a pentagonal face.  The assumed existence of a semiregular polyhedron is contradicted.
With a different ordering of faces -- 5-3-5-3 -- each pentagonal face shares edges only with triangles and vice versa.  The contradictory alternation cited above is avoided, and a semiregular polyhedron can be and is formed with the 5-3-5-3 face arrangement.
Comment: Many thanks to Ed Pegg for the attention and the informative response. Nevertheless, I have not chooses the post as the "perfect" answer for my question. I still wonder why there occure those numerous regular, Archimedian, and Johnson polyhedras. It may be the case that my question is ill posed but I need some time to consider the situation those existing and non-existing Johnson's polynomials....

Why semiregular polyhedra exists


Earth's and Sun's rotation in the Ptolemaic world

Question: In Ptolemy's geocentric model the Sun travels through the ecliptic and around the Earth once every 24 hours and the Earth does not rotate about its axis. What is Ptolemy referring to when he talks about the Sun's position during the year? How did he reconcile the Sun's eccentric orbit (giving rise to different length seasons) with the fact that the Sun rotated around the Earth every 24hrs?
Comment: The fixed stars also rotate every 24hrs, the Sun's position is taken relative to them. What he describes is an approximation of the same trajectories we would come up with today in the frame attached to rotating Earth. What is there to reconcile?
Comment: Ancient Greeks did not explain seasons as we do today, they had stories about Hades and Persephone. But since the two models are geometrically equivalent whatever makes sense in one makes it in the other. If you want to explain seasons by the tilt that tilt will just be reflected geocentrically in the position of the ecliptic, see [How do geocentric theories explain seasons?](https://physics.stackexchange.com/q/128081/65263) on Physics SE.
Comment: When, during the day, is the position of the Sun taken relative to the stars? At noon? From which part of the Earth? The position of the Sun (taken as a straight line between the Earth, the Sun and the point in the ecliptic this line points to) makes sense in a heliocentric model where the Earth moves by <1° per day, but makes less sense in a geocentric model where the Sun moves 360° per day (180° during daytime).
Comment: Seasons don't make sense in a model where Earth's inclination is fixed relative to the Sun
Comment: @Conifold good point
Comment: About seasons, this is simply not true. Ancient explanation of the seasons is the same as the modern explanation.
Answer: In Ptolemy system, there is a sphere of fixed stars which rotates about the Earth with constant speed 1 rotation per 24 hours. This rotation is about the axis which passes through the North and South pole. The poles are fixed with respect to the stars, and the great circle equidistant from the poles is the (celestial) equator. (Well, almost fixed, see below about precession).
All other motions in the sky are referred to this sphere of fixed stars. (So mathematically it is completely equivalent to diurnal rotation of the Earth).
Sun moves on the ecliptic, which is the great circle (fixed in the sphere of fixed stars) which is inclined to the equator. The period of this rotation is 1 year, and it is slightly non-uniform ("inequality of the Sun").
This theory gives a perfect account of the seasons which is essentially the same as our modern explanation. (Contrary to what @Conifold says in his comment). Ecliptic intersects
the equator at two points which are called the Spring and Autumn equinoxes. In the middles of the corresponding arcs
of the ecliptic there are two points at the greatest distance from equator. They are called the winter and summer solstices. The seasons are the intervals between
these 4 points. It is an early discovery (before Hipparchus) that the seasons have unequal lengths. The conclusion is that the motion of the sun along the ecliptic is slightly non-uniform. This was called the Inequality of the Sun, and it corresponds in modern astronomy to the first and second Kepler's laws).
So it is hotter in summer, because a) the rays of the sun hit the Earth under bigger angle, and b) the days are longer).
In addition to this, the position of the equator (and thus of the poles) with respect to the stars and ecliptic is not exactly fixed; the points of  equinoxes move with the period roughly 1 degree per century. This motion is called precession.
(This is an ancient estimate, modern speed of precession is 1 deg per 71.6 years).
This is a more or less complete description of the Ptolemy's theory about Earth and Sun. Mathematically it is EQUIVALENT to the modern description. The difference between Ptolemy's and Kepler's description only concerns
the motion of the Moon and planets.
Another difference, between the "Sun inequality" and the first two Kepler laws, is so small that it was undistinguishable for the accuracy of observations
18th century. For planets, Ptolemy theory also gives very good results. The inadequacy of his description was only detected in the end of 16th century as a result of improvement of observation accuracy (of Tycho Brahe). The most difficult case is that of the Moon. There was a continuous progress in describing the Moon motion since Ptolemy to the beginning of 20th century when a theory consistent with all observations was finally achieved.
Comment: You are missing the first paragraph of my answer. Ecliptic is fixed with respect to the stars. And the whole sphere of the fixed stars rotates with the speed 1 rotation per 24 hours. This motion accounts for daily rising and setting of the Sun (and of all fixed stars). Sun moves on the ecliptic (1 turn per year with respect to stars) and participates in the diurnal rotation of the whole together with all stars.
Comment: Ptolemy uses the sphere of the stars as the reference. All motions that he discusses are WITH RESPECT TO THIS SPHERE. Except the rotation of the sphere itself around Earth with the speed 1 rotation in 24 hours. The reason for choosing this frame of reference is simplicity. Of course, it will be even simpler to consider the Earth rotating about its axis. But this Ptolemy rejects on the (wrong) physical reasons.
Comment: How come the Sun takes a year to go around the ecliptic and rises and sets every day (and hence must be going around the ecliptic every day)? What am I missing?
Comment: If I'm understanding you correctly you are saying that the Sun moves along the ecliptic (and around the Earth) at a fixed speed of 24hrs per revolution. The sphere of the stars instead moves at a speed which is slightly faster than this so that we observe the progress in the night sky over the course of the year. This makes sense, but why does Ptolemy always talk about the Sun moving at the rate of one revolution around the ecliptic per year? Why doesn't he talk about the sphere of the stars moving instead? It would be way clearer in this case.


Can I enter Denmark by car without a PCR test?

Question: I want to travel to Denmark from the Netherlands by car. Is there any border control at the German or Danish border? Do I need a valid PCR test to enter the country?
Comment: Whether there is a check or not, if you are required to have a valid test, get one. It is not just for you but for the safety of all of us.
Comment: Related, though a few months old:  [Travelling to Denmark during COVID](https://travel.stackexchange.com/questions/162955/travelling-to-denmark-during-covid)
Comment: I agree with Willeke, we don't speculate in the chances of getting caught on Stack Exchange.
Comment: Totally agree. Its just not specifically mentioned for car case. But since its generalized I suppose I need test.
Answer: From https://en.coronasmitte.dk/rules-and-regulations/entry-into-denmark/categorization-of-countries
If you live in Netherlands, that is an orange country (yes I know, but now also according to the Danish classification) you need:

Test before arriving in Denmark
Test after arrival
Isolation after arrival

The tests could be PCR or quick antigen tests.
The test after arrival is free. You can find a list of testing sites at https://en.coronasmitte.dk/rules-and-regulations/entry-into-denmark/legal-requirements-upon-entry/new-mandatory-testing-and-isolation-requirements# under the heading "Where can one be tested?"
All requirements are void if you are fully vaccinated more than two weeks ago or was previously infected.
Note that the country classifications can change every week.
Comment: This assumes that you cross Germany without intermediate stop ("usual" stops for fueling or lunch breaks are ok). Otherwise you need to "check in" at https://www.einreiseanmeldung.de/


List Returns firts Item of Duplicates Work Around Python

Question: Good[ Morning : Evening ]
Im trying to make a small programme that :
-reads a text file containing numbers -assigned each line into an element of int_list
-takes a given list (max_quantity) and divides all the elements by 2 resulting in (max_q_in_half)

takes (int_list) and compares each element to its counterpart in (max_q_in_half) to eliminate each element that is above 50% of its maximum value (max_quantity)

-then make all the elements that are below 50% of their maximum value
into a new list (new_list)
-then return the smallest number in the (new_list)
-then uses that number to get it's index in the original (int_list)
-then uses that index to match the number to it's element in (metal_list)

to return the metal that is about to run out from the stock so the it could  be restocked

HERE IS THE PROBLME
As you see in the output of this code the numbers below 50% are [41, 1]
the lowest value is 1 which has the index 6
but when i search int_list for this value it returns the firt occurence of 1 which is at index 3 which coresponds to BRASS but the correct answer should be Titanium
im triying to work around this issue by assigning a weight to each line in the text file so when i search the index of a value that value would be unique
take into account that the lines vary in number in the original text file
could somebody help me make a programe that assignes wheights of X.01 to line one and X.02 to line two ...
-41.01 #Line_1
-20.02 #Line_2
-6.03 #Line_3
-1.04 #Line_4
-14.05 #Line_5
-6.06 #Line_6
-1.07 #Line_7
...
int_list = [41, 20, 6, 1, 14, 6, 1]

metal_list = ['aluminium', 'iron', 'zinc', 'brass', 'stainless steel','copper', 'titanium']

max_quantity = [ 100, 30, 6, 2, 18, 7, 15]

max_q_in_half = [x // 2 for x in max_quantity]

new_list = [i for i, j in zip(int_list, max_q_in_half) if i < j]

x = min(new_list)

v = int_list.index(x)
w = metal_list.__getitem__(v)

print("Current List ", int_list)

print("what is below 50%",new_list)
print('lowest value ',x)

print("position in int_list  ",v)

print("position Metal_list ",w)

Answer: You can divide the elements of the list by 2 when checking. It is better to number it when creating a list, but with the second member, so that the number does not interfere when checking for a minimum.
int_list = [41, 20, 6, 1, 14, 6, 1]
metal_list = ['aluminium', 'iron', 'zinc', 'brass', 'stainless steel', 'copper', 'titanium']
max_quantity = [100, 30, 6, 2, 18, 7, 15]

x = min([(i, n) for n, (i, j) in enumerate(zip(int_list, max_quantity)) if i < j//2])
print(x)
w = metal_list[x[1]]
print("position Metal_list ", w)

(1, 6)
position Metal_list  titanium

Comment: @AnasseGs I created a list of numbered tuples (of elements that matched the condition), where the position of the element is its "weight", as you wanted.
Comment: this is a cool and elegant solution thank you very much although i still quite don't understand what you did there
Comment: Thank you for taking the time to explain this i appreciate your kindness thank you


Can you sacrifice a creature after it has dealt damage to a creature?

Question: Let's say, I have a 1/1 saproling token, a Thallid Omnivore, and my opponent has a 1/1 token of some sort. I attacked with a 1/1 saproling token and a Thallid Omnivore, and my opponent blocks it with his 1/1. Can I then sacrifice the token after it has dealt damage to the other token so that my Thallid Omnivore gains a +2/+2 while still killing his token?
Answer: Section 510 of the comprehensive rules details the combat damage step. First, 510.1 is about assigning damage, where all attacking and blocking creatures decide where they deal combat damage and how much they deal. Then we get the following (emphasis mine):

510.2. Second, all combat damage that's been assigned is dealt simultaneously. This turn-based action
  doesn't use the stack. No player has the chance to cast spells or activate abilities between the time
  combat damage is assigned and the time it's dealt.

So no, once the game has passed to the point where you decide which creatures are eligible to deal combat damage at all, you cannot play anything until after damage has been dealt and creatures have died from it.

Historically (before the M10 core set), you would've been able to both let your token deal its damage and sacrifice it to the Omnivore, as "combat damage" was put as a single entity on the stack, and was something one could respond to just like spells and abilities.
However, even then, if you had let your token deal damage, the Omnivore would deal 3 damage. Neither in modern rules nor old would you have been able to both deal damage with the token and deal five damage with the Omnivore. In the other hand, with the old rules, you would've been able to deal damage with the token and at the same time allow the Omnivore to survive combat against a 3/3 or a 4/4. That is no longer possible.
Comment: Yup, that is why I don't think it should be added to your answer. It is just a comment on how OP's desired result might be reached (Token killing blocker *and* is sacrificed to Omnivore)
Comment: This is answer is simple, direct, and correct. But to complicate things a bit, it is possible for your token to deal damage to its blocker and then be sacrificed to buff Omnivore. To do that you will need to somehow give the token creature first strike, then you can sac it after the token has dealt damage but before it's blocker deals damage.
Comment: @Malco Sure. But that's about first strike, not about the timing of combat damage and ability activation.
Answer: No.  All damage is dealt simultaneously (barring first strike), and it doesn't use the stack, which means that creatures that have been dealt lethal damage die before you get priority and have the opportunity to activate abilities and play cards.
Historically this was not the case, but the rules were changed during the release of Core Set 2010.  Before that you could do as you described.


Reaction between magnesium and hydrochloric acid

Question: I am reacting different masses of Magnesium with hydrochloric acid to find the temperature change.
I need 2 explanations:
First of all why is the reaction exothermic?
Secondly, why does the difference in temperature increase as the mass of magnesium increases?
Answer: (1)
The reaction I think you're talking about is regarding magnesium solid and (concentrated?) HCl:
$Mg(s) + 2HCl(l) \rightarrow H_2(g) + MgCl_2(aq)$
The following are approximate bond enthalpies from this site and this site.
The bonds that would be broken are:

H-Cl single bond (x 2), $\Delta{H_{break}} = \text{+431 kJ/mol}$

The bonds that would be made are:

Mg-Cl single bond (x 2), $\Delta{H_{make}} = \text{-406 kJ/mol}$
H-H single bond (x 1), $\Delta{H_{make}} = \text{-436 kJ/mol}$

Approximately, $\Delta{H_{rxn}} = \sum{|\Delta{H_{break}}|} - \sum{|\Delta{H_{make}}|} = \text{-386 kJ/mol}$.
The reaction is exothermic because the energy absorbed in breaking bonds is smaller overall than the energy released in making bonds (and exothermic by definition is a negative enthalpy). Even though these numbers are approximate, they are clearly different enough to make such a conclusion.
(2)
The difference in temperature is related to the enthalpy. In "lab bench conditions", otherwise known as constant pressure conditions, when one performs a (coffee-cup-) calorimeter experiment to determine the change in temperature, the heat flow $q$ is essentially equal to the enthalpy $\Delta{H}$.
Recall that $q$ is often reported in $J$, joules. $q$ is an extensive property, so the more substance (in terms of mass) the process involves, the higher the magnitude of $q$ involved. Since $q$ $\alpha$ $\Delta{T}$, the more heat involved, the greater the change in temperature.
For an exothermic process, heat flows out from the reaction into the calorimeter solution, so $\Delta{T_{sys}} > 0$, i.e. the reaction releases heat into the solution, and the solution gets hotter. Note that $q_{cal} = -q_{rxn}$.
As a result, although $q_{cal} > 0$, $[q_{rxn} = \Delta{H_{rxn}}] < 0$, which has been established from (1) for this exothermic process, and when there is more $Mg(s)$ (assuming excess $HCl$), $q_{rxn}$ is larger, which corresponds to a larger $\Delta{T_{sys}}$.


Do Primordials form a new Fetish Soul after Fetish Death?

Question: I'm wondering if Primordials reform their Fetish Souls after Fetish Death? On one hand, we've got Adrian turning into Adorjan after Lilike's death and there doesn't seem to be any mention of a new Fetish. On the other hand, I've read one or two mentions of the Fetish of the king of the Yozis being ritualistically slaughtered to form Malfeas, and we currently have Ligier, the Fetish Soul of Malfeas. So I wonder - do the Primordials reform their Fetishes after the old ones die, or do they only get one Fetish that they need to keep safe?
Comment: Any edition? 1, 2, 3?
Comment: @Trish Any edition
Answer: Fetich souls don't reform per se, Fetich death throws the Primordial's entire soul hierarchy into disarray as it's lost it's core identity. A new Fetich soul will be created but it is implied that it is much more difficult to do and possibly requires the construction of an entirely new soul hierarchy to fit in line with the new identity. This alone is reason enough to keep the Fetich Soul safe.
The vast majority of Primordial/Yozi souls are left undocumented in the books and I don't recall any other Fetiches aside from Liger to be statted. The Fetich soul of the Ebon Dragon is mentioned in the Return of the Scarlet Empress but it's form, personality and power level are left entirely up to the GM.
Comment: Fetiches I've come across - Godhead (Autochton), Liger (Malfeas), Lilike (dead, Adrian), Daendels (Oramus), Ululaya (Kimbery), Kogami (Szoreny)


Show video as part of the post?

Question: I am doing a post in wordpress, but I want to put a video as part of the post. I mean, I have a paragraph but after the paragraph I want to put a video. I did put it as media, but it just shows a link and if I clic on the link it downloads the file, and I just want to play the video, not to download it. What can I do? Thanks!
Answer: When I want to embed a video on a WP post I use the html5 <video> tag. It's very simple to put into the html code and is much like the  tag. W3Schools breaks it down for dummies. Here is their sample code:
<video width="320" height="240" controls>
       <source src="movie.mp4" type="video/mp4">
       <source src="movie.ogg" type="video/ogg">
    Your browser does not support the video tag.
</video>

Answer: If the video is on the embeds list then you should be able to just paste a link and it will appear. Like this:
https://youtu.be/BjJ1A-1JKh0
You can also use a shortcode for a little more control like this:
[embed width="123" height="456"]http://www.youtube.com/watch?v=dQw4w9WgXcQ[/embed]

Show video as part of the post?


Why can't Hungary import oil from somewhere other than Russia without "ruin[ing] the Hungarian economy"?

Question: Hungary is opposing a EU proposal to cut Russian oil imports by the end of this year. Their government said that doing so would "ruin the Hungarian economy". I see that they import some 60% of their oil from Russia, but it's not too clear to me what, besides the present $35/barrel discount that Russian oil seem to presently enjoy is stopping Hungary from importing from elsewhere. Basically, is this just a price issue?
Comment: You might also want to look at Hungary's coastline and count how many harbours it has for importing oil by sea.
Comment: Crude oil is normally imported by pipeline or by sea by oil tanker. You might want to look  at Hungary's facilities for oil imports.
Comment: @gerrit: well, they're in the EU. It's not like the EU is blockading them from importing via other EU countries. Austria for instance is in the same kind of position geographically, but they are not objecting. (But Austria has nearly twice the GDP per capita.)
Comment: @gerrit: OTOH, a year later, Austria is still importing most of their gas from Russia https://www.lemonde.fr/en/europe/article/2023/03/16/austria-s-economy-remains-tied-to-russia_6019553_143.html So, not making loud noises is somewhat different from changing their main energy imports source.
Comment: And "Although Austria's Chancellor Karl Nehammer has condemned Moscow's war, he was the first EU leader to visit Putin after the invasion." https://www.politico.eu/article/austria-slow-effort-end-russia-energy-addiction/
Answer: All the refineries in Hungary (and in Slovakia) are calibrated to the Ural type of oil coming from Russia. This type is different from the Brent type of oil coming from North Sea, etc.
Adjusting the refineries to Brent oil, or building a new refinery, would take at least a few years and about 700-1000 million dollars according to experts.
Comment: This is the key point. Unlike gas (which is mostly burned for energy right away, and any sort of natural gas burns the same), crude oil is never burned directly, all of it first has to go through lots of processing. Every refinery is custom-built to work with a particular kind of oil. Switching to a lighter or heavier feed means half of your expensive refinery is idle because you don't have the feedstock for it anymore, while the other half is unable to cope with excess feed. You have to tear lots of equipment down and replace it with completely new processes, which is a massive undertaking.
Comment: The article actually talking about adjusting to Arab Light (exported from Saudi Arabia mostly) which is higher in sulphur. Another [piece](https://www.vortexa.com/insight/european-refiners-can-live-without-russian-urals) suggests that Omani or Iranian oils are a closer substitute for Urals, but they're not easily available in Europe.
Comment: @TooTea: Natural gas does have one somewhat similar problem. The nitrogen content can differ. This has become relevant with the proposed switch to LNG, which will contain hardly any nitrogen. The Dutch are building a nitrogen mixer
Answer: Ruin is relative. Hungarians would certainly take an economic hit. If you look at the oil pipelines in Europe, you can see that they are by and large going east to west, not north to south or south to north (there is a pipeline from the Med to Hungary, however). Replacing pipelines by trucks from distant ports will be expensive, and it will require trucks which might not be immediately available.
Hungary would have to balance the cost of a boycott with the cost of the pandemic, the cost of climate change, and other priorities.
Comment: @Trilarion Calling it 'playing poker' is unnecessarily derogatory. The bigger, wealthier EU countries decided that they are aiming for an embargo on Russian oil but not on gas because they can afford to replace the oil but not the gas. It so happens that Hungary can't easily replace the oil either. It is perfectly legitimate for them to be unhappy with that decision and try to negotiate some better solution for Hungary.
Comment: Romania doesn't have enough oil to export oil to every neighbouring countries. And the pipelines isn't large enough. They don't have enough capacity.
Comment: @quarague Yes, I agree that they can try to negotiate something better for them, but still this is a poker game. Russia might be a threat to Hungary too and therefore it might be a really good decision in the long term to learn to live without Russian oil. Or maybe they actually are happy with Russian waging war and have no intention of cutting off their oil supply. I didn't mean playing poker in a derogatory way, rather quite neutral. But it is also perfectly legitimate to see the actions of Hungary critically, for example seeing them as playing into Russian hands.
Comment: "other priorities" Absolutely true. Like future goodwill from the other EU countries. My guess is, Hungary just plays poker in order to get more money in compensation.
Comment: Even for the wealthier countries (notably Germany) the oil boycott does not kick in immediately, but by the end of the year.  What's being negotiated is (if I understand correctly) a longer transition phase for Hungary.
Comment: Maybe Hungary could have chat with neighboring [Romania](https://en.wikipedia.org/wiki/Petrochemical_industry_in_Romania) about importing oil from there.


PSU operational temperature

Question: What exactly happens if the operational temperature is exceeded and the psu has OTP protection ?
Does the psu stop immediately or functions but at a lower efficiency or the continuous output falls ?
Comment: Some brief searching seems to suggest when OTP is triggered, it'll turn off; it won't function at a reduced capacity.
Answer: From Coolermaster

OTP (Over Temperature Protection): Shuts down the power supply when the internal temperature exceeds the maximum safe operating temperature.

That seems pretty clear. It will simply switch off.
You very probably wouldn't want a PSU to drop to lower voltages or even ampages. That may be somewhat chaotic.
Comment: Thanks for the reply

PSU operational temperature


Is the verb auxiliary in "I do"?

Question: In the sentence "I do like mint ice cream" 'do' is an auxilliary verb.  However, if you were responding with a "I do" in a wedding vows context, is 'do' auxilliary?  It would be if you continued the line and said "I do promise", but what about when you don't?
Comment: Yes. _Do_ is an auxiliary verb in both situations. The _do_ in _I do like mint ice cream_ is emphatic and therfore stressed. The _do_ in the wedding ceremony is simply a short answer to a question that also uses [_Do_-Support](https://english.stackexchange.com/a/78591/15299), and it just repeats the auxiliary.
Comment: @JohnLawler - how about you make that an answer?
Comment: Related: https://english.stackexchange.com/a/362824/77227
Answer: When saying 'I do promise', for example, the main verb is -to promise, making the verb -to do an auxiliary, but if just saying 'I do', the only verb used is -to do, being the main verb in the sentence, not having what to assist.
Usually, when 'do' is applied before a verb - as an auxiliary - the strength is highlighted. In the same case, it is possible to use 'I promise', as well as using 'I do promise', what gives the state more confidence.
Comment: No, *I do* is short for *I do take so-and-so as my husband...* or wherever the question was. See [Lawler's comment](https://english.stackexchange.com/questions/390321/is-the-verb-auxiliary-in-i-do#comment921293_390321)

Is the verb auxiliary in "I do"?


Last modified by of custom field

Question: How can I get the last modified by, and last modified date for a custom field on a custom object in apex.
I need to display this information on front-end.
Comment: Is this for admin use, or general user use?
Comment: General use.. need to show on ui under the fields which are editable
Comment: So, you want the last time the field's definition was updated? It sounds more like you want to know the last time a particular value was updated?
Comment: @sfdcfox that's correct. I want to know the last time a particular value was updated and who updated it.
Answer: For that, you need to have Field History Tracking enabled. The general Last Modified Date audit field only shows the last time the record was updated, not individual values on the record. If you don't enable tracking, or don't log the changes yourself, you have no way to discern when the values were last updated. Please note that you can only track 20 fields, and the tracking is not retroactive, and has a limited life time (is eventually deleted). Once you've enabled it, Salesforce logs an entry in the appropriate CustomObject__History table, that shows the modification time, the old value, the new value, and who did it. To actually display the values beneath the field, you need Visualforce/Lightning Components that can query the History table and find the most recent entry for the field.
Comment: Hey, thanks so much for the detailed answer, it is really informative. The field history tracking is already enabled but still the query that I am using is not returning anything. Can you please help with some query that might work.
Comment: @Ashu Again, the table is trimmed periodically. If there were no edits since tracking was enabled, there also won't be any results. Also, history tracking does not work in unit tests, as far as I'm aware.
Answer: You can try using the query below to query for the last modified by and last modified date in your apex controller, then display them to your front-end.
Select Id, LastModifiedBy.Name, LastModifiedDate From Custom_Object__c
Comment: I need LastModified details for the custom fields and not the object.
Comment: Sorry I misread your question...
Comment: I would suggest that you enable field history tracking for your custom object. Then run the query: SELECT ParentId, OldValue, NewValue, Field, CreatedBy.Name, CreatedDate FROM CustomObject__History where Field = 'CustomField__c'. Let me know if that works.
Comment: Hey.. thanks.. I had been trying something similar too but it doesn't return anything. I tried the query that you mentioned and it is not returning anything.
Answer: Currently Field History tracking will be the Native Salesforce Solution as mentioned here before - but perhaps this is somehow limited for this requirement- if needed to track specific values change that happens on your custom VF page or Lightning comp. Maybe you should consider implementing a simple JS function on client side to have a time stamp on-change event for each tracked value and then store it on your own custom object?

Last modified by of custom field


Why do players resign after accidentally giving their opponent a free queen?

Question: Whenever I verse players in Live Chess (30 minutes) on Chess.com, sometimes I am able to threaten their queen because they brought it out too early in the game. In the opening/beginning to midgame, if I threatened their queen with a simple move, and they forgot to move it away or block the attack, and I take their queen on the next move, they resign. Why?
Answer: Material (i.e. basically who has more and better pieces) is a very important factor in the objective evaluation of a chess position. The queen is the strongest piece on the board, roughly equal to two rooks or three minor pieces (knights or bishops).
If you really drop a queen in an otherwise equal position you are going to lose 99.9% of the time. Rarely you have situations where you have compensation for being a full queen down, like for instance you have a very strong mating attack or perhaps the queen is bound to protecting a pawn from queening, etc.
If there is no such compensation it is very reasonable to resign. There is not much point (and not much fun) playing a queen down. In fact most slightly advanced players would resign being a minor piece (knight or bishop) down in otherwise normal position (no attack, etc going on).
Comment: The chance of losing is much lower against an opponent who is equally likely to blunder away *their* queen in return though. Which is why most chess trainers encourage absolute beginners to always play out their games to mate until they are not a beginner anymore. OP is probably still on that level where it makes sense to play on (gets matched with people who blunder away their queen as easily). Of course, playing a queen down is not much fun regardless.
Answer: After losing the queen for nothing, the game is essentially lost, so many players resign instead of wasting their time playing a lost position till the end. Others choose to play on, either hoping that you will blunder even worse or run out of time. People are free to choose.
Losing the queen is just one example; in general, people resign when they think the situation is hopeless.
Answer: When you lose your queen, it's a big loss. A lot of people resign because the queen is the best while other pieces need some strategic thinking. I am not saying the queen doesn't require strategy, it's just very easy to run out of situations if your Queen is in trouble, while with the bishop, for example, it is easy to be trapped if you have no idea what you're doing with it.
My suggestion to people who resign when they lose their queen
I would generally keep my queen until mid game-late game when you've done developing, when you bring out your queen early, it can easily be disengaged by pieces like pawns and knights, so I save it.
People also resign because they don't have confidence they could win without it, and I feel the same without it. If your opponent takes your queen without losing a piece of their own, it's really tough to recover from that, because the queen can essentially move anywhere. So my suggestion is save your queen unless you need to bring it out! Because a weak pawn structure or development can be chewed apart the queen if nothing is safe guarding it. For example, it's late game and you have 2 stowaway pawns, your queen will tear them apart and give you a path for a 2nd queen
Overall, they just leave because they don't feel like they can win without their Queen, so they resign. After all, it is the best piece and it isn't restricted to a single move like the bishop, it can go everywhere. Just pay attention to your queen ;)


Why can't gametes of one species fuse with that of the other species?

Question: I have read that gametes of one species cannot fuse with that of another? For example the sperm of a dog can't fuse with the ova of a cat or a horse?
Comment: You should also narrow down your question such that it is about some few species. Or at least you can restrict your question to different mammals or even better, organisms of different genera but same family; like Rats and mice or gorillas and chimpanzees, etc.
Comment: Note that it does happen and hybrid offsprings are born in case of some pairs such as lion-tiger, donkey-horse and camel-llama.
Comment: But its only some why not all ?
Comment: Do you have any initial ideas on how to explain this?
Answer: The implied subject of your question is the prezygotic barrier and is one of the possible determining mechanisms of speciation, the others being temporo-spatial (meaning different time or place), behavioral, and mechanical (the organisms don't fit together, physically).
Fundamentally, this means that gamete cells of each organism are chemically incompatible. While the details specific to each species vary, we can take a look at a few examples to illustrate the point.
In order for eggs of Arbacia Punctulata to attract sperm of the same species they secrete a specific chemoattractant peptide we call Resact (a selection of different species' chemoattractants can be found beyond the former link), which is adapted to diffuse well in seawater. Sperm then follow the chemical gradient in the direction of the egg, which is called positive chemotaxis. Resact doubles as an activating peptide for that species' sperm. Pycnopodia helianthoides starfish, which also reproduce through broadcast spawning, use an attractant we call startrak. Internally fertilized animals use roughly the same mechanism to guide sperm through the reproductive tract, though with different chemical adaptations specific to their evolutionary history.
Once the sperm reaches the egg, an acrosome reaction leads to the fusion of the two gametes into a potential zygote (for the reason why I say potential, see  Speciation by polyploidy). The chemistry of this reaction also varies between species.
In summary, the reason is this:

A change in gamete chemistry (chemotaxis, activation, reaction, adhesion) alters the chances of successful fertilization between one or more members of the same species.
Thus, the altered group reproduces more often within itself than it does with the parent group, allowing it to grow in population.
Changes in the altered group further reduce the chance of success with the parent group.
Eventually, the chances of the altered group successfully mating with the parent group are practically zero.

This process is, of course, typically assisted by one or more of the other aforementioned mechanisms. Where two species are capable of producing offspring and successfully do so, you get hybrid speciation.
Further reading

Study.com - Speciation II: Prezygotic Barriers
Recognition of Egg and Sperm
Egg and sperm recognition systems during fertilization
Comment: This example applies to only one organism (or few). OP is interested to know why this does not happen generally.


Unity, grass chunk or dynamic batching

Question: In theory would it be faster to render a lot of grass patches that would dynamicly batch or big meshes of combined patches, too big for batching? Rendering chunks should be faster because unity doesn't have to combine them and it avoids some overhead but smaller patches will make it easier for culling.
Comment: What exactly is your definition of "small" and "big" in this case? Both extremes are bad (each blade of grass an own game object vs. the whole terrain being one mesh), so the optimum must lay somewhere in between.
Comment: Patch would be about 5x5 blades and chunk 64x64
Comment: Like many questions of "which would be faster" the most surefire way to know is to test it. Make a quick & sloppy example mesh and scatter a pile of it, profile your game, and see how it compares. That way you get an answer you know is accurate for your use case and target hardware, not some internet stranger's armchair pontificating. ;)
Answer: With batching, the fastest - performance-wise - is to do your own batching that is tailor made to the problem. Built-in batching is much faster to implement, and usually not that much slower in terms of performance.
So what you do is:

Make it work. Implement it in the simplest way because simple solutions are simple to replace later.
Measure if the performance is acceptable.
2.5 If you can, estimate how much performance would increase if you made it "better"
Make a note.

Once the game is mostly done, look at all of the performance related notes, sort them to by how much estimated performance gain per development work they will yield, and then decide which one you want to work on.
To answer your actual question:
Either can be faster, depending on additional technical details, such as how big the patches will be on screen, and how complex the vertex and pixel shaders are, respectively.

Unity, grass chunk or dynamic batching


How much noise is necessary to disrupt the connection of a comlink?

Question: The core rulebook says how noise influences matrix actions that have a dicepool but not about actions that do not use a dicepool. E.g. when I want to make a call how much noise is necessary to block the call? Would noise from distance be taken into consideration especially with a long distance call?
Comment: +1 what @gatherer818 said, should post it as an answer. Looking at the noise numbers, I will opt for the double rating version, since simple rating would become quickly down (dense foliage gives 1 noise for 5 meters)
Comment: @CorvenDallas I think you are absolutely right. If you would go by RAW than that would imho mean that a metalink could not work in downtown Seatle which sounds silly to me. Thank you for your input I will probably create a similar house rule.
Answer: Found it.
Page 421 in my PDF of the Corebook:

If there is a Noise Rating from a situation that is greater than the item's Device Rating, not including distance, the item temporarily loses its wireless functionality (see Noise, p. 230)

So yeah, your super-cheap R1 Commlink loses connection if you're just 5 meters into the bush, while an R6 Commlink holds steady two-and-a-half stories underground.
Comment: Great answer, but I think I would use double rating in my games, is a bit non-sense so low power. Great job finding the right RAW answer @gatherer818!


How can I know when it's safe to uninstall my i386 packages (on an amd64 system)?

Question: I use GNU/Linux Mint 18.1 on an amd64/x86_64 processor. I have a bunch of i386 packages installed - 250 of them to be exact. Up until today I knew I need some/most of them, since I had 32-bit Skype installed. But now I've installed the 64-bit version, so I'm wondering - can I uninstall those i386 packages? Or rather - how can I tell whether I really need any of them or not?
Answer: The package manager will usually complain if you try to remove a dependency of another package or program.
Read carefully what it says when it asks if you're sure about removing anything.
Comment: I've expanded on this answer... see below. But +1 anyway.
Answer: Unless you've specifically installed some 32-bit package (which would also have dependencies etc.) - it's likely that all 32-bit/i386 packages can be removed. As @Mioriin suggested, if you try to remove them using apt-get remove, you'll get a complaint if anything depends on them.
For caution's sake, first do the following:
apt-get install -f

in case something is broken and needs fixing. Then execute:
dpkg-query -l | grep "^i.* i386   " | less

and review the list of relevant packages. See if there's something you recall explicitly installing specifically as an i386/32-bit package. If not - proceed to try and remove them with:
apt-get remove $(dpkg-query -l | grep "^i.* i386   " | cut -c5- | cut -d\  -f1)

(the weird piped commands are for extracting just the package name; I think this can be done better using just dpkg-query switches.)
Caveats:

It's theoretically possible but extremely unlikely that some package will have the string " i386    " in its description; unlikely enough to ignore
If you have packages which are half-installed or in other states other than ii (see man dpkg-query for details), this might not work for you
Comment: The space is also preventing it from matching, e.g., linux-image-i386 (were such a package to exist). As for apt-mark, the advantage is that apt-get remove will try to additionally remove any packages that depend on the i386 packages, whereas marking the autoinstalled (then using autoremove) will only remove them if nothing declares a dependency on them.
Comment: FYI: Package names aren't allowed to contain spaces, so " i386 " can't occur in one. Not just unlikely, it's disallowed. BTW: Might want to consider using `apt-mark` to mark them as autoinstalled, then let autoremove remove ones that aren't needed.
Comment: @derobert: The space is for the listing, which contains the platform and the discription. As for `apt-mark` - what's the benefit in using that, as opposed to just apt-get removing the packages?
Comment: @derobert: Will edit my answer accordingly (soon).


PCB, pads with holes but with different nets on top and bottom sides

Question: I need pads with holes in by PCB, but the top and bottom side of the pads need to have different nets i.e. the top and bottom sides must be isolated. Here is the picture
Is this possible to fabricate for the PCB manufacturers? If yes, how do I design this in Altium?
Comment: I've reread the question a few times, and see what you're wanting. What exactly is the point of doing this?
Comment: It sounds like you're planning to solder the shield to one side of the board and the inner conductor to the other, which basically sounds like an assembly (and reliability) nightmare. Have you considered simply bringing the pads to the edge of the board (no holes) and soldering them there? I have actually seen something like this done in certain cable assemblies.
Comment: Interesting question. If you were to make your own double sided PCB, this would be the default state - vias not plated through. I believe it's the hole drill order. Drill X holes, then plate, then drill the remaining.
Comment: @carveone But vias have pads with same net in all layers, this one does not.
Comment: Yes. That's true - you would get errors by doing that. I was just thinking about the manufacturing process more than the PCB design process!
Comment: @MattYoung Many coaxial wires in small area
Comment: @DaveTweed You are right. But I have many rows of pads. I cannot bring all the pads to the edge. Thanks for the suggestion though
Comment: @DaveTweed - Not so. This can be a very reliable way to attach wires to a space constrained PCB. We often use a via that snugly fits the wire insulation, poke the wire through, and solder it on the other side. Pretty robust.
Answer: I don't see any reason why you can't create a footprint with overlayed pads on top and bottom going to different pins. Just specify the hole as unplated. If you avoid drilling one of the holes (make it an SMT pad) you may be able to avoid all DRC errors with little fuss (otherwise it may complain that the two drilled holes have insufficient clearance).
Altium definitely understands that pads on top of each other separated by an unplated hole are not connected.
Edit: It only seems to understand this when the unplated hole is part of a single pad. Otherwise it thinks they are connected, even with an unplated hole.
I tried this with a simple pad on the top and a multilayer on the bottom, unplated hole and padstack edited to have copper only on the bottom and there is still a short circuit error in the DRC check, despite the unplated hole. The 3D view shows that the copper is not there, so Altium's DRC is not picking up on it.
Comment: Regarding your fab question, there may be some that don't do unplated holes or charge a premium, but all the places I deal with have no problem with it. The default for the output job is to combine both hole types in a single drill file with comments ;TYPE=PLATED and ;TYPE=NON_PLATED in the tool list.
Comment: I think you should change the rules to make the errors go away except for a possible warning of unplated holes. There is some weirdness associated with this kind of thing- the polygon pours don't like it, for example. Take extreme caution and look at the Gerber files and 3D view before sending it off would be my advice..
Comment: Yes, I will ask the PCB mfr. before ordering. For the footprint, I placed SMD pads on top and bottom layers and placed a hole on them. Now I get _Short-circuit Constraint_ and _Clearance Constraint_ errors in DRC between the pads and the hole. Can I ignore these errors?
Comment: Okay, another thought came to me- making the component a "net tie" (in the schematic symbol) marks it so that the only DRC comment is a warning about unverified net ties (no errors). Autoroute even works. However, polygon pours still improperly avoid the pads, so caution is called for.
Answer: In addition to the other answers, regardless of what you can do in your software, you may have trouble when you go to have your board fabbed. Some shops interpret copper at the edge of, or under a hole as being a plated hole. OSHPark for example does things that way. You'll have to be careful to ensure that the copper layers don't intersect the edges of the hole, and leave a teensy tiny margin.
If the fab has a different system of indicating which wholes are plated and which aren't, then you're home free.
Otherwise, you could put a hole much smaller than what you need in the spot, ignore the plating, and ream it out up to size yourself.
Answer: I'll add that in Eagle you can add mounting holes which have no electrical connection between the different layers in a board or in a package.
HOLE - Function Add drill hole to a board or package.
Board houses can do this but you should check with them before ordering.
Answer: That is basically an unplated hole drilled through two suface-mount pads. Yes, it is possible to fabricate but may be for additional cost, because it is done in separate manufacturing step. From what i have seen this will leave bare copper on sides of the hole (not a big deal).
In Altium, it will probably cause DRC errors which you can ignore.


How To Send Cash To BTC-e, Crypto-Trade

Question: I have bee scouring on how to fund accounts in captioned exchanges from the US-preferably with a credit card or even paypal where possible, I suppose no online sites would do ACH confirmations type transactions. I have noticed some of online sites don't want to deal with us on this side of the pond. What ways are some you using to fund your accounts?
Answer: Most exchanges which support USD exchange will be funded via international wire. Depending on your bank these charges can be between 10-50USD.
If your transferring from a different currency the rate given on conversion is better than if you were to purchase USD in cash from your high street but lower than spot on forex markets.
ACH / domestic transfers will come when domestic (to you) exchanges build more solid relationships with banks when more regulation comes in place.
Trading with locally on places like localbitcoins is the best bet if the percentage in fees is larger than 5% of the amount you plan to buy. This is a good rule of thumb.
Answer: Don't send cash to BTC-e.com. They're horrible and are having serious issues with fiat transfers. I recommend only moving coins in and out of btc-e.com.
My personal favorite is using localbitcoins.com to buy coins in cash. Send those bitcoins to your btc-e.com and trade away! In the past, I have also used Dwolla/MtGox as a way of transfering fiat from my US bank account into bitcoins. Good luck!

How To Send Cash To BTC-e, Crypto-Trade


Writing or to write?

Question: "Peter is very good at (  ) stories" .
I chose 'to write' to fill ()but correct answer was 'writing'.
Can anyone explain why 'to write' was wrong and 'writing' is correct?
Comment: Have you searched the Internet for "gerund or infinitive"? You'll find a lot of answers there
Answer: Some verbs only take a gerund as an object, such as write, keep, finish, practice, quit and recommend.

Peter is very good at writing stories.

Some verbs only take an infinitive as an object, such as ask, agree, demand and hope.

Peter agreed to write the story for homework.

Other verbs can take either, without a difference in meaning, such as like, love, hate and remember.

Peter likes to write stories.
Peter likes writing stories.

Still others can take either, but have a difference in meaning, such as forget, remember and stop.

Peter stopped writing stories.
Peter stopped to write a story.

Unfortunately, you're just going to have to learn which category a verb falls into through reading, listening and practicing.
Answer: At is a preposition. As far as I know, a preposition cannot be followed by to + infinitive. Rather, it must be followed by a gerund (the -ing form). Let's consider similar constructions and see how the choice of verbs is irrelevant:

He sucks at swimming.
He excels at cooking.

And now some other prepositions:

He always coughs after running.
You can't make an omelet without breaking a few eggs.

So we do not have to memorize a long list of verbs to understand this particular rule.
You can find more examples at Grammaring and voanews, among other sites.

Writing or to write?


Why don't integrated gradients explain samples correctly?

Question: I have a linear tabular dataset made of floats. The dataset follows a simple rule like:
<code>if features A and B are in a certain range then target class is 1, otherwise target class is 0.
</code>
Since I want to get some interpretability from my ANN model, I opted for using the integrated gradients method implemented by alibi.
Unfortunately, most of individual samples don't show A and B as the leading features as expected. Even more weird is the fact that, when I average the attributions of all the individual samples, A and B get the highest score. In other words, local explanations fail but, on average, the global explanation is correct.
Can anyone help me out to understand why this happens? Isn't integrated gradients method suitable for tabular datasets?
By the way, my baseline is based on a uniform distribution of random floats ranging from 0 to the maximum of each column.
Answer: After several tests, I've opted for the following configuration:
Approximation mode: riemann trapezoidal
Steps: 1000
Baseline: average mean of each column (feature)
Although the global score remains good, there're important variations in the number of correctly explained local samples. For example, an execution returns 200 out of 390 samples explained as expected, but the following execution only 17.
Is there a reason for that? And, is there a way to make the algorithm predictable?


ISP provider does not giving permission to change my router password

Question: We have got a new connection from a local ISP provider, the provider supplied a router and other few devices, then he has configured the device with a password, but he does not allow us to reset or change the password for own. means we are unable to configure anything from our side, Is this good secure for our personal data?
Comment: I have reset such routers to defaults and reconfigured them.
Answer: No.
It means that your ISP provider can basically control your network. Change DHCP ranges, control port forwarding etc.
In a business situation, with sufficient contractual assurances, this might be possible. After all, some companies even outsource their complete IT.
In a personal situation, I would take a small SoHo router and connect only the WAN port to the ISP provider's router.
Answer: No it is not secure because you cannot access the configuration on the device, it could be a weak password with remote management enabled. Also, how can you do firmware updates without administrative access?  I recommend buying your own router and setting it up. Also if you don't want to buy your own router, there should be a small round hole with a button inside of it on the back or bottom of the router which allows you to factory reset the device. Using a small needle or wire you can depress this button while the device is turned on, it will reset and you can search online for the default credentials and configure the device yourself with your own password.
Comment: I think this answer neglects the fact that, ultimately, the ISP is the one in control here.  In particular, some ISPs set things up so that the router uses a stored username and password to connect to the ISP itself.  In such a case resetting the router will cause it to completely lose internet access until the ISP is called to fix the situation.  In essence, attempting to "take control" of the device will probably create more problems than it solves.
Answer: Probably not secure, but I would say there's not enough information to answer this question.
You inherit whatever level of security they provide. If they offer any kind of threat-based protection, that's a plus. If they manage firmware updates to prevent or stop attacks like VPNFilter, that's a plus.
On the other hand, if they use a common admin password across all devices, fail to patch them, and deploy an insecure configuration then that's a huge problem.
So the question is: What do they offer? Are they good enough to deliver that?


Non-Recursive Merge Sort

Question: Can someone explain in English how does Non-Recursive merge sort works ?
Thanks
Comment: While bobbymcr provides a good answer, also note that recursion and iteration are formally equivalent.  See http://stackoverflow.com/questions/159590/way-to-go-from-recursion-to-iteration
Comment: Take a look at http://stackoverflow.com/a/23695092/3315914
Answer: Non-recursive merge sort works by considering window sizes of 1,2,4,8,16..2^n over the input array. For each window ('k' in code below), all adjacent pairs of windows are merged into a temporary space, then put back into the array.
Here is my single function, C-based, non-recursive merge sort.
Input and output are in 'a'. Temporary storage in 'b'.
One day, I'd like to have a version that was in-place:
<code>float a[50000000],b[50000000];
void mergesort (long num)
{
    int rght, wid, rend;
    int i,j,m,t;

    for (int k=1; k < num; k *= 2 ) {
        for (int left=0; left+k < num; left += k*2 ) {
            rght = left + k;
            rend = rght + k;
            if (rend > num) rend = num;
            m = left; i = left; j = rght;
            while (i < rght && j < rend) {
                if (a[i] <= a[j]) {
                    b[m] = a[i]; i++;
                } else {
                    b[m] = a[j]; j++;
                }
                m++;
            }
            while (i < rght) {
                b[m]=a[i];
                i++; m++;
            }
            while (j < rend) {
                b[m]=a[j];
                j++; m++;
            }
            for (m=left; m < rend; m++) {
                a[m] = b[m];
            }
        }
    }
}
</code>
By the way, it is also very easy to prove this is O(n log n). The outer loop over window size grows as power of two, so k has log n iterations. While there are many windows covered by inner loop, together, all windows for a given k exactly cover the input array, so inner loop is O(n). Combining inner and outer loops: O(n)*O(log n) = O(n log n).
Comment: As much fun as making things painful to understand by compacting your code I think you'll find most employers would rather have code that's more human readable instead of you showing off how much you can get done in one line. I would recommend moving the j++ and m++ lines to separate lines and perhaps using some comments if not more meaningful variable names. And using consistent whitespace between your assignments.

Unless you're adding trailing whitespace everyone likes code that's easy on the eyes. Disk space is never a problem, it all compiles the same. Convoluted code is the devil. :P
Comment: You could make the code substantially simpler by combining some of the lines, like `b[m++]=a[i++];` for `b[m]=a[i]; i++; m++;`.
Comment: @Raishin most employers look for smart programmers.
Comment: i was trying a similar approach here http://stackoverflow.com/questions/37366365/iterative-non-recursive-merge-sort?noredirect=1#comment62245719_37366365
but am not able to figure out how to handle input sizes not in form of 2^x, any help ?
Comment: This code greatly suits an NVIDIA OptiX program where recursion is not allowed.
Answer: Loop through the elements and make every adjacent group of two sorted by swapping the two when necessary.
Now, dealing with groups of two groups (any two, most likely adjacent groups, but you could use the first and last groups) merge them into one group be selecting the lowest valued element from each group repeatedly until all 4 elements are merged into a group of 4. Now, you have nothing but groups of 4 plus a possible remainder. Using a loop around the previous logic, do it all again except this time work in groups of 4. This loop runs until there is only one group.
Comment: Mergesort *can* be done in-place, but it is generally "hard" to do this.
Comment: Ah you are talking about mergesort as opposed to bottom-up mergesort
Comment: I m asking about non recursive merge sort which bottom-up is non recursive merge sort.
Comment: How are arrays of odd length divided? It seems like the very last element might never be sorted.
Comment: The one on Algorithmist doesn't look to hard. However you'll lose some locality if you are sorting a dataset too large to fit in memory
Answer: Quoting from Algorithmist:

Bottom-up merge sort is a
  non-recursive variant of the merge
  sort, in which the array is sorted by
  a sequence of passes. During each
  pass, the array is divided into blocks
  of size m. (Initially, m = 1).
  Every two adjacent blocks are merged
  (as in normal merge sort), and the
  next pass is made with a twice larger
  value of m.
Comment: Yes, every kind of mergesort is n log(n).
Answer: Both recursive and non-recursive merge sort have same time complexity of O(nlog(n)). This is because both the approaches use stack in one or the other manner.
In non-recursive approach
   the user/programmer defines and uses stack
In Recursive approach stack is used internally by the system to store return address of the function which is called recursively
Comment: Because merge sort always does its partitioning and sorting operations in the same sequence, regardless of the initial ordering of items in the data set, there's no need to use a stack to keep track of the next operation.  All one needs is the size of the known-to-be-sorted partitions (`part_size`, initially 1) and the index of the first such partition to be merged (`next_part`, initially zero).  For each "step", merge partitions of size `part_size` starting at `next_part` and `next_part+part_size`, then bump `next_part` by `part_size*2`.  If that would fall off the end of the array,...
Comment: ...double `part_size` and set `next_part` to zero.  No need for recursion.
Answer: The main reason you would want to use a non-recursive MergeSort is to avoid recursion stack overflow.  I for example am trying to sort 100 million records, each record about 1 kByte in length (= 100 gigabytes), in alphanumeric order.  An order(N^2) sort would take 10^16 operations, ie it would take decades to run even at 0.1 microsecond per compare operation.  An order (N log(N)) Merge Sort will take less than 10^10 operations or less than an hour to run at the same operational speed.  However, in the recursive version of MergeSort, the 100 million element sort results in 50-million recursive calls to the MergeSort( ).  At a few hundred bytes per stack recursion, this overflows the recursion stack even though the process easily fits within heap memory.  Doing the Merge sort using dynamically allocated memory on the heap-- I am using the code provided by Rama Hoetzlein above, but I am using dynamically allocated memory on the heap instead of using the stack-- I can sort my 100 million records with the non-recursive merge sort and I don't overflow the stack.  An appropriate conversation for website "Stack Overflow"!
PS: Thanks for the code, Rama Hoetzlein.
PPS: 100 gigabytes on the heap?!!  Well, it's a virtual heap on a Hadoop cluster, and the MergeSort will be implemented in parallel on several machines sharing the load...
Answer: I am new here.
I have modified Rama Hoetzlein solution( thanks for the ideas ). My merge sort does not use the last copy back loop. Plus it falls back on insertion sort. I have benchmarked it on my laptop and it is the fastest. Even better than the recursive version. By the way it is in java and sorts from descending order to ascending order. And of course it is iterative. It can be made multithreaded. The code has become complex. So if anyone interested, please have a look.
Code :
<code>    int num = input_array.length;
    int left = 0;
    int right;
    int temp;
    int LIMIT = 16;
    if (num <= LIMIT)
    {
        // Single Insertion Sort
        right = 1;
        while(right < num)
        {
            temp = input_array[right];
            while(( left > (-1) ) && ( input_array[left] > temp ))
            {
                input_array[left+1] = input_array[left--];
            }
            input_array[left+1] = temp;
            left = right;
            right++;
        }
    }
    else
    {
        int i;
        int j;
        //Fragmented Insertion Sort
        right = LIMIT;
        while (right <= num)
        {
            i = left + 1;
            j = left;
            while (i < right)
            {
                temp = input_array[i];
                while(( j >= left ) && ( input_array[j] > temp ))
                {
                    input_array[j+1] = input_array[j--];
                }
                input_array[j+1] = temp;
                j = i;
                i++;
            }
            left = right;
            right = right + LIMIT;
        }
        // Remainder Insertion Sort
        i = left + 1;
        j = left;
        while(i < num)
        {
            temp = input_array[i];
            while(( j >= left ) && ( input_array[j] > temp ))
            {
                input_array[j+1] = input_array[j--];
            }
            input_array[j+1] = temp;
            j = i;
            i++;
        }
        // Rama Hoetzlein method
        int[] temp_array = new int[num];
        int[] swap;
        int k = LIMIT;
        while (k < num)
        {
            left = 0;
            i = k;// The mid point
            right = k << 1;
            while (i < num)
            {
                if (right > num)
                {
                    right = num;
                }
                temp = left;
                j = i;
                while ((left < i) && (j < right))
                {
                    if (input_array[left] <= input_array[j])
                    {
                        temp_array[temp++] = input_array[left++];
                    }
                    else
                    {
                        temp_array[temp++] = input_array[j++];
                    }
                }
                while (left < i)
                {
                    temp_array[temp++] = input_array[left++];
                }
                while (j < right)
                {
                    temp_array[temp++] = input_array[j++];
                }
                // Do not copy back the elements to input_array
                left = right;
                i = left + k;
                right = i + k;
            }
            // Instead of copying back in previous loop, copy remaining elements to temp_array, then swap the array pointers
            while (left < num)
            {
                temp_array[left] = input_array[left++];
            }
            swap = input_array;
            input_array = temp_array;
            temp_array = swap;
            k <<= 1;
        }
    }

    return input_array;
</code>
Answer: Just in case anyone's still lurking in this thread ... I've adapted Rama Hoetzlein's non-recursive merge sort algorithm above to sort double linked lists. This new sort is in-place, stable and avoids time costly list dividing code that's in other linked list merge sorting implementations.
<code>// MergeSort.cpp
// Angus Johnson 2017
// License: Public Domain

#include "io.h"
#include "time.h"
#include "stdlib.h"

struct Node {
    int data;
    Node *next;
    Node *prev;
    Node *jump;
};

inline void Move2Before1(Node *n1, Node *n2)
{
    Node *prev, *next;
    //extricate n2 from linked-list ...
    prev = n2->prev;
    next = n2->next;
    prev->next = next; //nb: prev is always assigned
    if (next) next->prev = prev;
    //insert n2 back into list ...
    prev = n1->prev;
    if (prev) prev->next = n2;
    n1->prev = n2;
    n2->prev = prev;
    n2->next = n1;
}

void MergeSort(Node *&nodes)
{
    Node *first, *second, *base, *tmp, *prev_base;

    if (!nodes || !nodes->next) return;
    int mul = 1;
    for (;;) {
        first = nodes;
        prev_base = NULL;
        //sort each successive mul group of nodes ...
        while (first) {
            if (mul == 1) {
                second = first->next;
                if (!second) {
                  first->jump = NULL;
                  break;
                }
                first->jump = second->next;
            }
            else
            {
                second = first->jump;
                if (!second) break;
                first->jump = second->jump;
            }
            base = first;
            int cnt1 = mul, cnt2 = mul;
            //the following 'if' condition marginally improves performance
            //in an unsorted list but very significantly improves
            //performance when the list is mostly sorted ...
            if (second->data < second->prev->data)
                while (cnt1 && cnt2) {
                    if (second->data < first->data) {
                        if (first == base) {
                            if (prev_base) prev_base->jump = second;
                            base = second;
                            base->jump = first->jump;
                            if (first == nodes) nodes = second;
                        }
                        tmp = second->next;
                        Move2Before1(first, second);
                        second = tmp;
                        if (!second) { first = NULL; break; }
                        --cnt2;
                    }
                    else
                    {
                        first = first->next;
                        --cnt1;
                    }
                } //while (cnt1 && cnt2)
            first = base->jump;
            prev_base = base;
        } //while (first)
        if (!nodes->jump) break;
        else mul <<= 1;
    } //for (;;)
}

void InsertNewNode(Node *&head, int data)
{
    Node *tmp = new Node;
    tmp->data = data;
    tmp->next = NULL;
    tmp->prev = NULL;
    tmp->jump = NULL;
    if (head) {
        tmp->next = head;
        head->prev = tmp;
        head = tmp;
    }
    else head = tmp;
}

void ClearNodes(Node *head)
{
    if (!head) return;
    while (head) {
        Node *tmp = head;
        head = head->next;
        delete tmp;
    }
}

int main()
{
    srand(time(NULL));
    Node *nodes = NULL, *n;
    const int len = 1000000; //1 million nodes
    for (int i = 0; i < len; i++)
        InsertNewNode(nodes, rand() >> 4);

    clock_t t = clock();
    MergeSort(nodes);    //~1/2 sec for 1 mill. nodes on Pentium i7.
    t = clock() - t;
    printf("Sort time: %d msec\n\n", t * 1000 / CLOCKS_PER_SEC);

    n = nodes;
    while (n)
    {
        if (n->prev && n->data < n->prev->data) {
            printf("oops! sorting's broken\n");
            break;
        }
        n = n->next;
    }
    ClearNodes(nodes);
    printf("All done!\n\n");
    getchar();
    return 0;
}
</code>
Edited 2017-10-27: Fixed a bug affecting odd numbered lists
Answer: Any interest in this anymore? Probably not. Oh well. Here goes nothing.
The insight of merge-sort is that you can merge two (or several) small sorted runs of records into one larger sorted run, and you can do so with simple stream-like operations "read first/next record" and "append record" -- which means you don't need a big data set in RAM at once: you can get by with just two records, each taken from a distinct run. If you can just keep track of where in your file the sorted runs start and end, you can simply merge pairs of adjacent runs (into a temp file) repeatedly until the file is sorted: this takes a logarithmic number of passes over the file.
A single record is trivially sorted: each time you merge two adjacent runs, the size of each run doubles. So that's one way to keep track. The other is to work on a priority queue of runs. Take the two smallest runs from the queue, merge them, and enqueue the result -- until there is only one remaining run. This is appropriate if you expect your data to naturally start with sorted runs.
In practice with enormous data sets you'll want to exploit the memory hierarchy. Suppose you have gigabytes of RAM and terabytes of data. Why not merge a thousand runs at once? Indeed you can do this, and a priority-queue of runs can help. That will significantly decrease the number of passes you have to make over a file to get it sorted. Some details are left as an exercise for the reader.

Non-Recursive Merge Sort


"Rambam In Context" Sefer

Question: Is anyone aware of a Sefer which traces the psokim of the Rambam to their source in the Gemoro together with providing the necessary background and other varying halachic opinions? In other words a Sefer which presents the halacha of the Rambam in context with the general Talmudic and Halachic picture of the particular sugya.
Comment: Isn't that what the traditional נושא כלים endeavor to do? Or even more modern commentaries like R. Qafih?
Comment: @NochieWolf Goodluck. Let us know if you find anything
Comment: I'm looking for an all-in-one more modern and easy to read styled book
Comment: related: [Recommendation for edition of Mishne Torah with sources](https://judaism.stackexchange.com/q/91519/11501)
Answer: The classical commentators (Kesef Mishne, Magid Mishne, Radbaz, Migdal Oz) all aim to do what you ask for. The result is complex to read/understand and takes a lot of space (my classical edition takes 8 large volumes and half a standard IKEA bookshelf). But working your way through them with a learned Rav is the best way to understand the incredible work the Rambam did to elucidate a sugya and structure the halacha in such a clear way.
Modern editions of the Mishne Torah can also be helpful to understand the context

R Adin Steinsaltz's edition of the Rambam brings the source in Shulchan Aruch/other aharonim for every halacha and explains all difficult words. It is for now in Hebrew only but there are plans to translate it
R Eliyahu Touger's translation into English (available online) is excellent, the endnotes are extremely valuable and probably the best 'commentary' available in English
The Mishne Torah Project's Rambam is also excellent, and has a commentary which connects the halachot of the Rambam to other sources in the Rambam himself (e.g., his commentary of the Mishna) with footnotes linking halachot to their talmudic sources. It exists in Hebrew (in book format and digital)
Answer: Besides a good answer from mbloch, I would add

Rambam Leam a great source which brings the source and context for each halacha in a simple and straightforward language. I don't think as good though with bringing sources from halacha, Rambam Hamevor, the English Rambam from Rabbi Touger, and Steinsaltz's Rambam all do a good job bringing the halacha.

(To get an idea of Rabbi Touger's translation see here where it has his english translation, but only some books have his amazing footnotes.)

Rambam Hamevoar: They are in the middle of printing this series, and have printed about 6 sefarim of the Rambam so far. However, it is a truly amazing piece of work, much more elaborate than Rambam Leam, so it may be a better option, depending on how in depth you want to learn. They bring every Gemara in detail and also have and הלכה למעשה section. I've heard people call this the "Artscroll Rambam" (not that Artscroll made it but that they have done a great job like Artscroll did on their gemara.)

Rambam Leam

Rambam Hamevoar

"Rambam In Context" Sefer


'top' shows Java program using more memory than Java profiler shows

Question: What are the possible causes for when the Linux top command shows a Java process is using 14GBs of memory while Java profiling shows only 2GBs being used?
Comment: You can change this by supply xms related parameters when run java. BTW, i think they are talking different things: the memory jvm used/reserved and java application used.
Comment: The second picture of the Java profiler shows it has only allocated 2.1GB heap size, so xms should not matter.
Comment: You are right, I mean startup parameters will change top's result.
Answer: That means that your JVM / Java application is using off-heap memory.  Lots of it.

It could be memory-mapped files.
It could be native libraries: unlikely ... for that much memory.
It could be memory allocated by native library (e.g. using malloc).
It could be huge numbers of Java threads, or threads with huge thread stacks.
It could be something else ...

It might be a memory leak of some kind, but it is not a memory leak of heap objects.
(The theory that it is due to -Xms is probably wrong.  If the JVM preallocated a huge initial heap and didn't use it, you wouldn't expect that much "RES" memory.  It is conceivable that the heap has gotten really big and has down-sized, but the JVM hasn't (yet) given the space back to the OS.  But AFAIK the JVM releases the memory back to the OS when it downsizes the heap.)
If you are going to get to the bottom of this, you will need to understand what your application, and its library dependencies are doing.
Answer: Your total memory is a result heap, PermSize and Stack size.
Max memory = [-Xmx] + [-XX:MaxPermSize] + number_of_threads * [-Xss]

Besides this JVM would also need some space to run smoothly. Explained here in deatil
Comment: That formula doesn't take account of the *other* things that can use a substantial amount of memory in a JVM.  The article where you got it from tacitly acknowledges that.


Does current in a conductor produce changing magnetic field?

Question: Current is flow of charge. So if charge is moving, electric field is changing. So changing electric field should produce changing magnetic field, but I am not able to see how magnetic field is changing around a wire carrying current. For a given radius magnetic field is constant around a wire. Please let me know what am I missing in my understanding.
Comment: Electric field that changes with time creates a magnetic field which changes in space, not in time. The magnetic field generated at a particular position will be constant.
Answer: Current is the rate of flow of charge. Which means that it is the amount of charge passing through the cross section of the wire per unit time. The current therefore remains constant as the amount of charge passing through the cross section of the wire per unit time remains constant. Electric field changes with the change in current. As there is no change in the current in the wire, it produces a constant magnetic field. If however the current in the wire would vary with time, it would produce a varying magnetic field.


How many pt's is 1,5 line spacing in Microsoft Word 2007?

Question: Sometimes I need to manually enter pt's and I want it look the same as 1,5 line spacing. How many pt's is it?
Comment: Doesn't this sort of depend on the font? One single line would likely be the height of the font in points and depends on the font, whereas points is an arbitrary measure of 72 points to the inch (1 point = 1⁄72 inches = 25.4⁄72 mm = 0.3527 mm)
Comment: @camster342 argh I made mistake i meant 1.5 line spacing, or it's also depend on font?
Answer: As camster said, it is impossible to give you an answer as it is directly dependent on the font and size of the font you are using.
If you need to enter one and a half lines of space, consider using maths - e.g. if your font is 20, enter a new line and set it to 30, then another line of normal!
(p.s. you may want to check(and disable) normal line spacing as you will have a gap above and below the new/blank line).
Answer: The amount of leading varies depending on which font you are using (not all 12-point fonts are equal). Typically, single-spaced lines range from 110% to 135% of the font size. For example, let's say you select Times New Roman, a font that is common in legal documents. If you set the font size at 12 points and apply single spacing, the true height of your lines of text will be roughly 115% to 120% of the point size, or 13.8 to 14.4 points.
see this link
http://compusavvy.wordpress.com/2010/08/01/understanding-line-and-paragraph-spacing-in-word/


Countably generated group has at most countably many finite index subgroups

Question: I know that if $G$ is a finitely generated group, then $G$ has at most countably many finite index subgroups. Is this result still true if $G$ is countably generated?
Answer: No. For example, let $G$ be the additive group of sequences $(a_n)$ of elements of $\mathbb{Z}/2\mathbb{Z}$ such that $a_n=0$ for all but finitely many $n$.
Then for each of the uncountably many non-zero sequences $(b_n)$ of elements of $\mathbb{Z}/2\mathbb{Z}$ (with possibly infinitely many non-zero $b_n$), there is a subgroup
$$\left\{(a_n):\sum a_nb_n=0\right\}$$
of $G$ of index $2$.
Comment: By the way, another (arguably more natural but less elementary) counterexample is the free group on countably many generators, which has uncountably many homomorphisms to $\mathbb{Z}/2\mathbb{Z}$, and therefore uncountably many subgroups of index $2$.
Comment: I didn't read the question carefully enough. Nice counter-example!
Comment: @JeremyRickard : From the less elementary point of view, your "arguably" word is the correct one, since when one considers the abelian group case (i.e. $\mathbb Z$-modules), the first types of modules one can think about are the easiest i.e. the free ones. I do agree with your comment


Is it necessary for a letter of recommendation to include the full name of the candidate?

Question: I'm applying for Colleges for my MSc. But all of my letters of recommendation address me by my first name. is it okay, or should the complete name of the candidate be included?
Answer: Letters of recommendation are proper documents, and as such they must include candidate's full name at least once. It is often included in the first sentence, e.g.

It is my pleasure to write this letter of reference in support of Mr Ice Dune's application to the College of Crafts and Wizardry.

The following text can refer to the Candidate by the first name.
Comment: Agree and I used to include the Date of Birth as some names are common - **never** had a student query it either.
Answer: It's fine.  Just make them physical or electronic attachments and mail the stuff in.  Don't bug your references with this clerical pettiness.  Grad programs won't fuss.