Could primordial black holes explain the SMBH in the galactic centers?

Question: If there were enough primordial black holes (with the right mass) they could explain dark matter. Could they explain the gargantuan monster holes in the center of galaxies?
Answer: Yes. One of the most important open problems regarding supermassive black is their early formation. We have observed supermassive black holes at redshift $z>6$, when the universe was less than 1 billion years old. One example is  SDSS J0100+2802 (Wu et al. 2015), a black hole of $1.2 \times 10^{10} M_\odot$ at $z=6.3$. We see these kind of SMBH in the form of quasars, i.e. we see the extremely bright light that is emitted by the matter infalling in the black hole. This means that these black holes are accreting a lot of mass, they are growing fast, so they must have started as much smaller black hole, but when did they form and how massive where their progenitors (usually called seeds)?
It turns out that there is a limit on how fast a black hole can accrete mass (Eddington Limit), so if they have reached $10^{10}M_\odot$ already before $z=6$, they must either have started from already quite massive seeds or they must have started accreting very early in the history of the universe, before the formation of the first stars.
Primordial black holes could explain both scenarios, because they are thought to form at the time of inflation, so much less than one second after the big bang and they also could have a very wide range of mass, depending on who you ask. Therefore primordial black holes have been seriously considered as a possible source of super massive black hole seeds.
Could supermassive black holes be quintessential primordial black holes?
Primordial seeds of supermassive black holes
Massive Primordial Black Holes from Hybrid Inflation as Dark Matter and the seeds of Galaxies
Answer: Prallax's answer deals with whether primordial black holes could be the seeds for supermassive black holes, and I have no argument with that answer. However, it doesn't deal with the second part of the question, or rather the statement - which is could those seeds, which would need to be $>10^4M_\odot$ to make much difference to the "Eddington accretion timescale problem", form all or a significant part of dark matter. The answer to that is currently thought to be NO.
The reasons are reviewed in section 6 of Villanueva-Domingo et al. (2021), (see also Carr & Kuhnel 2022), who show this plot - of the fraction of dark matter that could be in the form of primordial black holes, as a function of the black hole mass. Big swathes of black hole mass parameter space are ruled out as being significant contributors to dark matter by (i) microlensing observations that fail to find significant populations of $10^{-10}< M/M_\odot < 100$ compact objects in the halo of our Galaxy; (ii) the lack of evidence for perturbation of wide binary stars by a significant population of $> 10^3 M_\odot$ black holes; (iii) accretion onto a significant population of primordial back holes would modify the CMB spectrum and its anisotropies.

Constraints on primordial black holes as a fraction of the required dark matter. The shaded regions are ruled out by various labelled observational constraints.
The overall conclusion is that primordial black holes with masses $>10^{-10}M_\odot$  are not a major contributor to dark matter.
Comment: That's wonderful news. That means the black holes have about 1/10000 of an Earth mass.
Comment: @Felicia I don't follow your logic. The plot shows that primordial black holes with masses between $10^{17}$g and $10^{22}$g may still be significant contributors to dark matter. It doesn't show that they are. Such hypothetical objects have nothing to do with the growth of supermassive black holes.
Comment: But is black holes with a mass bigger than 10exp-10 times of the Sun can't be a major contributor can holes with a smaller mass be a major part.
Comment: @Felicia that is exactly what I said. They could be.
Comment: That's why I said it's wonderful news.
Comment: Why isn't it just assumed DM is black holes? Dark black holes. Occam's razor applies here.


How can I display GeoEye1 imagery in colour in Opticks?

Question: Anyone familiar with the use of the open-source remote sensing software Opticks? Im new to opticks, I load GeoEye1 imagery but it displayed as greyscale. It supposed to be displayed as bands combination true colour or false colour composites.
Answer: Just do right click on the image and then select Properties:

If all the Display bands indicate the same band number the image will display in grayscale, so you can change it to the band combination you need.

You can get more information about Opticks in this site: http://www.jenningsplanet.com/Training-and-Tutorials.87.0.html
Comment: Thank you Sigon :-D I appreciate your good answer. Will ask you another question about opticks soon.


How to access coredata file from another application

Question: I have an ios application in that I am using coredata file for saving and displaying records, now I want to use my first application's coredata in my another ios application, so when my new application launches I want to fetch the coredata file of the existing application. How can i do this. please help me.
Answer: Use iCloud to store your Core Data files / data store contents. Or, if you are just sharing periodically / on demand, preferably store an exported version of your data store rather than storing the Core Data files directly.


How to examine if a Doc2Vec model is sufficiently trained?

Question: I started experimenting with gensim's Doc2Vec for sentiment analysis. For the training of the embedding itself, I have seen examples using a reduced learning rate with a few 10s or even a few hundred epochs. However, there does not seem to be a straightforward way to use early stopping to prevent overfitting, and it is not yet clear to me how I should access loss values for each epoch to detect overfitting. What should be the proper way to examine if word2vec or doc2vec model themselves are sufficiently good? Thank you!
Answer: One way to test an embedding space is to use word analogies as unit tests. A properly trained embedding space should successfully complete the analogy "Man is to king as woman is to _____" with "queen".
Google has released a collection of 19,000+ word analogies to evaluate word embedding models.
Answer: If you are unhappy with using your training-validation split set for evaluating your model, here are a few additional ways to compare your performance:

Metric tracking. This is often used when data is abundant (for example - MSMarco uses MRR to evaluate the quality of their embeddings). You can find that here: https://microsoft.github.io/msmarco/ Another good metric is mean RBO (Rank biased overlap).

Eyeball checks using a few queries. This is most helpful when you are looking to build something for the first time and you want to sense-check it across your top X queries. If your data has overfit - you will see very poor performance on search queries outside of your data distribution.

Embedding projector for you to evaluate your embeddings and their nearest neighbors such that about the data bias. The embedding projector will require a good dimensionality reduction algorithm and should have a good clustering algorithm to help you detect these biases.

I have helped co-author a few Python packages to help out some of these issues:
For comparing search performances:
https://github.com/RelevanceAI/search_comparator
(Releasing a few packages in the next few days that will help with this as well - will update this comment when I do!)


How to install sqlite from source on Mac?

Question: I have seen this question on the source code of SQLite. However, I can not make sense on how to build SQLite on my Mac OS 10.6 from scratch, esp. an old version. What steps do I need?
Comment: This is not quite programming related. I'll shift it to http://superuser.com/.
Answer: I would recommend you to take a look at MacPorts project. You could build SQLite from sources using MacPorts.
Comment: thanks, I know MacPorts. I would like to get an old version of sqlite to make some changes, and experiment with it. do you know how to access their CVS repository. Also, it would be useful to me to have some old ("simpler") version of the project.
Answer: The SQLite project recommends using their amalgamation package which bundles in source files for dependencies.

The amalgamation and the sqlite3.h
  header file are available on the
  download page as a file named
  sqlite-amalgamation-X_X_X.zip where
  the X's are replaced by the
  appropriate version number.appropriate version number.

You can change the URL for the current amalgamation download to get the older version that you want.
Once you have that, open up the zip file or tar.gz (aka tarball) download. The INSTALL file gives instructions, but they're standard for most source build downloads:

cd into the source directory
Run the configuration script to make makefiles for your environment: ./configure
Run make
Run make install -- typically using sudo to gain the permissions you need: sudo make install


How to Render and Blend Multiple Frames to a Buffer in Unity?

Question: I was wondering if anyone knew how to render multiple frames from a camera or texture to a buffer in Unity and to then blend them together? Is this possible? If so how would I go about doing so in Unity?
Answer: The Image Effects source code should give you a good idea how to render into a render target. You can import the package and look through the source code to get an idea of how they happen.
The basics are:

render a quad that covers the full size of the render target
the shader does the blending you're talking about by using the previous
render target texture(s) as input
the output goes into a new render target, which can then be used as input for the next


UID of a deleted account

Question: How can an administrator find the UID of a user that's been deleted with the userdel command?
Comment: Is the account already deleted?
Comment: @ Michael Mrozek yes.
Comment: Is the home directory still around?  An "ls -l" of that directory should show the UID, given that the entry from /etc/passwd is gone.
Comment: @cjc no! Home directory is deleted and the admin doesn't now which file belongs to that account.
Answer: By looking at /etc/passwd in the backups taken of your system from the day/week/period before the user deletion.
If userdel was used with -r, then both the home directory and user's mail spool have gone.  If it wasn't used with -r, check for the user's mail spool, or perhaps a crontab if you're very lucky.
If there are no backups, and no obvious files owned by that user you can check, then you'll need to scout around places like /tmp and look for files with UID's as owners and try and work it out - but really, your backup is your best bet.
Edit: as jw013 points out you could also use find / -nouser to find files which have no matching user for the file's UID.
Comment: Actually, GNU `find` has the [`-nouser`](http://www.gnu.org/software/findutils/manual/html_node/find_html/Owner.html#Owner) test for this purpose - it tests true for files whose uid does not correspond to any user on the system.
Comment: @jw013 this approach works only if you have deleted *only* one user from system but if you have a system with 300 users that worked for 5 years with tens of deleted users you can't use this method at all.
Comment: You can try: `find / -uid ` to find *all* files owned by the user.
`-uid` is an option on GNU find at least.
Comment: This is an example that only describes a situation in which your suggestion doesn't work nothing more.
Comment: Well, -nouser in combination with -mtime would let you find out the most recently active unowned files, which would probably help.
Comment: But that assumes you know the UID you're looking for - the question is how to find the UID of a user that's no longer present.
Comment: @EightBitTony: D'oh.
Comment: @XinHua If you have tens of deleted users with files still lying around you should probably do some clean-up anyways.
Answer: If there are 10 users and 1 deleted user, you could check /etc/passwd for which UID from 1000 and up is missing.
Comment: Not 100% reliable, particularly if more than one account has been deleted, but likely to be quick if it works.

UID of a deleted account


Can printing money with simultaneous government intervention to increase supply prevent inflation?

Question: Just as above...If we print money and simultaneously introduce some sort of government intervention in order to increase supply/ production, then supply and demand would be 'balanced' and therefore price wouldn't go up. I must be missing something, can anyone tell me what it is?
Answer: Yes it can. There is nothing wrong in the above. The money market equilibrium is given by equation of exchange (See Mankiw Macroeconomics pp 87) as:
$$MV=PY$$
Where $M$ is the money supply, $V$ velocity of money, $P$ price level and $Y$ output.
Solving for price level and log-linearizing we get:
$$\ln P = \ln M + \ln V - \ln Y $$
Consequently, ceteris paribus, if $M$ increases by $1\%$ and $Y$ increases also by $1\%$ then the net effect on price level will be zero. The crucial assumption is of course that $V$ remains constant otherwise there could still by inflation/deflation.
However, this is not because this would balance supply and demand - or at least not as understood in econ jargon. When people talk about balancing supply and demand they just talk about them being in the equilibrium. Aggregate supply and demand can be in equilibrium even if inflation increases. Rather here it would be more appropriate to say that both supply and demand shift to the right by amount that makes leaves the price unchanged.
Answer: Short answer: Yes it is theoretically possible.
Long answer: Well, there are a lot of 'ifs and buts'
First, please understand there is a difference between increase supply and increase production. Production increases in response to higher or at least expectation of higher demand. Otherwise there is no incentive for producers to increase production.
Increasing supply is also a confusing. You can increase supply by moving up along the supply curve (assuming of course that supply curve is upward sloping and not vertical). Here the supply increases with increase in prices. But what you are perhaps referring to is an exogenous rightward shift of the supply curve. Here the supply increases for every given price level. This can very well be through government intervention such as improved access to better technology. This is the story so far about supply side.
Increasing money supply (printing money is one way of this) is a demand side intervention which shifts demand curve rightward. So you can imagine a case when you shift both curve such that equilibrium price remains unchanged.
But please note that this requires a strong assumption that aggregate supply curve is upward sloping. This in turn happens under assumptions such as wage rigidity, price stickiness, etc.
This is a much simplified view as in general equilibrium there are plenty of more assumptions that need to be qualified.
Comment: I think overall this answer makes some good points about distinction between movement along supply curve and shifts of supply curve, but I must point out that I dont think the following holds "there is a difference between increase supply and increase production". Aggregate supply is literary given by production function so  $AS=Y=F(K,L)$ then in the long run of course $F(K,L)$ is just vertical line while in short run it also depends on price. But point is that aggregate supply is literary defined in terms of output so any change is supply has to imply change level of output
Comment: @1muflon1: Yes that is correct. I didn't word this properly. What I meant was that govt intervention increasing production could also be interpreted as govt expanding expenditure, for example by buying more defense equipment. That would be a demand side intervention not supply side. Clearly what I have written is not clarifying this.


F9 - Lift Off from "Landing Legs"

Question: Could it ever be possible for Falcon 9 to lift off from its own "landing legs"? i.e. no strongback, no complex launch pad support, just land somewhere, get a new second stage and a tank of gas and off it goes?
Comment: It looks like your question has been answered before. This happens once in a while, don't fret too much if it is closed quickly, and feel free to ask a new question. *Welcome to Space!*
Answer: No.

The landing legs are made to support a 30-ton empty stage, not a 600-ton full rocket.
The thermal loads on launch are much higher and would likely lead to damage on the legs.
The strongback is needed to fill the second stage tanks and to provide connections to the payload.
The launchpad is carefully designed to lead the flames away from the rocket. Just lifting off from a concrete slab would damage the concrete, and subject the rocket to more vibration (noise reflecting off the concrete)
Comment: Suppose you only wanted to get off the ground (maybe to hop a few km to the launched, so you'd only need a moderate amount of fuel. Would that make a difference?

F9 - Lift Off from "Landing Legs"


How does one show using QED that same/opposite electric charges repel/attract each other, respectively?

Question: Why do same charges repel each other and opposite charges attract each other (please explain the phenomenon using real laws of nature (QED) not with the approximation model)?
Comment: Any known "real law" is an approximation, just on different levels.
Comment: Dear Vedant, Just a quick suggestion: I would've changed the body to something along the lines of can the fact that same charges repel each other, and opposite charges attract each other be explained using QFT? That can make a perfect question.
Comment: Related: http://physics.stackexchange.com/q/55996/2451 , http://physics.stackexchange.com/q/2244/2451 and links therein.
Answer: A short answer, is that to estimate interaction energy (which says if same charges attract or repel), you use propagators. Propagators come from the expression of Lagrangians. Finally, the time derivative part for dynamical freedom degrees in the action must be positive, and this has a consequence on the sign of the Lagrangian.
Choose a metrics $(1,-1,-1,-1)$
For instance, for scalar field (spin-0), we have ($i=1,2,3$ representing the spatial coordinate) the  : $$S = \int d^4x ~(\partial_0 \Phi\partial^0 \Phi+\partial_i \Phi\partial^i \Phi)$$
Here, the time derivative part of the action is positive (because $g_{00}=1$), so all is OK.
When we calculate energy interaction for particles wich interact via a spin-0 field, one finds that same charges attract each other.
Now, take a spin-1 Lagrangian (electromagnetism):
$$S \sim \int d^4x ~(\partial_\mu A_\nu - \partial_\nu A_\mu) (\partial^\mu A^\nu - \partial^\nu A^\mu)$$
The dynamical degrees of freedom are (some of) the spatial components $A_i$, so the time derivative of the dynamical degrees of freedom is :
$$S \sim \int d^4x ~\partial_0 A_i  \partial^0 A^i$$
Now, there is a problem, because this is negative (because $g_{ii} = -1$), so to have the correct action, you must add a minus sign :
$$S \sim -\int d^4x ~ (\partial_\mu A_\nu - \partial_\nu A_\mu) (\partial^\mu A^\nu - \partial^\nu A^\mu)$$
This sign has a direct consequence on the propagators, and it has a direct consequence on interaction energy, which is calculated from propagators.
This explains while same charges interacting via a spin-0 (or spin-2) field attract, while same charges interacting via a spin-1 field repel.
See Zee (Quantum Field Theory in a nutshell), Chapter 1.5, for a complete discussion.
Comment: Has this explanation anything to do with QED? It looks like a purely classical explanation... Just erase these "spin 1", "spin 2".
Answer: The title and the content ask two different things:
Content:

Why does same charge repel each other and opposite charge attract each other (please explain the phenomenon using real laws of nature not with the approximation model)?

The only answer is : Because.
It is an observational fact data gathered over centuries that made us separate electricity into charges, like ones repelling each other , unlike ones attracting. It is an experimental fact organized into this duality.
Physics is about mathematical models that are used to fit existing data and predict future phenomena.
The title asks:

Explanation of electromagnetism using quantum field theory

that is, it is asking for a specific mathematical model. Unfortunately, even though QFT can be used to predict the behavior of charged elementary particles it cannot explain why there are positive and negative charges and like charges repel and unlike attract. It still is an experimental fact inputted to the postulates of the theory.
Comment: I disagree that the fact that two opposite charges attract is *built into* QFT. In any $U(1)$ gauge theory particles with opposite sign charges will attract each other, while particles with same sign charges repel each other. The observation enters when we introduce particles with opposide charges into our theory.
Comment: @Neuneck You are stating the "built in" in different words. The theories were chosen because they could accomodate the observational fact that like charges repel and unlike ones attract. It is a necessary condition for any theory that would claim to fit observations of charge behavior, whether in postulates or in structure, which is a more fundamental postulate.
Comment: If Physics is about mathematical models, it does not damage to add the mathematical model in the answer.
Comment: @arivero IMO physics is about the study of nature,  using mathematical models to fit data and predict new behaviors.


Python how to grab certain number of lines after match

Question: Let's say I have an input text file of the following format:
Section1 Heading    Number of lines: n1
Line 1
Line 2
...
Line n1
Maybe some irrelevant lines

Section2 Heading    Number of lines: n2
Line 1
Line 2
...
Line n2

where certain sections of the file start with a header line that specifies how many lines are in that section. Each section heading has a different name.
I have written a regular expression that will match the header line based on the header name the user searches for each section, parse it, and then return the number n1/n2/etc that tells me how many lines are in the section. I have been trying to use a for-in loop to read through each line until a counter reaches n1, but it hasn't worked out so far.
Here's my question: how do I return just a certain number of lines following a matched line when that number is given in the match and different for each section? I'm new to programming, and I appreciate any help.
EDIT: Okay, here's the relevant code that I have so far:
import re
print
fname = raw_input("Enter filename: ")
toolname = raw_input("Enter toolname: ")

def findcounter(fname, toolname):
        logfile = open(fname, "r")

        pat = 'SUCCESS Number of lines :'
        #headers all have that format
        for line in logfile:
                if toolname in line:
                    if pat in line:
                            s=line

        pattern = re.compile(r"""(?P<name>.*?)     #starting name
                             \s*SUCCESS        #whitespace and success
                             \s*Number\s*of\s*lines  #whitespace and strings
                             \s*\:\s*(?P<n1>.*)""",re.VERBOSE)
        match = pattern.match(s)
        name = match.group("name")
        n1 = int(match.group("n1"))
        #after matching line, I attempt to loop through the next n1 lines
        lcount = 0
        for line in logfile:
             if line == match:
                    while lcount <= n1:
                                match.append(line)
                                lcount += 1
                                return result

The file itself is pretty long, and there are lots of irrelevant lines interspersed between the sections I'm interested in. What I'm not too sure about is how to specify printing the lines directly after a matched line.
Comment: Can you show the relevant code that you have so far? Please read [this](/) page and then update your question.
Comment: I know this is old as f***, but you saved my life.
That int(match.group("n1"))... <3
Answer: # f is a file object
# n1 is how many lines to read
lines = [f.readline() for i in range(n1)]

Comment: But how do I specify only printing the lines directly after the matched header line?
Comment: @Simos: you read the lines from the file one by one. As soon as the current line matches your filter, perform the code I provided. Note that each `readline` from the file moves the file's internal read pointer to the next line
Answer: You can put logic like this in a generator:
def take(seq, n):
    """ gets n items from a sequence """
    return [next(seq) for i in range(n)]

def getblocks(lines):
    # `it` is a iterator and knows where we are in the list of lines.
    it = iter(lines)
    for line in it:
        try:
            # try to find the header:
            sec, heading, num = line.split()
            num = int(num)
        except ValueError:
            # didnt work, try the next line
            continue

        # we got a header, so take the next lines
        yield take(it, num)

#test
data = """
Section1 Heading  3
Line 1
Line 2
Line 3

Maybe some irrelevant lines

Section2 Heading 2
Line 1
Line 2
""".splitlines()

print list(getblocks(data))


Relation between Order of element and nature of group

Question: Prove or disprove : If every element of a group G are of same order then G is abelian . I am not getting how to show it. I can prove easily that  group having elements of order 2 only is abelian. But how to prove it generally ?
Comment: It is already false for $n=3$, see my answer.
Answer: This question is closely related to the restricted Burnside problem: given numbers $m$ and $p$, is the restricted Burnside group $B_0(m,p)$ finite?

Proposition: A finite group $G$ has the property that all non-trivial elements have the same order $p$ if and only if $p$ is prime and $G\ne 1$ is a quotient of $B_0(m,p)$ for some $m.$

Another counterexample is the following group:
$$G= \langle x, y, z  |   x^3=1,  y^3=1,  z^3=1,  [x,z]=1,  [y,z]=1,  [x,y]=z^{-1} \rangle$$
is non-abelian of order $27$, and all its non-trivial elements have order $3$.
The group is exactly the Heisenberg group over $\mathbb{F}_3$ from Robert's answer.
Answer: I assume you mean every non-trivial element.
This is not true in general. A counter example can be found here.


Master bath faucet leaks when using other showers or when running dishwasher

Question: I have a master bathroom pretty much next to a second bathroom upstairs. Lately I noticed that when the 2nd bathroom shower is being used the master bathtub faucet leaks. I guess the same thing is happening when the dishwasher is running as well. What could be causing this or what can I do to stop it from happening?
Comment: did it start leaking when the 2nd bathroom was used (leaking all the way until the 2nd bathroom stop)? or is it only start leaking when right after 2nd BR stop?
Answer: Assuming you have an anti-scald mixing valve then it sounds like the seal (gasket) inside the bathtub faucet's cartridge could be compromised.
When the water pressure is full force (no other faucet diverting pressure) then the gasket is being sealed by the water pressure but as soon as a tap is opened then it alleviates enough pressure for the tub valve to fail.
You probably need to replace the cartridge in the tub faucet.
Even if it's not an anti-scald valve you need to investigate the gaskets inside the faucet.
Comment: That makes sense. Thank you, I appreciate it.


Reusing pickle brine

Question: So I just finished a jar of home-made pickles. They were excellent! Not too salty, a bit spicy, very good. They were so good that I'd like to get some more pickles out of that jar. I was thinking of pickling some eggs in that same brine. Is reusing brine ever done? Are there any reasons I shouldn't do it? I've never heard of this being done, but I don't see why not.
Answer: While reusing brine is probably fine in many cases, it's tricky from a food-safety perspective.  It seems like there are lots of threads on the internet these days about reusing "pickle juice," and there are great reasons to take your brine and use it in some recipe for salads, dressings, sauces, etc. that you'll consume soon after making (or at least sterilize by cooking).
But reusing brine to make more pickled foods?  That's another issue entirely.
If you've made homemade pickles or canned goods, you know that most reputable recipe sources have huge disclaimers saying: "Warning!  Always be sure to follow recipes exactly, and do not deviate from the given proportions."
If you make traditional lactofermented pickles, you need a certain salt concentration to inhibit growth of dangerous microbes in the first few days of fermentation.  After that, the acidity created by fermentation will prevent anything bad from growing.  If you make "fresh pack" pickles or refrigerator pickles, you depend on a certain concentration of acid (usually vinegar and/or lemon juice) and salt to prevent bacteria growth.
Particular concentrations of acids and salt are critical to keep your food safe, especially if you plan to store it for more than a couple days, even in the fridge.  Refrigerator temperatures slow the growth rates of bacteria, but they don't stop a lot of bad things from growing completely.  If you drop a bunch of fresh vegetables in old brine and come back in a month or two expecting pickles -- you'll probably have some great-tasting stuff.  But it could also be carrying harmful pathogens.
The main problem is that brine has salt.  Due to osmosis, salt will draw water out of things with high water content (like vegetables, eggs, fruits, and just any food you might think of pickling).  If water is added to your brine as it "leaks" out of the added food, you reduce the salt concentration as well as the acid concentration, perhaps leaving an unsafe solution to make further pickles.
Pickling recipes know this and will build in extra salt and/or acid into most recipes, knowing how much water on average will come out of particular foods.  By adding a second or third or fourth batch of food to that solution, the brine will become increasingly watery.
Boiling or heating the brine -- as suggested in other answers -- probably doesn't help much.  Your pickling brine was already designed to prevent growth of pathogens, with proper concentrations of salt and acid.  You shouldn't be worried about pathogens in the brine, but rather pathogens in the new food you're adding.  Cooking your new food first can help, but that sometimes ruins the texture of many pickled foods.
Also, even boiling the food many not be sufficient if the reused brine gets too weak.  Botulism bacteria, for example, has spores that are not destroyed even at boiling temperatures.  With proper acidity (and salt), they won't grow.  But if you mess with the recipe, they could.  At even lower acid levels, you could grow all sorts of stuff, Listeria, for example.  At refrigerator temperatures, it might take a few weeks or months to grow to dangerous levels, but long-term storage is exactly what people tend to do with pickles.
The only way to reuse brine safely would be to ensure that your new brine has the same characteristics as the old one: especially equivalent acidity and salt content.  If you really know what you're doing -- i.e., are an experienced pickle maker and understand how to vary recipes while ensuring safety -- you might be able to calculate how much salt and acid to add to keep your brine safe while adding new food.  (Trying to re-ferment lactofermented pickles is unreliable, so I'd discourage that route to obtain new acidity.)
In the vast majority of cases, reusing pickling brine won't result in any problems, especially if you keep it in the refrigerator and only put the new food in for a few days.  Commercial brines, in particular, often have excess acid and salt beyond that necessary to ensure safety, so reusing them once may be unlikely to cause problems.  But it's actually not a safe practice unless you know what you're doing, particularly if you store the new food for any length of time.  Whatever you do, do NOT leave pickles made from reused brine at room temperature, even if you've heated the brine and resealed the jars.  Without the guarantee of proper acidity, you could end up with botulism toxins or other dangerous spoilage bacteria.
Comment: @jdods - As I alluded to, if you keep the food in the refrigerator, it's probably fine.  Officially, according to food safety recs (which I try to follow in my answers), it should be fine for several days.  Likely, as you note, with most brines the food in the fridge will be good for much longer.  The problem is that it's unpredictable unless you actually know the concentrations of acidity and salt.  For casual short-term pickling it *might* be fine.  But pickling by its nature is about long-term food preservation. If intending that, it's important to follow standard recipes.
Comment: I was just about to ask this question but found this post and your excellent answer. I agree reusing the brine many many times would clearly increase risk as you outline. But for a very full sour brine, reusing once by adding more cucumbers? Sure very water intense vegetable, but if the brine stays at half sour and above? Maybe add some salt or a touch of vinegar?
Answer: I have done some experiments pickling eggs with left over cucumber pickle brine.
Just to be safe I reboiled the brine to sterilize it.
It tasted great.
I don't do this with my eggs anymore simply because pickled eggs have more potential than cucumbers. I pickle my eggs now with different vinegars, like balsamic, for more interesting flavors and colors.
Comment: I didn't notice a difference in flavor but I didn't do a side-by-side comparison. There are few flavor compounds in there that I would expect to be unstable. I didn't need to add water- it only has to boil for a few minutes to sterilize it. It will lose only a negligible amount of water in that time.
Comment: Does reboiling brine affect the flavour? Also, would I have to add more water, as I imagine that boiling the brine will cause some liquid to be lost to evaporation?
Answer: I am not sure about switching to eggs, but I have known several people who reuse brine for more pickles. Warm the brine in the microwave (not to boiling, but to about 120F) add some cucumbers and re-seal the jar. When the brine cools it will seal the jar and you will have fresh pickles in about a week.
Comment: Why the microwave? Wouldn't the stove, with a candy thermometer, be much easier and more precise?
Comment: precision isn't really called for. Just 'luke warm' will do. For this the microwave is just easier.
Comment: I guess I'd expect that too much heat could kill important microbes in the brine; but maybe that's not the case. I've never researched nor done pickle making. :)
Comment: @Flimzy- most pickles these days are preserved with salt rather than fermented, therefore, killing microbes is a good thing.
Comment: @Sobachatina: Yes, these pickles were made with salt.
Comment: Is the *only* reason to reheat so that it will reseal the jar as it cools?
Comment: No, the warm also helps to jump start the brining.
Answer: I re-used pickle brine for pickled eggs for yrs. When the pickles are done i just pop in some hard boiled eggs. I have never had an issue and they have always turned out well. many times i have 2or 3 different pickles brines from assorted jars around the same timeline and will pour them in together and make a bigger batch. Again never any issues, maybe I am just lucky but I am about to do it again today !
Answer: If you get concerned about bad bacteria growth just think outside the box. add a bottle of Frank's hot sauce, some sliced onion and garlic to the brine, pickling spice. red pepper, black pepper and sea salt. I use mine over and adding more vinegar will make them more potent. I love apple cider vinegar. But get creative with flavors you enjoy.  Eggs,  cabbage,  sausages  ( fully cooked  ) onions, beets, garlic, it's all amazing and healthier with a good pickle.
Enjoy!
Comment: The OP seems interested in preserving the flavor of a jar of pickles they enjoyed, and your proposed solution seems like it will radically alter the flavors, essentially to make a new batch of pickles to a recipe you enjoy - can you explain why this is a good answer to their question?  Also, some of your recommendations may make the brine less hospitable to bacteria, but some seem to be simply for flavor - can you elaborate?
Answer: I've reused pickle juice for up to 3 times. With each use I do add some vinegar and some pickling spice and the eggs turn out very well. And never any problems. Refrigeration of course!

Reusing pickle brine


How to delete all my replies on YouTube

Question: I understand how to delete my YouTube comments, but is there a way to bulk delete all the replies I have made at all video sites without having to return to each individual site?
Comment: You might be able to do something with the YouTube API. https://developers.google.com/youtube/v3/docs/commentThreads/list
Answer: It is possible to programmatically remove comments, see this answer at Stack Overflow: "Remove a comment using the youtube data api v3?", but the quota will limit you to ~200/day.
Here is their help:
https://developers.google.com/youtube/v3/docs/comments/list https://developers.google.com/youtube/v3/docs/comments/delete
You can also go to this webpage: https://www.youtube.com/feed/history/comment_history and manually delete the ones you want, as many as you want, fairly quickly (and likely more than 10/minute, if you have patience).

How to delete all my replies on YouTube


How did Sauron know there were Survivors of Númenor?

Question: Did he just know they were there or sense there were people around his domain? How exactly did he find out about the Faithful survivors of the Downfall of Númenor?
Comment: Sauron is canonically described as having innumerable spies, even down to the animals and birds. I'd guess there's very little that escapes his notice
Answer: The Númenóreans had cities and havens in Middle-Earth before Sauron was ever brought to Númenor. In fact, his arrogance regarding the Númenóreans was part of the reason Ar-Pharazôn decided to go to war with him.

And sitting upon his carven throne in the city of Armenelos in the glory of his power, he brooded darkly, thinking of war. For he had learned in Middle-earth of the strength of the realm of Sauron, and of his hatred of Westernesse. And now there came to him the masters of ships and captains returning out of the East, and they reported that Sauron was putting forth his might, since Ar-Pharazôn had gone back from Middle-earth, and he was pressing down upon the cities by the coasts; and he had taken now the title of King of Men, and declared his purpose to drive the Númenoreans into the sea, and destroy even Númenor, if that might be.
("Akallabêth")

Naturally, the enormous army that Ar-Pharazôn mustered had to land at a port, not just somewhere in the wilderness.

But the fleet came at last to that place that was called Umbar, where was the mighty haven of the Númenoreans that no hand had wrought.
("Akallabêth")

So he certainly would have known Númenóreans survived the Downfall in general even beforehand, since not all of them lived in Númenor. And certainly we might suspect that some of the Faithful lived in Middle-Earth to escape from the persecution of Sauron and Ar-Pharazôn.
A specific haven of the Faithful is called out as being founded even before Sauron was taken to Númenor:

2350 Pelargir is built. It becomes the chief haven of the Faithful Númenoreans.
(LotR, Appendix B)

It is not until 3262 that Sauron is taken to Númenor, and in 3319 that the we have Downfall of Númenor, in which Sauron perishes. In 3320, Arnor and Gondor are founded and Sauron returns to Mordor. But note it is more than a hundred years before Sauron attacks the Númenóreans in Exile:

3429 Sauron attacks Gondor, takes Minas Ithil and burns the White Tree. Isildur escapes down Anduin and goes to Elendil in the North. Anárion defends Minas Anor and Osgiliath.
(LotR, Appendix B)

So he had plenty of time to learn about the kingdoms on his doorstep in the intervening period, if he did not already know about them. Which given Pelargir had been around for more than thousand years at this point, you'd think he already would!
I would suspect that Sauron assumed the leaders of the Faithful survived anyway, since they rebelled against the King and Sauron and went aboard their ships prior to the Downfall:

For Elendil had remained in Rómenna, refusing the summons of the King when he set forth to war; and avoiding the soldiers of Sauron that came to seize him and drag him to the fires of the Temple, he went aboard his ship and stood off from the shore, waiting on the time.
("Akallabêth")
Answer: They weren't exactly hiding: they openly set up the kingdoms of Arnor and Gondor.


Algorithm for Graph/Data Structure on Java

Question: I have been working on the following problem where, I have a CSV file with two columns, we can say the filed names are "Friends". Both the columns contain letters from A to Z.
e.g.
<code>A B
B C
A E
D F
E F
</code>
Each row has two different letters(no duplication in the row). A is a friend of B, C is a friend of D etc...If person A talks to person B and Person B talks to person C, then B and C will become aquitances. Aquintaces are who share a common friend. I need to fin out who has more aquintances?
I have been trying with two different methods one using differnt data structures like hashmap, arraylist, stack etc, and another using graph theory (JGraphT library).
But, i am stuck with the logic if I use data strcutres and I am stuck with traversal in the graph if I use graph theory.
I have following questions:-

What is a better approach to go with data structures or graph? Or
any other better approach/logic/algorithm than this?
Does anyone   know how to traverse a graph in JgraphT Library. I am
not able to do     this, they have very limited documentation about
the library.

Please, any help would really be appreciated.
Answer: Generally HashMaps are among the most rapid and easy to use. I would recommend you use them rather any custom libraries, except if you are sure that some library will do easily something you need and something that will take longtime for you to code.
In your case, just you can just use each person as a key and the list of his friends as the object pointed to by. Parsing your .csv file and filling the HashMap accordingly will solve your issue, as a previous comment pointed out.
Answer: You can have a hash table first that maps every letter to the set of its friends, e.g. A maps to { B }, B maps to { C }, and if Z has two friends Y and W then Z maps to { Y, W }. This is a hash map from letters to sets-of-letters.
To calculate the acquaintances, iterate through the hash map. When you are at entry A -> { B, C, F } then iterate in an inner loop through the set B, C, F. Collect their friends (three sets) into a single set (just insert the elements into a temp set) and remove A from that set if A was found. The size of that set is then the number of acquaintances for A. Rinse and repeat.


What is happening to PHP 6?

Question: I am excited about the changes in PHP 6 previewed in PHP 5.3+. However, I wonder why it takes so long to release PHP 6? Books about it have been published since 2008, and announcements on it since 2007, but I am yet to hear about an alpha or a beta. Why does it take so long to release it? Or is that the way it goes with all languages when they transition to a major release where I guess it takes around 4-5 years to release?
Answer: The release timetable is not unusual for languages, and it's not even that unusual for PHP: 5.0 was released in 2004, but 4.0 was released in 2000.
Compare this to the last stable releases for C (2000), Fortran (2003), or C++ (2003).
One other thing to keep in mind is that 5.3 was a major release in all but name. It adds a lot of stuff that was originally destined for PHP 6. Due to development problems with unicode support (a major part of PHP 6), it was decided to release what was stable at the time as a 5.x branch.
Comment: By 'stable release for C', I assume you are talking about the standard, not the implementation, right? The situation is different with PHP, because the canonical implementation defines the standard, not the other way around.
Answer: PHP6 Is not something that is really aimed for right now. Originally it was going to be the "namespace/closure/plus some" release. With the release of PHP 5.3 containing most of the cool stuff that was supposed to be in PHP 6, its not really known what the current trunk will be versioned. Its said it "PHP 5.4, PHP 6 or maybe even PHP 7."
Either way the functionality is looking awesome. Things like array dereferencing (example: echo foo()[0]) are already in trunk for everyone to play with. I wouldn't put too much concern on how long the '6' release is taking. 5.3 was released in July of 2009 (which contained most of the functionality that was supposed to be in 6) and they recently released 5.3.3 (July 2010), so it still seems like development is running smoothly.
Answer: I don't think there's any demand for PHP 6. I mean, what do you expect 6 to have that doesn't already exist? True unicode support is all I can think of, and that doesn't even impact me at the moment.
Also there's been new features added recently, like namespaces and the phar packaging system that need some time to soak in. You don't want to throw even more features at the community before they've adopted the old features.
Finally the industry as a whole has been slow to adopt new versions of PHP. There are still applications being written that target 4.3. The industry and community need to catch up before PHP goes much further.
Comment: better SOAP library.
Comment: OO syntactical cleanup is going to be nice.  I can't stand Perl 5's OO syntax now (though yes it makes lexical sense).
Comment: Array dereferencing.
Comment: Getting rid of the accumulated cruft, fixing bad design decisions from 10 years ago. A major version leap is a good opportunity for breaking changes, and PHP desparately needs some of those.
Answer: Join the mailing lists
If you join the PHP internals mailing list you can know exactly what is happening. You will see people talking about certain patches, optimizations and some new features. Occasionally they'll discuss about the next release, but it is somewhat ethereal right now.
RFC
You can also learn more about what is happening by watching the PHP RFC wiki page. Some months ago they were pushing for a new release that had traits (which is already accepted and mostly implemented and refined AFAIK) with it but they decided to wait, don't exactly remember why, but unicode is one of the factors that is stalling the new release.
So long story short, there is no date, but you can ask in the mailing list yourself and you'll get a better and more accurate answer. I've seen no recent talk on the next release.

What is happening to PHP 6?


Oil pressure low

Question: Once every couple of days random I get a warning message stating low oil pressure that comes on and goes of just as quick as you can read it. Any thoughts on what this could be causing this. I drive a citreon c3 10 plate. No lights on dash just oil symbol for a few seconds. Oil level is at the right level.
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Comment: Does a Citroen use an oil pressure sending unit? A plain pressure sensor set to turn on the oil pressure indicator if below a specified value, before startup then turns off after startup. It's possible for sending units to wear out or its wiring becomes intermittent. One way to tell if oil pressure is lower than optimum is to remove the sending unit and put on an oil pressure gauge. You'll need to know minimum oil pressure at idle.
Comment: I have had  low pressure caused by a dirty screen on the oil pump. I fixed it by removing the screen.
Answer: If this happens at idle, it's likely that your oil pressure is low.  If oil level is fine main bearing failure is the most likely cause.
There is no way to tell except putting a pressure gauge on the oil line.

Oil pressure low


How do I turn off the mature language filter?

Question: In Diablo 3, every time someone uses an inappropriate word I see a bunch of random characters instead of what they are actually saying. I'm a fan of angry, curse-filled rants. I enjoy seeing the interesting, colorful language of people who are having a hard time in-game. Is there a way to turn off the language filter?
Comment: I keep finding it hilarious that the Dutch version of the verb "can" ("kunt") gets filtered out, it seems a little strict to me
Answer: After you are logged into your account select Options -> Social Tab -> Uncheck the box that reads "Mature Language Filter" in the bottom right hand corner.
Answer: I think its in Options->Social near the 'allow quick join' setting. Will update the answer once I can login & check.


Why Homology is homotopy invariant

Question: I've red Hatcher's proof of homotopy invariance for singular homology. I understood how the proof works and the reason why we construct the prism operator (i.e. its a chain contraction). However, this proof gave zero intuition relative to why is homology homotopy invariant. Its clear how to show it, but not at all why is it true. I would appreciate any form of intuitive explanation (geometric, topological..). Thank you in advance.
Comment: I think it gives plenty of intuition: a homotopy between two chains will, through the prism operator, give a homology between them.
Comment: Homotopy invariance of singular homology is easier to prove  in a cubical approach, as in Massey's book on "Singular Homology". The reason for this is that if $I^n$ denoted the standard $n$-cube, then $I^{n+1} \cong I^n \times I$, so that homotopies fit better in the cubical framework than in the simplicial one.
Comment: Could you be a little more specific? The proof shows that from an homotopy between spaces you can build an homotopy of chain complexes, and homotopy of chain complexes grants the equality of the maps in homotopy. Which part does troubles you exactly?
Answer: This is imprecise, but I think in the following way: The cellular chain complex $C_*(I)$ of the unit interval $I$ is $0 \rightarrow \mathbb{Z} \rightarrow \mathbb{Z}^2 \rightarrow 0$ concentrated in degrees one and zero. The nonzero differential is $\begin{bmatrix}1 \\ -1\end{bmatrix}$. A continuous map $X \times I$ to $Y$ (in other words a topological homotopy) "should" (this should be justified) induce a chain map from $C_*(X) \otimes C_*(I)$ (tensor product of chain complexes) to $C_*(Y)$. I claim that such a chain map defines a chain homotopy. See below for a proof. My takeaway is that the above chain complex serves the same purpose in the category of chain complexes as the unit interval does in the category of spaces.
To see this, let's consider the tensored chain complex. At each degree $k$, we have \begin{align*}
[C_*(X) \otimes C_*(I)]_k &= \left(C_k(X) \otimes \mathbb{Z}^2\right) \oplus \left(C_{k-1}(X) \otimes \mathbb{Z}\right) \\
&\cong C_k(X) \oplus C_k(X) \oplus C_{k-1}(X)
\end{align*}
The $k$-th differential of this chain complex can be identified with the matrix $\begin{bmatrix}d_k^X & 0 & (-1)^{k-1} \\ 0 & d_k^X & (-1)^k \\0 & 0 & d_{k-1}^X\end{bmatrix}$, where $d_k^X: C_k(X) \rightarrow C_{k-1}(X)$ is the $k$-th differential for $X$.
Finally, if the morphisms \begin{align*} \begin{bmatrix} f_k & g_k & h_k \end{bmatrix} \colon C_k(X) \oplus C_k(X) \oplus C_{k-1}(X) \rightarrow C_{k}(Y) \end{align*} for various $k$ are going to assemble into a chain map, they have to commute with the differentials: \begin{align*}  d_k^Y \begin{bmatrix} f_k & g_k & h_k \end{bmatrix} &= \begin{bmatrix} f_{k-1} & g_{k-1} & h_{k-1} \end{bmatrix} \begin{bmatrix}d_k^X & 0 & (-1)^{k-1} \\ 0 & d_k^X & (-1)^k \\0 & 0 & d_{k-1}^X\end{bmatrix}\end{align*}
Thus, we get \begin{align*}d_k^Y f_k &= f_{k-1} d_k^X \, , \\ d_k^Y g_k &= g_{k-1}d_k^X \, ,\\ d_k^Y h_k &= (-1)^{k-1}f_{k-1} + (-1)^kg_{k-1} + h_{k-1}d_{k-1}^X \, .\end{align*}
We may rewrite the last line as $d_k^Y (-1)^{k-1}h_k + (-1)^{k-2}h_{k-1}d_{k-1}^X = f_{k-1} -g_{k-1} $. We see that the $f_k$'s and $g_k$'s assemble into chain maps $f_*$ and $g_*$, and the $(-1)^{k-1}h_k $'s form a chain homotopy from $f_*$ to $g_*$.

Why Homology is homotopy invariant


Connect Samsung galaxy tab to projector

Question: I have Samsung Galaxy tab P3100 tab. I want to connect it to Projector for presentation. I searched a lot but din't get any solution. Does any one knows is it possible to connect it to projector? If yes then what accessories I need and what's the procedure?
Comment: That very much depends on the projector. Do your tab *and* the projector have a HDMI port? That would be my first check. I guess you don't want to carry another "intermediary" device around, and thus are looking for a direct connection, right?
Answer: I cannot find any specific accessories on the official samsung product page. However a TV-OUT Cable exists which presumable (if the projector has all the necessary inputs) can also be used to show the picture from the tab on the projector:
Product Name: Samsung ECC1TP0BBEGSTA Galaxy Tab TV Out Cable
Unfortunately the cable doesn't offer hdmi - output: only RCA Video.
An HDMI Adapter for the Galaxy TAB Series exists but it's not compatible with your specific model (Galaxy TAB 2 7.0) see the following product page
Answer: The Galaxy Tab 2 7.0 P3100 has no capability to connect to an external display.  The necessary hardware was not included in that model.
source : http://forum.xda-developers.com/showpost.php?p=37032295&postcount=110
Answer: You need to use a special adapter for that.  You need this:
Samsung P4 P5 HDTV Adapter for Samsung Galaxy Tab 10.1, Galaxy Tab 8.9, Galaxy Tab 7.7 and Galaxy Tab 7.0 Plus
SANOXY® Black HDMI Input to VGA Adapter Converter For PC / Laptop
6FT SVGA VGA Monitor MM Male To Male Extension Cable 80
If the projector has an HDMI slot then you don't need the HDMI to VGA and the VGA to VGA,  You just need to use the Samsung EPL-3PHPBEGXAR Galaxy Tab HDTV Adapter and then an HDMI cable.

Connect Samsung galaxy tab to projector


Combining multiple Polygons into one MultiPolygon in QGIS

Question: QGIS 3.34.3 has a processing function "Multipart to singleparts". But what about the other way around? What is the easiest way to create a MultiPolygon from several polygons?
Comment: Also the "exact" opposite of "Multipart to singleparts" is actually "Promote to multipart" (which doesn't combine polygons, just make singlepolygons into multipolygons containing a single part) but I don't think that is what you meant.
Answer: "Collect geometries" processing algorithm is what you are looking for.

Takes a vector layer and collects its geometries into new multipart geometries.
One or more attributes can be specified to collect only geometries belonging to the same class (having the same value for the specified attributes), alternatively all geometries can be collected.
All output geometries will be converted to multi geometries, even those with just a single part. This algorithm does not dissolve overlapping geometries - they will be collected together without modifying the shape of each geometry part.
Comment: That is absolutely right... I've just found that out too. My problem was that I had the "Edit features In-Place" switch activated in the toolbox. Another option would be using the `ST_Collect` function in DB-Manager.
Comment: Yes, ST_Collect is equivalent to this processing tool. they are the same just used at different places and maybe coded a bit differently


Populate a field in custom setting when Sandbox is created

Question: I have a custom setting present in production which consist of username and other related user details. Now, every time I create a new Sandbox I have to manually go and edit the custom setting in sandbox and edit the data that got populated via Production. Is there a way to populate the custom setting data on creation of new sandbox?
Comment: Is this a full, partial, or developer sandbox?
Comment: @Eric Full Sandbox
Answer: Developer Sandbox
You will have to write a class which implements the SandboxPostCopy Interface.

global class HelloWorld implements SandboxPostCopy {
    global void runApexClass(SandboxContext context) {
        System.debug('Hello Tester Pester ' +
            context.organizationId() + ' ' + context.sandboxId() +
            context.sandboxName());
    }
}

Replace the system.debug call with logic to create your custom setting records.
Partial Copy Sandbox
You can include the custom settings in a sandbox template.
Full Sandbox
All data carries over automatically, including custom settings.
Comment: @GauravKhandekar - While the answer is solid, how will it help if you said it was a full sandbox? Data should copy over automatically so either it is not a full sandbox or there is something going on
Comment: @Eric I'm trying to implement the logic of populating the username present in sandboxes into the custom setting. The logic for this would go in the above mentioned class itself. So, i do agree that the custom setting from production will have data in it, what i'll be trying to do is over write it with the new logic. I'm still working on the code and will update you accordingly.


Proper Use Of HTML Data Attributes

Question: I'm writing several JavaScript plugins that are run automatically when the proper HTML markup is detected on the page. For example, when a tabs class is detected, the tabs plugin is loaded dynamically and it automatically applies the tab functionality. Any customization options for the JavaScript plugin are set via HTML5 data attributes, very similar to what Twitter's Bootstrap Framework does.
The appeal to the above system is that, once you have it working, you don't have worry about manually instantiating plugins, you just write your HTML markup. This is especially nice if people who don't know JavaScript well (or at all) want to make use of your plugins, which is one of my goals.
This setup has been working very well, but for some plugins, I'm finding that I need a more robust set of options. My choices seem to be having an element with many data-attributes or allowing for a single data-options attribute with a JSON options object as a value. Having a lot of attributes seems clunky and repetitive, but going the JSON route makes it slightly more complicated for novices and I'd like to avoid full-blown JavaScript in the attributes if I can. I'm not entirely sure which way is best.

Is there a third option that I'm not considering?
Are there any recommended best practices for this particular use case?
Answer: I've been working with a similar pattern over the past several months.  My personal opinion is that it is ok to mix these two conventions depending on the needs of the plugin.  If you have a small number (i.e. < 5) of well defined parameters or if you want to select elements based on a particular attribute then data attributes for each parameter is ok.  If you have a large number of parameters, or if the parameters are highly dynamic (i.e. request parameters to an ajax call) then json within a data attribute may be more beneficial.
In any case, IMO it is very important to clearly document what the parameters are and how they should be used.
Comment: +1 for "clearly document"; the rest of the answer is pretty good, too. Documentation is *not optional* for anything other than a toy, one-developer, no-one-else-will-ever-look-under-the-hood app. And even then its a good idea.
Answer: As you pointed out, both of your approaches have good points, and drawbacks. I am currently working with the later, which I personally find easier to use. However, the first approach seems to be easier to read for others, so.. Instead of looking for an other, better solution you could just use both your ideas. How about this?

Equals

Answer: I have been using the second option, a JSON object, for a long time, but have never really been happy with it. At first I was constructing the JSON object manually. That proved to be troublesome as it is easy to screw up the syntax. so I wrote a helper to programmatically create data-options.
That worked well as far as creating valid JSON is concerned, but I have never really been happy with the single quotes around the JSON object as the rest of my HTML attributes are double quoted.
Back when I started using the JSON options method, one thing it had going for it was that it could be accessed via getAttribute which at the time was more universally supported than the dataset property.
Now that dataset is more widely supported, I plan on using the first option, that is many data attributes on an element except where there are a lot of attributes or they are dynamic.

Proper Use Of HTML Data Attributes


Electrics tag needed?

Question: Is the electrics tag needed?  If so, what is it's purpose?
Answer: Hmmm - we have three similar tags - electrics, electrical and electronics
To my mind, electrics and electrical both describe tha main electrical system of the car - fuses, wiring etc, and one should probably be a synonym of the other.
Electronics to me describes things with chips in, such as computers, ecus etc, so is distinct.
Comment: Agree with this, Electrics and electrical could perhaps be merged.
Answer: They seem very distinct to me.  They are certainly related, but all point to possibly different resolutions and skill sets.
<code>Electrical - Wiring
Electronics - Computers and sensors
Electrics - Vehicles powered by electric motors
</code>
Comment: "Vehicles powered by electric motors" is coverd by [tag:electric vehicle]
Comment: Yeah, "electrics" should be got rid of.

Electrics tag needed?


What does a native speaker imagine when hearing "lunatic cat"?

Question:
Is "lunatic cat" like "crazy cat" or "it's nonsense, they don't say so", or something else?
According to https://en.oxforddictionaries.com/definition/lunatic there is a connection to the moon (see "origin"). Could native speaker imagine "lunatic cat" as "moon cat"?
Comment: A "moon cat" would probably called a _lunar_ cat.
Comment: Using cat standards, I'd consider it to be "normal".
Answer: There is only one modern adjectival meaning of 'lunatic' and it is:

"silly in a dangerous way", or "wildly foolish"

There is an old meaning of "mentally ill", but the term would never be used of someone actually mentally ill today. 'crazy' would be a good synonym.
So a 'lunatic cat' would be a cat that behaved dangerously, or 'wildly foolishly'.
The etymology does derive from 'lunar' for the moon, but the modern meanings do not relate to the moon. The adjective for 'of or pertaining to the moon' would be 'lunar'.
Comment: Or to answer the OP directly, no, 'lunatic' evokes nothing about the moon to a modern speaker.
Comment: ok, then how offensive sounds "lunatic" (meaning "silly in a dangerous way")? could a person be offended if named so? could a cat owner be offended if his cat is named so?
Comment: It depends. Someone who thinks they are a safe driver would be offended if told they "drive like a lunatic". But an extreme skateboarder is probably pleased being told they "skateboard like a lunatic".


Decomposability of Hausdorff measure

Question: Consider $s$-dimensional Hausdorff measure $\mathcal{H}^s$ on the Borel sets in $\mathbb{R}^n$.
$\mathcal{H}^s$ is not $\sigma$-finite if $s < n$, but it is semifinite (on Borel sets!)
Is it known whether $\mathcal{H}^s$ can be decomposable, i.e. can there be a partition of $\mathbb{R}^n$ into disjoint Borel sets $\{X_i:i\in I\}$ ($I$ necessarily uncountable) such that $\mathcal{H}^s(X_i)<\infty$ for all $i$ and, for every Borel set $E$, $\mathcal{H}^s(E)=\sum\limits_{i\in I}\mathcal{H}^s(E\cap X_i)$?  Does the answer depend on any set-theoretic assumptions?
Comment: Interesting question. For $s=0$ it is of course trivial. For $0<s<n$ I would be ready to believe that such partition does not exist. For example with $n \ge 2$ and $s=1$ I would try decomposing any partition-candidate into rectifiable and unrectifiable parts and take an unrectifiable set inside the union of the rectifiable parts of the partition sets (or the other way around). Here there might be a problem with the regularity of the unions.
Comment: My first instinct is also that it is not possible if $0 < s < n$.  But this might not be provable; it might be possible using some set-theoretic assumptions like maybe the continuum hypothesis.  I have not found any discussion of this question in the literature.
Answer: There are cardinality $c$ Borel sets of finite ${\cal H}^s$ measure in ${\mathbb R}^n$.  Assuming the Continuum Hypothesis, well-order these by the first uncountable ordinal as $E_\alpha$ for  $\alpha \in A$, and define $X_\alpha = E_\alpha \backslash \bigcup_{\beta < \alpha} E_\beta$.  Then $X_\alpha$ are disjoint Borel sets of finite ${\cal H}^s$ measure.  For any Borel set $E$ of finite ${\cal H}^s$ measure, $E = E_\alpha = \bigcup_{\beta \le \alpha} (E \cap X_\beta)$ for some $\alpha$,
and ${\cal H}^s(E) = \sum_{\beta \le \alpha} {\cal H}^s(E \cap X_\beta)$ with $E \cap X_\beta = \emptyset$ for all $\beta > \alpha$.
Hmm, I'm not sure about the case ${\cal H}^s(E) = \infty$: I think it's true that $E$ has Borel subsets of arbitrarily large finite ${\cal H}^s$ measure, but I don't have a reference at hand and can't think of a proof.  If this is the case, then the result is true.
Comment: This statement is true about Borel sets of infinite Hausdorff measure.  See the article by J. Howroyd (Proc. London Math. Soc. (3) 70 (1995) 581-6O4) for the most general results known along this line.  However, the result is false in general for $\mathcal{H}^s$-measurable sets; see section 439H of Fremlin's book.  This is why I phrased the question in terms of Borel sets.

What your argument shows is that a semifinite measure space whose $\sigma$-algebra has cardinality $\aleph_1$ is decomposable.  It answers the question under the assumption of the continuum hypothesis.
Comment: I carelessly misspoke slightly in the previous comment.  The argument only works for semifinite measure spaces where each point is contained in a measurable set of finite measure.  This of course holds for Hausdorff measure, but not in general; for a simple counterexample, see IX.1.9.3 and IX.1.9.6 in the Real Analysis manuscript on my website  .

Decomposability of Hausdorff measure


Draw, or discovered check

Question: It's my move.  All I have is a king.  The opponent has a rook and a queen.  I can't move without going into check.  Is this a draw?
Answer: That's the definition of a "stalemate", which is a draw, i.e. if it's your turn to move and your lone king has no legal move.  It can also happen in other situations, such as for example if you also have blocked pawns on the board in addition to the king, since you will still have no legal move. This is often the last resort of the novice, the hope that his opponent will let him obtain such a position. If you are the player with the rook and queen, or even just a queen, in such a situation, you must be careful to always leave your opponent's king a space to move to if you don't have an immediate mate to avoid this occurring.  Of course, it's much less likely that you can get a stalemate against a more skilled opponent, although some strong players have "swindled" their equally strong opponents out of a win thereby, one famous case being a long-ago game between Grandmasters Larry Evans and Samuel Reshevsky.
Comment: @PeteBecker What about mating the opponent king, so that you won't have to worry about stalemate anymore ?
Comment: If I had a rook and a queen against a lone king I'd be tempted to sacrifice the queen so that I wouldn't have to worry so much about a stalemate.
Answer: Your description of the situation is too incomplete for us to answer.

If your king is not under check where it stands right now, then the situation is called a stalemate. The game is drawn.
If your king is under check where it stands right now, then the situation is called a checkmate. The game is lost for you, won for your opponent.

By the way, the appelation "discovered check" in the question's title is inappropriate here, it means something totally different.
Answer: This situation is called a stalemate.
Webster Dictionary defines a stalemate as "a position counting as a draw, in which a player is not in check but cannot move except into check."
In your situation, that would be considered a stalemate.

Draw, or discovered check


Something is beeping in my house intermittently. It is not the smoke or carbon monoxide detectors!

Question: We are having a very infrequent beep occur in the house.  It lasts about one second and then stops for a long time, about once an hour or so.  I can't tell what direction it is coming from but we have checked all the smoke and carbon monoxide detectors.  We can hear it pretty clearly from the living room and dining room.
Comment: How do you know it's not a smoke or CO detector?  If your smoke or CO detectors are older, the infrequent beep could also be an indication that they have reached the end of their useful life and need to be replaced.  CO detectors typically have about a 10-year lifetime on them, and have a built-in timer to know when that 10 years is up.  Also check if you have a UPS battery backup somewhere for your computer, sump pump, etc.  Without knowing what electrical items you have in your house, it's hard to know what it could be.
Comment: Is it a single, high-pitched beep like a smoke detector?  If not, how is it different?
Comment: A once per hour beep sounds a lot like a low battery indicator -- what else do you have running on batteries around the house?
Answer:
A once per hour beep sounds a lot like a low battery indicator -- what else do you have running on batteries around the house?

Some things to check:

Internet/Phone - specifically in my area, Verizon FIOS often has a battery backup so that phones don't go out when the power goes out in order to better simulate POTS Actually, in many recent FIOS installations they haven't bothered because people wouldn't bother to replace the batteries.
Burglar Alarm
UPS - Typically attached to a computer
Comment: If the OP has acute hearing, it could be an annoyatron: https://www.thegreenhead.com/2008/12/annoy-a-tron-2.php
Answer: Another idea: a service reminder built into an appliance or as a separate small battery-powered device. It could be a reminder to check the salt level in a water softener or to check the filter in the furnace, for example.
Make note of the exact time when you hear the chirp a couple times. Compute the interval and check whether it is consistent (it probably is). Then you can forecast when a future chirp will occur and can be ready to listen for it and localize the source better.


Profit maximization; how to derive

Question:
Can someone expalin me the math process step by step behind this? I haven't been able to figure it out and I cannot find anything in google
Answer:
I cannot find anything in google

The keywords you are looking for are "local extrema" or "local maximum" and "optimization". Using these my first result was quite good, a chapter of an online book from the Department of Mathematics at Whitman College.

Profit maximization; how to derive


Is it too late to develop foundational piano techniques?

Question: I am 16 years old and have been playing piano since I was very little. I have had teachers on and off, but to some non-pianists, my abilities at the piano are amazing. For reference, I can play all three movements of Beethoven's Moonlight Sonata, parts of La Campanella, and other difficult pieces. Despite others telling me I am a great pianist, I lack technical skills and am not confident in my pianistic abilities. I have an overactive pinky and struggle to play basic Bach Preludes and Fugues. I worry that due to my lack of proper training I cannot truly fix my technique. I aspire to be a composer; I want to be technically capable of playing what I write and writing what I play.
Comment: There are many question/answers here along the lines of "is it too late." See: [Am I too old? Is it too late? Starting, Resuming, or Mastering an instrument](https://music.stackexchange.com/questions/105456/am-i-too-old-is-it-too-late-starting-resuming-or-mastering-an-instrument), as well as all the results to the search "is it too late."
Comment: I thought this question was going to from someone who is 36 or 48 or something. 16 isn't too late for anything. Except maybe olympic gymnastics or being an Eagle Scout.
Comment: Please clarify "all" of the Moonlight Sonata. That is, all of the first movement vs. all three movements.
Comment: @AndyBonner This question differs in that it comes from someone already playing advanced music. The question you link to includes a catalog of "is it too late" questions, and I believe this one to be unique.
Comment: If you can play those well, you *must* have technical skills. And knowing what's missing, also have the wherewithall to rectify them.
Comment: @Aaron Yes all three movements.
Answer: Yes, technical foundations can be fixed even after reaching an otherwise advanced stage. It requires working with a teacher who can help identify problems and guide one toward solutions.
My feeling and experience is that the best approach is to "start over" and have the teacher treat you as though you have no experience at all, playing exercises or pieces they would give to absolute beginners. However, you and they should also require that you play them at the highest musical level you're capable of; meaning, you must treat even the simplest exercise as though it was a masterwork, attending to not just notes and rhythm and technique, but phrasing, articulation, dynamics ... which is to say, interpretation.
Also, consider browsing through similar questions posted on this site. A catalog can be found in Am I too old? Is it too late? Starting, Resuming, or Mastering an instrument


Marketing Cloud emails appear in Gmail's 'Promotions' Tab

Question: All Marketing Cloud Emails seem to end up in Gmail's 'Promotions' Tab, even if the Send Classification is 'Transactional'. Anyone has ideas on how to make sure these emails end up in the 'Primary' tab? :)
Answer: Don't think there is a way of doing it. While I didn't find any related documents about marketing cloud, here are some posts from other email service providers. Below is one from Mailchimp:

Gmail delivers messages to tabbed inboxes based on complex and
  changing algorithms that consider subscriber engagement, content, and
  sender information. Messages from email service providers, like
  MailChimp, often have a higher chance of being delivered to the
  Promotions tab.
Unfortunately, MailChimp has no control over the placement of emails
  in Gmail, and there is no proven way to "beat" Gmail's algorithms.
  Only a subscriber can move your emails from the Promotions tab to the
  Primary tab.

Article about this:
Mailchimp: http://kb.mailchimp.com/delivery/deliverability-research/about-gmail-tabs
Campaignmonitor:
https://www.campaignmonitor.com/blog/email-marketing/2013/09/should-we-worry-about-gmails-tabbed-inbox/
Vision6: https://support.vision6.com.au/hc/en-us/community/posts/206007558-Get-your-emails-delivered-to-the-primary-inbox-in-Gmail


Is it possible to use concatenated paths in to draw shading on an 1/8 of a sphere?

Question: So I know how to shade a sphere, or even a hemisphere, but I've been unable to shade an octant:
Drawing the edges of the region to be shaded is straightforward enough, but in order to draw it using arcs it was necessary to rotate the plane in which the arcs are being drawn. I included the whole block of code for completeness, but my question concerns the last few lines.
%define use path
\makeatletter
\tikzset{use path/.code=\tikz@addmode{\pgfsyssoftpath@setcurrentpath#1}}
\makeatother

%set the orientation of the coordinate system
\tdplotsetmaincoords{60}{110}

\begin{tikzpicture}[scale=5,tdplot_main_coords]
%draw the main coordinate system axes
\draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
\draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};

%set the orientation for the drawing of the first arc
\pgfmathsetmacro{\radius}{1}
\pgfmathsetmacro{\thetavec}{0}
\pgfmathsetmacro{\phivec}{0}

%make path from x=0,y=0,z=r to x=1,y=0,z=0
\tdplotsetthetaplanecoords{\phivec}
\path[save path=\ztoxarc,tdplot_rotated_coords] (\radius,0,0) arc (0:90:\radius);

%rotate the plane of drawing and make path from x=0,y=0,z=r to x=0,y=1,z=0
\pgfmathsetmacro{\phivec}{90}
\tdplotsetthetaplanecoords{\phivec}
\path[save path=\ztoyarc,tdplot_rotated_coords] (\radius,0,0) arc (0:90:\radius);

%make path from x=r,y=0,z=0 to x=0,y=r,z=0
\path[save path=\xtoyarc] (1,0) arc (0:90:1);

%draw all three arcs
\draw [use path=\xtoyarc \ztoxarc \ztoyarc,dashed];

%draw approximate shading
\shade[ball color=blue!10!white,opacity=0.5] (0,0,1) -- (0,1,0) -- (1,0,0);

\end{tikzpicture}

Is there any way to combine the last and second to last line, and use the paths I saved in
\xtoyarc \ztoxarc \ztoyarc

along with the \shade command to shade the area between the arcs?

Or, failing that, some other straightforward way to do this, which doesn't involve (my backup plan of) doing a bunch of math to figure out a new path parametrization that neatly replaces the coordinates in my current approximation:
\shade[ball color=blue!10!white,opacity=0.5] (0,0,1) -- (0,1,0) -- (1,0,0);

Comment: http://tex.stackexchange.com/a/158746/15036
Answer: I don't know how to concatenate separately defined paths, but you can set rotated coordinates for only part of a path:
\documentclass[tikz, border=5pt]{standalone}
\begin{document}
\begin{tikzpicture}
  \draw[->] (0,0,0) -- (2,0,0) node[right] {$x$};
  \draw[->] (0,0,0) -- (0,2,0) node[above] {$y$};
  \draw[->] (0,0,0) -- (0,0,2) node[below left] {$z$};

  \shade[ball color=blue!10!white,opacity=0.5] (1.5,0) arc (0:90:1.5) {[x={(0,0,1)}] arc (90:0:1.5)} {[y={(0,0,1)}] arc (90:0:1.5)};
\end{tikzpicture}
\end{document}

If you want to keep most of what you've got, it looks like adding use path=\xtoyarc \ztoxarc \ztoyarc to your current \shade command shades the portion of the sphere outside the triangle (with the same ball parameters), so you could just shade it in two portions:
\shade[use path=\xtoyarc \ztoxarc \ztoyarc, ball color=blue!10!white,opacity=0.5] (1,0,0) -- (0,1,0) -- (0,0,1) -- cycle;
\shade[ball color=blue!10!white,opacity=0.5] (1,0,0) -- (0,1,0) -- (0,0,1) -- cycle;

Comment: For me, the dashed lines works with `\draw[dashed] (1.5,0) arc (0:90:1.5) {[x={(0,0,1)}] arc (90:0:1.5)} {[y={(0,0,1)}] arc (90:0:1.5)};` ...


How to find file system information in Chrome OS?

Question: I would like to know what the file system (FAT32, NTFS, exFAT) used by my SD card is, in chrome os.
Comment: You'll have to look up the specs (specifications) on the SD card, Make, Model sort of thing. Iv'e tried to change file systems on my SD cards, but none of the hacks or tricks or methods have every worked for me. There are commands via cmd.exe you can find, but none have them have ever worked on any of the cards that I've owned.
Answer: Using developer mode, "shell" in crosh (ctrl+alt+T), type mount after you have plugged in the sd-card, and look for /dev/mmcblk1p1 (mmcblk0 is internal emmc "disk"). Each line has "type" listed.
Tests show ChromeOS formats SD cards to FAT32 only, other partitions will show (if driver is present), but are not usable by ChromeOS User (but are usable from "crosh> shell" in developer mode)
If you meant the internal emmc, / (/dev/dm-0) is read only ext2 and /usr/local (/dev/mmcblk0p1) is ext4.


Trust in mutual TLS on chain of certificates in multi-intermediate-CA configuration

Question: Could you please help me to understand whether a client's certificate will be accepted by a server as valid during mutual TLS challenge based on diagram below? The client side knows nothing about server's Intermediate CA B, and vice versa a server side knows nothing about client's Intermediate CA A. Will validation going to happen on Level 1, if Level 2 missing information about Intermediate CAs?
Answer: When the client connects via SSL/TLS, the server will present its certificate chain, i.e. it will present its own certificate but can also offer the certificate for CA B.
If the server only presents its own certificate, then the client cannot validate the certificate and must close the connection or stop to ask the user.
If the server presents both certificates (and the client trusts the root CA, and certificates are valid for the usages and the server name) the client will accept the certificate as trusted.
In the case of PEM encoded certificates, the certificate chain is created by concatenating the certificates:
<code>cat CA_B.pem >>myserver.pem
</code>
With pkcs12, its slightly more involved.
Comment: Although I've only described the behaviour of the client to the server, if you are using client authentication, the same applies the other way around.
Comment: All three RFCs say the server, and client if authenticated, _must_ send full chain optionally excepting root/anchor, although many CAs nowadays support AIA so that a relier _can_ obtain intermediate certs directly and some do. Draft 1.3 proposes to relax the formerly stated (but not always implemented) requirement for strict order, but still requires the content be sufficient (except for revocation info in the absence of OCSP 'stapling').
Comment: @symcbean what's the approach if there will be two root CA instead of one? for example Root CA 1 issued Client certificate, and Root CA 2 issued Server certificate
Comment: @symcbean full chain trust from both sides?
Comment: Exactly the same - just swap client and server in the description above.


Suspended from chat?

Question: How did I suspended from chatting? Can I have it removed? I have never really used chat and have done nothing to loose the privilege?
Answer: Chat is not run through the specific site which it is tied to, but rather through the main Stack Exchange chat. According to what I can see, you were suspended from chat on 15 February of this year for 358 days (seems arbitrary, but that's what it says). Your suspension will last until 7 February 2018. I don't know the reason for your suspension, what site you were suspended from in the first place, or who suspended you, but I'd presume you might have an inkling of the who/what/when/where/why of it all. In the meantime, there's nothing any of the mods of Mech can do for you but to allow the suspension to run its course. I apologize for that, but really there's nothing we can do. For your edification, this was not the first suspension listed for chat, but I'll not go into detail and air dirty laundry.
Comment: To many low quality contributions
Comment: @Muze - Yah, sorry about that. Nothing really to do with Mech, I realize, but someone felt there was an issue. We as mods are not really supposed to second guess what other mods do or why they do it. Can you tell me which site?
Comment: It was physics.
Comment: Tired of getting suspended for years at a time by them.
Comment: It would be nice for them to say to me if you make one more mistake we'll mess you up across the entire SE. I would have.been more careful.

Suspended from chat?


sharing of any revenue

Question: My colleagues and I created a document together. I want to use the document in a book and plan to make a profit. What rights do the co-authors have to my profit and is there a way to protect my profit?
Answer: Under US copyright law (17 USC 201, "The authors of a joint work are coowners of copyright in the work". Barring an explicit agreement to the contrary, each author of a joint work shares an undivided interest in the entire joint work.
Rights to profit derive from a contractual agreement with a publisher. Therefore, you have to look into the specifics of the agreement with the publisher – such agreements can be quite variable. The question that you would have to ask is whether the particular agreement that you sign is actually "true", for example, do you represent that you are the sole owner of copyright (you are not)? You can negotiate away your property rights, but you cannot negotiate away your co-authors' rights. There will almost certainly be an indemnification clause in the agreement saying that if your actions lead to the publisher getting sued then you will legally defend them (pay for their lawyer, pay whatever judgment is rendered against them...). You can negotiate a license with a publisher that send all the royalties to you as long as you are up-front about the fact that you are a co-author and therefore they do not have an exclusive license (often a deal-breaker with publishers).
Answer: In short: if you created your document together, all of you are authors and publishing the document needs permission from all authors. Therefore, unless you have a previous agreement, your colleagues can ask you whatever they want for their permission, and it's up to you to decide if giving them what they ask for is better than writing a completely different document yourself alone.
Details may vary according to jurisdiction and specifics of your situation, but the general idea is going to be the same everywhere.
Just a caveat since you mentioned your colleagues: If you created that document as a part of your work, please beware that its copyright may belong to your employer and you will need your employer's permission to publish it (possibly in addition to the permission from your colleagues).
And just a likely out-of-scope cautionary note: There are posts in https://academia.stackexchange.com/ explaining that publishing a book is unlikely to yield substantial profits for the author. Hopefully, YMMV.
Comment: @DaleM do you have an example of such a jurisdiction / fact pattern? (genuine question.) I know the barrier to be considered an "author" with respect to copyright law varies, but I thought that "you need consent from all authors for anything not covered by copyright exceptions" is standard across at least all Berne countries.
Comment: @DaleM My comment refers to your comment, not to Pere's answer. Your comment made a claim that is surprising (to me at least) and cites no reference. Yes, I could turn it into a question in its own right, and if an answer comes back that contradicts your comment, leave another comment saying "DaleM is wrong, here's a link"; but that seems less efficient and less polite than asking you directly.
Comment: Whether all autors need to give permission for use varies by jurisdiction: in some they do, in others they don't.
Comment: @KFK If you have a question, ask a question. Don't hide it in a comment on an answer.
Comment: @KFK the site is not about efficiency, it's a Q&A site for questions about  the law. Do you have a question about the law?

sharing of any revenue


Is "alone" an adverb in "I was sitting alone"?

Question: Is the sentence "I was sitting alone." correct? And if so, is "alone" an adverb? Are there other examples of adjectives being used as adverbs without modification?
Comment: (1) Yes. (2) I wouldn't class it as such. (3) So this question is incorrect. Predicative adjectives are adjectives. There _are_ some words that exhibit adjective - adverb intercategorial polysemy (eg _leisurely_ adj and _leisurely_ adv; _well_ adj and _well_ adv; _wide_ adj and _wide_ adv; _fast_ adj and _fast_ adv).
Comment: @EdwinAshworth thanks for the structured, crystal clear explanation!
Answer: I agree with Barrie's answer and would say there are a lot of adjectives that can be used as adverbs. English dictionaries usually indicate uses of adjectives as adverbs simply as "adverbs".
I don't like this change of word classes. And I think this does not help to understand language. I prefer the formulation "adjective in adverb position".
In the sentence given in post 1 "I was sitting alone" alone is not an adverb, even when dictionaries say so. The basic concept is: I was alone - and that is an adjective. Even if you replace "was" by "was sitting" or "was standing" that does not change anything. "was sitting" is can be considered as a variant of the verb to be (the basic copula verb, that has a lot of variants).
Another example: The birds were flying high/low. Dictionaries list this use under high/low adverb. But that is really confusion of things. The bird fly at a high/low level and not in
a high/low manner. "high/low" maintain their adjective character and the speaker has a clear concept of an adjective use in mind: at a high or low level.
Such adjective uses must be studied carefully and sometimes it is not so easy to decide how things are.
In John Wyndham's excellent science fiction story The Meteor he describes the landing of a small extraterrestian space craft on Earth. He said: The thing burried deep into the earth.
Here you might have difficulty to decide what would be right: deep or deeply.
But Wyndham decided to take the adjective deep, obviously thinking the flying object burried to a deep point in the earth.
Comment: I disagree that *alone* is an adjective in the example given. It does not characterize *I*, it characterizes *sitting*. *In the train full of people, I was sitting alone on the bench.*
Comment: +1 for raising the point. It's rather like Huddleston and Pullum's attempt to extend the membership of the preposition class beyond the words that traditional grammar calls prepositions.
Comment: +1 for excellent answer! (btw Wyndham's could also be read as "The thing that was buried deep into the earth." but that is besides the point you successfully make with the example)
Comment: You are not alone. But as to language a lot of things can be regarded differently. But your argument does not hold water. Not every adjective after a verb characterizes the verb. I say it characterizes the subject. The subject was alone, not the manner of sitting.
Comment: @bib see my comment on Leon Conrad's answer below.
Comment: Not liking 'change in word classes' is hardly relevant. Zero conversion (say noun to verb) is an accepted word formation process in English. There are quite a few fully accepted adverbs in English that do not end in -ly, including some that have counterparts ending in -ly. We flew direct / directly to Rome (note the different meanings). A more important debate is over what the modifier is modifying. I'd agree that _alone_ in  'I was sitting alone' is best not considered to be modifying the verb, but would not like to decide on what _wide_ in 'Mossi shot wide' is modifying: it could be seen ...
Comment: as modifying the verb, telling us more about the nature of the shooting, but equally it could be seen as a resultative ( thus being an adjectival usage), describing the resulting position of the ball.
Answer: It is, and, yes, there are other words that can be used both as an adjective and an adverb. A little time spent with a dictionary will show you some of them.
Comment: You could have looked up *alone*.
Comment: not sure how a dictionary would help but I appreciate the confirmation of my hypothesis, +1
Comment: A dictionary would help because it would have adjective and adverb senses listed under the same lemma. Indeed, *alone* would in most dictionaries.
Comment: @JonHanna Wouldn't I need to scan a lot of words before encountering one that is both an adjective and an adverb? The point is that if I already knew such a word a dictionary could help confirm it, but it wouldn't help find other examples in any easy way.
Comment: @JonHanna that's correct, but Barrie's answer suggests "A little time spent with a dictionary will show you some of them." (emphasis on "some of them"). He didn't say that a dictionary would help confirm alone, which it understandably would. My quibble was with his suggestion that I could find examples in the dictionary.
Answer: Take the sentence into the simple past and it becomes 'I sat alone.'
Clearly, here, 'alone' modifies 'sat'. As such, it is an adverb.
If you were to say 'I, alone.' you could consider it an adjective. Others might argue differently. If the sense, however, was 'I was alone', then 'alone' would would arguably be a subjective complement.
The easiest way to think of adverbs is in relation to the 9 attributes which are part of Aristotle's 10 categories of being (everything except substance), in which terms they can simply be classified as 'attributes of attributes'.
Comment: He might say as well I was alone (adjective). The problem is not the question is alone used as an adjective or adverb. Actually it does not matter whether you see it as adj. or adv. The meaning is clear and it has no -ly. So I prefer to say adj. in adv. position, but everyone can see it as he/she prefers.
Comment: @rogermue despite your excellent answer I am persuaded to choose this one as the correct one. The example that swayed me was my recollection of the famous Apple quotation: "Think different", from which I would derive "I think different", in which "different" certainly applies to "think". I personally prefer to write "I think differently" so perhaps "I think different" is wrong. But then I came up with another example: in "I see far", "far" cannot apply to "I" and there is no clear adverb form such "far-ly" [sic] that can be applied. Similarly, "He plays rough". What say?
Answer:
I was sitting alone.

"Alone" is an adverb as it modifies the verb; it identifies the way I was sitting.
Answer: The word "alone" didn't describe the "I", thus it is not an adjective. It tells a condition around the I, not the I itself. "Alone" didn't describe how I sat. It seems like a different category, because sit is an action, and alone is a condition. Thus it is also not an adverb. This sentence is combined with two sentences: "I sat." and "There is no people around me." It is a combined sentence being simplified.
Comment: While I would agree that there are problems accepting some 'non-semantically-predicative adjectives' as being true adjectives (a former President is hardly 'former', and a 'mere youth' is 'no more than a member of that undervalued, underpaid, powerless and callow (Oh, yeah!) group  known as youths'), it is a lot more reasonable to treat some other 'placing-in-a-context'-modifiers (solitary, alone, rare, common, adjacent ...) as adjectives. They do give more information about the referent.


Does windows get deleted?

Question: Does windows 7 stay on the computer or get deleted? if it does delete windows i wont download Ubuntu. So, does windows get deleted? and if not how to i change back and forth between the two?
Answer: You have the option to Dual Boot between Windows 7 and Ubuntu. Typically this works well and you will be presented with an option to boot Ubuntu or Windows every time you boot. The important thing to watch for if you want to keep Windows is when installing, choosing the option to install Ubuntu side-by-side. Here is more information on Dual Booting Windows and Ubuntu: https://help.ubuntu.com/community/WindowsDualBoot
Answer:
Does windows 7 stay on the computer or get deleted?

You decide when installing Ubuntu. You can keep Windows 7 and boot into both; or you can remove Windows 7 completely.

and if not how to i change back and forth between the two?

If your computer came with Windows 7 then probably by using Grub 2. It shows a menu every time you start the computer that lets you choose which OS to boot. By default it will auto-boot Ubuntu if you don't change the option within a few seconds. This is automatically set up if you install Ubuntu on a drive that already has Windows on it.

Does windows get deleted?


Upper bound for an integral of positive functions

Question: Let $\gamma \colon \mathbb{R}_{\geq 0} \to \mathbb{R}_{\geq 0}$ be a function that is continuous and increasing with $\gamma (0) = 0$. Also, let $w \colon \mathbb{R}_{\geq 0} \to \mathbb{R}_{\geq 0}$ be an integrable function, that is to say, $\int_{0}^{\infty} w(\tau) \mathrm{d} \tau \leq r$ for some $r > 0$. The question is "does there exist some continuous function $\eta \colon \mathbb{R}_{\geq 0} \to \mathbb{R}_{\geq 0}$ with $\eta(0)=0$ such that the following holds
$$\int_{0}^{\infty} \gamma(w(\tau)) \mathrm{d} \tau \leq \eta(r)$$
for any $\gamma(.),w(.)$ and $r$ defined above?"
Answer: Certainly not. Let $\gamma(t)=\sqrt{t}$, $w(t)=\frac1{t^2+1}$. Then $\gamma$ is continuous and increasing with $\gamma(0)=0$. We also have
$$
\int_0^\infty w(\tau)\,d\tau=\frac\pi2.
$$
But
$$
\int_0^\infty\gamma(w(\tau))\,d\tau=\int_0^\infty\frac1{\sqrt{\tau^2+1}}\,d\tau=\infty.
$$
Comment: Thanks martin for your prompt response.
Comment: You are welcome. A way that often helps me think about this kind of questions is to phrase them in terms of series instead of integrals; in most cases the answer will be the same, and they are easier for my intuition.