any $2$-dimensional rep of a finite, non-abelian simple group is trivial

Question: Let $G$ be a finite, non-abelian simple group. How would I go about proving that any $2$-dimensional representation of $G$ is trivial? If it helps, I know how to do it when we're considering $1$-dimensional representations.
Answer: Okay, we're going to have to use some heavy artillery to start off, but I can't think of another way to begin.
Suppose $\rho: G\to \text{GL}_{2} (\mathbb{C})$ is nontrivial. Observe that since $G$ is simple and the representation is nontrivial, we must have $\text{ker} \, \rho =\text{ker}\, \chi = (e)$ (where $\chi$ is the character of this representation). The Feit-Thompson Theorem (!!!) tells us $|G|$ is even. By Cauchy's Theorem, $G$ must have an element $x$ of order $2$.
Now, define $$\hat{\rho}: G \to \text{GL}_{1} (\mathbb{C}) \cong \mathbb{C}^{\times}$$ by $\hat{\rho}(g) = \text{det} (\rho(g))$. Evidently, $\hat{\rho}$ is a homomorphism, hence it gives a degree 1 representation of $G$. We know this representation must be trivial. In other words, $\text{det} (\rho(g)) = 1$ for all $g\in G$. That said, we also know that $\rho(x)^2 = \text{Id}$. The set of eigenvalues of $\rho(x)$ is either $\{1, 1\}$, $\{1,-1\}$, or $\{-1,-1\}$. The first possibility is out of the question, since $\text{ker} \chi = (e)$. The second possibility cannot occur, since then $\text{det} (\rho(x)) = -1$. Thus, the eigenvalues of $\rho(x)$ are $\{-1, -1\}$. The characteristic polynomial of $\rho(x)$ is $(X+1)^2$, and $\rho(x)$ also satisfies $X^2 - 1$. Since the minimal polynomial of $\rho(x)$ must divide both of these, it follows $\rho(x)$ satisfies $X+1$, i.e. $\rho(x) = -\text{Id}$.
Lastly, since $\rho(x)$ is a scalar multiple of the identity, it commutes with any matrix. In particular, for any $g\in G$, we have $$\rho(g) \rho(x) = \rho(x) \rho(g) \implies \rho(gxg^{-1} x^{-1}) = \text{Id}$$ Triviality of $\text{ker} \, \rho$ implies $gxg^{-1} x^{-1} = e$ for all $g\in G$, hence $x\in Z(G)$. Accordingly, $Z(G)$ is a nontrivial normal subgroup of $G$, so it must equal $G$. But $G$ is non-abelian by assumption.
Comment: I think you can avoid Feit-Thompson to show the order is even.  The representation is faithful, and there are no non-trivial $1$-dimensional representations, so the representation must be irreducible, so the degree divides the order of the group.
Comment: Oh hey, oops. That's much better.
Comment: Alternatively, you can "avoid" talking about minimal polynomials by saying that for every $g \in G$, there is a basis $B$ of $\Bbb C^2$ such that the matrix of $\rho(g)$ w.r.t. $B$ is diagonal. Having $\det = 1$, your analysis about eigenvalues shows that $\rho(x) = ±I_2$, which is a scalar matrix.
Comment: Nitpicking: $\operatorname{GL}_1(\Bbb C)\cong \Bbb C^{\color{red}\times}$
Comment: Fixed nit, thanks!
Answer: Using a lot less machinery:
Such a representation must land in $SL_2(\mathbb C)$, and finite subgroups of $SL_2(\mathbb C)$ are completely classified (they are either cyclic, dihedral, tetrahedral, octahedral or isocahedral). None of these groups are simple, unless cyclic of prime order.
One can prove this classification by letting a finite subgroup $G$ of $SL_2(\mathbb C)$ act on the Riemann sphere $\mathbb P^1$. One can compare the Riemann-Hurwitz formula for the morphism $\mathbb P^1 \to \mathbb P^1/G$ to the class equation of $G$ to deduce bounds on the individual terms appearing in the class equation, thus narrowing down the possible groups.
Comment: The classification is done nicely in Dolgashev's notes on the Mackay correspondence, which Google finds in a sec, among many other places.
Answer: This is exercise 3.3 in Character Theory of Finite Groups by Isaacs. It is easily deduced from the following facts:

Because $G$ is perfect, $\chi$ has image in $SL(2,\mathbb{C})$;
Because $\chi$ is irreducible, $\chi(1)$ divides $|G|$;
The only element of order $2$ in $SL(2,\mathbb{C})$ is $-I$ (which is central).


Does level streaming in games load directly from the HDD?

Question: I wondered if the level streaming loads directly from the HDD. My first thought was if that would not be to slow, or if the chunks are just loaded into RAM and asynchronously processed if appropriate or something I didn't thought of yet.
Comment: Every software that handles large amounts of data will employ several caching strategies to compensate for different device speeds. So yes, it is very likely that most games will utilize in-memory data caches do reduce the cost of file IO.
Answer: A lot of engines uses both in a two steps loading approach:

Load groups of compressed chunks (level/world sections) off the storage device, slightly in advance if possible.
Decompress the small chunks within from RAM into an active usable format when they are needed.

Keeping the larger compressed chunk groups cached in RAM for a little while in case the player walks back and forth.
In your larger groups you can put list of local assets (textures, meshes to instantiate, etc) to preload as well.


The Mathematic of finding the Decay Product Compoistion of Pitchblende/Uraninite

Question: Just as the title says.  I'm curious as to how you would go about figuring out the amount of decay products in a given sample of Pitchblende/Uraninite.  I would hazard a guess at using the half life formula over and over but something seems off about doing that.
Comment: I don't understand your question. You can analyse a sample and immediately *know* the composition. Do you want to derive a former composition, e.g. at 10 million or a billion years ago?
Comment: He may not immediately know, some decay products will be in trace amounts and some will be very transient.
Comment: Karl:  I trying to figure out what a given sample day 10kg or so of Pitchblende would contain in terms of decay products.  I.e. the element composition of Pitchblende as of today assuming it was made when the earth was formed
Answer: Well, it is straightforward. You get the amount of radioactive compounds in your mineral. Then find out the decay chain reactions, it generally goes from Uranium to Lead.
http://metadata.berkeley.edu/nuclear-forensics/Decay%20Chains.html

Then you will find half-life constants for each reaction and start to calculate from U-235 to lead one by one.
Well if you think that it is just chore, write a Fortran code and enter radioactive decay constants, reactions and make a user input chain part and everyone can calculate the decay products for a given mineral/time.
Comment: Nope, what I said was this. U-> Th -> Pa, let says U halves itself in 1 billion year, Th does it for 500 million.
10 kg U reduces 5 kg in 1 b year, assume nearly 5 kg Th, but in that span Th halves itself twice, and (5kg/2)/2 = 1.25 kg remained.
So it is produced 5 kg and decayed 3.75 kg in 1 b, net 1.25 kg generated. Then you will just multiply it with 4.5 to find what left after 4.5 billions year, 5.625 kg Th is the answer.
Comment: Ah.  That was my original method.  But wouldn't that be incorrect? Taking the half life of Uranium-235 over the existence of the Earth or said material would get you the remaining amount of Uranium-235.  Then using the difference in masses that would be the Thorium generated.  Now doing the half life equation again for thorium makes it sound like it would be like tacting on another existence of Earth or said material.  Am I wrong?
Comment: I don't get what is incorrect, and "would be tacting on another existence of Earth or said material".
Radioactive decay rate is independent of the amount of material, find the production of Th and removal of Th in a unit time, then multiply it with (start-end)/unit time.
Maybe that is more proper. Apply it with all remaining chain.
Comment: If you found the half life for a kilo of uranium-235.  And then when to find the amount of the thorium that has decayed in said time span, wouldn't that be like repeating the same timespan but for new material?
Comment: I know good sir.  But what I'm saying is when you use the half life equation on thorium, the time used in the equation is it the same time interval as the uranium on or a different one
Comment: All the elements have different half-lifes. If you understand previous question you must know this Dalis, and the following equation:
[generation rate(Th)] = [decay constant (U)]*[time]
 [decay rate(Th)] = [decay constant (Th)]*[time]
[accumulated amount (Th)] = [time]{[decay cont.(U)]-[decay const.(Th)]}
Here all [time] are 4.5 billion years. Is it clearer now?
Comment: Ok I will call defeat on answering the question.  I would need a whiteboard to explain it better.  I will use my original method


simple data binding to datagrid not happening

Question: i have an datagrid i am trying to bind an value to label which is under datatemplate
 but no binding is happening her. ?
<code> <sdk:Label  DataContext="{Binding CompanyName}" Width="50" />
</code>
i have  an column  which is  above datatemplate there the values are getting binded.
<code><sdk:DataGridTextColumn  Header="CompanyName" Binding="{Binding CompanyName}"/>
</code>
but in  controls inside data tempalate values are not getting binded.
 image  field is getting binded with image  source what we have specfied.
what is the issue happening here no data binding taking place . help me  out
thanks in advance
 prince
Answer: the issue  was  the  the option what i was  using for  binding
 for  label  to bind  we have  to use  this property.
Content="{Binding
CompanyName}"


Safari and Chrome ignore min-width CSS propery

Question: Why do Safari and Chrome ignore min-width CSS property?   Example http://jsfiddle.net/8YFHu/2/ This works in IE and Firefox but not in Safari and Chrome.
Comment: Set the `min-width` on the `td` instead of the `table` and it should work fine. See the MDN article for more info on support for `table`: https://developer.mozilla.org/en/CSS/min-width#Browser_compatibility
Comment: Note - It says that min-width doesn't apply to IE. It looks like it doesn't work in IE7 but 8 and 9 do support it.
Answer: Chrome and Safari simply do not support the min-width property on table elements. They will, however, respect min-width when applied to table cells.
After some quick testing, it appears that support is as follows:

Firefox: Supported (tested in 5, not sure since which version)
Internet Explorer: Supported (since IE8. IE7 and below do not seem to support it)
Chrome: Not supported (all versions as far as I can tell)
Safari: Not supported (all versions as far as I can tell)
Opera: Supported (tested in 11.5, not sure since which version)

More information can be found in the MDN article on the property, although the article claims that the property is not supported in IE, even though it is since IE8.
The CSS2.1 specification states that min-width (and max-width for that matter) apply to:

all elements but non-replaced inline elements, table rows, and row
  groups

So it would seem that Chrome and Safari are the ones not conforming to the standard.
Edit
Having just looked a bit further down the relevant section of the spec, I noticed it then states:

In CSS 2.1, the effect of 'min-width' and 'max-width' on tables,
  inline tables, table cells, table columns, and column groups is
  undefined.

So it actually looks like no-one got it wrong, and everyone can just do their own thing.
Comment: Update - It appears that Chrome now *does* support this. I'm not sure since when this is the case, but I just tested it in Chrome 19.
Comment: I noticed that Chrome seems to support it when setting the min-width to some number of pixels, but doesn't when setting it to a percentage value. Firefox does in both cases.
Answer: In my experience, it's often impractical to define widths on td elements. The best workaround I've found for this limitation is to set a min-width on a containing div element for the table.
Comment: I agree with Roland Barker: the best way to ensure min-width for a table is to set min-width on the div that contains the table, and set the table's width to 100%.


training without using wrist

Question: I broke my wrist when I was a kid. I do body building but my wrist gets painful from time to time. I am looking for alternative workout plans without using my wrist, so I could give my wrist a rest for couple weeks.
Comment: Can you clarify, does it hurt during lifts where your wrist is straight? Or only when it is bent during the exercise?
Comment: It does hurt even when I try to open a door by pushing the handle. today I had to open with my other hand because of pain.
Comment: Honestly, it sounds like there is a problem, either it refractured, or never really healed right. It might be a good idea to have an ortho take a look and some x-rays. Continued pain like that is an indication something is not right.
Comment: Its been like 15 years, but I will have looked that out
Answer: You might not like it, but if the machines in your gym were ever an alternative, this would be it.
Fact is, wrist pain is severily limiting for weightlifters. You use them in pretty much every lift, with few exceptions.
Now might be the time to work on your new personal best in squats.
Free weights are pretty much off the table, so whatever you usually do with a barbell or dumbbells, find the machine that simulates it. Obviously, even some of these are going to be off-limits, because the chest press machine, for instance, is also going to be wrist heavy. But there are machines like the back extension, lateral raise, leg extension/curl, torso rotation, leg press etc. which do provide at least some options.
You're going to have to bite the sour apple here, and go with an "it's better than nothing" mindset.
Alternatively, there's always swimming. I seem to use this in a lot of my answers, but swimming is a miracle activity, and is a workaround for almost any injury. You're obviously not going to progress on your deadlift while doing this, but let's face it. You're not going to do that anyway, if you can't actually deadlift.
Comment: Wouldn't you advise the use of cable machines? You could for example attach the cable machine to the forearm using the bands that people sometimes use to attach one to their ancle for a leg or glute workout. That way you could do chest flies, facepulls, reverse flies and many more.
Answer: My wrist is sprained on 5/14/15, so I am sort of in the same boat as you. You should probably get your wrist checked out, but in the mean time, depending on the seriousness of pain there are options. In the case where the pain is pretty serious you could be out of luck. But if it isn't, there are workouts you can do: They include forward arm circles(shoulders and traps), leg press(quads), bikes(cardio), pretty much any lower body calisthenics, and butterfly machine(chest)-extend your arms in place of your wrists to move the weight. You can also try chest fly w/weight from machine but not on machine or chest fly w/bands(both using arms and not wrists as said earlier) However, I still wouldn't recommend it, because it will be very painful to your forearms after reps. Also, avoid workouts using grip until your wrist has healed or the doctor says you can use it.
Answer: I've tore cartilage in my wrist and have looked through all these forums and research papers and havnt got anywhere really but I was in the gym earlier and there were these Velcro straps that are used for tying to ankles and doing adductions but if you strap them to your forearm u can train most upper body areas and strap them together and then above ur elbow to do single arm rows and lay pull downs
Answer: Could you try slider pads under your elbows in a plank positions? T
You could definitely do a fly variation with your bodyweight, and I bet sliding elbows up above your head and back down would work too, like a hamstring curls for your chest/shoulders
Answer: I would recommend visiting a physiotherapist to have your wrist assessed and seek a rehabilitative program to strengthen the muscles around your wrist. I don't usually go for general doctors as their prescriptions are usually painkillers and rest.
We can rest, but active rest is still better if you can afford to.
Here are a few things you can consider:

Solid warm up of your wrists before lifting (https://youtu.be/mSZWSQSSEjE)
Make sure your wrist is in an optimal alignment with the direction of force. For example, while doing a bench press, you want to make sure your wrist is lined up with your elbows (somewhat in line, to prevent unnecessary rotational forces on your wrists)
Strengthen your wrists via the link above
Doing lower body exercises (squats, leg press) that don't require holding onto something
Swimming like someone mentioned before

Ultimately, it boils down to your goal. Lose fat? Gain muscle? Regain wrist mobility and strength? Once you're clear, you can have an attack plan and move forward. The worst thing is to do nothing.

training without using wrist


Pokémon go glitch

Question: I have recently started playing Pokémon GO, and I just reached level 13. But suddenly, every pokémon I catch seems to run away (I mean literally all of them) and I can't use gyms or pokéstops. I really need a fix on this as I enjoy the game very much!
Answer: Have you been GPS Spoofing or using 3rd-party map applications such as PokeRadar to assist you in your gameplay? Because these things are cheating, and Niantic may ban you if caught. If you are "Banned", you can still "play" the game, but all pokemon will flee from you, and gyms and pokestops will not work. Sounds an awful lot like what you're experiencing.
Comment: No, I have not been using any hacks/cheats for the game.

Pokémon go glitch


Trouble understanding non-conservative force and work

Question: I am having some trouble defining whether a force is conservative or not. In the example that we are working on a mass on a pulley system is used to cause a slender bar to rotate from rest to a certain angle. I know that the tension forces in this case are conservative but I was wondering what force, if any, was non-conservative?
Comment: Friction force.
Comment: Feynman explains all.  http://www.feynmanlectures.caltech.edu/I_14.html
Answer: A non conservative force is generally anything that is affected by friction or air resistance. The amount of energy lost is distance dependent because the further the path traveled, the more an object is affected by these forces. Conservative forces are displacement dependent, meaning they depend only on an initial and final position, and that all the different ways to get between those two points are equivalent.
Answer: The simplest example for a non-conservative force is frictional force. For example, to move an object from point A to point B on the table we would require say $10$ J of energy, now to put it back to point A, we would need same $10$ J of energy. Practically nothing observable has changed, but we've performed $20$ J of work, which went to overcome frictional force. So, we may conclude that it is non-conservative. (Since we cannot assign points of potential for it)


Scrabble question about adding prefix and suffix in single play

Question: "Invest" is on the Scrabble board with spaces before and after. I have "d,e,e, and r" sitting in my tray. Is it legal to add "re" before and "ed" after in a single play, or is that double movement?
Answer: Imagine the first play of a game was the word "cookie". The second play used the first o in cookie and played the letters m,n,s,t,e,r to score "monster"
That's basically the same thing you're asking.
That the letters in your question are prefixes and suffixes is irrelevant.
That you are adding to both sides of the word is irrelevant as evidenced by my first example.
I'll come back later with pictures.
It's a legal play.
Comment: @DouglasKellar Your wife is very wise.
Comment: While I don't disagree with this answer, it is worth noting that the [offical Scrabble rules](https://scrabble.hasbro.com/en-us/rules) regard "adding one or more letters to a word or letters already on the board" and "placing a word at right angles to a word already on the board" as _separate_ ways to form new words so I don't think it should be taken as a given that you can do this play because you can do the play in your example.
Comment: Full disclosure: I had little doubt as to the validity of my example. However, we occasionally play with a couple who seem to have a tenuous grasp of the rules.  For example, they insist that premium squares count for more than one play. I can picture them challenging my "reinvested" play. Therefore, I wanted some third-party backup in case the situation ever arises. As for the premium squares, my wife tells me: "Play along with them to avoid an argument. You and I will play a game the right way tomorrow night. "
Comment: Yes, indeed. Hard to think of a diplomatic way to tell longtime friends that they've been playing the game wrong for many years. Not with us. We've only played with them a couple of times.


Is it ever safe to publish hashed data?

Question: I'm having a friendly debate with someone who thinks that a website can safely make public sensitive data about it's users as long as that data is hashed (don't ask why, it's a long and hypothetical story). My position is that this opens the data up to brute-force attacks at least and that no hash is truly unbreakable given enough time and resource, therefore even hashed data should be protected and kept private. Who's (more) right? Can private data safely be made visible in public as long as it is hashed, or not?
Answer: You are correct that brute force attacks are feasible, especially if the data being hashed comes from a relatively small search space. Here is a recent example where New York cab details were inadequately disguised using a hash. From the article:

It turns out there's a significant flaw in the approach. Because both
  the medallion and hack numbers are structured in predictable patterns,
  it was trivial to run all possible iterations through the same MD5
  algorithm and then compare the output to the data contained in the
  20GB file. Software developer Vijay Pandurangan did just that, and in
  less than two hours he had completely de-anonymized all 173 million
  entries.

Note that it is not the use of MD5 that is the problem here. Any hash algorithm could be brute forced in exactly the same way.
It may be possible to render the hashing irreversible by adding salt before hashing; however at that point you would do just as well to create a lookup table mapping sensitive data to entirely random values—then there will be no hash algorithm to break.
Of course this all assumes that there are associations in the data that you wish to preserve after anonymising. Otherwise the safest approach is to entirely omit or mask any sensitive data.
Answer: plain hash is not secure if the attacker plans to retrieve some passwords using a rainbow-table attack (or other brute force techniques). Appending the salt should make the hash reasonably secure, even if released to the public.
"unbreakable hash" doesn't make sense. If you use a weak password (e.g. "123456") and don't use salting any strong hash function become "weak".
Answer: If you're hashing arbitrary data, there's no easy way to reconstruct it, since it doesn't have a predictable pre-hashing size. The reason password hashes that aren't salted are dangerous when leaked is because you're dealing with a very constrained set of possibilities. Without a salt, the password of "password" will always result in the same hash. This allows an attacker to start with common password and see if there are any matches, which there often are. If you take data of an arbitrary size and hash it, you can't reasonably guess what its original content was. Imagine taking a 1 megabyte file and reducing it to a 16 byte MD5 hash. Without any other information about the data, there is no realistic way to turn that hash back into the original information.
Answer: It really depends on the sensitive data and by what do you exactly mean with "hash".
As a simple escape, let's say we have a person X where we store his or her religion and sex. The possible options for religion are "christian", "muslim", "other" and "atheist". And the options for sex are "Male", "Female" and "Other". The sex or religion of a given person are declared sensitive personal information under some jurisdictions so there's no need to argue if this data is sensitive.
No matter which (static) hashing algorithm you use, it's not safe to publish data about X where sex is "b10331548e56c6ea29c862be63ef4643" and religion is "d4d2ff930bd49340c8fc89b15a2db1e9" because the possible input set is so small that you can simply iterate all options and figure out mapping from the actual data to published hash. Also note that even if you don't know all the input values or the hash, you may still know details of some another user in the same database and if they share the same hash for e.g. "sex" you know the actual data because hash is the same.
However, with a proper algorithm it is safe to output signatures. For example, if you have secret signing key and each person has unique ID, you can use e.g. like HMAC-SHA256 and use catenated string {secret signing key, ":", unique person ID} as the key for HMAC-SHA256 it's safe to publish the signature of the data which looks like plain SHA256. Note that this still requires that you do not share the secret signing key and that it has at least equal entropy to your signature algorithm (that is, minimum entropy of 256 bits for SHA256). Note that nobody can correlate any data values using those this kind of hash output so publishing the output of this algorithm is suitable only for transferring opaque signatures that only you can verify.
Also note that you also need to include version number in the person data and include it in the signature key if you have to hide the fact that the given data value matches historical value for the same user. If it's okay to leak that field Y was set to some value Z, then changed to another value and then returned to original value Z you don't need to version or timestamp the signatures.

Is it ever safe to publish hashed data?


Transfer PSTN call to mobile over Wi-Fi?

Question: I'm a newbie to Raspberry pi and I'm currently working on project and what I need is ,real time transfer analog call to mobile application over WiFi. So can someone suggest a way to accomplish my task? Do I need additional hardware or using a simple code can I make this work? Thank you.
Answer: You need a so-called FXS adaptor. You also need PBX software to go with it. Cheap USB FXS adaptors can be
had online for 50-60 $. There are several dedicated Raspberry Pi PBX distributions available , the most popular being the aptly named RaspPBX which is based on the open-source Asterisk system.


Rigify says "RIGIFY ERROR: Bone 'spine.004': Cannot connect chain - bone position is disjoint. Incorrect armature for type 'chain_rigs'"

Question: I saw a video about this issue and followed through with it and made sure the bones are connected and have a parent/child relationship, however even though they are connected and marked as connected as well as marked as parented error still persists. If any specifics are needed I can provide when asked.
Answer: This problem arises when the tail of the last spine bone is not exaclty in the same spot as the head of the first neck bone.
To solve, select the Metarig, go to edit mode, select the head of spine.004, Shift S > Cursor to selected, select the tail of spine.003 > Shift S > Selection to cursor.
Comment: I tried your solution and unfortunately for some reason I still have said error. I should note the bones on the rig are moved around to fit a non human type model. So I don't know if that would have a huge effect on it, but I'm assuming it at least has some.
Comment: I decided just to delete the first set of bones and generate another one after making the second set I made sure to keep all the bones together and just move them how I saw fit afterwards the rig was able to generate properly.


Can I un-reset my stats?

Question: Can I get my stats back? I did not mean for everything to be reset I just wanted my kill/death ratio gone.  Can I call Activision and get them to get all my stats back?
Comment: You really don't need to ask us in order to call Activision. We have no jurisdiction over this. From all the neg votes, I assume that stats can't be un-reset using legal mechanisms in the game.
Answer: No you can not. It clearly states that all your stats will be lost.
Answer: No, I did the same thing and I was 8th prestige. It was a bitter pill but I got over it, lol. In my opinion, it makes your k/d better because you should be much better than you were when the game first came out.

Can I un-reset my stats?


Why is there a 1/2 in the expression for electrostatic energy U?

Question: The expression for electrostatic energy is $$U= \dfrac{1}{2} \times \int \rho\,\phi\, dV$$ where $\rho$ is the charge density and $\phi$ is the potential at that point in ($dV$)
Let me explain what I understand about the process of calculating the $U$ intuitively. We take a small chunk of volume, multiply it by potential, to arrive at the workdone in bringing that chunk of charge to that place. You do that to all chunks in the volume and add all of it. So shouldn't $U$ just be $$U= \int \rho\,\phi \,dV$$ Why do we halve this energy ?
Answer: You multiply it by $1/2$ because when performing that sum you have double-counted the potential. Each movement you have described is assuming the rest of the charge density is already there. We actually want to think about assembling the configuration from nothing. Therefore, if you assume the rest of the charge density is already present each time, you have double-counted the work you needed to do to make the charge configuration.

A simple derivation of this is found in Griffith's Introduction to Electrodynamics book.
First, you find the work done to assemble your charge configuration:
$$W=\frac{1}{4\pi\epsilon_0}\sum_{i=1}^n\sum_{j=1\\j>i}^n\frac{q_iq_j}{r_{ij}}$$
where the $j>i$ condition represents building the configuration up from nothing so that we only include each charge pair once. However, we can intentionally double count and divide by $2$:
$$W=\frac12\cdot\frac{1}{4\pi\epsilon_0}\sum_{i=1}^n\sum_{j=1\\j\neq i}^n\frac{q_iq_j}{r_{ij}}$$
The reason we do this is so that now the order of charge assembly does not matter. Therefore:
$$W=\frac12\sum_{i=1}^n q_i\left(\sum_{j=1\\j>i}^n\frac{1}{4\pi\epsilon_0}\frac{q_j}{r_{ij}}\right)$$
Since the term in parentheses is the potential due to all of the charges at the location of charge $q_i$, we have.
$$W=\frac12\sum_{i=1}^n q_iV(\mathbf r_i)$$
This is just the discrete version of your integral, and as you can see the $1/2$ came from our double-counting.
Comment: Can you please add a simple example with 3 or 4 charges ?
Comment: @AravindhVasu I showed the derivation with a general number of charges
Answer: You can think about it by considering discrete (point-like) charges. If you have 2 charges the energy is:
$$ U= \frac{q_1q_2}{4\pi\epsilon_0}$$
If you used your formula considering $V_i(r)=q_i/4\pi\epsilon_0$ then your total energy would be:
$$ U= q_1\frac{q_2}{4\pi\epsilon_0} +  q_2\frac{q_1}{4\pi\epsilon_0} = 2 \frac{q_1q_2}{4\pi\epsilon_0} $$
This is two times the actual potential energy. You can see that you only need to consider the interaction one time, but using the integral:
$$U = \int \rho \phi dV$$
you count the potential energy contributions twice: one when a charge (say $q_1$) interacts with a potential of another charge (say $q_2$) and a second one when the potential of the first charge ($q_1$) interacts with the second charge ($q_2$). But the total energy between two charges is $q_1q_2/4\pi\epsilon_0$, so we only need to count it once. This reasoning can be extended to a continuous charge distribution $\rho$
However, counting it twice and then diving by 2 makes the calculation easier, otherwise, a restriction must be added to the integral such that when an interaction is counted, it is then excluded. This restriction is written in the discrete case as:
$$ U = \sum_{i=1}^N \sum_{j>i}^N  U= \frac{q_iq_j}{4\pi\epsilon_0}$$
where $j>i$ prevents the contributions of being counted twice.
Comment: "If you used your formula considering $V_i=q_i/4\pi\epsilon$ " Why do we take the second term at all, why does the integral add the second term. Consider two chunks of charge. Let $\phi$ be the potential at $r$ due to the second chunk of volume, the. I just multiply each small piece in the first volume times the potential due to 2, where am I wrong?
Answer: Here are examples with 2 and then 3 charges.
$2$ charges:
$$
U = \frac{q_1 q_2}{4 \pi \epsilon_0 r_{12}^2} \\
= q_1 \phi_2({\bf r}_1) \\
= (\rho({\bf r}_1) dV )\phi_2({\bf r}_1)
$$
where the notation $\phi_2({\bf r}_1)$ means the potential due to 2 evaluated at location ${\bf r}_1$. But for these same two charges we can equally well write
$$
U = q_2 \phi_1({\bf r}_2)
= (\rho({\bf r}_2) dV )\phi_1({\bf r}_2) .
$$
Therefore we can if like write it as half the sum of these two equally valid expressions:
$$
U = \frac{1}{2} \left( \rho({\bf r}_1) \phi_2({\bf r}_1)
+ \rho({\bf r}_2) \phi_1({\bf r}_2) \right) dV\\
= \frac{1}{2} \sum_i \rho({\bf r}_i) \phi({\bf r}_i) dV
$$
where $\phi$ refers to the total potential at any given point produced by all charges except a point charge located exactly there.
Next let's proceed $3$ charges. There are three pairs: (1,2), (1,3), (2,3). We adopt
the shorthand $\phi_{12} \equiv \phi_1({\bf r}_2)$. Each pairwise interaction can be written as above, as half the sum of two equally valid ways of writing it:
$$
U = \frac{1}{2} (q_1 \phi_{21} + q_2 \phi_{12})
+\frac{1}{2} (q_1 \phi_{31} + q_3 \phi_{13})
+\frac{1}{2} (q_2 \phi_{32} + q_3 \phi_{23})
\\
=
\frac{1}{2}\left(
  q_1 [\phi_{31} + \phi_{21}]
+ q_2 [\phi_{32} + \phi_{12}]
+ q_3 [\phi_{13} + \phi_{23}]
\right) \\
= \frac{1}{2} \left(
\rho({\bf r}_1)[\phi_2({\bf r}_1) + \phi_3({\bf r}_1)]
+\rho({\bf r}_2)[\phi_1({\bf r}_2) + \phi_3({\bf r}_2)]
+\rho({\bf r}_3)[\phi_1({\bf r}_3) + \phi_2({\bf r}_3)]
\right) \\
= \frac{1}{2} \sum_i \rho({\bf r}_i) \phi({\bf r}_i) dV
$$
Once you get the idea, you realise that the sum without the $1/2$ exactly double-counts all the pairwise interactions, and hence the overall result follows for any number of charges, and for the limit of a continuous charge distribution where the sum becomes an integral.
Comment: Let me ask a naive question,what is $\phi$, it's going to be the potential due to all other charges except the one we consider, so it's going to be different each time right? How do we get a general expression for $\phi$?
Comment: In a static case (which has been assumed throughout), $\phi({\bf r}_j) = \sum_{i \ne j} q_i / (4 \pi \epsilon_0 r_{ij})$
Comment: Yeah okay, we define that $\phi$ as a sum. But the fact that it's not the in each term of the integral is true right ?
Comment: This $\phi(r_i)$ here signifies different potentials right, at a single time it's the potential due to all other charges except the one we have considered.
Comment: @AravindhVasu yes


CCD in C++ Console application

Question: I am writing a game in a c++ console application. I would like to detect whether or not there is a collision between two objects, and displace them accordingly. All sprites are simply strings drawn on screen (Ex. a sprite with x 5, y 5, width 3, height 3 and the image "XXXXOXXXX" would create a 3-by-3 box of X's with a O in the middle). All objects have a x, y, length, and width which can aid in looking for potential collisions; however I would like to look at the actual string for finer collision detection. I am relatively new to the concept of continuous collision detection and I am having trouble finding the answer via Google. Does anybody know how I would go about doing this? Thanks in advance.
Comment: Is this a console application in the sense that it is rendered through characters printed to the console?
Comment: @Stephan yes, Im using conio's gotoxy and cout to draw ascii art sprites to the console
Comment: Is your physics still real under the hood, or is everything based on the row and character position in the console?
Comment: @Stephan there is only direction and speed at the moment
Comment: Is it in xy coordinates with a character position resolution?
Comment: Are you having trouble using the x,y and w,h to determine a collision? There seems to be another question about strings, is that separate?
Comment: @Stephan every sprite has an x y value, and in a draw method a gotoxy positions to the sprite's x and y value. Anything with motion is just incrementing the coords
Comment: @Jay yes, I have written basic collision detection before, but never continuous collision detection. The thing about strings is i'm treating the individual characters like they are pixels, having a character such as space representing transparent pixels. This is so i can have finer collision checking between the individual "pixels"
Answer: For a school assignment we made a class to wrap up the characters in, essentially creating bitmaps where instead of coloured pixels we used characters.
This greatly simplified things such as drawing stuff at the right place etc, and should also help you with your collision detection issues.
By viewing the characters as pixels your engine can use any techniques used in 2D games. This way you can effectively ignore that you are working with ascii-art instead of sprites.
Comment: that's essentially what I'm doing, my problem is I don't understand how to check the position between the individual "pixels". My mentioning of bounding boxes is just so I can split up the collision check into two stages to save runtime
Answer: Collision Detection is essentially looking for intersections of lines defined by points. A square bounding box consists of 4 points, the lines between being checked for intersection of lines between other pairs of collision points.
The only conceptual difference between a traditional bounding box and pixel-perfect bounding boxes, is that traditional BB's have fewer collision edges to check.
Pixel perfect boxes effectively have a new point for every non-transparent edge pixel. Some efficiency can be gained by eliminating bounding points that are co-linear and non-terminating(not on the ends of the line) with other points, which reduces the number of line segments that must be checked for intersection. If for some reason such an efficiency doesn't happen, there is no difference in "pixel-perfect" and simply iterating over the tiles that will occupy previously unoccupied space.
In your case, since you're "rendering" text in a console window, worrying about this is over complicating things. Maintain a list of characters that are considered "blocking", and when you move your 3x3 object, you only have to check the 3 cells immediately adjacent in the horizontal or vertical directions for "blocking characters". In the case of a diagonal movement, you have to check the 5 space that will be newly occupied by your 3x3 object. If part of your 3x3 is considered "non-blocking" or not part of your bounding box, simply ignore the cell that it will move into when doing your checks. If any of the tiles have a blocking character, you interrupt the move and don't change the position of the object.
TL;DR
In a nutshell, you only have to check the spaces in the world that will be occupied against the corresponding characters in your object that will occupy them. So long as none "collide," move your object and rerender.
Comment: That makes a lot of sense, my only problem is i plan to add smaller sprites (Ex. 1x1) That move more than one space at a time, so I want to avoid those collisions going undetected with one another. However, I am now realizing that perhaps I could move it one space then check, and repeat based on the objects speed. Is this a commonly used method? (And thanks for the description on pixel-perfect boxes)
Comment: that makes sense, I think i have a good idea of what to do in my head now... Thanks for the help :)
Comment: You're spot on.Unless you don't want it to move if it can't move the full distance. In which case you want to check all the spaces between before you move at all. I wrote my answer under the assumption you'd only move one space at a time.

CCD in C++ Console application


How do I analyse data with a ceiling effect?

Question: We generated repeated measures data from a sample of people evaluated at 4 timepoints in 2 groups. We wish to compare the groups over time. There are significant missing values. The questionnaire is very insensitive and has a score range from 1-30, however the vast majority of people are scoring 29 or 30. The numbers fall off exponentially below 29. Admittedly there is more of a downward spread in the measurements made at the first timepoint. Log-transforming (nor any transformation) has not made a difference. Notwithstanding the obvious rubbishness of the actual questionnaire, have people encountered this situation before? At the moment we are simply using 29 as a cutoff for a categorical analysis. Is there anything more elegant which can be done?
Comment: A question or scale that shows great ceiling effect is psychometrically bad one, obviously, because its discriminating power is so poor on the upper edge. You can't expect to make fine analysis out of rough instrument. Your decision to cut into 2 or 3 categories in such a situation is right, for me.
Comment: Sounds like a Tobit model [see Wikipedia](http://en.wikipedia.org/wiki/Tobit_model) may be appropriate here. Essentially, the model assumes that there is a latent variable whose value is directly observed below a particular threshold (30 in your case) and censored if the latent value falls above that threshold. As suggested by @whuber, this makes use of all of the data without the need for artificial categorizations.
Comment: I think your assessment is right, @ttnphns, but I wonder about the advice to use coarse categories.  If there is any effect to be found here, it will appear *precisely* in those few responses that fall below 29.  Lumping them together is likely to destroy any chance of detecting significant differences.  Instead, we should direct our attention to procedures that are as powerful as possible, and that seems to mean using the actual data without unnecessarily categorizing them.
Comment: @whuber, I'm fully aware and share your concern that categorizing will kill information taken by the left wing of the scale. But is that information valuable? Item or construct with great ceiling effect is not simply of poorly calibrated difficulty, - it is likely to measure not exactly _what_ it was supposed to measure. Yes, the left wing is sensitive to some thing and measures it, but is this thing relevant?
Comment: @ttnphns Good questions, all of them, well worth considering in any reply here.
Comment: I was interested in this as well and had a search. Have you seen this paper on analysing longitudinal ceiling data? http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2778494/ This may also answer some similar questions I've been asking.
Answer: Is it the case that each individual's score is composed of the sum of 30 binary questions? If so, then you should analyze the raw data (1 or 0 for each question for each individual) genearlized additive mixed effects models, treating individuals as random effects, and specify a binomial link. For example (in R):
library(lme4)
fit1 = lmer(
    data = my_raw_data
    , formula = accuracy ~ (1|individual)
    , family = binomial
)

This would fit a model where there is only an intercept. If you have a between-individuals manipulation coded in a variable called "A", you could evaluate the amount of evidence for an effect of A by:
fit2 = lmer(
    data = my_raw_data
    , formula = accuracy ~ (1|individual) + A
    , family = binomial
)
(AIC(fit1)-AIC(fit2))*log2(exp(1)) #bits of evidence for an effect of A

Where "bits of evidence" refers to a likelihood ratio represented on the log-base-2 scale. Negative bits would represent evidence against an effect of A.
The ezMixed() function from the ez package automates the computation of such evidence metrics, and the ezPredict() and ezPlot2() functions facilitate obtaining and visualizing effects.
If I am wrong and the score does not represent the sum of 30 binary questions but instead the sum of some smaller number of likert-coded questions, you could recode the likert responses to binomial as I suggest here, then proceed as above.
Comment: These are all really useful comments, thanks. The data are actually not 30 x 0/1 but Likert scales. It is a scale assessing activities of daily living. The problem is that it is designed for dementing patients and we're using it on depressed patients. The ceiling effect is caused by its insensitivity to the more subtle instrumental difficulties (financial management, shopping, complex tasks) that *recovered* depressed people have.
Comment: +1 Perhaps you might also have a suggestion for when this kind of binary data is transformed into population based z-scores but the skew remains? i.e., a score of 30, for a person between 50-60 gives a z-score of 2.5. But this might require a separate question.
Comment: However, at baseline there's quite a spread below 30, so it is *detecting* "disability", however, when people return to "normal" functioning after treatment, they all arrive at 28-30 or thereabouts.
Comment: I wonder is there a way to combine these ... there doesn't seem to be an established way to do a repeated measures Tobit model in the package VGAM. That would seem to be the most elegant solution. Previously, the (awful) literature has used raw change scores across 2 timepoints, with presumably significant insensitivity due to regression to the mean.
Comment: censReg package with plm.data looks promising


Mobile site intermittently not scrolling in Android browser

Question: I am new to web development for Android, and I am a bit frustrated with it at the moment. The site I'm working on (http://truthfortheworld.org) is looking and working fine on Mobile Safari, but in Android's default browser, the pages refuse to scroll down unless I refresh the page. It's quite frustrating, and I cannot figure out what's going on. Sometimes I'll load a page that looks like it's going to allow scrolling, but then it snaps to the top and won't budge.
My guess is that is has something to do with the combination of viewport settings and CSS media queries. Here's my viewport meta tag:
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />

I've tried several other viewport settings, but nothing works. When I allow scaling, the page will scroll when zoomed in, but snaps to the top again once you're zoomed out.
Here's my two stylesheets:
<link rel='stylesheet' media='only screen and (min-device-width:800px)' type='text/css' href='/css/main.css' />
<link rel='stylesheet' media="only screen and (max-device-width:1136px)" type='text/css' href='/css/handheld.css' />

The first is for regular screens, and the second for small devices. The worst of this problem is that sometimes it disappears for a while, everything works great, but then it starts up again. It has me baffled!
I'm using Android 2.3.4. Let me know if you have any insight for me. Thanks!
Answer: I had a scrolling issue in same Android version(2.3.4). My phonegap app didn't scroll.
Because I added overflow:hidden in the body. When I removed overflow:hidden, it started scrolling.


Can a representation be a system?

Question: What's the definition of system? I am wondering if a representation like a graph be considered a system, or a system needs to have some kind of effect on something and not merely represent something. Looking at the definition, it seems that a system can be a graph with two elements in it.
Comment: There are too many definitions for the word system to list here, you can even make up your own. Maybe you could explain in your question why it matters to you whether your graph would be a system or not, and which definitions of system you care about.
Comment: Too wide a question, system in what context?
Comment: I'm voting to close this question because this is a dictionary question better suited for EnglishSE.
.
Answer: In accordance to the Systems Theory, this might be the most common definition: a system is a set of interrelated parts.
In simple words, a system is a group of things related by something. From a simpler perspective, given that any possible thing in nature (or even any idea) can be split in parts, any object can be considered a system. Some say that the definition is fractal: subsystems are also systems that have parts ad infinitum, and supra systems are equivalent. There are no sub-sub-sub...-systems; just systems. At any level, all things are part of something bigger, and have smaller parts.
Relationships are a form of order, that's why the term system is also used to feature organised wholes: a philosophical system; an informative system, my personal accounting system; Kant had a mania for systematizing knowledge.
So, "butter", "flour", "salt" do not conform a system as such. But if that is my groceries list, it can be considered a system since they are related by some organising rule. Or they can be the essential components of a cake; so, the cake being the system in the case.
As you see, the term system can be loosely used in multiple senses, but it is mostly used to characterize organisation.
So, a graph can be considered a system from multiple perspectives. Semantically, it can be a system, since it is a set of interrelated nodes. From a syntactic perspective, it can also be a system, cause it is a set of graphical elements that represent a behavior. Even from the perspective of the physical thing, a graph might be a piece of paper with ink lines over it, expressing a sense. These expressions are acceptable: the graph system; the system graph; the graph systematizes the behavior; the graph is a system of states; it can be systematized in a graph/representation, etc.
But a pure graph, as such, as an atomic element (that is, that doesn't have parts), without any possible relation, in a context where nothing else exists, can hardly be considered a system.
There are additional features that systems might exhibit, but that are not commonly included in the definition:
a) inputs and outputs (a coffee machine is a set of mechanical parts accepting coins and outputting coffee). Even abstract systems have inputs and outputs, but they can present some difficulties to be identified, the notions of object-subject interaction are essential for that. Loosely, the input in a graph is the attention that focuses in some node of the graph, and moves according to its rules, and the output might be the fact of finding the current state that corresponds to the input.
Some say that when systems lack of of inputs and outputs, can be considered "closed systems". But that is something which doesn't exist in nature. Just think that any atom interacts with any other (perhaps by an infinitesimal amount, but it interacts anyway), or that your body is exerting attraction even on the most remote galaxy in the universe. Closed systems are mostly theoretical constructs that prove useful in some contexts (e.g. thermodynamics, electronics).
b) a teleological foundation (a goal). Around 1970, many theorists used a different concept: a system is a set of parts with a shared goal. But goals are considered subjective in philosophy. So, if the earth would be a system, then it was intended to exist with a goal, then an intention would be implicit, and even more, a creator. As you see, such element intr a lot of undesirable considerations into the concept. So, currently, the goal is not anymore used as part of the definition.

Can a representation be a system?


bais comments and voting

Question: I noticed of many bias comments and voting , they go for emotions not for reasons and explanations, if they are convinced about something just refused or vote for close.
they dont explain why they downvote it.
even if you want to downvote this question , explain the reason so I make it better.
Comment: I totally agree about the voting, but what should we do about it?  As of right now, this just reads like an observation, not the start to a discussion.  Do you have a proposal? Are you just asking "How do we stop this?" Are you asking "Is this actually a problem?"
Comment: Just an explanation on meta:  Meta is different than the regular site.  Votes here indicate disagreement rather than a judgement on quality.  Many discussions here do not have a right or wrong answer but rather they are used to judge the consensus of the community.  The issue of commenting on down vote has been discussed ad nauseum IE http://meta.stackoverflow.com/questions/252826/is-asking-reasons-for-downvote-in-comments-non-constructive
Comment: Politics is very biased. Both in the real world and, sigh, in here. Leaving explanations as to why one votes up or down is, alas, also biased and this being a biased place, typically ends up being a long drawn out biased argument. Which hey, that's what politics often is. Just doesn't fit StackExchange very well.
Answer: Politics have bias.  The best thing you can do to combat the bias is to down vote answers that are unsourced or do not directly answer the question asked.  If the question being asked is not objective or not asking for information but just seeking opinions that back up their belief, then down vote and vote to close that question(or answer) even if the bias is one you agree with.
I find it funny that most of the Right Leaning posters to this site think I am a liberal and most of the Left leaning posters think I am Corporate statist.  I will upvote good answers that are against my personal belief's if they are a good representation of the facts presented in a way that does not conflate opinion.  I do not down vote opinions I disagree with if the opinions are an appropriate response and they are framed so it is clear that the response is opinion and not presented as a fact.
However even if I think that the opinion is right, if it is presented as fact, or not an appropriate response to a proper question, then I will down vote it.
I also do my best to avoid bickering about the positions in comments.  My comments are not about the right or wrong of the post most of the time, but rather I comment on the quality of the question or answer.  The intent is to improve the post so that it does meet the SE guidelines.  One of the big risks I see for this site is that we tolerate too many bad subjective questions, and too many answers that are non-answers.
The way to correct this issue is to downvote and flag the offenders.  Explain in comments how they can do better.  If possible with out a heroic effort, Edit the post into something that is objective and meets SE Standards.  That does not mean change the obvious slant in a post, that is just going to trigger an edit war.  But when someone asks a question that is at its core a good question, but phrased poorly edit it to bring it up to standards.  When someone posts a decent answer improve it with references where you can.
These things will help improve the site.  We have a serious broken window problem and the only way we can fix it is to stop contributing to the broken windows ourselves, and to let people know it is not ok to break windows in our neighborhood any more.
Comment: Dang it, I hate it when I have to agree with you :)

bais comments and voting


Does fire create air resistance?

Question: Does fire create air resistance/drag?  So, for example, would it be harder to swing a flaming sword than a normal one?
Comment: When I've been in practice juggling clubs I've wanted to juggle flaming torches at night. Just 'cause it *looks* cool, you understand.
Answer: No. Fire doesn't create resistance. Resistance is offered by drag force because we're pushing the medium (which pushes back on us) which obstructs our path. It depends on the density of the fluid, our velocity (for high Reynolds numbers), the area of the substance which obstructs the fluid flow. This can be seen in our theory $F=\frac{1}{2}\rho A v^2C_d$
A sudden definition for fire (as seen in everyday life) can be the burning of something by rapid oxidation. In other words, you're losing the mass of the material which catches fire because the it's slowly (when viewed in normal scales) stolen away by oxygen which leaves the molecules into some kinda excitation. You're lucky to see the fireworks which is actually due to the emission of blackbody radiation from the flying away molecules.
To be precise,, Fire actually helps reducing drag. After swinging for some time you'll notice that it'll be easier for you to swing the sword, because the it has been dissolving in air the whole time (i.e) the area of contact with the fluid flow $A$ is getting reduced (though a negligible effect). Also, the density of the fluid in front (shielding the whole object) is quite less than the density of fluid $(\rho_{air}>\rho_{fired})$, leading to easier motion of the sword...
Comment: Not sure actually...$F_D=\frac12 C_d \rho_{air} V^2 S$, and all variables remain the same for both situations, except the air density; that in fact *decreases* due to warming by the flame, therefore I'd say since $\rho_{air}^{normal}>\rho_{air}^{flame}$, a flaming sword actually has a slightly *lower* drag than a non-flaming one...
Comment: Hi @Rody: Agreed. But, I did say that *it'll be easier* to swing the burning sword. But still, this is true only for smaller velocities and the system is somewhat closed like a *room* or something even smaller (else, molecules will be replaced bringing new ones) ;-)
Comment: you said "No. Both are not at all related to each other." and you gave a different reason than I for why it would be easier to swing the firesword. I think your reasoning is incomplete.
Answer: I think it is easier to swing the fire sword than the normal sword.
Take the (subsonic) equation for air drag $F_D$:
$$
F_D = \frac12 \rho_{\mathrm{air}} C_DV^2 S
$$
where $C_D$ is the sword's drag coefficient, $S$ the frontal area, $V$ the speed at which you swing it, and $\rho_{\mathrm{air}}$ the air density. Take also the ideal gas law,
$$
\frac{P}{\rho}= RT
$$
with $P$ pressure, $\rho$ the specific density, $R$ the universal gas constant and $T$ the temperature.
From the ideal gas law, it is obvious that an increase in temperature would result in a decrease in density and/or increase in pressure. So,
$$
\rho_{\mathrm{air}}^{\mathrm{hot}} < \rho_{\mathrm{air}}^{\mathrm{cold}}
$$
and since the fire sword will locally heat up the airflow,
$$
F_D^{\mathrm{fire\ sword}} < F_D^{\mathrm{normal\ sword}}
$$
Comment: How does the difference change when the tip speed increases (transonic and supersonic behavior)? I think the problem has been dealt with for helicopters. Also, does fire make the airflow more turbulent?
Comment: The dynamic and kinematic viscosity both increase with temperature, so that would offset some (and potentially all?) of the decrease in density. That would have to be taken into account somehow.
Answer: Yes. Fire both experiences and creates drag.
Your example of the fire sword confuses the issue a little and I'm not sure if it would be easier or harder because I'm not sure what a flaming sword is really. If its dipped in oil and lit on fire, it would be losing mass getting lighter, heating up the air around it and reducing pressure. But that is closer to a steady state answer; It might be harder to swing because the gas cloud around the sword would create pressure (like a rocket engine). This could be balanced because the cloud exists on both sides of the sword or it could be unbalanced because the moving sword would experience preferential combustion on the side getting fresher oxygen from movement.
Let's use a different example to make things clearer:

Would a sword swinging through a flame experience drag?
Yes it would. A flame is a cloud of burning gas. As a cloud of gas, it creates drag. It also experiences drag itself. You can see this in that wildfires spread in the direction of prevailing wind, the flicker in a candle, or the motion of a mushroom cloud in a fireball. The reason the flaming sword question is confusing is that gasses react to drag differently than solids do.

Does fire create air resistance?


Is there a plugin-log plugin?

Question: Is there a plugin that logs my usage of plugins on the blog? (when I downloaded a new plugin.  When I activated/deactivated it and so on) ?
Comment: That's a nice question, I like the idea of such a service. I think this would be even something useful to have in core actually.
Comment: Thanks Hakre!  please update here if you'd get to do something :)  Cheers, Tal
Answer: I have searched fairly extensively, and have not found such a plugin.  The best recommendation I could make is to use the WordPress File Monitor plugin.  This will at least let you know when a new plugin is installed. Really, you should be using it regardless - it's a great plugin to use as part of an overall security strategy.
Comment: Thanks.  I like that plugin too (although on the last time I worked with it - it didn't work)

Is there a plugin-log plugin?


Change MTP/PTP for a Galaxy S4 w/ a Broken Screen

Question: I'm trying to do a complete backup of all data on my Samsung Galaxy S4 before I send it in for repairs.
Even though the screen is completely black and does not work (very little touch abilities), I have the Galaxy Smart Dock, which lets me output the screen via HDMI and control the phone with a mouse.
I removed the lock screen, installed Kies, then connected the phone to my computer.
Unfortunately, at one point, my phone switched from MTP to PTP, and now I cannot switch back to MTP (which Kies requires).
Everything online says to just connect the phone to the computer and swipe down to select the connection mode - I cannot do that because the screen is broken.
I also do not see any "three dot" option in Settings / Storage to change the USB Computer Connection.
Is there an option I'm missing? Am I SOL?
Again, I have full control of my device through the media dock, I just do not have that control when the phone is connected (via USB) to my computer.
Comment: Having the same problem described here: http://forums.androidcentral.com/ask-question/421018-change-galaxy-s4-mtp-mode-broken-screen.html
Answer: If your phone is like mine, this option does not exist in any of the Settings menus.  First, connect your phone to your PC via the USB cable.  (If it is already attached, remove and reattach).  Watch your Notifications bar at the top of your screen and you will see a USB symbol appear.  Pull down the Notifications and viola, there is the option to change it back to MTP.
Comment: I am unable to do that because my screen and digitizer are both broken.

I have control of the phone through the media dock (using the HDMI out and a mouse), but to connect the phone to the computer, I have to disconnect the phone from the media dock, which means no more device control.
Answer: i know you have probably fixed this by now but if not try typing *#0808# into your phone this will bring up a menu where you can select mtp
Answer: Change the cable.
I had a noname cable and did not worked, it only charged and the phone was not available as storage. After replacing cable with a trusted one (BB or Samsung i tried) it worked.
Answer: try typing the following into your Samsung phone to get access to a hidden USB connection menu
*#0808#
Comment: Can you expand on this answer a tiny bit to explain what access codes are and how someone can check them?
Comment: this is actually working answer.
Answer: I am sure this is to late for you but hopefully will help someone else out.
Some launchers for example Nova have 'actions' that you can add as shortcuts by long pressing your homescreen. One of these actions is 'expand notifications'. Now you can simply select this icon to pull down the notifications.
This can be useful for using the phone with gloves too when pulling down the notifications can be annoying.
Comment: Thanks for the suggestion, but my problem isn't opening the settings menu, it's the fact that my digitizer is broken, so even if it were a button, I wouldn't be able to access it when the phone is connected to the computer.
Answer: This solution should work.
First, for Michael, note that the OP bought a Smart Dock. That will be crucial for you. It is not free, but the price you pay will benefit you in other ways:

purchase a Samsung Smart Dock. I've seen them on Amazon for around $60
mount your phone in the Smart Dock

Now you have:

external HDMI connection for the screen
power for charging your phone
Several USB ports for PC connection and more

All simultaneously.
It's the only connection I've seen that does screen + USB at the same time. Other cables sometimes claim it but I've never had one that worked properly.
Now, once you have the Smart Dock, you're ready to go.
Note: the OP already had a Smart Dock but could not get it to switch to MTP mode. That sounds mighty strange! As soon as you plug the phone into your PC with a valid data cable you should see it recognize the USB connection.
If you don't, one of two things is wrong in my experience:

Have you installed the Samsung Kies 3 app on your PC, and have you updated the driver? (That's an option in "Tools") If not, the PC likely will not recognize the phone, and the phone will not know it is connected to a PC.
Are you certain you have a good data-USB cable? A charging-only cable will not work. (Most micro USB cables are fine, although an old one may have a bad pin you would not notice except for this problem.)
Answer: Check the USB connector on the phone. I had a lot of trouble connecting my GS4 (it would charge but not be recognized by the PC) until I found out there was a LOT of pocket lint down inside the connector area. I cleaned it out gently with a toothpick and after that it hooked right up to the PC. I think the USB cable connector wasn't getting completely inserted.


Is bitcoin just one long block chain or are there multiple chains?

Question: Is each block found just a link in the same long chain, or are there multiple chains?
Answer: The Bitcoin blockchain converges to a single-file chain because each block references exactly one predecessor, and thus there can only be one block at every height in the chain connecting the genesis block and the chain-tip.
However, at times more than one block will be found at the same height. This happens either due to the mere happenstance of two miners discovering a valid block in the same instant, which is benign and will rectify by itself when one of the two sires a successor block and thus creates a new longest valid chain, or it could happen if a faction in Bitcoin adopts an incompatible protocol rule change (hardfork). Since network participants that don't accept the rule change will not accept these blocks as valid, two chain-tips may persist henceforth.
Recently, the hardfork plans of Bitcoin Unlimited have been a major topic in Bitcoin, which frequently includes discussion of possible scenarios with two incompatible chain-tips. I assume that you seeing a discussion of that sort gave you the idea that there could be more than one chain.
Answer: Every time Bitcoin is forked, the blockchain is forked too, thus creating a different blockchain. This applies to all cryptocurrencies that were forked from bitcoin.
Even the main Bitcoin branch has at least two different blockchains: one has real value because it's expensive to mine bitcoin there, the other is the test blockchain (testnet), where bitcoins are easily created, thus they have no value.
Comment: The mainnet and testnet are completely separate chains, they do not share any blocks. Forks are only chains that have some common block history leading up to the genesis blocks.


What advantages and disadvantages does Ethereum have over Bitcoin?

Question: What advantages and disadvantages does Ethereum have over Bitcoin? What can you do with Ethereum that you simply cannot with Bitcoin? What price do you pay for these additional functionalities?
Answer: I'll answer the middle question from the White Paper. Bitcoin can allow simple scripting and a weak version of smart contracts. The scripting that you can do has these limitations (quoting from the white paper, where UTXO means "unspent transaction outputs")

Lack of Turing-completeness - that is to say, while there is a large subset of computation that the Bitcoin scripting language
  supports, it does not nearly support everything. The main category
  that is missing is loops. This is done to avoid infinite loops during
  transaction verification; theoretically it is a surmountable obstacle
  for script programmers, since any loop can be simulated by simply
  repeating the underlying code many times with an if statement, but it
  does lead to scripts that are very space-inefficient. For example,
  implementing an alternative elliptic curve signature algorithm would
  likely require 256 repeated multiplication rounds all individually
  included in the code.
Value-blindness - there is no way for a UTXO script to provide fine-grained control over the amount that can be withdrawn. For
  example, one powerful use case of an oracle contract would be a
  hedging contract, where A and B put in $1000 worth of BTC and after 30
  days the script sends $1000 worth of BTC to A and the rest to B. This
  would require an oracle to determine the value of 1 BTC in USD, but
  even then it is a massive improvement in terms of trust and
  infrastructure requirement over the fully centralized solutions that
  are available now. However, because UTXO are all-or-nothing, the only
  way to achieve this is through the very inefficient hack of having
  many UTXO of varying denominations (eg. one UTXO of 2k for every k up
  to 30) and having O pick which UTXO to send to A and which to B.
Lack of state - UTXO can either be spent or unspent; there is no opportunity for multi-stage contracts or scripts which keep any other
  internal state beyond that. This makes it hard to make multi-stage
  options contracts, decentralized exchange offers or two-stage
  cryptographic commitment protocols (necessary for secure computational
  bounties). It also means that UTXO can only be used to build simple,
  one-off contracts and not more complex "stateful" contracts such as
  decentralized organizations, and makes meta-protocols difficult to
  implement. Binary state combined with value-blindness also mean that
  another important application, withdrawal limits, is impossible.
Blockchain-blindness - UTXO are blind to blockchain data such as the nonce, the timestamp and previous block hash. This severely limits
  applications in gambling, and several other categories, by depriving
  the scripting language of a potentially valuable source of randomness.

Ethereum is designed for contracts and in fact implements a Turing-complete virtual machine on the blockchain.
Comment: Could you please elaborate on that? What does it mean to be "a Turing-complete virtual machine on the blockchain"? What does "Value Blindness" mean? What does "Blockchain blindness" mean? Where does the state lack (I mean, obviously the system as a whole has the state which bitcoin belongs to whom, doesn't it)?
Comment: This is helpful, however I was hoping for a more abstract (hopefully balanced) assessment of the two. This post only answers part of my question and is somewhat biased due to mostly quoting one of the white papers. E.g. it would be interesting to read an assessment whether Turing Completeness is an advantage when including the security implications.
Comment: I've quoted from the white paper. Is there anything still unclear?
Comment: Actually there are primitive loops. They achieve safety by the inefficiency of the code size: https://files.acrobat.com/a/preview/0981025b-60e3-4bb3-bd2b-c0d5241e181d


Blurred images on Windows

Question: My website shows beautiful figures for normal displays. However, as in Windows 10, when the scale and layout is set to 125% or higher, the images are blurred for the visitors. Is there something I can do on my side that can show the figures without any blurring? (High resolution images increase the figure size.) An example image is attached below. This, along with all others, looks really sharp at 100% but blurred at 125%.
Comment: Are you sure it isn't just the image resolution?
Comment: Yes. On two different settings (100% and 125%), the difference is large.
Answer: AFAIK it is not something you can fix as webmaster. Responsible for this behavior, and its fixing, is this Chrome setting:
Comment: Thanks but that setting is, again, at the user side. By setting the scale to > 100%, I assume that the user themselves choose to see blurred images on the whole web.

Blurred images on Windows


PC does not awake from standby mode

Question: Following happens since the update from 14.04LTS to 16.04LTS.
After some time of keyboard/mouse inactivity the PC turn to "standby/sleep" mode (screens turns black) which is pretty normal. Since the update the PC does not want to wake up after moving the mouse of pressing keys. The screen remains black and there is not other way to work with PC then power off and power on again. Of course losing data of files which were open.
Anyone knows how to change this setting?
Answer: First step is to immediately turn off suspend when inactive option in 'system settings'. Then later with no files open experiment with Suspend/Resume feature analyzing error logs like /var/log/syslog. Sorry I can't type real answer from my phone.
. Just this short commentary.

PC does not awake from standby mode


Lightning component capture modal closed event

Question: I'm using lightning:openFile event to allow users to upload new versions of a ContentDocument. I know Salesforce recommends not to do that. But tough.
Anyway, I need to capture the event fired when the modal is closed. After the user uploads a new version, I need to send an event to the parent component (the one that fired the lightning:openFile event) to refresh the thumbnail it is displaying.
So, does anybody know which event that is?
Answer: How are the files being uploaded? Are you using the lightning:fileUpload standard component (https://developer.salesforce.com/docs/component-library/bundle/lightning:fileUpload/documentation)? If you're instantiating this component by code, you can pass in an onuploadfinished argument (a function). In my experience, this function executes when the modal is closed (that is, the confirmation modal resulting from the file upload). According to Salesforce's documentation, this function runs "when the files have finished uploading", but I've found that it runs when the modal is closed (at least currently).
Something like:
$A.createComponent(
   'lightning:fileUpload',
   {
      "label": "Test file upload",
      "onuploadfinished": function(){
         // *** Run logic for modal closed event here ***
      }
   },
   function(newComponent, status){
      // Callback from component creation
   }
);

Comment: No, I'm using the Lightning `openfiles` event. Clicking a thumbnail fires the event. Pretty sure it launches a Chatter thing. It launches the file overlay with options in the header (download, delete, upload new version, etc'). The same thing you get if you click a file from the record page (in LX).
Answer: After a solid month of back and forth with Salesforce support we have reached the conclusion that there is no sanctioned way to do this.
Not content with their answer, I dove into the JS code for Salesforce's lightning components.
The lightning:openFiles launches a modal that exists outside of the regular page hierarchy. When you click outside the file or click the 'X' to close the modal, it does fire an event, but that event is a COMPONENT type event. And the JS function that handles it also calls event.stopPropagation() on it, so there is no way to catch that.
The lightning:fileUpload component contained within the modal (that is called when you Upload new version) also fires a COMPONENT type event that is caught and handled by the modal (because that is the component that fired it, and sent it a callback function), and then event.stopPropagation().
So, bottom line: this is not a thing that can be done within the Salesforce standard components.
It is relatively trivial to role your own modal with lightning:fileUpload and your very own callback function. The downside is that I still haven't found a way to upload a new ContentVersion to an already existing ContentDocument. So my users are contastly uploading new ContentDocuments (and my controller is deleting the old ones to keep the clutter down. It's a mess.)


SQL Server accepting Access queries?

Question: I am currently working on migrating a legacy codebase from VB6 and Access to VB.NET and SQL Server.  I have run the Microsoft SQL Server Migration Assistant successfully and populated a SQL server with all of our existing tables from access, and I am currently looking into completely removing access from the equation, but I still need it currently to run the queries so that they can be forwarded to SQL Server.  Is there a way to send queries directly to SQL Server without needing to translate them all, such as some sort of translation plugin or service I can use?
Answer: Assuming your queries are against regular Access tables, you should be able to replace the Access tables with Linked Tables to your SQL Server.  The Linked SQL tables have to have the same names and structure to in order for this to work.  I don't have the 2008 version of Access so I can't give exact instructions but look in the menus for something like External Data or Link Tables, then look for ODBC and create a "Link to the data source..." and follow the instructions to setup an ODBC data source to your SQL server, you can Google how to setup an ODBC connection if you need to.
You may need to setup the ODBC connection outside of Access beforehand depending on your security settings.  Keep in mind that if your OS is 64-bit you need to use the 32-bid ODBC administrator console to setup an ODBC data source that Access can use. (Wasted a day figuring out that one.)

SQL Server accepting Access queries?


How do I upgrade Ubuntu OS from 32 to 64 bit?

Question: I chose to install the 32 bit version of Desktop ubuntu but due to my lack of knowldege I realised that many softwares were incompatible with the 32 bit version and therefore I needed to use a 64 bit one instead.
Before getting ready to do a clean install of 64bit ubuntu Desktop I wanted to ask if there is an other way of upgrading my operating system without needing to do a clean install of it. Any help would be greatly appreciated!
Comment: what is the OP of free -m pls?
Comment: Raphael & Soren A I dont care about my data guys everything i want is stored into my onecloud.Anyways thank you so much for trying but i think ima go for the clean install.Love this ubuntu forums <3!!!
Answer: As far as I know you can upgrade from older to newer versions of Ubuntu, but not from 32 to 64 bit. Even if it were possible, you could face so many unexpected hardware surprises so I would strongly recommend you go for a clean install.
Here's the link for Ubuntu 16.04.2 Desktop 64-bit iso.
Answer: Practically, you cannot upgrade an OS from 32 bit to 64 bit but there is a workaround: Aptik.

Install Aptik:
sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install aptik

Run, Aptik.
Backup all the required data.
Install new Ubuntu 64 bit.
Install Aptik.
Restore everything.
Answer: If your Ubuntu is recently installed, the easiest way it to make a copy of your data, if any, to an USB stick, and then install Ubuntu 64 bit version using the same partitions you are using for your 32 bit installation.
Answer: There is distrorejuve tool capable of doing this:
https://blog.rimuhosting.com/2018/03/21/32-to-64-bit-distro-crossgrades/
It is called distrorejuve and may help with crossgrade process (while still in beta). --to-64bit switch is doing it; see --help for details
Comment: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes.
Comment: Added tool name and relevant command line options.


What is the difference between MMEL and MEL?

Question: What was the need to introduced MEL if MMEL is there and is less restrictive than MEL ?
Answer: The Master Minimum Equipment List is issued by the manufacturer with the approval of the regulator and can be considered a "global" document you might say.  The manufacturer will work hard to build the mathematical case to make the requirements as broad and flexible as it can. It's an ongoing process, and as the type is introduced and matures, the OEM will continue to increase the scope of the MMEL, because each new item added improves Dispatch Reliability (because more more and more components and subsystems can be inop without needing to be fixed right away).
The MMEL is the foundation for the Minimum Equipment List that the airline uses.  The MEL is an in-house document created by the airline and approved by the local authority.  It'll be based on the MMEL but may have additional limitations imposed by the local authority as it deems necessary for that operation.
It's similar to the Maintenance Program. The OEM will issue a Maintenance Program for a given aircraft type, but each airline will have its own variations by negotiation with its local authority.
Comment: The airline can also opt to not include some items in MEL if it considers ability to dispatch with them inoperative isn't worth the additional procedures it would have to define and train for that case, no?
Comment: Possible theoretically, but I can't think of a case where an airline would do that. Since items are added to the MMEL to improve dispatch reliability by allowing dispatch with inoperative items, by definition the inclusion of an item means there is a net benefit to deferring an inoperative component.  The alternative is a delay or cancellation, and I've never seen a case where that is preferable to an "M" procedure (deactivation by techs) or an "O" procedure (flight crew mitigating action).  Each plane will normally have a box full of deactivation parts like blanking plates in the cargo compt.
Answer: The MMEL should list every piece of equipment and systems with which the aircraft was originally certified. It may place each piece of equipment into the category of being necessary for specific operations. This designates whether an aircraft continues to be airworthy and meets the standards of its Type Certification.
The MEL is a list of equipment that is allowed to be inoperative and the aircraft still be considered airworthy by the operators. While the MMEL is created by the manufacturer in conjunction with the civil aviation authority responsible for type certification and airworthiness standards and determination. The MEL is created by the owner/operators of the aircraft using the MMEL and heir own SOPs as a starting point.


Is there a way to create a Workflow rule to reassign permissions?

Question: After the Opportunity is set to Closed Won we would like only the Administrator and one other Key person to be able to update the record. Can I do this with a Workflow rule or would I have to create a trigger? Thanks for your help.
Answer: What do you mean by "reassign permissions?" You can simply use a validation rule to prevent saving changes on a record based on permissions, no need for a workflow or trigger. What do the Administrator and the other key user have in common? Do they both have the same profile?
AND(
    ISPICKVAL(StageName, 'Closed Won'),
    NOT($Profile.Id = '*insert Profile ID of the admin users here*')
)

This will prevent anyone with that profile from being able to save changes to records once the Opportunity is Closed Won.
Alternatively, if they don't have the same profile, you can do it by User ID:
AND(
    ISPICKVAL(StageName, 'Closed Won'),
    NOT(
        OR(
            $User.Id = '*insert User ID here*',
            $User.Id = '*insert second User ID here*'
        )
    )
)

Comment: Hi Brain, Thanks for your quick response I will get answers to your questions. I am new to this client and Salesforce.


What does roll back mean in Stack Exchange sites?

Question: What does roll back mean in case of Stack Exchange sites? Does it mean to just delete the posted questions and answers or something else?
Comment: You mean edit rollback or something else?
Comment: @ankitsharma the roll back which is mentioned in the clean up badge i.e. the badge we get for first roll back
Answer: It reverts the post to the previous revision overriding an edit revision. After rolling back, the revision to which you have rolled back will be shon in the revision history.
From help center:

A rollback reverts a question or answer to a previous version in the edit history. The rollback action itself then appears as the most recent item in the edit history.

It is explained in detail in What is a 'rollback'? on Meta Stack Exchange.
When we rollback an edit for the first time, we will be awarded a badge named "Clean up".
Remember: A roll back should be done only to override a superfluous or a non constructive edit. See Why can people edit my posts? How does editing work?
Comment: Also worth noting that a user can roll back edits to their own posts without the need to have edit privileges.


RSU or regular stock awards

Question: I am a new "key employee" (VP level) with a startup biotechnogy company. In the letter of offer the company is awarding stock options. Is it better to get RSUs or regular stock awards or both at employment? Advantages versus disadvantages please?
Thank you
Comment: Options are neither RSUs nor stock awards (RSU **is** a stock award).
Comment: Could you please explain a bit further? I am not clear on the response. Much thanks
Comment: Specifically, what does "regular stock awards" mean in your case. As littleadv notes, RSUs **are** stock awards. Do you mean actual stock? Stock options? If options, qualified or non-qualified? Something else?
Answer: A startup tends to offer a few different types of equity compensation depending on size.
The company would offer stock options (either Incentive Stock Options and Nonqualified Stock Options). They are allowed to give $100K of ISOs per year. (Note, if you have early exercise privileges, then only the first $100K worth of shares would be ISOs and the rest would automatically convert into NSOs). Stock options are an attractive way of granting equity for startups because they are very employee friendly. If the company isn't doing very well, the employees can walk away from the options. If the company is doing well, they can exercise and buy into the company (which benefits from the extra cash). ISOs (Incentive Stock Options) are very beneficial because you don't have to pay tax when you exercise them. If the spread between the strike price and the fair market value of common shares (or known as 409a price) is too high, then you may be on the hook for a lot of AMT tax. This is usually the case if the company somehow 40x in a year (in the case of Uber). NSOs require taxes to be withheld by the company at exercise. They are taxed at ordinary income tax rates.
When the company is very young, they tend to offer founder stock and stock options. The strike price tends to be very low (10 cents or something less) and usually the early employees file a Form 83b election (if there is vesting). The Form 83b tells the IRS you intend to purchase all of the shares at the current strike price/fair market value thus locking in your tax cost basis to the current strike price. If you don't file the form 83b (within 30 days of receiving the shares), you may end up having to pay taxes as the shares vest. If the stock price rises, then you may be liable for Alternative Minimum Tax (AMT).
After a point, options may become too expensive for employees (when the value has risen quite a bit). At that point, startups tend to start issuing Restricted Stock Units. RSUs are less tax friendly as they are phantom shares and would never be eligible for long term capital gains until they turn into real shares. As a result, RSUs are usually taxed at ordinary income tax rates. However, the good part of RSUs is you don't need to spend any money to buy them.

RSU or regular stock awards


Massachusetts State Sales Tax and In Store Pick Up

Question: I need to create an option for our customers to be able to select store pick-up under shipping that will include Massachusetts State Sales Tax. We still want to be able to ship to customers outside of the state and not apply the Sales Tax but when I change the tax to be calculated to Shipping Origin then this creates a problem for out of state purchases by adding the Sales Tax.  How do I have a In Store Pick Up option with Sales Tax included and not affect this?
Answer: There are a number of options for Store Pickup via these extensions
To apply tax to purchases from Massachusetts in the admin go to
Sales -> Tax -> Manage Tax Zones and Rates
Click Add New Tax Rate and create the tax rate for Massachusetts and click save.
Then go to Sales -> Tax -> Manage Tax Rules and click Add New Tax Rule.  Here you can select your Massachusetts Zone/Rate and create a rule for when and who to apply the Tax Zone/Rate to (i.e. you may apply the rule to general customers but not wholesalers)
Alternatively this blog explains a way to use Flat Rate shipping instead of an extension. The only issue here is that it takes over your Flat Rate shipping turning it into In Store Pickup.  This may work for your project but only if you do not need Flat Rate shipping.
Comment: Hi I've implemented tax rules above, but it does not calculate tax for "Store Pick Up" Shipping methods.


Google API: Difference between browser key and Android key?

Question: I'm trying to use the Google Calendar API, and I've generated a browser API key that seems to work.  But in the API console I also have the option to generate an Android API key.  What is the difference between the two?  Can I use a browser key in an Android application?
Answer: I'm not sure if it'll work to use a browser key in an Android application, but it doesn't really make sense.
From the Google API docs:

The Console enables you to create server, browser, Android and iOS API
  Keys. Once you've created a key, you restrict where it can be used.
  The available restrictions depend upon the type of key.

Server keys can be restricted based on your servers' source IP address(es).
Browser keys can be restricted based on HTTP referrer.
Android keys can be restricted based on the package name and certificate SHA-1 fingerprint.
iOS keys can be restricted based on the bundle identifier.

It looks like you have to specify a website as the referrer for browser based keys. Since you don't know what the referrer will be in your Android app, it doesn't really make sense to do it this way. With an Android key, you can restrict API usage by the package name.
Also:

Your project can therefore have server-side components in conjunction
  with browser and/or mobile components, without fear of compromising
  your server(s) if a browser key or mobile key is compromised.

If you use two different keys, it allows you to make sure if one is compromised, the others are not. This provides better security for you.
Comment: How would Google API's know that the request came from Android?  Do I have to put that data in the request rather than the URL like I'm doing now?
Comment: @crocboy No, it should know if it's coming from the browser because you're using the browser key, and if it's coming from an Android app because you're using the Android key. I don't think that a browser key will work in an Android app.
Comment: Thanks so much!  Your answer was very well written.
Answer: The Difference is very well explained by @hichris123. However, for the second part of your question i would like to tell you that ideally you should not use browser key in android application.
But in a few scenarios, like while using place api in android, you will have to use browser key instead of android key as Place API only support browser key or server key. It does not support android or IOS key. And if you try to use android key the API will give you an error stating:
"This IP, site or mobile application is not authorized to use this API key. Request received from IP address 126.96.36.199, with empty referer"
So, in above case you will have to use browser key in your Android application.


How is the control unit affected by pipelining?

Question: Compared to not using instruction pipelining. What is different?
Answer: One, the control unit is pipelined. Two, because everything is pipelined, it's busy all the time and must be able to produce at least one instruction per cycle. Third, if you have a processor capable of executing more than one instruction per cycle, the control unit must be capable of handling more than one instruction per cycle, which includes decoding multiple instructions per cycle, preloading memory containing instructions before they are needed etc.


Which topics of mathematics should I need to learn to be a good app developer?

Question: I'm 29 years old. I couldn't continue my studies after grade 10 due to some financial issues and I didn't have time to practice mathematics. It's been more than 11 years since I left studies. Now I want to continue in the field of programming. I have grasped the knowledge of basic programing concepts like variables, data types, conditional statements and loops etc. I guess the next stages are data structures and algorithms. Here the lack of math skills will make it difficult for me understand the concepts. I want to know which topics of mathematics I need to learn to be able to program for mobile app development. Can anyone help me, please?
Comment: Start with some 1-st algorithm or data structure - it will show you mathematics needed.
Answer: An employer needs one person who is good at maths. Unless you go deep into scientific software, 90% of all programming jobs rarely require any mathematical skills at all.
You will sometimes find problems in programming contests that have clever solutions if you have mathematical skills, but often very similar problems have no such clever solutions.
Answer: I assume you are familiar with algebra. You should be comfortable with the concept of functions. You should be able to recognize and categorize basic functions (e.g., linear, polynomial, logarithmic, exponential). If you are not familiar with exponents and logarithms, I'd study those too. This is because the logarithmic function is frequently encountered when discussing algorithms and their complexities. Hope this helps.
Answer: For data structures and algorithms, basic algebra, exponential and logarithmic functions, and a basic course or book on discrete mathematics like one by Kenneth Rosen, should get you warmed up.


Story identification: SF about clouded skies, and people growing mushrooms

Question: This novel begins with a world that has recently become very cloudy - there is constant greyish twilight at the ground level.  Some kinds of plants are dying off, though IIRC people are growing more mushrooms so famine isn't imminent.  The bad guy is a rich fat man who has discovered that in absolutely perfect conditions humans will metamorphose into flying creatures; I think they were more like giant moths than angels or something.  "Perfect conditions" meant getting enormously fat to have enough reserves to survive the metamorphosis, then living in a big bath tub filled with mineral water.  In the end of the book the main character finds the bad guy in this state, in a building so tall it is above the cloud level, and normally only rich people and their servants can go up into the building.  (Not the Clouded World series, if anyone was going to suggest that.)
Comment: Sounds interesting. I'd love to know the answer. That mushroom stuff reminds me "City of Saint and Madmen" by Jeff Vandermeer a little.
Answer: Murray Leinster

The Mad Planet
The Red Dust
Nightmare Planet
The Forgotten Planet

I only saw references to The Mad Planet, they included hazy, cloudy skies and near extinction and eventual evolution of the species, but it did not refer to metamorphosis into flying beings.
Comment: I added links to the Project Gutenberg etexts.
Comment: These stories don't seem to fit the description very well. I haven't actually read them, but it sppears that: the climate catastrophe is not recent, but thousands of years in the past; no buildings or rich fat men, just savages; and the only references to metamorphosis I could find had to do with giant insects, not men.
Comment: It should be noted that Leinster wrote the [*Burl* series](http://www.isfdb.org/cgi-bin/pe.cgi?21729) over a span of several decades, and at the end he changed the basic concept and rewrote the earlier stories to fit. Originally, Burl's adventures took place on Earth in the far future, long after some kind of climate catastrophe; later, they were on a distant planet, which had been colonized from Earth in a strange way. I don't believe this is the story the OP is looking for.