For what crime can you get jailed if a criminal leases you a stolen art piece?

Question: What crime can you get jailed for if a criminal leases you a stolen art piece? Let's say you loan an art piece for 1 day, and then you call the authorities because you know it was stolen, can you still get criminally prosecuted for it and for what crime?
Comment: Please specify the jurisdiction.
Answer: england-and-wales
Although there's the potential for money laundering the more obvious offence is Handling Stolen Goods contrary to s.22 of the Theft Act 1968

(1) A person handles stolen goods if (otherwise than in the course of the stealing) knowing or believing them to be stolen goods he dishonestly receives the goods, or dishonestly undertakes or assists in their retention, removal, disposal or realisation by or for the benefit of another person, or if he arranges to do so.
(2) A person guilty of handling stolen goods shall on conviction on indictment be liable to imprisonment for a term not exceeding fourteen years.

Note that any criminal liability will depend on one's mens rea (i. e. their guilty knowledge) when obtaining the stolen item.
That said -  the authorities, after considering all the evidence and circumstances, may prefer to use the recipient as a witness against the person from whom they received the artwork instead of prosecuting them.
Comment: Note the key word "dishonestly".  If someone sees something for sale they believe to be stolen, and purchases it for the purpose of giving it to the authorities and hoping that they will receive reimbursement from a grateful owner, I don't think that would be considered "dishonest" for purposes of the statute, but if the person could be shown to have known the goods were stolen when they were purchased, and is caught with them before notifying the authorities, it may be hard for the person to convince the authorities and/or a jury that his intentions were honest.


What is the 'cleanest' way to roast eggplants indoor?

Question: Whenever I've tried to roast eggplants on the oven, it takes more time to clean than to cook. Any suggestions?
Comment: You *are* poking the skin before you bake them, right? Otherwise you'll have lots of clean up (and little eggplant left intact).
Answer: What is taking so long to clean, your sheet pan? Put a sheet of parchment paper underneath the eggplant.
Comment: That's the only thing I could think of... I roast eggplants all the time and have never found it to be cleanup-intensive.
Answer: Here's a possible alternative. Maybe not exactly what you're looking for, but I find one of the best ways to prepare eggplant is to slice into about 1cm or 1/2in thick slices, optionally do the salt-and-wait-to-get-the-liquid-out-then-pat-dry song and dance routine, then lightly oil them and cook on my searing hot cast iron stovetop griddle.
Answer: From the nickname "kocakafa" I see that you are Turkish. So am I and I use a pan you can buy easily in any utensil selling store in Turkey for eggplant roasting. I am attaching the image. It is very easy to use and the cooking time is significantly reduced as the cleaning time.
Comment: I doubt that you can find it easily outside of Turkey. But if you could ask a middle astern market in your area, they might be able to help. It is called "(eggplant) roasting pan" or "grilling pan" "közleme tavası" in Turkish, nothing too fancy :) It is actually a very thin and light pan with glazing. very cheap. there are slits inside for the heat/flame to penetrate.
Comment: For those of us who aren't Turkish ... is there a name for the pan, if we wanted to try to find one?  (it looks to be a heavily glazed pan, similar in depth to a pie pan,  but with a flared outer lip and some sort of groves or ridges on the inside)


save as pdf in linux

Question: I have seen how simple it is for Mac OS to generate pdf from a document without additional software to install.
But I am looking for this functionality in Linux.
One scenario, for example, if I have myDocument.txt that contain an article, how can I convert this into pdf? My next question is, assuming that myDocument.txt is a 3-paged document, will it generate a 3-page continuous pdf and not just 3 separate pdfs?
Any tools for linux that does this? (GUI is fine, but commandline is preferable)
Comment: there is some tools like html2pdf, ghost script to pdf, but you still need the additional software
Comment: There are many ways to do this on Linux, including PDF printers.  What distribution are you using?  There's a very good chance everything you need is in the repository.
Answer:
text2pdf - This is the latest version
  of text2pdf, and offers a number of
  improvements over version 1.0. As you
  might be able to guess from the name,
  text2pdf converts text files to PDF.

http://www.eprg.org/pdfcorner/text2pdf/
Answer: For the best way would be to install cups-pdf and add a virtual printer. More information here on Arsgeek
Another way is to Select "Print to File" and select .ps or .pdf
Answer: Beside all the *2pdf and *topdf tools you might find in your /usr/bin directory, a "Print to PDF file" should be present in your DE of choice. In KDE, for example, the kprinter applet will do this. The plus side of this approach, is that the formatting has already been taken care of, by the application that you will choose to print from, and you might be able to drive that application from the command line with DBUS (or DCOP).
Answer: OpenOffice Word Processor is typically used in GUI form, but it does have an "Export to PDF" feature.  See this answer for hints on how to do it in a scripted form for command line use.
Comment: in some way, this is helpful to me. I haven't known "Export to PDF" until I read your answer. +1 point for you. Thanks.
Answer: Using a2ps and ps2pdf:
a2ps --columns=1 file.txt|ps2pdf - output.pdf

Answer: In the latest version of Ubuntu Linux (Maverick Meerkat), almost all software seem to have the ability to print to PDF. Just give File -> Print, select "Print to file", set output format to PDF, and give the filename and location. If any application prints only to Postscript, convert the file to PS file to PDF using ps2pdf command. CUPS-PDF is not really recommended.

save as pdf in linux


Egg Hatching In Pokemon-Go

Question: Is it normal to hatch an egg on pokemon go, and no pokemon come out of it? I tried reloading the app and still nothing came up, but I had more stardust than before.
Comment: Did you check your pokemon bag then sort by recent? See if you have something new.
Answer: I've had this happen to me (and to others) as well.  I suspect it's one of the many glitches with the game.  And it occurs when the egg hatches while you're busy doing something else in the game, such as battling in a gym or evolving something while walking.

Egg Hatching In Pokemon-Go


Relationship between magnetic and electrical permeability constant.

Question: In the process of working through physics problems in electromagnetism over the years, I have noticed an interesting relationship that arises from the magnetic permeability constant and the electrical permittivity constant.  If the square root is taken of the magnetic permeability constant divided by the electrical permittivity constant ($\epsilon_0$),the result is 377 $Ω$. (The units work out to ohms after some manipulations). I find it extremely intriguing that free space, i.e. outer space, has an electrical resistivity.  There are interesting implications provided you are willing to consider possibilities that are outside or on the edge of the Standard Model.
I'd appreciate hearing thoughts and reactions to the above relationship between the magnetic permeability and the electrical resistivity.
Comment: So, what is your actual question? The 377 Ω is the well-known "wave impedance" or "wave resistance"  of electromagnetic waves, which gives the ratio of magnitudes of electric to magnetic field strength  of these waves in vacuum.
Comment: Hi, I changed the title of your question, as it should reflect the content of the question. Best of luck with it.
Comment: Also note that $\varepsilon_0 \mu_0 = c^{-2}$. I am not sure why you have to go outside of the standard model. Already in the standard model you have vacuum polarization due to quantum effects.
Answer: There is nothing mysterious about the 377 Ω obtained by taking the square root of the ratio of permeability and permittivity of free space. This well-known quantity is called "wave impedance" of free space and gives the magnitude ratio of electric and magnetic fields of an electromagnetic wave in vacuum. There is no mysterious relation to anything "on the edge of" and much less beyond the Standard Model. It is just good old Maxwell's theory of electromagnetism.


Water supply system

Question: I have one floor mall with 10 shops (4 meter height), I should supply water from the main drain (3 inch) connected with pressure reducer (1 1/2 inch). I don't have the flow rate of at the 1 1/2 inch, but i know that the water can reach the roof.
I am planning to install 3 plastic water tanks with volume of (3000 litre each).I was thinking to connect those three tanks with valve.
The owner insist to have for each shop different centrifugal pump with 1 1/2 inch pipe. Is't acceptable and workable to provide 10 small pumps (divided into 3 groups, 4 pumps connected to the first WT, 3 PUMPS TO THE SECOND AND 3 FOR THE LAST WT).
please advise if that feasible and what should be the best solution in this case.
thanks in advance
Comment: What codes / regulations should you meet for the rate of use given the volume of storage you mention? Oh, and please don't shout in the title...
Comment: I don't understand your question.  Can you possibly rewrite what you are asking a little more clearly?  I think I can answer, but I'm not sure of the question...  You mention a drain, but that you are supplying water?  I will try and answer anyway...
Answer: In the beginning you mention supplying water from the main drain, but I'm assuming you mean meter.
From there, you go to a "pressure reducer".  You may have a pressure reducer, but given that you are cutting the pipe diameter in half, can you please clarify if it is actually a pressure reducing valve or if you just mean a pipe reducer (will make the pipe sizer smaller).
I wrote an entire answer before I re-read your question and realized you were not asking about 3 pumps vs 10, but, simply, if 10 pumps would work.  First of all, if this is for a commercial application, I think that you should have a plumber or engineer probably designing the system since there is more than just throwing some tanks on a roof and hooking up pipe involved here.  There are some different isolation valves and other items--like strainer(s)-- that should probably be installed.  With that being said, I think having 10 small pumps in this application sounds like an overcomplication.  If you are connecting the 3 tanks together (you say valve, but I think you mean manifold), then you really only need one pipe outlet from the collective tanks.  Then you can run the pipe throughout the mall to the various shops.  Depending on the distance to the furthest run, you will probably need pressure reducing valves for the shops (particularly those close to the pump).  You could also put two pumps by the tanks in parallel to provide a level of redundancy if one pump fails, as well as additional capacity if there is a high demand on occasion.  1 1/2 inch pipe suggests there may be either reasonable demand or the owner was just throwing a number out there.
Hopefully that answer is enough for you to get started or at least enough to figure out what other questions to ask.  If this is a real project and not just a design exercise, I highly encourage you run it by a licensed professional, and, as Solar Mike said, make sure you heed the local codes and regulations being enforced.  Water systems won't explode when poorly designed (which is a possibility with natural gas), but you can cause severe property damage if there are failures or leaks, and you can make people sick if you have things like large sections that are never used which will sit with stagnant water in the pipes until someone eventually turns on a faucet.

Water supply system


Missing data and covariate analysis

Question: I'm working on a model which has been fitted to longitudinal data (using mixed effects regression). I'm also investigating the effects of about 6 covariates on this model. Covariate A (continuous variable) is quite important in my investigation but the problem I have is that about 50% of these covariates are missing from my population.
The question is at what percentage would you consider excluding a covariate completely? I'm a bit concerned that if I include only half of the covariate into my analysis, the result is likely to be unreliable or biased. I hope my question is clear enough but I would be happy to clarify anything. I've read here that $10\%$ is a good cut off. Is this correct?
Comment: Why are the data missing? Completely at random? Does the probability of an observation's being missing depend on what its value would have been? Is there some systematic reason why the data are missing? If you want to do predictions based on your model, will data be similarly missing for new observations? Depending on your answers to these questions, there may be very good ways to proceed or you might have a very difficult problem.
Comment: @EdM, thanks for your comment. The missing dataset is completely random-it was just not supplied with the original data. My model could be used in making predictions but I can't say with absolute certainty that future dataset will or will not contain missing values.
Answer: If you are confident that your data are missing completely at random (MCAR), or even just that the probability of a value's being missing is independent of what its value would have been ("missing at random," technically different from MCAR and a less restrictive requirement), then you should consider multiple imputation.
In this process, several sets of stochastic estimates (imputations) are made of what the missing values might have been, based on the relations within the data you have. You have some ability to determine which inter-variable relations will be used for imputation.
You then perform your analyses on each of these imputed data sets, and combine the analyses among the multiple imputations. This approach includes estimates of error arising from the imputation process, in addition to the errors always inherent in modeling. So the error estimates will include errors due to your missing half of the data on your important continuous covariate.
When the necessary assumptions are met, multiple imputation will perform better than limiting analyses to cases having complete data or relying on some arbitrary cutoff for deciding whether to include a variable at all. The web site linked above has links to tools for performing multiple imputation, including the mice package in R, and there is a multiple-imputation tag on this site that you can follow for further discussion.

Missing data and covariate analysis


Where was the World Tree located?

Question: In Indo-European mythology, particular, in Slavic, Baltic and Germanic mythologies there is a so-called World Tree, more precisely, World Oak that plays a sacred role and connects the underworld to heaven.
It is mentioned in Pushkin's poem "Ruslan and Ludmila" which starts "At Lukomorie there is an oak green, a golden chain is on that oak..."
I looked up what Lukomorie is. It literally means "a sea arc, bow". Russian Wikipedia describes it as "in Slavic mythology, a holy place at the edge of universe, where the World Tree grows".
The The Tale of Igor's Campaign describing Prince Igor's campaign of 1185 uses this word to refer to the area near the North-Western shore of the Azov sea, as do other sources.
Here is a map that labels the tribe occupying the region as "Lukomorie Polovtsi":

A Google map of the area indeed shows bow-like formations:

But what is more interesting, is where the sea reached formerly. In fact, formerly the sea occupied the arc-shaped gulf (now called Milk Liman) reaching beyond the modern city of Melitopol.

Lets look even closer.

This is a place that was formerly situated at the very end of the bow-shaped gulf, at the very shore of the sea.
The bright spot on the photo is the archeological site Kamennaya Mogila. The place was venerated as a holy site at least from the 20th century BC to 12th century AD (possibly, even 17th century), well after the adoption of Christianity by the Kievan Rus. Some researchers (Rossokha) think it was venerated since the era of Proto-Indo-European unity, namely, Sredny Stog culture. This makes it the longest continuously venerated pagan holy site. The innards of the site are inscribed with a non-deciphered ancient language.

The site is located at the place of ancient estuary of the river, called by Herodotus as Γέρρος, which a Scythian name, that comes from a Sanskrit-related language where it was called Gorasa which literally means "milk", and even in Modern Russian it is called "Milk river".
That said, I wonder, how probable it is that the so-called World Oak was originally located at this place.
Comment: I have no clue, but I upvoted this sheerly for all the effort you put into this fascinating question. :)
Comment: Don't really know, but my kneejerk reaction would be that it sounds kinda unlikely. It's a big burial mound with some thirty caves dug into it. Excavating tombs in the roots of your sacred tree seems like it would be problematic.
Comment: Why would Pushkin be an authority on where the world tree stood? This question feels more like an attempted answer.
Comment: Beautiful question. Have you got some photos of the inscriptions in the non-deciphered language?
Comment: I'm with andejons on this one. In fact, it sounds like he wants us to approve his theory about the World Tree being a real tree in a real place. To my mind, that's an argument, not a question.
Answer: If your question is

how probable is it that the so-called World Oak was originally located at this place?

In my opinion: 85%; some people might argue that the tree was originally only a metaphor, but if the mount Olympus is literally a mountain, why shouldn't the oak be?
*also the Pushkin's poem is much better in its original language and I never knew that the oak in the poem is reffering to a mythological tree.
Comment: In general, we're looking for answers that are based on evidence, not conjecture. This is more of a comment.
Answer: Appreciative of your research, I share the "metaphore view" with the other replies, yet not discrediting it as a true meta-physical phenomena;
You may in essence locate any tree as a "world-tree" with more credibility around sacred sites, that reified the superb idea around a particular ash-tree (for example).
Just like in the case of bionic statues of Deities, they "represented" the Deity, but also served as a portal to this deity, to impress it and receive impressions.
Thus sacralized territory around a tree is located on a linear historical time, but the World Tree, the Axis Mundi centrality is timeless, and is located in a-linear time-less place.
Thus the relevant holy idea is indeed represented in the tree that you found, if that answer is satisfactory to you. You  have found the "World Tree".
You may affirm it by travelling there and sacralizing the bound with the a-historical tree, if you like, if this interpretation is special to you, or and you can travel to any other sacred place (considered so by the ancients), or a place that you sacralize yourself.
You then hypostize the tree into the numinal a-historical Axis Mundi: Henceforth that is your shamanic place of travelling, no other. Otherwise Drottars (Druids) and Shamans would have to flock around a particular tree, but indeed they picked a spot for rituals and made it ceremonial through their deep understanding, intuitive if you like of the phenomena.
Otherwise we attempt to find "the real ark", "the real Irminsul", "the real tree", "the real abstract" forever. Anyway, if you still are intent on locating it: I wish you the greatest of fortunes, if this is the one - I congratulate you.
BTW. I once wanted to locate the place of the battle of Aesir from the Eddas, there is a Scandinavian constellation named "Asar". I assumed the battle was a true happening, but in the Stars, that we later relate to on Earth in the Solar System in stories and sages, but that is a far-fetched theory. Is it true? I do not know. But it comforts me, and makes me validate my discoveries, thus I hold on to it.
Salutations!
223.

Where was the World Tree located?


How to run custom code as part of WiX burn MBA on install-complete and support rollback

Question: I need to embed, invoke and run some custom code as part of my custom managed bootstrapper application, as a post-install step. This custom code is within a class library that I have included as a reference in my MBA project. So, right after the state becomes InstallationState.Applied I plan on invoking this custom code. However, I am unable to figure out how I could tie in a failed state of this custom code to initiate the bootstrapper to rollback, since the progress callback would have been completed by now. Any ideas?
Answer: As per WiX & Burn's lead dev Rob Mensching here, point-2, it seems any custom code that needs to facilitate rollback in the setup process should be run as a custom action, and not as part of the bootstrapper application, as I wanted to. I went ahead and did as Rob suggested, and everything works as expected. However, since the custom action runs significant code, I may in future put that in a WiX extension.


Subconscious grammar knowledge

Question: I am reading the textbook Contemporary Linguistic Analysis by William O'Grady ninth edition. The text makes the claim that "grammatical knowledge is subconscious". They submit that most people can't explain the meaning of "or" in differing contexts, therefore the knowledge of its actual use is in our subconscious. Using this logic, the fact that I can't explain what happens when I press buttons on a microwave but I know that the input 1-0-0-start will microwave for one minute would mean the low level knowledge of how a microwave works therefore exists in my subconscious. Clearly it does not. Are they saying it does? Should O'Grady not actually state that our knowledge of grammar is often of high level understanding instead of in our subconscious?
Comment: Not sure who wrote the actual chapter - btw one of the editors is William O'Grady (John Archibald is the second editor), William is his first name (and not O'Grady and William, as you erroneously wrote). And there's nothing controversial about this claim. **Grammars are created/written by linguists**, they study corpora that consist of speech/text samples of many different people and it takes a lot of time to come up with an accurate description, which can never be comprehensive (for different reasons). An ordinary person cannot even understand a typical linguistic research paper, which is ok.
Comment: tl;dr: You use English (or any other L1) with a varying degree of accomplishment, but you have no idea how you do it (examples galore). Linguists try to understand it and even we linguists don't really know for sure how you do it.
Comment: And I encourage you to re-read Chapter 1 (written by William O'Grady himself, as I just found out from my copy of the textbook). 1. How does he understand the term *grammar*? Ask yourself, how much do you know about all those subfields of grammar? 2. Re-read the section on inaccessibility, think about why this section is called so. *What* is inaccessible? Inaccessible *for what*? How does O'Grady understand *grammatical knowledge*, and esp. re-read this sentence **"Speakers of a language know what sounds right and what doesn't sound right, but they are not sure how they know it."**
Comment: You've not proven or given evidence that low level knowledge of language exists in the human subconscious, as the author of the text stated it does. I think the author should say people have a high level understanding of language and how we use it, not that that low level understanding exists in human subconscious, which it may or may not. It is a science text book. That kind of claim would need to be proven. ie the scientific method. A more abstract and honest assessment would be the term "high level understanding".
Comment: More questions for you: 1. Is there any difference, in your opinion, between *I know Hittite* and *I know Hittite grammar* and why do you think so? 2. When you say, *I know (or don't know) Hittite grammar*, what exactly do you mean by that? Looking forward to reading your answers to my questions.
Comment: Before we can have a meaningful discussion, one quick question: in **your** opinion, what does it mean when you say *I know a language*? (bwt: have you answered my questions above? Can you post yours answers to my questions here?)
Comment: *I know a language* to me would mean I can communicate above a certain threshold of effectiveness with others who speak the same language. The author seems to state that grammar is the formation of sentences in an intelligible way within a certain language. What is inaccessible is the explanation of why school works and supermarket does not. Inaccessible for understanding or empirical explanation.
Comment: 1. Yes. Knowing *Hittite grammar* would improve the ability to speak *Hittite*. 2. The nuts and bolts of the language. The icing on the cake. Informed vs uninformed.
Answer: There are two kinds of knowledge, conscious and subconscious. Some knowledge about language is conscious, for example you may consciously know that the English word "father" is derived from the same Indo-European root as "paternal" (the latter having come through Latin, the former having come through Germanic). You may consciously know that we negate sentences with "not". These are facts about language data. O'Grady and William are obliquely talking about the underlying mental mechanisms that cause overt language behavior, which is a special kind of "knowing", similar to your knowledge of how to walk: it is a thing that you do automatically. Another kind of subconscious knowledge is "naming", the ability to classify thing according to some "definition". Typically, people who see dogs can correctly say "that is a dog", but they cannot correctly state the necessary and sufficient conditions for a being to be labeled as a dog – because they have internalized an ostensive definition of the term. People also can't explain how they can identify a thing as "red", but they can (unless they literally cannot). That is, they have an internal knowledge state that allows them to classify visual stimuli, but they do not consciously know what that internal state is.
In your microwave example, you don't even know at any level what the underlying mechanism is: you have no knowledge.
Comment: I don't know what you mean by "intuitive knowledge". I think you have a completely different theory of what "knowledge" is. You seem to be complicating the question by throwing in variables about how we know what we know, without resolving the fundamental question of what it even means to know. You want a philosophical answer, Philosophy SE is the place to go. I'm giving you exegesis about the linguistic concepts.
Comment: @STL34 How is "intuitive knowledge" not just another name for "subconscious knowledge"?
Comment: What about intuitive knowledge? Walking is not something one does automatically, it is practiced, failed at and eventually a person can do it. The lack of ability to state the necessary and sufficient conditions for labeling a dog a dog is not proof that that knowledge is in ones subconscious. I have knowledge of how a microwave works. I know through experience that a certain input will make it act in a certain way. Much the same as through experience/learning I know how to use the word "or". I think stating the difference between high and low level understanding is an actual explanation.
Comment: There are more than two types of knowledge. As a logical contradiction to your statement there are only two types of knowledge I gave an example of another therefore negating what you asserted. Intuition definitely exists outside of philosophy. I think the answer here is that what is stated in the book is wrong. Linguistics is a science therefore any assertion made in a text should be heavily backed by empirical evidence and rationale. The statement in question has not been by you or the text.
Comment: I would say the difference is nuanced, but still exists. The easiest way to understand, ironically would be to intuitively accept that intuition and subconscious are not *the same*, therefore they're different. The why is admittedly difficult to explain.
Answer: The microwave analogy is irrelevant: when you use a microwave, you don't need to have any knowledge of how it heats your food, because it's the microwave that is heating the food, not you. When you produce language, on the other hand, you do so unassisted, so any knowledge required for language production must exist in your brain. In most cases, speakers are unable to consciously articulate such knowledge, so it can be aptly described as subconscious.
This is no different from what you describe as "intuitive knowledge" in your comment on user6276's answer. As you say, "Walking is not something one does automatically, it is practiced, failed at and eventually a person can do it" -- the same is true of language. Whether you call this intuitive knowledge, subconscious knowledge, or higher-level understanding is a matter of terminological preference.
Comment: Mmm, when they say "subconscious", they don't mean "innate". It can still be knowledge you've acquired – it's just that you don't have conscious access to it. That seems to be exactly what you mean by "intuitive", so I think the whole thing is a misunderstanding.
Comment: I didn't make up english though. I learned how to use it. The low level understanding of OR vs AND will only exist in my brain *if* I learn it. It's not waiting unhatched in my subconscious, or at least that's not been proven. My point was we can use things that we can't describe, like a microwave and that does not necessarily imply that what is indescribable or unknown exists in one's subconscious. Also, I didn't use the term "higher-level understanding", I used "high-level understanding" referring to abstraction layers.
Answer: Like TKR has already said, I believe it's mostly a terminological preference.
I don't really want to discuss here what it means "to know a language" in linguistic research, i.e. not something what linguistically naïve (untrained) people may think. Tons of research have been written on this; if you're interested, you can start with Andrew Mills' "Knowledge of Language" in the Internet Encyclopedia of Philosophy (it's scholarly and peer-reviewed).
Nor do I want to start a philosophical discussion of what knowledge is – you can read a review article "Knowledge" by Stephen Hetherington or "Knowledge How" by Jeremy Fantl, among many, many others. Why not check out "The Language Instinct" by Steven Pinker then?
When we talk about knowledge of (a) language, the following descriptors are commonly used: implicit, subconscious (and sometimes even unconscious), or tacit. This list is by no means exhaustive.
The idea is that a non-linguist (most of language users) does not understand how they learned their language ("I just picked it up from my parents") - so no formal/explicit training was necessary to learn your L1, how they can use ("Come up with a thought and open your mouth!"), nor can they teach their language to anyone else, without proper training ("What's the difference between "for instance" and "for example?"). In other words, I can use a language (or, in common, non-technical parlance, I "know" it) but I don't understand (=know) how I do it, or, as Dr William O'Grady wrote in the textbook he also edited,

"Speakers of a language know what sounds right and what doesn't sound right, but they are not sure how they know it."

This kind of knowledge is - alas! - inaccessible to language users but, on the other hand, it is the object of serious study by linguists.
Comment: That makes sense. Thanks for answering.
Comment: After trying to answer questions on english.SE and ell.SE, I'd change the O'Grady quote to *I know what sounds right and what sounds wrong, and there is no way I can explain how I know or what the difference is'.

Subconscious grammar knowledge


How to rig a character where every element is separated?

Question: I made a character where every element is separated as their own objects. (clothes, hair, eyes, tongue teeth, hands...) Should I join them to be one big mesh or keep them separated? How do I rig this and make weight paintings? I think automatic weights do not work probably. I have experiences that with autoweights I get for example jacket buttons behave in a weird way. Also, my knowledge of riggin is something in  these lines "Parent your object to bones with automatic weights and fix with weight paint". After that when I am able to pose my charcter with a very basic ways, I am thinking that the rig is "good enough".
Answer: You can for example parent any mesh object to bones with 'Empty groups' option and then in weight paint mode paint the weights for that empty vertex group
Comment: Thanks. I found one cool addon which I hope would be able to do that weighting part automatically so that I won't need to use too much time with painting. Still not tested it but at least now I have some hope: https://blendermarket.com/products/voxel-heat-diffuse-skinning


What happens if a bag of holding is destroyed by acid?

Question: Our character is carrying a bag of holding. He is being grappled by a black pudding. The black pudding has done enough damage to the bag of holding. What happens to the bag and its contents?
Comment: (He's naked but the *bag* is fine: "Any melee hit or constrict attack [by a black pudding] deals acid damage, and the opponent's armor and clothing dissolve and become useless immediately unless they succeed on DC 21 Reflex saves" (*MM* 201); there's no effect on other worn or carried items. I'd recommend a different scenario unless the question is *really* interested in about how black puddings work rather than about dissolving in acid *bags of holding.*)
Answer: Short Answer: Depending on the ruling by your DM, if the Black Pudding is able to dissolve the bag, then everything inside is lost forever.
This follows the disclaimer that your DM will have to make the final decision, because according to the RAW for 3.5e's Bag of Holding, and Black Pudding, there is no mention of items other than weapons or armor or clothing being dissolved by the Black Pudding's acid. Here is the exact text for the acid attack:

Acid (Ex): The creature secretes a digestive acid that dissolves organic material and metal quickly, but does not affect stone. Any melee hit or constrict attack deals acid damage, and the opponent's armor and clothing dissolve and become useless immediately unless they succeed on DC 21 Reflex saves. A metal or wooden weapon that strikes a black pudding also dissolves immediately unless it succeeds on a DC 21 Reflex save. The save DCs are Constitution-based.
The pudding's acidic touch deals 21 points of damage per round to wooden or metal objects, but the ooze must remain in contact with the object for 1 full round to deal this damage.

The only certainty is that the acid doesn't affect stone. However, "being able to dissolve any organic material and metal", would suggest that the cloth or leather material made wondrous of a bag of holding, would also be at risk.
The most certain part about this question, is what happens to the bag when it is destroyed. For 3.5 edition, the bag ruptures, and everything inside is lost forever. So if the pudding has in fact done enough damage directly to the bag, then that character has lost all of the bag's contents.
Comment: Also note the text details in 3.5. In other editions, the result of the ruptured Bag of Holding is different. For example in 5e, the contents are dumped into the Astral Plane instead of "completely lost"


Importing FBX causes all scene animations to become slower

Question: I have a scene with animations, but when I import any fbx it changes something with the animations that makes them play slower; so I cannot import anything unless I want to reanimate the entire scene. The place on the timeline does not change, nor the keyframes, nor playback scale. I've tried restarting Blender, unchecking options at import screen, being in different modes, having different things selected, importing into different collections; I cannot think of what might be causing it.
Answer: Figured it out, decided to undo/redo the import and look around to see what changed, and I noticed the sequencer time changing. Took awhile till I looked at the FPS and that is what changed, apparently the FBX's FPS was 24 and my project was 30, so every time I imported it changed the FPS. It never occurred to me that importing an FBX would change the projects FPS, glad I know now. Thanks for the help!
Answer: The (Probable) reason this is happening is that the FBX file is just a big file. One way you can tell is by looking at the amount of FPS that is playing. You can see it here:

When the text is red, that means that blender is taking a long time to calculate the animation. The main reason this is happening is that your PC is not very good (Or the FBX animation is just a high quality animation that takes blender a long time to preview). There isn't really a good fix besides upgrading your PC but to make it play faster, you could get a lower quality version of the FBX or try Baking the Animation
Comment: To add to above comment. Use https://pasteall.org/blend/
Comment: Thanks for your response, at first I thought it was the fps, but I did some testing and fps does not drop when in non material mode, but animation does slow down. Doesn't seem to be an fps/pc issue, it seems that importing any fbx slows my animation down on the timeline. There is no numerical change or keyframe position change, so what is causing the slow down I do not know.
Comment: Do you think you could share the FBX and .Blend files?


Use of Lagrange multipliers in derivation of the Bose-Einstein distribution

Question: My main question in regards to this is an explanation on why/how you can use Lagrange multipliers when you have a function of infinite variables, what is the justification behind this? So to derive the Bose-Einstein distribution you have to maximize the function
\begin{equation}
f=\sum_in_i\ln\left(\frac{n_i+g_i}{n_i}\right)+\sum_ig_i\ln\left(\frac{n_i+g_i}{g_i}\right)
\end{equation}
subject to the constraint equations
\begin{equation}
g=\sum_i n_i-N=0 \qquad \text{and} \qquad h=\sum_i \epsilon_in_i-U=0.
\end{equation}
now $f,g,h$ are all functions of $n_1,\dots,n_i,\dots$. so using Lagrange multipliers will lead to an infinite set of equations:
\begin{align}\begin{split}
     \frac{\partial}{\partial n_1}(f+\alpha g+\beta h)&=\frac{\partial f}{\partial n_1}+\alpha\frac{\partial g}{\partial n_1}+\beta\frac{\partial h}{\partial n_1}=0\\
     &\vdots\\
     \frac{\partial}{\partial n_i}(f+\alpha g+\beta h)&=\frac{\partial f}{\partial n_i}+\alpha\frac{\partial g}{\partial n_i}+\beta\frac{\partial h}{\partial n_i}=0\\
     &\vdots
 \end{split}\end{align}
is this mathematically rigorous? is there any point in considering an infinite set of equations with infinite unknowns? I have googled this and it seems possible but the math they use is above my level. That's my first question. Anyway all these equations are alike so we can consider the general case:
\begin{equation}
     \frac{\partial}{\partial n_k}(f+\alpha g+\beta h)=\frac{\partial f}{\partial n_k}+\alpha\frac{\partial g}{\partial n_k}+\beta\frac{\partial h}{\partial n_k}=0
 \end{equation}
for $k=1,\dots,i,\dots$. Substituting in the expressions for $f,g$ and $h$ we get that:
\begin{align}
     \frac{\partial}{\partial n_k}\left[\sum_in_i\ln\left(\frac{n_i+g_i}{n_i}\right)+\sum_ig_i\ln\left(\frac{n_i+g_i}{g_i}\right)\right]+\alpha\frac{\partial}{\partial n_k}\left[\sum_i n_i-N\right]+\beta\frac{\partial}{\partial n_k}\left[\sum_i \epsilon_in_i-U\right]=0
 \end{align}
now since we are differentiating with respect to the $k$th term all the other terms will go to zero so $\partial/\partial n_k(\sum_in_i-N)=1$ and $\partial/\partial n_k(\sum_i\epsilon_in_i-U)=\epsilon_k$. The same applies for the first term, only the $k$th term will survive and you just need to use the product and chain rule leading to a lot of cancellations. After simplifying we are left with:
\begin{equation}
     \ln\left(\frac{n_i+g_i}{n_i}\right)+\alpha+\beta\epsilon_i=0
 \end{equation}
which when solved for $n_i$ gives us that:
\begin{equation}
     \boxed{n_i=\frac{g_i}{e^{(-\beta\epsilon_i-\alpha)}-1}}
 \end{equation}
apparently, this is wrong it should be $\beta\epsilon_i-\alpha$? Don't really understand where the $-\beta\epsilon_i$ comes from in the second to last equation, I guess I could define the constraint function $h$ as $h=U-\sum_i\epsilon_in_i$ and you would ge the negative sign but why should this matter?
Comment: You can call the Lagrange multipliers anything you like. In particular you can replace $\beta$ by $-\beta$ if you want --- so you can minimise $f +\alpha g -\beta h$.
Comment: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Comment: OK, so it's just a matter of definition. Does the Lagrange multiplier $\alpha$ have any significance? for instance, $\beta$ is related to the temperature does $\alpha$ have something similar?
Answer: To solve the problem, you need to find the value of the Lagrange multipliers as well, that are not determined in the final expression of your answer.
Minimization of the augmented function $f + \alpha g + \beta h$, must be performed w.r.t. all the independent variables, i.e. the original independent variables $n_i$, and the Lagrange multipliers $\alpha$ and $\beta$.
Minimization w.r.t. $n_i$ gives (if you performed the computation well), the result you got
$n_i = \dfrac{g_i}{e^{-\beta \epsilon_i- \alpha} - 1}$,
while minimization w.r.t. the Lagrange multipliers gives you the constraints
$0 = g = \displaystyle \sum_i n_i - N$$\qquad \rightarrow \qquad$
$\sum_i \dfrac{g_i}{e^{-\beta \epsilon_i - \alpha}- 1} = N$
$0 = h = \displaystyle \sum_i \epsilon_i n_i - U$$\qquad \rightarrow \qquad$
$\sum_i \dfrac{\epsilon_i g_i}{e^{-\beta \epsilon_i - \alpha}- 1} = U$-
These are the two equations that allow you to evaluate the value of $\alpha$ and $\beta$, not known in the expression of $n_i$ above.
Physical meaning of Lagrange multipliers.
Lagrange multipliers $\alpha$ and $\beta$ can be related to temperature and chemical potential through Boltzmann's constant
$\alpha = \dfrac{\mu}{k_B T} \qquad , \qquad \beta = \dfrac{1}{k_B T}$
For full derivation and details, please take a look at the wiki pages:

https://en.wikipedia.org/wiki/Bose%E2%80%93Einstein_statistics, expand the section Derivation in the canonical approach
https://en.wikipedia.org/wiki/Maxwell%E2%80%93Boltzmann_statistics


Using Continuation without Visualforce

Question: I must check url statuses in scheduled job, but their amount is too big (exceeds limit, which is 100), so I tried to use Continuation object, but I'm not really sure if is it possible to use Continuation without Visualforce page? I want to check statuses on a weekly basis and store results in objects' fields. If there's another solution, please give me a hint, because I'm quite new to Salesforce.
Answer: If you are running into limits on the number of callouts you can make in a scheduled job, the solution to execute a batch job and set the batch size to 100 (or some smaller number if you make more than one callout per record):
<code>Database.executeBatch(new MyBatchUpdateClass(), 100);
</code>
The second parameter controls the batch size. A Continuation will not help you work with callout limits. You'll need to implement the Database.Batchable interface in your class.
Comment: But isn't Database.executeBatch() for database modifications? I don't have a problem with limits here. I need to send http requests and 100 requests limit is not enough.
Comment: It doesn't have to be for database updates. You can batch across any type of processing that iterates over large numbers of records. Your issue *is* with a limit, the per-transaction callout limit.

Using Continuation without Visualforce


How does Wi-Fi sharing in Samsung Galaxy S7 work?

Question: Starting from Galaxy S7, Samsung added a new cool feature called Wi-Fi sharing, by which you can connect to an Access Point and turn on your hotspot at the same time. That means, you can now turn on your Wi-Fi and hotspot at the same time, something that was not possible in any other phones till date. So, how do they do it? Is it something possible to do in code, or you have to have a special hardware?
Comment: Welcome to Android Enthusiasts! I happened to ask a similar question which wasn't well received (months ago), but what I did eventually was to dig up, researching and fortunately **found a solution**. I was trying to mimic this feature on a non-samsung device, in case you wish to see my findings see here:  [What is the functionality concept behind Wi-Fi sharing (aka Wi-Fi Profile share)](https://android.stackexchange.com/q/173875/209414)
Answer: Software, not hardware
Thanks to the brilliant research of xavier_fakerat
If you look here, What is the functionality concept behind Wi-Fi sharing (aka Wi-Fi Profile share)?
You will see that software can accomplish this. So it's not just a special hardware thing.
You can use https://play.google.com/store/apps/details?id=kha.prog.mikrotik&hl=en To get similar results that the S7 produces


Halogenation of Phenol

Question: Why does only one $\ce{Br+}$ ion get generated in a non-polar solvent (such as $\ce{CS2}$), while more $\ce{Br+}$ ions are generated in aqueous or polar solvent (such as $\ce{H2O}$)?
Answer: The reaction of phenol with bromine is known as bromination of phenol. Solvent has great influence on the reaction. In different solvents, different products are obtained. The action of bromine on phenol can be explained as:
Reaction with bromine in water:—-

Phenol reacts with bromine water to give 2,4,6-tribromophenol.
In water, ionisation is facilitated. Phenol gets ionised to form phenoxide ion, which is even better ortho,para-directing. Bromine also gets ionised to a larger extent to form a large number of bromonium ions. And Bromine ions are highly stabilized in ionic solvents. So the formation of strong o,p-directing group and stabilization of $\ce{Br+}$ enhances the formation of tribromophenol.
Reaction with bromine in $\ce{CS2}$:—-

Phenol reacts with bromine in a  presence of Carbon disulphide to form a mixture of o-bromophenol and p-bromophenol. Among which p-bromophenol predominates. In $\ce{CS2}$ ionisation is not facilitated that much. As it is a non-polar solvent it doesn't the $\ce{Br+}$ on. Also $\ce{-OH}$ group is moderately o,p-directing. So as usual para-product is more formed.
Comment: sorry may I ask why is brominum ion produced form Br2 in aqueous solution? I know Br+ is more electrophilic, hence even more encouraging multiple halogenation. But isn't Br- bromide ion formed instead?

Halogenation of Phenol


how to set up a direct piwik API calling in php

Question: I tried to do it this way but it gives this error:
Fatal error: Class 'Piwik_FrontController' not found in C:\wamp\www\aqar2\piwik.php on line 11
my website path is :localhost/aqar2
my piwik path is: localhost/aqar2/piwik
<?php
// if you don't include 'index.php', you must also define PIWIK_DOCUMENT_ROOT
// and include "libs/upgradephp/upgrade.php" and "core/Loader.php"
define('PIWIK_INCLUDE_PATH', realpath('.localhost/aqar2/.'));
define('PIWIK_USER_PATH', realpath('.localhost/aqar2/.'));
define('PIWIK_ENABLE_DISPATCH', false);
define('PIWIK_ENABLE_ERROR_HANDLER', false);
define('PIWIK_ENABLE_SESSION_START', false);
require_once PIWIK_INCLUDE_PATH . "piwik/index.php";
require_once PIWIK_INCLUDE_PATH . "piwik/core/API/Request.php";
Piwik_FrontController::getInstance()->init();
// This inits the API Request with the specified parameters
$request = new Piwik_API_Request('
        method=UserSettings.getResolution
        &idSite=1
        &date=yesterday
        &period=week
        &format=XML
        &filter_limit=3
        &token_auth=&token_auth=a688c5c011dac27cf125eaa84f95e59b
');
// Calls the API and fetch XML data back
$result = $request->process();
echo $result;
?>

Answer: If your php file is in localhost/aqar2/then the path must be define('PIWIK_INCLUDE_PATH', realpath('piwik/'));
I know you probably fixed it already so i am adding that for whoever may need it...
Answer: That error is a result of a class being used (or referenced) but not yet loaded. This is likely a result of your PIWIK_INCLUDE_PATH being incorrectly set, or that you are required to include the class yourself.
First, double check that the value set in your PIWIK_INCLUDE_PATH is a valid path on the system, perhaps with:
if (is_dir(PIWIK_INCLUDE_PATH)) {
  exit('IT IS A REAL PATH');
} else {
  exit('IT IS NOT A REAL PATH');
}

If it turns out to not be a real path, perhaps you should look at the '.' dot prefix on your 'localhost' directory. Do you not mean to use realpath('localhost/aqar2/piwik');. If that does work, you should also look at how you've set PIWIK_USER_PATH.
If that does not work, you should look at including the FrontController class yourself, but this may mean that you have to manually include all of that classe's dependencies as well. To include the class manually, use include(PIWIK_INCLUDE_PATH . '/core/FrontController.php');
It would seem that directory structure you're trying to use is wrong, perhaps you should revise that and try to keep all files under the localhost directory.
Comment: I used this `define('PIWIK_INCLUDE_PATH', realpath('piwik/'));` and it gave me a green light for your directory checking code.  I don't know what the user path is but I defined it the same as the include path. and it still gives me an error.`Warning: require_once(C:\wamp\www\aqar2\piwikindex.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\aqar2\piwik.php on line 16`
` Fatal error: require_once() [function.require]: Failed opening required 'C:\wamp\www\aqar2\piwikindex.php' (include_path='.;C:\php\pear') in C:\wamp\www\aqar2\piwik.php on line 16`
Comment: It seems that your include path is still wrong. Perhaps this is a result of the directory structure being wrong. Could you edit your post to include your directory structure from your www directory?


How to find my current location (latitude + longitude) on click of a button in android?

Question: I have seen various code snippets which find outs co-ordinates from various methods like onlocationupdate() or onstatusChanged().... what i want is a simple code that fetches my current GPS co-ordinates on click of a button...
Answer: Yogsma's answer addresses how to receive automatic updates.  The link he references provides all you need, but here is the summarized version of how to do a manual update:
Assuming you've read the tutorials on how to make a button, then you simply need to add a listener for your button, and then have the listener call a function to query your location manager. The code below does it all inline to show you how, but I'd instantiate LocationManager somewhere else (eg your activity) and I'd create a separate method for the on click listener to call to perform the update.
// getLocationButton is the name of your button.  Not the best name, I know.
getLocationButton.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
        // instantiate the location manager, note you will need to request permissions in your manifest
        LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
        // get the last know location from your location manager.
        Location location= locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
        // now get the lat/lon from the location and do something with it.
        nowDoSomethingWith(location.getLatitude(), location.getLongitude());
    }
});

Of course you will also need to register your activity with the location manager service in your manifest xml file:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Comment: As adbantej points out in his response, the getLastKnownLocation() call will only get the last good location, which is a strong reason to instantiate the LocationManager elsewhere.  This will give it more time to actually get a valid update, but this call still provides no assurances on validity of data.  For this you will need to use the onLocationChanged() methods or onGPSStatusChanged methods of an implemented Location or GPS listener.
Comment: Thanks a lot for the previous answer... :) now that i have got the location.... how can i plot the same on the map??? i want to plot two locations on map and also path between them...
Comment: see http://developer.android.com/guide/tutorials/views/hello-mapview.html and http://mobiforge.com/developing/story/using-google-maps-android to start.
Comment: Thanks a lot :) The above links were pretty helpful... :)
Comment: This must be right answer for question asked, there are cases you may only current location when required, the above answer is for tracking, both cases are different
Answer: LocationManager mLocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
                LocationListener mLocListener = new MyLocationListener();
                mLocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocListener);

public class MyLocationListener implements LocationListener{

        public void onLocationChanged(Location loc) {
            String message = String.format(
                        "New Location \n Longitude: %1$s \n Latitude: %2$s",
                        loc.getLongitude(), loc.getLatitude()
                );
                Toast.makeText(LbsGeocodingActivity.this, message, Toast.LENGTH_LONG).show();
        }
        public void onProviderDisabled(String arg0) {

        }
        public void onProviderEnabled(String provider) {

        }
        public void onStatusChanged(String provider, int status, Bundle extras) {

        }
    }

Read this for detail http://www.javacodegeeks.com/2010/09/android-location-based-services.html
Comment: Thanks a lot for the previous answer... :) now that i have got the location.... how can i plot the same on the map??? i want to plot two locations on map and also path between them...
Answer: There is no such mechanism to get the current location immediately on demand. Since you need to query the Netowork or the GPS provider which may take time to actually get the location.
One way is to use the getLastKnownLocation which returns immediately. However this location may be stale. Another way is to register for a PASSIVE_PROVIDER by which you get a location fix with the hope that some other application has requested for location.
Comment: Thanks a lot for the previous answer... :) now that i have got the location.... how can i plot the same on the map??? i want to plot two locations on map and also path between them.
Comment: I'll just guess here (I'm not well versed with this one). You will have to use Google API's and use the Map View. Here is an example to plot a simple point : http://developer.android.com/guide/tutorials/views/hello-mapview.html
Comment: One thing I'm not following... What does `getLastKnwonLocation()` *do*? Does it not make a request of it's own, it just merely checks if some *other* app has already updated the location? I thought the phone's gps was automatically updating location, and `getLastKnownLocation()` would merely access whatever the GPS last acquired? You say it may be `stale` but how can it be `stale` if it's grabbing what the phone's own GPS is saying?


Control Group Selection Bias

Question: I found a study that compared minor physical anomalies(MPA) between certain group of patients with the control group to determine if MPAs occur more frequently among these patients compared to the control group.  One of the MPA item is epicanthus which is an extremely common trait among Asians(esp. Chinese, Japanese, Korean, ect.).  In fact major studies I found show that among the Han Chinese population(which represents 92% of all people in China), the prevalence rate of epicanthus among these people is between 31.79% to 41.75%(https://pubmed.ncbi.nlm.nih.gov/31492581/).  I believe that this may still be an underestimation because other sources describe higher. According to my search, it appears that 31.79% to 41.75% is about the minimum.
Going back to the patient-control comparison study on MPAs, this MPA study describes that 29.1% of the patients(in this MPA study) had epicanthus while only 3.3% of the Chinese control group had epicanthus.  As a result, they concluded that epicanthus is mucher higher among the patients which therefore, shows that manifestation of epicanthus among the Chinese population is a risk factor for the patients' illness.
However, I believe that this study included a selection bias(for the control group) which dramatically distorted the results.  Considering that epicanthus is known to be very common among the general Chinese population(which seems to be at least about 31% to 41%), I believe that their control group's epicanthus prevalence rate of 3.3% would represent selection bias(since 3.3% would not represent the Chinese general population's reasonable prevalence rate for epicanthus).  Rather, if we assume that the Chinese population's epicanthus prevalence rate is abut 31% to 41%, we can see that the patients' 29.1% for epicanthus(in the MPA study) is very similar to the Chinese general population's prevalence rate(which I would think is most likely the correct conclusion).
Since the Chinese general population's prevalence rate for epicanthus is at least about 31% to 41%(while the 3.3% epicanthus prevalence rate seems like a selection bias), can I use the general population's 31% to 41% epicanthus prevalence rate to compare it with the patients' 29.1% epicanthus prevalence rate and conclude that this MPA study does not show(i.e., does not provide evidence) that epicanthus is a risk actor for the patients' illness(since 29.1% is actually slightly lower than 31% to 41% among the general population)?
Answer: Let $E$ be the random variable describing whether the patient has the anomaly epicanthus ($E=0$ means this anomaly is not present, $E=1$ means it is present), and let $I$ be the random variable describing whether the patient is having the illness that is considered here ($I=0$ means the patient is not sick, $I=1$ means the patient is sick).
Now, IIUC, your question is, whether it is possible to have $P(E=1|I=0) = 0.03$ while $P(E=1) \approx 0.3$ and $P(E=1|I=1) \approx 0.3$. In this case, the numbers you gave would result from proper sampling without bias.
First, imagine that the people with epicanthus are a subset of the people with the illness.

Then it is clear that we even have $P(E=1|I=0)=0$. You didn't say what the frequency of the illness is, but if it is larger than that of epicanthus, this possibility cannot be ruled out. Of course, if the illness is rare, this cannot be the case. But this indicates that the probability $P(I=1)$ of the illness is kind of important.
Next, let's describe the situation more thoroughly. We have:
$$
\begin{align}
P(E=1) &= P(E=1|I=0)\;P(I=0) \;+\; P(E=1|I = 1)\;P(I=1)\\
       &= P(E=1|I=0)\;(1-P(I=1)) \;+\; P(E=1|I = 1)\;P(I=1)\\
P(E=1) - P(E=1|I = 1)\;P(I=1) &= P(E=1|I=0)\;(1-P(I=1))\\
P(E=1|I=0) &= \frac{P(E=1) - P(E=1|I = 1)\;P(I=1)}{1-P(I=1)}\\
\end{align}
$$
Let's presume that $P(E=1)$ and $P(E=1|I=1)$ are roughly known parameters and consider $P(E=1|I=0)$ as a function of $P(I=1)$. To make this more readable, let's use the abbreviations
$$
\begin{align}
y &:= P(E=1|I=0)\\
x &:= P(I=1)\\
e &:=P(E=1)\\
a &:= P(E=1|I=1).
\end{align}
$$
Then, we are interested in the function $y(x)$:
$$
y(x) = \frac{e - ax}{1-x}.
$$
Here is a plot of this function for $a=0.3$ and for three different values for $e$, $e=0.2, 0.3, 0.4$. Note that, from the formula, it is clear that for $x=0$ we have $y=e$ and for $a=e$ we have $y=a=e=const$:

From this plot you can see, for each illness frequency $P(I=1)$ (the $x$-axis) what frequency of epicanthus is to be expected, depending on $e$ (keep in mind, that $y$ is a probability and thus has to stay in the interval [0,1]). E.g., we see that, if the illness is very rare ($x$ near zero), the frequency of epicanthus among the healthy cannot be much less than that among all people ($e=P(E=1)$), which is pretty obvious anyway. However, for a rather common illness, $y$ can become very small for fixed $e$.

Control Group Selection Bias


Relation between cohomology of ordered and unordered configuration spaces?

Question: For any manifold $M$, the unordered configuration space of $k$ points is obtained as a quotient of ordered configuration space of $k$ points by the group action of symmetric group on $k$ letters. Does it induce some relation between the cohomology algebras of the two spaces?
Answer: If $F_n(M)$ denotes the ordered configuration space and $C_n(M)$ the unordered configuration space, the quotient map gives a map
$$H^*(C_n(M)) \longrightarrow H^*(F_n(M)).$$
If one takes rational coefficients, then this induces an isomorphism
$$H^*(C_n(M);\mathbb{Q}) \longrightarrow H^*(F_n(M);\mathbb{Q})^{\Sigma_n}$$
onto the symmetric group invariant subspace.
In positive characteristic I don't think there is any pleasant relation between them.
Comment: There is a spectral sequence, in general, going from the cohomology of the group with coefficients in the cohomology of the ordered configuration space to the cohomology of the unordered one; it can be constructed in various ways---for example, Grothendieck builds it at the end of his Tôhoku paper. Rationally, as the group is finite, the spectral sequence degenerates to the isomorphism you mention. In positive characteristic, you have to deal with the whole thing. This is pleasant or not, depending on your definition of this term.
Answer: Oscar Randal-Williams already mentioned the transfer isomorphism $H^*(C_n(M);\mathbb{Q}) \approx H^*(F_n(M);\mathbb{Q})^{\Sigma_n}$. At the risk of self-promotion, one place you can see this transfer in action is in my paper "Homological stability for configuration spaces of manifolds", arXiv:1103.2441. In that paper I used an analysis of $H^*(F_n(M);\mathbb{Q})$ and the action of $\Sigma_n$ on it to conclude that the cohomology of the unordered configuration space $C_n(M)$ is eventually independent of the number of points $n$: $$H^k(C_n(M);\mathbb{Q})\approx H^k(C_{n+1}(M);\mathbb{Q})\text{ for }n\gg k.$$
The key idea is that we can relate $F_{n+1}(M)$ with $F_n(M)$, even when we cannot relate $C_{n+1}(M)$ with $C_n(M)$ directly, and then the transfer map lets us push information from $F_n(M)$ down to $C_n(M)$. The basic framework of this approach is explained in the introduction.
There are also some explicit computations (some going back to Bödigheimer–Cohen–Taylor) of $H^*(C_n(M);\mathbb{Q})$ for various manifolds $M$ in Section 4.2 that might be of interest to you.
Also, you should check out the papers on the cohomology of configuration spaces written by the other participants in this discussion, Oscar Randal-Williams and Giacomo d'Antonio, which should provide a somewhat different perspective.
Answer: This is an expansion to Oscar's answer. The cited result on the cohomology with rational coefficients is an application of the Transfer Theorem:

Let $G$ be a finite group, $X$ a topological manifold and $F$ a field with
  $\mbox{char}\,F = 0$ or $\mbox{char}\,F \nmid o(G)$, then
  $$H^*(X/G; F) \cong H^*(X;F)^G$$

There is a nice proof of this theorem on Bredon's book "Introduction to compact transformation groups."
For the case of $\mathbb R^k$ you can compute the cohomology (with complex coefficients) explicitly. The answer depends on the parity of $k$. For odd $k$, $H^*(F_n(\mathbb{R}^k); \mathbb{C})$ is one dimensional in degree $0$ and trivial otherwise, for even $k$ it is one-dimensional in degrees $0$ and $k-1$ and trivial otherwise.
Comment: I would suspect that  $X$ would need to be compact here, and the action of $G$ should be reasonably well-behaved (say simplicial with respect to some choice of triangulation). I also believe that this result is originally due to Grothendieck. Am I wrong?
Comment: Well, as far as I know you can prove the result for Cech cohomology with the only condition that $X$ is paracompact. Then you need to impose conditions for the Cech cohomology to be (naturally) isomorphic to the singular one. Does this require compactness?

Regarding that attribution, honestly I don't know it.


Why is "Decompile kotlin to java" greyed out in Android Studio 3.1.2

Question:
However, if I manually do "Show Kotlin Bytecode" and click on "Decompile" it will show the correct java code.
Answer: If you write some kotlin and want to see how it gets compiled into JAVA by using the Decompile Kotlin to Java menu, you need to be viewing the compiled .class file and not the Kotlin source .kt file.
After building the app, try to find the compiled *.kt file in the App/build/tmp/kotlin-classes directory.  Here is a simple command line you can run in the root of your project to output the location if your Kotlin file is named Hello.kt:
find  ./ | grep "Hello.class"

Open the .class file in IntelliJ or Android Studio and the menu will be available to see how your Kotlin was converted to JAVA
Answer: Another option for viewing Kotlin decompiled code is to open Kotlin bytecode tab and press Decompile there.
Go to Tools -> Kotlin -> Show Kotlin Bytecode press Decompile in the header.
Works for IntelliJ IDEA 2019.3, so I believe it would work in Android Studio as well.
Answer: Install the plugin  Kotlin to Java decompiler in android studio.
Open the kotlin file in the editor
Run the action from Code -> Decompile Kotlin to Java
Answer: Answer:
                Because, Even after the update of latest Kotlin version ,Sometimes Plugins for Kotlin to Java Decompiler is disabled (OFF).In Order to Enable it, click on Help from the toolbar of Android studio
Help

Go to Find Action or Press(Ctrl+Shift+A)
Now Click on Actions Tab and search for "Decompile Kotlin to Java"
Select the Plugin "Decompile Kotlin to Java" and if it is "OFF" toggle it to "ON"
Image of Plugin

Finally, Go to Tools tab >> find Kotlin >> Show Kotlin Bytecode
Image for reference
A new tab will open on the left
Image of Decompile
Answer: Install Kotlin to Java Decompiler

Then go to tools->kotlin-> show kotlin bytecode to see byte code information.
you can further check the java equivalent code by using Decompile button in the bytecode window.
Comment: "Install Kotlin to Java Decompiler" ... how?


How to do Ethash CPU mine using ethminer?

Question: I have a Private Ethereum Network. I just want to do Ethash CPU mining using ethminer. I know that to have a smaller foot-print it is recommended to use GPU or openCL but for private networks, I only have few nodes on the network and all are CPU nodes. I just want my CPU node able to mine.

For small private networks, I believe mining with CPU nodes, where all nodes are also CPU nodes in the network, will be no problem.

With the current model, if we have a Parity node there is no way for us to mine using a CPU node. And I am not sure why Parity forces users to mine with only GPU node. Since I do not have any GPU machine on my small private network, I am unable to use Parity node to do mining, it forces me to switch to geth node to do mining.
I have followed https://github.com/ethereum/cpp-ethereum .
Install:
git clone --recursive https://github.com/ethereum/cpp-ethereum.git
cd cpp-ethereum

Build:
cmake -H. -Bbuild
cmake --build build

After the build; ethminer used to exist under build folder on older versions git-tag:(untagged-1d50efdb2f43825a1810).
After I build, ethminer does not exist under build. So I was not able to find ethminer binary.
[$]~/cpp-ethereum/build$ ls
_3rdParty            deps     libdevcore     libethereum     libwhisper
CMakeCache.txt       eth      libdevcrypto   libevm          Makefile
CMakeFiles           ethkey   libethash      libp2p          rlp
cmake_install.cmake  ethvm    libethashseal  libweb3jsonrpc  test
CTestTestfile.cmake  include  libethcore     libwebthree     utils

So I have followed https://github.com/ethereum-mining/ethminer to install ethminer.
This line to work for CPU mining: ./ethminer -F http://localhost:8545
The error I am facing with the current/latest ethminer:
./ethminer
  ✘  11:20:06|ethminer  No OpenCL platforms found

[Q] Is there any way to prevent this error and force ethminer to mine on CPU platform? I guess we have find an older ethminer client that accepts -C/CPU flag.
I have also tried: Genoil/cpp-ethereum and it says.
./ethminer
CPU mining is no longer supported in this miner. Use -G (opencl) or -U (cuda) flag to select GPU platform.

Thank you for your valuable time and help.

Note: Two bounties did not return any answer. I opened an issue under github's ethereum-mining/ethminer hoping it will reach someone. You can follow from https://github.com/ethereum-mining/ethminer/issues/382.
Comment: cpp ethereum does not include ethminer, ethminer does. ethminer does not include cpu miner, they removed it. what does this question have to do with parity?
Comment: I am not able to mine with a parity node on a cpu machine. What should I do? Should I switch back to geth in order to mine. @5chdn
Comment: You get a +100 bounty if you rephrase your question to look for an Ethash CPU miner. I'm looking too.
Comment: Just did hope it is more clear, please feel free to fix my question if anything is missing or wrong. @5chdn
Answer: Please note the the github code I am sharing is forked from https://github.com/ethereum/cpp-ethereum and Version 1.3.0 of etherminer that actually can do CPU mining, which is implemented around 1 year ago. I did some small changes to build the project, please see https://github.com/avatar-lavventura/ethminer.
First, since it will create new DAG do on the home directory: rm -rf ~/.ethash
Dependencies:
Linux-based:
sudo apt-get install libleveldb-dev libcurl4-openssl-dev libmicrohttpd-dev libudev-dev cmake

macOS:
brew install leveldb libmicrohttpd

Install:
git clone --depth=1 https://github.com/avatar-lavventura/ethminer.git
cd ethminer
./scripts/install_deps.sh

Build:
cmake -H. -Bbuild
cd build/ethminer
make -j $(nproc)

$ pwd  # binary of etherminer is located under ~/ethminer/build/ethminer
~/ethminer/build/ethminer
$ ./ethminer --version
ethminer version 1.3.0 | Build: ETH_BUILD_PLATFORM/ETH_BUILD_TYPE

To Mine with your private Ethereum-chain:
Please note that geth or Parity should work on the background as connected to your private ethereum network.
This line will use full horse power:
./ethminer -F http://localhost:8545

-t, --mining-threads  Limit number of CPU/GPU miners to n (default: use everything available on selected platform)

[~/ethminer]$ cd build/ethminer
[~/ethminer/build/ethminer]$ ./ethminer -F http://localhost:8545 --mining-threads 2

Helpful comments:

Build process here but with GCC 9.3.0, needed to insert the code patches as noted here in github (https://github.com/ethereum/aleth/issues/5637) , using cmake -DTESTS=OFF
Comment: I am not sure, I think there is no pool on CPU mining
Comment: Thank you @alper , it works,I solved build issues downgrading g++. following this guide: https://achrafothman.net/site/how-to-downgrade-gcc-and-g-in-ubuntu/
Comment: Is there a version for Windows?
Comment: No unfortunately . @ulu
Comment: is there a way to connect it to the pool instead? if so which pool should be set up for this purpose. Thanks in advance...
Answer: I followed @alper's build process here but with GCC 9.3.0 I needed to insert the code patches as noted here in github: https://github.com/ethereum/aleth/issues/5637
I configured with cmake -DTESTS=OFF


Why do most programming languages only give one answer to square root of 4?

Question: Most programming languages give 2 as the answer to square root of 4. However, there are two answers: 2 and -2. Is there any particular reason, historical or otherwise, why only one answer is usually given?
Comment: If you extend to deal with "return all roots" then you very quickly need a language with builtin support for complex numbers.
Comment: And the name of that language is?
Comment: The name of the one of such languages is English. :)
Comment: @mbaitoff Is English a programming language? Or are you 'bait'-ing me?
Answer: Because:

In mathematics, √x commonly, unless otherwise specified, refers to the principal (i.e. positive) root of x [http://mathworld.wolfram.com/SquareRoot.html].
Some languages don't have the ability to return more than one value.
Since you can just apply negation, returning both would be redundant.
Comment: Pax, do you not see the reference provided? Go there and read the penultimate sentence in the paragraph above the pretty rainbows.
Comment: I read it, sgm, but I also did university-level maths and I'm still very closely associated with mathematicians at the state university here. The link says "In common usage, ...". That is not what you said ("In mathematics"). Mathematicians are in a world of their own and they would most likely burn you at the stake for that comment :-)
Comment: I don't think so! In maths, the solution to the equation f(x) = sqrt(x) is x = +/-2. It depends entirely on the domain you've chosen (natural numbers, integers, reals, etc). Since programs allow -ve numbers, maths would dictate that they return both solutions. It's pragmatism that limits the programming languages (although Python could always return a tuple).
Comment: Additionally, most of the languages I can think off the top of my head could return a vector or at least some type of data structure to represent both values, if they wanted to.
Comment: How did this get 6 upvotes so fast? The first point doesn't make sense. In most programming languages, it's not √, its sqrt, which does not automatically mean the principle square root.
Comment: In mathematics different people use different notation. Just as you can have your holy war about whether Vim is better than Emacs you can also fight over the one *true* math notation.
Comment: And I just noticed I stuffed up on my first comment. It should have said: "the solution to the equation y = sqrt(4) is y = +/-2".
Comment: Also note that the SAT, if that is any indicator of common math, always assumes +/-. :P
Comment: @paxdiablo: In my formulary, the sqare root is defined to be a positive number. So Christian is probably right, there are different notations, and most programming languages just picked the one that fits their definition of a function better.
Comment: Whooops, sorry, accidental down-vote as my mouse ran out of battery life. Then Stack Overflow decided to go all read-only. Bugger.
Answer: If the square root method returned two values, then one of those two would practically always be discarded.  In addition to wasting memory and complexity on the extra return value, it would be little used.  Everyone knows that you can multiple the answer returned by -1 and get the other root.
I expect that only mathematical languages would return multiple values here, perhaps as an array or matrix.  But for most general-purpose programming languages, there is negligible gain and non-negligible cost to doing as you suggest.
Answer: Some thoughts:

Historically, functions were defined as procedures which returned a single value.
It would have been fiddly (using primitive programming constructs) to define a clean function which returned multiple values like this.
There are always exceptions to the rule:

0 for example only has a single root (0).
You cannot take the square root of a negative number (unless the language supports complex numbers).  This could be treated as an exception (like "divide by 0") in languages which don't support imaginary numbers or the complex number system.

It is usually simple to deduce the 2 square roots (simply negate the value returned by the function).  This was probably left as an exercise by the caller of the sqrt() function, if their domain depended on dealing with both the positive (+) and negative (-) roots.
Comment: I have enough trouble with numbers that aren't imaginary
Comment: Imaginary numbers are just as real as real numbers: that is, not real at all.
Comment: Apropos square root of negative number: At least Lisp handles this and returns the complex number 0+1i:

? (sqrt -1)
#C(0 1)
Comment: You mean:  In languages that don't support imaginary numbers, it's not possible to take the square root of a negative number.
Answer: It's easier to return one number than to return two.  Most engineering decisions are made in this manner.
Answer: There are many functions which only return 1 answer from 2 or more possibilities. Arc tangent for example. The arc tangent of 1 is returned as 45 degrees, but it could also be 225 or even 405. As with many things in life and programming there is a convention we know and can rely on. Square root functions return positive values is one of them. It is up to us, the programmers, to keep in mind there are other solutions and to act on them if needed in code.
By the way this is a common issue in robotics when dealing with kinematics and inverse kinematics equations where there are multiple solutions of links positions corresponding to Cartesian positions.
Comment: I personally find this answer the most satisfying. +1.
Answer: In mathematics, by convention it's always assumed that you want the positive square root of something unless you explicitly say otherwise. The square root of four really is two. If you want the negative answer, put a negative sign in front. If you want both, put the plus-or-minus sign. Without this convention it would be impossible to write equations; you would never know what the person intended even if they did put a sign in front (because it could be the negative of the negative square root, for example). Also, how exactly would you write any kind of computer code involving mathematics if operators started returning two values? It would break everything.
The unfortunate exception to this convention is when solving for variables. In the following equation:
x^2 = 4
You have no choice but to consider both possible values for X. if you take the square root of both sides, you get x = 2 but now you must put in the plus or minus sign to make sure you aren't missing any possible solutions. Also, remember that in this case it's technically X that can be either plus or minus, not the square root of four.
Comment: "In mathematics, by convention it's always assumed that you want the positive square root of something unless you explicitly say otherwise" - sorry this is 100% incorrect.
Comment: Wow Philip, that's a really harsh response.
Answer: Because multiple return types are annoying to implement. If you really need the other result, isn't it easy enough to just multiple the result by -1?
Answer: Because most programmers only want one answer.
It's easy enough to generate the negative value from the positive value if the caller wants it. For most code the caller only uses the positive value.

However, nowadays it's easy to return two values in many languages. In JavaScript:
var sqrts=function(x) {
  var s=Math.sqrt(x);
  if (s>0) {
    return [s,-s];
  } else {
    return [0];
  }
}

As long as the caller knows to iterate through the array that comes back, you're gold.
>sqrts(2)
[1.4142135623730951, -1.4142135623730951]

Answer: I think because the function is called "sqrt", and if you wanted multiple roots, you would have to call the function "sqrts", which doesn't exist, so you can't do it.
The more serious answer is that you're suggesting a specific instance of a larger issue.  Many equations, and commonly inverse functions (including sqrt) have multiple possible solutions, such as arcsin, etc, and these are, in general, an issue.  With arcsin, for example, should one return an infinite number of answers?  See, for example, discussions about branch cuts.
Answer: Because it was historically defined{{citation needed}} as the function which gives the side length of a square of known surface. And length is positive in that context.
Answer: you can always tell what is the other number, so maybe it's not necessary to return both of them.
Answer: It's likely because when people use a calculator to figure out a square root, they only want the positive value.
Go one step further and ask why your calculator won't let you take the square root of a negative number.  It's possible, using imaginary numbers, but the average user has absolutely zero use for this.
On imaginary numbers.
Comment: The difference is that there is no REAL number which can be provided as the answer to "What is the square root of ?".  You need to use the COMPLEX number system.

So I'm not sure how this is relevant to the question being asked.  The fact is, there are (almost always) 2 REAL numbers which are valid square roots of a positive integer.

Once again, I think it comes back to the domain.  If the user is interested in both the + and - roots, they can derive them quite easily from what sqrt() returns.  Sometimes pragmatism overrides correctness.
Comment: Agree with the pragmatism.  The imaginary numbers example was to show how impractical such a feature is for any normal user.


What does setting "Who can view the membership of the group" to everyone do when creating groups

Question: Ive set "Who can view the membership of the group?" to everyone when creating a security group in 2010 and im wondering what this actually does? How do users without full control view this group as they dont have the site permissions option in site actions?
Answer: There are many ways to get to the group list, even without full control.
Groups can also be applied at a list or library level and users with full control of the list or library can be prevented from viewing group membership that way. It depends on the governance applied.
Also, even site administrators with full control will not be able to view the members of the group if that option is set to let only the group members view members. This is a way to prevent power users with full control of the site to view groups they don't own. Such groups could have been set up by a site collection admin, for example, who will always be able to see and change all group members.
Comment: If you know the URL of a SharePoint system page, you can just type it in, without going via the Site Actions or Site Settings links. Since all SharePoint sites have the same page addresses for the system pages, all you need is a site where you have full control and a way to remember the different system pages. Then it's just a matter of trying which pages you have access to with your current permissions.
Comment: It depends on your permissions. As a read only user, you won't be able to access most system pages. But there are many possible combinations in the permission levels that allow viewing system pages without giving you the Site Actions menu. Try the All Site Content page URL on a site where you don't see it in Site Actions.
Comment: thanks for that.  You mentioned "There are many ways to get to the group list, even without full control."  Are you able to list the ways please
Comment: oh really.  Thanks for that.  I would have thought that if you didnt have the correct permissions entering the address to the system pages would have resulted in an access denied. Seems like a bit of an oversite by ms
Comment: @teylyn Yes, there is a group owner, of course... But on the setting "Who can view the members of this group?" the only options are `group members` and `everyone`. It's **impossible** to "let only the group owner view members." The rest of your answer is correct.
Comment: whats  the powershell command property to get or set this spgroup property?


How to install s3sync

Question: This seems like an excellent script but lacks a key part to its installation I can't seem to figure out. Maybe someone out there can help a newb.
What I've done so far :

Installed the s3sync package.
Downloaded the s3 certificate
Downloaded the s3 ssl package
ran it with sh ssh.certs.shar
Edited the s3conf.yml file to have the correct AWS id and password and a path to the cert file

When I run the s3cmd.rb I get the error "You didn't set up your environment variables; see README.txt"
To which I agree, there is no information written regarding where I specify destination or target.
Guesses :
-The cert file has to be in a specific place to which it isn't, or its in the incorrect cert file
-the s3conf.yml may not have the correct information written in it.
UPDATE:
Uninstalled everything, and installed it as a gem. Made sure the s3config.yml is still in /etc/s3conf/ . Still nothing though.
Answer: Some b/s here but I went into the s3config.rb
Found this line :
confpath = ["#{ENV['S3CONF']}", "#{ENV['HOME']}/.s3conf", "/etc/s3conf"]

and ripped it apart to this :
confpath = ["/etc/s3conf"]

Done, problem solved.
Answer: Yes.  The environment variables are not being found.  This troubled me for a while.  It is because the locations you are setting in that initial line of confpath code ["#{ENV['S3CONF']}", ... is not actually the location of the variables contained in the .yaml file.
As Trip says, hard setting that value to the dir containing the .yaml file solved this problem for me.
You could actually set the values using 'export' but really, this is much easier!

How to install s3sync


Getting an error when I do sudo apt-get upgrade

Question: Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
  libntdb1 linux-image-generic-lts-vivid linux-signed-image-generic-lts-vivid python-ntdb thermald
Use 'apt-get autoremove' to remove them.
Done
The following packages have been kept back:
  libgbm1 xorg
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up oem-wireless-dw1550-1160187-dkms (22.214.171.124somerville1) ...
Removing old oem-wireless-dw1550-1160187-22.214.171.124somerville1 DKMS files...

------------------------------
Deleting module version: 220.127.116.11somerville1
completely from the DKMS tree.
------------------------------
Done.
Loading new oem-wireless-dw1550-1160187-220.127.116.11somerville1 DKMS files...
First Installation: checking all kernels...
Building only for 3.19.0-49-generic
Building for architecture x86_64
Building initial module for 3.19.0-49-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/oem-wireless-dw1550-1160187-dkms.0.crash'
Error! Bad return status for module build on kernel: 3.19.0-49-generic (x86_64)
Consult /var/lib/dkms/oem-wireless-dw1550-1160187/220.127.116.11somerville1/build/make.log for more information.
dpkg: error processing package oem-wireless-dw1550-1160187-dkms (--configure):
 subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
 oem-wireless-dw1550-1160187-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

Comment: 15.04 is past End of Life, are you sure you are still on 15.04?
Comment: Sorry, my bad. It's ubuntu 15.10.
Comment: Welcome to Ubuntu! It would be helpful if you added a little more description about your setup and what you did to achieve this program output. Even if your problem was resolved now it would help future readers with the same problem to identify it. I'll give you an up-vote if you ping me after you [edit] your question. :-)
Answer: You have some old kernel(s) from a previous Ubuntu release installed that cause(s) compatibility issues when DKMS tries to compile kernel modules for it. You should delete them.
Start with
sudo apt-get purge -f 'linux-*-3.19*'

and/or see How do I remove old kernel versions to clean up the boot menu?.
Apt may refuse to delete these packages because of unconfigured packages (because a kernel module couldn't be compiled for them). In that case please update your question with what you tried to do and any error messages encountered in the process and ping me in the comment section of this answer.
Answer: Looks like a previous build crashed, I would remove the crash file (see path in the line below) and try another upgrade.

[Errno 17] File exists: '/var/crash/oem-wireless-dw1550-1160187-dkms.0.crash'

If the build still crash, I would consult /var/lib/dkms/oem-wireless-dw1550-1160187/18.104.22.168somerville1/build/make.log to have more details.
Comment: The crash file wouldn't matter if the build didn't crash…


How to take pictures from the GE?

Question: I've seen similar questions on how to take pictures, but those questions are for the render engine, cycles, and others. I have a set of weapons, and want to take a picture from the side view. When you swap to your weapon, your newly selected weapon will show its picture on the right side of your screen, like other FPS games. In other words, I am looking for a way to take a screenshot in the GE; if you can, then can I also change the resolution? Any help is appreciated, thanks!
Comment: why not prepare them before and just pick the one related to the weapon ?
Comment: @Chebhou presents a good point. You could "take" the pictures before hand and just display the afterward in the game.
Comment: I'm not saying IN play mode. Just in the ge.
Answer: Pose your weapon according to the view , than run the script to take a picture using openGl render , got o the UV editor and the image will have the name of the active object :
import bpy

# path to the folder
file_path = bpy.data.filepath
file_name = bpy.path.display_name_from_filepath(file_path)
file_ext = '.blend'
file_dir = file_path.replace(file_name+file_ext, '')

mainScreen = bpy.context.screen

#current scene
scene = mainScreen.scene
#set render settings
scene.render.resolution_x = 128
scene.render.resolution_y = 128
scene.render.resolution_percentage = 100

#render from view (set view_context = False for the camera render)
bpy.ops.render.opengl(view_context = True)

#save and load the render (you can't keep the render result)
img_name = bpy.context.object.name+".png"
bpy.data.images['Render Result'].save_render(file_dir+img_name)
bpy.ops.image.open(filepath = file_dir+img_name)
bpy.data.images[img_name].pack()

you can change the render size in the script

For screenshots while playing the BGE has a function for that :
bge.render.makeScreenshot(filename) see the DOC
Comment: @BlenderDev you can use it even when playing
Comment: Didn't check it yet, but it looks good.
Answer: bge offers methods to render to texture, in the renderTexture part of bge, that can
export a png, or you can snapshot a view of a item on frame 0, the advantage here,
is you can load from external blends, and then snap the image, so if you change anything,
you just save the external file and the main file updates automagically.
there is also ctrl+print screen to copy a image to paste that is a screenshot.

How to take pictures from the GE?