Is uncertainity a postulate?

Question: I heard the standard interpretation of Heisenberg Uncertainty Principle: Just the measurement affects the position of the body because always you want to see a body (=to measure the position), you need a light - and only the fact that photons that strike the surface of that radiating body have momentum mean that the position of the radiating body isn't certain (even theoretically) only because of your measuring - and therefore the uncertainty in position will always be non-zero.
Is there some possible way to modify this model to apply always in quantum mechanics? If no, is there some good model what describes the origin of the uncertainty?
Comment: Seems like it could be a duplicate of [this](http://physics.stackexchange.com/q/24068/).
Comment: @DavidZ The question doesn't seem like a duplicate to me. But I've looked for the answers here and it says it is experimentally proven, as 0celo7. Could you please try to build a similar model like I wrote? This was wrote by Gamow and the reasoning seems to have no experimental base. No interpretation I think doesn't try to explain this.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/28801/discussion-on-question-by-probably-is-uncertainity-a-postulate).
Comment: (2 comments up) it seems that your question is about the statement that uncertainty exists because of the effect our measuring procedures have on the system being measured, and you're asking how it can be generalized to not depend on the measurement procedure. That's the same basic objection raised by the other question. (Of course, as the answers show, that statement is wrong, but that doesn't matter for figuring out duplication.)
Comment: Lest my answer should seem too critical of this question (which I upvoted), it's worth pointing out that the great Heisenberg himself confused the observer effect and his uncertainty principle at first. We see more clearly only through hindsight. Indeed Heisenberg didn't have the mathematical background to see what was happenning clearly: Max Born had to point out to him that the "weird" noncommutative quantities Heisenberg had dreamt up were matrices; see [here](https://en.wikipedia.org/wiki/Heisenberg%27s_entryway_to_matrix_mechanics)
Answer: Your example is probably not a good one to understand Heisenberg uncertainty with, because it mixes two uncertainty phenomena together:

The observer effect (See Wikipedia page of same name);
Heisenberg uncertainty itself.

The observer effect is the obvious and everyday observation that we can't extract information from a system without disturbing it in some way. We must change its physics ever so slightly, and the measurement of one variable will change measurement of another by some positive amount $\epsilon>0$. This differs from Heisenberg uncertainty in two ways: (1) We can in theory make the disturbance $\epsilon$ as small as we like by making better and better instruments with higher and higher signal to noise ratio; even though $\epsilon$ is always nonzero, there is no fundamental limit to how small it can be given a sophisticated enough experimental technique; (2) If we know the physics of our system perfectly and characterize our instruments properly, we can in principle calculate exactly what the observer effect is and thus calculate exactly what the measured quantities would have been were the instrument in question perfect.
The measurement of a voltage with a voltmeter, and the requirement that it needs to draw current from the measured circuit to make its measurement is a good example to model to explore these ideas with.
Heisenberg uncertainty, on the other hand, puts fundamental limits on the size of the uncertainty - you can't get it smaller than a certain limit. Moreover, the notion of measurement outcome having meaning before the measurement is made (the kind of notion that allows you to allow for the measurement effect above and state what the "true" measurement would have been) has been shown to be more and more untenable in modern research, in particular by experimental observation of the violation of the Bell inequalities See the "Counterfactual Definiteness" Wiki page. The jargon one hears in this context is that "violation of the Bell inequalities falsifies the notion of counterfactual reality".
To explain the fundamental limit, it is best to answer the question in your title, that is, how "fundamental" the HUP is. Physics is not "derived" from axioms as is mathematics, but there is a very real sense wherein the HUP is not axiomatic, namely, you don't need to include it in a reasonable list of basic postulates because it follows immediately from them. What are these postulates? Basically that quantum states live in Hilbert spaces and measurements are modelled by observables, which are self-adjoint operators acting on the state space together with a recipe for interpreting how these operators define the probability distributions of their measurments when a given system quantum state prevails. I explain this in more detail here (look in particular at the latter part of the answer where I describe observables). But now, given this QM in a nutshell, it immediately follows that whenever self adjoint operators do not commute (and the "usual" situation for matrices is that they do not), there is an uncertainly relationship between measurements modelled by the two operators. The most important noncommutation is that $[\hat{x},\,\hat{p}]=i\,\hbar\,\mathrm{id}$ between the position and momentum observables, leading to $\Delta x\,\Delta p\geq \hbar/2$ (where the $\Delta$s are standard deviations).
Now we live in a highly noncommutative world, so that on the one hand the uncertainty principle results directly from something as everyday and familiar as the notion that the shoe and sock on-putting operators do not commute when you get dressed in the morning. But on the other hand, whilst you can unscramble a warddrobe malfunction by undoing the respective operators and imparting them in the right order, observables do not map the quantum state - they only tell us how to calculate the measurement probability distribution, so they cannot in any sense be "inverted" and moreover, since the measurement by $\hat{x}$ co-indides with the system choosing a random eigenstate of the observable, information about what the measurement $\hat{p}$ would have been were it made instead is destroyed. Indeed, the experimental violation of the Bell inequalities suggests that the notion of "would have been" is meaningless.
Lastly, I do know that examples exactly like yours are given in the early chapters of the third volume of the Feynman Lectures to explain uncertainty. I admire the Feynman lectures greatly and would recommend the first eight chapters of volume 3 as an excellent introduction to the gist of quantum mechanics. But this particular example I don't think is the best, for the reason it mixes the two uncertainty phenomena as I stated at the beginning of my answer.
Comment: +1, the importance of the difference between the observer effect and HUP cannot be enunciated enough. More on observer effect can be found here http://physics.stackexchange.com/questions/201761/differences-in-measurement-between-quantum-physics-and-classical-physics/201815#201815, if the OP is interested.
Comment: Wholeheartedly agree with @Phonon.
Answer: All physics theories depend on rigorous mathematics with its axioms and theorems, but in order to make a connection to measurements relationships between the mathematics and the physical observables have to be established, of equal importance to mathematical axioms, called laws or postulates, for the case of quantum mechanics.
I have found this list of postulates for quantum mechanics useful and common to most published lists:
The Postulates of Quantum Mechanics

Associated with any particle moving in a conservative field of force is a wave function which determines everything that can be known about the system.
With every physical observable q there is associated an operator Q, which when operating upon the wavefunction associated with a definite value of that observable will yield that value times the wavefunction.
Any operator Q associated with a physically measurable property q will be Hermitian.
The set of eigenfunctions of operator Q will form a complete set of linearly
independent functions.
For a system described by a given wavefunction, the expectation value of any property q can be found by performing the expectation value integral with respect to that wavefunction
The time evolution of the wavefunction is given by the time dependent Schrodinger equation.

As you see the Heisenberg uncertainty is not within the list. Nevertheless, as with theorems which arising from axioms can replace axioms, except that they are more complicated and simplicity is valued, the HUP arises from these postulates similar to a theorem , derived from the postulates using the mathematical tools.
It arises from postulate 1 and 2 and the commutator relationships that come out of the mathematical tools needed.
Actually there exists a reference on the web where the HUP is treated as a postulate.
Edit after comments: One has to clarify the use of the word "postulate" in physics and particularly in quantum mechanics theory, since a discussion at the comments claimed that a postulate is a synonym for an axiom. Even though the dictionary definitions are different, a google search shows that for mathematicians, a postulate and an axiom may be synonyms.  In the treatment of quantum mechanics most rigorous expositions of an "axiomatic" derivation use "postulate" for the assumed "truths" that connect observable/measurable quantities to mathematical forms. These pick up a subset of the possible mathematical formulations , the subset that fits and predicts measurements.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/28800/discussion-on-answer-by-anna-v-is-uncertainity-a-postulate).
Answer: The Heisenberg uncertainty principle is not an axiom in quantum mechanics. It has a legitimate derivation, based on the Schwarz Inequality in Linear Algebra. As 0celo7 pointed out in a comment, the axiomatic foundation of quantum mechanics (a la Dirac) takes the non-commutation of the position and momentum operators (${\hat x}$ and ${\hat p}$) as an axiom in the theory, viz. $\left[ {\hat x}, {\hat p} \right] = i \hbar$. In accordance with the inequality, the product of variances of non-commuting operators has a lower bound, dependent on the magnitude of the commutator. Thus, there would be an uncertainty principle for every pair of non-commuting operators (e.g. the angular momentum - angle, or the difficult Energy - time uncertainty relation).
As far as imagining how this implements out in practice is concerned, the example of momentum being imparted in the act of measurement is concerned is a convenient example, since it does put across the message. Please note however, that these interpretations sit atop the solid, mathematical foundation of the theory, which is reliant on a proper formalism. The mathematical formalism is based entirely on the language in which QM is written, which is linear algebra, since the theory treats the action of operators on basis vectors. There is absolutely no deficiency in this formalism which needs to be corrected, and the uncertainty principle is more of natural consequence of the non-commutation than a deficiency.
Answer:
the measurement affects the position of the body

To be clear a so called measurement doesn't reveal some preexisting value, it is an interaction that happens continuously over time and leaves the resulting state in one of many fixed final states. Each of which has a real number associated with it.

mean that the position of the radiating body isn't certain (even theoretically) only because of your measuring

This isn't what the uncertainty principle is about. I have a good answer about what the uncertainty principle is at https://physics.stackexchange.com/a/169757 and an essential aspect is that the uncertainty principle relates two uncertainties. It says that if the order you do two so called measurements matters (if doing A then B then A again can give different results compared by on doing A twice then B which always has the second A give the same result as the first A) then there might be a lower bound on the products of the uncertainty of the two measurements.  If the product of the two uncertainties has a lower bound and one of the uncertainties is low then the other one has to be high.
And that is the real affect of the uncertainty principle. It tells you about a trade off. You could choose to have a very low uncertainty for one kind of measurement but eventually when the uncertainty for that measurement gets low enough then if you keep decreasing the uncertainty of that one measurement then the other measurements that aren't compatible with that one can start to have high uncertainties.
And to be clear when o say decrease the uncertainty I mean get up and walk away from that lab and find a lab where the states are different states that have less uncertainty in that measurement.
This might still be confusing so let's talk about what uncertainty is. First you need a state. Lots of copies of the state, many systems prepared to be in the same state. Then you can measure a bunch of them. You get lots of results. They might have a mean and a standard deviation. Even better the sameple mean and sample standard deviation might come from a probability distribution with a population mean and a population standard deviation. That population standard deviation is what we call the uncertainty. It depended on the state as well as the thing you choose to measure.
The uncertainty principle isn't really talking about the uncertainty of that one measurement it is talking about multiple measurement of two different things, look at $$\Delta x\Delta p\geq \hbar.2$$
See how it has a $\Delta x,$ that's the population standard deviation of measuring the position $x.$ See how it has a $\Delta p,$ that's the population standard deviation of measuring the momentum $p.$ it says the product can't be too small.
The $\Delta x$ and $\Delta p$ can be small. You can pick a state where $\Delta x$ is say $10^{-20}m$ and you can pick a state where $\Delta p$ is say $10^{-20}kg m/s$ but you can't pick a state where both standard deviations are that small.
It says that way back when you picked a state there was a trade off. The results of one measurement could be made to have a small standard deviation and the results of the other standard deviation for the same state would then have to be larger.
Sometimes both standard deviations are large. That happens for some states. But they can't both be small. Another thing that can happen is that a state can fail to even have a standard deviation or even a mean. This happens for instance if one the measurements has a zero standard deviation then the other one won't even have a standard deviation. There is nothing wrong with not having a mean and not having a standard deviation. However it is worth checking whether what you proposed can be done done in the lab without using an infinitely big piece of equipment or one that can create arbitrarily high energies.

the uncertainty in position will always be non-zero.

The uncertainty in position can be zero. But this requires arbitrarily high energies and the momentum distribution has every momentum equally likely from $-\infty$ to $+\infty$ and so the momentum uncertainty is in some sense infinity because every momentum is equally likely. It has no mean and so you can't even define the standard deviation (since that depends on the mean). In a loose sense the standard deviation is infinite.
Similarly the uncertainty in momentum can be zero. But this requires am infinite space for your particle to spread out in. The position distribution has every position equally likely from $-\infty$ to $+\infty$ and so the position uncertainty is in some sense infinity because every position is equally likely. It has no mean and so you can't even define the standard deviation (since that depends on the mean). In a loose sense the standard deviation is infinite.
The real point is that when to choose states with a real low uncertainty in one thing that same state ends up having a high uncertainty on another thing. That's the uncertainty principle.

Is there some possible way to modify this model to apply always in quantum mechanics?

You can generalize the uncertainty principle to any two measurements. If the two measurements are compatible (i.e. A then B then A then B again always gives the same results the a b a b in the sense that you get the same thing for your A measurement the second time and get the same thing the second time for your b measurement) then the uncertainty in each can be as low as you want.
Otherwise there is a lower bound on the two. However the lower bound actually depends on the mean of something else. So even when they aren't compatible sometimes they can still both be small. That doesn't happen for position and momentum since the thing whose mean you want is something that always has the same mean for every state.

If no, is there some good model what describes the origin of the uncertainity?

Yes. The Schrödinger equation has enough information to show you exactly where uncertainty comes from. And you can derive the uncertainty principle from it.
So see uncertainty a cheap way is to just look at a wavefunction and its Fourier transform and note that each gives the distribution for the position and momentum measurements respectively. So then you get the quantum uncertainty from the acoustic one, that to have a chirp you need lots of pitches and to have a good pitch you have to have a long tone.
But that jumps over how you get probability distributions from a state. The full answer for that requires answering the measurement problem (which you did tag so I'll mention it).
I'll talk about the simplest measurement, a Stern-Gerlach measurement of a spin 1/ 2 particle. It is the simplest because it only gives two possible result and so it always has a mean and a standard deviation.
And the results can be computed with the Schrödinger equation and nothing else. Just write down the Hamiltonian for an inhomogeneous magnetic field inside the device.
So you have a device where beams come in and there are two places beams can come out. An up one and a down one. If you have three devices you could bolt one down and then put one of the others at each the two output ends so the output of the bolted one is the bin out of the other one.
If you do this then all the ones that go in the up box come out of the up of that box and all the ones that come out the down box come out the down of that box.
This is an example of multiple copies of the device being compatible with itself measuring with it twice always  the same result the second time as you got the first time. So up the first time means you get up the second time. And down the first time means you get down the second time.
The device usually splits an incoming beam into two beams one going up and one going down. But it changes the result for each outgoing beam so that it becomes one of the special beams that doesn't get split and comes out just one end.
Why do we say it changes things? Because if we put three in a row with the second on the up output of the first and the third in the down output of second then the third one never has anything come out (once it went up it always went up). So the output of the first box really is a thing with the property that it always goes up.
But if you rotate that second box so it still gets the up output of the first box but now sends the beams left and right then no matter which one (left or right) you attach the third box to then beams come out of both the up and the down parts of the third unrotated box. So that property of always giving up was destroyed by the second box. So the rotated devices are incompatible with each other.  And since the output of the first box had the property that it gives the same result (up) and then didn't have that property after it went through the second box, so the second box destroyed that property so changed the particle.
Every device changes a particle unless it happens to already be in one of the few kinds of output states that device allows.
So we know that so called measurement changes things. And it changes things into one of the few states that that device doesn't change. And if there isn't a state that both devices leave alone then the order you do them matters since they will change it back and forth. Like of you had two remotes for a TV and two people that really want to make the TV be on different stations. Compatible results would be like someone that only cares about volume and the other cares about the station eventually you get to a state that neither will change.
So we know that we can get more than one result. What about the standard deviations. For that you need to know the relative frequency of getting each result. We have two results. Now you can put s detector in front of the incoming beam and it will fire at a certain rate. That rate depends on the current density and the width of the beam, so depends on the current. Each separate beam has its own current density and its own width. And the Schrödinger equation accurately predicts the current density at each point (it predicts the whole wave from which you can get the current density at each point) so you can get the current.
So just writing the initial input state and the Hamiltonian for the device and then evolving with the Schrödinger equation gets you the rate rate a detector at any device location fires. There are shortcuts. The relative size of the square of the projection of the spin state onto the eigenstates of an operator tells you the relative frequencies of the rates.
And you can predict how the detector works with the Schrödinger equation. Bit it works the same way, by splitting the wave but now you have two things the particle and the detector so we have to be honest that for the Schrödinger equation the wave is in configuration space. So the split happens in configuration space. And what happens is that originally just the position and spin on the particle changed then the detector changes too and you end up having two groups of configurations that each acts like they are the only group. And forever will. These effectively separate worlds can have other devices that count the relative frequencies of repeated measurements and the group of configurations will become almost entirely focused on a reading near the population average. And since detectors have to have a certain insensitivity to noise from other sources they are also insensitive to the much smaller group of configurations where it isn't nearer the average.
This is similar to a statistical effect of the law of large numbers. It isn't the law of large numbers since there isn't a fixed sample space (remember how measurements change things, this means no foxed sample space so regular probability theory does not apply).

Is uncertainity a postulate?


Indesign: Text -Trouble replacing existing text or inserting small object

Question: I need to replace some of the text in this text box. It will allow me to triple-click the entire line, but I can't just select part of the text to replace an e-mail address or do other editing. Any thoughts? (I'm confused with the areas that InDesign is displaying and which I've highlighted.)
Answer: Try Ctrl-Y or Edit Menu "Edit Story In Editor" so you can see the text in word-processor mode instead of wysiwyg. (Is it auto-generated text by any chance?)
Comment: Post your InDesign file and I will autopsy it. The highlights in your screen shot almost look like you have a separate text object other than the text box in question: text in the screen shot does not match text in your comment.
Comment: The text is not auto-generated. The story editor looks basic, with [Basic Paragraph] next to the two lines (the 1, 2, etc. are superscript)

1Company Name, address, Canada and other company, University of something, Anytown, Canada; 2Company Name Inc., Anytown2, Canada; 3Company Name West, West Anytown, Australia
Corresponding author:  firstname.lastname@example.com
Comment: [Basic Paragraph] is telling you what paragraph tag is applied to the text. So are you unable to edit the text in the Story Editor? Can you select individual words with the mouse or the (shift/control) arrow keys? ... (Check for the sticky alt/shift/control keys too.)


How are people testing prototypes on Apple/Android watches?

Question: I usually use proto.io to mockup and then test prototypes right from the device. However, proto has yet to include this functionality for smart watches. (I can only test in browser). Does anyone here have any ideas on how to test right from the device (without creating the actual app)?
Comment: From my knowledge, it looks to be too early for fully-fledged testing prototypes for smartwatches.
Answer: Paper prototyping is a quick and dirty way to do early usability testing. You can do that on a watch UI in the same way you do it for desktop/mobile UIs. Just print out your prototype screens and perform a usability test, swapping out the printouts as if they were live screens.
Here's an example (skip to 3:00).
See also: Paper Prototyping and Usability Testing.
Comment: I've used this technique for evaluating desktop apps and it works surprisingly well. Good luck.


How to restore/re-create some folders from Time Machine backup of a different computer?

Question: I have Time Machine backup of computer A, a Macbook Pro mid-2010. I want to restore/re-create some folders backed up in that backup on a different computer, a Macbook Pro Retina mid-2014.  How to properly do this?
Answer: You can use Migration Assistant.
Comment: This is a good suggestion, however, can you add details as to how this solves the problem?


What is the term for a word that has come to mean the opposite of its orignal meaning?

Question: What is the term for a word that has come to mean the opposite of its original meaning"
Comment: Please provide an example of such a word.
Comment: I posted a similar [question](http://english.stackexchange.com/questions/231625/what-is-the-terminology-for-a-phrase-whose-common-usage-is-diametrically-opposit) a few months ago, though that was for a phrase and not an individual word.
Comment: Are you talking only about nouns whose meaning has _completely reversed_ (i.e., they used to only mean _+X_, now they only mean _-X_)? Or would you include words that have developed meanings that are the opposite of their original meaning, but still perhaps also retain their original meaning (like _fast_, mentioned in bobro's answer below)?
Comment: "Groovy" used to mean modern and exciting; someone who's living in the '60s. And now it means old-fashioned; someone who's still living in the '60s!
Comment: [autantonym](http://en.wikipedia.org/wiki/Auto-antonym) is for words that mean something _and_ its opposite, which is close to but not exactly what you are seeking. Are you thinking of the use of 'bad' to mean 'really good' sometimes? 'bad' still means 'not good' in most instances so could be considered an autantonym, rather than your restriction.
Comment: There is an Italian footballer called *Ciro Immobile* who plays for Borussia Dortmund and the Italian national team. He wears the name *Immobile* on his back but is anything but 'immobile' as he is a very fast striker. But he wasn't fast enough to do much damage to England tonight.
Answer: Hmmm.... good question! Not the same as a contronym, a word that has a homograph which is an antonym. Dust can mean dust, or to remove dust, fast can mean fixed in place or moving quickly, and so on.
I'll bet there is a word to answer the question, though.
As for an example, "awful" is awfully close to having come to mean the opposite of what it originally meant. There are others which are close- nice originally meant "foolish"- but I can't remember one which has come to mean its complete opposite. I'm sure there are some, probably in specific fields (music for example).
Comment: _Fast_ is actually a precise example of this. It has come to mean the opposite of its original meaning, though it still retains the original meaning as well. The question doesn't give enough detail to ascertain whether that would still count as an example.


How do I retrieve the server and session id from the Salesforce iOS API?

Question: I'm currently trying to hack in some functionality to download attachment data for an iOS Salesforce application. I'm going to do that using a direct HTTP request, but for that to work I need to pull the session ID and server (e.g. "na1.salesforce.com") from the API. Has anyone been able to do this yet?
Answer: Many people did this.
This would require you to basic understanding of Salesforce REST API and OAuth flow. Here is the link to get some details about Understanding Authentication. In this link Salesforce OAuth flow is provided.
Alternatively Salesforce has its own SDK SalesforceMobileSDK-iOS. This will do all authentication process for you. In link read its introduction and some useful documentation has been provided explaining the methods to use the SDK.
When you successfully complete the authentication process, in return salesforce provide session id (access token), its instance URL and other useful information by which you can do further operations.
Answer: Thanks to regal for helping out!
The way to do this is as follows:
First, login using a SFOAuthCoordinator. The keychain identifier just needs to be a unique identifier for your app.

// Set up the authorization credentials
NSString *appName = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleNameKey];
NSString *fullKeychainIdentifier = [NSString stringWithFormat:@"%@-%@",appName,kUserAccountIdentifier];

SFOAuthCredentials *credentials = [[SFOAuthCredentials alloc] initWithIdentifier:fullKeychainIdentifier
                                                                        clientId:RemoteAccessConsumerKey
                                                                       encrypted:NO];
[credentials setRedirectUri:OAuthRedirectURI];

// Set up the authorization coordinator
sfoCoordinator = [[SFOAuthCoordinator alloc] initWithCredentials:credentials];
[sfoCoordinator setScopes:[NSSet setWithObjects:@"api",nil]];
[sfoCoordinator setDelegate:self];

// Set up the account manager

[SFAccountManager setClientId:RemoteAccessConsumerKey];
[SFAccountManager setRedirectUri:OAuthRedirectURI];
[SFAccountManager setCurrentAccountIdentifier:kUserAccountIdentifier];

[sfoCoordinator authenticate];

Then, implement the following three protocol methods to handle the login:

-(void) oauthCoordinator:(SFOAuthCoordinator *)coordinator didBeginAuthenticationWithView:(UIWebView *)view {
}

-(void)oauthCoordinator:(SFOAuthCoordinator *)coordinator didFailWithError:(NSError *)error authInfo:(SFOAuthInfo *)info {
}

- (void)oauthCoordinatorDidAuthenticate:(SFOAuthCoordinator *)coordinator {
    // Set the access tokens
    sfAccessToken = coordinator.credentials.accessToken; // This is the token you pass with your HTTP request
    baseURL = coordinator.credentials.instanceUrl; // This is the domain you'll send your call to

}

Assuming you've already retrieved the path of the attachment from your SOQL call, you can now construct a request using the data that you stored in the DidAuthenticate method above. I used AFNetworking just cause it's awesome.

// Set up shared http client
[[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
sharedClient = [[AFHTTPClient alloc] initWithBaseURL:baseURL]; // baseURL populated from credentials.instanceURL

// Construct the request (note that the method is GET)
NSMutableURLRequest *request = [sharedClient requestWithMethod:@"GET" path:path parameters:nil];

// Add the authorization header. Prepend "Bearer " to the access token you got in the
// DidAuthenticate method.
NSString *authHeader = [NSString stringWithFormat:@"Bearer %@",sfAccessToken];
[request addValue:authHeader forHTTPHeaderField:@"Authorization"];

// Build the operation
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];

// Set the completion and failure blocks
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
    // Do something with the responseObject
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    // Process your error here
}];

// Begin the operation
[operation start];

And voila! Attachment data received.
Answer: Swift
Those working with the 7.0+ SDK, token and endpoint details can be accessed like so:
AuthHelper.loginIfRequired {
  //oAuth Token
  UserAccountManager.shared.currentUserAccount?.credentials.credential
  //API Base URL
  UserAccountManager.shared.currentUserAccount?.credentials.instanceUrl
}


Show pdf with qtwebkit

Question: I have a project in which we use custom built software, that is not developed by us.
The application is developed in qt 4.7.0 and is running on Ubuntu 10.04 LTS.
It uses html pages to provide the "online help" to the user. My task is to write the initial help content. The pages are rendered using qtwebkit.
Our customer would also like to display pdf-documents. When I asked the developers, I was told to convert the pdfs to html and add the converted files to the online help.
This would cause quite a bit of additional work and results in html-output that won't look exactly like the pdf-files... and it would prevent the simple addition of new pdf-files by the customer.
So I ask the community here: is there a way to display pdf-files with qtwebkit? Are there any plugins?
Cheers,
10.6um
Answer: No idea if there is an existing plugin. But I think you could implement a PDF viewer plugin by yourself with the help of poppler. Poppler is portable to Windows/Linux/Mac.

Reimplement QWebPluginFactory and intercept request with PDF mime type.
Download the PDF content, and use poppler to render PDF data to QPixmap.
Set the QPixmap as the content of QWebPage.

Show pdf with qtwebkit


Pressure tank with no Schrader valve

Question: How do I pressurize an old tank with no air valve m
Answer: Drain it, then turn on the pump.
Old tanks had no bladder, so the air and water are not separated. As a result, there's no pre-pressurization, and the size of tank needed for the same effect is considerably larger. A properly set up and maintained system also has a (prone to fail) widget that adds air to the water coming from the well, since the air in the tank will dissolve into the water in the tank over time and make the system "waterlogged" causing short-cyling of the pump - requiring draining the tank again. If the widget is working right that's less prone to happen, since more air is added each time water is pumped.
Lived through it growing up, purchased a bladder type tank without batting an eyelash when the time came to set up my own well. But if you are not yet at the stage of fixing/upgrading the system, simply draining the tank before you start pumping water is what you do.
Comment: Will this help the shut off valve trip the contacts? I just replace a shut off valve and had to drain the tank since it was the first valve.
Answer: The type of well water storage tank you have is usually determined by the type of well pump you have.
Comment: 6K+ rep, and you should know this isn't an answer to the question.
Comment: So, because I put my statement in the wrong place, an answer instead of a comment, I get corrected. OK, I will be more astute the next time.

Pressure tank with no Schrader valve


What is G-Force?

Question: Can you explain me what is the G-Force? I always thought it was the force caused by the gravitational acceleration.. But I just saw on myth busters that they calculated the g-force on a belt during a car crash by using accelerometers... and I just got confused and curious as well.
Comment: As mentioned, it's just multiples of the gravitational force at Earth's surface. Lie on your back and feel the pressure due to your weight. Now, accelerate in a car at 2 g. You will feel as if you weigh twice as much.
Comment: When someone feel a G-force of $x$ it means it is subjected to an acceleration which is $x$ times the acceleration of gravity near the surface of the Earth, that is, $x\times 9.8\, m/s^2$.
Comment: It is, but it can apply in any direction, even upside down,  in aircraft say. It's just a different unit of acceleration, for comparision purposes.
Comment: I've removed a comment discussion which was not constructive.
Answer: A G-force is nothing more than a regular force but instead of expressing it in "normal" units (e.g., kg$~$m/s$^2$ or pounds), the magnitude of the force is expressed as a multiple of the force due to gravity on the specific object.  So, if something is accelerating at 9.8 m/s$^2$, one would say it is accelerating at 1 G.
One advantage of expressing forces as G-forces is that it is more technically an expression of acceleration than of force, allowing for more direct comparisons between objects of different masses.  Let me explain.  In the example you use, forces from seatbelts on bodies, if a young child and I (an adult) were riding in a car and got in a crash then our seatbelts would be exerting very different forces on us (since I have a larger mass, the seatbelt will be exerting a larger force on me to keep me from flying out of the car) but would likely be exerting the same acceleration on us, assuming the seatbelts keep both of us in our seats.  Thus, expressing the forces in terms of G-forces, in this situation both of our seatbelts would be exerting the same G-force, even if exerting different forces.
Another useful example is a roller coast.  Going through a loop, the roller coaster exerts different forces on each rider depending on the rider's mass, but exerts the same acceleration (and thus G-force) on everybody.  G-forces thus allow for a mass-independent comparison between different situations and their ability to generate forces.  A 10-G turn in a jet aircraft will exert more force than a 5-G loop on a roller coaster.
Answer: G-force is acceleration minus the local gravitational field or $a-g$. Examples:
Standing on the ground
$a$=0, $g$=10 m/s $^2$ downwards, g-force = 10 m/s$^2 $ upwards = 1 g.
Accelerating upwards in a rocket
$a$=30 m/s$^2$ upwards, $g$=10 m/s $^2$ downwards, g-force = 40 m/s$^2 $ upwards = 4 g.
Free-fall on the Earth
$a$=10 m/s$^2$ downwards, $g$=10 m/s $^2$ downwards, g-force = 0.
Free-fall on the Moon
$a$=1.6 m/s$^2$ downwards, $ g_{moon}$=1.6 m/s $^2$ downwards, g-force = 0.
Answer: G-Force technically isn't a force at all, it is a specific acceleration. Typically defined as the acceleration due to gravity a body experiences on the surface of the Earth (9.8 meters per second per second.) The force experienced from acceleration can be calculated from force=mass*accel.
Usage of G-Force doesn't have to involve gravity, which is just used as a reference. Such as the Tesla plaid has a horizontal 'g-force' of 1.15 from 0 to 60mph, or 1.15*9.8 = 11.27 $ms^{-2}$, which is an acceleration perpendicular to gravity.

What is G-Force?


Printing shem hashem

Question: My siddur does not have the laining for rosh chodesh so I want to print a copy of it. Is there anything wrong with intentionally printing it without removing shem hashem?
Comment: When you say "print a copy of it", do you mean "photocopy it"? Also, are you asking only as regards the name-of-_Hashem_ issue (disregarding, e.g.. copyright issues)?
Comment: As [@msh210 answered](http://judaism.stackexchange.com/a/14914/5), I think you're fine printing it. The question is, [what to do with it when you're done with it](http://judaism.stackexchange.com/q/159/5)?
Comment: @msh210. I mean taking the text from mechon mamre or bar ilan and printing it, not photocopying
Comment: Or is the issue one of copyright?
Comment: Does anyone else find it somewhat ironic that the text of the torah can be copyrighted (even if the copyright is technically on the formatting)?
Comment: @AriA http://judaism.stackexchange.com/q/10877/759
Comment: related: http://judaism.stackexchange.com/questions/56866/explicit-shaimos-printed-in-prayer-books?noredirect=1#comment176157_56866
Comment: [similar](/q/101405/170)
Answer: People publish sidurim with Hashem's name all the time. That's what you're doing, albeit by photocopy (or laser printing) rather than by offset. So you're in the clear. (This answer doesn't, however, touch on copyright concerns.) As always, though, for practical halacha, consult your rabbi rather than relying on what you read on this site.
Comment: The gemara in Shabbos 115b cites a Tosefta seemingly condemning those who publish prayer-books (and amulets) with G-d's name: "...מכאן אמרו כותבי ברכות כשורפי תורה".

Printing shem hashem


Gamepad for Assassin's Creed for PC not working

Question: I have a Logitech wireless gamepad which is not recognized by AC. Any ideas?
Comment: Is your gamepad recognized by any other games/tools or is this problem exclusive to Assassin's Creed?
Answer: Most new PC games only have built in support for the XBox 360 controller. You can use your Logitech controller by having it emulate an XBox controller.
Please refer this post. Basically you have to copy two files in to the game directory (the one where the .exe file is) and when you start the game, you should have all the controller options enabled. I've tested this method on several games with a Logitech Rumble Pad 2 (wired) and it works perfectly.
Download link (might be broken but you should be able to find it by searching for "XBox360 Emulation v3.0")
Answer: For people who have the F310/510/710 gamepads Assassins Creed and most new games will work by default if you switch the button at the back of the gamepads to "X-input". The gamepads will support vibration also.
For people who have Rumblepad 1/2 and Dual Action gamepads most games will not work by default because these gamepads only have "D-input". In that case you will need to set up "profiles" for each game using the Logitech Profiler software. It does take time to set up profiles though, especially if you are new. I make profiles for Logitech gamepads and upload them on the internet so people can just download them and play games instead of going through the hassle of setting up profiles themselves.
Go here to download the profiles I have made so far.
For latest games I have profiles for NFS Most Wanted 2012, Assassins Creed 3 and Borderlands 2.
Comment: Hi @Mohammad, and Welcome to Arqade! This is a good answer, but in the future, please don't obfiscate links by using a link shortener service.
Comment: @MBraedley Sure. I actually started doing that so that years later when I change the host of my files I can still keep the download links working without having to go back to every answer I gave and edit them.
Answer: Make sure that:

You have the latest drivers for your gamepad
When control sticks are in neutral position, you've configured the gamepad in Control Panel > Gaming Devices

If you can't get it working just for Assassin's Creed, then you should look into using a tool like Joy2Key to map your keyboard controls to your gamepad to get around the fact that it's not recognized by Assassin's Creed.
Answer: Which gaming controller do you have? I have the F150 and I just use the profiler that it came with. If that doesn't work, I would recommend using Xpadder.
Answer: Make sure the gamepad is turned on before you start AC and that no other controllers are connected.
In any case Xpadder should work no matter what.


How to become immortal in Western world in compare to Chinese legends and western mythology?

Question: I saw some Chinese series where were immortal people. Question is if someone knows the path how to be immortal in nowadays. Because the 1000 years Kingdom is closer and closer and it seems there is a possibility to reach immortality in nowadays too. From my point of view what I've got it is not a "real" immortality, not eternal, just for couple of 100s years, "only" maybe to 500 or 1000. Of course I understand it is related to 3 Nadis (Ida, Pingala, Sushumna) and there are some Chinese legends about it but I did not imagine it would be possible in Western world until not happened that I've got 3... Sorry, I cannot write it down publicly but maybe someone has similar or better information and understanding of this. I could not imagine sooner it would be possible before 1000 years Kingdom...
Comment: Do you mean to ask how to actually obtain immortality, or are you looking, as Mary gracious assumed, about mythological ideas?
Answer: In Greco-Roman mythos, the way to become immortal was to eat ambrosia, the food of the gods.  Alas, the only real way for humans to obtain it was to undergo apotheosis and become a god.
In Norse mythos, the way is to eat the apples of Idun.  This appears not to be feasible for humans.
In Christian times, the chief belief was in alchemy.  The Philosopher's Stone could be used to make an elixir of immortality, as well as turn ordinary metals into gold (which does not tarnish, rust, or corrode, and so is immortal).


TIN to Raster - specify raster's origin

Question: How could I specify raster's origin, while using arcpy.TinRaster_3d?
Comment: Welcome to GIS SE! Could you please edit your question to include as much relevant information as possible (eg. explain what you already tried, what problems you experienced etc)
Comment: [Arc's help](http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00q900000077000000) says "you can specify the output raster's origin, extent, and resolution or cell spacing to create a raster covering only a portion of the TIN" but fails to say _how_ to specify any of those besides resolution.
Answer: You can define the origin as the Xmin, Ymin (or Left & Bottom) of the extent environment setting. Click the Environment button at the bottom of the tool's interface, click Processing Extent and fill in the extent properties. You have to indicate Xmax & Ymax (Right, Top) as well:
Answer: If you are trying to match an existing raster in ArcPy you set the extent to that raster and it's also a good idea to set the snapRaster as well:
<code>import arcpy

InRaster = "c:\\some\\path\\to\\raster.tif"

DescObj = arcpy.Describe(InRaster)
arcpy.env.extent = DescObj.extent # match the extent of the input raster
arcpy.env.snapRaster = InRaster   # match the edges of the raster
</code>
Note that this method of setting the extent works with any feature or raster data but the value of the snap raster must be a raster.
Extents of data can include a healthy buffer around the data so setting the output extent alone is good but specifying a snap raster is better!
The snapRaster ensures that the cells of the raster align at the origin; if the cell size is the same then the rasters will perfectly overlay. When using snapRaster you will get the most use if the raster to be produced is either the same, a factor of or a multiple of the snap rasters' cell size.

TIN to Raster - specify raster's origin


What do I do when the enemy has an AC higher than 20?

Question: I'm very new to this game and am wondering, If the enemy has say 30 AC with all his equipment and buffs, what would I have to roll to hit him since I have to roll a 20 sided die to determine if I hit or not? Since 20 sided dices obviously don't go to 30 I'm curious as to how this work.
Comment: rrrrRUUUuuuuun!
Answer: Attack bonuses are your friend.
Based on how you're attacking your target, various bonuses will be added to the roll.
If a spell, your spellcasting modifier and your proficiency bonus (PHB p.205). If a weapon, either your strength or dexterity modifier (based on the weapon and, possibly, your choice) and your proficiency bonus if you're proficient with that weapon (PHB p.194).
Then there are various circumstantial bonuses that might apply: bardic inspiration from your friend, the effects of a bless spell, the enchantment-based +2 of a magic weapon, a fighting style, &c.
30 is hard to hit, no bones about it. But a bless (2.5 avg bonus) and a 5th-level bardic inspiration (4.5 avg bonus) and a +1 weapon and your level 5 proficiency bonus of +3 and an ability modifier of +4 gives you a +15 attack bonus; you'll hit 30% of the time. Not great, and it takes some resources to get there, but it took the target some resources to get to 30, too.
So are critical hits.
Remember that a 20 on an attack roll always hits, regardless of AC. That may seem a stretch, but advantage and luck dice can significantly improve those chances. From 5% to ~10%.)
Comment: A bit of cheese with Luck Dice can be had as well if you're going by RAW. If you give yourself disadvantage (by say, going prone) you can use a Luck point to roll an additional die and then choose among **all three**, giving yourself a 15% chance to crit. This is broken and any DM in his or her right mind will have nerfed this part of Luck.
Comment: @RobRose RAW is RAW - the Luck + prone strategy ought to be called the "Hey Baby Crit me one more time!" And this is how a legion of Flumphs killed the Tarrasque in 5e!
Answer: Another option is do not hit them
There are spells within DnD 5E that do not require you to make a hit roll. Any examples I can think of instead require the target to make a saving throw.
The DC to resist one of your spells equals 8 + your spellcasting ability modifier + your proficiency bonus + any special modifiers.
Ice Storm

A hail of rock-hard ice pounds to the ground in a 20-foot-radius, 40-foot-high cylinder centered on a point within range. Each creature in the cylinder must make a Dexterity saving throw. A creature takes 2d8 bludgeoning damage and 4d6 cold damage on a failed save, or half as much damage on a successful one. Hailstones turn the storm's area of effect into difficult terrain until the end of your next turn.
At Higher Levels. When you cast this spell using a spell slot of 5th level or higher, the bludgeoning damage increases by 1d8 for each slot level above 4th.

Thus, you no longer need to overcome a high AC.
Note that it's quite likely that any creature that has 30AC is likely to also have decent bonuses to saving throws. Sometimes they will have a particular type to which they are susceptible.
For example, an Ancient Red Dragon has a natural 22AC, and a +7 to dexterity saving throws. So you overcoming it's natural AC might be difficult, but it failing a save (or in the example above, taking half damage even if it makes its save) is quite plausible.
Comment: There's also the option to use attacks that don't need to hit AC, nor require a save.  For example, drowning the Tarrasque in a pit it can't climb out of, or removing all the breathable air from an area.
Comment: There's always Magic Missile, though it might take quite a few castings...
Comment: @thedarkwanderer Obligatory link to [Seven Ways to Kill the Tarrasque at Level 13 or Less](https://www.cs.cmu.edu/~dkb1/dnd/tarrasque.txt). It's for 3.5e I think though.
Comment: @RobRose Actually it's 3e, except most of the information isn't quite right.  It's the right idea, though.
Answer: ACs don't get that high.
In the DMG (pg. 274), there's a big table that lists offensive and defensive stats by CR. In that table, the listed AC for a CR 30 monster is only 19.
The Tarrasque, the highest CR monster in the game, has an AC of only 25. The runners up, the Ancient Gold and Red Dragons, have ACs of 22. Hence, it's very unlikely that you'll run up against an AC of 30, even at high levels.
Bonuses get you there
As you level up, you'll accumulate abilities that will give you a bonus to your attack rolls, such as higher ability scores and proficiency, as well as things like Bardic Inspiration or magic items. All of these things add flat values to your dice roll, and thus make hitting ACs over 20 feasible.
For example, 1st level fighter, with a strength of 16 (+3) and a proficiency bonus of +2, has a +5 to hit. If she rolls a 17 on the die, she adds 5 to it, making a total attack roll value of 22. That means that she only needs to roll a 17 or higher to hit an Ancient Red Dragon, so she has a 20% chance to hit without any other bonuses. Of course, dealing enough damage to be more than an annoyance is another story.
Comment: Being an annoyance to an Ancient Dragon tends to be a very brief experience. Potentially *exciting*, but brief...
Comment: @Shadur: "Do not meddle in the affairs of dragons, for you are crunchy and taste good with ketchup."


Sample code for public key encryption/decryption on Mac?

Question: Where can I find some simple sample code for public key encryption and decryption on Mac OS X?  I'm frustrated that Apple's "Certificate, Key, and Trust Services Programming Guide" shows how to do this stuff on iOS, but the needed APIs (SecKeyEncrypt, SecKeyDecrypt) are apparently not available on Mac OS X.  There's probably a way to do it in "CryptoSample", but it doesn't look clear or simple, and the sample project is too old to open with the current version of Xcode.
Answer: The Security Framework APIs change rather frequently between Mac OS releases. The best approach depends on what version you target:

If your code only needs to run on 10.7 and above, you can use Security Transforms, a new high-level public API for cryptography transformations. The Security Transforms Programming Guide has useful (and simple!) example code:

https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecTransformPG/SecurityTransformsBasics/SecurityTransformsBasics.html
You'll want to create a transform using SecEncryptTransformCreate or SecDecryptTransformCreate, set its input using SecTransformSetAttribute and execute it with SecTransformExecute.

If you need to support Mac OS 10.6 or below, you must use the low-level and rather scary CDSA APIs. CryptoSample's cdsaEncrypt is a concise example.

https://developer.apple.com/library/archive/samplecode/CryptoSample/Listings/libCdsaCrypt_libCdsaCrypt_cpp.html
You can get a CSSM_CSP_HANDLE and a CSSM_KEY from a SecKeyRef by using SecKeyGetCSPHandle and SecKeyGetCSSMKey, respectively.
To learn more about CDSA, the full specification is available from the Open Group (free, but requires registration):
https://www2.opengroup.org/ogsys/jsp/publications/PublicationDetails.jsp?publicationid=11287
Good luck!

If the private key was created exportable, you can export it in an unprotected format and use openssl directly. This puts the raw key data directly in the address space of your application, so it defeats one of the primary purposes of the Keychain. Don't do this.

Finally, you can mess around with private functions. Mac OS 10.6 and 10.7 include, but do not publicly declare, SecKeyEncrypt and SecKeyDecrypt, with the same arguments as on iOS. The quick'n'dirty solution is to simply declare and use them (weakly linked, with the usual caveats). This is probably a bad idea to do in code that you plan to distribute to others.
Comment: According to the documentation, Security Transforms can't take an RSA key, and OpenSSL is deprecated for use in third-party apps.  So only #2 and #4 are realistic.  I can't *imagine* why Apple hasn't made SecKeyEncrypt and SecKeyDecrypt public API in OS X.  They can't realistically avoid supporting them (forever and ever) without breaking the iOS simulator, and the iOS SDK lists them as being available in OS X.  Somebody probably put a #if in the wrong place and it got stripped incorrectly from the headers.  Please file a bug.
Answer: There's an implementation of decrypting data using the Public-Key at: https://github.com/karstenBriksoft/CSSMPublicKeyDecrypt.
The Security.framework does not have a public API for that kind of functionality, which is why CSSM needs to be use directly even though its marked as deprecated.
To encrypt with the public key, simply use the SecEncryptTransformCreate, but for public-key decryption you need to use the CSSMPublicKeyDecrypt class.
Comment: It can go both ways. Encrypting with private-key and decrypting with the public-key is like digital signing (see http://en.wikipedia.org/wiki/Public-key_cryptography#Inverse_Public_Key_Encryption).
Comment: Aren't you supposed to use the private key to decrypt?
Answer: Mac OS X contains OpenSSL in libcrypto. The CommonCrypto framework seems to be derived from SSLeay, the precursor of OpenSSL.
Comment: I don't doubt that Mac OS X has APIs that can do it, but the question was about "simple sample code".
Comment: Apple *strongly* discourages the use of openssl on Mac. The argument on Apple's part is the not so stable API of openssl. Using Security.framework is the recommended API on Mac OS X.


Subring criteria

Question: To check whether the set $S$ is a subring of the Ring $R$, you check for closure under addition and multiplication but do you check for an additive or multiplicative inverse. In my book, for subrings of Rings like $\mathbb{R}$ it checks for multiplicative inverse but to check for example if $\mathbb{Z[i]}$ is a subring of $\mathbb{C}$ it checks for the additive inverse.
Answer: Yes, one must check the existence of an additive inverse. Of course, since we are working with a subset $S$ of a ring $R$, all we need to check is whether or not $s\in S\implies-s\in S$. On the other hand, there is no need to check the existence of multiplicatives inverses, since their existence is not required.
Answer: A Subset $S$ of ring $R$ is said to a subring of $R$ if the following conditions hold:
(i) $S$ is closed under the subtraction.
(ii) $S$ is closed Under Multiplication.
Note:

Requirement of the presence of Identity depends on your requirement
  based what theorem or statement you want to prove.

Subring criteria


Why was Blofeld in a wheelchair in the beginning of For Your Eyes Only?

Question: In the pre title sequence of For Your Eyes Only Blofeld is in a wheelchair. Why?
Comment: There was in interesting answer to this in the recent BBC programming around the "Spectre" film. As stated by DVK, EON couldn't mention Blofeld by name due to the Kevin McClory lawsuit. However the character was made to resemble him and was killed by Bond to send the message that EON had little interest in the character (so little they happily killed him off), McClory had felt Blofeld was his Ace in hand in any negotiation and EON would settle to recover him.
Answer: First of all, this is technically speaking an unnamed villain, NOT Blofeld (despite resembling him). To quote Wikipedia:

John Hollis as the "bald villain in wheelchair",[12] voiced by Robert Rietti.[13] The character appears in the pre-credits sequence and is both unnamed and uncredited. The character contains a number of characteristics of Ernst Stavro Blofeld,[12] but could not be identified as such because of the legal reasons surrounding the Thunderball controversy with Kevin McClory claiming sole rights to the Blofeld character, a claim disputed by Eon

The reason the character is in the wheelchair is that in the last Bond movie where he was a character (Diamonds are Forever) Bond crashed a mini-sub that Blofeld was using to escape into a control center, blowing up the platform and presumably injuring Blofeld.
Answer: You would have thought he was in the wheelchair because of what happend in O.H.M.S.S .
here is the scene Bobsled chase neck injury blofelds neck gets caught in a branch severley injuring him . but he seems fine in diamonds are forever untill the end described in the answer above
Comment: In the end of OHMSS, Blofeld is **driving a car** in a neck brace, when the woman shoots Bond's wife. Hardly likely for a man in a wheelchair


Make rsync working with compressed target or tar creating no increment files

Question: I need to make a backup on my external hard drive. I looked both at rsync and incremental tar. The problem is that I want my backup to be compressed. With rsync I can only compress the data transfer, but not the result. With tar the result is indeed compressed, but I will have a lot of incremental archives, when I want to have just one compressed file.
So, I see 2 options: either I need rsync, that works with compressed target or tar, that creates just one file. Is it possible?
Answer: rsync doesn't have the capability to compress it's target.  One possibility is to store your backup copy on a filesystem that supports native transparent compression (for example btrfs) which will provide you with the space saving you are looking for.


How many types of Roti are there?

Question: I'm really interested in what the different types of rotis you may find in India. Is the roti basically at a base flat-bread made with wheat flour and then basically flavored with any other flour. Off course you would then get different spices added to it, but what exactly is the difference between the various types of Indian roti?
Comment: How do you define different types?  For example, are Naan and Onion Naan two different types, or the same type with flavorings?  Also, what are you including in "roti", which basically translates as "bread"?
Comment: +1 to @FuzzyChef - have you heard of [bhakri](https://en.wikipedia.org/wiki/Bhakri)? See also - https://en.wikipedia.org/wiki/Indian_bread
Answer: Roti & chapatti are the same thing with a different name.
Both are made with only wheat flour (atta) & water - though some prefer to add a little oil, that's not really a part of the base recipe. If you add oil to the dough after formation, whilst rolling then folding you get a paratha instead. Milk & oil or ghee is going more towards a puri.
You can cook them in one of two ways. Dry-heat on a tawa or regular frying pan, then flame them, or just keep on the tawa. Personally I prefer flamed, but that's not too easy at home. The chefs I used to watch used huge tongs, like two wire table-tennis bats on a scissor to hold them over quite a wild flame. My gas range produces a very tame controlled flame by comparison & I have never been able to find those tongs anywhere.
The only other real difference, which may be area or even just family tradition related, is their thickness & pliability. My favourites growing up were always the ones that went soft & highly pliable after a few moments cooling; definitely best for picking up your food - we used to jokingly call them 'wash-leathers' but that was the type we liked & would return to establishments that could make them that way, rather then the dryer ones with a slight 'crisp' to them. Where I grew up most of the chefs were Bangladeshi, but I don't actually know if that variant is truly geographical.
I've moved away from that predominantly Bangladeshi-staffed area since my youth in Bradford & no-one around here (London) makes them that way, they're much more layered & dryer. Nowhere near as good imho.
Presumably, in the same way a plethora of various flavours, fillings & toppings have been added to the humble naan in the 40 years or so they're been widely available outside the sub-continent, you could add any other ingredient you like - but then it's not truly a roti any more.
Comment: The tongs sound a bit like an [Aga toaster](https://www.agacookshop.co.uk/aga-toaster.html), though those are hinged at the far end from the handle.
Comment: Yes, I was thinking more of a substitute.
Comment: @ChrisH - similar size, but these were either a scissor or squeeze action from the handle end & actually fewer bars than the toaster mesh. I haven't seen one in years now, but a lot of the places we used to eat had open kitchens, so you could see them being made.
Comment: Indeed. These days, of course, if I'm not cooking it myself, it's gonna be a delivery - never see the restaurant any more, let alone the kitchens ;)
Comment: I'm more likely to make naan (on a slab of granite I use for a pizza stone) but one reason I got my wide le Creuset was making chapattis.
Comment: This is making me hungry;) Jonezin' for a curry… haven't had one since… oooohhh… Tuesday ;)
Comment: Tetsujin: depending on what cultural group you're in, paratha, naan, bhaturas, and other Indian breads are all "roti", not just chapathis.

How many types of Roti are there?


How do I get the submitter of a webform submission?

Question: I'm developing my first webform handler and I need to access the submitter of the webform submission in the postSave method.
I know I can get the webform submission ID with $webform_submission->id(), but I can't figure out how to get the submitter. As far as I know, $webform_submission->getWebform()->getOwner() is NOT what I'm looking for, because it tells me the owner of the form, not the "owner" of the submission. I found How do I find out which what fields are available? but it's not as detailed as I need.
The reason why I need to know the submitter is the following:

I want to develop some kind of "wallet" for my website. For that purpose, I have installed the "profiles" module and I have created a "wallet" profile type with a single field: "Balance". So every user will have a "balance".

I have also created a webform called "New transaction" where users will submit deposits and/or withdrawals. This webform has, among other fields, a field "status" and a field "amount".

When a user submits a "new transaction", the webform submission gets stored with a status "VERIFYING" and an email handler sends an email to the administrator of the website (no WebformHandler is involved here).

The administrator receives the email and reviews the deposit/withdrawal. If it is OK, the administrator updates the status of the submission to "ACCEPTED". It is in that moment (when the administrator updates the submission) when the WebformHandler does its magic. It adds/substracts the amount to the balance of the wallet profile that belongs to the user that made the submission. This is why I need to know the user that created the webform submission. I need to do the following to retrieve the wallet profile of the user:
$wallet_profiles = \Drupal::entityTypeManager()->getStorage("profile")
  ->loadByProperties(['uid' => $user->id(),
    'type' => 'wallet_profile',
    'is_default' => 1,
  ]);

If anyone knows of a more elegant way to achieve this "wallet" concept, please let me know.
Answer: OK. I think I can answer myself: $webform_submission->getOwnerId() is what I need.


Non-inverting amplifier isn't amplifying my signal

Question: I am using a non inverting amplifier (shown below). For the opamp, I am using TL084, and I am using 12V single supply. I am getting an output of 11.20Vdc even though the input is 1.06V sine wave. I don't know what the issue is; any help.
Comment: hey, I understand that I need to bias. Does that mean that I need to bias on the input of the non-inverting amplifier or bias the gnd of the  negatvie pin input?
Answer: What is the input DC offset? The TL084 requires the signal to be V- +4 to V+ -4. So in your case, between 4 and 8 volts with a 12V supply. If your signal isn't in that range the TL084 won't follow it.
If you need JFET input with close-to-the rails capability and want single supply, the AD822 or similar would be better. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/AD822.pdf
If you're looking for general, not-fussy amplification for
single supply, the LM324 or its later improved cousins could work.
Comment: The Input DC offset is set to zero. The TL084 takes in wide range of voltage supply including single supply of 4.5V to 40V. I chose TL084 because it has high slew rate, low THD but I don't need to use a JFET opamp. From reading your post, what I understand is that I need to add a DC offset to the input signal.
Comment: Would a general opamp such as LM324 need a DC offset with a single supply?
Comment: Yes, any op-amp will.
Answer: For a 12V single supply the DC operational point should be app. at Vout=6V.
In this case, the output can swing relatively symmetric around this point.
Hence, it is necessary to bias the device properly with +3V at the non-inv. input (due to the DC gain of 2).
Comment: Before you can amplify a sinusoidal signal you must give the amplifier (this applies to AA kinds of amplifiers) a suitable DC operational point in the midddle between the max and the min. output voltage: In your case in the middle between 0 and 12V. For this purpose a DC voltage of 3volts is applied to the non-inv. input which will be amplified with (1+R2/R1)=2. Hence, the DC output now is at +6V. Around this value the output can swing - thus representing the amplified input signal which, however, must be coupled via a capacitor.
Comment: I don't understand. Can u please give me slight more explanation.
Comment: Coupled via a capacitor on the output of the opamp? I guess how do I decide on what type of opamp to buy for something like my situation where I just want to amplify but don't want to add DC offset?
Comment: I repeat: The INPUT signal has to be coupled using a capacitor (because the input node carries a DC voltage 0f 3 volts).


Will migrating an SSD drive to APFS prolong its life?

Question: For Apple hardware that ships with SSD only storage, will switching the file system from HFS+ to APFS prolong the life of an SSD drive?
Answer:
Will switching the file system from HFS+ to APFS prolong the life of
  an SSD drive?

No.  APFS was optimized for flash (NAND) SSDs.  In other words, it was designed to fully utilize the capabilities of an SSD to provide better performance.  It wasn't implemented to prolong the life of an SSD.
In most respects, the life will be shortened. Why?  Increased write operations for

Encryption
Snapshots
Metadata

None of that matters however, because based on the calculated life expectancy of an SSD, you will run out of capacity, long before it dies from usage.  In other words, it's a moot point.

What other advantages/disadvantages it might bring?

This is entirely opinionated question.  However, one thing to keep in mind is the initial premise of the answer - APFS was designed for SSDs. Meaning it wasn't designed for traditional spinning hard disks.  Quite frankly, I've never upgraded a file system and thought "gee...this new feature is a disadvantage."
So, a better way to look at this is the advantages/disadvantages of running APFS on spinning disks versus SSDs.
For example, APFS on an SSD has encryption at it's core rather than another layer on top of the file system so, it's faster and more secure (advantage).  On a spinning drive, this results in more read/writes on the physical media meaning slower performance, higher overhead, and shorter lifespan (disadvantage).
For an indepth look from a ZFS developers perspective, see this article
Comment: I've edited this to avoid a general APFS discussion. Let's spin off a second question if you want to delve into another area of APFS
Comment: So, a potential side effect could be better performance? Apart from encryption, snapshots and metadata are there other use cases where better performance can be expected? I.e. copying/moving files? Better read/writes for small or big files?
Comment: That was the goal - better performance.  Copy on Write means more data integrity.  In 2014 (when APFS was conceived) we were very much aware of the exponential growth of both storage and file size so large file handling should (and was baked in).  Handling small files is not an issue.  When I say performance, it's performance of your app.  Apple only cares about your experience using their products


cant select any object in blender (not even in a new file)

Question: I don't remember everything I did, but I do remember trying to delete my lamp and I couldn't select it. I tried moving an object around on the map but I couldn't even select it. the A key still select everything. I can still move things around when an object is already selected. so what I did is I gave up on that project and created a new one. I deleted the cube and added a plane. I went to edit mode and tried deleting the vertices. I couldn't even select it. does anyone know what I did or whats going on? I'm using Vr. 2.78.
Comment: This question is not clear. If you could delete the Cube then you could select it. If you could go into Edit Mode with the Plane then you could select it.
Comment: Possibly related : https://blender.stackexchange.com/a/101969/29586
Comment: when you start a new project the cube is already selected for you.
Answer: sounds like a strange keybind or something.  Maybe restore to defaults and try again w/ a new project?


If a copyrighted image is used multiple times, how many infringements are there?

Question: If I used a copyrighted image in 4 item listings on a selling platform (all using the same image), would this constitute 1 infringement, 4 infringements, or a number of infringements equal to the number of items sold?
Answer: In criminal law we might talk in terms of a number of "counts" of an offence. E.g. "the defendant is charged with 4 counts of copyright infringement".
However you've asked about civil law copyright infringement, so that isn't relevant. If you are sued, the claimant is not seeking to convict you of X number of offences. Instead, they are probably seeking some combination of the following:

A mandatory injunction to compel you to remove the copyrighted material.
A prohibitory injunction to prevent you from using the material again.
Damages to compensate them for your past use of the material.

So, it is not useful to think about how many "infringements" there were as such. What matters is the extent and circumstances of the infringement insofar as it is relevant for determining how much damages should be awarded. For example, in england-and-wales, section 97(2) of the Copyright, Designs and Patents Act 1988 provides:

The court may in an action for infringement of copyright having regard
to all the circumstances, and in particular to—
(a) the flagrancy of the infringement, and
(b) any benefit accruing to the defendant by reason of the
infringement,
award such additional damages as the justice of the case may require.

In the european-union, article 13(1) of the Enforcement Directive 2004/48/EC provides:

Member States shall ensure that the competent judicial authorities, on
application of the injured party, order the infringer who knowingly,
or with reasonable grounds to know, engaged in an infringing activity,
to pay the rightholder damages appropriate to the actual prejudice
suffered by him as a result of the infringement.
When the judicial authorities set the damages:
(a) they shall take into account all appropriate aspects, such as the
negative economic consequences, including lost profits, which the
injured party has suffered, any unfair profits made by the infringer
and, in appropriate cases, elements other than economic factors, such
as the moral prejudice caused to the rightholder by the infringement;
or
(b) as an alternative to (a), they may, in appropriate cases, set the
damages as a lump sum on the basis of elements such as at least the
amount of royalties or fees which would have been due if the infringer
had requested authorisation to use the intellectual property right in
question.
Comment: I'm afraid questions asking for legal advice are [off-topic on this site](https://law.stackexchange.com/help/on-topic). All we can do is explain what the law is; we can't tell what you should or shouldn't do in your specific circumstances. For that you may want to consider speaking to a lawyer.
Comment: In my case there were 13 items sold in totalling £270 (approx $380) and none in the State where lawsuit has come from and none in the USA despite them being advertised on a well known selling platform in the USA.

I am confused as they state in the action all points about 51 in total but most are inaccurate to some extent and some accurate - but because each of the COUNTS I am asked to answer refer to the (1-51) and about half are wrong or just statements I presume I DENY the COUNTS - not sure?   I have prepared an Answer but don't know if correct or who can check
Comment: I have reached out to the Plaintiff's lawyer but never had any response and meant to ensure this is filed with Court by 30th September.  If it did go to court can the Plaintiff's counsel show that we had other listings (not the one they are charging us with copyright for - but others that were on our ebay shop ? or is it inadmissible as it is not what is in the Civil Litigation ie nothing to do with their client's copyright work?  Thank you for any help in advance
Comment: ok do you know who I could speak to about checking the elements above as in checking my response Answer? does anyone do a checking service that you know?
Comment: If it is purely a procedural issue (e.g. "which form should I use?" or "in which box should I write such-and-such information?" or "on whom and how should I serve my response?") then you may be able to ask the court. But if it is anything specific to your case then really only a lawyer is likely to be suitably qualified to help you with that.


Are 2 time intervals the same only for same speeds?

Question: I'm only amateur in modern phsyics having read some about relativity theory and time measurements depending on relative movement. Is it true that 2 clocks measure time the same only if the relative speed between the 2 clokcs is 0? and if the 2 clocks move in opposite directions then they will not measure the same time? Similar to the paradox that if one twin spends all life on spaceships travelling near the speed of light, then the travelling twin will be younger than the twin not travelling at fast speed? I wonder if the conclusion is correct that 2 clocks will measure exactly the same time intervals if and only if they are at exactly the same speed and therefore the relative movement between the clocks must be 0?
Comment: Not an expert on relativity(so correct me if I'm wrong), but I guess it would be true. Both clocks must be at the same velocity at all times. This is because the clock which experiences acceleration/gravity would be experiencing time dilation. So if you have one clock moving away and coming back that clock would have to experience some acceleration and therefore the clock would not measure the same time.
Comment: Strictly speaking, the two clocks will only measure "the same time", if they are in the exact same location at all times and even that is only true for classical clocks. Quantum mechanical clocks will never show the exact same time.
Answer: You have to be careful about the difference between speed and velocity.  Saying that two clocks are moving at the same speed is different from saying that the relative speed between the two clocks is zero.  For example, as measured in some inertial frame of reference, two clocks can be moving at the same speed but in opposite directions, in which case their relative speed (the magnitude of their relative velocity) is not zero.
If the relative velocity between two identical clocks is zero, then the two clocks will measure time intervals the same.
It's also true that as measured in some "lab" inertial frame of reference, if two clocks are moving at the same speed, then they will measure time intervals the same as each other, even if the relative speed between the two clocks is not zero.  However, time intervals as measured by those two moving clocks will be different than time intervals as measured in the lab frame.  Also, just because the two clocks measure time intervals the same as each other as measured in the lab frame, that doesn't mean that it's true in general that the two clocks are measuring time intervals the same.  If two clocks have a non-zero relative speed, it's ambiguous as to whether the two clocks are measuring time intervals the same, or if not, which clock is running faster, unless you specify an inertial frame of reference in which the comparison is to be made.
The rule implied by time dilation is that in an inertial frame of reference in which one of two identical clocks is at rest, the other clock will be measured to be running slower than the clock that's at rest.  However, measurements made in an inertial frame of reference in which the other clock is at rest will come to the opposite conclusion as to which clock is running slow.


Homotopy groups of linearization of a space

Question: If $X$ is a pointed space and $A$ is an abelian group, then we can form the space $A[X]$ whose points are finite formal sums $\sum a_i x_i$ with $a_i \in A, x_i \in X$ subject to some natural relations involving $0,+,$ and the basepoint of $X$. We topologize this space as a quotient of $\bigsqcup A^n \times X^n$ where $A$ has discrete topology. Evidently this is true: $$\pi_n(A[X],0) \cong \tilde{H}_n(X;A)$$ if $X$ has the homotopy type of a CW-complex. Can anyone point me to a proof of this fact?
Comment: Related: http://mathoverflow.net/questions/182823/why-the-dold-thom-theorem
Answer: This result appears in M. C. McCord, Classifying Spaces and Infinite Symmetric Products published in Transactions of the American Mathematical Society, Vol. 146, (Dec., 1969), pp. 273-298.
Also, this can be generalized to other generalized homology theories: given any spectrum $E$ one can build out of it a partial monoid, $A$, for which a variant of the construction you describe produces, given a space $X$, a new space whose homotopy groups are the reduced $E$-homology of $X$. This is proved in Jacob Mostovoy's paper Partial monoids and Dold-Thom functors.


Exploratory Data Analysis with Image Datset

Question: In Machine Learning Kernels on Kaggle I often see EDAs with structured data. So, I was wondering, if there are any recommended/standard procedures for EDA with image datasets. What kind of statistical analyses do you conduct, what kind of plots do you draw and what aims do you have in mind?
Comment: An interesting video, how image data is plotted as images: https://www.youtube.com/watch?v=GIVK0-SNUgU Every point is a little image, that serves as a link to the original picture. When something interesting behavior is on one point, you can observe the image right away.
Answer: Have a look at The HASYv2 dataset. I tried to do as much of the exploratory work as possible to make sure that others can directly try more interesting thing with the dataset.
Image format specific stuff

(Minimum / Median / Mean / Maximum) (width / height / area)
Image formats
Timestamps
Exiff meta data

For this kind of stuff, you might want to have a look at edapy.
Image/ML specific stuff
Things you can do with images:

Compute the mean image

Mean image by class

Eigenfaces (or rather "Eigenimages")
Fisher-Faces

You can compute the correlation of pixels, e.g. Figure 3:

Classification-specific stuff

Plot the distribution of classes.
Behaviour of standard classification algorithms (CNNs, VGG-16)
Confusion Matrix Ordering (page 48 - 52, especially Figure 5.12 and 5.13): Find similar classes
Answer: Since we are talking about visual data, I would suggest to perform a clustering of images features extracted from a pre-trained neural network on similar images for e.g. if its camera images model trained on imagenet, if its CG (Computer Generated Images e.g. cartoons) a model trained on similar dataset, and perform a T-SNE visualization, and visually examine the clusters. That can be a way to perform EDA on a image dataset.
Example Image of T-SNE on Images Dataset: Link
Answer: There are so many ways to approach EDA for CV-based models, since there are so many dimensions to the problems CV models can solve. I like to break the first step down into two categories:
Annotation Metrics: What is the distribution of classes in your dataset? Which classes are overrepresented and which are underrepresented?  Do all instances of a class share the same location and orientation within the dataset, or are they varied? This kind of EDA most often looks like a histogram or pie chart of classes in a dataset (below is a pie chart showing the classes present in the Coco val 2017 dataset); this makes it really easy to see which classes are out of alignment with their occurrences in the field. Once you know the answer to this question you can collect more data or augment what you have.

Image Metrics: What kind of images are you training your model on? Are the conditions of those images (brightness, dimensions, resolution) the same as what you'll get in the field? EDA for more classical computer vision metrics can look like a scatter plot, bar chart, or really any visualization technique you would use for generic EDA, since image metrics boil down to numbers just like any other statistic. Image metrics are fairly standard, as computer vision has been around for much longer than fancy ML techniques. Below is an example of a scatter plot of pixel values for the blue channel in the Coco val 2017 dataset - it's clear to see where most images are clustered, and where the outliers are.

EDA for computer vision is just like EDA for any other domain - the hard part is understanding the metrics that are unique to image processing and annotations before diving into EDA. Once you have a good understanding of those two branches of analysis, it's easier to apply classical EDA techniques to large datasets of images and annotations. For a slightly more generalizable look at EDA for CV applications, check out this blog I wrote for work. EDA is so powerful because it can help generate actionable insights that will make your final solution more robust once it gets deployed.
Answer: Idea from Lev Manovich, shown on video shows how most effectively plotting picture data to chart is made by showing the images as the dots in the chart.
When something interesting behavior is on one point, you can observe the image right away.
There was an example about plotting time series data on x-y space and from the form of daily curve there was a anomality in one day. Directly zooming on the pictures on that revealed a fire taken place in the landscape. From average value black and white plots you would not get that kind of immediate observations.


ActiveAdmin doesn't upload image when using Paperclip

Question: I've followed all guides and answers, and everything displays correctly, but the actual upload doesn't happen :(
Here's in my ActiveAdmin:
form :html => { :enctype => "multipart/form-data" } do |f|
  f.inputs do
    f.input :name
    f.input :image, :multipart => true
  end
end

Here's in my model:
  has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :path => ":rails_root/app/assets/images/article_images/:id/:style_:basename.:extension"

I've tried without a path also, didn't work.
Here's my migration:
class AddAttachmentImageToArticle < ActiveRecord::Migration
  def self.up
    add_column :articles, :image_file_name, :string
    add_column :articles, :image_content_type, :string
    add_column :articles, :image_file_size, :integer
    add_column :articles, :image_updated_at, :datetime
  end

  def self.down
    remove_column :articles, :image_file_name
    remove_column :articles, :image_content_type
    remove_column :articles, :image_file_size
    remove_column :articles, :image_updated_at
  end
end

Answer: The problem was the damn attr_accessible not having :image
Answer: Just for complete your answer it's necessary do somethings to work.
Add the gems:
gem 'paperclip'
gem 'fog'

Add the configuration of config/application.rb
config.paperclip_defaults = {:storage => :fog,
                             :fog_credentials => {:provider => "Local",
                                                  :local_root => "#{Rails.root}/public"},
                             :fog_directory => "",
                             :fog_host => "http://localhost:3000"}

And to show the images at index just added this code:
index do
  column "Image" do |epc|
    link_to(image_tag(epc.imagem.url(:thumb), :height => '100'), admin_epc_path(epc))
  end
  default_actions
end


A technical question about the Lebesgue measure

Question: Let $U$ be an open set in $\mathbb{R}^2$. How to prove that the boundary of the CLOSURE of $U$ has Lebesgue measure 0 ? Thanks.
Answer: It appears that the statement in your question is not always true. See https://mathoverflow.net/questions/25993/sets-with-positive-lebesgue-measure-boundary for excellent answers. For related details, see also Regular open set whose boundary has nonzero volume. and https://mathoverflow.net/questions/24264/a-question-about-the-osgood-curve.
Comment: In fact, it's not hard to find examples where the measure of $U$ is arbitrarily small while the closure is the entire ${\bf R}^2$, just consider small balls around a countable dense subset.
Comment: @tomasz I agree; however, the boundary of $\mathbb{R}^2$ is the empty set and thus has measure zero. So, I don't think it's a counterexample to the OP's claim.
Comment: Thanks, I understand. Your links are helpful. I am preparing for my qualifying exam, and this problem is in the collection of past exams, so I didn't expect it to be wrong. Thank you very much for your help.


Rails 4 background image - Pure CSS

Question: I have created a simple application and I have this in my application.css file:
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require_tree .
 */
html {
    background-image: url(/assets/homepage_bg_1.jpg);
}

Now I am using webrick, and on development mode it works fine. Now the issue comes up in production mode, where the wallpaper does not show up.
I have ran:
rake assets:precompile
rails -s -e production

and the image will not show up.
I have tried background-image: url(/assets/images/homepage_bg_1.jpg); etc etc but nothing.
This is my production environment file:
Properties::Application.configure do
  # Settings specified here will take precedence over those in config/application.rb.

  # Code is not reloaded between requests.
  config.cache_classes = true

  # Eager load code on boot. This eager loads most of Rails and
  # your application in memory, allowing both thread web servers
  # and those relying on copy on write to perform better.
  # Rake tasks automatically ignore this option for performance.
  config.eager_load = true

  # Full error reports are disabled and caching is turned on.
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true

  # Enable Rack::Cache to put a simple HTTP cache in front of your application
  # Add `rack-cache` to your Gemfile before enabling this.
  # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
  # config.action_dispatch.rack_cache = true

  # Disable Rails's static asset server (Apache or nginx will already do this).
  config.serve_static_assets = false

  # Compress JavaScripts and CSS.
  config.assets.js_compressor = :uglifier
  # config.assets.css_compressor = :sass

  # Do not fallback to assets pipeline if a precompiled asset is missed.
  config.assets.compile = false

  # Generate digests for assets URLs.
  config.assets.digest = true

  # Version of your assets, change this if you want to expire all your assets.
  config.assets.version = '1.0'

  # Specifies the header that your server uses for sending files.
  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx

  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  # config.force_ssl = true

  # Set to :debug to see everything in the log.
  config.log_level = :info

  # Prepend all log lines with the following tags.
  # config.log_tags = [ :subdomain, :uuid ]

  # Use a different logger for distributed setups.
  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)

  # Use a different cache store in production.
  # config.cache_store = :mem_cache_store

  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  # config.action_controller.asset_host = "http://assets.example.com"

  # Precompile additional assets.
  # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
  # config.assets.precompile += %w( search.js )

  # Ignore bad email addresses and do not raise email delivery errors.
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
  # config.action_mailer.raise_delivery_errors = false

  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  # the I18n.default_locale when a translation can not be found).
  config.i18n.fallbacks = true

  # Send deprecation notices to registered listeners.
  config.active_support.deprecation = :notify

  # Disable automatic flushing of the log to improve performance.
  # config.autoflush_log = false

  # Use default logging formatter so that PID and timestamp are not suppressed.
  config.log_formatter = ::Logger::Formatter.new
end

Is CSS broken or something in rails 4?
Comment: Change your file `application.css` to `application.css.scss` and using: `background-image: image-url('homepage_bg_1.jpg')`
Comment: Make a new CSS file like _style.css.erb_ and put in that file `html{background: url('<%= asset_path("homepage_bg_1.jpg") %>');}`
Answer: A couple of days ago I had the same problem and I was asking myself why too. There is no problem, but Rails has changed the way to compile asset's images.
Here my solution:
First be sure that you haven't forgotten to compile your assets on production:
RAILS_ENV=production bundle exec rake assets:precompile
Look at your public/assets folder and you will notice that after compiled your images' names are like:
homepage_bg_1-12cf3e4fe243f4296a4b23b952497814.jpg
Rails had versioned the assets, i asume to cache images and optimize the time of response between the server and the client.
The next step of my solution was use the asset_path("homepage_bg_1.jgg", image) helper in your css code, that's why you will need to rename your custom.css file to custom.css.scss, afterwards your css code will be look like:
.my_class{
background-image: url(asset_path("homepage_bg_1.jpg", image));
}
Besides you will need to use in your html's erb/haml views image_path in combination with image_tag or direct in your html's image tag:
image_tag(image("logo.png")) or <image src="<%= image_path(logo.png'') %>" \>
You can read more about this helper and others here:
http://api.rubyonrails.org/classes/ActionView/Helpers/AssetUrlHelper.html#method-i-asset_path
Comment: Paste your CSS code and confirm if your images are in `app/assets/images/`

Rails 4 background image - Pure CSS


How do I view attachments in the default email client?

Question: in the standard email client I do not see attachments, how do I see them?
Answer: Double click on the email so that the preview/viewing pane opens up and then they're just below that.
I made you a helpful graphic:

You can double-click on the attachment and open it in the default client. If you right click on it, your choices are 'open' and 'save'.
After a few tests, they all showed up. If you're unable to see an expected attachment, I'd suspect that it's a malformed email. I was able to send and receive several emails with attachments in short order.
Tested with eOS Here 5.1.7
Comment: Thank you very much :) In a large chain of emails I did not immediately see where the attachment is located :)
Comment: @c0mrad3, it's all good. We all miss stuff. We all sometimes have to hunt around and still can't find what we're looking for. That's why sites like this exist. They exist because there's a whole lot to learn and remember.