Baby doing flips and flopping around constantly while breastfeeding, is he ready to be weaned?

Question: My son is 9 months old and just won't be still while feeding. It's to the point where I can barely get him to stay latched, he keeps turning his head to look at other things, and I can't tell if he's had enough milk or not. I wanted to wait until one year to stop breastfeeding but I don't know how much longer I can continue like this.
Comment: Does he look around if you sit in a dark, quiet room too? My second was very easily distracted, so I had to sit somewhere quiet and dark to nurse him, then he ate lots. You may want to add your quest if he drinks water/milk from a cup/sippy, and if he gets lots of solid food.
Comment: Our daughter started being super distracted at 4 months. She is distracted more on the bottle then breast, but easily distracted on both. Its just your childs personality. You can help by minimizing other noises or introduce white noise, and dim the lights, or do it in the dark, or with a nursing cover.
Comment: Is he just turning his head, or also kicking his legs and such? My son had this drive to move and kick about when feeding since birth, more so when tired. He would continue drinking. The same for bottle feeds btw. He is almost 2 and he still likes to squirm and kick stuff when drinking.
Comment: My son ,7 months, also does turns ,flips and kicking while breastfeeding. He gets easily distracted . I have to take him to another room for feeding . He doesn't take feeder for milk.
Comment: My 8 month old like to try and do headstands while nursing.
I started just nursing while i lay on my back ans she lies her belly on mine. She actually stays still this way.
Answer: He's going to eat enough, barring substantial physiological problems that it doesn't sound like apply here.  This was true at one month old, is true now, and will be true at 3 or 4.  Kids don't starve themselves, whatever their difficulties with appearing to eat a normal meal are.  As long as you're not replacing those calories with candy or potato chips, so all of his food options are nutritive ones, don't worry about the nutrition side of things.  Kids (like adults) have physical cues that tell them when they should be eating more or less, that make sure they get a sufficient minimum quantity of food.
As such, if you want to wean him, go ahead; if you don't want to, don't.  A lot of it depends on your preference, and whether you can handle him being so squirmy.  Health-wise, it is probably better for him to continue nursing for a portion of his calories until at least one (and even 1.5-2), due to the other benefits of breastfeeding, but it's not a dramatic difference; so if the squirming is getting to the point that it's stressing you out quite a lot, let it go.
This is a pretty normal stage right around 9 months give or take a few months, because babies start being able to move more (crawl, walk, etc.) around then, and their mental development also hits a higher gear around 9-12 months - so they're more interested in what is around them.  As was alluded to in comments, a less stimulating environment may be necessary to help keep this under control; but to some extent you may just have a happy, active baby who likes to move and see what's going on around him.
Other things you can do include talking to him to keep his attention - singing, telling him stories, etc.; stopping nursing when he reaches a certain point of squirminess, hoping to make it clear to him that squirming leads to stopping nursing; putting a blanket on him to keep him warm; and adjusting your nursing times.  By 9-10 months, my wife was primarily nursing in the early morning (upon waking up) and right before bed, both times when our babies were sleepy and less likely to squirm about, for example.
Answer: Weaning is a personal choice for you and him. There is no magical date, but if you feel like he's ready and you're ready, then congratulations: you've done a great job.
If you're concerned about how much he's getting, you could give him known quantities of expressed milk in a cup or bottle-- but since you've been feeding him for so long, you can probably feel how much he's gotten. He may be looking around because he needs more interaction and sensory stimulation as he's growing up. You may find that talking to him or singing to him makes it more fun for him. Sounds like it may be time for a slow wean.


Is a forced draw by 50 moves possible with Bishop and Knight endgame?

Question: Except for the variations where there is a capture or fork possible for the defending side, is a position possible where this kind of endgame will last more than 50 moves? Is somewhere a calculation in moves done what is the worst possible situation?
Comment: At most 33 moves, see https://en.wikipedia.org/wiki/Bishop_and_knight_checkmate and references there.
Comment: @user1583209 : I think your comment should become an answer, as there is nothing more to say !
Answer: It takes at most 33 moves to win this endgame from any position (excluding positions where bishop or knight can be captured). See https://en.wikipedia.org/wiki/Bishop_and_knight_checkmate and references there.
So, no, a forced draw is not possible in this endgame. However if the defending side is playing perfectly (e.g. an engine with tablebase), it could be very hard to win this for a human within 50 moves if you start from one of those 33-moves-to-mate positions.
Comment: I would not say that it;s hard in terms of technique, but humans get tired, and a single slip can cost you 5 or 6 moves.
Comment: @DanielWainfleet That's exactly what I wrote: *hard to win ... within 50 moves*.  As for technique, indeed, it is pretty easy once you know how the knight is supposed to move...
Comment: Many years ago Scientific America had a brief note about the old Q of whether in general  R+B could win against 2 Knights, with no pawns or other pieces left (except of course the Kings). Regressive analysis by computer (basically analyzing backwards from winning positions) said YES, but only if the 50-move rule is waived. The longest variation took 233 moves to a forced win of one of the Knights, followed by about 20 more moves to mate
Comment: The following ending even requires 545 moves to be won by white : W: Kd3 Qh1 Nh2  vs B: Kf4 Ra7 Bd1 Nh7 with black to play.
Comment: Important to know as well : in chess endgame studies, the 50move rule doesn't apply (unless expressedly specified, but it 's rarely the case). Many engame studies have some secondary lines whose validity depends of some tablebase result giving a win longer than 50 DTZ. That s why usually composers don't use syzygy tablebases but rather Nalimov or Lomonosov. The 50move rule does apply in other chess composition genres though (for instance it's very much the case in retrograde analysis where many problems are based around it).


Why does Mahasi Method have the points on the Body to attend to?

Question: What is the reason? It seems to be to train concentration while avoiding one pointedness?
Might the lack of one pointedness be counter productive at some point?
Answer: Any type of meditation that is worth the name will increase concentration in a beginner.
The body is a good first object of vipassana meditation because it is inescapable and we identify with it so strongly, so automatically all kinds of thoughts also get faced.
Answer: The goal of the Mahasi method is 'vipassana', namely, seeing the arising & passing of phenomena. Therefore, beginners watch the rising & falling of the breath at the abdomen.
Often unskilled meditators force or suppress the mind when trying to practise Anapanasati (awareness of breathing), which results in a 'wrong one-pointedness', which blinds the mind & makes the mind sleepy & foggy.
Genuine or right one-pointedness occurs in jhana, which only meditators skilled in letting-go can genuinely reach.
Jhana cannot be reached by suppression or force, even though many Buddhists claim it can.
Such Buddhists are over-estimating their meditation because a suppressed/forced mind can generate calm & rapture but such momentary rapture is not the true rapture of true jhana.
Therefore, the Mahasi method aims for beginners to keep the mind 'open & awake' rather than 'suppressed, sleepy & foggy', which more closely represents the path taught by the Buddha.
In conclusion, it is forced/wrong 'one-pointedness' that is counter productive.


Asymptotics of a Bivariate Generating Function

Question: I have the following generating function,
$$G(x,y)=\sum_{n,k \geq 0}a(n,k)x^ny^k = \frac{(y^2-y)x+1}{(y-y^3)x^2-(y+1)x+1}$$
and I am interested in obtaining an asymptotic for the sequence $a(n,k)$ i.e. some nice (relatively) closed form $f(n,k)$ s.t.
$$\frac{a(n,k)}{f(n,k)} \rightarrow 1$$
as $(n,k) \rightarrow \infty$. From what I've been able to gather the leading person on this type of analysis in Robin Pemantle, so I have been trying to follow one of his survey papers (https://www.math.upenn.edu/~pemantle/papers/twenty.pdf) in order to compute this. All of the theorems presented in this paper, however, seem to make heavy use of algebraic geometry which I am not very familiar with, so I have been struggling to figure out exactly what I need to compute and how. If someone more familiar with the subject could give me a run down of the necessary computations and how they fit in with the theorems given by Pemantle, that'd be great. One small thing I forgot to mention: for my particular sequence, we can assume that we are in what Pemantle calls the combinatorial case i.e. a priori we know $a(n,k) \geq 0$. Thanks.
Answer: I was able to figure out a partial answer and few people have upvoted this so I will go ahead and give it, and maybe someone will respond with a full answer. The answer I was able to obtain is for the center of the sequence i.e. an asymptotic for $a(n,n)$. I essentially just follow Section 8.2 of Pemantle's paper a link for which is given in the question. So we write
$$G(x,y)=\frac{F(x,y)}{H(x,y)}=\frac{(y^2-y)x+1}{(y-y^3)x^2-(y+1)x+1}$$
First we need to verify that the variety $V=\{H(x,y)=0\}$ is smooth. This is simply done by making sure that the equations $H(x,y)=0$, $\nabla H(x,y)=0$ do not have simultaneous solutions. This computation can be done using Gröbner basis, mainly the Mathematica command (Pemantle likes using Maple for whatever reason)
$$GroebnerBasis[\{H, D[H, x], D[H, y]\}, \{x, y\}]$$
should yield a basis for the trivial ideal. Now we need to find the set of contributing critical points which Proposition 3.11 tells is given by the solutions to the equations $H(x,y)=0$, $xH_x-yH_y=0$. This again can be computed using Gröbner basis, so the Mathematica command
$$GroebnerBasis[\{H, x*D[H, x] - y*D[H, y]\}, \{x, y\}]$$
gives $\{-2 + y + y^3, -1 + 2 x\}$. The roots of the first polynomial are $y=1,\frac{1}{2}(-1+i\sqrt{7}),{2}(-1-i\sqrt{7})$ and the second $x=\frac{1}{2}$, so there is only one positive, real, simultaneous solution  and thus the set of contributing critical points is the singleton $\{(\frac{1}{2},1)\}$. Now we simply plug-in to the formula given by Corollary 3.21 to obatin
$$a(n,n) \sim \frac{2^n}{\sqrt{\pi n}}$$
Comment: It seems you have worked out how to do it. Three notes: (1) Robin Pemantle is only one of the authors - guess who the other is. (2) We have a book published in 2013 that may be easier to follow. (3) There is a package incorporated into Sage that does many of these computations automatically.


Car tyre air leakage rate and fuel economy

Question: As far as I am observing, car drivers tend to be lousy with their tyre pressures. I have only experienced tubed motorbike tyres where a weekly tire pressure checks are not crazy at all. I am curious how often a car tyre would need checking? I am guessing it would be a longer interval as motorbike tyres have soft sides that flex the rubber during operation. Also, how much it would effect the fuel economy and handling?
Answer: With all the cars I've owned in the last few decades, if a tire needs any air at regular intervals, there's something wrong. I've had car tires that haven't lost any pressure over a year or longer.
I don't usually check with a gauge, because that takes more air from the tires than they lose any other way. Thumb pressure on the sidewall will tell you if the pressures are different. Only use a pressure gauge if you think there is something to measure!
Comment: So if the car has « run flats » you can tell if the correct pressure is there or not? Just with your thumb - some tires have stiffer sidewalls than others - and between the  W, H, Y and V ratings?
Comment: Never had a car with run flats, so no comment there. I am only comparing the tires on one car with each other, so unless there was a mix of brands and ratings on the one car (which I wouldn't have anyway), I don't understand why "some tires have stiffer sidewalls than others - and between the W, H, Y and V ratings" affects the "thumb test." Maybe I have hypersensitive thumbs though ;)
Answer: Tires should be checked with a gauge weekly and visually before getting in the car.
As they are similar in structure - car tires also have flexible sidewalls so the correct pressure is important.
Wrong pressures will cause poor economy by up to about 10% but as people's driving changes it is difficult to be precise ie 2lbs low is 3% worse economy is not a given...


At a constant power setting, does TAS change with altitude?

Question: I found a lot of references to the question but no definite simple answer.
What would be the influence on true airspeed (TAS) for same airplane at same throttle setting flying straight and level at higher altitude?
Would it change for Jet engine vs internal combustion engine?
Comment: Jet is also an internal combustion engines. The four kinds of engines are: jet, turboprop, turbo-charged piston engine and normally-aspirated piston engine. Each behaves somewhat differently.
Comment: The "Same throttle setting" bit actually complicates this question because that isn't how airplanes are typically operated so finding data is hard.  A better question would probably be, "does TAS change with altitude at a constant IAS".
Comment: @Lnafziger: That "better" question is trivial and almost surely already answered, because it takes the engine out of the question.
Comment: Do you mean constant *power setting* or constant *throttle setting*? these are different in an airplane
Answer: The answer to your question largely depends on what you mean by "constant throttle setting".
For propeller propulsion, if "constant throttle setting" means "constant power setting" as in a fixed output BHP, TAS will increase almost linearly with altitude (up to the altitude where constant power output can no longer be maintained).
For a normally aspirated reciprocating engine with a fixed pitch propeller, a constant throttle position will mean a decreased manifold pressure with increased altitude resulting in less power output, less thrust (T), and thus decreasing TAS (assuming the decrease in thrust is larger than the decrease in drag (D) resulting from the decreased density at higher altitude, this generally holds true). For a supercharged engine, depending on how the supercharger is controlled, "constant throttle setting" can have the charge control maintain a constant manifold pressure. In this case, the power setting will be maintained (up to the maximum altitude where the supercharger can maintain the manifold pressure), and TAS will increase.
For a jet propulsion engine, once again it depends on what is implied with "constant thrust setting". For example, for low/no bypass engines, a constant EPR should roughly correspond to constant T with altitude, hence with D decreasing with altitude, TAS will be higher before T = D. If "constant thrust" means "constant N1", thrust will actually decrease with altitude, how quickly it decreases with altitude will determine the effect on TAS (once again, where T = D).
If "constant throttle setting" simply implies "constant thrust". Resulting TAS will always be higher (as for a given TAS, T remains constant and D once again decreases).
Comment: "constant power setting" means a certain percentage of rated engine power, eg "75% power," which could mean different throttle, prop, mixture settings at different altitudes
Comment: rbp, thank you, it was a long time ago since I've been dealing with propeller propulsion, I've edited my reply accordingly.
Comment: @rbp: I suspect the intention of the question is exactly opposite. "constant power setting" means the throttle, prop and mixture levers (resp. power and prop levers resp. thrust levers) are at the same position.
Comment: good point. i'll ask.
Answer: The true airspeed (TAS) is determined by adjusting the indicated airpseed (IAS) for altitude and outside air temperature (OAT).
Faster small airplanes have a TAS calculator built in to the ASI. To use it, the pilot dials in the pressure altitude read off the altimeter (ALT), and sometimes the OAT, and reads the TAS off a separate dial on the ASI. In this photo, the IAS is 105kts, and the TAS is 129kts @14,000ft, 147kts at 16,000, 164kts @ 18,000ft, 182kts @ 20,000.
In one airplane I fly, the cruise setting is 34" MP and 2400 RPM. This setting produces a higher TAS at higher altitudes.

For airplanes that don't have such a dial, the pilot can estimate the TAS by adding 2% per 1,000ft of altitude to the IAS. For example, 100kts IAS at 10,000 ft pressure altitude is 100kts * 20% = 20kts. So the TAS would be 120 kts.
True airspeed calculations become less accurate as altitude increases and the planes flies faster, but a jet and a plane both flying at the same indicated airspeed at 10,000ft will read the same TAS off the dial.
At higher altitudes, jets and turboprops use an "air data computer," such as this one, which states:

Air data computers are used by aircraft to acquire and process data
  from sensors (such as pitot tubes and avionics buses) to obtain key
  air data parameters such as altitude, airspeed, height deviation and
  temperature to ensure safe and accurate flight detail, on both rotary
  and fixed wing aircraft.


Cost basis for spinoff company

Question: I owned Stillwell financial stock (they were the parent company of Janus Capital). In 2001, they separated.  What is the cost basis for each stock?
Answer: Unfortunately the information you have about there being a spinoff is incorrect.
Janus Capital (unlisted) merged with Stillwell Financial (listed).
For shareholders of Stillwell, the only effective change is that your Stillwell shares became Janus Capital shares on a 1:1 basis.  There were no events (splits, spinoffs etc.) that would affect your cost basis.
Therefore your cost basis is whatever you purchased it at in 2001.
Source: Internal databases as Norgate Data.

Cost basis for spinoff company


the word "partner" in business situations

Question: In business situations, is it acceptable to introduce a business partner as simply "my partner" or is it necessary to specify "my business partner"?  I have seen both used and the issue seems to revolve around ambiguity surrounding the increasing use of "partner" to allude to a romantic connection.  Does it matter if my partner is of the same or opposite sex?
Comment: In context, people will understand "partner" to mean "business partner." I'd say you can use it without any qualms or reservations.
Comment: *Partner* lends itself equally to context where the exact nature of relationship is not to be specified, and can be deliberately ambiguous. However, both married and unmarried relationship are covered by *partner*, **and straight as well as gat ones**. Yet, in some cases business and personal relationship are intertwined.
Comment: It's probably not politically correct for the sex of your parter to matter whether it is taken to be a business or a life partner. In the UK, "partner" is often used for a live-in, more often than in the US, but it is hardly unknown here.  It just depends on context.
Comment: Use your personal judgment and that will be your answer.
Answer: 'Acceptable' to whom? The majority of English users know that partner is sometimes used for a business partner and sometimes for a romantic partner.  If the word's used in a business context, it's not likely to be misunderstood; if you go for a drink after work and need an introduction to an acquaintance, it would be polite to say 'business partner'to avoid confusion. But there's no rule that says "after 6 p.m. the word means romantic partner"; everything (and particularly Does it matter if my partner is of the same or opposite sex?) depends on your acquantainces.
Answer: I worked for two women who owned a business together who referred to each other as "my partner", as in business partner. In our liberal open-minded town, where unmarried people of all orientations would introduce a significant other as "my partner", occasionally people would instantly assume they were also a lesbian couple. Then one of them would mention her husband and the person assuming the women were also romantic partners would be a bit embarrassed. My bosses got a laugh out of it, no harm done.
I think having to specify "business partner" to avoid confusion would depend on the context but that in most situations just "partner" should suffice as it is perfectly acceptable English. One shouldn't have to go to the trouble to be very specific in the wording in order to pre-empt any assumptions on the part of the listener, whether the are negative, positive, or neutral assumptions. In some circles, such as in the aforementioned liberal town, going to the trouble to specify "business partner" with a person of the same sex might in fact be seen negatively, if the listener was predisposed to thinking the clarification sounded homophobic.
Comment: "One **shouldn't** have to go to the trouble to be very specific in the wording in order to pre-empt any assumptions on the part of the listener, whether the are negative, positive, or neutral assumptions." [My emphasis] This is shockingly naive for someone old enough (>13 years) to be allowed to post here. It's the rose-colored idealism in the word **should**. Reminds me of the 1970s when radical feminists in Iowa City declared that they **should be** able to walk on public streets stark naked without being stared at by drooling sex-starved men.
Comment: Ambiguity's always a problem, & many folks are certain to assume the worst or dirtiest if there's more than one way to interpret a word or expression. It usually takes so little effort to make things clear rather than blithely assuming that everyone knows what you're thinking. But that's what a solipsistic view of the world will do for one.
Comment: Sorry to have been so naive. I'll not comment here again. Cheers.
Comment: Well, you've shown your mettle: none at all. That's what you get for walking and talking around naked, I guess. Next time, wear your armor.
Comment: You probably aren't still around, but on the chance that you are: the comments of user21497 were outrageous.
Answer: It is completely acceptable in a business context to talk simply of 'my partner' without giving rise to confusion. However, with changing times and wider use of the phrase, I can foresee the possibility of just the distinction that you are querying. 'Partner' has the specific legal meaning of a person jointly and severally liable for the other's debts when used in a business setting but carries no such connotation in romantic situations!
I feel, therefore, that there may well be times when use of phrase 'my business partner' might serve to clarify the relationship.


Have the CDC and NIH ever been sued for lack of attention to African American and Native American mortality?

Question: Have the Center for Disease Control and the National Institute of Health ever been sued for ignoring the low life expectancy of African Americans and Native Americans, or sued to force the agencies to make changes in the future? I mean, I think the case would be strong-in the past couple decades the NIH had to step up its work on heart disease in women even though white women were dying of heart disease later in life than men were.
Comment: Are you exclusively asking about life expectancy and AA, or more generally any bad-outcome rates correlated with protected class?
Comment: That's a good question, now you made me think of Native Americans as well, which I'll insert in the question.
Answer: There is no central repository of suits against NIH or CDC, so a definitive answer is very unlikely. A scan of four dozen most recent suits which made it to appellate court involving NIH as a plaintiff show that the majority of them pertain to employment (Williams v. Sebelius, Poulsby v. Chase, Scambos v. Computer Management, Bonds v. Leavitt, Manns v. U. Ark. Med Ctr, Waseff v. NIH, Arthur v. Frederickson). There are other causes, such as termination of grant (Dobkin v. JHU), workplace-related (Stephenz-Frazier v. NIH, Battle v. Burwell), contract squabbles (IntraComm v. Bajaj), disposition of frozen embryoes (Doe v. Obama; Doe v. Shalala), schedule 1 classification of marijuana (Krumm v. Holder), FOIS ( PETA v. NIH, HHS), and then a number of cases, dismissed, where it's impossible to say what the issue was (Smith v. Donahoe (no legal claim), Rivera v. FDA , Scott v. NIH (frivolous litigation). No case appears to have ever been litigated against NIH because of the scientific subject matter of NIH-funded research, nor that NIH grant-dispersal policy illegally discriminates.
There is one case very remotely related to the question, Emrit, Leal-Mendez v. NIH, where plaintiffs sued various health agencies alleging violation of ADA, negligence and intentional infliction of emotional distress stemming
from alleged attempts to get treatment for "mysterious, parasitic infection", but this was dismissed (a pro se case, plaintiffs failed to do the basic homework on suing the government – dismissed because the court lacked subject matter jurisdiction).
The outcome (life expectancy statistics) is not a basis for a successful lawsuit: nothing in the law requires a government agency to guarantee a particular outcome in its sphere of operation. If a government agency were to pursue funding policies that discriminated against an ethnic group, there could at least be the seeds for a lawsuit. For example, we know that African Americans are disproportionately affected by sickle cell disease, so if research proposals to control sickle cell were systematically turned down, one might argue that this is racially discriminatory, because of the disparate impact of the policy. However, disparate impact has not yet been admitted as a general doctrine of discrimination law. There are various federal anti-discrimination laws pertaining to housing, employment, public accommodation, education, and voter registration, but it is not clear how health-research funding would be subsumed under existing discrimination law. There is the theoretical possibility of employing the Due Process and Equal Protection clauses to arrive at the unconstitutionality of a federal policy that discriminated racially. One might also attempt to argue that such a policy is contrary to Congressional intention (in creating the agencies and funding the programs), and thus illegal. But these are basically hypothetical arguments.
Answer: I think that what you really mean to ask, although the question isn't very artful, is whether the CDC or NIH have any legal liability for "ignoring the low life expectancy of African Americans?", which could give rise to a lawsuit that could prevail on the merits if somebody brought one.
The answer to that question is no.
The CDC (Center for Disease Control) and NIH (National Institute of Health) are government agencies entitled to the sovereign immunity of the United States and the contemplated lawsuit does not fall within any recognized exception to that sovereign immunity.
More generally, even in the absence of sovereign immunity considerations, the CDC And NIH do not have any legal duty to prioritize one area of research or another. The matters to which they devote their efforts are in the absolute discretion to the administrators of the agencies subject to Congressional direction (usually in funding bills). Absent a specific statutory mandate to investigate a particular thing, they have breached no legal duty.
Furthermore, since the "low life expectancy of African Americans" is something that is statistically true of a group of people, rather than something that is particular to any given individual, there is probably no one who would have standing to bring such a vague claim.
Comment: @sharur In all likelihood, the suit would be dismissed for failure to state a claim for sovereign immunity and lack of duty, before the question of class certification could be reached because class certification is a more fact intensive inquiry. The problem would be showing that all members of the class were causally injured by the same alleged breach of duty which is pretty much impossible.
Comment: Not disagreeing with your answer, but would not a class action suit be appropriate here? Would African Americans not qualify as a class (I ask in ignorance).


Single Cylinder 2 stroke bike with twin exhaust, will it need two chambered exhausts?

Question: I am asking specifically about Yezdi (not in production anymore) 250/350cc motorcycles. Yezdi RoadKing was a 250cc single cylinder two stroke with twin exhaust. If upgrading to a calculated chambered exhaust, will it need two chambered exhausts or just one? I was told that for two strokes, only a single exhaust is needed for a single cylinder (should there be multiple cylinders) and that separate exhaust pipes will be required for each cylinders (ie, exhaust gases from more than one cylinder can not go into one exhaust pipe. Hence the number of cylinders and exhaust pipes will be equal).
Answer: Two stroke engines, by their very nature, require some of the 'plumbing' you note in your question.  Specifically the expansion chamber.  Unlike 4-stroke engines, two-stroke engines require the expansion chamber and stinger (reduced diameter over distance) at the end of pipe.  The energy in the exhaust wave expands and wave front slows in the expansion chamber and then accelerates as the diameter decreases to the stinger and bounces back toward the front of the pipe to stuff escaping hydrocarbons (unburned fuel) back into the cylinder head.
A Jawa engine is probably installed in your Yezdi Roadking.
Here's the weird part.  You have two exhaust ports, if I am correct, coming off the head.  You could custom build a pipe with expansion chambers that join together, perhaps.  Seems a bit painful.  There are aftermarket pipes that are properly calculated and join into a single expansion chamber.
For aesthetics, performance and ease of procurement I would go with two new and independent systems with calculated expansion chambers.  They won't 'conflict' with one another and would IMHO look much better than a bastardized expansion chamber thing, which in my mind would be created by trying to combine into a single pipe with expansion chambers.
Comment: Yezdi has a java engine and two exhaust ports coming of the head, Yes.
Answer: Considering that you have a single cylinder pushing out exhaust into dual pipes, you wouldn't need to worry so much about equalization efforts. By its very nature, the exhaust is going to find the path of least resistance and therefor will flow to which side it can flow through easier until things are equalized. It appears from what I've seen that the Yezdi had the dual exhaust for aesthetic purposes (id: they made it this way to equalize the look not to equalize the performance). If there were two cylinders, this would be of much more importance. I'm not saying you wouldn't get better performance from a better exhaust system. I'm saying equalization is not a huge factor.
Comment: I am not aware of any 2 stroke engine that has the exhaust gases coming out from more than one cylinder into a single pipe. For a 4 stroke car/bike, that's all right and always has been. I would greatly appreciate a little more clarification in this regard.
Comment: @You_Shall_Not_Pass ... I am not aware of any either and you make a good point. You wouldn't necessarily want two (or more) cylinders feeding a single exhaust on a *2-stroke* engine, because it would most like push exhast gas into other cylinders (path of least resistance) causing running issues. I will modify my answer to project this.
Comment: I have seen smoke coming out from both the exhaust pipes which is why I bothered in the first place to think that its not only for looks. And yes, the dual exhaust did play a major role in the bike's total sale in my country. Back then it was the only bike with a dual exhaust until when the mighty RD350 arrived.


Should Male or Female Sibling Take DNA Test?

Question: My sister and I are looking to do a DNA test to aid in our genealogy research.  What is best practice here?  Would one of us provide better results or will they be the same?
Answer: You should consider testing both of you. Because each sibling has it's own DNA.
You can increase chances of finding matches if you buy tests in different competitive labs. For example, you can test in FTDNA, and your sibling in 23andMe. In such a case you will be able to use databases of matches of both labs. And you can upload your and your sibling's raw autosomal data to free GEDMATCH service and prove your relationship there. Or there is another way to put data into one database:        use import feature of FTDNA. It consumes data from 23andMe, puts it's data into FTDNA database and make it avaivable for matching.
If you have male and female siblings, it is good idea to start from male siblings, because male persons have more types DNA (atDNA, mtDNA, Y-DNA) than female (only atDNA+mtDNA). But in any case you should consider testing of all your siblings.
Comment: And any parents or relatives from previous generations (uncles or great-uncles). You only get a random 50% of each of your parent's DNA. The more you have from previous generations, the more likely you will find a match. By testing one of your parents, you can determine which branch of your tree that match is coming from.
Answer: IF you don't have any older-generation relatives who can be tested, and IF you can only do ONE test, then bear in mind that a male autosomal test includes 22 pairs of chromosomes plus one X, while a female autosomal test includes 22 pairs plus 2 X's, so you get a few per cent more matchable DNA with the female sample.
On the other hand, if a male gets a significant match on the X chromosome, you know with certainty that it's on the maternal side, whereas with a female sample you can't tell from the X match alone.  As with the previous example, the likelihood of this being a factor is fairly small, but it can make a difference.


Which is best for mobile application testing? Manual or Automation?

Question: I am currently working in Mobile Testing (Manual), I just want to know which type of testing best suits for mobile apps (Manual or Automation)? Kindly provide suggestions on this.
Comment: As the answers put, there isn't a great answer to this. It suffers from two problems. One is that it's mostly based in opinion, and the other is that it's a very broad question. That's not to say that you're completely out of luck. What I would recommend is taking the actual challenges and problems you have, whether it's something hard to test with your manual tests, or a struggle getting your automated tests running, and post for help on that specific problem. That would be the best way to get quality results (cue terrible puns!) out of this SE site. =)
Comment: answer depends on your definition of "best"
Answer: A mixture of both, there is no 'best'.
Answer: To test mobile applications is very hard. You has so many different devices and operating systems. In some cases you have to test older versions of the application too, to be sure they work with a new backend or something like that. This produce a lot of combinations.
No, you can not covering all of these combinations manual, neither with automation. But automation can help you to coverage more combinations in the same time.
Automation do not exists to supersede manual testing. The best way is to have both. My opinion is, that you automate the regression tests, because you execute them over and over again. But maybe you know what kind of tests you most execute. Whatever, if you automate these tests, you save a lot of time and recurring work.
Take the decision to automate tests for mobile is one thing. Find a proper tool another. On the market exists a few open source tools and a lot of commercial tools. You must invest a lot of time to evaluate what tool is the correct for you. Take the time!
Maybe you should also know, that you have a lot to do at the beginning of automation. But the more you automate, the less effort you will have each week or month. Automation is for a long term solution.


'00 Mercury Sable speedometer and ??? issues

Question: My Sable is having several issues and I can't tell if they are related. The car is driven less than average, three or four days per week. At some point, it lost coolant and I had to add about two quarts a couple weeks ago. The engine is still hot right now, so I'm not sure if it's low at the moment. Another issue is that the speedometer will sometimes drop to 0, seemingly randomly, while driving but will eventually return to a working state. When the speedo starts working again, the car makes a strange noise. The last issue I have noticed is that the car sometimes has an issue accelerating. You can push the car to 5 or 6K RPM but the car will still travel at, say, 15 MPH.
Answer: Having owned a 97 Taurus which is a Sables cousin a  common problem is the vehicle speed sensor. If the sensor completely fails it is easy to diagnose. Mine slowly failed over a two week period during which time it would shift into nuetral, have eratic speedometer readings,and would shift up or down at odd times or work perfectly fine. The coolant resevoirs are also a high failure item. They develop a leak at the bottom so it makes it difficult to add coolant. When I replaced the coolant tank a new one at the dealer was $3.00 more than the salvage yard wanted for a used one.
Comment: Is it possible to check or replace the VSS myself, or is it best to take it to a shop?
Comment: Depending on your skill level it can be done in the driveway. It is located on the passenger side of the motor near the firewall,next to the exhaust pipe,behind a heat shield. In my case it was difficult to diagnose as it was intermittent. A visual inspection showed the wiring was melted.
Comment: mikes: Is this the [part I need](http://www.autozone.com/autozone/parts/Duralast-Sensor-Transmission-Speed/2000-Mercury-Sable/_/N-jea72Z6o3b6?itemIdentifier=631300_0_2022_92942)?
Comment: It turns out this was the issue. I replaced the speed sensor this past summer and have had no issues since. Thanks for your help mikes.


How random token protect against CSRF

Question: Generally we know that a random token added to each request is a good solution against CSRF. But how exactely is it work? The web server generates token, sends it to client in hidden form, than this token is added to request and webserver validates it (for me it is reasonable). the second approach could be that client generate the token and sends it to web server. But how webserver know about the token, is it correct if it was not generated by webserver.
Answer: The token is always generated by the server, never the client.  You are correct that if the client generated the token, then the server could not verify that it was valid.   This is why every single CSRF mitigation scheme includes a token generated by the server.  So, since the server created the token, it always knows what the token value should be, and can validate that the client sent the correct token.
Answer: You can generate a random token once and store in a cookie, then submit it with every form as a hidden input so you can check in the server.
Answer: If a script has multiple forms to handle as most of the MVC code has to nowadays the cookie that contains the CSRF token will be same for all hence defeating the purpose of CSRF token as each CSRF token needs to be form specific.
Answer: CSRF tokens are a little bit more complicated than that. These are tokens that prevent people from posting forms to your website that cause unintended effects to your users. I'll give you an example of what happens with and without
On your website, you have a form that allows people who are signed in to post a message to the main chat channel.
<form action="postmessage/" method="post>
    <textarea name="message"></textarea>
    <input type="submit" value="Send!" />
</form>

When this form is submitted, it'll go to "postmessage/". That page will take the contents of the text area, and post it to the feed alongside the users id.
Now, imagine we go to a site that isn't trustworthy. On that site, the following code exists
<form action="fakesite.fake/postmessage/" method="post" id="secretform">
    <input type="hidden" name="message" value="Go to betterfakesite.fake its much better than this site">
</form>
Go to Members Area">

Since there's no CSRF protection, when a person clicks that link they'll be sent to your site and immediately post a message telling them to go somewhere else.
Now, lets try again with a CSRF token
<form action="postmessage/" method="post>
    <input type="hidden" name="_csrf" value="GENERATEDBYSERVER">
    <textarea name="message"></textarea>
    <input type="submit" value="Send!" />
</form>

When you visit this page, a token is generated for the form. This token should be stored in the users session on the server side. When a person submits the form, they'll also send along the token, which the server can then check against the tokens it has in the users session. If it's not there, reject the message. If it is, accept it and delete the token.
Now when you go to the malicious page and click the link, you'll be redirected to your site, but no post would have been made. The CSRF token protected you.
A token is only as secure as you make it. When generating a token, always store it under the users session. In PHP it's the $_SESSION variable, and other language equivalents. What this ensures is that one person can't generate a ton of these tokens, then use them against other people.
JavaScript by default prevents cross site requests, the malicious page can't try to ajax a copy of the page to pull a token. They can't script their server to do it either, as the tokens are unique to user session.

How random token protect against CSRF


How important is tire tread on a mtb used for commuting?

Question: I started back riding a bike around town last year, although I don't have a $600 mtb or road bike. I'm finding out a lot of interesting things that I took for granted when I first starting riding my old 10-speed back in the 70's, like tires and gearing. I was 15 years old when I bought my first 10-speed, comparing now to then, the bike has come a long, long way. I'm relearning everything I thought I knew about a bike and finding out that I don't like road bikes per say, reason being that I like off-road riding once in awhile and a skinny tire can't do that for me.
Comment: I see that you ask your question in the header, but the question itself seems like it's a bit of a ramble without explaining why or what you're asking.
Comment: Are you asking if it will be a problem to use mountain bike tires for road commuting?
Comment: Please edit your question to explain better what it is you want to know.
Comment: There are now an insane number of bike categories and subcategories, including  "adventure road" that straddle between mountain and classic road where you can run anything from skinny "road" tires to full mountain bike tires, but fit more like a road bike than a mountain bike. This sounds more like your use case.
Comment: Define off-road.  My bike can go off the road, but I'm not trying to climb a mountain with it.
Answer: "Importance" is highly subjective, debatable, and relative. But, based on the limited information in your original post, and a lot of assumptions about you, I'd say: tire tread is only of moderate importance. Unless you're really pushing the limits of the tire (very fast aggressive cornering, etc.) you can make most common tire types (mountain, urban, cyclocross, road, etc.) work for commuting.
Some factors to consider:

Commuting on mountain bike tires isn't usually super efficient, but can often be much more 'comfortable' than skinny road tires. This is because mountain bike tires tend to offer more cusion (due to higher air volumes and lower air pressures). Mountain bike tires often have higher rolling-resistance (when compared to narrower, higher-pressure tires) on pavement.
There are circumstances in which mountain bike tires have less 'grip' on pavement. This is if/when the tires are especially knobby (big, spaced knobs have less surface area contacting the hard pavement).
The trade-offs to these disadvantages is that mountain bike tires are generally better off-road, for those instances when you aren't on pavement.

Many commuters have found that a mid-width, semi-slick tire (i.e. something 30mm-45mm wide without significant knobs) ends up serving as a good/solid/comfortable on-pavement tire and also allows for sufficient off-road use.
Answer: Skinny is less common these days, even amongst the svelte roadies.
Tyres like this are going to buzz and roar on tarmac.
Whereas a tread pattern like the left most on this image won't be much good in the slippery, so the one in the middle would be a moderately fair all-round tread.

However for mostly tarmac riding with a chance of offroad you ideally want a tyre with medium sized side knobs and a flat surface for the crown (ie the bit that runs on the road surface during straight and level riding)  Heres most of what I mean, but the knobs are quite large on this:


Difference between "premise" and "assertion"

Question: I was preparing for the GRE exam, and was wondering what the difference was between a premise and an assertion. Any example which highlights the difference would be immensely helpful (something I haven't been able to find online).
Answer: An assertion is a statement of a fact or belief, while a premise is a statement from which another is inferred. For example, if we use the assumption X to conclude Y, then the premise X has been used to make the assertion Y.
Comment: Couldn't you make the assertion that all bananas are yellow?
Comment: @Mitch You could. Assertions are like conclusions in that they can in turn become premises for further conclusions/assertions. While you could make a baseless assertion that all bananas are yellow, one possible premise could be "every banana I've seen as of yet has been yellow."
Comment: @JasperLoy: actually I'm being serious. 'All bananas are yellow can be just as much a premise or assertion as 'this banana is yellow'. There is no difference between the two as far as assertion or premise is concerned.
Comment: @JasperLoy: sure there's a logical connection between the two, but the fact that one implies the other says nothing about their status as an assertion or premise in a particular argument.
Comment: @JasperLoy: clear in what way? You've paired them, but if you follow what I said , then your pairing is arbitrary and could go the other way. So, can you add any content that would distinguish premise and assertion with your two examples?
Answer: Yes, they do seem very similar in that they are both related to 'assumption' or 'axiom' in an argument. You can read their dictionary definitions which will tell you what each are but it doesn't tel you what is important in the comparison.
A 'premise' is an assumption that is usually discovered, implicitly understood, or passively waiting (possibly even hiding), found by working backwards in an argument to a starting point.
An 'assertion' is an actively stated starting point, one made to eliminate there possibilities in forming an argument.
Both, like 'assumption' or 'axiom', are the starting points or base data of an argument,  One may question all of these but for the validity of the argument one is expected to accept them as given. One may alter them but then that's a different situation for the argument.


Oil level is lower after a few hours' cool down than immediately after driving

Question: After I shut off my engine and check the oil, it is over the full mark on my dip stick. When I leave the engine to cool down about 5 hours, the oil level is below the full mark on the dip stick. This just started happening after my last oil change.
Comment: I'd wait at least 5 min, maybe 10 before checking, could be oil dropping down giving a false high reading.
Comment: What does your owners manual say about when to check the oil levels?
Comment: Isn't it necessary to know the make & model of the vehicle before anything else?
Answer: The most obvious answer is heat-related expansion and contraction.  Back in the day of full service gas stations, it was standard practice to check the oil when filling the gas (and I still do that at self-service stations).  The best practice is to check the oil as the last thing you do at a fuel stop, giving the oil time to drip down into the bottom of the crankcase but not allowing it time to contract from cooling (a few hours later, as you indicate).


How does electric energy flow in a circuit?

Question: I have read that the electric energy flows from the battery into the circuit through electric field created  outside the wires into the light bulb (or any other resistor). I have also read that the friction caused in the movement of electrons cause light bulb to heat up. So which is the correct explanation?
Comment: Another [related question](http://physics.stackexchange.com/questions/21722/why-does-electrical-current-start-to-flow).
Comment: Energy flows through the space between battery and lightbulb. Not along wires. See http://amasci.com/elect/poynt/poynt.html
Answer: The electric field that is applied to the wire (it doesn't matter if you consider it to be outside or inside the wire for the purpose of this explanation) causes the electrons that are indeed inside the wire to move. This movement involves the "friction" you heard of ( electrical resistance), which in turn causes heat (and emission of photons).
The important thing is that it is not the field that's flowing. The field causes a flow and that flow causes the heat.
Comment: Thanks a lot both of you. It was useful for improving my understanding. I have a follow - up question. I have seen the diagrams of electric circuits in which the electric field develops between two HALVES of the circuits. But that doesn't make sense. This is because, as per my understanding, the electric field should develop between two atoms of the conductor at any given part of a closed circuit. So how does the two HALVES scenario come into the picture ??
Comment: But do the electrons from wire come back to their original "positions" in atoms of the wire?
Answer:
I have read that the electric energy flows from the battery into the circuit through electric field

This is a simple circuit with a battery a switch and a light bulb.
The battery has the energy in chemical form, i.e. there are atoms and molecules separated into ions that generate a voltage drop, (an electric field ) accross the switch. No current flows as long as the switch is open, and no energy is transfered.
Once the switch is closed a current develops in the wires, electrons in the conduction band move through the wires from the positive to the negative pole through the light bulb. The electrons have an average drift velocity, carrying kinetic energy. In the wire itself they do not lose energy. In the resistance of the lamp they lose energy transferring it to the molecules of the resistor. The way electrons lose energy when decelerated is through photons, in the case of the light bulb infrared photons which make the lamp incandescent and then excite the electrons of the molecules of the resistor to high levels, enough to start deexciting in  visible light photon transitions.

created OUTSIDE THE WIRES into the light bulb ( or any other resistor).
  this is wrong.
I have also read that the friction caused in the movement of electrons cause light bulb to heat up.

See my description above . It is nor really friction, as friction is a macroscopic effect. It is electromagnetic interactions.
Comment: There are some confusion here.  The way electrons lose energy is not "through photons", but by collisions with impurities in the resistor. (by *impurity* I mean anything that disrupts perfect crystalline order of the ion cores: atoms of different materials, randomly oriented domains, vibrations, ...).  In a collision, the electron does work on the impurity (applies a force and displaces it).  The displaced ions accelerate, and can start vibrating.  Thus, the resistor heats up.  This is how the electron loses energy.  "Photons" (radiation) is a consequence of the motion of the ion cores.
Comment: @garyp in my view at the level of electrons everything happens with the exchanges of photons, either virtual or real. Heat is infrared photons, light has higher frequency and comes from excited levels due to multiple infrared absorptions
Comment: No heat is NOT infrared photons, heat is random motion of electrons and vibration of atoms. Motion of particles has nothing to boil down to further.


AbsoluteOptions not working with PlotPoints?

Question: AbsoluteOptions does not work well with PlotPoints, for example:
AbsoluteOptions[
 Plot3D[Sin[x y], {x, 0, 2}, {y, 0, 2}, Mesh -> All,
   MaxRecursion -> 1], PlotPoints]

Known bug?
Answer: It was never supposed to work, even in old Mathematica. AbsoluteOptions[] was only ever intended to get settings corresponding to options of Graphics[] or Graphics3D[], since that information can be pulled from the Graphics[]/Graphics3D[] thus generated.
MemberQ[Keys[Options[Graphics3D]], PlotPoints]
   False

Logically, it also makes sense: recall that Plot3D[] samples adaptively, starting from an initial sampling (which is exactly what PlotPoints controls!), and in the final mess of Polygon[] objects that results, there is no way to distinguish which were the initial sampling points, and which were the points added by the adaptive sampling.
With that all being said, do ponder on the following results:
p1 = Cases[Plot3D[Sin[x y], {x, 0, 2}, {y, 0, 2},
                  Mesh -> All, MaxRecursion -> 1],
           GraphicsComplex[pts_, rest__] :> pts, ∞];

p2 = Cases[Plot3D[Sin[x y], {x, 0, 2}, {y, 0, 2},
                  Mesh -> All, MaxRecursion -> 1, PlotPoints -> 15],
           GraphicsComplex[pts_, rest__] :> pts, ∞];

p1 === p2
   True

Comment: Thank you J M. It is not very clearly stated in the official documentation
Answer: AbsoluteOptions[Plot3D[..], opt] can only return options to Graphics3D, as is pointed out in J.M.'s answer.
Here's a way to reverse engineer a PlotPoints setting from the output of Plot3D.  It relies on Plot3D continuing to do things internally in the same way it has for a while, namely, adding the points to GraphicsComplex in the order they are evaluated, starting with the initial sampling grid. Caveat: This does not work if the function as a singularity on the grid.  Since Plot3D makes slight offsets to the grid along the boundary, this usually only happens if the function and plot domain have symmetries that coincide at a singularity (e.g., change {x, 0, 2} to {x, -1, 1} below).
plot = Plot3D[Csc[x y], {x, 0, 2}, {y, 0, 2}, Mesh -> All,
   PlotPoints -> {9, 16}, MaxRecursion -> 1];
pts = Cases[plot, GraphicsComplex[p_, ___] :> p, Infinity];
struct = SplitBy[Flatten[pts, 1], #[[2]] &];
xpts = Length /@ struct;
ypts = Length /@ Split[xpts];
PlotPoints -> If[First[xpts] == First[ypts],
  First[xpts],
  {First[xpts], First[ypts]}]

(*  PlotPoints -> {9, 16}  *)

For the curious, here are xpts and ypts from which PlotPoints was inferred:
xpts

(*
{9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, 3, 3, 3, 3, 5, 6, \
6, 5, 5, 5, 5, 4, 5, 5, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, \
...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
*)

ypts

(*
{16, 1, 4, 1, 2, 4, 1, 2, 3, 2, 3, 1, 5, 1, 6, 1, 5, 1, 6, 1, 1, 1, \
8, 1, 35, 1, 13, 1, 13, 1, 8, 1, 1, 11, 1, 10, 1, 11, 1, 6, 1, 1, 14, \
2, 2, 1, 4, 4, 1, 15, 1, 4, 1, 3, 1, 1, 2, 7, 1, 1, 1, 3, 1, 82, 1, \
34, 1, 257}
*)

Answer: The built-in AbsoluteOptions does not knwo MaxRecursion either. There is message page for this: optnf.
On the documentation page for Plot3D there is a section Plot3D Scope>Sampling give a short idea of what is actually done by Plot3D.
Use PlotPoints and MaxRecursion to control adaptive sampling:
Grid[Table[
  Plot3D[Sin[x y], {x, 0, 4}, {y, 0, 4}, PlotPoints -> pp,
   MaxRecursion -> mr, Mesh -> None], {mr, {0, 1, 2}}, {pp, {5, 15}}]]

There is ome further insight with the example on that page for Options>MaxRecursion and Options>PlotPoints both with Sin.
There is a documentation page for PlotPoints and for MaxRecursion. The later is insightful on how to cope with adaptive sampling or subdivision:
Table[Plot[Sin[x^2], {x, 0, 10}, PlotPoints -> 5,
  MaxRecursion -> mr], {mr, {0, 2, 4, 6}}]

This may be continued on EvaluationMonitor:
Count evaluations for doing a surface plot:
f[x_, y_] := E^x - Sin[x^3 - 3 y];
Block[{c = 0},
 Plot3D[f[x, y], {x, -2, 2}, {y, -2, 2}, EvaluationMonitor :> c++,
  PlotLabel :> ToString[c] <> " evaluations"]]

And the main tipps on how to enhance performance:
When the function is evaluated, it takes fewer evaluations since symbolic derivatives are used:
Block[{c = 0},
 Plot3D[Evaluate[f[x, y]], {x, -2, 2}, {y, -2, 2},
  EvaluationMonitor :> c++,
  PlotLabel :> ToString[c] <> " evaluations"]]

This can be done for some further extension by taking the tipps into account form the section Generalization & Extions on the documenation page for EvaluationMonitor. This is hard numerical calculation and computer time overhead then. Most of EvaluationMonitor is about Your questions intents. Some hints can be found on the documation page for StepMonitor too. That might be the more direct path for optimization by hand. These lines example has found some question on the community already.
{sol, steps} =
  Reap[NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0,
     u[t, 0] == Cos[6 \[Pi] t], (D[u[t, x], x] /. x -> 1) == 0},
    u, {t, 0, 1}, {x, 0, 1},
    StepMonitor :>
     Sow[ParametricPlot3D[{t, x, u[t, x]}, {x, 0, 1}]]]];

splot = Show[steps, PlotRange -> All, BoxRatios -> {1, 1, 0.4}]

The methodologies incorporated into the built-ins of Graphics3D are already enhanced and optimized. The goals are suitablitity for most cases and as suitable as possible information about the represented surfaces and curves. This uses prettea enthance methods not all tought at universities at all at present times. That does not imply that this is not high inferential reasoning. It can not be optimal by one method in general.
That is for the intent of the question nice surfaces with Plot3D.
Why does this not work with AbsoluteOptions?
Now the only example for AbsoluteOptions with Plot-built-ins is with Plot. There is no information about Scope or Options. See Also list AbsoluteCurrentValue, that is about attributes of EvaluationNotebooks, FullGraphics and SetOptions. That is not much.
FullGraphics does not work with Graphics3D only with Graphics. InputForm works with Graphics3D. SetOptions is not for getting information but for setting option values.
In the tutorial Efficient Representation Of Many Primitives there is the statement:
The output of Plot3D is a GraphicsComplex! That is in antinomy to the output of the built-in InputForm. In the paragraph ahead this statement is this:
GraphicsComplex is especially useful for representing meshes of polygons. By using GraphicsComplex, numerical errors that could cause gaps between adjacent polygons are avoided.
So the representation of a surface is mesh of polygons that is brought into the notebook via GraphicsComplex. Now there reason to count points or polygons or search for gaps.
For points questions are:
collinear points
coincident points
find intersection points
extracting points from the meshfunctions of plot3d
and many more.
The latter already show lines and polygons.
For lines:
extracting mesh lines from a graphicscomplex
r = RevolutionPlot3D[{ x-0.2,-2 x},{x,0.7,1},
  Boxed->False,
  Axes->False,
  Mesh->{8,4}
]
r[[1,1,1,2]]

lines = Cases[Normal[r], _Line, Infinity];

Graphics3D[lines]

r/. GraphicsComplex[p_, g_, o___] :>
  GraphicsComplex[p, Cases[g, _Line, Infinity]]

For polygons:
how can i find the vertexes of a polygon
Grid[{{"image", "Points", "Lines",
   "Polygons"}, {PolyhedronData["Cube"],
   PolyhedronData["Cube", "Points"], PolyhedronData["Cube", "Lines"],
   Short[PolyhedronData["Cube", "Polygons"], 10]}},
 Spacings -> {1, 1}, Dividers -> All, Alignment -> {Center, Top}]

Real surfaces are really complex so a simplified example:
Generation:
    points = {{0, 0, 0}, {0, 0, 300}, {0, 300, 300}, {0, 300,
       0}};(*Vertices of the polygon*)
myPolygon =
     Graphics3D[{Polygon[points]}, Boxed -> False, Lighting -> {Gray}];

Analysis:
pointsana=Cases[myPolygon, Polygon[pts_] -> pts, Infinity]

Check:
points==pointsana

(* True *)
Cases[myPolygon, Polygon[pts:{{_,_,_}..}] -> pts, Infinity]

might be more powerful.
Cases[myPolygon, {x_?NumericQ, y_?NumericQ, z_?NumericQ}, Infinity]

suffices too.
So the simply answer for Your very question is:
Since the complexity of a 3D graphics can be high lists are not considered suitable for the analysis of Graphics3D by Wolfram Inc.!
A suitable analysis may be given by this very persons:
coloring a set of polygons each polygon to have a specific color
data2D = Import["http://pastebin.com/raw.php?i=0Liw8F1r", "NB"];
data4D = Import["http://pastebin.com/raw.php?i=zgrCRiQh", "NB"];

Graphics3D[
 GraphicsComplex[
  data4D[[;; , 1 ;; 3]], {Yellow, EdgeForm[], Polygon /@ tri}],
 Boxed -> False, AspectRatio -> 1, BoxRatios -> Automatic,
 SphericalRegion -> True, , ImageSize -> Large,
 PlotRange -> 0.9 {{-1, 1}, {-1, 1}, {-0.5, 0.5}}]

This is the 3D extension of a famous mathemtical problem coloring a set of 2d patches differently. There might be no solution already in 2D.
Since we have a surface that is not enought we need more knowledge for example the orientation of the surface by surface normals, the continuity of the surface, first and second derivative and much more.
For examaple this question:
easy way to export graphics3d as triangles with vertexnormals/ in each vertex of the polygons. This can be done better.
Some extension is this answer plot extract data to a file. So instead of working with AbsoluteOptions it is suitable to work with Cases and pattern and analyze without low inferential complexity with ListPlot3D[extractedatatype, BoxRatios -> Automatic]. It works with GraphicsComplex[p_, __], GraphicsComplex[p_, __]. For more GraphicsComplex es
Cases[
      Normal[gr3Dmulti],
      GraphicsGroup[g_] :>
         Cases[g, Polygon[p_, __] :> p, -4

]
is appropriate. And is this Cases[First@gr, Line[data_] :> data, -1] works too.
Polygon, Line and Point do it for the named data type.
A nice start of the problems arising in depth is findinga concave hull and figuring the problem more closer in meshing the surface of a non convex object. Normals are not so easy, but orientation is a hard problem.
To digg deeper into the topic conduct searches like surface characterisation higher moments on google.
Think later von description for surface with these

surface features.

from this reference: Morphometric Characterisation. My answer was focussed very much on stackexchange. For the adaptive sampling look at the literature. For exmample a newer work On properties of analytical approximation for discretizing 2D curves and 3D surfaces and references therein. Or look at how-to-obtain-adaptive-sampling-as-in-plot-function. This source has some remarks on how Mathematica internally handles highly oscillatory behavior. It really recognized algorithmically such cases.
The algorithm make use of InterpolatingFunction.
SystemOpen@FindFile["DifferentialEquations`InterpolatingFunctionAnatomy`"]

brings up the package for InterpolatingFunction.
This simple example works for the data set extracted for points from Graphics3D in the parameter data. But this may be very long. It might replace the built-in for very low inferential purposes.
In this quesiton an attempt is made how to do this reverse: how to splice together several instances of InterpolatingFunction
This is nice:
interp = Interpolation@Table[{i, Sin[i]}, {i, 0, Pi, 0.1}];
(Dataset[{Prepend[#, "InterpolatingFunction"],
Prepend[Partition[f1 /@ #, 1], f1]}] &@
Drop[f1["Methods"], {-8, -8}])

instead of just use Plot or Plot3D.
This is already really big.
Another simple suggestion:
Grid[{{"InterpolatingFunction", "Domain", "Coordinates", "Grid",
   "ValuesOnGrid", "InterpolationOrder", "DerivativeOrder"},
  Prepend[Table[{i, Interpolation[{1., 2., 3., 4.}][[i]]}, {i, 1, 5}],
    Interpolation[{1., 2., 3., 4.}]]}]

So I answer, do not attempt to analyze the visual output to exhaust entents. Prefer to optimize the adaptive sampling with the options PlotPoints and MaxRecursion. What You choice to input and run is not what is realized by Mathematica, but it influences strongly what is in the output. This due to the fact that the surface represents by intent the real surface and is not the real surface. The target is to show the surface as smooth as possible and without any broken points, lines or polygons.
That is not always achieved. Besides the two options mentions there are the there parameters for exactness that influence the results. It is a time consuming process to find the optimum and many bother and stay angry about the results. Some have bigger display, some less good eyes to see, but the representation is what it is with Mathematica. That good not bad.
The concepts are closed in the design of Mathematica as long as the inference levels are low. Plot3D and Graphics3D include higher inference levels. This limits the univerality and to keep the price for packages in total low, the checkes, proves and logic falls somewhat short.
This can be overcome by personal efforts and one acquires knowledge. Whether this leads to particular high selfesteem - I do not know. The presented workup is intermediate and high in inference and tediousness already, but does not do much with the complexity and depth of the problems implicit to the question. Not it is not a bug, this is misuse of the built-in AbsoluteOptions. That is not documented in Mathematica. I do not know if this is anywhere documented. I have just a smaller V12.0.0.
To drive this on step further a reference to DiscretizeRegion and
How to improve this Plot? and the Gibb's phenomenon referenced there. Keep in mind that the Piecewise built-in is for some purposes dangerous in Mathematica, one of them is NDSolve. But the Solve group of the built-ins do not work nicely with Piecewise.
Piecewise is in need to be defined well for the individual purposes in Mathematica! Dangers are time-consuming and less smoothness. See UnitStep and Piecewise. But Piecewise is needed to specify that x is real, use inequalities in the first condition. There are several questions in this community address such problems.
So refinement and adding normals are suitable methods for better results in Graphics and Graphics3D. That should be the mid level inference solution to the question. That is somewhat already implemented with the methods PlotPoints and MaxRecursion.


Can my landlord refuse to renew our lease due to downsizing of purchased lots?

Question: Some background information first: I'm a father of three, and I've been running a store with my wife in the same shopping center in southern Florida for 20 years now. Around 13 years ago, we moved into a different location in the same center, and in the process expanded to two lots. About 5 years ago, we again expanded, this time to three lots. We've consistently paid our rent on time, and we've been all-around good tenants as far as we know.
The situation
Time hasn't been kind to our business, and we can no longer afford to lease three lots in the shopping center. To stay in business, we contacted the shopping center management company to notify them that we would only be able to renew our lease for two lots this period, instead of the previous three.
Weeks passed without any response from them, and with the lease renewal date (April 31st) coming up soon, we took all of last weekend to do some construction and shrink our storefront back to two lots, rebuilding the wall separating us from the third lot in the process. As of today, our shop is again completely contained within two lots, and it's as if the third lot is unowned.
Today, someone from the management company notified us that, if we did not renew our lease for all three lots, they would "not be interested in renewing our lease," period. In a nutshell, they're making us choose between either renewing all three lots or leaving, and since we can't afford three lots anymore, this means we're out of business.
Needless to say, we're not all that excited about the idea of packing up and abandoning our 20-year family business, so we're trying to seek whatever legal recourse we can.
What we've done
As of today, we've hired a lawyer, and we've made it clear to the management company that they should only correspond with him from now on.
My question, in a nutshell: is it illegal in any way for the management company to refuse to renew our lease completely unless we maintain the three lots? We're facing the loss of our business as we know it, so we'd appreciate any sort of relevant advice on this.
To add on to that: if it turns out there's nothing we can do and they don't renew our lease, what are our rights as tenants then?
(Disclaimer: we're not planning on using this thread as legal counsel (we've got a lawyer for that) but we'd appreciate some useful facts or advice from people more knowledgeable than us on the topic.)
Comment: There is no April 31st; Assuming you meant April 30th:  What does the lease say about notice of non-renewal by the landlord?  I would expect the normal notice to be 90 days, and since we are currently around 66 days, it is entirely possible they did not provide sufficient notice.
Answer: It does not appear to be illegal
If you have an option to renew under the lease then it must be for the same premises i.e. 3 lots.
If you don't have an option then it is a new lease and must be agreed by the parties. They have indicated that they will only agree to 3 lots as is their right - they probably believe they will find a new tenant for 3 lots easier than for 1.


Using pictures in my memoir

Question: I have written a memoir through a workshop taught by a known writer.  A friend now in book publishing made a mock up prototype and added my pictures without my knowledge - I loved it - what legal obligation do I have to those seen in those pictures living and dead?
Comment: Hi, and welcome to Writers. We are not lawyers in general or copyright lawyers in particular, and I think you will need to consult one for an answer. There are nuances to fair use, model release, Creative Commons, and royalty-free photography which we can't advise you on.
Answer: It depends where the photo was taken.
What the photo is being used for.
And whether any minors are in the photo.
If the person or subject of the photo is who you are writing about, you will probably need a release.  There are a few exceptions, such as a public figure, and/or editorials.
I took a photo in a crowded public park to capture a certain person of interest.
The article which accompanied the photo focused on this single individual.
Had this person been wearing normal clothing, I would have needed a 'release' to use their image in the manner in which it was used.
However, because they were dressed in what could be determined a costume, and their goal was to garner the attention of the public, this made them the equivalent of a public figure.  So I could do what I did without obtaining a release.  But there was one caveat.  A minor was also in the un-cropped image and had to be photo-shopped out of the image before the publication could be re-released.  I chose to use a close-up instead, and many faces were recognizable, but the photo was taken in a public place, and no attention brought to them.
Since you are writing a memoir, are you bringing attention to certain individuals in the photo?  Was the photo taken in a public place or in a private home or private gathering?  If in private, then the people in the image have a right to their privacy and you will need a release from those living, also from the family of those deceased.  Unless your memoir is presented only to family members as a private publication.
I am not an attorney, and this is not to be considered legal advice.
VTY
Dutch

Using pictures in my memoir


Tiny deep red flower shrub species ID

Question: I found this plant with maple like leaves blooming after rains this july.I am in Bhubaneswar,India.
Answer: It's Jatropha gossypiifolia, a medium-sized (maximum 15m) shrub.The leaves are similar to the leaves of a cotton plant (Gossypium). Often categorized as an agricultural weed. Poisonous for mammals also. Commonly used for the production of Biodiesel.
As per wikipedia-

There are many common names for Jatropha gossypiifolia including bellyache-bush, black physicnut, and cotton-leaf physicnut in English; pinon negro, pinon colorado, and tua-tua in Spanish; medicinier noir and medicinier rouge in French; mamoninha and peao-roxo in Brazil; jarak merah and sibidigua in India.[4]

NCBI Taxonomy ID: 454931

Tiny deep red flower shrub species ID


Has AI changed opening theory, and if so, how?

Question: Pre-AI, it's hard to imagine that opening moves had changed much. Following the birth of computer engines, has AI changed opening theory, and if so, how?
Comment: Things have gotten deeper and more precise.
Comment: And with the advancement of neural nets (especially now as compared to my last comment almost 3 years ago), opening theory has changed even more.
Answer: AI has changed theory by allowing theoreticians to grind through variations tirelessly.  Due to the tactical prowess of even common computer programs it's pretty easy to ensure that variations contain no unexpected barbs.
Answer: I would say not yet. I would think what is called AI (it is not actually AI but that's a different discussion) has made some people question how they approach chess and maybe led to some ideas but I wouldn't say AI has made any significant contributions to theory.
When matches are held between traditional engines and AI engines they are held in conditions that greatly favor the AI engine. Traditional engines are still way ahead. AI is just the cool new thing.
Comment: This may be somewhat true for Lc0 due to its reliance on a GPU, but Stockfish nowadays uses a neural net/"AI" for its evaluation (and it runs fine on a normal CPU).


Using round constants to thwart slide attacks

Question: I'm partly unclear as to how the use of round constants in an iterated cipher makes it immune to slide attacks. I mean, I can see how it does from one perspective, but if the solution to slide attacks is by "making each round different", then shouldn't distinct round keys accomplish this, too?
Answer: Yes the different round keys help, but without the different round constants in key-schedule, all the rounds of key-schedule algorithm will be same. Thus these identical rounds may generate sliding round keys. For example
AES-128 uses 11 round keys, without the round constants, all the rounds of the AES key-schedule will be same. Thus there is chance that there exist two master keys $Ka$ and $Kb$, such that there corresponding round keys differ at only one place.
Suppose 11 Round keys for $Ka$ are: $ka,k1,k2,k3,k4.......k9,k10$
and 11 Round keys for $Kb$ are: $kb,k1,k2,k3,k4.......k9,k10$
if you set $Kb=k1$, then 11 Rounds for kb will be: $k1,k2,k3,k4,k5....k10,k11$
Now you see Both keys have same round keys with an offset of one except that last round key of kb and 1st round key of ka. These identical keys with offset of 1 place help in making slid pair, which is required for Slide Attack.
If each round will have different fixed round constant, generation of such identical round keys will not be possible, thus preventing Slide Attack.


Creating and using custom content tables

Question: If I want to create fields that get set to a custom content table rather than craft_content how would I do that?
Answer: Okie doke. After bashing my head against the wall THIS is how you create your very own super deluxe content table. Allow me to explain...
In your element class you will need to specify the following:
  public function hasContent()
  {
    return true; // You definitely will need this
  }

  public function hasTitles()
  {
    return true; // This is optional
  }

  public function isLocalized()
  {

    return false; // This is optional

  }

  public function getContentTableForElementsQuery(ElementCriteriaModel $criteria){

    return "custom_content_table_name"; // You definitely will need this

  }

  public function getFieldsForElementsQuery(ElementCriteriaModel $criteria)
  {

      // NOTE: I do not have any custom fields set to this table. If you have custom fields you should return them here so that they are included in the criteria query. If you also do not have custom fields just do what I'm doing here and return an empty array.

       $fields = array();

       return $fields;

  }

In your element's model class you'll need to do the following:
  public function getContentTable(){

    return "custom_content_table_name"; // you will need this

  }

  public function getFieldContext()
  {

    return 'custom_content_table_name'; // I have NO idea what this is and the Craft documentation is not clear about it.

  }

Finally, your record for the content table will have to make the following columns:

elementId
title
locale

That's basically it. If you run into any errors make sure you're not including extra non-existent fields in the criteria queries when querying content. Check the Craft logs to see exactly what's happening if you encounter any problems.
Answer: I've created a custom Element Type, and used the getContentTableForElementsQuery() to set where the element's content is stored.
For instance, the default BaseElement class defines:
public function getContentTableForElementsQuery(ElementCriteriaModel $criteria)
{
    return 'content'; // table craft_content
}

Here, you would simply provide the table you want to store your data in, rather than content.
Then, when going to save the field(s), you need to set the contentTable like so:
$originalContentTable = craft()->content->contentTable;

craft()->content->contentTable = 'mycontenttable';

// Save your fields

craft()->content->contentTable = $originalContentTable;

FYI - I learnt this from looking at how SproutForms works, which uses its own content table for fields.
Comment: Ehh. I've done this so, considering your answer, I'm either missing something or not explaining myself well enough. What I'm after is the ability to define where Craft fields go. Right now If I create a new plain text field a column gets created in craft_content. I would prefer to be able to choose where that column gets created. Is that possible?
Comment: Sure, I've added some extra code to the above answer
Comment: As per your updated answer, I assume I'll need to make custom fields to get them to save where I want?
Comment: You don't have to - you just put whatever your saving (your element) between those `contentTable` assignments. Haven't tried, but `craft()->elements->saveElement($element)` should do
Comment: Ok. So let's take some steps back because I'm clearly doing something wrong. I have **getContentTableForElementsQuery** returning the name of my custom table and I have **hasContent** set to true. In my model I have **getContentTable** returning the same table name as **getContentTableForElementsQuery**. Now in my CP when I go to my page for inputting data for my element I immediately see "An unknown error has occurred"


Safar Month and Safety of beings from Jinns

Question: Some of people around me think that month of safar is unsafe, when asked how, they say Jinns (ghost) are open from hell to roam freely. It is unsafe to take new born outside, it is unsafe for women to go out etc etc. Is it true and if it is then can someone share some reference or is it just a myth.
Answer: Holy Prophet saww said:
لا عدوى ولا طيرة ولا هامة ولاصفر
There is no superstitious owl, bird, no star-promising rain, no bad omen in the month of Safar. [Sahih Bukhari, Hadith 5707]
لا عدوى ولا صفر ولا غول
There is no bad omen in the month of Safar and no Ghouls (evil spirits). [Sahih Muslim, Hadith 2222]
Comment: Thanks for the reference! What would one say to people who believes in not going out or takings new born out in the month and particles Islam
Comment: we should gave up those ridiculous believes that against the teaching of islam and we should practice islam not by our own false believes but according to quran, sunnah and actions of sahaba r.a
Answer: This is pure falacy. All months are Allah's and Safar Month is not of bad omen as some people talk. This is an old falsehood spread in certain societies and has nothing to do with reality. Some say not to have a nikah or not to start a new venture in this month. This all is superstitious and it is not correct view whatsoever. And this Jinn idea is even more obnoxious.
Small children should be brought in before the Mukrooh time before Maghrib and can be let out again later.
Comment: okay i get a down vote for stating a fact? okay. bring forth a proof that month of safar has any bad omen attached to then.


New or Different Use Patent

Question: I invented a cosmetic tool to be used for the hands and filed a provisional patent. However, I missed the 12-month deadline to convert the patent pending to a non-provisional patent. Can I reapply for another provisional patent with the same product if I tweaked it a little and said it was a tool now designed for the feet?
Answer: A provisional patent application is neither published nor examined. It has no rights outstanding (if it wasn't used as a priority for another application as it seems from your question).
As it is never going to be published, it is not prior art to any other patent application. You can therefore submit the same thing again without worries that the old provisional might be a problem. You will be getting a new priority date though.
Comment: Beyond the scope of this question, note that if you decide to refile  the same invention in a *different country* than the first filing, you may lose the right to priority under the Paris convention. So always refile in the same country as the original filing and only after the first filing is abandoned.

New or Different Use Patent


Build an engine that burns tholins

Question: My idea is to send an hypothetical lander/rover to Titan, and recover from this some samples of rocks...
To create a very efficient engine, I suppose to carry only liquid oxygen, and burn the atmospheric tholins.
Do you think it's possible?
Comment: Keep in mind that the mixture ratios oxidizer:fuel when burning hydrocarbons are usually over 2:1, the oxidizer is the most massive component.
Comment: Also, why use something which is only present in traces, when you have lots of methane in the atmosphere?
Comment: @oefe Because due to the density of methane, is present only in low atmosphere: https://en.wikipedia.org/wiki/Atmosphere_of_Titan#/media/File:Titan%27s_atmosphere.svg
0 - 30 km methane
30 - 44 km ethane
44 - 310+ km tholins
Answer: Tholins encompass a large range of hydrocarbon compounds, could be anything from heavy oil-like substances to something more akin to plastics. So it'll burn, the question is if you can use it in an engine. Heavy oil needs a large engine, plastics aren't really usable.
There are two ways around this: either burn the tholins directly and build a steam engine (or e.g. a Stirling engine), or crack the tholins into lighter compounds and burn those. Cracking needs a much larger installation than a steam engine.

Build an engine that burns tholins


B string vibrating automatically

Question: I use Fender cc60-sce   semi-acoustc guitar and Vox mini 5 rhythm amplifier .The amp has 3 modes 0.1W,1.5W and 5W.When I switch to 1.5 W or 5W my guitar's B string starts vibrating rapidly and makes a weird noise and it keeps on vibrating until you mute it by your hand or switch back to 0.1 W.Any solution?
Comment: Seems normal to me. Generally it's a good idea to keep all strings muted unless you're playing them.
Comment: Is this purely a function of gain setting, or can you make it happen at 0.1W with your speaker/amp turned way up as well?  This will tell you whether it's local or remote feedback.
Answer: Acoustic and semi acoustic guitars are prone to this sort of phenomenon - feedback. It's caused by sympathetic vibration, where an open string 'hears' its own pitch, gets excited by it, and starts to vibrate in sympathy. It ay be the guitar itself, or something in the room, that picks up on that frequency. At that point, the two sounds egg each other on.
Obviously, less volume stops it happening so much in the first instance, so turning down guiar and/or amp will stop it. As Todd says, muting (any) strings not played is always a good move for amplified guitars. Moving closer to the speaker probably makes it worse - so moving away should improve things.
As an experiment, try it in a different room, guitar away from amp/speaker. Also, try tuning to Eb instead, listen to the difference. It may just be that your guitar's body's natural frequency is B.
Comment: Solid objects don't vibrate much - that's one reason why solid bodied guitars  are so popular. Acoustic and semi-acoustic guitars have thin wood for their bodies - or part of them. Thin wood will vibrate much more easily, thus your problem. You *could* dampen the wood with tape etc., on the inside, but that's not a particularly good idea, for the wood, and the sound of the guitar.
Comment: @ROHANPAUL semi acoustic guitars tend to pick up sound energy from the air and pass it to the strings more, so this is more of a problem for acoustic and semi-acoustic instruments. However, it does happen with solid-body electric instruments too - that's how the classic guitar 'feedback' sound happens!
Comment: It dosen't happen with my electric guitar.So this problem is only for  semi acoustic?
Answer: Angle your amp away from the guitar.
Αs @Tim said, it is feedback from sympathetic vibrations. But that probably doesn't help you too much. But it is a loop of the sound going from the amp back into the guitar back out of the amp and back into the guitar over and over until you mute the string or prevent the amp from being able to vibrate the string.
Comment: @Timinycricket I added your comment to the answer, because it's good to explain why he needs to angle his amp away from the guitar
Comment: What's the cause of the problem?
Comment: @ROHANPAUL as Tim said, it is feedback from sympathetic vibrations. But that probably doesn't help you too much. But it is a loop of the sound going from the amp back into the guitar back out of the amp and back into the guitar over and over until you mute the string or prevent the amp from being able to vibrate the string.

B string vibrating automatically


Problem with Python Games

Question: Having eagerly ripped open my newly arrived toy, I've just installed the Raspbian Wheezy image & am impressed that it really does just boot and appears to work - however, the Python Games that come with it - whenever a game starts it says "press a key to start" and when I press a key it drops back to the menu of games again - does anyone know what I might be doing wrong please!
Comment: @Jivings Wheezy comes with a package of Python games, with a link placed on the desktop. (AFAIK)
Comment: What games package is this? I didn't know wheezy came with games.
Answer: Although this question is rather old maybe there are others still interested in an answer.
As @Chris stated the problems could be related to missing packages. To test this you could start the game in a terminal. Therefore open up a terminal:
cd /home/pi/python_games
python <game>.py # where `<game>` is the game you want to start!

If there are really missing packages you should now be able to read an error message pointing to it. Knowing the missing package name you can use apt-get to install it. Start over again and install every missing package until the game finally starts.
Have fun.
Answer: Python Games is a desktop option installed as apart of the default image - however, cracked the problem - some of the packages weren't installed initially, for the life of me I can't remember which as I've been fighting usb issues ever since.

Problem with Python Games


Is there a way to create multiple directories at once with mkdir?

Question: If I wanted to create multiple directories (on the same level) and then feed it a comma seperated list of directory names (or something to that effect)?
Answer: Short answer
mkdir takes multiple arguments, simply run
mkdir dir_1 dir_2

Answer: You can use lists to create directories and it can get pretty wild.
Some examples to get people thinking about it:
mkdir sa{1..50}
mkdir -p sa{1..50}/sax{1..50}
mkdir {a-z}12345
mkdir {1,2,3}
mkdir test{01..10}
mkdir -p `date '+%y%m%d'`/{1,2,3}
mkdir -p $USER/{1,2,3}

50 directories from sa1 through sa50
same but each of the directories will hold 50 times sax1 through sax50 (-p will create parent directories if they do not exist.
26 directories from a12345 through z12345
comma separated list makes dirs 1, 2 and 3.
10 directories from test01 through test10.
same as 4 but with the current date as a directory and 1,2,3 in it.
same as 4 but with the current user as a directory and 1,2,3 in it.

So, if I understood it correctly and you want to create some directories, and within them new directories, then you could do this:
mkdir -p sa{1..10}/{1,2,3}

and get sa1, sa2,...,sa10 and within each dirs 1, 2 and 3.
Comment: This answer depends on the shell doing expansion of your input before providing that input as *arguments to mkdir*. It's much more accurate to just say that mkdir can create multiple dirs with multiple arguments and *then* talk about how a given shell can make that easier.
Comment: It is worth mentioning that brace expansion in not defined in the POSIX shell: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06 For example it will not work in `dash` which is the default `/bin/sh` on Ubuntu.
Comment: @gniourf_gniourf done :)
Comment: If I try to do something like `mkdir sa$(seq 0.1 0.1 1)`, all it does is create one directory named sa0.1 and the rest 0.2, 0.3, ..., 1. How can I get decimal brace expansion without writing the entire list?
Comment: @ManuelJordan ah the {1,2,3} is a simplified version. It becomes interesting when it is `mkdir {1,2,3}a{3,4}`  then you get 1a3, 1a4, 2a3, 2a4 etc.
Comment: I agree with @gniourf_gniourf… there are no usages of regular expressions in your answer.  Did you mean to say something else, or to provide a different example?
Comment: `man 1 seq` or even better `info seq`  are your friends.
This will do the job:

`for f in $(seq -f %g 0.2 1 10) ; do mkdir -p test/$f ; done`

it will create a directory test with subdirs 0,2 up to 9,2
Note that my local is Dutch, if LC_TYPE is en_US you will get the dot as decimal separator. The key is that `seq` accepts printf syle formatting.
Comment: I think you meant  `mkdir {a..z}12345 `  not  `mkdir {a-z}12345`
Comment: Thanks you working file .....
Comment: @Rinzwind just being curious, what is the difference between `mkdir {1,2,3}` and `mkdir 1 2 3`? practically both do the same, so when is mandatory the former?
Comment: Shoot that works as well with `touch` to create files.
Answer: It's very simple, lets you want to create a directory structure such as:
Websites/
  static/
      cs
      js
  templates/
      html and xhtml

You can do it in a single command like this:
mkdir -p Website/{static/{cs,js},templates/html\ and\ xhtml}

Be careful to escape the spaces in your directory names.
Comment: You can also press tab here to expand them before running the command.
Answer: Make a list of the names for your desired directories using line breaks instead of commas as a separator. Save that list.
mkdir `cat list`

You should now have all the directories named in your list.
Comment: Yes, that will work, however , with a caveat - the directory names have to be one whole string. If one line is `spaced dir` , then it will create two dirs , `spaced` and `dir.
Comment: Yeah - you can't even successfully do any kind of escaping for the spaces, either - `junk\ dir` in the `list` file gives two directories, `junk\ ` and `dir`.  Gave me a panic when I saw a `\ ` in a directory name.
Comment: This can be combined with the `-p` flag mentioned in other answers.  If so,  the `list` file doesn't have to include parent directories as their own lines, they will be detected and made automatically.
Comment: Make sure the 'list' file has no file ending.  list.txt will result in the creation of the directory list.txt in the location of the file. And those are backticks, not single quotes: \`cat list\` not 'cat list'.
Answer: Something like this? (thanks to muru for the printf tip)
printf '%s' 'foo,bar,baz' | xargs -d, mkdir

$ ls
$ printf '%s' 'foo,bar,baz' | xargs -d, mkdir
$ ls
bar  baz  foo
$

You can wrap it into a function for ease of use:
function mkdir_cs {
    printf '%s' "$1" | xargs -d, mkdir
}

$ ls
$ mkdir_cs 'foo,bar,baz'
$ ls
bar  baz  foo
$

Comment: Just a `printf "%s" "$1" | xargs -d, mkdir` should be enough.
Answer: So you want comma separated list of directory names ? That can be done.
Shell + coreutils
Since everybody is posting oneliners, here's mine as well ( mkdir + parameter substitution plus + shell redirection  ).
DIR:/testdir
skolodya@ubuntu:$ ls

DIR:/testdir
skolodya@ubuntu:$ mkdir $( tr '[,\n]' ' '   < /home/xieerqi/dirList.txt   )

DIR:/testdir
skolodya@ubuntu:$ ls
dirFive/  dirfour/  dirone/  dirthree/  dirtwo/

AWK
AWK is a text processing language, but it has very nice system() function which will call the default shell , and run command[s] enclosed in parenthesis ( which must be a string).
DIR:/xieerqi
skolodya@ubuntu:$ awk -F ',' '{for(i=1;i<=NF;i++) system("mkdir "$i)}' dirList.txt

DIR:/xieerqi
skolodya@ubuntu:$ ls -ld dir*
-rw-rw-r-- 1 xieerqi xieerqi   23 Feb  9 11:41 dirList.txt
drwxrwxr-x 2 xieerqi xieerqi 4096 Feb  9 11:42 dirone/
drwxrwxr-x 2 xieerqi xieerqi 4096 Feb  9 11:42 dirthree/
drwxrwxr-x 2 xieerqi xieerqi 4096 Feb  9 11:42 dirtwo/

DIR:/xieerqi
skolodya@ubuntu:$ cat dirList.txt
dirone,dirtwo,dirthree

Or you could remove , with gsub() function, and call system("mkdir "$0) but that may be a problem if you want to create directories with spaces in their name
Python
Pythonic way of doing the same , would be to read each line, get rid of trailing \n , shove everything into one list, and iterate over the list items and create dirs per list item. Note that in the example bellow, /home/xieerqi/dirList.txt is the full path given to my file, and we make up full path of each new directory by joining string /home/username/ and the dir name read from list. Substitute your own values as necessary
DIR:/testdir
skolodya@ubuntu:$ ls

DIR:/testdir
skolodya@ubuntu:$ /home/xieerqi/makeDirs.py

DIR:/testdir
skolodya@ubuntu:$ ls
dirFive/  dirfour/  dirone/  dirthree/  dirtwo/

DIR:/testdir
skolodya@ubuntu:$ cat /home/xieerqi/makeDirs.py
#!/usr/bin/env python
import os
with open("/home/xieerqi/dirList.txt") as file:
   for line in file:
         for directory in line.strip().rsplit(','):
             path = '/home/xieerqi/testdir/' +  directory
             os.makedirs(path)

Comment: I don't think the asker actually _wants_ the list to be comma-separated; I'm pretty sure that was just their guess at what the syntax might be.
Comment: Well, OP probably didn't  to exactly have comma-separated list, however it's sure may be used as a method, point being " lists can be used,too, you don't have to type out name of each dir individually". Especially that will be useful when a big list cannot be generated with ranges, like `dir{1..1000}`. Say , you want to make a directory per username, or per project, or per geographic location, like a city
Answer: mkdir command takes multiple arguments simply run as below
mkdir dir1 dir2 dir3 ... dirN

If you would like to create multiple subdirectories then you can pass those argument in {} as shown below (use only commas to separate the argument, without spaces).
mkdir -p dir1 dir2/{subdir1,subdir2,subdir3,subdirN} dir3 dirN

Using the option "-p" to make parent directories as needed.
Answer: Simply use the -p argument:
mkdir -p app/code/Foo/Bar

This is what the help page says about -p. I would not understand it by that text...

-p, --parents     no error if existing, make parent directories as needed