Late Small Casino Tournament play

Question: So this may be easy or simple but ya never can be sure sometimes when it's your play. I have only 3.5 bb and that's about average stack at level 8. No real room to play but still...open for min raise 16k in mid position leaving about 13k behind. QQ goes all in for 40k in SB. I'm now committed of course and holding...does it matter? Should I have just folded A8 off and waited for..? Bad or weak play? Thanks all
Comment: I did for whatever reason but figured it's the same as all in.
Comment: We are 7 handed and three tables left btw
Answer: With just 3.5 big blinds left, your only options are push or fold - there's no point in min-raising with the plan of  folding if you're re-raised. You need to get lucky fast and first-in, any ace is fine to push with.
Is the average stack really 3.5 BB with 21 players left? If so, I hope you didn't pay any money to enter such a poorly structured tournament!
Comment: Thanks for that..absolutely a bad structured tourney, basically gambling and a ton of luck needed. It was 40 with the add on to chop for 350 or so. Folding doesn't seem good but that min raise isn't either I guess
Answer: You are mid position, 7 handed, with 3.5 bb
bb 8k - you have exactly 29k (actually 3.625 bb)
You are 2 1/2 orbits from be blinded out
Time to make a stand - you are all in or fold
Any ace first in is a push
Any two paint first in is a push
Any pair is push
In the blind even call an all in with a lone ace
You don't have the luxury of a best of it.  If you can get you money in with even a dog with a positive EV then that is good money.
With just a min raise you are (well should be) pot committed but you are not getting fold equity.
You gave the bb 3.5 : 1 pot odds to call
Even if the bb put you on KK or AA they were almost getting the 4:1 odds to call
Even the sb was getting pot odd to call two overs
A min raise of 2.5 bb is there for a reason - at least it might have chased off 85
At QQ it is a not brainier for the bb to push
Now lets look at your pot odds to call the re-raise to you
Pot is now 57 and you only need to call 13
You are getting 4.4 : 1 pot odds
To fold A8 in that position with 4.4 : 1 pot odd is insane
At that point the only hand you are not getting odds to is AA (5.7 : 1)
If the bb woke up with AA then that is poker
Even against QQ you are 30%
EV = .3(57) - 13 = 4.1
Yes you are a dog but you still have a positive EV
The accepted answer from Peregrine to fold and wait for better spot is crazy. Even if you got AA the next hand and got two blanks to call your EV is only 4.33.  And if  you hit you would have 39k in not 70k.
Comment: This is certainly well thought out both m
Comment: Woops, thanks for the EV math. You have proven nicely that folding the 13k is insane so glad I didn't make that mistake at least. Why I didn't just shove is beyond me since I should know better. It's time to move then while i still have some good equity, get lucky with or without the best of it, and not give the whole table odds ta boot. Cheers
Answer: You open and ace eight is 60/40 over a random hand. shove. You are likely to be called (definitely) by queens, but you are not likely to get a better spot to shove.
In that he shoved, you are way behind most likely and then you lay it down and go on the next two cards whatever they are and shove on that hand...Good luck!
Comment: Really fold A8 to 4.4:1 pots looking for at *better* spot
Comment: Interesting. I like that thought process of shoving of course, yet maybe I can fold the min raise if he shoves (assuming I think I'm way behind which I did indeed). The next hand likely won't be a worse spot than I'm in now...thanks

Late Small Casino Tournament play


Obtain clear and recent image from Earth Engine

Question: How can I obtain images as clear as the default Earth Engine map satellite view for analysis of a given area?
I am implementing a project to monitor a transmission line corridor using earth engine and AI. I have tried viewing the corridor in Earth Engine's satellite view and there is a clear enough resolution. I took this image from Google Earth PRO

The above image is dated 2015
I want to build an application that receives recent images which are about 1 or 2 months old to monitor the transmission line corridor and a specified buffer around it. I have already got the tower locations in a KMZ file.
The problem occurs when I used datasets from Sentinel 2 or Landsat 8 the image or layer appears pixelated or blurry. How can I obtain pictures as clear as (or clearer than) the default map satellite view for analysis of a given area in an application?
I do not know if this is also due to my location (Africa, Ghana, Accra). Sometimes some of the examples seem clearer over the USA.
Some of the recent images also had clouds obscuring the view so for test purposes I tried one of the default examples, doing a cloud mask over an area of Accra and received pixelated images.

Result of the Sentinel 2 cloud mask example over the University of Ghana.
The code that produced this layer (taken from the default examples)
<code>// This example uses the Sentinel-2 QA band to cloud mask
// the collection.the collection is also pre-filtered by the
// CLOUDY_PIXEL_PERCENTAGE flag, to use only relatively
// cloud-free granule.
// Function to mask clouds using the Sentinel-2 QA band.
function maskS2clouds(image) {
  var qa = image.select('QA60')
  // Bits 10 and 11 are clouds and cirrus, respectively.
  var cloudBitMask = 1 << 10;
  var cirrusBitMask = 1 << 11;
  var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(
         qa.bitwiseAnd(cirrusBitMask).eq(0))
  // Return the masked and scaled data, without the QA bands.
  return image.updateMask(mask).divide(10000)
  .select("B.*")
  .copyProperties(image, ["system:time_start"])
}
// Map the function over one year of data and take the median.
// Load Sentinel-2 TOA reflectance data.
var collection = ee.ImageCollection('COPERNICUS/S2')
.filterDate('2016-01-01', '2016-12-31')
// Pre-filter to get less cloudy granules.
.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
.map(maskS2clouds)

var composite = collection.median()

// Display the results.
Map.addLayer(composite, {bands: ['B4', 'B3', 'B2'], min: 0,             max: 0.3}, 'RGB Clouds')
</code>
TLDR: How can I obtain a recent image/ image collection with a resolution as clear as the default map satellite view?

Am I doing this right?
Answer: Export.image.toDrive({
image: composite,
description: 'add_your_image_tittle_without_spaces',
scale: 30,
region: the one you asked for
});
try this or try to change the palette for clearer images.
Comment: Thanks for answering. However I realised the image resolution was still poor, sometimes gray or even black or pixelated when zoomed in(landsat8 and Sentinel 2). So I guess I have to fix the poor resolution problem first. If you know a way to get suitable resolution closd to the satellite view you can suggest that here too. (Even if it's outside earth engine)


Could you please simplify "Carrying capacity" meaning in the following paragraph?

Question:
Carrying capacity of the land increased  - during spread of
  agricultural revolution in North America.
Comment: Ignore my deleted comments, it is actually more likely referring to the population carrying capacity. It would be good if you can quote the section surrounding where you read the term for clarity.
Answer: In practical terms it means the yield increased, because a new select crop produced more per acre, or because the crop or newly introduced techniques produced more frequent harvests, or because better fertilizers and other agricultural techniques were used to increase yield outright.
The net result whichever way is you get to feed more people per man-acre worked, hence [population|yield] carrying capacity.
Answer: Carrying Capacity From Wikipedia:

The carrying capacity of a biological species in an environment is the
  maximum population size of the species that the environment can
  sustain indefinitely, given the food, habitat, water, and other
  necessities available in the environment. In population biology,
  carrying capacity is defined as the environment's maximal load

and Agricultural Revolution is:

An agricultural revolution or agrarian revolution is a period of
  transition from the pre-agricultural period characterized by a
  Paleolithic diet, into an agricultural period characterized by a diet
  of cultivated foods; or a further transition from a living a more
  advanced and more productive form of agriculture, resulting in further
  social changes...

...so the line you are referencing is talking about the increase in the maximum population that can be supported by a given region due  to better farming techniques or technology.
Reading Guns, Germs, and Steel?


Is it possible to conquer Japan and Manchuria in Korea's scenario "Samurai Invasion"?

Question: The original victory condition is to regain all the Korean city at some time after 1600 but within 100 turns. But instead can one win by capturing Kyoto and Fe Ala, under a not-too-easy level?
Comment: I've edited your question to narrow the scope some to hopefully make it easier to answer.
Answer: the answer is yes and no.
Yes, in this case you will win the scenario (because if you play either Korea or China and survive until the end of the game AND have the highest score, you'll win).
It's incredibly hard though, to conquer the Manchu. Mainly because if you play China, Korea will make peace with them whenever possible and vice versa.
Capturing Japanese cities is possible, but it takes a while to get to Kyoto. On Deity I managed to capture 3 of their cities. More wasn't possible in time.
Read more about it in my Fear the Turtle Steam Achievement Guide


Who are the Rajpurohits?

Question: I read about rajpurohit that they are rajgurus of the king in the kingdom but I'm not sure about this position. So who are the Rajpurohits and were Guru Dronacharya and Kripacharya the Rajpurohits of Hastinapur?
Comment: they are a community in rajasthan which is similar to brahmins but not exactly brahmins ...
Answer: The term 'Rajpurohit' basically means 'Royal Priest', which is priest of the royal family, so in other words priest of the king and the kingdom.

Yes, Drona and Kripa were indeed the Royal Priests/Rajpurohit, as has been stated below as well, references for Drona and Kripa:

Bhishma gave willing consent to this condition. Thereafter Drona abode
  with his wife in the royal palace, and his son Ashwatthama was trained
  with the Pandavas and Kauravas. He became the family priest as well as
  the instructor of the princes. And ere long the young men were
  accomplished warriors, and deeply learned in wisdom and in goodness.

Kripa as royal priest as stated below:

Great Duryodhan midst the princes stands alone without a peer, Kripa
  priest of royal Kurus, holiest of all priests is here!

As stated in Devi Bhagavatam about Rishi Vashishtha being a royal priest:

32-35. The King said :-- "O Bhagavân! You have described the cause why
  the King Nimi was cursed; my mind has grown very doubtful and restless
  on hearing it. The Risi Vas'istha was the son of Brahmâ and the best
  of the Brâhmins; especially he was the royal priest; how was it, then,
  that he was cursed by the King! Why did not the King Nimi forgive him
  as he was the Guru and a Brâhmin? Why he became angry, when he
  performed such a great, auspicious sacrifice? He was born of the
  family of Iksâku and he knew well the truths of the religion; then how
  was it that he became subject to anger and cursed his own Guru
  Brâhmin."

Also citing reference from Astika Parva:

"And when the king was laid low by Takshaka's poison, his councillors
  with the royal priest--a holy Brahmana--performed all his last rites.

Found an article as well on this topic worth sharing as it is related to your question:

Rajpurohit is a subgroup of Hindu Brahmins, they are considered as the
  oldest brahmins who where associated with the ruling class of a
  kingdom since ancient ages in india. As a tradition Rajpurohits were
  not only involved in heading the religious rites and duties but also
  provide selfless service to the state, they were considered to be
  guardians of the state. They were as much into mentoring royal house,
  educating princes, guiding king on the path of dharma, providing
  advise on the matters of welfare of the state, performing religious
  duties as they were into helping in maintaining the security of
  kingdom by being actively involved in battles. Guru Dronacharya and
  Kripacharya were the Rajpurohits of the ancient kingdom of Hastinapur
  who participated in the great war of Mahabharata on behalf of the
  state during fall of the Dvapara Yuga.
Comment: they are a community in rajasthan which is similar to brahmins but not exactly similar ...
Comment: https://www.quora.com/What-is-the-differece-between-Rajput-and-rajpurohit

Rajpurohits are the teachers of king, i mean Rajguru of any kingdom.
Comment: @MAhipalSingh rajguru and purohit are different things.
Comment: Purohit and Rajpurohit (Rajguru) are also a different thing.

Who are the Rajpurohits?


2 textures not showing in object mode

Question: MY face and beak of this owl aren't showing textures except in "texture paint mode". The rest work but I can't find the difference. Any idea? Thanks!!

owl.blend
owl.blend1
Answer: The Viewport shading depends on your settings. Usually in solid mode you want to model or sculpt, so by default textures are not shown.

Assing the texture(s) to your material and then either press the button marked blue. This way you can already get a more accurate preview, e.g. if you are combining several textures. Or for a simple preview of a single texture, klick the orange dropdown and then the yellow texture button. You may need to click on the texture that you want to show in the node tree of your material.
Comment: May I add that solid view - even using the "texture" color option, is not totally accurate. Mapping might not be correct for instance. It's great for a performance tradeoff if you need to have a reactive viewport with a somewhat preview of your model (I especially use this when I do animation, performance is way more important than anything else but I'm happy to havr the texture just for better shape fidelity). If you need to see your textures as they are most importantly, use the material view instead.
Comment: Upvoted, very nice explanation
Comment: well I'm not in solid view and the Shading drop down isn't the same in this "material preview". and only two of several textures aren't showing...in solid view the texture button is clicked..I still don't understand.
Comment: Node tree and VP screenshot pls.

2 textures not showing in object mode


Designing a home screen for a mobile app

Question: I'd like to show the current day's load-shedding schedule on the home screen, but the design I have looks too empty to me. Any suggestions for things I can add to the screen ?
Answer: My suggestion is: Do a benchmarking
Open most famous schedule apps and see how they solve the problem,write positives and negatives points and each app, and try to apply in yours.
Before start the devolpment try to a prototype to.
Answer: Define the jobs that the app needs to do. Apart from looking at a simple load-shedding schedule, it looks like there is a full schedule, and something that needs to be searched. What else is the user coming to the app to do? Do they need a whole tab for searching, or can you add a search widget on the home screen?
If the app isn't very information-rich, you could probably spread out the scheduling times to fill up the screen. Weather apps and clock apps are pretty creative at making a small amount of information fill a larger view. Perhaps there are some designs that you can borrow inspiration from.


Audit of who ran what command via ssh with shared account

Question: We use shared accounts on our servers. Each uses a different ssh key. Is there a way to create an audit trail of who ran what commands? We can distinguish real "users" by the ssh key used.
Comment: I don't think there is a way, and especially not one that isn't easily bypassed or an ugly hack.  It's much better to abolish shared accounts.
Comment: While we're still small, it's hugely convenient sharing accounts for things like pushing to prod. This isn't a trust issue, but rather being able to easily track down who's running long-running commands for example.
Answer: I don't see a way to do it in one place, but if you're willing to trudge through the logs you can get SSHD to log the key fingerprint when someone logs in:
https://unix.stackexchange.com/questions/15575/can-i-find-out-which-ssh-key-was-used-to-access-an-account
And then log the commands:
How do I log every command executed by a user?
Notice in the comments there's a note about getting this to work on ubuntu.
You can then connect the session ID found in the system logs to the command logs through ausearch:
http://linux.die.net/man/8/ausearch
In the end, if you can separate the accounts (and manage permissions based on a group?) that might simplify things for you.
Comment: That is because the software doing the logging is unaware of the shell.  If it operated any other way it could be defeated by running a subshell.
Comment: Unfortunately the commands logged are more like key presses, so if a user hits up+enter those keys are logged rather than the command.


Is it acceptable to remove freshly (1 day old) installed porcelain tile and reuse it to correct a bad layout?

Question: With one day of installation work completed I checked the layout and realized it would result in sliver cuts along some of the main walls.  This morning I stopped them from continuing work and their supervisor agreed to have them redo the installation.  They are removing the tile cleaning off the thin set and plan to reuse as much as possible.  The 12x24" tile is not grouted.  Is it acceptable to reuse the porcelain tile after its been installed?  Will there be unseen defects in the tile?
Comment: If not broken and is cleaned it should be as new.  Removing it without breaking it is the problem.  Porcelain is usually good or broken, not much in between.
Comment: Always found the centre lines and worked out… cutting to edges is a fact of life - unless you build the walls around the finished floor.
Answer: Generally the thinset has not developed full bond strength by that point, (take note, folks that like to walk on freshly tiled floors before they are done...) so reasonable to get it up off the floor intact, and if so, no issue with reusing it if the old thinset is cleaned off.


Submit button on Visualforce action page

Question: I have a visual force page( page A ) that is overridding the custom object(Object A) New button which enable the new button on Object A Listview page. This page is also linked up with a publisher action. When I click on new button in the list view page there is no submit button on the title bar however, when click on button in the Publisher to bring up the page there is a submit button on top. Is there any way to enable submit button on the visual force page when user click on the new button?
Answer: Salesforce1 has built in buttons for publisher actions. If you attempt to use a Publisher Action, the top of the Salesforce1 app will look like (on a custom publisher action - Share is Submit):

Those buttons are built in as part of the Publisher. If you simply access a Visualforce page on Salesforce1, you will get a header that looks like:

The reason for this is the header is controlled by how the page is accessed. Even though the underlying page is the same, the container is different (publisher action vs Visualforce page). As far as I know, there is no way to put a Submit button in the header in just Visualforce. You will have to create your own button and have it be part of the page. This is also something that you will need to do for the desktop. There is no default Submit button available in a custom publisher action on the desktop so you have to include one as part of your Visualforce and dynamically hide it when you are using Salesforce1.
Comment: I'm using Salesforce1 and Global Action to access a VF page and my header includes the Submit button, but it is inactive (darkened).  I would love to be able to activate it by tying it to the VF actions.
Comment: Make sense. But when you click on the "New" button on the Account list view in the salesforce1 you get similar page( popup) with "cancel/save" button. I am not sure if I have access to that
Comment: Any idea on this one as it does come with save/cancel button when clicking on new on account list view
Comment: @user3211 the New button for the Account does not use a Visualforce page. I believe the standard page layout has those buttons available, but once you override it with Visualforce those buttons are gone.


Who gets to "search target player's graveyard, hand, and library?"

Question: When a spell says, Search target player's graveyard, hand, and library for X, as is the case with Memoricide and Surgical Extraction, does that mean the casting player gets to look? (Thereby being able to take a mental inventory and gain insight into what he or she would apply a subsequent Memoricide to?)
Comment: As far as I know, besides a mental inventory, you're also allowed  to just write down all the cards in a notebook.
Comment: @RemcoGerlich Though if you do that, you'll have to be careful about slow play. If your in a tournament, you can't just take a break from the game to write down every card in your opponent's deck.
Answer: Yes, when a spell has an instruction, it is instructing its controller to take that action. According to rule 608.2c, the third step of resolving a spell or ability is

The controller of the spell or ability follows its instructions in the order written.

That does mean that when you cast those spells, you can look through your opponent's hand and library.
Imagine if the spell was instead instructing that player to search their own hand and library. How would you verify that they had found all copies of the named card?
Comment: @svidgen Yes, do the actions exactly in the order specified, skipping any that can't be done (e.g. if a spell tells you to discard a card and you have none in hand).
Comment: Even worse, if the opponent was doing the searching they could elect not to find the named card, even if it's there!
Comment: Would I be correct in interpreting that the actions must be taken *strictly* in order? ... In the case of Memoricide, I can't look at their cards and *then* name the card?


What is this betting game where players place bets on any of 4 cards?

Question: all I remember is that there's 4 cards on the table and you can place bets on either of the 4 cards on the table and everyone places their chips on top of either of the 4 cards on the table. I forget the rest on how to play, does anybody at least have some recollection of the name or the rules on how to play? anything would be a big help.
Comment: Do you have more information?  What were the cards, Standard playing cards or something else?

If you are betting on a card what determines if a card has won?

Do you recall if there was a theme at all?   The more information the better.
Answer: This sounds like Newmarket. There are A♠, K♥, Q♣, J♦ on the table known as the "horses" (the suits may vary, but there is one of each suit and they alternate colour). Players must place bets on the horses plus a separate pot.
A deck of cards is then dealt to all players plus one dummy hand - some players may receive one more card than the others. The player to the left of the dealer plays their lowest card (Aces are low) and whoever has the next sequentially higher card plays is until the sequence is eventually broken by either reaching a king, a card already played, or a card in the dummy hand. The last player to play a card then starts a new sequence with the lowest card they hold of the opposite colour. If they hold no such card, play passes to the next player clockwise.
If you play a horse card, you collect the bets placed on it, and the hand ceases when either one player plays their last card (in which case they take the chips in the pot) or, rarely, the hand is deadlocked by no-one having a card of the required colour. If bets on a horse or the pot are not claimed in one hand, they roll over to the next hand. To end the game, horses are retired from the game following a hand in which bets on them were claimed, which can lead to large sums going on the remaining ones.
Note: House rules seem to abound and what I've described is what I learnt as a child - I don't think there is a standard set of rules. I think there was the option for the dealer to pay chips into the pot for the right to look at the dummy hand and exchange his hand with it if he chose to.


Can't View Thumbnails when trying to open JPEG files

Question: In Photoshop, I put in a CD with my images, when I try to select a file, I can't view the thumbnails.  Only the Photoshop icon!  It showed the actual picture before, and all of a sudden it stopped!  So frustrating!
Answer:
Ensure you're not using Details, List or Small Icons view in Windows Explorer.
Under Organize > Folder and search options > View tab, ensure Always show icons, never thumbnails is not selected.


Switch keyboard from terminal?

Question: Is there a command line equivalent to pressing ctrl-space to toggle the keyboard layout? (I need this because I want to use Karabiner to tap shift to toggle.)
Answer: Make an applescript:
tell application "System Events"
    keystroke " " using control down
end tell
PS. This is too slow, and allows more keys from the old keyboard to be entered before the switch is effectual.

Switch keyboard from terminal?


Virtual nilpotent groups and lower central series

Question: By definition, a nilpotent group is one whose lower central series terminates in the trivial subgroup after finitely many steps. Now we want to consider the relation between the virtual nilpotent groups and its lower central series. Since virtual nilpotent group is a group which
has a nilpotent subgroup with finite index, so I want to ask whether the lower central series
of a virtual nilpotent group can teminate in a finite subgroup after finitely many steps. If not, what about the case if we add the condition that the group is finitely generated?
Comment: What happens in the infinite dihedral group?
Comment: Well yes it can do, but it doesn't always! It is even possible for a virtually nilpotent group to be perfect.
Answer: Proposition: The cardinality of the intersection of the lower nilpotent series of a virtually nilpotent group can be any arbitrary infinite cardinality, and any finite cardinality not of the form $4k+2$ (or 0).
Proof: Let K be an infinite field of characteristic not 2 or 5, and let G be generated by the following matrices over K, where t ranges over a group generating set of K:
$$x = \begin{bmatrix} 1&0&0&0&0\\0&0&1&0&0\\0&1&0&0&0\\-1&-1&-1&-1&0\\0&0&0&0&1\end{bmatrix}, \quad
  y = \begin{bmatrix} 0&1&0&0&0\\0&0&0&1&0\\0&0&1&0&0\\1&0&0&0&0\\0&0&0&0&1\end{bmatrix}, \quad
  z(t) = \begin{bmatrix} 1&0&0&0&t\\0&1&0&0&0\\0&0&1&0&0\\0&0&0&1&0\\0&0&0&0&1\end{bmatrix}$$
G is the semi-direct product of a simple group of order 60 generated by x and y, and an abelian group V generated by the conjugacy classes of $z(t)$.  The intersection of the the lower central series of G is G itself, because G is perfect. G has the same cardinality as K.  (This is an explicit example of the kind mentioned by Derek Holt.)
If k is an odd number, then the dihedral group of order $2k$ has the intersection of its lower central series cyclic of order k.  If k ≥ 4 is a power of 2, then the affine general linear group AGL(1, k) has the intersection of its lower central series elementary abelian of order k.  The direct product of two such groups has the intersection of its lower central series of size the product of the cardinalities, so any positive integer not of the form $4k+2$.
If G is a group and N is a normal subgroup of size $4k+2$, then N has a characteristic subgroup K of order $2k+1$ by Cayley, and so G centralizes $N/K$, or in other words $[G,N] ≤ K$ and $N$ is not the last group in the lower central series of G.  Obviously no subgroup has cardinality 0, so the claim has been shown.
Comment: Since K is infinite,the number of elements in the conjugacy class of z may be infinite, in this case G is not finitely generated. For   general nilpotent group I think this is a nice example, but I am not sure that G is finitely generated.
Comment: @Siming Tu: You are correct.  A subgroup of a finitely generated group is always countable.  Taking K to be the integers (not a very good field, but it works nonetheless) gives a finitely generated example with countably infinite intersection of the lower central series.  The (corrected) result is then sharp.
Comment: Just to be clear, the group generated by {x,y,z(1)} is a finitely generated, virtually nilpotent, perfect group and so provides a (negative) answer to the question we think you wanted to ask: no, the lower central series of a finitely generated, virtually nilpotent group need not terminate after finitely many steps in a finite subgroup.  Indeed, it can terminate after only a single step in an infinite subgroup.  Steve's comment shows it need not terminate after finitely many steps.


Is there any heat flow in quasistatic process?

Question: In quasistatic process, intensive variables like temperature and pressure are constant throughout the system. Does it imply that there is no heat flowing in and out the system Q=0 since temperature remain constant? Are there any quasistatic process where heat flows?
Comment: Related, worth checking: https://physics.stackexchange.com/q/297411/226902 and https://physics.stackexchange.com/q/129319/226902
Answer: Process with no heat flow is generally referred to as an adiabatic process. Quasistatic processes might be adiabatic or not. In fact, neither isothermic, nor isobaric, nor isochoric processes are adiabatic.
Answer: I think you are mixing up "constant" with "uniform" in the definition.  A quasistatic process is a slow thermodynamic process, where the system remains in equilibrium at every moment in the transition from initial to final state. I think this is what you mean by intensive quantities remaining "constant": they are always considered to be uniform throughout the system, because the system is always in equilibrium.  The values of temperature, pressure, and any other thermodynamic variables can change in a quasistatic transition, however, and any heat transfer is allowed.
Any thermodynamic process that is represented as a curve on the state space, e.g, on a $pV$-graph, is by definition a quasistatic process, because that curve represents a sequence of (equilibrium) states.
A process that is rapid (e.g., rapid compression of a gas); or, a process that is otherwise out of equilibrium except for the initial and final states (e.g., the free expansion of a gas into a vacuum, the free mixture of two gases, melting ice in warm water) cannot be represented by such a curve.  The thermodynamic transition occurs "off of" the state space and the transition is represented just as the pair of initial and final points on the state space. That is a non-quasistatic process.
A quasistatic process is obviously an idealization: it is impossible to change a system such that is it always in equilibrium.  It is the limit of making very small changes to the system, letting it come to equilibrium, and repeating.
Answer: A quasi-static frictionless process is a reversible process where the system is constantly in thermal (temperature) and mechanical (pressure) equilibrium with its surroundings (an exception being an adiabatic process where thermal equilibrium is not relevant).
Heat is energy transfer between a system and its surroundings due solely to temperature difference. So you are right that that there can be no energy transfer in the form of heat in a truly reversible process. The same applies to work. This tells us that truly reversible process don't exist. All real processes are driven by disequilibrium (thermal, mechanical, chemical).
That said, reversible processes are idealizations used to determine limits to efficiencies of things like heat engine cycles. The temperature (and pressure) difference are infinitesimal (but not zero) making the rate of energy transfer by heat and work infinitesimal, and the time to carry out the process infinite.
Hope this helps.


Rules in Halacha

Question: I know in general we rule l'halacha like Beis Hillel except in a few cases. I know there are other rules where one rabbis rulings top another's in general (not referring because of the era they are from) would someone be able to provide a list of these?
Comment: They are scattered internally throughout the Talmud. Even then, later codifiers, besides following these and other traditions as whom to follow, they also made use of their own judicial prowess to decide the law. Indeed and in fact such ability is part of the very fabric of Jewish law and is thus available today and always to those who have reached such heights and conferred status.
Comment: @Dr.Shmuel there are at least three related questions on MY which mention that reference these laws, but is there any place/text/website that collects them all in one list?
Comment: @rosends What comes to mind is the fact that there is a vast literature known as *klalim*, thus many great rabbis have gathered these into there books. But in our times the best of the best is Rabbi Yitzhak Yoseph's three volume *ein Yitzhak*, and it is available on hebrewbooks. I can't add more right now; mobile.
Answer: Hi and welcome to Mi Yodea.
Take a look at the ones listed on Halachipedia's Klalei HaPoskim pages
In general, there are some sefarim that do this really well, depending on whether you're looking into Tannaim and Amoraim, Rishonim, etc. See the further reading section there for a list of them.
Comment: Remember also that all rules have exceptions so they have to be applied carefully
Comment: I went through the pedia page and looked at the links to further reading and don;t see any sort of accumulated list of talmudic policies/rules (in an argument about X, we generally hold like Rav Y, or when Rav X argues with Rav Y the halacha is like Rav Y). Does that kind of list exist?
Comment: Yes, https://www.halachipedia.com/index.php?title=Klalei_HaTalmud

Rules in Halacha


Do people that are called through FaceTime show up on my carrier's bill?

Question: I was just wondering if FaceTime calls show up on my carrier's (Sprint) bill as a regular call, like the number that was FaceTimed and when and the length of the conversation.
Answer: Facetime uses Wifi or Cellular data so will not show as regular calls on your carrier bill.

You can use FaceTime on any of these devices on Wi-Fi: iPhone 4 or later, iPad Pro (all models), iPad 2 or later, iPad mini (all models), and iPod touch 4th generation or later (only iPod touch 5th generation or later support FaceTime audio calling).
With a cellular data plan, you can also use FaceTime without Wi-Fi on any of these devices: iPhone 4s or later, iPad Pro (all models), and iPad (3rd generation or later).

Details of your FaceTime call history are stored locally on your device.


Is it beneficial to my credit score if I close my youngest credit lines while preserving my current credit utilization rate?

Question: I have several newer credit lines that I opened to get cheap financing for buying some appliances. They are paid off now, but they are really hurting my average age of credit line portion of my credit score. If I got credit line increases on my oldest credit cards, and closed the newest credit cards that would improve my credit score, right?
Answer: I wrote How Old is Your Credit Card? some time ago. The answer is yes, this helps the credit score, but this factor, age of accounts, is pretty minimal. Grabbing deals, as you did, I'm actually down to a "C" for this part of my score, but still maintain a 770 score.
Answer: Credit Score is rather misleading, each provider of credit uses their own system to decide if they wish to lend to you.   They will also not tell you how the combine all the factoring together.
Closing unused account is good, as it reduced the risk of identity theft and you have less paperwork to deal with.
It looks good if a company that knows you will agrees to give you more credit, as clearly they think you are a good risk.
Having more total credit allowed on account is bad, as you may use it and not be able to pay all your bills.
Using all your credit is bad, as it looks like you are not in control.
Using a "pay day lender" is VERY bad, as only people that are out of control do so.
Credit cards should be used for short term credit paying them off in full most months, but it is OK to take advantage of some interest free credit.


Which programming language java or c# should I learn for selenium automation testing?

Question: I am in manual testing from last 5+ years and having a sound experience in it. Now I want to switch in automation testing and want to start with Selenium.
I don't have any programming experience or knowledge in either Java and C#.
Answer: Robotframework-seleniumLibrary is a good choice, if you want to get involved with less coding and more test automation.
Python or Java may be a good choice to start with, if you want to focus on test automation.
Answer: Python is widely considered best language for beginners, much simpler than Java or C#.
Once you understand programming in Python, it will be easier to learn other languages (and you will understand why Python is easier).
But before all this, you should learn how to use Google. This exact question is asked on this exact forum every week.
Try this
Answer: Everything has a context.

Will you join or start an automation project? Follow the language of this project.
Do you want a fast learning curve on the basics of programming and automation? Take a look in Python; do a Codeacademy-like course and play with each entry on the Learn X in Y Minutes site - try run and change things to see what happens. After that, learn the Page Object pattern auto-critically, always checking if you are building something extendable, using good OO programming. The Python tutorials and courses lack sometimes this sort of critic.
Do you want to look at the market? Java is more used than C# by big companies, because they have dev people used to Java - Javascript is closely used, depending on the region you are. The con here is that the community for automation in these language is not so strong.
Do you want to experiment with dozen of open source tools built-upon Selenium? Take a look at Ruby; the Cucumber environment is extremely active and the integration with Rails is the focus. Javascript's community is as active as Ruby's. These languages have lots of 'magic programming', few lines of code that do bunch of things. I love them for it, but I know these sort of elegant code can be difficult to catch if you are novice and/or learned to strict C-like programming.


What is Drupal Panel Node Template

Question: What is Drupal Panel Node Template and how can i use it to create a page based on person type node.
Also is there any tutorial on creating pages using Panel Node Template.
Thank you.
Answer: Probably you don't need to use a node panel. What you want to do is edit the node template for the content type you want to customize instead.
There is extensive documentation in http://drupal.org/project/panels

What is Drupal Panel Node Template


Microsoft Windows IIS and ARR

Question: I am experiencing a problem with the configuration of Microsoft Application Request Routing 3.0 (ARR) that I cannot figure out why I cannot solve and I am therefore turning to the vast Internet for help.
The situation is that we have three IIS Server on our LAN with one site on each that I need to make available from the Internet. For that purpose, I have installed a Windows 2012 R2 server in the DMZ with IIS and ARR on it.
I have had the following three entries added to a public DNS ... all three pointing to my Firewall/DMZ

public1.company.com
public2.company.com
public3.company.com

On the LAN I have the following three sites

srv1.company.local/public
srv2.company.local/public
srv3.company.local/public

The concept is the users from the Internet should be able to access "server1.company.local/public" using "public1.company.com", but I have only been able to make it work when users enter "public1.company.com/public"

public1.company.com <---> srv1.company.local/public

Using "URL Rewrite" in the IIS Manager I have create one rules per site:

Match URL | Requested URL=Matches the Pattern | Using: Wildcards | Pattern: * | Ignore case
Conditions | Match All | Input: {HTTP_HOST} Matches the Pattern | public1.* | Ignore case
Action | Route to Server Farm | Action Properties | Schema = http:// | Server farm = srv1 | Path = /{R:0} | Stop processing

This setup work if we add "/public" when accessing the server on the LAN from the Internet.
But... I would like to get rid of the /public
Can anyone explain how this is done, if possible?
Answer: You need to rewrite the public folder into the url in your reverse proxy rewrite.
Action | Route to Server Farm | Action Properties | Schema = http:// | Server farm = srv1 | Path = /Public/{R:0} | Stop processing

Microsoft Windows IIS and ARR


Ubuntu 18.04: Save and Restore Workspace Layout (w/ Multiple Workspaces)

Question: I am using a large 4K monitor with multiple work spaces each having multiple applications. When rebooting Ubuntu 18.04, the locations of the application windows are lost and it takes me several minutes to reconfigure them. How can I save and recover the window positions within the work spaces?
Answer: The Gnome Extension "Auto Move Windows" will move applications to a specified workspace when they are opened. The location of the application windows within the workspace are also remembered. See, https://extensions.gnome.org/extension/16/auto-move-windows/
Note that there are solutions for prior versions of Ubuntu (w/ Unity) that use scripts. However, Ubuntu switched back to using Gnome in 18.04. (e.g., Saving and restoring window positions and How can I start up an application with a pre-defined window size and position?)
Answer: This does what you're looking for!
https://github.com/johannesjo/gnome-shell-extension-window-session-manager
Answer: I just wrote this python script to open different applications and move them to specific workplaces on boot up. It works for me on Ubuntu 20. Only dependency besides python is wmctrl (which might be installed by default on Ubuntu?). Have it run on startup - I put it in Startup Applications with python3 /path/to/script.py in the Command field.
There are probably optimizations to make here but leaving it to be used/changed by anyone struggling with this. If using the script as is, change the apps list to hold the programs you want. Only change the first 3 elements of each tuple in list - first is command to launch the program from a terminal, second is workspace number, third is string to identify program in output from wmctrl -l - e.g. with line 0x02200005  8 fiona New Tab - Google Chrome in wmctrl output, search term could be Google Chrome.
import subprocess
import time
import datetime

def run_command_in_background(command):
    # command is list of strings
    subprocess.Popen(command)

def get_wmctrl_lines():
    return subprocess.run(["wmctrl", "-l"], capture_output=True, text=True).stdout.splitlines()

finito_ids = set()
def get_running_app_window_id_desktop_nb(search_term):
    for line in get_wmctrl_lines():
        if search_term in line.lower():
            split = line.split()
            window_id = split[0]
            if window_id not in finito_ids:
                return split[0], int(split[1])
    return None, None

def move_window_to_desktop(window_id, desktop_number):
    # desktop = workspace??
    run_command_in_background(["wmctrl", "-i", "-r", str(window_id), "-t", str(desktop_number)])

apps = [
        # app_command, desktop_nb, search_term, should_be_full_screen, has_been_spawned, has_been_formatted
        (["vivaldi"],2,"vivaldi",False,False,False),
        (["terminator"],3,"/bin/bash",True,False,False),
        (["terminator"],4,"/bin/bash",True,False,False),
        (["terminator"],5,"/bin/bash",True,False,False),
        (["snap","run","spotify"],6,"spotify",False,False,False),
        (["google-chrome"],8,"chrome",False,False,False),
        ]

# move apps
while False in [a[-1] for a in apps]:
    new_apps = []
    for app in apps:
        app_command, desktop_nb, search_term, should_be_full_screen, has_been_spawned, has_been_formatted = app
        if not has_been_spawned:
            run_command_in_background(app_command)
            has_been_spawned = True
        else:
            app_window_id, current_desktop_nb = get_running_app_window_id_desktop_nb(search_term)
            if app_window_id is not None:
                run_command_in_background(["wmctrl", "-i", "-r", app_window_id, "-t", str(desktop_nb)])
                if should_be_full_screen:
                    run_command_in_background(["wmctrl", "-i", "-r", app_window_id, "-b", "toggle,fullscreen"])
                has_been_formatted = True
                finito_ids.add(app_window_id)
            else:
                print("app %s still not running" % search_term)
        new_apps.append((app_command, desktop_nb, search_term, should_be_full_screen, has_been_spawned, has_been_formatted))
    apps = new_apps
    time.sleep(1)

# send notification that everything is ready
run_command_in_background(["notify-send", "Hola we", "apps/workspaces are set up"])


How to sort photos inside a photo album in the Photos app on an iPhone by date [PC]?

Question: By default the photos in user-created albums are sorted by date added, NOT date taken. The user may rearrange the photos one-by-one (tap and hold).
I do NOT own a Mac.
Answer: I have had the same question for years. Unfortunately, iOS uses Date Added and not Date Taken from EXIF for sorting. They even added Collections but Camera Roll sorting is still broken.
To sort the photos you could use one of the methods:

Jailbreak. A number of tweaks allow organising photos one by one or sorting by name/date. You would also be able to edit each photo's metadata on device.
Sync them as an album from a computer. First, organise them by copying or otherwise modifying the date metadata, then sync the resulting folder through iTunes. This is limited to the synced album and will not fix the camera roll.
Direct import and Photos.sqlite rebuild. Having spent another year on this and currently in the process of moving my 5 year camera roll to a new device, the method I plan to use: same as above, prepare metadata on a computer (set every possible date field correctly, e.g. with Attribute Changer). Import photos into DCIM. Delete/rebuild Photos.sqlite. Delete DCIM.plist, or set it manually for iOS to know how to name photos when you take them.
Make changes to Photos.sqlite. This should work unless Apple modifies databases. This is sort of the best option available without resorting to mass EXIF editing/renaming, and will only work/make sense if underlying EXIF/file attributes in your photos is correct. If you can see metadata is wrong, this is useless. Details are here.
N.B: double check dates on PNGs/videQuickTime files and their exif is tricky).

Further investigation confirms this appears to work on iOS 11. Only points to note on later iOSs: clear out iCloud Photo Library folders CLOUD folders in DCIM, or just turn it off), and also delete the Mutations folder in PhotoData (holds edits AFAIK, if any have the same name as the new import you'll have weird conflicts).
Also, the way iOS generates ZDATEADDED appears to be dependent on indexing order and hence naming of the files.
So if you want the Camera Roll to be ordered correctly (without having to resort to SQL commands on the db) by EXIF/file data, you'd need to bulk rename pre-sorted (by date field of your choice) files in order, and then import. The easiest attribute to pre-sort by is Date Modified since all files will have it and it generally remains the same through all the manipulations described above. Obviously, you'd want/need to use something like Attribute Changer (Win) or Better Find Attributes (macOS) to first synchronise EXIF and file attributes.
Answer: I never thought about that, but it seems like this is not possible at the moment, take a look at this Apple Forum's question answered, this may help you understand more about how photos work on the iPhone and where you can contact Apple to leave a feedback about what you've just asked here, give it a try!


Security, hardening and NAT for RTP and SIP

Question: I decided to create a VOIP server and it has gotten more complicated then I thought it would. So in order to make my server more secure, I keep it behind a pfSense appliance. I use IP filtering to reduce my online availability to only our remote office locations (all in NYC). I get this impending feeling people will want to access the server via their cell phones and check voicemail via the portal offsite. So I was thinking of some kind of reverse proxy with an authentication like a SOCKS as opposed a VPN which just is not practical with the variety of devices people use.From my understanding creating an outbound proxy would only proxify the SIP and NOT the RTP. The issue is also that it goes Asterisk>1:1 w/ pfSense>Internet>Firewall w/ NAT>SIP Phone. Will using the NAT be an issue? What are other people doing? Does anyone have a similar situation? What should I google?
Answer: Asterisk already has builtin methods to handle NAT related issues. Take a look at this article.
If you still wan't to proxify, you can try SaRP, which seems to work for both SIP and RTP.


(Only) YouTube Videos automatically fast forward

Question: I recently updated my Ubuntu from 11.10 to 12.04 lts and there seems to be a problem while I'm playing YouTube videos they, for no reason, start to fastforward (audio and video). This does not happen with other programs or websites only in YouTube videos. It does not matter if they are in flash or in HTML 5 player this problem persists throughout
Comment: Which browser you are using, if its Firefox then try disabling addons and play them.
Comment: Some video playback tries to synchronise things to the sound card's clock.  Is there anything out of the ordinary about your audio set up, by any chance?
Comment: possible duplicate of [No sound and flash videos play super fast after daily update](http://askubuntu.com/questions/118459/no-sound-and-flash-videos-play-super-fast-after-daily-update)
Answer: In my case I solved it this way; First install "PulseAudio Volume Control" if it is not installed yet;
sudo apt-get install pavucontrol

Now start "PulseAudio Volume Control" and go to the Configuration tab. Under "High definition Audio Controller" I had "Digital stereo (HDMI) Output" selected. I had to change that to "Off". I also had to change the build in audio profile from digital to analogue, otherwise I didn't hear anything.
edit: after the change above, it still happens sometimes. But I can use pulseaudio -k to restart pulseaudio. (-k will kill it, but it will restart automatically).
Answer: If pulseaudio -k works temporarily, try this guide to replace pulseaudio with the alsa audio component. It's worked fine for me ever since. (Ubuntu 12.04)
Answer: For a very brief time, Youtube recently exposed an experimental player on their site with fast and slow play capabilities, and this may be affecting the current player. If this is the case, it would help to clear your browser cookies.
Answer: In my case, I once wanted to listen to my computer through my wireless headset, so I changed the output in Settings>Sound to the USB Wireless Headset. But when it was unpluged it must have switched to the HDMI out sound instead of the normal speakers, when I switched back to the speakers the problem went away. Also in Settings>Sound>Applications, it says that YouTube is playing from ALSA Plugin, according to there website it is a audio extension type of thing. I don't know if ALSA has anything to do with it or if it is all on YouTubes side but whatever. Hope this helped.
Also I am using the web browser Chromium
Comment: This doesnt answer the question. Please add this as a comment. If you have the same problem, you can favorite this question.
Answer: I solved it changing to the audio device I had available, so if you are having problems with YouTube or any video,

Check you are connected to the right device. (you do it by looking at PulseAudio)
if problem not solved
Check you have PulseAudio installed by trying to install it
sudo apt-get install pavucontrol
Read above carefully


How do you set each stage of compression when using 3 or more compressors in a DAW?

Question: I have a hardware FMR Audio Really Nice Compressor (RNC) that uses 3 stages of compression. It gets me really good results in recording live theater, where the audio levels go from a stage whisper to full applause, and I'm too busy with the video camera to ride the gain. Now I do multitrack audio on a Zoom H6, which also has the benefit of 24/96 recording over the video camera's 16/48. How would I set up DAW plugins in post production to effortlessly get me the same result as the RNC?
Comment: I'm dealing with recordings of stage performances that go from a whisper to a scream. The low budget for theater videos means that I can't take the time to ride the levels, and I've had a good experience with the FMR RNC for simple stereo recordings. Introducing Zoom H6 and post production mixing I still want to save time by using DAW compression. I have the Bob Katz book and I think he is more oriented to controlled studio recordings.
Comment: If you follow "bob katz mastering audio" the answer is most likely: not a single one; switch them all off. But Bob is the rare  kind of trained persons, who can hear 0.5 dB differences in frequencies, as he writes himself. // See e.g. his remarks on "the loudness war". Or just recall, that compression is a non-linear characteristic, introducing overtones by multiplying signals, which many times just are not wanted.
Answer: Assuming you're not going to find data published on exactly how the RNC does it, I'd think more in terms of two-step rather than 3, just with a good amount of knee in the first step.
You still need to think in terms of 'some', 'some more' & 'brick-wall' but a reasonably modern multiband comp setup should be able to handle the first two like a breeze.
Personally, I'd go with the Waves Linear Multiband - but that's mainly because I've been using it so long I know exactly what I can get from it.

Waves used to cost a fortune & they'd want to sell you massive bundles of 'everything' whether you needed it or not, but these days you can get individual plugins for 30 bucks each. That makes them well worth a look.
The thing about it is you can not only adjust knee, like any comp, but you can adjust its behaviour, whether opto or electro, speeds for every band & whether it uses an adaptive algorithm to prevent pumping. It doesn't hard-limit the output but afaik it's 64-bit internal processing so it never crunches on overs.
One additional benefit is you can see what it's doing, as well as hear it. I find that invaluable in situations where something feels 'not quite right' but you just can't quite figure out what.
I would suggest grabbing the demo & spending at least a week with it. There's a lot to cover from what looks like such a simple interface. It really is massively powerful, you can go from can't tell it's there to ouch.
I actually have one permanently strapped across my main HTPC for watching movies, lifts the whispers, stops the explosions from bending the walls ;)
Behind that I would just drop in one of their Maximisers. They do several, single & multi-band. I'd probably go for a single band, maybe the L2 Ultramximizer used very sparingly just as a last brick-wall before output. You don't need to do anything 'dangerous' with this, just use it to keep a lid on any extremes.
There are, of course, a myriad similar plugs from a myriad companies. These are just the ones I'm used to & will go to first in many situations.
Looking at their site [which I haven't done in a long time] they now do a C6 Multiband Comp, which might also be worth a look. I've no experience with it, but I used to use its predecessor, the C4 before I switched to the LinMB.
Comment: I appreciate the recommendation for Waves, a friend has been using them for 20-30 years and also recommends them. Rather than plugin recommendations, I was looking for specific settings for multiple comps. Maybe only 2 would get me there, since the Zoom recorder has limiting or compression available for the original recording.
Answer: The great thing about virtual compressors is they come with presets. And the good ones, like Waves, even have featured presets created by some pretty great sound engineers.
As you want something quick to set up, browsing presets would be a good idea to get you started.
I'm another one who's been using Waves for years, too - the most commonly used compressor for me is the C6 Multiband. My Waves suite is so extensive and of such quality, that I rarely need to look elsewhere for down-to-earth processing.
But as I don't do live stuff anymore, I couldn't recommend specific setups for you, but I would recommend you go through the presets - they usually have good names which tell you the common usage/effect. When you find one you like, you can simply adjust the threshold and ratio to suit and save.
I should also say, with regard to multiband compressors, you should adjust the band frequencies too, as like threshold, every situation is different in this respect, too.


How does time reversal symmetry work in topological insulator?

Question: I am doing microelectronic devices with topological insulators. Can some one explain time reversal symmetry in a topological insulator to electrical engineering student like me?
Answer: I assume you refer to something like a BHZ-$\mathbb{Z}_2$-insulator (with the experimental realization of a 2d-$\text{HgTe}$-quantum well).
This model can be understood as two Chern insulators. Chern insulators have a chiral edge mode (that is, an edge mode, that propagates only in one turning sense, thus breaking time reversal). This is analogous to the way a magnetic field breaks time reversal.
The two spin channels of the BHZ model are time reversal conjugates for the spinless Chern insulator, furthermore the spin channels are flipped when applying time reversal, leading to a time reversal invariant spinful model.
I hope, I was not too technical and sufficiently detailed.
Comment: Thank you for your explanation. I still not quit understand why magnetic field can break the time reversal symmetry? Is that means when the time reserved the spin direction will change? For example, the spin is in clockwise direction and when time reserved it should go to the counter clockwise direction. When applied magnetic field it does not go to counter clockwise direction?
Comment: @Michelle Classical explanation: Magnetic fields break the time reversal because on time reversal $\vec v \to -\vec v$ thus $\vec F_L = \frac q c (\vec v \times \vec B) \to - \frac q c (\vec v \times \vec B)$. Note: The magnetic field analogy in a TI does not apply to the spin degree of freedom!
Comment: So what you mean is the time reverse leads to the velocity reverse then the Lorenz force reversed and the electron motion reverse direction? thank you for your patience
Comment: Yes. Reversing the velocity and swapping initial and final position is roughly the usual definition for time reversal.
Comment: Thank you. So in the TI systems. The band structure is like http://physics.stackexchange.com/questions/175926/band-structure-of-topological-insulators. In this question, the lower one. How do we explain that the surface band structure is protected by time reversal symmetry?
Answer: You should know Kramers_theorem, enenrgy band  is at least doubly degenerate at time reversal invariant momentum (TRIM) points, which satisfies -k=k+G, G is  reciprocal lattice vector.
So edge states will doubly degerate at TRIM, and protected by time-reversal symmetry. It means if you add perturbation without breaking TR symmetry, you cannot gap the edge states.


How to propose tag synonyms?

Question: I want to propose a synonym for a tag, how do I do? I have read that it is available to create tag synonyms for users that have 2.5k rep but I don't know from when it's possible to propose a tag synonym.
Comment: Ah, just realised that you asked about synonyms. Rules are similar though, propose them on Meta.AD first :-)
Comment: @nohillside That's what I thought when I read your comment :-)
Answer: A lot has been written about tag creation and I strongly recommend to familiarize yourself with the discussions before proposing new tags. Creation of wiki tags and When should I create a new tag? How do I request a new tag if I don't have enough rep? contain a lot of valuable information about the topic, as do other questions linked there.
From the Help Center article about tags:

A tag is a word or phrase that describes the topic of the question. Tags are a means of connecting experts with questions they will be able to answer by sorting questions into specific, well-defined categories.
As a general rule, you should avoid creating new tags if possible, and new users are not allowed to create new tags. Even if you have sufficient reputation, you should only create new tags when you feel you can make a strong case that your question covers a new topic that nobody else has asked about before on this site.

If, after reading up on the topic, you still find a term which should be turned into a tag, please propose its creation here on Meta first. In the post, explain why the tag brings value and provide a first proposal for both the usage guidance and the long description. We can then let the community discuss and if necessary vote on the new tag.

How to propose tag synonyms?


How to stop a infinite running process (ztail) started by a ssh session after that session is closed

Question: I have a peculiar problem. My server supports multiple ssh session simultaneously, so that multiple admins can manage (via command line interface) it simultaneously. We have a command which calls ztail to show the compressed log files. Now when the current ssh session is closed (without pressing Ctrl-C, to stop the ztail command), this command should ideally stop working. But what I observed when I start a new ssh session that, the process (ztail) is still running in background and consuming my CPU, even though the previous session was closed. Now how can I know when the session was closed, so that I can use that variable/flag to close/stop any commands initiated by that previously closed session?
Comment: This normally happens automatically, so ztail must be doing something to prevent dying. Programs started in an SSH session receive a SIGHUP when the session terminates. What is this ztail program, and how is it started?
Answer: This only happens if you run ztail (or any other command) as a new root-level process (i.e. without a parent process), e.g. in the background or via cron.
Usually when you start a standard ssh session you get a shell process, which is the root process for all programs you start. If the ssh session terminates, the kernel kills all child processes as well. (That's why people usually use screen or comparable things to retain sessions.)
So the easiest thing for you would be to utilize this default behavior. Have a look at ps axjf to check what ztail's root process is, then figure out why it survives the terminated ssh session.
Comment: "If the ssh session terminates, the kernel kills all child processes as well."  Not exactly.  The kernel sends a `SIGHUP` to the process group when the controlling terminal disappears, or the session leader dies creating an orphaned process group.  It is likely ztail is either affecting sessions/process groups with `setpgid` or `setsid`, or ignoring `SIGHUP`.  See [chapter 9 in APUE](http://my.safaribooksonline.com/book/programming/unix/9780321638014/9dot-process-relationships/ch09) for all the gory details.
Answer: During the ssh-session a shell-session will be a child process. That child process will have another child process: ztail. After closing the shell ztail will loose its parents. As with all these processes, they will be adoped by init with PID 1.
To if the parent-pid of ztailis 1, it is most probably one of your "zombies".


Could you be charged with manslaughter for obstructing an ambulance?

Question: There was a recent incident in London that has been all over the news where protesters blocked a road and eventually ended up blocking an ambulance. It was stated that they were aware of the ambulance yet still refused to move. Assume a hypothetical scenario where this ambulance was responding to a time sensitive incident, i.e, a stabbing victim, who was therefore suffering from blood loss, and it could be conclusively proven that the delays caused by these protesters were the sole reason that this victim ended up dying from a survivable injury. Could the protesters be charged with manslaughter, assuming it was evident they were aware of the ambulance's presence?
Comment: @NateEldredge yes, involuntary manslaughter. This is defined as a death that occurs without intent to kill but arises from recklessness or criminal al negligence. I would definitely classify knowingly obstructing an ambulance as recklessness if not criminally negligent too. Any reasonable person would be aware of the possibly fatal repercussions of delaying an ambulance.
Comment: To begin, are you generally familiar with the definition and elements of manslaughter?  Have you read https://en.wikipedia.org/wiki/Manslaughter_in_English_law or something like it?  Is there a particular one of the elements that you have a question as to whether it would be satisfied?
Comment: See https://en.wikipedia.org/wiki/Fort_Lee_lane_closure_scandal for a US case with similar facts...
Answer: Charged? Of course, the police can charge you with anything at any time
Could you be convicted?
Maybe.
Their best shot is charging you with "Manslaughter by an unlawful and dangerous act" also called constructive manslaughter.
The Crown must prove your act:

was intentional,
was unlawful,
leads the reasonable person to realise that some other person is at risk of physical harm, and
caused the death.

The first two are uncontestable: the protesters are deliberately engaging in an illegal act. No 3 would be up to the jury. No 4 is also up to the jury and would turn on the evidence that the delay to the ambulance caused the death.
Comment: The actions of this charming chap [link]https://www.dailymail.co.uk/news/article-11413045/EXCLUSIVE-Pictured-Senseless-irresponsible-driver-avoided-jail-blocking-ambulance.html seem to meet the first three criteria.  Fortunately, we'll never know if the fourth would be met.  On that basis, I suspect if the patient _had_ died, a manslaughter charge would be likely.
Comment: I'd add that in the UK there's a whole lot of very uncomfortable "obstructing an officer..." and "...in the course of official duties" stuff that's wormed its way into minimally-debated legislation over the last 25 years or so. Allowing that the "first responders" are very often the police one obstructs other emergency services at ones peril.


Possible to convert only a single label in a shapefile to annotation?

Question: In ArcMap 10.3, is there a way to convert only a single label in a shapefile to annotation? I have a shapefile of 41 points (labeled 1 to 41). I only have one label that needs to be moved slightly to clarify which point it is associated with and converting to annotation would then make it where I could not easily change the placement properties etc for the entire shapefile. So, was wondering if anyone knew a way to move only the one label?
Comment: Shapefiles cannot contain Annotation, maybe you mean the annotation in an mxd.
Comment: Converting the labels to annotation not the shapefiles. Just wanted to know if a single label could be converted as opposed to all labels associated with the shapefile
Answer: If you want to convert a single label to annotation, you need to start with just a single label! Use the SQL query option to only show a label for a single feature, for example selecting by Object ID. Make sure all the other label classes are turned off, then convert to annotation in the usual way.
Answer: After playing with the Labeling tool bar..."Use Maplex Label Engine" did the trick for that particular label.
Comment: This does not sound right to me.  Using Maplex vs Standard Label Engine might affect where a label and subsequent annotation is placed but not whether a single label can be converted into annotation.
Comment: @PolyGeo Using maplex moved that one particular label in a way that was satisfactory it obviously did not affect whether it could be converted to annotation. I would still be interested in doing that, but for that instance maplex was adequate. I should have been more clear in my earlier comment that maplex moved the label in a way that would do for the moment and that was all.


Which is correct, artifact or artefact?

Question: I am writing a book about illicit antiquities. Some of my resources spell this word, artefact; others, artifact. Is one right and the other wrong?
Answer: Artefact is British, while Americans use artifact. So, depending on where you live, choose accordingly.
I found this information here.
Comment: @cobaltduck I was busy when I wrote it, but I did what you said.
Comment: SteveM's accepted answer to the question of which this is a duplicate is '_artefact_ is preferred in British English and _artifact_ is preferred in US English, but ... both are acceptable in either case.'

Which is correct, artifact or artefact?


Why does my puppy like to put his face in my neck when he sleeps?

Question: I've noticed that when I'm in bed my puppy will lay in my arms or next to me; and then all of a sudden he walks up on me lays on my shoulder, and puts his face in my neck and goes to sleep. I don't know if it's his way of cuddling, if he just prefers the heat, or if it's his way of showing dominance of me to his brother.
Answer: Sounds like trying to get close and "cuddling". Also this way the puppy immediately notices when you're trying to leave. I wouldn't try to interpret too much into this.
Our dogs usually rest their head on my lap or shoulder when they want to beg for something, which might also be something here: "Hey, get up!" Just biting or pulling might not be an option out of respect. They'd just idle and wait patiently.
Finally, I don't think it's something about dominance. Puppies usually don't care and they start the whole dominance thing and trying to find their place in the pack by playing and toying around. You'll notice when it starts. It won't just happen by putting their head on you. That's far too calm to be honest. :)
Comment: I doubt it's begging because he only puts his face in my neck, and does nothing else afterwards. He's normally very obvious when he wants something. But thanks this helped a lot, I do tend to overthink and he probably is just wanting to cuddle.
Comment: @Hayhay28 Yeah, just  give it some time. Also forgot to mention, but the whole dominance thing will most likely start with some potential humping, no matter whether male or female. ;)
Answer: I've had many cats, but our latest addition is the only cat I've known that likes to rest his head on something (for the same reason that humans like resting their head on a pillow).
He sleeps like this almost always:

This seems a perfectly reasonable explanation for why your dog chooses to do so:

It's comfortable
It's warm
It gives affection to a loved one

I don't know if it's his way of cuddling, if he just prefers the heat, or if it's his way of showing dominance of me to his brother.

It's not impossible that it's related to his brother. In such a case, it's not really a matter of dominance over the brother, but rather claiming you for himself.
The same cat I mentioned before, also has a habit of claiming the spot closest to me. If another cat makes a move towards me, or he sees me petting them, he habitually moves in and (non-violently) drives them out.
I think this behavior ties into why he likes to cuddle me so much. Both can be explained by the cat/puppy having a very strong bond with its owner, and emotionally needing that bond. At least for my case, it's clear that the cat needs a lot of physical affection, and defaults to me over my girlfriend when possible.


Capture/Compare/PWM

Question: The PIC 18FXX2 microcontroller has a Capture/Compare/PWM unit. I understand what capture and PWM are used for. Capture can be used to time the duration of an event. PWM is of course used to generate rectangular waveforms of variable duty cycle. But, I do not understand what the compare function is used for. Is it used to, for example, generate a pulse of a particular duration?
Comment: A PWM is basically a compare with automatic reload/restart function. Is the timer value higher than the compare value the output is set to HIGH e.g. otherwise it's set to LOW (depends on the configuration of the output).
Answer: Yes, the compare function can be used to generate very precise high-resolution and low-jitter pulses of various durations (there will be a minimum based on how quickly an interrupt to set the compare registers can be serviced, but there is no practical maximum to the pulse length since rollovers can be accommodated in firmware).
This is possible because the hardware can directly change the port pin state upon a match, and the processor need only set up the next match in time.
PWM is more for when you don't care so much about the period but want a precise ratio of on-to-off time.
Edit: as @gbulmer says the compare can be used to trigger a 'special event' which resets timer 1 and starts and A/D conversion  (leaving the port pins untouched). It can also generate a software interrupt. In my experience (others may have different approaches) the most useful mode is to control the output pins directly and leave the counters free running with no resets or writes for cycle-perfect waveforms. The following options are available:

In order to extend the timer's range beyond a 16 bit rollover, a interrupt can be generated that does not alter the output pin, a software counter incremented and the next comparison set up. It's necessary to have a minimum amount of time between setting up the comparison and the next match or the timer could miss the match and roll over again before hitting the count. This requires careful thought and design- one of the costs of using a lower-end 8-bit microcontroller with 16-bit counters rather than 32-bit counters. With a few more bytes extension, the counters can be made to not roll over within a product or a human lifetime.
Comment: I don't feel this has clarified the difference between PWM, and streams of square waves. Maybe add that both the count triggering the pin change, and the overall timer count before 'wrapping or restarting' are available to the program? Also, I think "but there is no practical maximum to the pulse length since rollovers can be accommodated in firmware", might be overstating it a little bit. Something softer, like "the practical maximum duration may be extended beyond the timer's maximum count by firmware using interrupts or polling" would alert a reader to the mechanisms, and the constraints.

Capture/Compare/PWM


inserting links to publish

Question: When I try to insert a link under "Publish" on my website, the square appears for me to fill in the https info,  but the square is empty.
Comment: Can you be more specific? Which ee version?  Are you talking about an URL fieldtype? Or the url_title? Or a RTE with a link in the text.
Comment: @peter, Since each ExpressionEngine site is unique and custom developed by the developer, it may be helpful for you to share some screenshots, screen recordings, etc.
Answer: I'm using 1.7.1.
I go to a new entry to edit it. I've printed a list of titles of my video works. I highlight a title to a video that I want users to be able to access on Vimeo by tapping that title. I highlight the title, then tap the to the "insert/edit link" icon. An empty box appears. This box usually will allow me to insert an https: link. There is nothing in the box, no printing, nothing.
Comment: I would recommend upgrading to the latest version of EE if you can. V1 hasn't been supported in over 8 years (https://expressionengine.com/support/version-support). There are lots of things that could cause it to break including changes by your web host or even browser updates.
It would be very tough to troubleshoot your situation without an exact copy of the site and knowing the right environment to test on.
You may want to start by opening Dev Tools in your browser and seeing if there are any console errors, next would be the Network tab and see if you have 404 or 500 error codes there.

inserting links to publish


Global variables and MPI

Question: I know that global variables are bad and should be avoided as far as possible. However, when writing parallel programs with MPI for example, some variables only get initialised once, and never changed (This task's number, total number of tasks etc.). Is it still considered bad practice to have these variables as global? Since you pretty much need access to these variables all the time, it seems silly to make a class for them in main, and pass a pointer to it to 99% of all the functions in the program. My approach so far has been to hide them in a namespace mpi_glob (for the case of C++, I guess I would not bother to put them in a struct in C to emulate a namespace). I guess the question also goes for other set-only-once variables such as a system of units etc.
Answer: The reason that global variables "are bad" is that they introduce coupling between separate source files that can be hard to identify and trace. In particular, if a global variable has an unexpected state at some point in the program, it can be hard to figure out where it got modified.
Replacing global variables with local variables that get passed by reference to every function in the program doesn't eliminate that problem. In design terms, it's "tramp data", i.e., data that wanders around even where it's not needed.
Now, the point here is that, as you suggest, data that's initialized once and never changed doesn't have the problems that make global variables "bad". Since the problem doesn't exist, the solution isn't needed.
Answer: No rule should be followed over a cliff, and the specifics depend entirely on what sort of program you're writing.
If your program is relatively small (or you're the only one writing / maintaining it), then it's probably fine to leave "global" variables in a special namespace.  At least that way you're not likely to accidentally shadow or stomp on them in a local scope somewhere.  That's assuming you're not doing something like this though:
using namespace mpi_glob;

Which is little different from just having the globals in a file somewhere and doesn't protect them very much.
If it makes your program more clear and easy to understand by using global variables, then use them.  If it's possible to keep them local, keep them local, because it will usually make maintenance simpler in the long run.
Answer: I suppose Singleton should help you managing it better, so you dont have to pass the pointer around. Practically, mpi_glob does the same, Singleton is just more accustomed way.
Alternatively, you can still resort to global variables - they are not bad as such. If you want to emphasize one-time assignment you can declare them const and set them via static initializer like this:
const int number_of_tasks = get_preconfigured_number_of_tasks();

If your global variables are used to hold compile time constants, then it is perfectly fine to replace them with enum members or preprocessor defines. Doing so will ease up on compiler, because it can use immediate value in-place without memory access.

Credit goes to Pete Becker for pointing Singleton issues in his comment. If those issues bother you too, then totally different approach can be taken.
Remember how Java programs are implemented? There is main class with main method and all program's work runs from inside that main method. Main is still member function, i.e. it can exclusively access some private fields of the main class (they have to be static in case of Java, but this is not the main point here).
We can further extend the concept to Command-like implementation. The difference with conventional Java is that your main method equivalent is not static and your global variables with values specific to contained program are non-static member variables. All functions that need access to global state data are to be converted into member functions. This is possible, because main method is also member function.
This way, I think, you can achieve better encapsulation and data safety.
Comment: A singleton is overkill for constants, and provides only an illusion of safety for global data. The problem with global data is that it can be modified from any source file, so it's hard to see where a particular change was made. Making it a singleton doesn't change that. The only benefit I'm aware of from using a singleton is that it reduces order of initialization problems. But order of initialization problems arise from excessive use of globals; reducing the use of globals also reduces these problems, as well as reducing the debugging issues that globals present.
Comment: @PeteBecker I do agree with you regarding data control, especially if singleton is just a dumb object without getters/setters. In this case Singleton is not meant to bring advantages OP did not ask for. I have drawn it only to represent more ordinary way, which common programmers like me would expect. It is certainly an overkill for constants, thats why there are other alternatives.
Comment: it doesn't matter whether the object you get from a singleton has getters and setters. It's still global data. The getters and setters are no more useful and no less useful than they would be with just plain global data.

Global variables and MPI


Correlation between Ripple and Bitcoin

Question: Is there a correlation between the value of Ripple (XRP) and Bitcoin (BTC)?
Comment: Price correlation, most likely, but technical analysis is probably outside the purview of this site.
Comment: I agree about price correlation, but why would the question be offtopic? It's not "technical analysis" so much, as just a question of finding historical data and plugging them into the equation. It can easily be answered factually.
Answer: Bitcoin and Ripple's past 90 days prices somewhat correlated
Using price charts of the last 90 days in XRP/USD and BTC/USD, the daily prices of Ripple and Bitcoin appear to be somewhat correlated: Their correlation coefficient comes out as 0.741.
Correlations in Coingecko's Top Ten
I've proceeded to check the past 90 days correlations of the top ten cryptocurrencies as listed on Coingecko.com:

In the past ninety days:

Litecoin and Bitshares had a correlation of 0.93, as had Litecoin and NXT.
Bitcoin appears to be most correlated with Ripple and Litecoin, both 0.74.
Bitcoin appears to be least correlated with Stellar, at -0.19
The least correlation appears to be between Dogecoin and Monero at -0.05.

Procedure
All data was taken from Coingecko's last 90 days pricecharts on 2015-06-08. Therafter, I plugged them into LibreOffice, and ran Correl(A;B) on each pair.
Answer: In general, when bitcoin is rising, all the others cryptos do, and vice versa. You can say that bitcoin is leading the crypto in general, so any upthread in bitcoins rate usually leads to the raise of most of the alts
Comment: Could you please support that opinion with a reliable source or some numbers? So far it sounds like anecdotal evidence to me.

Correlation between Ripple and Bitcoin


How to abort shutdown in Windows Vista and 7 programatically?

Question: In the second example (in the section examples) on this link, there is a description on using WM_QUERYENDSESSION to abort a shutdown. It also states that this does not work on versions of windows later than XP. This is conflicting with the advice given on another question here at stackoverflow. What is the correct answer? I do not have a computer with either so I am unable to test.
Answer: If anything else fails, remember that from command line it is shutdown.exe -a; maybe you could invoke this using the Process class.
EDIT. When mentioning the Process class I happily assumed that the question was about .NET programming, now I see that .NET is not mentioned neither in the question nor in the tags. Anyway I believe that there are ways to run executables from other programming environments as well.
Comment: You are right that this is a possibility. It just seems like a hack, so I was hoping for other possibilities.
Answer: Some applications got the WM_QUERYENDSESSION handling wrong (Not passing to DefWindowProc, they incorrectly returned 0 even though they did not intend to block shutdown) and so MS changed it with Vista, you now need to call ShutdownBlockReasonCreate()
@Konamiman: shutdown.exe -a will abort a "scheduled" shutdown yes, but not a "normal" shutdown by someone calling ExitWindowsEx()


Usage of "either" or "both"

Question: When you hate both books, do you say
   ● "I don't like both" or
   ● "I don't like either" ?
Comment: Please also visit [ell.se]
Answer: Both are perfectly grammatical but mean different things.
Both is an odd word: it is one of few English words that is still dual, which is to say that it refers collectively to two entities--no more and no less.  Either also refers to two entities, but it does so individually.  Take the following example:

Both men are here.
Either man is here.

You will have noticed that, in both cases, there is the implication of two men being in question; however, you will also have noticed that the first sentence gives explicit reference to both of them, whereas the second only gives such reference to one.  The second sentence alerts us of two men's existence, but quietly lets us know that only one of them is present.
With this is mind, let us move on to your question:

I don't like both.
I don't like either.

The first sentence means that you dislike the two things collectively; as such, each on its own may or may not be likable, or perhaps one is likable but the other is not.  The second sentence means that you dislike the two things individually, which precludes liking one but not the other.
Comment: [An article](https://jakubmarian.com/both-vs-either-in-english/) on the topic.
Answer: You would say "I don't like either one".
Comment: Right. But oddly enough, you would also say "I dislike them both," not "I dislike either one."
Comment: Or, as the OP wrote, "I don't like either".  @SvenYargs *Dislike* isn't a trigger for negative polarity items (NPIs).  You also can't say *\*I dislike them **at all***, but *I don't like them **at all*** is fine.
Comment: The *one* there is optional and that's not even the question anyway.
Answer: I like them both, I dislike them both, I don't like either.
Actually I don't really dislike either of them, I just didn't think they were very interesting.
I want them both, I reject them both, I don't want either.
Answer: "I don't like both"
is appropriate when you speak generally of the author's books:  'I don't like both of Third's books'
"I don't like either"
is appropriate when you name Third's books: I don't like either The Blank e Blank or The Blank the Blank

Usage of "either" or "both"


How to troubleshoot the wordpress issue when the site is migrated from one host to another?

Question: My original website name was www.xxx.com. However, I am not using that anymore. I am now using raspberry pi as a web server. After migrating to new database and domain - www.xxx.blogsite.xyz, I see that my website is not getting launched. I don't even see the dashboard for myself. How can I debug or troubleshoot this. I see that my apache is running fine. Also, I have tried restarting it. I can't access myphpadmin using public address or hostname. However, I can use myphpadmin using local IP address. Is something wrong with my dynamic dns setting?
Answer: Have you reviewed the "Moving an Existing Installation to a New Server or Location" here:
https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location
?


How to get rid of small thin worms?

Question: I have thousands of small thin worms stuck to my outdoor windows, walls, and pavers. They are all dead. They are all in one corner of my house. I have never seen them alive. We clean then off and then they just come back. There is a downpipe nearby, if that is relevant. I would like to get rid of the worms but do not want to kill any of the plants in the same area. The dead worms are mainly straight, few are curled up. The worms are a bit brown, red, see through with what looks like black food through the centre of the worm. They do not have legs. I live in Australia and the downpipe mentioned above is connected to guttering. I am not sure if the worms appear after rain, I have only seen one alive.
Comment: Hi Stuart, as they say, a photo is worth a 1000 words. Please post a few. It will help users respond with a more definitive answer
Comment: Do the worms appear after its been raining? Or is it every day they're there? What part of the world are you in and can you add a photo or two of the affected area, with or without worms present please. And the downpipe you mention, is it connected to the guttering or a wastewater pipe?
Comment: @RohitGupta, I have added a photo to the original post.
Comment: @Bamboo. I live in Australia and the downpipe mentioned above is connected to guttering. I am not sure if the worms appear after rain, I have only seen one alive. I have added a photo to the original post.
Answer: <take this advice with a bag of salt meaning don't trust it>
Eat eggs. Break up the shells. Pour them around the suspected worm sources. The shells shear soft tissue. Also provide nutrients to the garden.

How to get rid of small thin worms?