A word that means "based on sound and not-arbitrary principles"

Question: I am describing a new experimental method in a research paper, which has the benefit that all of the input parameters are not arbitrary and are instead determined using basic principles from the available data.  As in my subject heading, is there a good word for this?  A sample sentence would be "We propose a new ________ method that does not suffer from the arbitrariness of parameter selection that is common in existing approaches."
Comment: I expect the exact word you're looking for is too specific and technical to exist. What seems more suitable to your specific example would be to say something which more generally describes the quality of the method is now better, rather than saying something is now true which wasn't true before (e.g. "We propose a new, more rigorous method...", although I'm not sure whether "rigorous" is the best option here).
Comment: What you mean by 'Arbitrariness' Are your competing methodologies' parameter selections based on 'chance', 'whim', or 'impulse.' Are you using it to mean something else? Does the term have a specific meaning in your field which differs from what I understand. I feel like a better understanding of what you are contrasting will help us to find the perfect word for your more reasoned approach.
Comment: I don't have the rep to answer, but I might use the word *systematic* in a situation like this, emphasizing that you are not making decisions as you go. I am also reminded of the situation in Machine Learning, where algorithms are described as *supervised* and *unsupervised*, according to whether human input is required to make them work.
Answer:
We propose a new well-founded method that does not suffer from the arbitrariness of parameter selection that is common in existing
approaches.

well-founded (adj.)

Based on excellent reasoning, information, judgment, or grounds
m-w

If you say that a report, opinion, or feeling is well-founded, you
mean that it is based on facts and can therefore be justified.
Collins

Having a foundation in fact; based on good reasons, information, etc.
dictionary.com

Ecotoxicological studies, especially those concerned with biological
monitoring and standardisation of..., are exceedingly difficult in the
absence of a uniform, well-founded experimental procedure and
quantitative treatment of the results obtained. S. A. Patin;
Pollution and the Biological Resources of the Oceans

However, to the best of our knowledge no systematic ways, i.e. based
on a well-founded methodology and guiding principles, for building
geospatial ontologies have been proposed so far. C. Claramunt et al;
GeoSpatial Semantics: 4th International Conference

And a poorly designed experiment leads to a weak scientific
result—even the most sophisticated method of analysis cannot change
that. On the other hand, a particularly well-qualified cook can still
get "that certain something" out of a good recipe and a well-founded
analytical method can derive an even more significant scientific
insight from a well-design experiment. J. Weimann and J. Brosig-Koch;
Methods in Experimental Economics
Comment: I believe their Cobuild dictionary uses this style for what other dictionaries call "usage notes." These are aimed more at learners. This is not the definition style in my print collegiate-size Collins.
Comment: The term "well-founded" has a number of specific (and partly related) meanings within mathematical logic and related fields (including statistics and theory of computation) that have nothing to do with parameter selection. If you're working in those fields, or adjacent to them, I would not use this term unless your method actually matches its specific definition within your field.
Comment: Has Collins always phrased their definitions with this colloquial "If you say that..." structure? It's the first time I encounter this in a dictionary.
Comment: Of course the OP should verify that an adjective is suitable. Since the question contains *experimental method, input parameters*, and *data*, I think *well-founded* is a reasonable candidate, whether or not there is a connection to *foundational* issues, such as those in math and logic.
Answer: rigorous:
OED

3. Extremely detailed and thorough; precise, or concerned with precision; strictly accurate or exact.
1651   T. Hobbes Leviathan i. viii. 34   In Demonstration..and all rigourous Search of Truth, Judgement does all.
1954   H. Becker in H. Becker et al. For Sci. Social Man v. 147   It was so rigorous in method that it still serves as a reprimanding example to those who think that 'description is easy'.
2003   G. J. Dorrien Making Amer. Liberal Theol. 1900–50 iv. 265   Wieman lectured that in the rigorous sense of the term, all knowledge is scientific.
Comment: Rigorous does not mean "determined using basic principles from the available data".
Comment: I disagree that "rigorous" means "non-arbitrary," or even "sound." The OED definition quoted in this answer doesn't support those meanings.
Comment: I appreciate your perspective. Reading beyond the title, OP is looking for a term that means "determined using basic principles from the available data". I agree that rigorous is adjacent to a correct answer, and you have provided compelling support for that.
Comment: @jimm101 - exactly - that is why it is appropriate.
Comment: Re-read OP's question?
Comment: See the title... **A word that means "based on sound and not-arbitrary principles"** (no mention of first principles in the title.) The essence of the method is that the input parameters are not arbitrary. Being arbitrary is not rigorous. Being sound is rigorous.
Comment: @LarsH If something is arbitrary and unsound, can it ever be "rigorous"?
Comment: Even if it cannot, that doesn't imply that 'rigorous' means 'non-arbitrary'. If I were writing a paper on quadrupeds, it wouldn't make sense to make the title about 'cats,' even though cats are quadrupeds.
Comment: @LarsH *Even if it cannot, that doesn't imply that 'rigorous' means 'non-arbitrary'.* Of course it does: if it is rigorous, then it is not arbitrary: if it is arbitrary, it is not rigorous.
Comment: Implication is not the same as meaning, as demonstrated by the cat/quadruped analogy.
Comment: @LarsH - then I would have to ask why you wrote *Even if it cannot, that doesn't **imply** that 'rigorous' means 'non-arbitrary'.*... LarsH: it is clear that you have your own ideas. We will agree to differ.
Comment: Implication and meaning are both useful concepts. They just aren't the same.
Answer: The term grounded is well-suited for the purpose,

give (something abstract) a firm theoretical or practical basis

[Google's Oxford scraping (with apologies to the reference experts)]
with a little tweaking of your example sentence. A minor variation would be:

We propose a novel, well grounded method that does not suffer from the arbitrariness of parameter selection that is common in existing approaches.

The term's typical use requires a bit more massaging, but I think it accomplishes your goal.

We propose a novel method that has a well grounded theoretical basis, and does not suffer from the arbitrariness of parameter selection that is common in current approaches.
Comment: @IlmariKaronen That's not my experience. DJinTonic's answer of *well-founded* even smuggles that in: "Based on excellent reasoning, information, judgment, or **grounds**" [emphasis added]. Certainly you've come across someone basing a proposal on strong theoretical *grounds*?
Comment: As far as I'm aware, the term "grounded" isn't commonly used in any scientific context like the OP describes. If the OP is looking to coin a neologism, this could be a good option. If they're looking for an established term that readers familiar with their field will (hopefully) understand without explanation, it's not.
Answer: In the physics community, ab initio, Latin for "from the beginning", is widely used to describe research methods built on universal constants rather than arbitrary parameters. It's Latin, but perhaps it's ubiquitous enough to be considered a loanword to English.
For example:
ab initio nuclear methods or
ab initio quantum methods.
A search for "ab initio" on the arXiv, the major preprint server used for physics papers, yields thousands of titles including "ab initio".
You might say

We propose a new ab initio method that does not suffer from the arbitrariness of parameter selection that is common in existing approaches.
Comment: "ab initio" does not seem to fit what is required. There is nothing in the context to suggest "from first principles". The essence is a *method that does not suffer from the arbitrariness of parameter selection*
Comment: The questioner's phrase, italicized in your comment, strongly suggests a method grounded on foundational not arbitrary principles. In fact, several answers posted here rely on this interpretation (e.g. "well-founded", "grounded").
Answer: I would say robust:

strong and effective in all or most situations and conditions:

The system requires robust passwords that contain at least one number or symbol.
Our goal is to devise robust statistical methods.

(From dictionary.com)1
Your example sentence would become:

We propose a new robust method that does not suffer from the arbitrariness of parameter selection that is common in existing approaches.*

This is extremely common phrasing in the literature when talking about statistics, mathematics, experiments, computer systems, etc.
Comment: The term "robust" is commonly used to mean "resistant to errors", as in ["robust statistics"](https://en.wikipedia.org/wiki/Robust_statistics) or ["robust software"](https://en.wikipedia.org/wiki/Robustness_(computer_science)) or ["robust numerical methods"](https://en.wikipedia.org/wiki/Numerical_stability). It does *not*, in my experience, generally have anything to do with parameter selection (or lack thereof).
Comment: Here I agree with @IlmariKaronen. Although this is extremely common phrasing, it does not mean "determined using basic principles from the available data". To show robustness, you would need an extra step of showing the technique handles a wide range of inputs, not that the initial parameterization isn't arbitrary.
Comment: relevant: https://en.wikipedia.org/wiki/Robust_statistics eg: a winsorized mean is robust to outliers . a particular estimation method may be robust to departures from normality. i agree with the other comments that this usage seems a bit awkward but it might fit with some rewording -- the estimation method used to estimate the parameters  may be more robust than previous methods for example.
Answer: If you want to emphasize its opposition to "arbitrary," you've already got a great root word in "method." I suggest "methodological," though you wouldn't want to say "methodological method," so maybe change the noun to "approach," "system," etc.

methodological: "of, relating to, or following the system of methods, principles, and rules that regulate a given discipline" (https://www.dictionary.com/browse/methodological)
Comment: Relatedly, I'd suggest *methodical* as slightly more apt than *methodological*.  The definition you cite notwithstanding, *methodological* typically refers to something **about** the methods of a discipline (as the example from dictionary.com illustrates), while *methodical* means just **following** such methods.
Answer: This will probably depend on the context, but what about parameter-free?
I don't know what your field and the specific context are, but this is the first thing that came to mind when reading your question. Since for your model/method the (former) parameters are now determined from the data, they are fixed for a given dataset and you might not consider then parameters anymore. So you could have a "parameter-free method".
Comment: This seems like the best answer so far to me (with the possible — and possibly biased — exception of my own, which I was writing when this was posted). I'd +2 this if I could.
Comment: or non-parametric?
Answer: This is really a question about specialized scientific jargon, not about English in general.  As such, you should really consult an experienced researched in your field, or review relevant literature to find out what, if any, established term exists for this concept.  Any general answers from non-experts are likely to sound wrong or at least unusual to someone familiar with the established terminology in your field of study.
You also haven't specified what your field of research is.  From context and phrasing, I'm willing to guess that it's either applied math or statistics, or (probably more likely) some field of experimental or theoretical science that makes heavy use of numerical and statistical tools.  But that's about as close as I can get.  This makes your question difficult to answer even if one happened to be familiar with it, since it's quite possible for different fields to use different terminology.
That said, since I do happen to have some familiarity with numerical methods and their applications, let me suggest a few possible terms that might work.  As it happens, all of these have already been suggested in other answers (some posted while I was typing this), but I figure I should include them for completeness:

"Parameter-free", as suggested by Asier R., would be the obvious choice, and is used quite widely for methods like you seem to describe.  Of course, this term is strictly appropriate only if your method in fact requires no arbitrary parameters, rather than just fewer of them than usual methods.  If it still needs some, I guess you could always call it "quasi-parameter-free"…

"Ab initio", as suggested by mbdeaton, has a specific established meaning within nuclear physics and related fields such as quantum chemistry.  Its meaning is somewhat orthogonal to "parameter-free", and indeed one can find plenty of articles using both terms, but it does involve the same general goal of avoiding the need for arbitrary choices or assumptions by relying exclusively on fundamental physical principles.  That said, I would not use this term unless you're working in a field where it is an established term of art, and your method falls within its generally accepted scope in that field.

"Rigorous" (suggested by Greybeard) and "theory-based" (suggested by Vaelus) also both have specific connotations that go beyond "requiring no arbitrarily chosen parameters".  If your method in fact is rigorous (in the sense of being provably correct and making no unjustified assumptions) or based on theory (rather than empirical results), by all means use them.  If not, don't.

However, it's also possible that there is no exact term for the concept you seek, and it's also possible that you don't need one.  "We propose a new method that does not suffer from the arbitrariness of parameter selection" is a perfectly fine sentence, after all, even without any adjective between "new" and "method".
Comment: Saying *why* a new method  doesn't suffer from a common weakness seems preferrable to just saying it doesn't, and the OP is looking for an adjective summing this up.
Answer: Theory-based

(adj) theory-based (based in theory rather than experiment)1

"We propose a new theory-based method that does not suffer from the arbitrariness of parameter selection that is common in existing approaches."
Answer: A method that is "based on sound principles" is principled:

exhibiting, based on, or characterized by principle (Merriam-Webster)
But it must be done in a principled and clear-eyed way.
— Annabelle Timsit, Quartz, 23 Aug. 2021

Based on a set of rules. (Wiktionary)
While most of these efforts have focused on compressing the uplink, none of them provide a principled solution to compressing the downlink.

Principled can also have the meaning of "moral, honest," but as a description of a method in a scientific paper, most readers should interpret it as passing judgment only on the soundness of the method.
Answer: There are a lot of potential words that would fit your description, but for your actual sentence, I'd suggest "data-driven". This fits most nicely within your phrase.
Comment: I'm not sure that I'd think of "data driven" as meaning "based on sound and not-arbitrary principles".
Comment: I agree, this is the word I was immediately thinking of as well. It would be the right word if the parameters are neither arbitrary nor derived from some theory. At least in physics it is widely used.
Comment: "Data driven" could mean "determined using basic principles from the available data," but not really "based on sound and not arbitrary principles."
Comment: You can think that but you'd be wrong.
Answer: Rigorous
Is a word commonly used in the field of mathematics for describing ideas/theorems etc. which are based on sound principles. Although it may sound contradicting when you consider mathematics is probably the field the with most certain assertions, in the old times, mathematicians sometimes relied on "humanly intuitions" rather than solid mathematical principles. As the field of mathematics has been further improved people started to address this issue and they started to explicitly declare their work as rigorous, which is to say that their work didn't rely upon the so called humanly intuitions.
Comment: Rigorous has already been given as an answer (twice).
Comment: @KillingTime Multiple answers suggesting the same word might still be helpful for the people. For instance, due to the fact that I explain the usage of this word in a distinct context it may people working on specific fields.
Comment: @EfeZaladin The normal pattern here would be to put the additional explanation in a comment under the first. With a little more participation, you'll be able to comment.
Answer: It might sound boastful for you to call your own work this, but an elegant method in science or mathematics is one with "scientific precision, neatness, and simplicity."
This wouldn't apply if your method is extremely complex, tedious or unintuitive.  A phrase that might fit better in that case is, from first principles or derived from first principles.


Must try wines in Frankfurt region

Question: Some regions around Frankfurt are famous for their wines. When I was in Frankfurt last time, I tried their Apple wine and simply loved it. This time, I will be in Frankfurt for a longer period and would like to try some more of their famous wines. I have not tried any special wines before and most probably will not spend a lot on wines. So please suggest something for a beginner within budget that is available in Frankfurt main city area.
Answer: I would spend your limited time and money just tasting wines from one region.  Nahe is a smaller wine region just west of Frankfurt, and I've found the wines there to be good quality, with individual charm (in other words, without the sense that they are mass-produced).  More info here
By all means, talk to locals: the people you're visiting, the clerk in your hotel.  That's almost always a great way to discover something.
Comment: Tasting to a pattern or strategy is a great idea.  An alternative to tasting from a single region is to taste a single varietal (Riesling or Silvaner or Grüner Veltliner) from different makers or regions.  The suggestion to seek out local recommendations is excellent.  Best of all is to bring a friend and talk about what you're tasting.

Must try wines in Frankfurt region


bottom bracket clunking noise

Question: When cycling my bottom bracket sometimes starts to make a clunking noise, I can get rid of the noise normally by doing one or two strong pedal strokes. Is this anything serious does the bracket need to be looked at?
Comment: First, make sure that the problem is not a loose crank arm, as this can quickly destroy the arm and the crank axle.  (Ie, this would be an "emergency".)  Next, consider that the BB cartridge (if it is a cartridge setup) may be loose -- tightening the cups holding it may cure your problem.
Comment: I agree with what Daniel said. But I'd say to check the pedals too as I've had noisy pedals before and suspected the bottom bracket initially before finding out otherwise.
Comment: If it is a loose crank arm and it was a square taper kind then it would be ruined by now and it will be wobbling and maybe even loosening the crank bold by itself.
Comment: Freewheels can also cause clunking noises. If your bike has a freewheel then get the rear wheel off and try to move the freewheel up and down (don't spin it, but rather rock it vertically) and check for any movement. If it moves then its bearings are worn out and you most probably need to replace it. Such a freewheel might fail completely and start to spin in both directions freely if you continue to ride with it. That wouldn't cause damage to other parts, but if you ride for a long distance then it might leave you stranded away from home.
Answer: First, it may not be your bottom bracket.  Creaks and clunks are notoriously difficult to localize.  If you can reproduce it with the bike on a stand (or upside down on the ground), it may be easier to know for sure.
If it is your bottom bracket, you should replace it (or less commonly, replace only its bearings, depending on the type of bottom bracket).
If you continue to ride, eventually it will probably get worse, but this won't harm anything other than the bottom bracket, so it's not particularly urgent.
Comment: @BTeam: Another alternative would be to just replace the BB with a modern cartridge type BB - not as "authentic", but less work and probably more durable. This of course assumes there are compatible cartridge BBs...
Comment: Okay thanks! I will probably replace it then, I have a 1980's raleigh royal that I bought 2nd hand and I am just starting to realise that regardless of what the guy who sold it to me said all the 'original parts' are so rusted that I need to replace them all and so it's just another thing to the list!
Comment: @goods You'll have to look into the archives on how to adjust and change a very old BB like that. It would be good to take it apart, degrease it and repack it with new grease in the very least. There is also a real possibility that you could simply have a loose BB cupset and it needs tightening.
Comment: @sleske: That is true. They are less maintenance. I was thinking of the cheapest route though. Ball bearings are pennies a piece. Good thinking though.

bottom bracket clunking noise


FAQ: request context and threat models

Question: Perhaps more so than for other Q&A sites it seems to me that context often matters a lot, as does the threat model envisioned by the questioner.  Is there a good general way to ask for that sort of info near the top of the FAQ?  We're getting a lot of very general questions that would require a long essay to cover variations based on low-threat environments vs high-value targets.  Perhaps blending it into the the guidance on how we want practical questions to actual problems people are having?
Answer: I'm proposing a short addition to the FAW in this answer. I've made it community wiki (assuming I remember to hit the button) - if you want to improve it, please jump in and make edits :). I don't mind if not a single word from my version makes it into the final answer, as long as we agree what we want to say.
What background should I give in my question?
Security is a very contextual topic: threats that are deemed important in your environment may be inconsequential in somebody else's, and vice versa. Are you trying to protect something of global value against Advanced Persistent Threats?  Or are you looking for a cost-effective approach for a low-profile small business? To get the most helpful answers you should tell us:

what assets you are trying to protect
who uses the asset you're trying to protect, and who you think might want to abuse it (and why)
what steps you've already taken to protect that asset
what risks you think you still need to mitigate

This is essentially a summary of your threat model, or risk profile, if you've already created one. Providing this information will also help you organize your own thoughts about your security issues.
Further information on the context is often also helpful.  Does it involve a web app or desktop; employees or general public; Windows/Linux, Python/Java, Europe/Singapore, etc.
Comment: damn, "FAW" got edited out :(
Comment: Right - popped it into the start of the FAW, and added a line referring to the Scoping Question as well - http://meta.security.stackexchange.com/q/180/485. Can everyone have a look and let a mod know if we need more changes?
Comment: Thanks, Graham.  Nice work folks!  I've also added another proposed change, to the first line of the FAQ, as another answer.
Comment: Hmm - looks like a previous version of this answer has already made it into the faq.  I suggest a bit more discussion (on each section) and a further update.
Comment: @rory Thanks for updating the FAQ.  What do you think of my last update?
Answer: While we're at it, I'm going to propose updating the first line of the FAQ also.  Feel free to edit this - it is "community wiki".

IT Security - Stack Exchange is for IT security professionals to discuss protecting assets from threats and vulnerabilities.  Topics include web app hardening, network security, phishing, risk management, policies, penetration testing, tools and using cryptography.  If you are a home user you may be better served by asking your question at superuser.com.
Comment: I like this wording - have edited it on already. Feel free to comment if alternatives work.
Answer: Sure, this is a good candidate for the type of topic-specific clarification that can go in the top of your /faq.
(this section of your faq is editable by diamond community mods, right now)
Answer: @nealmcb - excellent idea. Have you some thoughts on a paragraph or two on this?
Comment: @avid I actually found the wikipedia language pretty confusing, and finally think I've gotten closer to understanding the common confusion, with Microsoft using threat model to mean what many mean by attack model, via the post at http://taosecurity.blogspot.com/2007/06/threat-model-vs-attack-model.html   And yeah - "risk profile" sounds potentially useful to me, so long as we don't veer off into financial security questions :)
Comment: @nealmcb - just take into account that when you say "threat model", different people understand different things...
Comment: @avid There are two meanings, and several approaches, given at http://en.wikipedia.org/wiki/Threat_model (which is of course a fine source of CC-licensed content) - how do they sync with what it means to you?  Is there a clearer term for the background that would help us foster good questions and answers?
Comment: @nealmcb - hehe, no I understood that you meant *the other meaning*, I just sometimes have to do a double take... It's definitely fair use, though - just thought I'd mention that if its going in the FAW, it should be noted that there are those that are likely to misunderstand. Perhaps, "risk profile"?

FAQ: request context and threat models


coinbase, where is my btc and will i get bch

Question: so I wasn't sure what would happen in the forking fork, bright spark that i am i sent my btc to coinbase from a multi bit wallet on 31st july, so far seen only by 1 peer, hasnt turned up in coinbase, will it? has the fork swallowed my btc? has coinbase swallowed any bch attached? can it be cancelled as it isn't showing on the chain  at present, would i still get any bch attached if returned to an old multi bit wallet only set up for btc? questions questions..please help
Answer: There was an announcement sent out by Coinbase on the 27th explaining that they would not be honoring BCH. Coinbase effectively swallowed your attached BCH but should honor your BTC.
Your transaction cannot be cancelled just because the chain hasn't finished verifying it. Additionally, because of the replay security in the BCH blockchain your transfer already happened and the BCH will be created for the account that the BTC was transferred to, namely Coinbase's account, which again does not recognize BCH.
Comment: You will get your BCH on 1st Jan 2018
Answer: Announcement: As of December 19, 2017 Coinbase will add Bitcoin Cash to our assets. Coinbase customers in qualifying countries will now be able to buy, sell, send and receive Bitcoin Cash.
What is Bitcoin Cash?
Bitcoin Cash (BCH) is a direct result of a Bitcoin fork that occurred on August 1, 2017. It is an alternative version of Bitcoin that makes use of new features and rules, and has a different development roadmap. For more information about Bitcoin Cash, please visit https://www.bitcoincash.org.
How do I get Bitcoin Cash on Coinbase?
Coinbase customers have automatically been credited with the appropriate amount of Bitcoin Cash for their accounts. These funds appear within a separate Bitcoin Cash wallet on your Accounts page or in the Coinbase mobile apps.
You can also obtain additional Bitcoin Cash by purchasing it on Coinbase, or trading on GDAX.
How much Bitcoin Cash will I receive?
The amount of Bitcoin Cash you receive will be the amount of Bitcoin that was in your account at the time of the fork. The fork occurred on August 1, 2017 at 5:16:14 PST and on block #478558. Please note you will not receive Bitcoin Cash for any Bitcoin you removed from the platform before the fork, or purchased after the fork.
How can I trust that Coinbase knows the exact amount of Bitcoin Cash that was in my account at the time of the fork?
At the time of the fork, we duplicated the current balance of all Coinbase customer accounts. Customers can download a copy of their transaction history to see a running log of their balance for each Bitcoin wallet.
If my Bitcoin was in my Coinbase Vault at the time of the fork, will I still receive my BCH?
Yes, you will still receive your Bitcoin Cash funds. All BCH will be credited to a single BCH wallet in your Coinbase account.
What if I sent BCH to my Coinbase BTC wallet after the fork, but before Coinbase added support for Bitcoin Cash?
Any BCH sent to your Coinbase account addresses has been credited to your new BCH wallet.
I sent my funds off of Coinbase before the fork. Will I still get my BCH?
No. If you sent Bitcoin off of Coinbase before the fork, you will not receive Bitcoin Cash from Coinbase. If you sent to another exchange and did not receive your BCH, please contact their support team.
Can I send BCH to Coinbase?
You can send BCH to and from Coinbase the same way you send all other assets on the platform. You can select the "Deposit" button next to your BCH wallet to view your BCH deposit address.
What happens if I send Bitcoin Cash to a Bitcoin address?
At this time, Coinbase has already credited accounts who received any BCH at their existing BTC addresses. Going forward, we cannot guarantee that funds will be properly credited when one asset is sent to the address of a different asset. Please make sure that you only send funds to the specific deposit address displayed in your Coinbase account for the asset you are sending. You can view a list of these addresses, or create a new one, by visiting this page.
If you have sent BCH to an external address that was used only for BTC, you will need to obtain the private keys for that address and import them into a BCH wallet in order to access the funds stored there. Coinbase does not support the importing of private keys.


Sylow Subgroups

Question: I had been looking lately at Sylow subgroups of some specific groups and it got me to wondering about why Sylow subgroups exist.  I'm very familiar with the proof of the theorems (something that everyone learns at the beginning of their abstract algebra course) -- incidentally my favorite proof is the one by Wielandt -- but the statement of the three Sylow theorems still seems somewhat miraculous.  What got Sylow to imagine that they were true (especially the first -- the existence of a sylow subgroup)?  Even the simpler case of Cauchy's theorem about the existence of an element of order $p$ in a finite subgroup whose order is a multiple of $p$ although easy to prove (with the right trick) also seems a bit amazing.   I believe that sometimes the hardest part of a proving a theorem is believing that it might be true.  So what can buttress the belief for the existence of Sylow subgroups?
Comment: Qiaochu:  That the existence of Sylow subgroups is true for abelian group doesn't strike me as a good reason to expect it to be true in general finite groups.  In a finite abelian group there is a subgroup of every size which divides the size of the group.  That's certainly not true in finite groups in general. And I don't think Sylow could have been inspired by any analogy with eigenspace decompositions; the question asked what Sylow's motivation was.
Comment: This question would benefit from a title in the form of a question
Comment: I just looked at the very nice paper by Waterhouse "The Early Proofs of Sylow's Theorem" which, among other things gives Sylow's original proof which is quite nice, and in fact corresponds to the way that modern computer algebra packages find Sylow Subgroups.  It also refers to a (by now obscure) result of Cauchy, where, among other things he gives an explicit construction for the p-Sylow subgroups of $S_n$.
Comment: Have you ever seen the proof of Sylow in the excercises to Jacobson's Basic Algebra I?  It's one of the slickest proofs I've ever seen (I mean, I did the problem, but he leads you to this slick solution.)
Comment: @fpqc - I think you're talking about Gallagher's proof of a generalization: the number of subgroups of order $p^k$, where $p^k$ divides $|G|$, is 1 mod p.
Comment: Also take a look at Rod Gow's "Sylow's Proof of Sylow's Theorem", Irish Math. Soc. Bulletin 33 (1994), 55--63.
Comment: @Steve D: Yes, that's the one!
Comment: A basic reason is that it's the simplest possible thing that could be true (at least existence).  For example, it's true in the simpler situation of finite abelian groups, which one should think of as Z-modules in analogy with the corresponding statement for C[x]-modules (e.g. eigenspace decomposition).  But maybe you want something a little more specific.
Comment: I've also been looking at finite Semigroups and monoids lately, and (at least to me) they're strange beasts.  As far as I can see there is no analogy of sylow's theorems for them.  The big structure theorem is the Krohn-Rhodes decomposition theorem.
Comment: Victor, if you haven't studied finite solvable groups in depth yet, you should look at how Hall subgroups generalize the sylow's theorems for finite solvable groups by extending the results from p-groups to pi-groups.
Answer: Victor, you should check out Sylow's paper. It's in Math. Annalen 5 (1872), 584--594.   I am looking at it as I write this.  He states Cauchy's theorem in the first sentence and then says "This important theorem is contained in another more general theorem:  if the order is divisible by a prime power then the group contains a subgroup of that size."  (In particular, notice Sylow's literal first theorem is more general than the traditional formulation.) Thus he was perhaps in part inspired by knowledge of Cauchy's theorem.
Sylow also includes in his  paper a theorem of Mathieu on transitive groups acting on sets of prime-power order (see p. 590), which is given a new proof by the work in this paper. Theorems like Mathieu's may have led him to investigate subgroups of prime-power order in a general finite group (of substitutions).
Comment: What I like about Sylow's paper is that he uses Cauchy's theorem of the existence of an element of order $p$ to "boot strap" up to a maximal $p$ subgroup.  Once one accepts Cauchy's result it makes clear why you would expect such subgroups to exist.  Since Cauchy proved it by giving an explicit construction for $S_n$ Frobenius' proof is interesting since it gives a way of transferring that construction to a general finite group.
Comment: Thanks, I'm looking at it now.  I also found a paper by Scharlau "The Discovery of the Sylow Theorems" (in German).  The first paragraph of the Math. Reviews review is:

The author evokes primarily the works of Sylow that antedate 1872—the date of the first publication of Sylow's famous theorems
—and proposes to provide answers to the following questions: How did Sylow arrive at the formulation of his theorems, what were the mathematical techniques at his disposal, what was the influence of his contemporaries, and what hopes did Sylow have for his work?
Answer: The Sylow theorems are finite group analogues of a bunch of results about "maximal unipotent subgroups" in algebraic groups. Basically, the Sylow subgroups play a role analogous to the role played by the maximal unipotent subgroups.
In the case where the group is the general linear group, the maximal unipotent subgroup can be taken as the group of upper triangular matrices with 1s on the diagonal, for instance. There are existence, conjugacy, and domination results for these analogous to the existence, conjugacy, and domination part of Sylow's theorems: maximal unipotents exist, every unipotent is contained in a maximal unipotent, all maximal unipotents are conjugate. The role analogous to "order" is now played by "dimension".
The normalizer of the Sylow subgroup plays the role of the maximal connected solvable subgroup, also called the Borel subgroup (see Borel fixed-point theorem and Lie-Kolchin theorem). In the case of the general linear group, this is the group of upper triangular invertible matrices.
There are similar results for Lie algebras too, basically arising from Engel's theorem and Lie's theorem.
In fact, much of the study of simple groups and their geometry relies on this geometric interpretation of Sylow subgroups, p-subgroups, and their normalizers. This deeper study of the geometry/combinatorics of simple groups is called local analysis in group theory and is closely related to the recently popular topic of "fusion systems" which are essentially studying the conjugation action of a group on subgroups of a particular Sylow subgroup.
ADDED BASED ON COMMENT BELOW: For a finite field $F_q$ where q is a power of p, the maximal unipotent subgroup of $GL_n(F_q)$ is the $p$-Sylow subgroup. I had originally intended to mention this, but forgot.
Comment: That's a very good point! By the way, something that you probably thought too obvious to mention when revealing this remarkable analogy, is that for GL_n(F_p), maximal unipotent subgroups ARE Sylow subgroups :-)
Comment: All this, though, cannot have been what suggested the Sylow theorem to Sylow!
Comment: Yes, that's true, because Sylow was thinking of things in terms of permutation groups, and to the best of my knowledge did not explore the connection with linear groups or algebraic groups. Still, it's worth noticing that there are multiple reasons why one might suspect a statement to be true, or at least plausible.
Comment: Yes, I had forgotten to mention that. Not just GL_n(F_p), but also GL_n(F_q) where q is a power of p.
Answer: An extension of the Vipul's ideas can be found in the article (couldn't find a link to the pdf with google)
Subgroup complexes by Peter Webb,
pp. 349-365 in: ed. P. Fong, The Arcata Conference on Representations of Finite Groups, AMS Proceedings of Symposia in Pure Mathematics 47 (1987).
But as Mariano already commented, the analogy to the maximal unipotent subgroups of the general linear group was probably not Sylow's motivation. As commented before, he was maybe looking for maximal $p$-subgroups (i.e., maximal with respect to be a $p$-subgroup).
This is also the leitmotif of my favorite proof of the Sylow theorems given by Michael Aschbacher in his book Finite Group Theory. It is based on Cauchy's theorem (best proved using J. H. McKay's trick to let $Z_p$ act on the set of all $(x_1, \dots, x_p) \in G^p$ whose product is $1$ by rotating the entries) and goes essentially like this:
The group $G$ acts on the set $\mathrm{Syl}_p(G)$ of its maximal $p$-subgroups by conjugation. Let $\Omega$ be a (nontrivial) orbit with $S\in\Omega$. If $P$ is a fixed point of the action restricted to $S$ then $S$ normalizes $P$ and $PS=SP$ is a $p$-group. Hence $P=S$ by maximality of both $P$ and $S$, and $S$ has a unique fixed point. As $S$ is a $p$-group, all its orbits have order $1$ or a multiple of $p$, in particular $|\mathrm{Syl}_p(G)| = 1 \bmod p$. All orbits of $G$ are disjoint unions of orbits of $S$ proving $\Omega = 1 \bmod p$ and $\Omega' = 0 \bmod p$ for all other orbits $\Omega'$ of $G$. This implies that $\Omega = \mathrm{Syl}_p(G)$, as $\Omega$ was an arbitrary nontrivial orbit of $G$, showing that the action of $G$ is transitive. The stabilizer of $S$ in $G$ is its normalizer $N_G(S)$, and as the action is transitive $|G:N_G(S)| = |\mathrm{Syl}_p(G)| = 1 \bmod p$. It remains to show that $p$ does not divide $|N_G(S):S|=|N_G(S)/S|$. Otherwise, by Cauchy's theorem there exists a nontrivial $p$-subgroup of $N_G(S)/S$ whose preimage under the projection $N_G(S) \to N_G(S)/S$ is $p$-subgroup properly containing $S$ contradicting the maximality of $S$.
Answer: I don't know if this was the original motivation, but this has some interesting motivating ideas:
Abstract nonsense versions of "combinatorial" group theory questions

Sylow Subgroups


What is the benefit of an ovarian-sparing spay?

Question: What is the benefit of an ovarian-sparing spay? It seems like this would be a great way to avoid Pyometra but also keep the benefits of hormones. Ovarian cancer would still be a risk but I don't know the rate of occurrence on that.
Comment: I had an ovary sparing spay done for my Mastiff when she was about 15 months old. She had not gone into her first heat at that point. About 4 months after her surgery, shewent through her first heat. No mess, but yes, she did still attract male dogs. We didn't really have any issues though. The heat lasted about 3.5 weeks, during which she was a bit mopey and less energetic. All in all, I would highly recommend the ovary sparing spay, although if your bitch is a show dog, I would think you'd be discouraged to show her during her heat cycle, as she would present a distraction for the male dogs.
Answer: An ovarian-sparing spay means that you still get the hormones. However, this also means that you still get the heat cycles. Removal of the ovaries generally causes the metabolism to slow down somewhat, which can result in weight-gain. Keeping the ovaries avoids this issue if it is a concern.
When I researched this issue in the past, it mostly seemed to come down to whether or not you were comfortable with your pet continuing to have heat cycles and whether or not you were comfortable with the hormonal/metabolism changes and potential weight-gain. Some conditions become lower risk with the removal of the ovaries (certain forms of cancer, for eg.). Some conditions become higher risk (eg. obesity). There did not seem to be a clear-cut "winner" from the information I read. That said, most of my research centered specifically around cats. There may be a more evident "best option" when applying the question to other animals.
Comment: but the heats would be "clean" heats right? No uterus no mess?
Comment: I wonder if the "clean" heats still attract males and if performance venues would still prefer you to pull from a trial if the your bitch was in season?


Conditionally format by day of the week

Question: How can I conditionally format cells in Google spreadsheets containing dates to have a different background according to the day of the week.
For example, if a date falls on Saturday or Sunday, set background color to yellow, else white.
Answer: I had been struggling with this for a long time, but finally cracked it:
Use conditional formatting on the column with the dates and type the following as a custom formula:
=or(WEEKDAY(A1)=1,WEEKDAY(A1)=7)

where A1 is the first date in the column.
This will apply the conditional formatting to all weekdays with a value of 1 (Sunday) and 7 (Saturday).
Comment: This is a good solution, thanks.  I'm accepting it. For my use I've adapted it to exclude blank cells:  ```=and(not(isblank(A1)),  or(WEEKDAY(A1)=1,WEEKDAY(A1)=7))```
Comment: Nice addition with the not isblank. I had been using it in a manner where I only used it for the range containing the dates, e.g. A1:A31. I also changed it from using > and < to = like you did. It's a little more straight forward that way. I guess I started out hoping for weekday numbering more like it is in my country where Monday would be 1 and Sunday would be 7. I don't know if this is the case if the country setting is changed.
Answer: Easy (but a bit tedious!) in new Google Sheets. For Conditional Formatting a new rule is required for each colour, roughly. (One colour can usually be skipped from rules and instead applied with normal formatting - which would be overidden where any of the conditions for CF apply.) So expect to repeat the basics of the following at least five times.
Say the column of dates is A. Select it, Format > Conditional formatting..., Custom formula is and enter:
=weekday(A1)=1

Choose the formatting required.
The final 1 above is for Sunday, other days follow in numeric order.
Repeat for the other required formats, adjusting the 1 as necessary.
Because these rules do not conflict (each date is only one specific day of the week) the order in which the rules are added (with "+ Add another rule") does not matter.
Comment: Building on this, a simpler way would be to do `=WEEKDAY(A1,2)>5` - This will hit both Saturday and Sunday and only require one rule
Answer: If the dates are in column A, select them, then do: Format > Conditional formatting... > Format cells if... > Custom formula and put
=and(isblank(A:A)=false, or(weekday(A:A)=1, weekday(A:A)=7))

Some explanation:
weekday(A:A) returns 1-7, for day of the week, and
or(weekday(A:A)=1, weekday(A:A)=7) returns true, if it's Sunday (1) or Saturday (7).
This would work on it's own, but for some reason weekday() on an empty cell returns 7, so isblank(A:A)=false also checks if the cell is empty. Now it colors a cell if it is both (not empty) and (sun or sat)
I also put A:A, as A1 would give offset results if the format range didn't start at the top (e.g. A5:A100 instead of A1:A100)
Credits to pnuts!
Answer: This is possible with a script. Go to Tools → Script editor... and paste in this script:
function onEdit(e) {
  var cell = e.range.getCell(1, 1);
  var val = cell.getValue();
  if ((val instanceof Date) && (val.getDay() == 0 || val.getDay() == 6)) {
    cell.setBackground("red");
  } else {
    cell.setBackground("white");
  }
}

Save the script (give the project a name) and go back to your spreadsheet.
Now, every time you edit a cell, this script will check to see if you entered a date and if the date you entered is a Sunday or Saturday. If so, the background of the cell will change to red. If it is not a date or it is not on the weekend, the background will change to white.
There are other color names you can use, or you can use a hex code to specify a different color.
Comment: Thanks, William.  Although the code looks sensible, for some reason, it doesn't quite work as expected.  It turns even-numbered days red and odd-numbered days white.
Comment: I changed the test in the `if` statement to be more straightforward. Does it work now?
Answer: To conditionally format cell A6, in which we have a date, I used the option under conditional format *Custom formula is* (bottom drop down) and put in the formula
=weekday(A6,2)<6

This is for condition on cell A6
If you want to mark the Saturdays & Sundays, use:
=weekday(A6,2)>5

Conditionally format by day of the week


Is it possible to be a Christian by birth?

Question: My parents are both Christians. When we were kids they always took us to church. Does that make me a Christian?
Comment: Colloquially, it is common to hear people say they were *raised* Christian or *born into* a religious family, but that has nothing to do with their own faith. In fact, most people I know who say that are not themselves Christians.
Comment: To the questioner: have you considered accepting an answer?
Comment: As a tangental theological point: I found out the other day many believe you can born into Judaism.
Answer: No.
God knows each one of us as a person, not just part of a family. This is clear even in the Old Testament:

Ezekiel 33:20 (ESV)
  Yet you say, 'The way of the Lord is not just.' O house of Israel, I will judge each of you according to his ways."

Looking at the Gospel in the New Testament, we see that again each of us is an individual to God:

John 3:16 (ESV)
  "For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life.

God saves whoever believes in Jesus from perishing. Only by believing, yourself, can you be saved.
Comment: Good answer, but wrong (I believe) explanation. Even those who are baptized at birth are done so not 'at birth' but later (at least 40 days.) The belief itself is not enough, but what follows from the belief, including 'enduring until the end' (as is repeated many, many times.) Thus while you cannot be born a Christian, you can effectively be 'born a Christian' if you were baptized as an infant.
Answer: No.
As Nicky Gumbel says on the Alpha course, "If you were born in a McDonalds, would that make you a hamburger?"
Furthermore, the Bible makes clear that we are all judged on our own standing with Jesus, e.g. Acts 2:21: "... everyone who calls on the name of the Lord will be saved."
Comment: That actually happened a couple of blocks from my office.  http://www.courierpress.com/news/2010/dec/01/baby-born-mcdonalds-healthy-doing-well/?partner=RSS
Comment: This quote reminds me of the old saying: "God has no Grand-children"
Answer: It depends what you mean by "Christian". The term has been used for millenia to refer to Christ's followers. However, one can follow Christ for a time, but never have truly believed in him, and eventually fall away. On the other hand, I typically associate "Christian" with someone who is truly saved. The term can mean different things to different people.
In fact, there have been some terms coined just for these types of discussions. One such distinction people have made is between the "invisible church" and the "visible church". The visible church is made up of, essentially, people who self-identify as Christians. Those whose parents are Christians and take them to church every Sunday would fall into this category.
I would even go further to argue that there are certain privileges afforded children of believing parents. These children may have the opportunity to hear the gospel and scripture on a regular basis. The may see modeled how a Christian marriage and family should look. The may learn how to pray. They may have the loving support of a church body.
However, these privileges are earthly privileges.
On the other hand, is the invisible church. This is made up of all people who truly belong to the Lord, both living and dead, whether or not their parents are Christians, and whether or not they were in church this past Sunday. The privileges afforded these people is beyond compare.
One thing you will find made clear in the New Testament time and time again is that salvation is through faith alone in Christ alone.
In Jesus' day, it was thought that being a descendent of Jacob was sufficient for salvation. Paul rejects this explicitly at several points in the book of Romans. In Romans 2-3, he argues that Jews are not automatically saved, and again in Romans 9, he says "not all who are descended from Israel belong to Israel" and "This means that it is not the children of the flesh who are the children of God, but the children of the promise are counted as offspring." (ESV). It is clear, then, that it is your own faith, not that of your parents, that causes you to be numbered among the saints.
Answer: YES
We see that John the Baptist was a Christian from the time of his birth.

Luke 1:66  (NKJV)
66 And all those who heard them kept them in their hearts, saying,
"What kind of child will this be?" And the hand of the Lord was with
him.

So it IS possible. But in reference to your question, your parents are Christian, so what does that make you? The answer is:
You're Holy

1 Corinthians 7:14
For the unbelieving husband is sanctified by the wife, and the
unbelieving wife is sanctified by the husband; otherwise your children
would be unclean, but now they are holy.

A Christians children are Holy because the parents have been blessed as a believers. Does this mean that you have already been saved from God's judgement? Unfortunately not. Because we know that each person will be judged by their own actions and not the actions of others.
Comment: Christian is a follower of Christ. How someone was a follower of Christ before Jesus appointed as the Messiah (Christ)?
Comment: I disagree. Christ means "one who has been anointed, symbolizing appointment to a task". Jesus' task was to give his life as ransom (Matthew 20:28). Jesus appointed by holy spirit when he baptized (John 1:32-34) and started his task a the promised Messiah. Of course Jesus had prehuman existence
(I don't believe in Trinity doctrine) but as the Word (John 1:1,2)
Comment: Because Christ created everything. Christ was the one that gave the law to Moses and spoke with him as a friend. Christ was the one that walked this earth in Genesis. A christian is a generalized title for "children of God"
Comment: Two different things... He certainly was a follower of Jesus, but he lived in the pre-atonement world.  Abraham was a God follower and looked forward to the Messiah, but he wasn't a New Testament Christian.  John the Baptist is considered an Old Testament saint.
Comment: John the Baptist was not a New Testament Christian in that he died prior to the atonement.
Comment: @Narnian so john the baptist wasn't a follower of Christ? Interesting, maybe you could go read more about john the baptist and what he testified to.
Comment: I think the JTB thing is a wee bit too out of our scope for it to be used as an example so lightly.
Answer: Catholic teaching is that you must be born again to be Christian, "unless one is born of water and the Spirit, he cannot enter the kingdom of God" (John 3:3-5). This second birth is the sacrament of baptism, where we are joined to Christ as members of his body (1 Corinthians 12:13, Galatians 3:27).
Baptism can be given to newborns, older children or adults. Baptism of little children is based on the faith of their parents, who promise to raise them in the faith. Baptism of older children and adults is based on their own profession of faith.
It is possible for those who have become Christian through baptism to later leave the faith by their own choice, thus becoming apostate, so baptism is no guarantee of salvation.
Comment: This Catholic teaching has persisted through any protestant denomination that I am familiar with.  The mechanism and ritual may vary, but the theory persists.  -- Although Calvinist derived protestants believe once saved, always saved.


Determining the last changelist synced to in Perforce

Question: A question that occasionally arises is what is the best way to determine the changelist that you last synced to in Perforce. This is often needed for things like injecting the changelist number into the revision info by the automatic build system.
Comment: `p4 changes | head -1` seems easier than most of these solutions.
Answer: I recommend the opposite for automatic build systems: you should first get the latest changelist from the server using:
p4 changes -s submitted -m1

then sync to that change and record it in the revision info.  The reason is as follows.  Although Perforce recommends the following to determine the changelist to which the workspace is synced:
p4 changes -m1 @clientname

they note a few gotchas:

This only works if you have not submitted anything from the workspace in question.
It is also possible that a client workspace is not synced to any specific changelist.

and there's an additional gotcha they don't mention:

If the highest changelist to which the sync occured strictly deleted files from the workspace, the next-highest changelist will be reported (unless it, too, strictly deleted files).

If you must sync first and record later, Perforce recommends running the following command to determine if you've been bit by the above gotchas; it should indicate nothing was synced or removed:
p4 sync -n @changelist_number

Note that this method doesn't work if a file is added in a changelist (n-1) and then deleted in the very next changelist (n). p4 changes -m1 @clientname and p4 changes ...#have both return n-3 and p4 sync -n @n-3 will say "file(s) up-to-date."
Comment: The link is dead, was it this article? answers.perforce.com/articles/KB/3458/
Comment: Why is it that "This only works if you have not submitted anything from the workspace in question."?
Comment: If you submit a change, 'p4 changes -s submitted -m1' will return your changelist number. For example, say you sync to changelist 5, wait a couple hours and then submit changelist 10. The above changes command will return 10.
Comment: Note that you can use `#have` instead of `@clientname`, which saves you from having to look up your client workspace name.
Answer: Just to answer this myself in keeping with Jeff's suggestion of using Stackoverflow as a place to keep technical snippets....
From the command line use:
p4 changes -m1 @<clientname>

And just replace  with the name of your client spec. This will produce output of the form:
Change 12345 on 2008/08/21 by joebloggs@mainline-client '....top line of description...'

Which is easily parsed to extract the changelist number.
Comment: I am getting: Request too large (over 1500000); see 'p4 help maxresults'.
Comment: @user674669: use option -m1 which returns only last (1) change list
Comment: This gives the information of the last _submitted_ changelist, not the last _synced_ changelist, which is what the op wanted to know.
Comment: @marsh I think it's actually the client workspace name, which defaults to the computer name if not set. See here: [P4CLIENT](https://www.perforce.com/perforce/r15.1/manuals/cmdref/P4CLIENT.html).
Answer: You may try finding the maximum change number in the output of the "p4 files" command.  The working directory should not contain post-sync commits, though.  This is just a tad better than
p4 changes -m1 "./...#have"

as the latter seems to run on the server and may fail on big source trees due to "MaxResults" limits.
$ p4 changes -m1 "./...#have"
Request too large (over 850000); see 'p4 help maxresults'.

$ p4 -G files "./...#have" | python c:/cygwin/usr/local/bin/p4lastchange.py
Files: 266948
2427657

where p4lastchange.py is based on the code from the Using P4G.py From the Command Line presentation by J.T.Goldstone, Kodak Information Network/Ofoto, April 15, 2005.
#! /usr/bin/env python
import sys, os, marshal

if os.name == "nt":
    # Disable newline translation in Windows.  Other operating systems do not
    # translate file contents.
    import msvcrt
    msvcrt.setmode( sys.stdin.fileno(), os.O_BINARY )

lastcl = 0
num = 0
try:
    while 1:
        dict = marshal.load(sys.stdin)
        num = num + 1
        for key in dict.keys():
            # print "%s: %s" % (key,dict[key])
            if key == "change":
                cl = int(dict[key])
                if cl > lastcl:
                    lastcl = cl
except EOFError:
    pass
print "Files: %s" % num
print lastcl

Answer: If you are using P4V you can do this graphically:

In the Dashboard tab (View->Dashboard) choose a folder and you will see a list of changelists that the folder isn't yet updated with. Note the lowest number (in the highest row).
Make sure that in the Workspace Tree you have selected the same folder as previously in the Dashboard. Then go to the History tab (View->History) and scroll down to the number noted previously. The number just below that number is the number of your current changelist.
Comment: The Dashboard view doesn't work when the folder contains a lot of files (100,000) and more.
Answer: p4 changes -m1 @clientname which is the "recommended" way to do it for my client takes about 10 minutes
this is what I use:
p4 cstat ...#have | grep change | awk '$3 > x { x = $3 };END { print x }'

for the same client takes 2.1 seconds
Comment: Upvoting this answer, since it answers the actual question rather than saying "don't do that" (which is a valid point, but does not answer the question).
Comment: @marsh client (or also workspace) name is the name of a perforce object that holds the mapping from the server depo to your local file system
Comment: `p4 changes -m1 @clientname` run endlessly... `p4 cstat ...#have | grep change | awk '$3 > x { x = $3 };END { print x }'` really works! Thanks!
Comment: What is client name? How can I find this information?
Comment: @gsf - thanks, just tried it on my Linux box and it worked!
Answer: You could also use the cstat command:
p4 help cstat
cstat -- Dump change/sync status for current client

p4 cstat [files...]

Lists changes that are needed, had or partially synced in the current
client. The output is returned in tagged format, similar to the fstat
command.

The fields that cstat displays are:

    change   changelist number
    status   'have', 'need' or 'partial'

Comment: This worked best for me, I did the command  p4 cstat > commits.txt
then I opened the generated text file in notepad++ and did a ctrl+F to the first instance of the word "need"
Answer: For a serious build (one that is being prepared for testing), explicitly specify the desired label or changelist number, sync to label, and imbed it in build artifacts.
If a changelist (or label) is not given, use p4 counter change to get the current change number, and record it. But you still need to sync everything using that change number.
I don't think you can achieve exactly what you want, because in general, an entire workspace isn't synced to a particular changelist number. One can explicitly sync some files to older revisions, and then a single changelist number is meaningless. That's why a fresh sync is required to ensure that a single changelist number accurately represents the code version.

Regarding the comments: Yes, my answer is intended for use by configuration managers preparing a build to give to QA. Our developers don't normally sync as part of a build; they do a build prior to submitting—so that they can make sure their changes don't break the build or tests. In that context, we don't bother to embed a repository label.
With your approach, you are making the assumption that your whole workspace was synced to head at the time of your last changelist submission, and that changelist included all of your open files. It's too easy to be mistaken in those assumptions, hard to detect, and horribly expensive in terms of lost time. On the other hand, solving the problem is easy, with no drawbacks. And because a changelist number can be explicitly specified, it doesn't matter what revision you need or how quickly the codebase is changing.
Comment: Erickson - nice suggestion, but I think it covers a slightly different set of circumstances than the answer I provided. Certainly counter will work if you are likely to only have the head revision, and the server is not busy enough so that someone, perhaps working on another project, would not do a submit between syncing and calling p4 counter. So I think your suggestion is probably best when the build system is doing a distinct pull then build. My answer covers cases where the sync may be separated in time from the build. Both are valid depending on circumstances I think.
Answer: For the whole depot (not just your workspace/client)
p4 counter change

does the job, just telling the last changelist.
Comment: Note that this reports the number of the latest depot changelist, INCLUDING pending (ie not-yet-submitted) changelists. So any user starting some new work in their client will affect this number. This will be different from the last changelist synced to the local workspace.
Answer: The best I've found so far is to do your sync to whatever changelist you want to build and then use changes -m1 //...#have to get the current local changelist (revision).
p4 sync @CHANGELIST_NUM
p4 changes -m1 //...#have | awk '{print $2}'
Gives you the changelist number that you can the use wherever you want.  I am currently looking for a simpler way than p4 changes -m1 //...#have.
Answer: I am not sure if you got the answer you needed but I had a similar problem. The goal was to write in our logger the specific version of the project. The problem was that while we are making our own makefile, the overall build system is controlled by our configuration management. This means that all the solutions which say "sync to something then do something" don't really work and I didn't want to manually change the version whenever we commit (a sure source for errors).
The solution (which is actually hinted in some of the answers above) is this:
in our makefile, I do p4 changes -m1 "./...#have"
The result for this is Change change_number on date by user@client 'msg'
I simply create the message into a string which is printed by the logger (the change number is the important element but the other is also useful to quickly decide if a certain version contains changes you know you made yourself without going to perforce to check).
Hope this helps.


Raspberry Pi 3 will not connect to wifi

Question: I am a complete newbie to raspberry Pi. I have a class set of Pi's and have been able to connect some to the wifi at the school but not to others. The ones that don't work show that the wifi has connected but when you use the browser it says the connection failed.
Answer: Some wifi network will have proxy settings and others. Maybe this would be the case. Make sure your pi is connected to the Wi-Fi network through the password
Comment: It is connected to the wifi through the password. I am also unable to connect using an Ethernet cable And sudo apt-get update and sudo apt-get upgrade fails

Raspberry Pi 3 will not connect to wifi


How to indent the selected line one "tab" forward or backward

Question: In a lot of text editors there is a keystroke used to move the selected lines one "tab" to the right, usually 4 whitespace or one "tab" to the left.
How can I do this in emacs? I have only found automatic indentation like C-M-|
Comment: While this is indeed useful sometimes, an experienced Emacs user would rarely need this. Can you share the reason for needing this functionality? It might be the case that the original problem can be solved differently, but in a more efficient / smart way.
Answer: There's some commands starting with the name indent-rigidly, which indents by whitespace. The base command indent-rigidly is bound to C-x TAB by default, and lets you use the arrow keys to indent the region (left/right to indent one space, shift + left/right to indent by tab stops).
Instead of indent-rigidly you might want to use indent-rigidly-left-to-tab-stop or indent-rigidly-right-to-tab-stop, but they have no default key bindings.


Why do I see tweets of people I don't follow?

Question: These are not retweets. What I'm seeing is tweets of people who follow people I follow. For example if I follow John Doe I'll see a tweet from someone who follows John Doe too. At the top of the tweet it tells me "John Doe follows". How can I get rid if this?
Answer: Are you sure you're not seeing favourite tweets? This behaviour was implemented in 2014:
Anger on Twitter as new feature posts favourites to followers' timelines
You can verify this by checking to see if there is a gold star visible on the tweet itself.
As far as I am aware, there is not currently a way to disable this globally. You should be able to do it on an individual basis, similarly to disabling retweets from a specific person.


Relationship between Jiva, Bramhan, World according to Vishitadvaita

Question: What is explanation for the following relationships between jiva and bramhan and which is most appropriate.
Comment: As stated, the title of your question is now a duplicate of this question: http://hinduism.stackexchange.com/questions/12500/the-theory-of-relation-as-per-visistadvaita-philosophy?lq=1
Answer: Here your All Doubts will Clear of Visisthadvaita Philosophy.Here also clear the Philosophy of Advaita and Dvaita as well as Abhed,Bhed Sruti (Advaita & Dvaita) and also demonstrate Gatak sruti
Here we will understand this Philosophy from the Basic, I will try my best to demonstrate this Philosophy through the Sruti , Bhagvad-Gita and Ramanuja-Philosophy so, we can eailsy understand the main concept of Visisthadavita Philosophy and also the relation between Brahman & Jiva
Understand words in my answer:

Jad=unconcsious=Dead-elements(Nature/Earth)
Chetan=Concsious=Living-elements (Human-beings,gods,antigods,animals etc)
Maya=Illusion
Visesan(विशेषण)= Adjactive, Visesya(विशेष्य)= Substantive , Visistha (विशिष्ट)= Individual

First Let's see what Gatak sruti says:

Gatak Sruti:
visisthacye visisthacye visistha visithayodaitam visisthadiatam |
  sukhsma jadchetan visistha sthulam chidchidrisithayordriatam bhedithertha: ||
Without Adjactive (विशेषण) there is no meaning of Substantive (विशेष्य). in-other word who is free from Adjactive (विशेषण) is called
  Individual (विशिष्ट).Lord Vishnu is Individual (विशिष्ट) who is different from jad(unconscious) and Chetan (conscious),even-though they are
  not different from Lord Vishnu is called Visisthaadivate.
Like we can not sperate the Virtue (गुण) from Virtuness (गुणी), same way Adjactive( Jad(Nature), Chetan(Living-Beings)) can't be
  sperated from the Visistha (Individual) (Lord Vishnu).
Like body and soul both are different from each other but we can't sperated both thing from each-other. same way jad-chetan and Supreme Lord Vishnu are different yet we can't sperated jad-chetan (Nature & Living-beings) and Lord vishnu(Super-soul) from each-other.
Jad and Chetan (Nature and Living beings) are body of the Lord Vishnu (Supreme Lord), and in this way very beautifully
  include the both **bhed Shruti (Dvaita) and abhed Shruti (Advaita).
Like Living-beings(Souls) do all the work through his body same-way, Lord Vishnu does his every work through jad and Chetan (Living-entities , nature).
This Example will clear your doubt
For Example
Randomly we call the person whose name is Gopal,so he will turn around and will stare us, because we call him with his name.But we know body is jad (deadly thing, unconscious), If there is no soul(Consciousness) in the body then we will called that "Dead Body" rather than Gopal,Why? because there is no Soul in that body.So,that's mean Gopal is title (Degree) for that particular soul. then why that particualr body turn around and stare us when we called to Gopal??!!.So, that's mean there is no different between gopal and his body,but difference is there we know (Because Gopal is only title/degree for that specific body, If the body is no more then there is no meaning of Gopal).

Same-way Lord and living-beings,nature(jad&chetan) are different ( Davita Philosophy) but they are connected as "body to soul" relation to the supreme lord. so that's why both are same (Advaita Philosophy). ( Here Soul is Lord Vishnu and  body is living-beings & nature)
Here body (Jad/Chetan Both(nature/all living beings):

Body: Human-beings, animals , demigods, antigods,gods, nature, all univers etc etc
Soul: Lord Vishnu

More simple example we can take, Mango and it's taste , we know that mango and it's taste both are different (Dviata philosophy) from each other,In other hand,they both are same(Adviata Philosophy)we can't separate both of them (mango & it's taste) from each other.
Hence the solution given by the Visisthadviata Philosophy through the Gatak-Sruti

If you want to read more Details then you can read Sri-ramanujacharaya "Vedarth Sangraha"

Here another sloka from Gatak Sruti:

yamatama Na Ved yesaya Atama Sariram |
  Yum Pruthvi na ved yesaya Pruthvi Sariram ||

Living-Beings are body of Lord, Living beings don't know this thing, Nature (Earth) is the body of Lord, even nature doesn't know this thing.
Living-Beings and Maya(Nature) is the body of Lord and the Lord Vishnu is the seated as soul in that body (living-beings & nature).
In Sri-Valmiki Ramayan This Sloka indicates:

Jagat sarvah sariram tey saitharya tey Vasudhatalam.....

meaning : This all Univers is body of yours (Lord Vishnu), and the all things in nature is depended on you(Lord Vishnu).
In Vishnu Puran this sloka indicates:

Sarvah vai harestanu...|

meaning: All the elements(Living-Beings, Nature) are body of Lord Shri Hari.

Let's we understand from the Bhagvad-Gita (Chapter 9 sloka 4,5,6,8,9,10) which encouraged the Philosophy of Visisthadvaita
mayā tatam idaṃ sarvaṃ jagad avyakta mūrtinā |
  mat-sthāni sarva bhūtāni na cāhaṃ teṣv-avasthitaḥ || 4 ||

This entire universe is pervaded by Me, in an unmanifest form. All beings abide in Me, but
I do not abide in them.
Ramanuja-Philosophy:
This entire universe — composed of both sentient and insentient beings, is pervaded by Me
— the inner controller whose essential nature is unmanifest. The meaning is that all this
universe is pervaded by Krishna the Principal (śeṣi) so that He may sustain and manage it.
This [doctrine of] universal pervasion by an inner controller, who is invisible to all beings,
is taught in the Antaryāmi- Brāhmaṇa.
So also Krishna's primacy over everything is taught.

na ca mat-sthāni bhūtāni paśya me yogam aiśvaram |
  bhūta-bhṛnna ca bhūtastho mamātmā bhūta-bhāvanaḥ || 5 ||

And yet beings do not abide in Me. Behold My divine Yoga, I am the upholder of all
beings and yet I am not in them. My will alone causes their existence.
Ramanuja-Philosophy:
"I am not in them" means — "I do not depend on them for My existence. I do not need
any help from them to exist. And yet beings do not abide in Me, as I do not support them as
a jug or any other kind of vessel supports the water contained in it. How then are they
contained? By My will. Behold My divine Yogic Power, namely, My wonderful Divine
qualities, unique to Me alone and having no comparison elsewhere. What are these
qualities? I am the sustainer of all beings and yet I am not in them — My will alone keeps
them in existence."
The gist is that Krishna is the supporter of all beings, and yet He derives no personal
assistance whatever from them. His will alone projects, sustains and controls all beings.
Sri Krishna gives an illustration to show how all beings depend on His will for their
existence and activity;

yathākāśa-sthito nityaṃ vāyuḥ sarvatrago mahān |
  tathā sarvāṇi bhūtāni mat-sthānīty-upadhāraya || 6 ||

As the mighty wind moving everywhere, ever remains in space, even so, know that all
beings abide in Me.
Ramanuja-Philosophy:
The mighty wind exists and moves everywhere in space without any perceivable support.
So it has to be admitted that the powerful air-current is dependent on Me for its existence
and is being upheld by Me alone. Even so, know that all entities abide in Me, who am
invisible to them, and that they are upheld by Me alone. The Vedic sages declare thus: —
The origin of clouds, the waters of the ocean remaining within bounds, the phases of the
moon, the strong movements of the gale, the flash of lightning and the movements of the
sun—all these are marvellous manifestations of the power of Vishnu. (?)
The meaning is that they are all the marvellous miracles which are unique to Vishnu. The
Vedas and other texts also declare likewise:
'Verily O Gargi, at the command of that imperishable One, the sun and the moon stand
apart' (Br. Up., 3.8.9,)
'Through the fear of Him the wind blows, through the fear of Him the sun rises, through
the fear of Him Agni and Indra perform their duties' (Tai. Up., 2.8.1).
It has been declared that the existence and activity of all beings originate by the will of the
Supreme Being, who is totally independent.
Now Sri Krishna declares that the origin and
dissolution of all entities also are accomplished by His will only:—

sarva bhūtāni kaunteya prakṛtiṃ yānti māmikām |
  kalpa-kṣaye punas-tāni kalpādau visṛjāmy-aham || 7 ||

All beings, O Arjuna, are assimilated into My Nature (Prakrti) at the end of a cycle of time
(kalpa). Again I send them forth at the beginning of a new cycle.
Ramanuja-Philosophy:
All the mobile and immobile entities enter into Krishna's Being (Prakrti) at the end of a
cycle, of Brahma's life. This Prakrti (Nature), constituting the Divine Being, is described
by the term Tamas, as it cannot be differentiated into name and form. Manu also concurs:
'This universe became Tamas.... by an act of [divine] will. He produced it out of His body' (Manu,
1.5.8).
The Vedas also declare this: —
'He whose physical nature is Unmanifest' (Sub. Up., 7);
'The Unmanifest (avyakta) merges into the Imperishable (akṣara), the akṣara into
(Darkness) Tamas' (Ibid., 2);
and also —
'There was Darkness (Tamas); consciousness was in the beginning concealed by
Darkness (Tamas)' (Tai. Br. ii:8-9)

prakṛtiṃ svām-avaṣṭabhya visṛjāmi punaḥ punaḥ |
  bhūta-grāmam imaṃ kṛtsnam avaśaṃ prakṛter-vaśāt || 8 ||

Animating my own Nature [Prakrti], I send forth again and again all this multitude of
beings, helpless under the sway of Prakrti.
Ramanuja-Philosophy:
"I develop it eightfold and send forth this fourfold aggregate of beings; gods, animals,
humans and inanimate things, time after time. All these entities are helpless, being under
the sway of Prakrti comprising the three Gunas which cause delusion."If this is so, it may
be argued that the inequalities of creation are due to the Lord being
cruel or partial etc."
To this, the Lord answers: —

na ca māṃ tāni karmāṇi nibadhnanti dhanañjaya |
  udāsīnavad-āsīnam asaktaṃ teṣu karmasu || 9 ||

But these actions do not bind Me, O Dhanañjaya, for I remain detached from them,
remaining like one indifferent.
Ramanuja-Philosophy:
"But results like the inequality of creation do not bind Me. I cannot be accused of such
negative qualities as cruelty, partiality etc, because the differences of conditions like being
born as a god, human being, animal or vegetable are all caused by the previous actions
(Karmas) of individual Jīvas themselves. I am unaffected by these inequalities."
Accordingly, the author of the Vedanta-sutras says: —
'There is no partiality or lack of compassion in Him, because creation is dependent on
Karma, for so Scripture declares' (Br. Sutra., 2.1.34),
and
'If it be said that there can be no Karma on account of non-distinction [between Jīvas and
Brahman prior to creation], it is replied that this is incorrect, because both the Jīvas and
Karma are beginningless....' (Ibid. 2.1.35).

mayādhyakṣeṇa prakṛtiḥ sūyate sacarācaram |
  hetunānena kaunteya jagad viparivartate || 10 ||

Under My supervision, Prakrti produces all beings that move and move not. Indeed,
because of this, O Kaunteya, does the world revolve.
Ramanuja-Philosophy:
Behold in this wonderful phenomena the cosmic dominion inherent in Krishna, and
personal characteristics such as sovereignty, true resolve and being free from cruelty and
similar defects! So declare the Vedas:—
'The possessor of Maya [the Lord] projects this universe out of this [Prakrti in its subtle
state]. Another [the individual Self] is confined by Maya in the world. One should know
the Maya to be the Prakrti. And the possessor of Maya to be the Mighty Lord' (Sve. Up.,
4;9-10)
Another Sloka of Bhagvad-Gita ( Chapter 7 Sloka 7,12) which encouraged the Philosophy of Visisthadvaita

mattaḥ parataraṃ nānyat kiñcid-asti dhanañjayaḥ |
  mayi sarvam idaṃ protaṃ sūtre maṇi-gaṇā iva || 7 ||

There is nothing whatsoever higher than Me, O Arjuna. All this is strung on Me, as clusters of
gems on a thread.
Ramanuja-Philosophy:
"I am absolutely superior to all things in two ways:
(1) I am the cause of both the Natures (Prakṛtis) and I am also their Proprietor (śeṣin).
The Jīvas exercise control over their bodies as they are the inner proprietors (śeṣin) and
I am the Proprietor of all Jīvas.
(2) I am also the Supreme Being because I possess knowledge, untiring strength,
sovereignty, immutability, creative power and splendour in an infinite degree.
The totality of all the sentient and insentient beings, whether in their [unmanifest] causal
state or in their [manifest] state of effect, is strung on Me, who abide as their Self, as a
cluster of gems on a thread — in other words they have their rest and support in Me."
And it is established that the entire Universe [of sentient and insentient entities] and
Brahman (the Supreme Being) exist in the [symbiotic] relationship of body and spirit as
declared by the Antaryami-Brahmana and other texts: —
'He whose body is the earth' (Br. Up., 3.7-3),
'He whose body is the Self' (Br. U. Madh., 3.7.22),
'He is the Over-Self of all beings, immaculate,
He is the Lord in the supreme heaven, He is the one Nārāyaṇa' (Sub.Up., 7).
Everything constitutes the "corporeality" and is an "expression" of the Supreme Being
who is their Over-Self, thus the Supreme Being alone exists, and all [existing] things
are only His modes [of expression]. Therefore all terms used in common parlance for
different things denote Him only.

ye caiva sāttvikā bhāvā rājasāstāmasāśca ye |
  matta eveti tān-viddhi na tvahaṃ teṣu te mayi || 12 ||

Know that all those states of Sattva, Rajas and Tamas have their origin in Me alone. But I am
not in them; they are in Me.
Ramanuja-Philosophy:
This Three modes of Illusion (Triguni Maya) is depended on Lord Vishnu, Lord Vishnu is not Depended on this Maya, Lord is not Indulge in this Samsara (Mortal World).
like same-way soul is not indulge in body.
The one of the Best Sloka of Bhagvad Gita (Chapter 10 Sloka 41) which is summary of Visisthadvaita Philosophy

yad yad vibhūtimat sattvaṃ śrīmad ūrjitam eva ca |
  tat tad evāvagaccha tvaṃ mama tejo'ṃśa saṃbhavam || 41 ||

Know for certain that whatever has sovereignty, splendour and brilliance is produced by a mere
fraction of My potency.
Ramanuja-Philosophy:
Every Living and Non-Living elements is the body of the Lord and Lord is the Soul of that body, and this the Summary of Sri Visithadviata Philosophy.
Hence, We can say that we got the overall conclusion and Summary of the Ses-Seshi Relation, Soul-Body Relation, Master-Servant Relation, Ulitimate Form of Lord, Bhed and Abhed Sruthi As it is , from the  Sri Visisthadviata Philosophy,
Sri-Ramanuja put very great effort to clear the all doubts and easily can reach to the supreme lord. You can also refer Sri-Bhasya, Visithadviata Philosophy of Sri-Ramanujacharya and also Vedarth-Sangraha for deepest Knowledge of the Visisthadvaita Philosophy & the Supreme Truth.
You can also refer my others answers for understanding this Philosophy here
https://hinduism.stackexchange.com/a/12497/5746
https://hinduism.stackexchange.com/a/12381/5746
https://hinduism.stackexchange.com/a/12501/5746

Adiyen Ramanuja Dasen
Srimatey Ramanujaye Namah:
Jay Sri-man Narayan
Comment: Do not use #heading and bold style of font too much.


Are their names the same: a local-tracking branch, the corresponding remote-tracking branch, and the corresponding remote branch being tracked?

Question:
Are the names of a remote-tracking branch and the corresponding
remote branch being tracked necessarily the same?
If they can have different names, how does git fetch match the two
branches then? (a typical refspec to git fetch is +refs/heads/*:refs/remotes/remote/*)
If I am correct, given a remote-tracking branch, we can create a
local-tracking branch that associates with it but has a different
branch name. (by the -b option in git checkout)
Further if the names of the remote-tracking branch and the
corresponding remote branch being tracked are the same,  how does
git push match the local-tracking branch and the remote branch? (a typical refspec to git push is +refs/heads/*:refs/heads/*)
Comment: http://stackoverflow.com/questions/21839651/git-what-is-the-difference-between-push-default-matching-and-simple
Answer:
Are the names of a remote-tracking branch and the corresponding remote branch being tracked necessarily the same?

No.  However, making them not-match results in a lot of pain (and I haven't tested it on the push side).

If they can have different names, how does git fetch match the two branches then? (a typical refspec to git fetch is +refs/heads/*:refs/remotes/remote/*)

You may have multiple fetch = lines, so you could, for instance, do this:
[remote "strange"]
    fetch = +refs/heads/master:refs/remotes/strange/surprise
    fetch = +refs/heads/other:refs/remotes/strange/surprise2

Note, however, that you can no longer use refs/heads/* on the left of any additional fetch refspecs, since that will match master and other and (presumably) map them to names other than surprise and surprise2, and git fetch aborts with an error message in this case.  This effectively forces you to list every refs/heads name that you wish to copy from the given remote (strange, in this case).
(As I said, I haven't tested this with push and I don't know if push obeys the same mapping rules as fetch.  There were some recent changes, around git 2.5 or so, to handle "triangular" work-flows better, where you fetch from localmirror and push to centralserver for instance.  One of those changes was to add the same kind of name-mapping for the push remote.  Presumably, before this new code went in, doing this kind of pushing brought even more pain, possibly even without a triangular work-flow; and presumably now it works better....)
We might call this "silly renaming tricks", and my advice would be: don't use them. :-)  I think they'll work correctly with most commands, and fail with others, though I can't point to any specific failure examples (just vague memories of how I used to do things).

If I am correct, given a remote-tracking branch, we can create a local-tracking branch that associates with it but has a different branch name. (by the -b option in git checkout)

Yes; and this works fine for all kinds of local work.  Again, I'd avoid the phrase "local-tracking branch", and just say "local branch with an upstream" as this is the direction git documentation has moved since about 1.7 (see below).

Remember that "the upstream of local branch $branch" is produced by:

obtaining the remote name from git config --get branch.$branch.remote, and
mapping branch-name from git config --get branch.$branch.merge through the fetch = refspecs for that remote.

Thus, suppose we've created two local branches test1 and test2 and have the following:
$ git config --get branch.test1.remote
origin
$ git config --get branch.test1.merge
refs/heads/test
$ git config --get branch.test2.remote
origin
$ git config --get branch.test2.merge
refs/heads/test

Both test1 and test2 refer to refs/heads/test, which is the name of a branch on the other git repository that will be located via the name origin: this is why we need to run these through the fetch = map(s) for origin.
In the absence of silly renaming tricks, the "mapped through" part leaves the branch-name part (everything after refs/heads) unchanged, and just replaces the middle bits, so that refs/heads/test becomes refs/remotes/origin/test.  That's really easy to make assumptions about.  I believe some lazy script-writers (including myself in the past) may have used this bit of shell script code:
fullbranch=$(git rev-parse --symbolic-full-name $branch) || exit 1
remote=$(git config --get branch.$branch.remote)
rmtbranch=refs/remotes/$remote/$branch

which not only assumes the lack of silly renaming tricks, it even assumes that if we're on branch test1, the upstream must be origin/test1, not origin/test.  Slightly less lazy script writers (including myself in the past) then had to fix their scripts, e.g.:
fullbranch=$(git rev-parse --symbolic-full-name $branch) || exit 1
remote=$(git config --get branch.$branch.remote)
theirname=$(git config --get branch.$branch.merge)
rmtbranch=refs/remotes/$remote/${theirname#refs/heads/}

which now assumes that refs/heads/test on the origin maps to refs/remotes/origin/test in the local repository.
Adding silly renaming tricks means that we can't find the actual upstream name easily at all, but various commands (e.g., git merge, git rebase) automatically find the correct upstream.  To make it easier for scripting, git version 1.7.0 grew the @{upstream} notation: you can now simply write $branch@{upstream}.  The git parser looks up the upstream for you, and the above (broken) script fragment can be rewritten as:
rmtbranch=$(git rev-parse --symbolic-full-name $branch@{upstream}) || exit 1

This is all fine and good for fetch, but what about push?  Well, if you're pushing to the same remote that you're fetching from, you just do the same thing.  But you can, for any number of reasons,1 split them up: fetch from repository F and push to repository P.  In this case, we might need different mappings for F and P.
Git 2.5 introduced @{push}, as noted by VonC in some earlier SO thread I can't find offhand, and in this github blog posting.  The new @{push} notation simply switches from using the fetch upstream to using the push upstream, i.e., using the P mapping instead of the F mapping.
There's still one good question, and it's your last one here:

Further if the names of the remote-tracking branch and the corresponding remote branch being tracked are the same, how does git push match the local-tracking branch and the remote branch? (a typical refspec to git push is +refs/heads/*:refs/heads/*)

My answer for git 2.5, with the new push stuff, is: I don't really know for sure, but your "typical refspec" is no longer the default (since git 2.0).  When you run git push with no refspec arguments, git looks up your push.default setting (along with a bunch more optional settings but push.default is effectively2 required).  It has five possible values, and only one of them—not the default—amounts to refs/heads/*:refs/heads/*.
One of those settings is upstream, and that setting runs the current branch's merge setting through the map functions (presumably, in git 2.5 and later, through the new separate push map if present, else through the fetch map).

1One reason is to use a pull-request repository, as in the linked github blog post.  Another is to fetch from a local mirror (as at a large corporate setup with local mirrors for various branch offices), but push to a single central server (the corporate-designated "master" site that all the local mirrors actually mirror).
2If you fail to set push.default, git spits out a lot of annoying text.  The best way to shut it up is to set push.default, so that means you're "required" (in some sense anyway) to set it.  And, since git 2.0, the default setting, if you haven't set it, is simple, which forbids silly renaming tricks.
Comment: Thanks. Your reply to "Are the names of a remote-tracking branch and the corresponding remote branch being tracked necessarily the same?" is no. If I am correct, remote tracking branches are created by cloning, or fetching/pulling, or pushing, how can you specify the remote tracking branches to be created with names different from the remote branches being tracked? Or change the names of remote-tracking branches after creating them?
Comment: See my upcoming answer to [your question about when remote-tracking branches get created](http://stackoverflow.com/q/34538343/1256452).
Answer: refspec
As you said its the refspec which lies inside your .git/config file.
The git config file contains the information about the refspec

Note
In order to see what you described do this:
// Checkout master
git checkout master

// rename the master branch to a new name
git branch -m <old name> <new name>

// View the .git/config file and you will see the the new branch is still
// pointing (tracking) to the master branch, just like you described

Using the refspec you can control to which branch pull/push will refer.
Seting tracking branch
git branch -u <upstream>/<branch name>

matching
Git v2.0 Release Notes
Backward compatibility notes
When git push [$there] does not say what to push, we have used the
traditional "matching" semantics so far (all your branches were sent
to the remote as long as there already are branches of the same name
over there).  In Git 2.0, the default is now the "simple" semantics,
which pushes:

only the current branch to the branch with the same name, and only
when the current branch is set to integrate with that remote
branch, if you are pushing to the same remote as you fetch from; or

only the current branch to the branch with the same name, if you
are pushing to a remote that is not where you usually fetch from.

You can use the configuration variable push.default to change this.
If you are an old-timer who wants to keep using the
matching semantics, you can set the variable to "matching", for
example.  Read the documentation for other possibilities.
Comment: Thanks. But I am not sure how your reply addresses the issue of the corresponding branches not having the same name.
Comment: Read the section with the notes. It can have different names as long as you defined the tracking branch. (this is the refspec under you .git/config),

Correct me if i did not undersood you corrdctly
Comment: (1) Do you mean when the corresponding branches don't have the same name, just specify them explicitly rather than using `/*` in `refspec`? (2) Does the "simple" semantics apply only to `git push`? Is there alternative  semantics for `git fetch/pull`, other than the "matching" semantics?
Answer: The answer from @codeWizard is the full and complete answer, but the plain english answer (based on your comment questions on his answer) is:
1 is really two questions. The answer to the first is: No, they don't have to have the same name. The answer to the second is: fetch doesn't actually map the local and remote branches. All fetch does (using your example--the defaults) is ask remote for it's list of refs/heads/*, and the associated blobs, and stores the refs in refs/remotes/* rooted using the remote name.
2 The mapping of the local branch to the remote branch is controlled by either using explicit pull and fetch calls, or setting everything up in .git/config. In git/config The pull behavior is controlled by $branch.merge, but push is controlled by push.default: which by default will push to the same branch name on the remote as the local. If you set this to upstream then it'll use the $branch.merge as the push target.
Walkthrough:
mkdir t1 && cd t1
git init
touch file
git add file
git commit -a -m "remote"
cd ..

git clone t1 t2
cd t2
git branch -a # you should see 'master' and 'origin/master'
git branch -m master local
git pull # Should say "Already up-to-date"
git branch -a # you should now see 'local' and 'origin/master'
git push # damn! It pushed 'local' to 'origin/local'!
git push origin :local # delete 'origin/local'
git config push.default upstream # tell git to use 'local.merge' as the push target
git push # Now it should say "Everything up-to-date"

And after all this your t1 config should look like this:
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true

And t2 should look like this:
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = /nas/src/t/t1
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "local"]
    remote = origin
    merge = refs/heads/master
[push]
    default = upstream

Comment: Thanks. Does `git branch -m master local` not change `merge = refs/heads/master` in `t2/.git/config` to `merge = refs/heads/local`?  If not, can the subsequent `git pull ` work properly?
Comment: Although the default behavior around some of this has changed since the original post: `git branch -m master local` still creates `merge = refs/heads/master` because this is referring to where on the _remote_ that branch's data lives. If you changed it to `refs/heads/local` it'd look for `t1:refs/heads/local` and wouldn't find it so pulls would break.
Answer: I know it's an old question, but clear-cut answer is right from man page of git-config (enter git help config or man git-config). Examples on how to use below information is right after the quotation:

push.default
Defines the action git push should take if no refspec is explicitly
  given. Different values are well-suited for specific workflows; for
  instance, in a purely central
workflow (i.e. the fetch source is equal to the push destination),
  upstream is probably what you want. Possible values are:
·   nothing - do not push anything (error out) unless a refspec is
  explicitly given. This is primarily meant for people who want to avoid
  mistakes by always being
explicit.
·   current - push the current branch to update a branch with the same
  name on the receiving end. Works in both central and non-central
  workflows.
·   upstream - push the current branch back to the branch whose
  changes are usually integrated into the current branch (which is
  called @{upstream}). This mode only
makes sense if you are pushing to the same repository you would
  normally pull from (i.e. central workflow).
·   simple - in centralized workflow, work like upstream with an added
  safety to refuse to push if the upstream branch's name is different
  from the local one.
When pushing to a remote that is different from the remote you
  normally pull from, work as current. This is the safest option and is
  suited for beginners.
This mode has become the default in Git 2.0.
·   matching - push all branches having the same name on both ends.
  This makes the repository you are pushing to remember the set of
  branches that will be pushed out
(e.g. if you always push maint and master there and no other branches,
  the repository you push to will have these two branches, and your
  local maint and master
will be pushed there).
To use this mode effectively, you have to make sure all the branches
  you would push out are ready to be pushed out before running git push,
  as the whole point of
this mode is to allow you to push all of the branches in one go. If
  you usually finish work on only one branch and push out the result,
  while other branches are
unfinished, this mode is not for you. Also this mode is not suitable
  for pushing into a shared central repository, as other people may add
  new branches there, or
update the tip of existing branches outside your control.
This used to be the default, but not since Git 2.0 (simple is the new
  default).

So, to set git to whichever configuration that suits you, enter:
git config push.default nothing

replace nothing with your preferred configuration. If you want it to be global (all repos on your local machine), add the global option:
git config --global push.default nothing

To answer your questions:

No
Yes