Adding outlet in middle-of-run

Question: I want to add an outlet in the middle of a run in the garage.  The start of the run has a GFCI outlet with the proper line/load connections.  The 2nd outlet in the run is a regular 20A outlet.   Can I a new 20A outlet after this 2nd 20A outlet but before the 3rd 20A outlet  so that it becomes a 2nd ending point to this circuit?   This allows me to just run one set of romex to the new outlet instead of having to run two.  Thanks.
Answer: You can wire an single additional Romex from the 2nd electrical box off to a 4th for outlets. Just make sure that you use the proper gauge wire (should be 12 AWG for 20A circuit).
If the current 2nd outlet is wired in a manner where the incoming wires are attached to the one set of screws and the outgoing run is connected to the other set of screws on the outlet then you will have to do a little juggling around to accomodate the added outgoing run. I would suggest to remove all current connections off that outlet and use good quality wire nuts of the correct size to join all the live wires (blacks), three from the Romex cables plus a 4th pigtail together. Do the same for all the neutrals (whites). The pigtails would connect to the 2nd outlet to connect it to the circuit. Lastly all the safety grounds (bare or greens) need to be wired together, connected to the box and to the green screw of the outlet.
Comment: Thanks Michael.  I don't plan to do more but is there a limit on how many of these short "one way run" (branches?) I can do on a circuit?  I am fuzzy on if a pigtail on every outlet does this in effect (meaning it makes each outlet end of the run so to speak). If it is, then I think I have answered my question and the "recommended" total number of outlets on a circuit would then be the limit.
Comment: AC Mains wiring is not like high frequency signal wiring Ethernet or Coax TV Cable. The mains frequency is only 60 or 50 Hz depending on where you live. So there is no real limit on how many stubs or branches you make in a Mains wiring installation from an electrical functionality standpoint. There are however a few common sense things that should always be considered. Creating a wiring maze that branches off in every which direction can become a total nightmare for anyone to troubleshoot if a fault ever develops. This leads to a strong argument that it is best to wire (continued)
Comment: (continued from above) using, as much as possible, a straight daisy chain from electrical box to electrical box for each individual circuit from the main breaker panel. There is also a practical limit (and electrical code considerations) on the number of wires that you can stick into one electrical box and interconnect with wire nuts. I would suggest if you routinely find yourself trying to wire nut things together where there are 4 and 5 wires per nut that things are starting to get out of hand.

Adding outlet in middle-of-run


Hard disk health indicator app

Question: Is there an app that can check hard disk health periodically, or an app that just runs in the background that will notify the user that the disk is nearing the end of its useful life?
Answer: The app is already installed and is running in the background if you are using Ubuntu.
You can run "Disks" and see that the disk health is periodically checked.
If you click menu in the upper right corner, you can see SMART data.
If there is some problem, you will get a warning.
Comment: Got: Disks: command not found . Am I missing something else?
Comment: It is not a command. It is a GUI application. You can find it in Dash. The command is `gnome-disks` if you want to start it in CLI.
Comment: smart data and self test : is grayed out.. I guess its actively running in the background ?
Comment: Does it has a notification feature that gives a warning that a disk needs replacement?
Comment: Yes, it does... It may be grayed out if you selected some read-only media.
Answer: One way would be using smartmontools.
I know this is not a unity app but a commandline tool, but it show you the disk health right now.
You can install it using sudo apt-get install smartmontools installed it with apt-get
you can run it using
sudo smartctl -H /dev/sda

This will run a test on the drive sda and print the results.
I hope it helps just a little :)

Hard disk health indicator app


Word for "the ability to understand something without missing context"

Question: Not sure if there is a word for what I am looking for. It is almost something along the lines of like "being able to solve" but it's not really a question or problem you are trying to find an answer to. The closest thing I can think of is "perception", but you aren't really using your senses to understand, it's not something physical that you are able to perceive.
Comment: Do you really mean "without missing context"? That means "with context". I suspect you mean "without context" or "with missing context".
Answer: I think the word you may be looking for is intuitive. From Oxford:

Using or based on what one feels to be true even without conscious reasoning; instinctive.
I had an intuitive conviction that there was something unsound in him


Lightning knowledge advance search behavior

Question: How advance search behaves. Because when I set filters and click apply it will not show any knowledge articles in the surface. We have to type some string in search bar and click enter then only it shows search results. Is this standard behavior?
Answer: Yes, that's expected behavior.
You're applying filters to be used on search results to narrow down what you see. If you don't type anything and click enter, the component will not search or return any results to filter which is why you see nothing.
https://help.salesforce.com/articleView?id=knowledge_lightning_sidebar.htm&type=5


Where is the momentum going?

Question: When a ball of mass $m$ collides elastically having velocity $v$ with a wall, then it retraces itself with the same velocity. Impulse on the ball due to wall is $2mv$ and since there is no external force the same impulse must be exerted on the wall due to ball. But the impulse on the wall is 0 as it has 0 momentum both before and after the collision. So, where is the momentum going
Answer: It's not going anywhere. The wall must be exerting some force somewhere else (for instance, on the ground), which in turn introduces an external force (like friction) that keeps the wall in place when the ball hits it (relative to the Earth, we consider the case where the Earth is moving due to the force below below).
However, oftentimes we approximate physical systems. Consider the case when we assume to have an elastic collision between a ball of mass $m$ and a much larger mass $M \ \gg \ m$. We have:
$$mv_i \ = \ mv_f \ + \ Mv_{f2}$$
Which implies that:
$$v_{f2} \ = \ \frac{m(v_i \ - \ v_f)}{M}$$
We also have:
$$mv_i^2 \ = \ mv_f^2 \ + \ Mv_{f2}^2$$
We then have:
$$m(v_i^2 \ - \ v_f^2) \ = \ \frac{m^2(v_i \ - \ v_f)^2}{M} \ \Rightarrow \ \frac{v_i \ + \ v_f}{v_i \ - \ v_f} \ = \ \frac{m}{M}$$
If we take the limit:
$$\lim_{M \ \rightarrow \infty} \ \frac{m}{M} \ = \ 0$$
Which implies that as the mass gets larger, $v_i \ + \ v_f \ = \ 0$, meaning that $v_i \ = \ -v_f$, and the ball rebounds with the same velocity that it collided with.
Thus we can simply assume that the wall (and I guess the Earth, since the wall is attached to the Earth!) does not move (velocity is incredibly small) and that the momentum is conserved by simply changing the direction of the ball.
Comment: I really hope this derivation is correct, please let me know if I messed up!
Answer: The wall has a large mass, and is attached to an Earth with a Very Large mass. That means that it can absorb momentum without any noticeable velocity.
In numbers, the mass of the Earth is about $6 \times 10^{24}$ kg. A velocity of 1 micron per year is about $0.3 \times 10^{-13}$ m/s; even that tiny speed can absorb a momentum of $10^{11}$.
Answer:
So, where is the momentum going

A force is a transfer of momentum. So if you want to know where the momentum is going, just trace the forces.
The ball exerts a force in the direction of $v$ on the wall, so the ball's momentum goes into the wall. The base of the wall exerts a force in the direction of $v$ on the earth, so the wall's momentum goes into the earth.
The earth is so massive that although it gains momentum, the change in its velocity is too small to detect.
Answer:
Elaborate in detail the conservation of momentum of an elastic ball striking a wall embedded in the earth.

The system includes both the ball and wall-earth. Choose the wall-earth as the reference frame, and assume the ball is moving right, toward the wall-earth, so the velocity will have a positive sign (by convention).
The sum of the momentums of all the elements in the system, in relationship to the reference frame, is constant/unchanged before and after the impact.
The ball, with mass $m$ and velocity $v$ has a momentum of $+mv$ before the impact, and a momentum of $-mv$ after impact.  Thus, because the system had a total momentum of $+mv$ before the impact, the wall-earth must have a momentum of $2mv$ after impact.

Note: The above explanation, and following equation, are an approximation to reality.  Still, it illustrates the principle of momentum conservation (before we complicate the problem and solve it more accurately by considering energy conservation also).

$$p = mv = -mv + 2mv$$
While the wall-earth is massive, it is not infinitely massive.  Thus, when the ball hits the wall-earth and rebounds, the earth and wall both move with a finite, albeit extremely small, velocity.
Because the earth is so large, and its velocity is so small, the amount of energy lost to the earth-wall is very small.  Therefore, in most practical/real-world situations, we assume the kinetic energy of the earth-wall is zero, and that the velocity of the ball after impact is $-v_{ball.initial}$.  But in fact, the magnitude of the ball's final velocity, $v_{ball.final}$, is incrementally smaller than $v_{ball.initial}$, its incoming velocity.
We can compute the velocity of the earth-wall and ball after impact by using the equations of both energy and momentum conservation.  Momentum quantifies the vector aspect of a moving mass and Kinetic Energy quantifies the scalar aspect of moving mass.  Considering both the energy and the momentum aspect of a system gives an additional unique/non-redundant piece of information about the system.  Therefore, having two equations, allows us to solve for two unknowns.
1) Using the principle of energy conservation, the kinetic energy of the ball before impact is equal to the sum of the kinetic energies of the ball and the wall-earth after impact.  Note that energy is a scalar, so we add the absolute value of the energies to compute the total $KE$ after impact.
$$KE = \frac {1}{2}m_{ball}v^2_{ball.initial}= \frac {1}{2}m_{ball}v^2_{ball.final} + \frac {1}{2}m_{wall-earth}v^2_{wall-earth.final}$$
2) Using the principle of momentum conservation, we construct an equation, a relationship, to quantify the fact that the total momentum is the same before and after the impact.  Note that momentum is a vector, so the sign of the velocity changes when its velocity reverses, and this must be included in the equation to represent this vital piece of relationship-information.
$$m_{ball}v_{ball.initial} = m_{ball}v_{ball.final} + m_{wall-earth}v_{wall-earth.final}$$
Summary: Every physical interaction obeys the conservation of momentum and energy.  And, every physical interaction involves/includes an aspect of the transformation of both momentum and energy in the process of a collision of some type.
Note: When the mass of one of the two interacting bodies is $10$ times larger, its velocity after impact will be on the order of $100$ times smaller (because of the $v^2$ relationship to kinetic energy).  Thus, when interacting with planet-sized objects, we typically simplify our computation by ignoring the energy and momentum contribution of the planet. Still, to establish a firm conceptual understanding of the physics behind all interactions, we must at least implicitly acknowledge the miniscule correction to the velocity of the smaller body required by the conservation of kinetic energy and momentum.
Of course, problems/physical-assemblies may be made arbitrarily complex.  Energy may be subdivided into many compartments/types, such as: kinetic, potential, thermal, and work.  Each of these complexifications of the system adds another degree of freedom.  To allow quantification of the final state after an interaction, an additional equation must be constructed for each additional degree of freedom.  This allows us to specify the relationship between the before-after/initial-final states and compute an expected quantitative result.
Answer: Great answers from the other posters- the 'lost' momentum is indeed conserved by a tiny recoil of the wall and the Earth.
You might also be interested in the following observations.
Loosely speaking, when objects interact momentum and energy is transferred between them in such a way that their combined momentum and their combined energy remain the same.
In a simple case of two bodies of identical mass colliding, the effect of the transfer of momentum on their speeds is the same- one body will slow down and the other will speed up by the same amount. (Incidentally, the question of which body gains momentum and which loses it depends on the frame of reference in which the collision is modelled.)
If the two bodies have differing masses, the effect of the collision on their speeds will be inversely proportional to their masses- the speed of the lighter body will change more than the speed of the heavier one. In an extreme case, such as a ball bouncing on the ground, the speed of the Earth's recoil is negligible.
Kinetic energy is also transferred in collisions. Since the change in KE is proportional to a change in velocity squared, you will see that in the case of a ball bouncing on the Earth effectively no KE can be transferred from the ball to the Earth, as the square of the Earth's recoil velocity is vanishingly small.
From those ideas you should be able to see that in a head-on collision between two bodies the transfer of momentum is minimised when they have the same mass, but the transfer of KE is maximised.
The overlooked recoil of the Earth figures in all everyday phenomena involving moving masses. When you start to walk down the street you gain momentum and the Earth in recoiling from the thrust of your step loses the same amount.

Where is the momentum going?


What is French couscous?

Question: In the US some supermarkets carry several varieties of couscous in their bulk sections, one of which is labeled French couscous. How does it differ from the other varieties of bulk grains called couscous?  Is it just a matter of shape?
Comment: It's not a grain.  It's actually a form of pasta.  And no idea on the French stuff. "Israeli couscous" is the only named variety that I'm familiar with, and it's not really couscous.
Comment: French couscous (as in couscous sold in france) is normally quite small and quick cooking (in fact you can just pour on boiling water, cover and leave for a few minutes).  This is the default here in the UK too, where larger types are often called "giant couscous".  I can't answer for American terminology though
Comment: Our local Whole Foods stopped carrying what they call French Couscous in the bulk section and I wanted to order it online.  The obvious difference with the couscous in the other bin was the size of the grains but maybe there is also a difference in how it is manufactured.  The semolina can be soaked with different liquids (water, eggs whites, milk) and a variety of flours can be added or not before the rolling and forming.  Before I can order it online I need to figure out what I used to buy and I have very little to go by except the name used by Whole Foods.
Comment: You don't mean something like this do you? http://img.21food.com/20110609/product/1211847925968.jpg

French couscous typically refers to the style in how it's cooked, not a difference in the grain. Do you have a brand or picture available? Are there any added ingredients or is just sold as plain bulk?
Comment: Seems like it might be a name unique to Whole Foods perhaps, maybe used for marketing purposes (remember 'asparagus water'?) - Seems the safest bet is to ask your local Whole Foods (they were always very accommodating when I asked my local).. note the basic types of couscous here: https://www.thespruce.com/types-of-couscous-1809217 - maybe they had a subform of one of those, perhaps manufactured in France and they just labeled it as such.
Answer: My guess is that what they call French couscous is really Lebanese couscous in marketing disguise. The Lebanese speak French, and calling it Lebanese might put people off due to their political leanings. French is probably just more palatable. Kind of like creating the term canola oil in favor of trying to market rapeseed oil.
Comment: Canola can also be trademarked, which is how people protect food names in the US  (eg, apple variety names).  And it's specifically rapeseed oil low in erucic acid.  that's the 'la' at the end (Low Acid))
Answer: Couscous is balls of crushed durum wheat semolina, essentially a pasta.  It is a staple in the countries of North Africa, but has also become common in many countries in Europe and North America.  I have found no indication that "French" couscous differs in any way from traditional couscous.
Answer: Okay yes canola also has other aspects for its name. Other examples of renaming are nyjer birdseed and orange roughy fish (aka pacific slime head).
The bag of 'French' couscous I made last night went wonderfully with the braised lamb with vegetables, clementine, and kumquat stout stew. The balls were about the same size as lentils, bigger than Israeli couscous.
Comment: This does not answer the question. It's probably a comment on another recent answer.

What is French couscous?


Why can you only measure velocity or location in a particle?

Question: I was talking to a family friend in the field of optics at a quantum scale (not sure the proper name for this) and he was explaining to me why you can only determine either the velocity or location of a particle but not the other. He watered it down for me and told me this: You have an initial equation describing the particle (maybe the Schrodinger equation, but I'm not sure) and the Fourier transform. He said the Fourier transform is an operation. You can use the Fourier transform turn the equation into a new one that describes the velocity precisely, but the position less precise, or you can use it to find the location precisely, but the velocity imprecisely. He said it is irreversible so once you do the transform, you can't go back. My question is: why can't I copy the initial equation down on another piece of paper and give it to somebody else to find the velocity while I determine the location?
Answer: The no cloning theorem (which follows directly from linearity of time evolution) says you can't make a copy so you can't do that.
But that is not the point. The point is that you can make a state and even of you made a thousands states just like, the state itself will not give good results for position and good results for velocity.
There are states that give good results for position and states that give good results for velocity. But one that is really good at one is bad at the other.
So when you pick a state to have lots of you can pick one that is good at position or pick one that is good at velocity.
So why can a state be good at one and not the other?
First, keep in mind that when you get a position or a velocity you generally change the state. And position and velocity are things where the order you do them always matters. So the states you turn something into when you get position must be different than the thing you turn it into when you velocity (otherwise if it was a state that was a final state for each then neither would change it and the order wouldn't matter for that state but for positions and momentum the order always matters). So this indicates that when you measure position and then velocity and so on that you are getting different results. So a good position gives in good (can be different) results for velocity and vice versa.
So you might then ask why position and velocity have to have the order matter. Some people actually say they use that fact as the basis for getting all of quantum mechanical (technically it isn't velocity it is momentum they use and even more technically it is canonical momentum they use, not kinetic momentum). So some people will stop there.
But they aren't being totally honest. That would be valid if they got everything from that, but they do actually have to generalize it to get everything they have to generalize it to a general Poisson brackets go to an imaginary times a commutator. And just one of those is enough. Having the time evolution is enough to explain everything that happens in time.
So a true and proper explanation would have to explain how you get the results over time. Bit it doesn't end up being different, over time you get the initial state to split as the different options become entangled with the different states of the measurement device and they do it with sizes of the branches that lead to certain frequencies of results as measured by separate devices that measure frequencies.
And then the frequencies follow the same rules that position and momentum can have a small spread of values for one of them or the other one can have a small spread of values. And since the order you do them (now a dynamical consequence of the dynamics of how you actually measure them experimentally) matters for every state then again this is forced upon us. And if you want to compute the spread of values you get from repeated interactions, then you can find the spread of one is given by the standard deviation of a function and the spread of the other is given by the standard deviation of the Fourier transform of the first function
But those equations are just equations, nature doesn't pass along copies of the equations it just dynamically evolves.
Answer: You cannot simultaneously determine the position and the momentum of a particle for exactly the same reason that you cannot simultaneously determine what I am eating and what I am jumping over --- namely, I never both eat and jump at the same time, and a quantum particle never has both a location and a momentum at the same time.  (Usually, it has neither.) You can force me to eat, and observe my food intake, but then I won't be jumping.  You can force me to jump, and observe what I jump over, but then I won't be eating.


Are there any websites that have Maqam Based Torah recitation recordings online?

Question: Similar to the maqam based Quran readings maybe? I always hear people talking about those.
Comment: Most users here are not familiar with what you mean by "[s]imilar to the Quran readings". Can you elaborate so we can find you what you are looking for?
Comment: I've seen the Muslims chant the Quran a couple times on YouTube and what not. It's pretty cool and they have great voices.   Im just looking for a recording of a good recitation of the Torah being chanted in a good tune. Also fast paced preferably.
Comment: https://www.tiktok.com/t/ZPR3cW2Pm/ I found this example by searching it up on TikTok. I don't agree with what Islam teaches but they sure do know how to chant lol
Answer: https://www.vayavinu.com/main-leining-page
This is Rabbi Jeremy Wieder's recording; this is how it sounds when read from a Torah scroll in the synagogue. (In the original Hebrew, with the traditional cantillation, as pronounced by Jews of East European ["Ashkenazic"] ancestry.)
Comment: Note this is Ashkenazi
Answer: Beautiful recordings by parsha of the entire Torah and the Haftarot here. They are recorded in traditional Egyptian Karaite melodies. Sometimes it sounds a lot like the Muslim call to prayer.
Hazan Rotem Cohen has an amazing voice and the recordings are crystal clear.
He was on Israel's "A Star is Born." More about him here.
Comment: Thank you!!!!!!! This is exactly what I wanted.
Comment: The Egyptian Karaite tradition uses a modified form of Sigah like almost all Sepharadim
Answer: https://pizmonim.com/section.php?maqam=Pentateuch
Recordings of all of the Torah readings according to the Syrian rite (which indeed has a defined maqam for each week).
Note: The maqam of the week impacts prayers. The Torah is always chanted in the same Maqam style of Sigah (Huzam for Egyptians).


Concrete driveway cured too soon and surface cement washed away

Question: I had someone pour a concrete driveway for me.  About 6 hours after it was poured it felt like it had solidified and was now only a little damp so I wanted to start curing it.  I used a hose to spray it using the finest mist setting on the nozzle.  In one area I noticed a few spots where the misting left a darker color and texture from the rest of the slab. When I touched these spots they were not as hard as the rest of the surface and some concrete would come off on my finger. I am guessing in these spots the concrete had not completely set yet or didn't set right and just the misting washed off the top layer of cement.  However on all the other areas of the driveway I tried turning up the water to a full spray and really soaked it without anything like that happening so I don't know why in those few spots just misting would cause problems.
The next day the concrete had dried and these spots had a big difference in color and some difference in texture than the rest of the driveway.  Is there any way I can get this area to look like the rest of the concrete?
Answer: Go back in time and wait 24 hours before using the hose. Then use it a couple of times a day for a month.
Other than that, or replacing the whole driveway, probably not. You could do various things to the surface spots, but they are exceedingly unlikely to match the rest of the surface.
Answer: 6 hours after the last amount of concrete was placed and finished by the installers the concrete surface, although not fully cured, should have set up enough (and been firm enough) to not have been effected by a misting of water. (unless an additive was mixed in to slow the curing time). I'm not pointing fingers, but why after misting the concrete and noting that the water caused a detrimental reaction, why would you continue using the hose by "turning up the water to a full spray and really soaked it...". That doesn't make sense. The only way that might repair the marred areas would be with a grinder with a concrete polishing disc attached. here is a link: https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=concrete+polishing


cant reset disabled iphone 6s plus

Question: my iPhone is completely disabled due to too many failed password attempts. it says in the screen "iPhone disabled connect to iTunes" but i dont have a mac-book. i also want to reset my iPhone with the buttons but when i press and hold both power and home button (how it says you reset it) it just turns back on to the same screen that says to connect to iTunes. can someone please help!!
Answer: Download iTunes for windows here and follow the recovery procedure.

cant reset disabled iphone 6s plus


Can a familiar translate for the owner?

Question: For example, a sprite knows Elvish and Sylvan. Assuming the owner does not speak these languages themselves, would the sprite be able to translate for the owner? What about the pseudodragon which understands Draconic and has the "Limited Telepathy" feature?
Comment: @Akixkisu That clarification is unnecessary—this question is not so broad that including all familiars is going to be a problem. Frankly, I strongly suspect the answer is the same for all of them anyway. There is no need to limit this question, or to explicitly state that it isn't limited.
Comment: @Akixkisu Yes, it could arguably include those, though frankly that's a stretch and I doubt voters would ding answers that didn't. But either way, *that's fine.* It's OK that for querents to be unfamiliar with the breadth of the material and not realize there's more out there that may affect things—answers addressing that and expanding their horizons is a **feature**, not a bug. This question can be answered as-is; it might be a somewhat larger question than the querent imagined, but it's not too large. And since it can be answered as-is, it should not be closed.
Comment: Are you asking about all possible familiars or a specific kind of familiar such as the one you gain by casting the find familiar spell?
Comment: @KRyan the problem here is more that the source of the "familiar" is unclear. Familiar could entail, especially when asked by someone who isn't an expert in the system, various creatures that don't behave like familiars gained by the find familar spell - such as steeds from the find steed spell.
Comment: @KRyan It would be great if the querent added those. For your information - I'm not voting to close.
Answer: Any creature can act as a translator
Under RAW, languages are binary: either a creature doesn't  know a word or they are completely fluent and their vocabulary is 100% complete. If they know two languages, there is no reason that they cannot act as a perfect translator for two other creatures that know only one of those languages.
It doesn't matter if the creature is a familiar or not.

Can a familiar translate for the owner?


Is it possible to burn things in a halogen atmosphere?

Question: Fires can burn in oxygen. But, can they burn in halogen atmospheres (fluorine and chlorine only)? I am wondering this because combustion reactions involve oxygen and carbon and other elements. But, can they burn in fluorine and/or chlorine? If they do, what color will the flame of paper and wood be in fluorine and chlorine atmospheres respectively?
Comment: Certainly can in fluorine, it has been used as a rocket fuel despite the obvious difficulties in handling
Comment: Most things burn with selfignition in ClF3, including glass, sand, asbestos and human body
Comment: Titanium metal will ignite and "burn" in bromine, so I expect it also will in F and Cl.
Comment: [Here's a video of a BRICK burning in fluorine gas](https://www.youtube.com/watch?v=wqLnSkLalOE)
Comment: See this answer: https://chemistry.stackexchange.com/questions/27465/can-paper-burn-without-oxygen-or-air/104156#104156
Comment: Also see: https://chemistry.stackexchange.com/questions/64541/is-oxygen-necessary-for-burning/64546
Comment: I saw titanium ignite and burn in liquid bromine at room temperature; I didn't see much as we were running to the lab door.
Answer: They certainly can. Put some water in the bottom of a beaker, fill the beaker with chlorine gas, and drop in bits of calcium carbide. The carbide will produce bubbles of acetylene, which will spontaneously burst into flame when they hit the chlorine.
Flame colors depend on many things, even in oxygen. In general, flames in a chlorine atmosphere will probably look slightly more greenish than flames in air or oxygen, simply because the gas itself is green. Fluorine isn't as strongly colored, and flames from combustion in fluorine will be VERY VERY BRIGHT.
Answer: Fluorine gas definitely supports flaming combustion.  And does so more than oxygen.  Very dramatic, actually.  Chlorine, less so than oxygen or air, but still possible in right setting.
See below for examples of fluorine flames.  Examples are not in $100~\%\ \ce{F2}$ environment, but should be obvious that $\ce{F2}$ makes more flames than air.  In many cases, no spark is required for flames to start.
https://www.youtube.com/watch?v=vtWp45Eewtw
Here are some demonstrations of flames in straight $\ce{Cl2}$ (no oxygen):
https://www.youtube.com/watch?v=MtygiCwnEzw
https://www.youtube.com/watch?v=aK85PZX2xNE
Answer: Note that forming  flame is not limited to the particular environment like gas containing enough of oxygen, even if we are used to that.
I remember an experiment in the high school chemistry class, where the lecturer presented oxygen being burnt in flame in atmosphere of hydrogen.
For a flame, several conditions must be met:

There is ongoing fast exothermic enough chemical reaction ( or there is provided intensive external energy like MW powered argon plasma in ICP )
Reaction must provide gas, or occur in  already existing gas.
Gas must be heated by reaction enthalpy enough to form ions, radicals, excited molecules or atoms, actively emitting light by releasing excitation or recombination energy in form of visible light.
The flame occurrence depends on scenario. Oxidizing and oxidized stuff may come into contact at contact area (flammable gas output lighted to prevent gas accumulation), in whole volume (welding by acetylen - oxygen flame ), or a chemical stuff burns itself, being a mixture(black gunpowder), or containing oxidative groups ( explosives and smokeless gun powder staff )
Flame color depends on emission lines of above mentioned excited particles and there is no general answer.
Comment: Just to keep things confusing, it's possible to have flame _without_ gas as a reactant or product; "solid flame" is a thing. [Tantalum and carbon, mixed thoroughly enough, sustain a propagating exothermic reaction that does not melt or vaporize either reactant.](https://www.sciencedirect.com/science/article/abs/pii/S0010218015003818)
Comment: @jeffB Well, it is still possible to create a flame within non involved gas.
Answer: Most chemists understand that Pyrex glass is an extremely stable formulation which is part of the reason it is used in chemistry. But if you introduce a hot piece of Pyrex borosilicate glass into an atmosphere of fluorine, the Pyrex will actually burn. Try to imagine a more unlikely scenario than burning glass. An elemental fluorine atom's need for an electron is overwhelming.


Jumpy CSS transition in sidebar links text while toggle transition is running

Question: When collapsing, the text adapts to the width of the sidebar progressively which causes a jumpy transition
I would like to know if there is any mechanism to show the text only when it fits 100% in the sidebar and it is not cut in two lines.
I need is the text to appear only after the transition of the collapse has finished.
What I've tried:
-Increasing/decreasing the transition time (too radical, works if I delete the transition but somehow has to be smooth so it's not a valid solution)
.sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 290px;
    background: #193D4C;
    z-index: 100;
    transition: all 0.5s ease;
}

-Using backface-visibility property. Did not work.
-Using Bootstrap 5 event type shown.bs.collapse like this:
var myCollapsible = document.getElementById('sidebar')
myCollapsible.addEventListener('shown.bs.collapse', function () {
  alert("it works!"); //This never gets fired
})

I've been looking for a similar question for a long time but I didn't find anything
Comment: I would not animate `width`. It manipulates with layout (cumulative layout shift + browser has to recalculate layout) and [width is not very efficient in animation](https://pqina.nl/blog/animating-width-and-height-without-the-squish-effect/). I would rather think about `transform` with something like `translateX()`.
Comment: @Jax-p Sounds promising, could you provide an example?
Answer: add the following CSS class to the text element:
.dont-break {
  min-width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

example https://jsfiddle.net/Lnqpcujm/5/


How can I search for pictures containing two people in Lightroom?

Question: I know how to search for pictures containing "Mary" or "Frank" in my Lightroom library, but is there a way to search for pictures containing both "Mary" and "Frank"?
Comment: Can you use a Smart Collection as in: [Filtering by multiple tags in Lightroom](https://photo.stackexchange.com/questions/5251/filtering-by-multiple-tags-in-lightroom?rq=1)?
Comment: Unfortunately the SC doesn't allow me to choose by person @BioGeek
Comment: I propose another approach in the answer to a similar question: http://photo.stackexchange.com/a/83416/11319
Answer: Assuming that the photos are tagged with the name of the person as keyword you can do it with these two ways:
Using the Textsearch:

Go to the library menu in Lightroom.
Select the library filter "Text".
Set the first dropdown field to "Keywords". (Default "Any Searchable Field")
Set the second dropdown field to "Contains Words". (Default "Contain All"?)
Enter your search in the textfield next to it : Mary, Frank
Lightroom should now display all photos containing the keywords "Mary" AND "Frank"

Using the Metadata filter:

Go to the library menu in Lightroom.
Select the library filter "Metadata" you should see multiple filters for different types (e.g. Date, Camera ...)
Click on the name of one of those filters (e.g. date), select keyword as new filter type
Set another filter to be a keyword filter. You should now have two filters where you can see your keywords.
Select the first keyword you are looking for ("Mary") in one filter. The other keyword filter should now show less keywords, as it will only show keywords of photos which also have the keyword "Mary.
Select the second keyword ("Frank") in the other filter, where you did not select Mary.
Lightroom should now display all photos containing the keywords "Mary" AND "Frank"

You can extend this with more keyword filters if you look for more persons.
If you select multiple values in one filter, Lightroom will show all photos which include atleast one of them (OR).
The first approach should be easier and faster. The metadata filter approach can be interesting for browsing.
Comment: @Thomas I have to look at the text search again. But it should work using the metadata filter as it will look only for the specific keyword `Mary`there.
Comment: Well done, I ignored that the persons where translated as keywords. Any way to distinguish `Mary` from `Mary K`?


Issues with Wordpress permalinks

Question: I am new to wordpress but have experience in Drupal. I am developing wordpress site which I access as localhost/site1. I created another copy of it to experiment a few things. I can access another site as localhost/site2. The strange thing I see now is whenever I click on a post from localhost/site2 it takes me to localhost/site1. For example I am taken to localhost/site1/my-post from site2 when expected is localhost/site2/my-post. Then I checked the database and saw the links were stored in posts table in guid column. I was expecting only relative URLs to be saved in tables(as in drupal) but here the full URL is saved in database. How can I make all URLs as localhost/site2/my-post? Also how can I make this work when I move it online to a particular domain ?
Answer: This is a typical issue when moving WordPress sites. WordPress stores URLs - both main configuration URLs and resource URLs - in the database. These must be changed in the database when moving to a new domain or mail URL in localhost.
Don't use simple SQL change queries in the database via adminer or phpmyadmin. WordPress and some themes store configurations and URLs in serialized data, which a simple SQL query won't correctly handle.
See Moving WordPress « WordPress Codex for full details on moving Wordpress and WordPress Serialized PHP Search Replace Tool to correctly find/replace URLs in the database.
Answer: The quickest and most hassle-free way is to download the database via phpMyAdmin, do a search and replace on the domain name and then re-upload the database. Good luck!

Issues with Wordpress permalinks


Notepad++ space within a keyword in Autocomplete

Question: I created my autocomplete file after reading some documents. The problem is i cant add space within a keyword. My keyword is "define method .xx"
But notepad++ recognise all of the worda separately.
Is there any way to do it.
I read somewhere that i will have to edit some notepad files in c.
I am pretty new, so please can anyone guide me. Any help would really be appreciated.
Answer: This seems to be impossible.
Citing the documentation article
Auto Completion in Notepad++,
section
How to create keyword auto-completion definition files:

The basic character set used to recognise keywords is made of
  letters a-z, A-Z, 0-9 digits and the underscore. In future release of Notepad++, you will be able to add more characters - the dot is a likely candidate - by specifying the additionalWordChars parameter in the environment. The value will be a string with all the extra parameters without any separators. However, this additionalWordChars is still not working (Notepad++ v.6.5.2)!

The blank is not listed here as being one of the characters that you
may include in an auto-complete keyword.


Why did my main circuit breaker trip before the branch circuit breaker?

Question: As per my knowledge, the overload current will trip a circuit breaker and will burn the fuse of any fused switch. How come when my main breaker failed (because of the steamer I reckon because it happens every time we use it) the fuse of the switch that held steamer socket + the ELCB didn't trip (It jumped directly to the MCB)?
Answer: "Circuit breaker coordination" is the term used when setting up multiple breakers / fuses. The trip curves overlap and in many cases a small breaker can take longer to trip than a large breaker.
One example I can provide is this: the plant I work in was not built with the same brand breakers. In one area an 800 amp main will trip out prior to the 400 amp mcc feeder or the 100 amp breaker on the motor overload bucket. The cost to coordinate these breakers to the correct ones would be several thousand dollars and it happens so infrequently that the owner is OK with the occasional down time. By comparing the curves of the different types of breakers you can see that fuses and small inverse time breakers will hold at 4-6 times their rated value for a short time.
So depending on the loading of the circuit and type of breakers used, if not well coordinated, the main will open before a much smaller breaker protecting the wiring but dropping power to everything. A well coordinated system takes planning and the correct breakers and fuses to prevent this from happening.
Comment: Explains a situation I had last year. Yard workers hit the 30 amp lines to my shed with a trencher. Popped the breaker to the house, not the shed.
Comment: I know zilch compared to the professionals on this site, but, Machavity, if the trencher shorted the lines *from* the house (where the panel is) *to* the shed, this presumably would not result in a high current in the cable between the damage point and the shed. On the other hand, if this damage point was *beyond* the shed, say to a line *from* the shed to an outdoor receptacle, then this would be different.
Comment: @Jim stewart, I believe the 30 amp that supplies the shed breaker did not trip but the main did,  This would not surprise me with a short. As I posted I have seen a 800 trip without the smaller breakers tripping and the short was protected by a 100 amp breaker. Total load on this feeder is close to 400 amps when everything is running. So there is tons of head room.
Answer: It's very typical for the MCB to also be an RCD, and perhaps the device failed with a ground fault condition, causing an RCD trip rather than an excess current trip.
So are you going to get rid of that steamer, or what?  If a device trips a circuit breaker everytime you use it, stop doing that!   When a breaker trips frequently, that ages the breaker, that thing may not trip one day, and then, you'll trip instead! Or one of your family.
Comment: @Jim that depends if the fault chooses to cooperate. Many faults are like VBO devices, they don't flow below a certain voltage, so a DVM may not reveal them.
Comment: If a given appliance has a leak to ground, will that be revealed with an ohmmeter between the hot and the ground or the hot and the case? Can an  appliance like a steamer leak current to a floor or a wall sufficient to trip a RCB?
Answer: LH where are you? Reference to a fused switch indicates to me you are in the UK. I am guessing that a fused switch is a way of connecting a spur to a ring circuit. We don't use that in the US so I am sorta guessing that the current in the ring could be near capacity and so if one connects an additional significant load to a spur (which is below the rating of the spur fuse in the switch) one could trip the main breaker and not burn out the fuse in the connection to the spur.
If this is so, you should be able to operate the steamer on this circuit if you switch off enough other loads before connecting the steamer.
Comment: Hi. I am based in Bahrain. We operate with a UK system I believe.
Comment: How was this resolved? Did you repair or replace the steamer? Or did you discover that there was a problem with your house wiring?
Comment: Actually I have took the steamer to the agent for a repair, didn't hear from them since about 2 weeks, but since then no trips happened!


Create Live ISO from installed Ubuntu with data for future install like SUPER OS

Question: is there any way to backup as ISO of my current Ubuntu OS with all installed data like SUPER OS. Or, anyway to make like live ISO from my installed Ubuntu with apps, that i will installed it later with installed data,apps etc in my PC or someone else.
If there any solution please reply.
Thanks
Answer: The Systemback tool allows you to create restore points, backups, and live images of a running system.
I use it to make a "Master Backup" if something is really broken. Systemback creates a full system image for restore, either save it to USB or create a bootable Live CD (ISO file) with option to restore full system.
You won't find Systemback in the standard repositories, so you must first add the repo with the command:
sudo add-apt-repository -y ppa:nemh/systemback
Update Repo:
sudo apt-get update
Install Systemback:
sudo apt-get install systemback
Run Systemback from Dash, if you need any other guidlines on that tool ask here or check the Google how to run it, there are some usefull guides on it.
EDIT: Try this guide


tensorflow multi GPU training

Question: I created a multi GPU training system following this tutorial on tensorflow 1.2.0:
  https://github.com/tensorflow/tensorflow/blob/r0.10/tensorflow/models/image/cifar10/cifar10_multi_gpu_train.py
Before creating the multi GPU version, I was able to fit a batch size of 64 on a single GPU. I thought if I created a multi GPU version of the code following the above tutorial, I could fit in more batches through data parallelization. I was hoping to use 4 GPUS each with a batch size of 64 but I am facing out of memory issues. I am only able to use 2 GPUS for data parallelization when using a batch size of 64 and only 4 GPUS when using a batch size of 32. On using more GPUS for either cases, I get the following error:
<code>tensorflow.python.framework.errors_impl.InternalError: Dst tensor is not initialized.
</code>
On some googling, I found that this error occurs when the GPU runs out of memory. I dont understand why this is happening. I have 8 nvidia titan cards with 12 Gigs of memory each on my machine. I dont understand why when I can fit a batch size of 64 on a single GPU, I am not able to fit the same batch size of 64 on more than two GPUS. Why is the memory getting saturated? Is there some overhead which increases on increasing the number of GPUS being used?
Answer: may be it missing variable scope define in front of the loop
<code>   with tf.variable_scope(tf.get_variable_scope()):

        for i in xrange(FLAGS.num_gpus):

             with tf.device('/gpu:%d' % i):
</code>
Comment: I am using the name_scope as specified in the tutorial. I am not missing the scope, unless you are saying that I should replace the name_scope with variable_scope?

tensorflow multi GPU training


Once I put in a screw with a dry wall anchor screw, can I remove the screw and replace the screw without ruining the anchor?

Question: I want to mount plumbing pipe on dry wall as a curtain rod. I have dry wall anchor screws. The style of curtain I have will require me to remove the bracket from the wall to be able to take the curtain down (to wash it). Once I put the screws in with the anchors, can I remove the screws later without ruining the anchors?
Comment: Depends on the anchor. I do have to ask, though...how often you have to wash your curtains?
Answer: I don't know where you are, so while products examples mentioned are sourced in North America, they are widely available under different names.
My first and best idea is to use a rod that doesn't require you to unscrew anything, like this:

Next would be hollow wall anchors that unscrew gracefully:

Last best would be screw in anchors:

(edit to add...) The bad thing about these is that they can come out with the screw if the connection between the drywall isn't great. (In other words, if they're put in badly, they can spin out.) (Thanks to @batsplatsterson for reminding me of this.)
Comment: The hollow wall anchors are a good idea, but the last suggestion , plastic screw in anchors, would not work well.  When you unscrew, the screw will stay in the anchor and the anchor will come out of the wall.  The metal ones are supposed to work better if you have to unscrew, and the sometimes do, sometimes don't.
Comment: Thanks, @batsplatsterson, I'll edit my answer to address the point you raised.
Answer: Replace the plastic anchors with small wing bolts.  If you have to remove the pipe again, don't worry about losing the wing part of the bolt since it will drop down inside the wall.  Just use another wing bolt when you reattach the pipe.  There is the added benefit of a superior attachment vs plastic anchors that usually get loose and fail.
Comment: Thanks for the answer; keep 'em coming. But, we don't sign our answers; you can put anything you want to tell about yourself in your profile.
Answer: Use these toggle anchors for the best results.
They are the strongest drywall anchors you can find plus They have the added benefit of the  Metal  toggle part having machine threads to except the machine screw so once they're in place you can undo the screw as many times as you want without affecting the quality of the  holding power. .
Comment: That link shows several different types of anchor. Some of them will tend to fall down inside your wall when the screw is removed...


Create a detailed user profile with composite c1

Question: How would I create a detailed user profile with composite c1? In the profile will include:

User name, age, favorite articles, vote count, article written
Real name, comments by the user, etc.

Is this possible to do in composite c1?
Comment: Are you going to extend the user profiles for C1 console, or you're using the Extranet package?
Comment: I am going to extend the c1 console. Is there any documentation on how to do this?
Comment: I mean those users will be logging in your website or to its administration console?
Answer: C1 holds the username and usergroup in a Composite datastore:
~\App_Data\Composite\DataStores\Composite.Data.Types.IUser_Published.xml
The development of C1 continues at a great pace and therefore it is not recommended to alter any of the core workings of C1 as the likelihood of future upgrades could overwrite your changes or at least make it difficult to upgrade.
I solved the detailed user profile requirement by creating a new Global datatype I named simply "MyData.Users", holding the users first and last name and lots more different profile details. I ensured that my new Users datatype had a Unique Identifier GUID field, to record the GUID of the IUser unqiue id from the Composite.Data.Types.IUser_Published.xml store.
Creating your own separate datatype within C1's console/dashboard using the naming conventions as recommended in C1 documentation ensures that you can easily identify your own datastores but also that those datastores become available within C1 everywhere so that you can easily attach functions etc to set;get; your custom data.
By calling the C1 built in class UserValidationFacade in the following way:
        var userName = UserValidationFacade.GetUsername();
 in your codebehind you can identify the currently logged in user's Username and GUID.
Then pull the profile data from the correct row in the MyData.Users datatype matching the Username/GUID to display in any way that you like within your website.  ;)
C1's own forum has many great answers too with a great bunch of folk helping each other:
http://compositec1.codeplex.com/discussions
I have used this method to create a sophisticated profile which you can freely register and then see in this MyRentals site


Download Manager with priority (Java, Android)

Question: I'm doing a little download manager within my app. I was using
ThreadPoolExecutor threadpool = new ThreadPoolExecutor(1,210, (int) 210, TimeUnit.SECONDS,new ArrayBlockingQueue<Runnable>(210), new mThreadFactory());

and calling the following method for order the downloads:
threadpool.execute( new DownloadRunnable(url) );

Recently I changed a little my app and now I need to distinguish two kinds of downloads: Foreground Downloads (for elements that need to be shown to the user asap) and Background Downloads for saving a Internet resource at the disk for example.
I want some kind of pool executor always when picking the new element for download priorize Foreground downloads if exists and else download a background resource.
Can someone guide me with that solution?
Thanks in advance
Answer: You can use a PriorityBlockingQueue instead of your ArrayBlockingQueue and give the foreground downloads a higher priority.


Update data in database with pdo?

Question: I recently made a CMS with mySQL and PDO following a video tutorial from PHPAcademy on youtube.
I want to add an edit function to it though.
I have the page done, but not the PHP to update the data.
So, I'm wondering, how would I update data in the database with PDO and save the new data?
I have this:
$query = $pdo->prepare("UPDATE articles 'article_content'=? WHERE 'id' = ?");
$query->bindValue(1, $_POST['content']);
$query->bindValue(2, $_POST['id']);
$query->execute()

;
Comment: You have to use a *correct* SQL statement.
Answer: You are missing the keyword SET in your query
It should be
$pdo->prepare("UPDATE articles SET `article_content`=? WHERE `id` = ?");
                           ----^

Comment: oh, I'll add that later when I get home.
Answer: You have 2 issues:
"UPDATE articles SET  `article_content`=? WHERE `id` = ?"

One you are missing SET.
Two you are using single quotes for column names;use backticks

Update data in database with pdo?


New Message Notifications and Unread Message Counts across Clients

Question: This UX question is unusual in that it deals with the user experience across several devices and modalities, and not just within one screen.
Suppose you have a chat app that can be accessed from various clients running on laptop, tablet, mobile, etc. Messages come in and are sent to all participants in the chatroom. At any time each client might be "online" or "offline" relative to the server. Sometimes the chatroom is visible in the client, other times it is in some hidden tab, i.e. not shown.

Suppose the user subscribed to get offline notifications for new messages in the chat. When do we send them?

One case is easy: if no clients are online. But what if one client is online and the chatroom is in the foreground? So the message has been "seen". But what if a person leaves a chatroom open on their desktop and walks away with their phone? Throughout the next day or more, they won't get any offline notifications. To solve this "perfectly" it seems I would have to use bluetooth pairing or track the movement of the user's phone. Or I could just have a really timeout of a minute or so for when there is no mouse movement or something.

An even more serious issue is what I should show for Unread Message Counts. On each client, I can store the triple (user X in chat Y saw up to message Z). This is cheap and easy to store on the client side. But then each client will show the number of unread messages relative to that client. This kind of intersects with point #1, namely, what if some other client has already displayed the message? Should the software assume that it was displayed to me over there, and therefore mark the message as read on all other clients?

Tech stuff follows
For #2, the trade-off is this. I am pretty sure that syncing across clients is more desirable, but it's very expensive from a tech point of view. Updating the triple (X, Y, Z) on the server requires an additional acknowledgment for every message in every chatroom from every client. This doesn't just double the traffic but also makes the server lock the (X, Y) rows in the database in order to increment the count of Z. This lock isn't too bad, since it's not like a user will have millions of clients open at the same time, probably only 3 or 4 max. But that's still a huge number of acknowledgments and locks just to sync (X, Y, Z) triples across clients.
My question in #2 is, is it good enough to show unread messages per client without syncing, or syncing (X, Y, Z) triples for unread messages is so vastly better that I should pay the price of all this extra traffic?
Comment: I want to make it clear I am talking about the usual conventions that we are used to for chats on Skype, Facebook Messenger, WhatsApp, Telegram or anywhere else. Not something esoteric.
Answer: If I understood correctly, there is no way you can track if a user is reading a message, even if he has the chat open in front of him. As in real life (just a simple example) if someone is in front of a person talking it doesn't necessarily mean he is listening.
If this is such a big issue that will break the product, the only idea I can think of is that the client explicitly receives or stops receiving messages:

The client has to click a button to receive new messages
The client has to click a button to turn the chat off

These are not the most convenient ways of following a chat (specially the first one) but you can be sure that they explicitly decided to receive or stop receiving the messages (afaik, if they read them or not is not possible to track).
Answer: Well the devil's in the details.  But from an architectural point of view, I would take a look at MQTT - it supports publish / subscribe with varying QoS settings.  I'm assuming that if a user logs in via multiple devices, then they would be using the same identity.  Perhaps a user+device level cookie could be used to sort out the different connections and offer a level of synchronisation across the multiple devices.
Another reason that I think MQTT could be useful to use is that it supports WebSockets and thus your client wouldn't need much low level code.


Moodle - overriding module renderers

Question: I think I'm doing something silly... I've been following the tutorial on overriding renderers and had a google but can't work it out. (I was hopeful when I found this other stackoverflow question but it hasn't helped)
I'm trying to override the renderer for a module (studentquiz) but it doesn't seem to be working.
Below is what I've done so far... I've just copy and pasted a function in and then deleted a few lines from it - expecting to see the changes after purging the caches but nothing is happening. Have tried various setups but nothing is working.
Any help would be greatly appreciated!
Many thanks
Ollie

/theme/THEMENAME/config.php has the line:
$THEME->rendererfactory = 'theme_overridden_renderer_factory';

/theme/THEMENAME/renderers.php is as follows:
<?php

defined('MOODLE_INTERNAL') || die;

include_once($CFG->dirroot . "/mod/studentquiz/renderer.php");

class theme_THEMENAME_mod_studentquiz_renderer extends mod_studentquiz_renderer {

   // place your overridden methods (functions) here.

   public function render_stat_block($report) {

      ...

   }

}

I'm deleting the following lines from the function:
    . html_writer::div($this->render_progress_bar($info2), '', array('style' => 'width:inherit'))
    . html_writer::div(get_string('statistic_block_approvals', 'studentquiz')
        .html_writer::span('' .$userstats->questions_approved .'', '',
            array('style' => 'float: right;color:#28A745;')))
    . html_writer::div(get_string('statistic_block_created', 'studentquiz')
        .html_writer::span('' .$userstats->questions_created .'', '',
            array('style' => 'float: right;')))

To demove the last progress bar and two lines from this:
Answer: Change the renderer factory in config.php to:
$THEME->rendererfactory = 'theme_THEMENAME_renderer_factory';

It will need to reflect the frankenstyle name of your theme

Moodle - overriding module renderers


Research plan vs proposed research for class project?

Question: A proposal format for that class project requires student to provide research plan as well as proposed approach. Can you please help me in understanding differences between the two?
Comment: From which standpoint are you asking? As a student, advisor, or instructor?
Answer: In general a research plan will include within it a section that deals with the proposed approach. As this University of Michigan page explains:

Research Plan (Approach)
This section includes a comprehensive explanation of the proposed
  research, and is addressed to other specialists in your field (not to
  laymen). The section is the heart of the proposal and is the primary
  concern of the technical reviewers. To make it clear and easy to
  follow, you may need several subsections tailored to your work.
  Research design is a large subject and cannot be covered here, but a
  few reminders concerning frequently mishandled aspects of proposals
  may be helpful.

As always, you should talk with your advisor/professor to ensure if this is exactly what they have in mind, or if there is some specific template or example for your field/subject/use that you should follow.


Can I use Titanium Backup to extract and restore user apps from a Nandroid backup of a different model?

Question: Can I use Titanium Backup to extract and restore user apps from a Nandroid backup of a different model ? e.g., restoring user apps from a Galaxy S7's Nandroid backup on a Xiaomi MI Mix 2S?
Answer: Yes, you surely can. Make sure that user apps you want to restore are not already present as system apps for example FM radio is a system app with some OEMs while it may be a user app in others. Next thing to watch out is for version incompatibility, though not very common
It takes a long time to restore from Nandroid so be patient. At times if the app doesn't get restored, it's better to install manually from Play Store and restore only data
Also see the last part of answer here Migrating to new rooted phone, how do you restore from your titanium backup from the saved cloud backups


I'm new to triggers concept, can someone help me!

Question: I have a question on apex triggers. Trigger.new is the list of new records that can be inserted and trigger.old is the list of old records or the existing records in the database. If we are doing an after update trigger on an account object, why do we loop through trigger.new instead of trigger.old????
Answer: Trigger.new will hold values which are newly changed but Trigger.old will hold values from database.
Lets say from UI you changed account-fieldA from '20' to '30' .So if you loop on Trigger.old and if you are expecting some logic which checks if fieldA > 30 then run some function it would fail. Because Trigger.old will hold value from DB and as the transaction is not committed yet, the value 30 is not yet committed to DB.
So we use trigger.new to loop in expecting all the values which are changed from UI will be available there. And trigger.old is used to compare if the value is changed then proceed running the trigger.
Comment: i got u @Nagendra Singh  thanks!!


In Rails controller tests, Is there a way to simulate a specific remote IP?

Question: Some functionality in my app works differently depending on the client's IP address. Is there a way to test that in Rails functional tests? I'm using Test::Unit and Shoulda.
Answer: You can do this easily without stubbing, by changing the REMOTE_ADDR environment variable before your controller call.  Here's a fictional controller that redirects the user to the home path if their ip address is 184.108.40.206:
def index
  if request.remote_ip == '22.214.171.124'
    redirect_to root_path
    return
  end

  @articles = Article.all
end

Here's how you can test that it works:
def test_should_reject_ip_1_2_3_4
  @request.env['REMOTE_ADDR'] = '184.108.40.206'
  get :index
  assert_redirected_to root_path
end

You're setting the remote ip in advance of the controller call, so you're able to fake that data without any special plugins or gems.  And here's the shoulda version, for ItemsController:
context "with ip 184.108.40.206" do
  setup do
    @request.env['REMOTE_ADDR'] = '188.8.131.52'
    get :index
  end

  should_not_assign_to :items
  should_redirect_to("home"){home_path}
  should_not_set_the_flash
end

Answer: The receiving controller needs a method for detecting the IP address (or receiving it as a parameter), and you need a way to inject a specific IP address for your test, or just specifying the test IP address as a parameter to the method.
If that's not easy considering whatever your app does, what you could do is make the "custom functionality" apply to another computer on your home network, if you have one, and test the app that way. That doesn't really solve the "solve it through a unit test" answer though.
Can I ask why your app would perform a specific action depending on the IP address? Perhaps there's another way.
Comment: Why detecting IP: the app shows different UI elements depending on whether user in inside or outside our local network.
Answer: You should be able to accomplish this by stubbing out the requests and returning a mock object that has request.remote_ip equal to the desired IP address.
I'd look at FakeWeb for help on this. It lets you easily set up the expected requests/responses. It might also be instructive to look at how Rails itself does these kinds of tests.
Answer: Using gem "mocha" you can do:
test "should something" do
  request.expects(:remote_ip).returns("18.104.22.168")
  ...
end


What pronouns are used to refer to Foo Fighters in the Japanese version of Stone Ocean?

Question: I'm asking what pronouns Foo Fighters uses for herself, or what other characters use when referring to him/her in the Japanese version of JoJo's Bizarre Adventure Part 6: Stone Ocean. I am aware that he/she's actually something like a colony of plankton living inside a woman's corpse, and that the English version elected to use "they/them", but I want to know what pronouns are used in the Japanese version.
Comment: which episode/ minute? Or are you talking about the manga?
Comment: @ashaad.montgomery I've watched the anime a while ago, I dont remember it very well. I didnt read the manga. I believe I watched it subbed. I asked you because may be I can rewatch it later and tell you
Comment: They are many. You are but one.
Comment: @Pablo Does it differ between the anime & manga? If it differs between the anime and manga that would be good to know as well. In particular it was from episode 17 onward, in which Foo Fighters does a lot of fighting while other characters watch and comment that the use of they/them in the English subtitles became apparent to me. Two specific examples would be: in episode 17 a bad guy uses "they/their" around 7:00, and in episode 18, around 2:20 Jolyne uses "their" a several times in a row. Those would be episode 5 and 6 of the "second batch" of 12 episodes.
Answer: They're called "F・F" which is (obviously) abbreviation of Foo Fighters, or sometimes called as "あんた" which is colloquial version of "あなた", which means "you".
As far as I remember, they weren't called with pronouns, though Japanese fanbase sometimes call them as "she/her", though it's quite rare since we also usually call them as Foo Fighters or F・F.
Side note: In Japanese, there's no words that's equivalent to "they/them", so we usually call non-binary people as their name or nickname. So, in this case, "F・F" is the equivalent word of they/them. That might be the reason that English version used "they/them" as Foo Fighter's pronouns.
Comment: The character in question uses "atashi" to refer to themselves in the first person later on. While it is feminine sounding it's not exclusively to one gender. https://dic.nicovideo.jp/t/a/%E3%83%95%E3%83%BC%E3%83%BB%E3%83%95%E3%82%A1%E3%82%A4%E3%82%BF%E3%83%BC%E3%82%BA
Comment: @ashaad.montgomery It's in real life as well. I've actually seen a girl who uses "boku" as their first person too (though she've changed that to watashi later on). In regards to your understanding, yes that is correct. I'd say 90~95% of users of atashi as their first person is women (as far as I'm aware age doesn't matter though).
Comment: Just to add in, FF uses atashi when she becomes Etro. Prior to that it was watashi, which is more gender-neutral. This is because FF reads Etro's memory and is disguising as her.
Comment: @кяαzєя Ah, yes. I should have wrote that in my post. Most of (or maybe all of) first person isn't exclusive to one gender, so I've completely ignored about the fact that the Foo Fighters called themselves as atashi. Thank you for your comment.
Comment: Thanks to both Skye-AT and кяαzєя. This might be digressing a little, but when you say atashi is not exclusive to one gender, do you mean in anime, or in real life as well? I'm aware anime sometimes have this trope called "Bokukko", where tomboys might use "Boku", but I have also heard from others that it would apparently be considered unusual in real life for a girl to use "boku", so I understand anime does not always reflect reality. My understanding is that atashi is most commonly used by girls and young women. Sorry if this comes off a bit dumb, Im still learning about Japan, thanks again.
Comment: @Skye-AT Thank you very much, I think that answers just about everything.


Is it possible to manipulate: $\frac{x^2 -2}{x+1}$ such that the numerator has a lower power than the denominator?

Question: Is it possible to manipulate: $\frac{x^2 -2}{x+1}$ such that the numerator has a lower power than the denominator?
For example: $\frac{x+3}{x+2}$ would be $1+\frac{1}{x+2}$.
Answer: Hint
$$\frac{x^2 -2}{x+1}=\frac{x^2 -1}{x+1}-\frac{1}{x+1}$$
Answer: $$\frac{x^2-2}{x+1}=\frac{x^2-1-1}{x+1}=\frac{(x-1)(x+1)-1}{x+1}=x-1-\frac{1}{x+1}$$
In general, we can perform division of polynomial. When $x^2-2$ is divided by $x+1$, the quotient is $x-1$ and the remainder is $-1$.
$$x^2-2=(x-1)(x+1)-1$$
Answer: This is the result of the polynomial division between $x^2-2$ and $x+1$:
$$
{x^2-2\over x+1}={(x^2+2x+1)-(2x+2)+(2-1-2)\over x+1}=x-1-{1\over x+1}
$$
Answer: This requires nothing smart: just do long division.
$$
\begin{array}{c|c}
\begin{array}[t]{r}
\hphantom{-}x^2+0x-2 \\
-x^2-\hphantom{0}x\hphantom{{}-0} \\
\hline
-x-2\\
x+1\\
\hline
-1
\end{array}
&
\begin{array}[t]{l}
x+1\\[4px]
\hline
x-1
\end{array}
\end{array}
$$
Or with an abbreviated scheme:
$$
\begin{array}{r|rr|r}
& 1 & 0 & -2 \\
-1 & & -1 & 1 \\
\hline
& 1 & -1 & -1
\end{array}
$$
Both tell you that
$$
x^2-2=(x-1)(x+1)-1
$$
Answer: Yes, this is always possible when dividing one polynomial by another. Suppose we start with
$$\frac{P(x)}{Q(x)}$$
where $P(x)=a_nx^n+$ lower-order terms, and $Q(x)=b_mx^m+$ lower-order terms, with $n \ge m$. Then we have
$$\frac{P(x)}{Q(x)}=\frac{a_n}{b_m}x^{n-m}+\frac{R(x)}{Q(x)}$$
where
$$R(x)=P(x)-\frac{a_n}{b_m}x^{n-m}Q(x)$$
is a polynomial of degree $\le n-1$ (because its $n^\text{th}$-order coefficient is $a_n-\frac{a_n}{b_m}b_m=0$).
You can repeat this process with $R(x)/Q(x)$, until you end up with
$$\frac{P(x)}{Q(x)}=S(x)+\frac{T(x)}{Q(x)}$$
where $S$ is a polynomial of degree $n-m$ and $T$ is a polynomial of degree $\le m-1$.
In practice, this process is very simple. At each step, you just look at the highest-order terms in the fraction, and the next term of $S$ is their quotient.


How do I change the shape of an object while keeping all of its data?

Question: This is my first time making a game in Blender and I've been using the cube that is the first thing on your screen as my player. The player has a bunch of code in it now and I want it to be a different shape, not a cube. How do I change it without having to rewrite all of its insides?
Answer: You can use two different methods.
Switch the meshes
Select your cube. In the Data panel, the first field allows you to select another mesh :

The object data will be preserved (logic bricks, modifiers, etc). Only the mesh data will be affected (vertex groups, materials slots, etc)
Use parenting
This method is preferable if your character already has an armature, and allows to keep the cube Physics settings.
Parent the character to the cube : select the character (or its armature if it has one), keep Shift pressed, then select the cube, hit Ctrl+P, select Object.
Make the cube invisible : in its Physics panel, tick Invisible.
To "hide" the cube in the 3d view but keep it selectable and usable, you can set Maximum draw type : Wire in its Object panel.
Comment: (And I might precise that the first solution is the best one. Use that one as long as possible.)


A peculiar question regarding marriage?

Question: Namaste,
Is there any mention in our scriptures about a man marrying a girl of different kingdom? Of course there are mentions about kings..but are there mentions about other varnas like Brahmanas or Vaishyas marrying girls from other kingdoms/regions?
Kindly answer..
Thanks.
Answer: Yes.

Sage Rishyasringa married Shanta, the princess of Anga -

"On entering the palace princess Shanta is given to Rishyasringa in
customary marriage, and then that King Romapada obtained rejoice with
a peaceful mind."

Bala Kanda, Valmiki Ramayana.

A peculiar question regarding marriage?


Is it theft if you take money (with out permission) but return it the next day?

Question: Supposed that a person A used another person's credit card (B) to buy a $1 item (without permission) while A was doing B's shopping but A returned the money.  Has A committed theft?
Comment: Did you intend to return the money from the beginning, or did you only return upon her noticing the unauthorized purchase?
Comment: Returning the money after you get caught would be weak proof of your intent to do so.  We don't know the actual law because you haven't told us where you live.
Comment: @sleske because it's a real-world question about something happening to the OP, so it's legal advice, which is forbidden on LawSE
Comment: Hi Michelle, welcome to StackExchange. I encourage you to [take the tour](https://law.stackexchange.com/tour), as we are a little different from other sites. For example, please do not respond to questions with an answer, but rather edit your question or respond with a comment.
Comment: Why the downvotes? While the question may be a bit naive, it is a valid, well-written, on-topic question.
Answer: Depends where you are
At common law, theft (or more generally, larceny) requires an intent to permanently deprive the owner of possession.
However, many jurisdictions have removed this element from the crime. For example, s118 of the new-south-wales Crimes Act 1900 says:

118 Intent to return property no defence
Where, on the trial of a person for larceny, it appears that the accused appropriated the property in question to the accused's own use, or for the accused's own benefit, or that of another, but intended eventually to restore the same, or in the case of money to return an equivalent amount, such person shall not by reason only thereof be entitled to acquittal.
Comment: Another complication: Even if theft requires intent to permanently deprive, OP would need to prove that they intended to return the money all along. It is not enough to return the money, you need to make a credible case that you never intended to keep it. Otherwise there was "an intent to permanently deprive", you just changed your mind later.
Answer: In Germany, the situation is similar to the one under Common Law (as explained in
Dale M's answer):
Theft (Diebstahl in the Strafgesetzbuch, the German criminal code) is defined in §242 Strafgesetzbuch as:

§242
Wer eine fremde bewegliche Sache einem anderen in der Absicht
  wegnimmt, die Sache sich oder einem Dritten rechtswidrig zuzueignen, [...]

Translated:

Whoever takes movable property belonging to another away from another
  with the intention of unlawfully appropriating it for themselves or a third party
  [...]

So, just as under Common Law, the crucial question is whether you intended to return the money all along. If yes, then the definition of theft is not fulfilled.
However, if you originally did not intend to return the money, but did so anyway after you found it, it would still be theft. That would be for a judge to decide. A judge would probably look a the circumstances, such as whether you returned the money after you were found out, or before.
Comment: Note that the ladies movable property was not taken to unlawfully appropriate it. So the definition of theft would likely not apply. There have been cases where someone took a card, withdrew money, returned the card, and theft charges didn't apply.
Comment: @gnasher729: Well, as I wrote, a judge would have to decide what intentions the perpetrator had when using the card.
Answer: Yes, you purchased something without her permission or authorization.
Whether 1 dollar or 1000, if someone did that to you, right away you're going to be weary the next time.
Justifying an unauthorized purchase, no matter how small, will lead you to keep doing these kinds of things.
It's probably better to mention it beforehand, most of the time, people are willing to help.
Comment: This is not true in a strict Common Law sense - a lack of intent to defraud vitiates guilt for larceny. Many jurisdictions have passed laws extending the scope of theft laws, though.
Comment: She was fired from her job for theft, if there weren't any legitimate legal grounds to fire her, she would have a right for recourse, but she doesn't. And I agree with the not quite common law part, if there is a term for larceny but without the intent to deprive the owner of possession, that would probably fit in this situation
Comment: @RobertColumbia The state of Georgia has an entire code section on Illegal Use of Financial Transaction Cards.  I couldn't find one entry that included intent.  Obv the real answer will be specific to the jurisdiction, but in Georgia, there are probably multiple offenses that could be applied.
Comment: A think the insight you make here is that the crime isn't really theft, it is fraud.
Answer: When "theft of money" was a property theft, involving the taking of actual physical bank notes, which could be proven by records of the serial numbers of the actual bank notes involved, there were separate crimes of
'conversion' (knowing or intentional exertion of unauthorized control over property of another person)
and of
'embezzlement' (theft or misappropriation of funds placed in one's trust),
and you could have been charged with 'exerting unauthorized control' of $1, or 'misappropriation of" $1.
Depending on your location, one or both of those crimes may have been included in a statutory re-definition of "theft".
But -- in my jurisdiction, if you thought that it wasn't theft, and you intended to return it ... then it wasn't theft. Here, the "criminal intent" of common law hasn't been removed, just replaced with a more restricted version that requires ignorance of legal technicalities as well as lack of criminal intent. That means you can get away with it here, maybe, but certainly not after you've been warned.
As it happens, there isn't any reasonable way for me to report an incidental embezzlement. I'd have to know what the actual legislation is, and who to report it to, because that information is not published by the police force here, nor known to the desk officers here, who only deal in intentional crimes. And after reporting an amount of $1, to the correct department, on the correct form, it would not be investigated, because the fraud office classifies crimes as "important" or not.
On the other hand, they got Al Capone on Tax Evasion. If they are looking for a crime to nail on you, a $1 embezzlement is a crime in a lot of places, and could cost you your job in a lot of places. Using somebody else's credit card without explicit permission is a very bad idea.
Answer: washington
I focus the question by pointing to the law in Washington that pertains to theft, RCW 9a.56. As you describe it, the person acquired the credit card lawfully – with permission – and used it in a manner not explicitly endorsed by the credit card owner. Under no stretch of the imagination has there been "theft of money". There was no intent to deprive the card owner of the card. Although 9A.56.060 is in the general chapter containing "theft", deliberately writing a rubber check is deemed to be "unlawful issuance of bank check", not "theft" (and clearly this has nothing to do with checks – but under a plain reading of the theft statute, this simply is not theft). RCW 9A.56.220 somewhat stretches the definition of theft in defining a crime "theft of subscription television services" (the provider is not deprived of the thing that was "taken"), but again this form of theft doesn't relate to what happens in the above scenario.
RCW 9A.56.290 becomes more relevant since it relates to credit cards inter alia, but it is specifically limited to "unlawful factoring of transactions", which is using skimmers etc to get credit card information or to present to a bank something unlawfully purporting to be a transaction between merchant and card owner. Finally, RCW 9A.56.320 defines a set of crimes like "unlawful production of payment instruments" (pertaining to checks and the like), which includes "unlawful possession of a personal identification device", where credit cards are included in the set of such devices. The crime is if one "possesses a personal identification device with intent to use such device to commit theft, forgery, or identity theft". Well, the intent is to buy some product, and the card is not being used to commit a crime".
What happened is that in using the card to purchase goods not requested by the card holder (who gave you permission to make purchases with the card) is that you caused her financial damage. You are legally liable for that damage, and she can sue you to recover her loss. But this is not a crime, in Washington.
Answer: There's the question whether this is legally theft, whether it can be proved that it is theft, and what the consequences are.
You didn't say which country it is. That would have been important, because different countries have slightly different laws. It seems that in the USA it would be theft. And in Germany it might not be theft if you returned the money at the earliest possible time. Can it be proved (usually "beyond reasonable doubt", but that depends on the country as well) that it is theft? In the USA, easily. In Germany, if you had the intent to return the money but are found out the next day, or a week later, or you forgot about returning the money altogether, a court could assume that it was theft "beyond reasonable doubt".
On the other hand, for a theft of one dollar or one euro both police and courts would likely not be interested in hearing the case whatsoever. But on the other hand again, that doesn't mean you can't get fired for it. And if you went to court saying you were fired illegally, the court will likely side with the employer.
And since you didn't mention the country, we haven't talked about countries with shariah law where you might lose much, much more than just your job.
So in the USA: Don't do it. In Egypt: Absolutely don't even think about doing it. In Germany: Don't do it. And if you do it, don't wait a minute longer than necessary to return the money.


How to add credit card to Google Pay from my app?

Question: I'm developing mobile banking app and obviously it manages our bank credit cards. So now I need to implement "Add this card to Google Pay" button in my app but how to do Google Pay API request for this? I am unable to find any related docs. The only one question here on SO has answer which states that our bank should comply to PCI DSS and its done of course. And there are a bunch of docs (including Google official) on how to add any credit card to Google Pay manually, using Google Pay app. But I need to do it automatically within my app. I realize that our bank has to has some special agreement with Google and AFAIK our bank has it. Is there any technical documentation on how to implement such feature?
Answer: This feature is currently only available to card issuers and requires additional access. Access to relevant documents on the Android Push Provisioning API can be requested on the page or by following these instructions: https://developers.google.com/pay/issuers/requesting-access?api=true
Comment: Seems like you are right and we need to request access to this doc. Like I thought it is kinda closed API/doc.
Comment: can you post the general steps which are required to implement that "add my card to my Google payment methods" button?  I need to roughly estimate the amount-of-work/effort before getting access to those closed APIs.
Comment: You'll need to sign up for the APIs to get details on how to integrate. In general terms, expect to client side integration, server side integration, encryption, and key exchange.


dotnet ef migration list not finding migrations in Migration folder

Question: I was following this tutorial (On linux and converted to F#)
Migrations were created successfully (3 files in the Migrations directory.) But dotnet ef database update says everything is up to date and dotnet ef migrations list says no migrations found. When I check the created sqlite file manually it contains only an empty __EFMigrationsHistory table.
The context.Database.Migrate() and context.Database.EnsureCreated() methods also don't pick up any migrations.
I'm thinking maybe my fsproject is missing reference to the Migrations folder but I'm not sure what a reference to that would look like.
Thanks for you help!
Answer: Here is what I did to get migrations working.

I had to also convert the generated migration files to F#.
This blog post by Ody Mbegbu was very helpful here. (Although some modifications have to be made to account for changes since v1.)
I had to add the newly converted .fs migration files to the fsproj.


How should we wash our feet for wudu?

Question: What's the most practical way to wash feet in wudu? In my place, the sink is too high (or perhaps I am too short) which makes it difficult to wash the feet; or is better to use a bucket or tub of water? also, should we dry the feet immediately, because otherwise slippers and floor get wet?
Answer: If you have a bathtub, then I recommend using that to make Wudu over your feet. However, if you do not have a bathtub at your disposal, then I recommend getting some water in your hand and wiping over your feet will do the trick. Make sure to get in between your toes as well, because that's important as well.
And as for drying your feet afterwards, I do not know of any hadith or Sunna where this is talked about, but if you want to do it as a way to decrease the risk of someone slipping on water or the like, then I see now problem with drying your feet once you're done.
Comment: " then I recommend getting some water in your hand and wiping over your feet will do the trick" that's what I've been doing but I wasn't sure if that's correct or I should hold them under running water

How should we wash our feet for wudu?


Borrowed an egg from my neighbor, and found a bloodspot inside

Question: If one borrowed an egg from a neighbor, and found a bloodspot inside, do they have to repay the egg? Should you say that since the neighbor would also throw away the egg if they found a bloodspot then one does not need to replace the egg, or do you say that since you borrowed it then you have to repay it?
Comment: Quite possibly relevant is that they keep roosters away from the hen coops such that some rishonim even say you can eat the bloodspot and normative Halacha as per Rav Ovadia Yosef and Rav Moshe Feinstein is that you just discard the bloodspot, not the whole egg. see here http://www.daat.ac.il/daat/english/journal/broyde-1.htm
Comment: [Related.](http://judaism.stackexchange.com/posts/comments/13912)
Comment: Isn't there a rule and say it is the owners mazal
Comment: Why not give back a bloody egg?
Answer: The Shevet Halevi, Vol. 10:133, was asked this question and he says that if one buys eggs which turn out to have blood spots it should be considered a מקח טעות (a mistaken purchase), but the custom is not to consider it a מקח טעות because it is impossible to determine the nature of the eggs before they are sold.
And if one borrowed eggs and some of them had blood spots, the lender cannot ask for good ones in place of the bloody ones and it might even be forbidden for the borrower to return the full amount of eggs because of ribbis (interest).
Comment: I understand it,that it is what is expected,by a store owner it is accepted that whatever you get you get,and by the the borrower you are borrowing only something which you can use and the lender will lose out.Also when you buy it is a risk,but when you borrow you need something that is usable,in essence I agree.


Dell Vostro battery not charging with new power cord

Question: The power cord/charger to my dell dell vostro stoped working, it has a light that indicates when there is power and it went off. at first there was almost full charge left in the battery so I still was able to use the computer.  When the battery lost its charge I plugged in an old dell charger cord and I got a msg saying that it was using a 35 watt cord and my computer required a 65 watt cord/charger, so my computer would work but the battery would not charge... all of this appeared true and correct. I was able to use my computer while plugged into the wall while I waited for the new cord, which took a few months. I purchased a new power cord, it appears to be identical, it works great but the battery is still not charging, so if the plug pulls out the computer goes down immediately.  Does anyone know why a new cord would not charge an old battery?  there was no issue at all with the old battery it was still holding a full charge or close to it.  Is there a calibration or initialization step I could try?
Answer: You are not providing a lot of context, so my answers are concerning batteries in general, but I feel they may help in your case.
There might be a problem with the cells in your battery. Batteries are typically made of a number of voltage cells, that fill up simultaneously on charge, and empty themselves simultaneously to provide adequate voltage. If one of the cells is damaged; then the battery won't reach the necessary voltage for the computer to function.
There might be a problem with how long your battery has remained uncharged:
If when you last had the battery on a full charge, you drained it, and the problem with your cord occured, then the battery has been on an empty charge for a while. That's usually a big no-no for batteries as they can be severely damaged by long periods of energy famine.
There is a way to revive low charge battteries using a charger on which you can view cell voltages, and recalibrate, these are typically sold by RC hobbby stores, but it would set you back about 35$, which might be the price for a brand-new battery. Up to you.