syntax error on php file add to cart
syntax error in case 'remove' when decrementing
Damage reduction and damage resistance: how to calculate? Assume a character has both damage reduction and damage resistance vs an incoming attack.  One example of damage reduction is the Heavy Armor Master feat:     While you are wearing heavy armor, bludgeoning, piercing, and slashing damage that you take from non magical weapons is reduced by 3.   One example of damage resistance is the blade ward cantrip:     You extend your hand and trace a sigil of warding in the air. Until the end of your next turn, you have resistance against bludgeoning, piercing, and slashing damage dealt by weapon attacks.    Let's assume a character with both effects above is hit by a nonmagical weapon attack dealing slashing damage. The attack deals 10 damage. What happens:   Damage reduction applies reducing damage to 7, then damage resistance (rounds down). Character takes 3 damage. Damage resistance applies, halving to 5, then damage reduction takes it to 2 damage. Usage of italics in writing We have two sequences , $(a_i)_{i=1}^{2n}$ and $(b_i)_{i=1}^{2n}$ such that  $1\leq a_i, b_i\leq n$ for every $i$.  Show that there are two sets of indexes $I, J \subseteq \left \{ 1,2, ... 2n \right \}$ such what $\sum_{i\in I}a_i=\sum_{j\in J}b_j$.  Well, the question didn't say anything about those sets being empty but I believe that's not what they meant. I don't know that to do with questions like these. There are obviously much more subsets that possible sums ($2^{2n}-1$ compared to $2n^2$) but it doesn't really help.  I'd be glad to hear ideas, hints or solutions. I am working on an iGoogle-like application. Content from other applications (on other domains) is shown using iframes.   How do I resize the iframes to fit the height of the iframes' content?  I've tried to decipher the javascript Google uses but it's obfuscated, and searching the web has been fruitless so far.  Update: Please note that content is loaded from other domains, so the  applies. What is a field, really? Can not add image inside SVG via jQuery:  tag becomes Asking distant cousins for DNA? In my family we have a DNA contradiction – two cousins (at about the 4th cousin level) took a Y-DNA test, but did not match and had two completely different haplogroups.   Since then, I have traced living cousins with the same surname – the only ones left living that I am aware of – and I would love to pay to have them tested to see if we can figure out where the non-paternity event (NPE) or other event happened (i.e. this new cousin could help us determine which line the NPE occurred in depending on which cousin he matches).   Does anyone have a sample letter, or know the best way to go about asking a distant cousin for DNA?   I have their address and am planning to write a letter, but I can't imagine receiving such a letter, so I am not quite sure how to ask without scaring them off. Where do I put my systemd unit file? "Can't find Project or Library" for standard VBA functions There were so many discussions about an Ubuntu with RR. They were so many pros and contras. At the end ubuntu wont be changed, the 6 month cycle system wont be changed. Thats fine!   But because there are so many people who would like to use an ubuntu with RR Im asking myself why isnt there an Ubuntu Derivate with RR. I couldnt found one, there are a loooot of Ubuntu Derivates but no RR. Is it just impossible? I mean Ubuntu = 6 months cycle, so the derivate have to be a 6 month cycle too? Is there no other option? Or are there already some smart guys trying to solve this problem? Thank you! Are the following sentences grammatical or not? If not, does substituting a to-infinite make them grammatical? (Optional: designate if the sentence expresses purpose, reason, aim, or function)  1 I have decided to purchase a jet for getting to NYC and back more quickly. 2 I have decided to buy a jet for having a quicker way to get to NYC and back.  This is my only reason and aim; this will be the jet's only purpose and function.  3 I hate hairdryers, so I am buying a space heater for drying my hair more naturally, and that is my only aim &amp; purpose &amp; reason and that will be its only function 4 For having a lasting shine in your hair, buy ShineOn Shampoo. 5 My neighbor and I have decided to cooperate more for having a better life together.   Research done: ELL  (Note the  here is a restatement of Cambridge Dictionary's ) ELL  ELL  BBC English  (Currently the best site I've found.) ELU  All of which have answers that I find  (i) incomplete (ii) contradictory (iii) terribly confusing, if not (iv) wrong. To sort through the haze, I am focusing on one issue. Background Some sources say that you need to use a to-infinitive for expressing purpose, aim, function, reason, etc. I find these to be rather hazy distinctions, given that the ODO defines  as The reason for which something is done or created or for which something exists and the same work lists as : aim, reason, function, etc. It is my assertion that at least some of the following sentences demonstrate that one can use the -ing form (be it a gerund, verbal noun, participle) to express individual purpose (aim, reason, function, intention, whatever you want to call it). Do you agree, or not? Why (not)?  In shorter terms, are the sentences grammatical? or do we have to substitute a to-infinitive (including in order to + infinitive) to make them grammatical? (Optional: designate if the sentence expresses purpose, reason, aim, function, etc.) How do I make 'X-Axis Mirror' available in Pose Mode? More often that not, while posing an armature, I want to mirror the pose across the X-axis, so that when I move "brow.L", "brow.R" also moves in the same way.  You can copy and paste a mirrored pose, or select both bones prior to performing a transform, but both of these options aren't particularly good workflow wise.  In edit mode, in the tools panel, under options you can enable "X-Axis Mirror" to copy all transforms across the X-axis in real time, but this option is not available in pose mode.  I'm not very experienced with python, but edit source reveals:  col.prop(ob.data, "use_mirror_x")   My understanding is that "use_mirror_x" refers to a boolean property, but I have no idea how to find where that boolean property is defined or if it would be possible to modify it to get the same result in pose mode.  Any advice on this is appreciated. Maybe there's a better way to achieve this?  Thanks. "He committed a crime killing/by killing a bird" Which wording with kill should be used here:     He committed a crime (killing/by killing) a bird.   My guess is the answer would be by killing. But I am really confused with the answer killing.   My questions relating to this sentence are:   Which one is correct and why? (or are they both correct?) If one of them is incorrect, why is it incorrect? (or, if both of them are, why?) If they are both correct, what is the difference in meaning? If they are both correct, what is the difference in their grammar? What is the point of the Red Thread/Tape around evidence or newspaper clippings? I have seen in a lot-lot of movies that the person who searches for a crime or another person creates a web of red tape or wire around the newspapers and evidence he acquires. I never guessed its usefulness and am therefore asking why do they do it?  Here is an illustration I created: If $|G| = pq$,  $p,q$ primes, $p \gt q, q \nmid p-1 $, then how do I prove $G$ is cyclic without using Sylow's theorems? When running umount /path I get:  umount: /path: device is busy.   The filesystem is huge, so lsof +D /path is not a realistic option.  lsof /path, lsof +f -- /path, and fuser /path all return nothing. fuser -v /path gives:                    USER        PID ACCESS COMMAND /path:            root     kernel mount /path   which is normal for all unused mounted file systems.  umount -l and umount -f is not good enough for my situation.  How do I figure out why the kernel thinks this filesystem is busy? Prove or Disprove the Existence of Solutions... Why can't helicopters reach mount everest? Is it possible to sort non-stackable items in minecraft? are super sweet.  But, I have a skeleton farm, and am getting tons of non-stackable drops.  Since armor can be smelted into iron/gold, I'd like to smelt those drops in a furnace, and burn bows in a furnace.  And trash all leather armor.  Is there a way to sort out these non-stackable items in vanilla survival? less with "update file" like functionality I want to watch a file that gets overwritten every 5 minutes with less. How can I make less follow the new file descriptor instead of keeping the old one displayed? watch "cat file" won't do it because the file is too long to fit into one terminal window.