Magnetic Field due to many bar magnets

Question: I'm a maths student working on a project. I want to know, how I can find the aggregate 3D equations for a magnetic field induced by a series of bar magnets of various sizes placed at various positions on a plane. Obviously this is a very difficult problem, but can anyone suggest a couple sources where I can begin to learn how to calculate this field?
Comment: No not silly. The field lines of a bar magnet are three dimensional. I want to find the equation for the magentic field at an arbitrary point above the magnets
Comment: You have probably read this, sorry,  but even for two magnets in a plane, it looks like you have a lot of work to do, best of luck with it https://en.wikipedia.org/wiki/Force_between_magnets
Comment: @CountTo10 I have, but thanks anayway. What I (or rather my boss) has in mind is far more irregular than this, so I'm not very sanguine, to say the least.
Comment: a permanent magnet is (grossly simplifying) a conglomerate of a lot of small dipoles. So in the end you "simply" have to integrate over the contributions from all these dipoles.
Comment: If you really want macroscopic bar magnets (non vanishing size) I assume that will be very hard. If you just want magnetic dipole moments (fields) I guess that should be possible but not too easy either. You could take the field of a magnetic dipole and superpose different ones. With Computer algebra this should be doable.
Comment: @Bort this is sort of the answer I was expecting. any literature you can recommend? I took and E and M course years ago but to say I'm rusty is an overstatement
Comment: I think what you are looking for is [the Ising Model](http://farside.ph.utexas.edu/teaching/329/lectures/node110.html) of ferromagnetism. That model assumes identical magnets. It is a start.
Answer: I do not know what kind of magnets you want to model. If idealized dipole moments work for you it is not difficult: Just super pose their fields: $$\vec{B}(\vec{m},\vec{r})=\frac{\mu_0}{4\pi r^3}(3(\vec m \cdot\vec r)\frac {\vec r }{r}-\vec m)+\frac{2 \mu_0}{3}\vec m ~\delta^3(\vec r).$$
The superposed fields will get extremely messy but they are straight forward to construct. Here a plot of two different dipole moments in the x-y-plane:

The formula gives you the field in all 3 dimensions but it is difficult to visualize that nicely so I only added that one 2D plot of the field.
If you really want to simulate real bar magnets with non vanishing size you would need to do magnetic FEM http://www.femm.info/wiki/HomePage to do real simulations. This will get complicated especially if you want to go up to 3 dimensions. To write a code for that completely from scratch will be challenging.

Magnetic Field due to many bar magnets


What's the most reliable way to set focus to a deeply nested control in Windows Forms?

Question: Here's a little background on my app:

I have a main form that contains a vertical SplitContainer.
Inside the SplitContainer's left panel, I have a TreeView control.
Inside the SplitContainer's right panel, I have another SplitContainer (this one horizontal).  This container is fixed, with headings above the split and a Panel control below it.
I dynamically load my own user controls into the Panel control whenever the tree view changes.

So far so good.  Here's my problem, though.
Most of the user controls that are dynamically loaded have a DataGridView that should receive focus when the control is initialized.  Sometimes this grid is on the UserControl surface directly;  sometimes it's in a GroupBox; etc.
What is the best way to programmatically set focus on the DataGridView control, given that it may placed within a variable number of control containers?   I've tried the obvious - .Select, .Focus, .ActiveControl, etc.  None of these seem to work - the TreeView item that I selected is still highlighted, and even though a record is selected in the DataGridView, it doesn't have focus.
Any ideas would be appreciated.
EDIT:  Code below
Here's the code where I add the user control within the main form:
  Private Sub LoadRightPanel(ByVal section As String, ByVal moduleName As String)
    Heading.Text = String.Empty
    SuspendLayout()
    RightPanel.Controls.Clear()
    Select Case section.Trim.ToLower
      Case "effective date types"
        Heading.Text = "Effective Date Types"
        RightPanel.Controls.Add(New EffectiveDateTypeAddEditControl(moduleName))
.
.
.
    End Select
    With RightPanel.Controls(0)
      .Dock = DockStyle.Fill
    End With
    ResumeLayout()
  End Sub

And this is where I attempt to set focus within the user control constructor:
  Public Sub New(ByVal programModule As String)
    InitializeComponent()
    currentModule = programModule

    UpdateGrid()
    UpdateButtonSettings()
    ValueGrid.Select()
  End Sub

Comment: Could you show some of the code you are using to set focus on the Datagrid
Comment: Does the treeview actually have the focus or the item is just highlighed? the treeview has a property to not show as highlighted when it loses focus. See where the actual focus is. Also at what point do you set the Focus to the datagridview?
Comment: Pinakin, the treeview has the focus.  If I use the up/down arrow keys, the treeview selection changes.
Answer: If you are trying to set focus to a a DataGridView make sure that you are specifically setting focus to the View and not the entire DataGrid itself. As long as the controls are visible there shouldn't be a problem in setting focus to them.
Comment: I'm not sure I understand.  As far as I know, DataGridView doesn't have an associated View property.  Are you saying that I can somehow set focus to only part of the DataGridView, like the selected row?


The derivation of the Lorentz transformation: addition of distances

Question: In the derivation of the Lorentz transformation, one has a reference frame, $S$, at rest and another, $S'$, moving away at constant speed $v$. At time $t$ there is an event at a point $x$ in $S$. The same event has coordinate $x'$ in $S'$. At this time, the origin of $S'$ is at the point $x = vt$ in $S$ so by adding distances one gets $vt + x' = x$ which gives $x' = x - vt$. This is not in agreement with the Lorentz transformation but seems like a very simple addition of distances. Can somebody please explain what is wrong?
Comment: The Lorentz transformation must preserve the line element $ds^2 = -c^2dt^2 + dx^2$. The transformation you suggest does not do that.
Comment: You need to slow down and take things step by step because small, tacit assumptions can quickly lead you astray when working out relativity problems. It is true that S' frame's origin of x'=0 does correspond to x=vt, which is the same result as for a Galilean transform and constituent with one's "intuition". However, that doesn't mean that x'=x-vt for non-zero values of x'. For example, it follows from this last equation that x'=x at t=0, but that's not true. Review your understanding of relativity and Lorentz transforms to see why that is.
Comment: I'm not sure what is your question. Please help me understand this.
Comment: Can you give a link to the derivation that you have seen?
Comment: The transformation you are talking about is not a Lorentz transformation. That is the transformation in the name of my SE-identity ;), i.e. the Galilean transform.
Comment: [1] Modern Physics; Second edition; Randy Harris; Chapter 2; Special Relativity; 2008
Answer: Indeed, the intuitive formula for the addition of distances is not valid within special relativity theory.
If it were, the light from the tail lights of a receding car would travel towards us at a speed lower than $c$, and the light from its headlights would travel away from us faster than $c$. Special relativity theory was specifically developed to explain the negative empirical finding that there are no detectable differences in the speed of light regardless of the relative motion of the light source and the observer.
As noted by another user above, your derivation assumes that we can transform coordinates in the "stationary" coordinate system to coordinates in the "moving" system by means of the Galilean transformation
\begin{equation}
\left( \array{x^\prime \\ t^\prime} \right) \; = \;
\left( \array{1 & -v \\ 0 & 1} \right)
\left( \array{x \\ t} \right).
\end{equation}
According to special relativity theory, the location of an event in the "moving" coordinate system is in fact related to the coordinates in the "stationary" system by the Lorentz transformation
\begin{equation}
\left( \array{x^\prime \\ t^\prime} \right) \; = \;
\gamma
\left( \array{1 & -v \\ -v/c^2 & 1} \right)
\left( \array{x \\ t} \right).
\end{equation}
Here, $\gamma = 1/\sqrt{1 - v^2/c^2}$ is the Lorentz factor, which is also equal to $(\det{T})^{-1/2}$, with $T$ being the matrix above.


Why sweat but not brown?

Question: Many recipes require that you sweat vegetables (celery, onions, etc). Why not saute them and brown them a little instead? Would not that develop the flavors even more? Why would you not want that?
Comment: Related: [How do I sweat onions?](http://cooking.stackexchange.com/q/3613/41)
Answer: Onions
The more you cook an onion, the sweeter it is going to get; heat breaks down the volatiles and complex starches and converts them to sugars.
When an onion is completely brown then it is basically caramelized.  The point of sweating onions is to draw out some of the pungency, but not all.  If you cook them 'til they're brown (caramelized) then they will be very sweet, and not really retain any of that sulfurous "onion-y" flavour at all.
So it's not really a question of how much you're developing the flavours, it's a question of which flavours you're developing.  The more sweetness you develop, the more of the original onion flavour you lose.
In my experience, caramelized onions are rarely used as an "ingredient" - they're more of a garnish or side dish, since they wouldn't really impart any significant flavour to the main dish.
Celery and other aromatics
These don't undergo the same drastic flavour changes that onions do, but the principle is the same:  You sweat them to draw out moisture and aromas without starting a Maillard or caramelization reaction.
The key is that sweating is a preparation step.  Yes, frying/sautéing these for longer would develop more flavour (or at least more of a certain kind of flavour), but you don't want to do that too early, since they're going to sit in the pan for a while longer; sweating means softening them up slightly without eliminating all of the aromas or the natural crunchy texture.
You generally don't brown vegetables during the preparation of a recipe; you only do that if you plan to eat them by themselves without any further cooking.  If you brown them, then continue to cook, you will turn them into mush and possibly burn them, and there's no way to fix it after that happens.
Comment: @Sly: I've updated my answer for other vegetables (it's not really much different for those).  As for the `[cooking-techniques]` tag, we're trying to get rid of it; it's really not very useful when you consider that over half the questions here are, generally speaking, about cooking techniques.
Comment: thanks for that good answer. Note that my question is not specific to onions. But I suppose the your answer also applys to celery or other veggies that we typically sweat. I edited the question to be less "onion specific".
Comment: I've also updated the question to compare sweating to sauteing... That why I had tagged the question with the "cooking technique" tag in the first place.
Comment: When you wrote "You generally don't brown vegetables during the preparation of a recipe" I was in total agreement. Coincidentally, I've just finished reading "50 Great Curries of India" http://www.amazon.com/GREAT-CURRIES-INDIA-PANJABI-CAMELLIA/dp/1856266966/ref=sr_1_3?ie=UTF8&s=books&qid=1296688754&sr=8-3 (a great book by the way). It appears that many Indian Curry recipes use browned onions as an ingredient for flavor and as a thickening agent. -- I'm not arguing on your very good answer; just providing additional information on the matter.
Comment: Heating does not convert starches into sugar. It takes enzymes such as amylase to do this. The reason cooked vegetables taste sweeter is that cell breakdown makes the sugars more immediately accessible to the tastebuds, and caramelisation oxidises sugars into caramelin and other molecules that give a richer and sweeter taste.
Answer: It's an interesting question.  Without a specific recipe, it's hard to say if either technique is better than the other.  You can always caramelize half of the onions and use them with half of the recipe to compare the tastes and see what you prefer.
I say you need to use your judgement to decide if you want that different flavor that caramelizing offers.  For instance, are the onions going to be a main or strong secondary flavor or are they just there to create a more complete taste?
Examples:

Liver and Onions - The onions are traditionally very caramelized and cooked as the strong, sweet flavor goes nicely with the soft liver.
Peppers and onions for hot dogs - The onions (and peppers) are sweat to remove the initial strong flavor.  The less cooked flavor pairs better with the hot dog.
Stocks/Soups - They just sweat the vegetables to create a subtle vegetable flavor.  They're not trying to create a sweet broth.

Also, what about time?  You'll probably save yourself a third to half the time to just sweat onions instead of browning them.  If all you're aiming to do is remove some of the strong flavors, then just sweat them.  Otherwise, try both and see what you like more.

Why sweat but not brown?


Doubt related to venturimeter and manometric fluid

Question: I am unable to understand why the manometric fluid do not flush off due to high pressure fluid flowing through pipe? Because as discharge increases pressure drop will increase so manometer should show more reading, but there must be a maximum limit for that.
Also I am not able to understand that we connect one limb of manometer at inlet of converging section and other at throat but why we don't connect one limb at throat and other at end of diverging section, is there any problem if we connect it like that?
Answer: So, for all the positions you mention, then the pressure difference should be considered which will define the length of the manometer limbs or the length of the slope depending which design you use.


IPod touch location services

Question: A box popped up that says "Turn on location services to allow weather to determine yor location".  There are two tabs underneath that say "settings" and "cancel".  Neither of the tabs work the box won't go away.  I can't get it to shut off.  It's just stuck.
Answer: Do a hard restart:
Hold the home button (the round one at the bottom) and the sleep wake button (the one on the top or the right side of your device) for 15 seconds or till the apple logo shows up.
If it does not appear, try to check if the device is still on, then try again, if it's off hold the sleep wake button.

IPod touch location services


Does Setup Audit Log capture all changes to a Community setup?

Question: I'm trying to track down what I believe was a mistake in a community configuration; specifically, to the choice of Login Page (Setup->Customize->Community->All Communities->Manage->Administration->Login & Registration).  I cannot find any mention in the Setup Audit Log.  I've gone back as far as a known release date on which the Login Page setting was changed, but I can't find that change in the Audit Log either.  These changes occur inside the special community setup screen, are they supposed to captured?  Are they logged elsewhere?
Answer: Came across this post while doing some research and finding out there is currently no tracking for changes made to Communities Settings > Sharing set
Here's an article which describes what changes are tracked for communities :
https://help.salesforce.com/articleView?id=000322384&language=en_US&type=1&mode=1


How do I reset the "Consumer Secret" for my Connected App?

Question: My Connected App's Consumer Secret has been compromised.  How do I get a new Consumer Secret generated for my app without changing the Consumer Key and/or creating a whole new Connected App?
Answer: You need to create a new app. Because consumer secret is bind with the app you can't change it.
Although you can try one option in the existing app remove outh scope and save it and again edit and create new oAuth so that it will generate new key and secret.
Reference to create Oauth


For the Twin Paradox what happens if the space twin stays still and the earth twin flies to meet the space twin?

Question: For the Twin Paradox what happens if after the space twins flies to his destination he remains there and sends a light signal to the earth twin. When the earth twin receives the signal he flies to meet up with the space twin. When they meet up for which twin would more time have passed? The space twin or the earth twin?
Comment: Draw a diagram!
Comment: Where did you get stuck?
Comment: Which twin would have more time pass when they meet up?
Answer: If the travelling twin "stops" at a destination at rest with respect to Earth, and the Earth twin travels on an identical space ship (same speed) to meet him, then they will both be the same age when they meet up.
If the travelling twin keeps going at a constant speed and direction forever (does not "stop" in the Earth sense) and the Earth twin hops on a faster space ship and catches up to him, then the Earth twin will be younger when they meet. This is the case that's the real mirror of the usual twin paradox: the "travelling" twin never changes velocity, so in his frame of reference he is at rest the whole time, and the Earth twin went away from him and then came back.
Comment: Excellent answer. I was going to post the second scenario as a question and am glad I already found the answer here. And brilliant to mention that this is the real mirror of the usual twin paradox. I'm amazed I haven't found anyone mention this in all the myriad other discussions of this paradox ...


Extracting nested zip files

Question: I have numerous zip archives, each of which contains a number of zip archives. What is the best way to recursively extract all files contained within this zip archive and its child zip archives, that aren't zip archives themselves?
Comment: Yeah, I didn't do it :P. Unfortunately I'm subjected to this bizarre way of distributing files.
Comment: what do you mean by extracting things that are not zip files? you wan to copy them to another place?
Comment: I don't find your requirements clear. I find [Shawn J. Goff](http://unix.stackexchange.com/questions/4367/extracting-nested-zip-files/4371#4371) and [my](http://unix.stackexchange.com/questions/4367/extracting-nested-zip-files/4372#4372) interpretation about equally likely. Could you clarify?
Comment: @Gilles: Sorry, yeah it was a bit unclear. I changed it a bit, hopefully its more clear now.
Comment: I was going to post an answer, but I believe it should go as a comment: Nested Archives **increase** the space you need! You probably mean the Zip file format, not just gzip. every zip file is already compressed, compressing them again, just creates more overhead, effectively increasing needed space.
Answer: This will extract all the zip files into the current directory, excluding any zipfiles contained within them.
find . -type f -name '*.zip' -exec unzip -- '{}' -x '*.zip' \;

Although this extracts the contents to the current directory, not all files will end up strictly in this directory since the contents may include subdirectories.
If you actually wanted all the files strictly in the current directory, you can run
find . -type f -mindepth 2 -exec mv -- '{}' . \;

Note: this will clobber files if there are two with the same name in different directories.
If you want to recursively extract all the zip files and the zips contained within, the following extracts all the zip files in the current directory and all the zips contained within them to the current directory.
while [ "`find . -type f -name '*.zip' | wc -l`" -gt 0 ]
do
    find . -type f -name "*.zip" -exec unzip -- '{}' \; -exec rm -- '{}' \;
done

Comment: you might like this variant which I use to recursively extract contents from nested ear, war, jar files : https://gist.github.com/tyrcho/479c18795d997c201e53

Major difference is it creates a nested folder for each archive.

    `while [ "`find . -type f -name '*.?ar' | wc -l`" -gt 0 ]; do find -type f -name "*.?ar" -exec mkdir -p '{}.dir' \; -exec unzip -d '{}.dir'  -- '../{}' \;  -exec rm -- '{}' \;; done`
Comment: this while loop helped me a lot in an ethical hacking competition where they had prepared a nested zip file going 31337 levels deep, thanks!
Answer: As far as I understand, you have zip archives that themselves contain zip archives, and you would like to unzip nested zips whenever one is extracted.
Here's a bash 4 script that unzips all zips in the current directory and its subdirectories recursively, removes each zip file after it has been unzipped, and keeps going as long as there are zip files. A zip file in a subdirectory is extracted relative to that subdirectory. Warning: untested, make a backup of the original files before trying it out or replace rm by moving the zip file outside the directory tree.
shopt -s globstar nullglob
while set -- **/*.zip; [ $# -ge 1 ] do
  for z; do
    ( cd -- "$(dirname "$z")" &&
      z=${z##*/} &&
      unzip -- "$z" &&
      rm -- "$z"
    )
  done
done

The script will also work in zsh if you replace the shopt line with setopt nullglob.
Here's a portable equivalent. The termination condition is a little complicated because find does not spontaneously return a status to indicate whether it has found any files. Warning: as above.
while [ -n "$(find . -type f -name '*.zip' -exec sh -c '
    cd "${z%/*}" &&
    z=${z##*/} &&
    unzip -- "$z" 1>&2 &&
    rm -- "$z" &&
    echo 1
')" ]; do :; done

Answer: This perl script will extract each .zip file into its own subdirectory.  Run the script more than once to handle nested zip files.  It does not delete .zip files after extraction but you could make that change by adding an unlink() call.
#!/usr/bin/perl -w

# This script unzips all .zip files it finds in the current directory
# and all subdirectories.  Contents are extracted into a subdirectory
# named after the zip file (eg. a.zip is extracted into a/).
# Run the script multiple times until all nested zip files are
# extracted.  This is public domain software.

use strict;
use Cwd;

sub process_zip {
    my $file = shift || die;
    (my $dir = $file) =~ s,/[^/]+$,,;
    (my $bare_file = $file);
    $bare_file =~ s,.*/,,;
    my $file_nopath = $bare_file;
    $bare_file =~ s,\.zip$,,;
    my $old_dir = getcwd();
    chdir($dir) or die "Could not chdir from '$old_dir' to '$dir': $!";
    if (-d $bare_file) {
        chdir($old_dir);
        # assume zip already extracted
        return;
    }
    mkdir($bare_file);
    chdir($bare_file);
    system("unzip '../$file_nopath'");
    chdir($old_dir);
}

my $cmd = "find . -name '*.zip'";
open(my $fh, "$cmd |") or die "Error running '$cmd': $!";
while(<$fh>) {
    chomp;
    process_zip($_);
}

Answer: unzip doesn't do this, because the UNIX way is to do one thing and do that well, not handle all crazy special cases in every tool. Thus, you need to use the shell (which does the job of "tieing things together" well). This makes it a programming question, and since ALL possible programming questions have been answered on StackOverflow, here: How do you recursively unzip archives in a directory and its subdirectories from the Unix command-line?
Comment: I would definitely not call "using the shell" a programming question, and "shell scripting" is listed in the FAQ as on-topic
Comment: I was not meaning to imply that it was off-topic here at all, I just wanted to justify why it's on-topic at StackOverflow.
Answer: The easiest way is to use atool: http://www.nongnu.org/atool/
It is a very good script that use zip, unzip, tar, rar etc. programs to extract any archive.
Use atool -x package_name.zip to unzip them all or if you want to use it in directory with many zip files use simple for loop:
for f in *; do atool -x $f; fi (you will have to cd into desired directory with zip files before you use this).
Comment: `atool`'s behaviour here doesn't differ significantly from unzip I'd say, it doesn't recursively extract ZIP files either.
Comment: @Thomas Themel: Are you sure that it doesn't recursively extract ZIP files? It can extract from deb files tar.gz recurisvely but i have no time atm to test it with nested zip archives :\
Answer: You'll want to be careful automatically unzipping zip files inside of zip files:
http://research.swtch.com/2010/03/zip-files-all-way-down.html
It's possible to concoct a zip file that produces a zip file as output, which produces a zip file as output, etc etc etc.  That is, you can make a zip file that's a fixed oint of "unzip" the program.
Also, I seem to recall people making zip files that would "explode", that is a very small zip file would unzip to multi-gigabytes of output.  This is a facet of the method of compression.
Answer: Maybe this will help (worked for me):
function unzipAll(){

# find and count archives
archLst=`find . -type f -name "*.*ar"`
archLstSize=`echo $archLst| awk 'END{print NF}'`

# while archives exists do extract loop
while [ "$archLstSize" -gt 0 ]; do

# extract and remove all archives (found on single iteration)
for x in $archLst; do
mv "${x}" "${x}_";
unzip "${x}_" -d "${x}" && rm "${x}_";
done; #EO for

# find and count archives
archLst=`find . -type f -name "*.*ar"`
archLstSize=`echo $archLst| awk 'END{print NF}'`

done #EO while

}

Answer: I needed a solution like Giles' from 2010, except I needed to preserve the folder structure, not unzip everything into the top level directory.  Here's my take on his with three lines added/changed:
#!/bin/bash
shopt -s globstar nullglob
while set -- **/*.zip; [ $# -ge 1 ]
do
    for z
    do
        ( cd -- "$(dirname "$z")" &&
            z=${z##*/} &&
            cp -- "$z" "$z".bak &&
            mkdir -- "$z"dir &&
            unzip -- "$z" -d "$z"dir &&
            rm -- "$z"
        )
    done
done

Answer: To have a recursive extraction with proper tree structure while unzipping we can use
while [ "`find . -type f -name '*.zip' | wc -l`" -gt 0 ]
do
   find . -name '*.zip' -exec sh -c 'unzip -o -d "${0%.*}" "$0"' '{}' ';' -exec rm -- '{}' \;
done

find . -name '*.zip': Finds the files with .zip extension in current directory
unzip -o: unzips file and overrides if there is a file with same name
-d "${0%.*}": creates directory with the same name of the zip file
Answer: Checkout this java based utility nzip for nested zip files.
Extracting and compressing nested zips can be done easily using following commands
java -jar nzip.jar -c list -s readme.zip
java -jar nzip.jar -c extract -s "C:\project\readme.zip" -t readme
java -jar nzip.jar -c compress -s readme -t "C:\project\readme.zip"
PS. I am the author and will be happy to fix any bugs quickly.
Answer: To avoid having to extract the intermediary zip files on disk, you could combine bsdtar (which can extract zip archives and convert to tar format on the fly) and GNU tar (which can pipe the contents of archive members to other commands instead of extracting them on disk) like so:
bsdtar cf - @file.zip | # convert to tar format on the fly for GNU tar
  tar -xf - --to-command='
    case $TAR_FILENAME in
      (*.zip) bsdtar xvvf - # pipe zip archive members to bsdtar for extraction
    esac'

To do it with more that one zip file, with GNU utilities:
find . -name '*.zip' -printf '@%p\0' |
  CMD='
    case $TAR_FILENAME in
      (*.zip) bsdtar xvvf - # pipe zip archive members to bsdtar for extraction
    esac
  ' xargs -r0 sh -c '
    bsdtar cf - "$@" |
      tar -xf - --to-command="$CMD"' sh

Extracting nested zip files


Attributing Gravitational waves to a source

Question: At a given time, there would be n number of binary neutron stars or Black Holes or even Super Novae, all of which would be leaving a gravitational wave imprint ..So how do LIGO scientists know which wave is attributable to which formation ?
Comment: Black holes are smaller so the final orbits have a shorter period. Super Novae would not have the inspiral signature.
Comment: [Sources and Types of Gravitational Waves](https://www.ligo.caltech.edu/page/gw-sources)
Comment: Are you interested in differentiating between different types of sources (e.g. neutron star vs. black hole), or between multiple sources of the same type (e.g. figuring out which specific black hole binary was a source)?
Answer: The LIGO case
This mostly comes down to the range of frequencies that LIGO is sensitive to.
As a compact binary system inspirals, the orbital frequency increases.  Based on the mass of the system and the current orbital frequency, you can calculate when the system will merge into a single object.  LIGO is sensitive to GWs with frequencies from about 30 Hz to 2000 Hz.
By the time a binary neutron star (BNS) system inspirals to 30 Hz it will merge in less than 1 minute.
Compare this to the Hulse-Taylor Binary which has an orbital period of about 7.75 hours and emits GW with a frequency of about $7\times 10^{-5}$ Hz.  It will merge in around 300 million years.
Most binary systems are nowhere close to merging, and emit GWs that LIGO has no hope of detecting.  Because BNS spend such a tiny fraction of their lifetime observable to LIGO it is unlikely that two will merge at the same time and lead to confusion.
Even if two binaries did merge simultaneously, the frequencies of the GWs depends on the masses of the systems.  The two mergers could be disentangled by isolating the different frequencies, in the same way our ears can tell the difference between a bass and violin playing together.
Other GW experiments
You are correct that there are lots of gravitational waves overlapping all the time, just not in LIGO's sensitivity range.
LISA is a planned space based GW detector that is sensitive to GW frequencies around 0.1 to 10 mHz (millihertz).  In our galaxy there are a ton of binary white dwarf systems that emit GWs in this range.  This confusion foreground of GWs acts like a noise source for LISA.  You can also learn about the average properties of galactic white dwarfs by studying this signal.
Pulsar timing arrays (PTA) try to detect nHz (nanohertz) frequency GWs by measuring signals from radio pulsars.  The primary source for PTAs is the stochastic background of GWs from merging supermassive black holes.  This is the sum of all the binary supermassive black hole GW signals from merging galaxies.
the math
The first order approximation for the time till merger of a compact binary system is
$$ t = \frac{5}{256} \frac{c^5}{G^3} \frac{r^4}{m_1 m_2 (m_1+m_2)}$$
From Kepler's third law we can determine the binary separation $r$ as a function of the orbital frequency $F$.  (The Newtonian form is an approximation to full GR.  It is closer to true the further apart the two bodies are.)
$$2\pi F = \sqrt{\frac{G(m_1 + m_2)}{r^3}}$$
The GW frequency $f$ is twice the orbital frequency.
$$ f = 2F $$
Putting it all together:
$$ t = \frac{5}{256} (\pi f)^{-8/3} \frac{c^5}{G^{5/3}} \frac{(m_1+m_2)^{1/3}}{m_1 m_2}$$
It looks a bit cleaner in terms of the chirp mass, $\mathcal{M}$.
$$ t = \frac{5}{256} (\pi f)^{-8/3} \left( \frac{G\mathcal{M}}{c^3} \right)^{-5/3}, \quad \mathcal{M} = \frac{(m_1 m_2)^{3/5}}{(m_1+m_2)^{1/5}} $$
For an equal mass BNS with $m_1 = m_2 = 1.5 M_\odot$, $\mathcal{M}\sim 1.3 M_\odot$, where $M_\odot$ is the mass of the sun (about $2 \times 10^{30}$ kg).  For $f=30$ Hz, $t \approx 47.6$ sec.
As we increase $\mathcal{M}$ the time to merge gets smaller. So black holes will spend even less time observable to LIGO.


How do I determine the lineage of several sets of source code?

Question: I have several hundred sets of source code where I know that files were copied from one project to another. Most of the projects were checked into subversion long after the fact (the revision history will be useless). Are there any automated tools which would allow me to figure out which projects were the oldest, and what the family tree of the source code is from there?
Comment: [flay](https://github.com/seattlerb/flay) looks for similarity in code, but I'm not sure it works recursively or with that much source code at once.
Answer: If the code contains date information [eg. checkin dates for some previous configuration management tool, etc.] or version information, you should obviously use that as a starting place.
Once you've done that, what you want to do is to compare the source code sets against one another, and form a lineage tree based on minimal distance in terms of edits.  That is, A is likely derived from B if the delta count of (A,B) is less than the delta count of (A,x) and (y,B) for all other x and y in the system, for some definition of delta in terms of lines changed, lines moved, files renamed, files moved, etc.   Also, if the changes from A to B are a subset of the changes from A to C, B is a likely intermediary.
This reduces your problem to detecting "delta count" across pairs of systems and/or comparing delta sets for subsumption.  For this, you probably want a clone detector, which tells you what parts of the code the are the same; the complement is what is different.
I don't know if anybody has packaged this up into a neat form for easy use.  The closest you might come is a structural clone detector, see http://www.comp.nus.edu.sg/~stan/PAPERS/CMCA%20Summary.pdf  I don't think this produces fine-grain matching, so the delta count might be a little rough.
If you want finer grain clone detection, and the code is largely in one computer language, you might consider our CloneDR and/or SmartDifferencers, which compare code at the level of abstract syntax trees extracted from language-precise parsers.


google play store says "check your connection and try again"

Question: Yesterday I got a Xiaomi Redmi 1s and I updated the phone to the latest OS version.  First I created a new Google account and then opened the Play Store.  It just shows "Check Your Connection and Try Again".  Other sites said to try clearing the data, but I had never used the Play Store before.
Comment: Have you been able to access the Play Store previously with another device in the same network?  Have you tried different Wi-Fi networks?
Answer: Hey I had the same problem but now I know how to fix it.  Set the device's date and time to Manual and 4 years in the future, then open the Play Store and you won't get anything.  Go back to settings and reset this to Automatic, then everything is okay!
Comment: I don't know whether to groan or laugh hysterically at the fact that this actually resolved the problem, so I think I'll do both. I started getting this message after clearing the Play Store app's data due to another problem, and this trick fixed it. How on Earth did you ever figure that out??
Comment: This answer helped me. Except my phone was already not in automatic time mode. So, I checked the box to make the time automatically updated and opened the play store again and it worked!
Comment: this doesn't work
Comment: This actually worked and it also solved a 505 error I was getting when downloading an application. Thank you so much!
Comment: didnt work for me too. the /etc/hosts cleanup worked (at least temporarily)
Comment: Worked for me!  Manually set time, and google play (and automatic downloads) came back to life.  Android 2.3.6.
Comment: Worked for me on Samsung Galaxy S2 that has been powered off for several weeks.
Answer: I usually resolve by removing /etc/hosts file (use an app like Root Explorer to access the file, Xiaomi phones are rooted OTB so you shouldn't have any problem). Sometimes I have to reboot the phone, sometimes it works straight away.
Better, instead of removing the file rename it to something else, so that you can restore it back if needed.
Comment: Thanks for advice. Cleaning the 'hosts' file helped to resolve the issue.
Comment: Thanx Jeffrey, it works for me too :)
Comment: Thanks. pretty quick work. I didn't need a restart.
Answer: This is happening more and more. If the time trick does not help, try to enter Google Maps (invoke something that makes heavy use of the Google Services API) and try Google Play again - this has fixed it for me in the past.


Android Studio, Sample Code - Not working

Question: There is sample code  on the developer site that i wish to run.
When I import as a new Android Studio project, I'm not given any ability to run the code (disabled buttons).
I attempted to copy the source files over into the shell of a new project, but i than got errors that didn't make sense. reference to duplicate declarations in source files that had nothing relating inside them.
Is there an idiots guide on how to properly use android studio, or is it just this difficult?
Answer: In order to correctly import the project, you should follow the Samples guide as found in the developer docs.

To import a downloaded project:

Unpack the downloaded project package.

In Android Studio, chose File >
Import Project and select the root folder of the unpacked project.

Android Studio may ask you to choose the type of project you are
importing.

If this is the case, make sure to choose Import project
from external model and select the Gradle option.

Alternatively, if the Gradle option does not work, I would attempt to use the Eclipse option.
Answer: Open .gradle file when you import the project, not the folder of the proyect.


Why don't DSLR cameras have internal memory to save images?

Question: Most DSLR cameras use external memory chip to save images. Why don't they use large internal memory?
Answer: There is nothing technical stopping DSLRs from having internal storage (in fact, they already have a small amount).
One reason for not including internal storage would be that it cannot be replaced, both in the short term (once the memory is full) and in the long term (once the memory, which would most probably be flash memory, starts to fail).
Having the replaceable memory (i.e. SD cards, CF cards etc.) allows the photographer to swap out each card as it finishes, meaning more photos before having to sit at a computer and spend time, which could be used taking photos, getting the photos out off the internal memory of a camera.
Replaceable memory also means that memory failure (which is likely at some point) doesn't ruin a camera instead only a small cost is incurred, rather than the cost to replace or repair the camera.
Also professional photographers may use their cards as an extra form of permanent backup, storing the cards from each project and never reusing them.
Including built in memory is also more cost, making the camera more expensive to manufacture.
Comment: @Chamin The memory within the camera would likely be very similar to the memory within an SD card.
Comment: @ChaminWickramarathna How does it make it easier. It just means one more thing that (a) needs be downloaded onto a computer, and (b) needs to be cleared. If you want internal memory, just leave a card in the camera and use the camera's USB cable (or whatever method it uses for transferring photos) to transfer photos to the computer.
Comment: An additional consideration that rears its ugly head once in a while is that it's much easier to salvage the stored photos from a badly damaged camera when you can pop out a card.
Comment: Why can't it use both internal and external memory? It will easy for user.
Comment: @ChaminWickramarathna Professionals replace cards eg. every year, BEFORE they wear out and get corrupted. This means: SD card corruption chance = 0%. Internal memory cannot perform preventive replacement. This means: internal memory corruption chance = 100%.
Comment: @damnedtruths- Because normal SD cards can corrupted easily. By using internal memory, it will reduce.
Comment: I used to use a lot of microSD for phone testing, and I eject them, write files to it, etc all day long, and I rarely see a corruption.
I've use name brands like Sandisk, Lexar, some of the less popular ones like PNY, Toshiba. Not a problem.
Internal flash would be not that different than an SD / CF card, except that you can't fix it. You'd have to send the board in for desoldering (at best), and chances are the manufacturer will just send you a new one and chuck the old one.
Answer: damned truths covered most of the points, but I'd also like to mention the word "large".
The way things have been going over the past few years, something that looks large today could end up looking tiny in only a few years.
With cards, it's easy to get something larger, and if it's something that's readily available (SD, CF), you effectively have infinite storage capacity - and the possibility of using an external reader so earlier cards can be read while the shoot is still happening.
Comment: On the other hand, the number of photos you could store on camera-internal storage would remain roughly constant for that camera, being affected mainly by the various quality settings. So if you can store, say, 1000 high-quality JPEG images on the internal storage when the camera is new, it will still have the capacity to store 1000 high-quality JPEGs by the time the camera is obsolete. Whether it will *reliably* store those is another matter entirely.
Comment: Fair point, but if you want to shoot 1005 shots, you're still better off with two cards. I'm also wary of the word "obsolete". I've had a lot of salesmen use the word to try to convince me I should buy the latest hot poop, but I've never yet had a camera that I considered obsolete.
Answer: Also, there is an aspect of data confidentiality here.
Once you remove the memory card, the only thing you have to handle as bearing potentially confidential data is that card. This will allow for clean separation of data and camera. Eg you do work for client A, put the card under lock and key, and can take the camera to client B without having to worry any data of client A being accidentally displayed, falling into the hands of a camera thief. The same applies if you want to loan or sell the camera away, or return a borrowed or rented camera.
Technically, there are exceptions - a really dedicated attacker (in the infosec sense) could probably get some (few) images from the buffer(s) even if the camera does no longer offer access to them.
Answer: In the comments to the accepted answer there is a comment about why not have both internal and external?
I have that on my JVC video camera.
I like that if I forget my card at home then I can still record.
But...
Countless times have I "lost" video files only to realize months later that they are saved on the internal memory card.
The camera switches from SD to internal automatic when SD is full, which is great, but I don't usually connect the camera with cable.
It's good but also it's a pain to have to look at both memories just to see if something was saved there.


Google maps v2 getting fragment instance

Question: I am trying to make a map which is in tab. I added support library so that Google maps would be supported from 2.2 android version. The main problem is that my tabs are fragments and nested fragments are not supported I created two xml files:
1) has an Relative layout and is inflated when  onCreateView() method is called in tab
2) second xml file hold fragment which is instance of SupportMapFragment
The second xml file is inflated and added to first xml file Relative layout. Map is shown but I cant get the instance of fragment. Is there a way to get instance off fragment in a view?
Answer: The nested fragments are supported since API Level 4.2 and support library 11.
They should be added dynamically and can be accessed by getChildFragmentManager().


How would Newton account for what Goethe called border spectra?

Question: According to Goethe when an observer looks through a prism at a white rectangle cast against a black background two border spectra appear (one formed by a red and yellow combination of colours, the other by a violet and blue combination) due to the fact that the prism moves the rectangle from its initial position in a direction towards the apex, which in effect brings on one side the darkness of the background over the lightness of the white rectangle, and on the other side takes the lightness of the rectangle over the darkness of the background. In the first case, says Goethe, darkness over lightness creates the red-yellow combination, and in the second case (lightness over darkness) creates the blue (cyan, really) and violet one. My question is how would Newton explain the apparition of those two combinations of colours.
Answer: This answer provides a visualization of the answer by Claudio Saspinski.

Rather than depicting a full spectrum as cast by an actual prism I have reduced the color palette to the three primary colors of additive color mixing.
The prism spreads the colors in color bands. For good color separation the source of the light must be narrower than the bands that the prism spreads the light into.
The image shows a series of 8 spectra, each from a sufficiently narrow sliver.
The large rectangle at the bottom shows the resultant color effect when the effective source is the 8 slivers combined, forming a rectangular source.
When the light that enters our eyes is the full spectrum minus red light then our eyes perceive that as the color cyan. When the light that enters our eyes is the full spectrum minus ultramarine blue light, then our eyes perceive that as the color yellow. And of course, in all the areas where there is full overlap the full spectrum enters the eyes, and hence we perceive white.

I have read Goethes book on his theory of colors.
(It was many years ago. I'm confident I remember the ideas sufficiently well.)
Goethe refused to consider the possibility that when the colors of the spectrum are recombined you get white once again. I don't remember Goethe giving a reason for that, he just dismissed it.

Historical perspective:
With the technology available in Newton's time and in Goethe's time it is difficult to show directly that the colors of the spectrum, when mixed in the proportions of the spectrum, combine to white.
Newton described two methods to try and obtain some level of assessment.
Newton's setup was that he had a narrow beam of light coming in through closed shutters, and having the prism cast the light onto a wall. Newton could undo the effect of a prism to some extent by having the dispersed light traverse a second prism, the second prism in reverse orientation to the first. The cancelation isn't perfect. So the evidence from that method isn't very strong.
Newton also describes a form of color mixing that he investigated that is similar to the color mixing you get if you look at a mozaic from a distance. Newton describes that he would grind colored minerals to a coarse powder, and by adjusting the ratio of the two powders the mix of the two powders would be perceived with a paler color than either of the constituent powders.
This type of color mixing is today called 'partitive mixing'. With partitive color mixing the best possible color effect is that you obtain a grey. You can't obtain a white because the constituents of the combined powder are diluting each other.
Anyway, Goethe did not retry the things that Newton described. Goethe describes that out of curiosity he had ordered prisms, and when he received his purchase in the mail he used it to look at a large rectangle. That did not result in the spectrum as described in Newton's optics, and ever after that Goethe was convinced that with a single observation he had refuted Newton's theory of light and color.
Comment: I also read the Goethe's book. His reasoning was that all colours were "darker" than white, so adding them could not lead to white. So, his poetic vison was that colours result from light and darkness, and not only from light. The coloured edges at the border of the white rectangle with black background would be an example.
Comment: @ClaudioSaspinski And to some extent Goethe had a point there. To my knowledge: in Newton's time and in Goethe's time the fact that additive color mixing and subtractive color are complementary processes wasn't yet recognized.
Answer: I think that when Goethe wrote about colours, Newton was not more alive to answer. But I suppose he could say as below:
All the image of the rectangle is refracted. But each color has a  different angle of refraction.
The central area is white because the bluish light coming from a point of the rectangle mixes with the reddish light from a point nearby.
But at the borders, that compensation is not possible. So one of them becomes bluish and the other redish.
Comment: @Cleonis.I'm afraid your answer contains two major problems. One, it does not address my question because the manner in which it was expressed it attempts to explain an objective experiment, not a subjective observation. Two, because the widths of the spectral bands are not of the same size. Instead, the width of the spectral blue is the same as that of the yellow one, whilst the widths of the cyan and red are about two times narrower and only approximately equal, to each other, in size.
Comment: @paparigoo I understand your objections as follows: you do not acknowledge the properties of [additive color mixing](http://hyperphysics.phy-astr.gsu.edu/hbase/vision/addcol.html). But: if you disagree with the science of color mixing then why bother submitting a question here on this forum? It is a given that on this forum the submitted answers will be based on the science of additive/subtractive/partitive color mixing.
Comment: @Cleonis. Sorry, but obviously you did not understand what I said. Instead you jumped to your own conclusion, which is wrong, anyway. I totally agree with additive colour mixing. But that has nothing at all to do with my objections to your answer. To me it looks like you don't know the difference between an objective experiment and a subjective one.  I can explain it to you, if that's the case. Also, the tone you're using baffles me. Is it because I dared to make those observations?
Comment: @paparigoo Stackexhange urges its users to avoid protracted discussions in the comment section; I support that policy wholeheartedly. With the answer and the comments as they are the visitors of this question are in a good position to judge the merits of the respective contributions.


joomla update issues

Question:
Warning
JInstaller: :Install: Error SQL Can't DROP 'idx_image'; check that column/key exists
Files Update: SQL error file DB function failed with error number 1091
Can't DROP 'idx_image'; check that column/key exists
SQL =
ALTER TABLE #__languages DROP INDEX idx_image;
Comment: What version did you update from? What database driver are you using?
Answer: Although it's strange that the idx_image index did not exist I wouldn't be too concerned about it. That warning is essentially telling you that Joomla tried to get rid of something but it was already gone. The Joomla update was still successful.
I recommend that you go to (from your Joomla Administrator) Extensions > Manage > Database and confirm that there aren't any issues. If there are, the "fix" button should fix them for you.
Otherwise, you should be OK, unless you have a high-traffic site, or are noticing slow page load. I say this because if you had one missing database index you may have other missing database indexes (and I don't think the database check I recommended you do checks for missing indexes, but I could be wrong). That could result in slow query execution.

joomla update issues


can I use CDN with images?

Question: can I use CDN  with images ? and if can then how to use it with upload from website to CDN server
Answer: Seems like there are a few options to accomplish this.
The first one would be using the CDN as Origin. In which case, there is already an answer with some advice.
The second option would be using your current website as Origin for the images. In which case you will need to do some DNS work that would look something like this:
Published URL  ->  CDN  ->  Public Origin
Step 1 - images.yoursite.com   IN CNAME   images.yoursite.com.edgesuite.net  --- This entry will send all traffic requests for the images subdomain to Akamai's CDN edge network.
Step 2 - origin-images.yoursite.com   IN A or IN CNAME   Public front end for the images
So the way it works is that in step one you get a request for one of your images, which will be then sent via DNS to the edge network in the CDN (in this case Akamai HTTP only). If the CDN does not already have the image in cache or if its cache TTL is expired, it will then forward the request to the public origin you have setup to pull the file, apply any custom behavior rules (rewrites, cache controls override, etc), cache the content if marked as cacheable and then serve the file to the client.
There is a lot of customization that can be done when serving static content via CDN. The example above is very superficial and it is that way to easily illustrate the logic at a very high level.
Answer: Yes, and you can check with your CDN provider on the methods they allow for uploading,
such as
pull (CDN server download the files from your website/server)
or
push (sent from your website/server to the CDN server)
Example : automatic push to CDN deployment strategy
Answer: Do you mean you want to use a CDN to host images? And you want to upload images from your website to the CDN or use the website run by the company hosting the CDN to upload the images?
Ok, firstly yes you can use a CDN with images. In fact it's advised to do so.
Amazon CloudFront and RackspaceCloud's Cloudfiles are the two that immediately spring to mind. Cloudfiles you can upload either by their API or through their website and CloudFront you upload to Amazon's S3 storage which then hooks into the CloudFront CDN.
Answer: In common CDN setups you actually don't upload images to the CDN. Instead, you access your images via a CDN, quite like accessing resources via an online Proxy. The CDN, in turn, will cache your images according to your HTTP cache headers and make sure that subsequent calls for the same image will be returned from the closest CDN edge.
Some recommended CDNs - AWS CloudFront, Edgecast, MaxCDN, Akamai.
Specifically for images, you might want to take a look at Cloudinary, http://cloudinary.com (the company I work at). We do all of this for you - you upload images to Cloudinary, request Cloudinary for on-the-fly image transformations, and get the results delivered via Akamai's high-end CDN.

can I use CDN with images?


Against cold boot attacks: how to restrain sensitive information in Haskell

Question: Is there any way to ensure key material gets securely erased from the memory after the program exits? Being able to erase it manually and keep the program running would be even better. As Haskell uses automated garbage collection (which may not happen at all if there is loads of free memory?), I assume that the second task is impossible. Could something that serves the purpose be implemented using FFI?
Comment: Yes, cold boot attacks are so common you have to worry about them. You can use ST, hold the data in STRef and scramble it after use. Dunno if you can mlock memory behind STRefs.
Answer: GHC can return memory to the OS when it is no longer needed, so merely blanking the memory on exit won't achieve your goal. Garbage collection is a complicated business, but there is in general no way to ensure that old copies of your secure data are not returned to the OS memory pool.
However the OS will blank your memory before allocating it to another process.  If you don't trust the OS to keep your memory secure then you have a much bigger problem.
I'm not sure what you mean by "unreliable"; Haskell GC is reliable, but the program has comparatively little visibility of what is happening.
However if you are concerned merely with a cryptographic key rather than a big, complicated data structure then life gets a bit better. You can use a Foreign Pointer to point to a memory location for your key, and then make blanking that bit of memory into a part of your finaliser. You can even write a bit of code that allocates a block of memory, mlocks it, and then hands off foreign pointers to key-sized chunks of that memory on request, with finalisers that wipe the key. That would probably do what you want.
The point of a ForeignPtr is that it is guaranteed not to be moved or re-interpreted by the GC.
Comment: Thanks for your answer. As I am not too familiar with all this "foreign" stuff, I'll wait and see whether an answer that points to existing code turns up and accept your answer if it doesn't. OS clearing the memory before handing it to other processes does not help here, because one cold just pull the plug and put the RAM modules to another machine. If it sounds like wanting to be too safe, think (laptop) disk encryption - it would be a good idea to flush unencrypted key material out of memory before suspending it. I also clarified my reluctance to rely on automatic GC in the original post.
Comment: There is nothing horrendously difficult about ForeignPtr.  See http://en.wikibooks.org/wiki/Haskell/FFI for a tutorial.
Comment: @Andreas wouldn't pulling the plug empty the RAM of its data?
Comment: @amindfv For RAM data to stay intact, it is read and rewritten regularly. However, unpowering the RAM does not erase it, the data just fades out over time. Most RAM used today does not fade fast enough to prevent copying it, and even if it would at room temperature one could just freeze it first to make it last even longer. There is a paper on this issue at https://citp.princeton.edu/research/memory/
Comment: There are attacks which don't involve a power off. For instance you can plug in a bootable thumb drive and press reset; the thumb drive boots into a little program that dumps a memory image to a file. Some implementations of OHCI over firewire allow a connected device to send DMA commands that allow the whole of RAM to be imaged just by plugging in a device. So minimising the time key data is held in RAM is a Good Thing.
Comment: I'd call this broken design and say IO MMU is a Good Thing.


Jungle camps in Conquest

Question: What are the timers and health points for each of the camps in conquest and joust? And how do fire giant and gold fury scale?
Answer: As of Season 6 the jungle camps for conquest have their base Health pool decreased but their increased health per level increased and it goes as follows:
Conquest:

Harpies:

Small Harpies Health: 130 + 70 per minute (patch notes say level but that has to be minute).
Elder Harpies Health: 380 + 75 per minute.

Buff camps:

Buff holders health: 440 + 145 per minute.

Oracles health: 680 + 110 per minute (Oracles have a respawn timer of 3 minutes).

All of the above mentioned Jungle (Harpies, buff camps, Oracles) camps in Conquest(and conquest only) have had as of Season 6 a magical.
  protection increase from 0 to 5.

Gold Fury health: 3000 + 275 per minute.
Pyromancer: 2250 + 250 per minute.
Fire giant: 7000 + 275 per minute (protections: 110/70, first number is physical and second is magical).
Enhanced Fire Giant: 8000 + 275 per minute (protections: 125/85, first number is physical and second is magical).

As for the buff timers the buffs last for a total of 2 minutes and in conquest the buff camp respawn timer is also around 2 minutes.
As for the respawn timers of the Gold Fury, Pyromancer and Fire Giant they are all 5 minutes. For further information on their power scaling attack chains and other information here are the patch notes for Season 6
Joust:

Mana Turtle:

Small Mana Turtle health: 320.
Mana Turtle Buff holder Health: 1130.

Power Tiger:

Small tiger health: 320.
Tiger buff holder: 1130.

Bull Demon King health: 3844 + 216 per minute.

In Joust however the buff camp respawn timer is 3 minutes or (180 sec).
The Bull Demon King has a respawn timer of 5 minutes.
Keep in mind that as time progresses these values are prone to change.

Jungle camps in Conquest


Should I use a period at the end of a headline?

Question: I am working on copywriting for my website, and am wondering whether or not I should use periods at the end of my headlines. The headlines will probably be used both as headlines for news articles, and as calls-to-action in a marketing sense to promote the new features of the website.  So I am curious both as to whether it is "proper" to use periods, as well as if there is incentive for or against it in terms of marketing and persuasive writing. An expert opinion? :)
Comment: The only time punctuation tends to show up in headlines is an exclamation mark or question mark in something that is very sensationalist, an editorial, or both.
Answer: Headlines are basically titles, and the reason periods aren't usually put in titles is:

Full stops, like their name suggests, are something that halts the eye of your reader....Titles are all about leading your reader into your post and so anyway [sic] that you can help this flow is a bonus.

I don't know about its being proper or not, but I know there are incentives as to why periods aren't used in titles.
From Press Release, which I hope is expert enough:

Additional Guidelines for Writing Headlines
  Use periods only for abbreviations. Do not add a period at the end of your headline
Comment: Thanks, Ham. Halting the eye of the reader is definitely not something I want in a call-to-action link!
Answer: No.  For one thing, headlines are almost always not sentences.  For another, there is a reason why a period is called a full stop; this is the same reason why we do not want them in headlines.
Comment: +1 for "headlines are almost always not sentences".


openssl-rsa c library

Question: JKJS
RSA_print_fp(stdout,rsa,1);

this function adds 0x00 in modulus . So public key size becomes 129 bytes instead of 128 bytes.
Why 0x00 is added?
Thank You.
Answer: The modulus is an integer, not a string of bytes. An integer can be both negative and positive. Although negative integers are not used for the modulus in RSA, the functions that handle integers are generic in OpenSSL.
A negative number has its most significant bit set to 1. To distinguish between a negative integer and a positive integer that happens to have bit 7 of the most significant byte set to 1, the positive integer is prefixed with 0x00.
Answer: It is the ASN.1 DER encoding of the modulus. Integers are represented in two's complement form, big endian order, and minimal number of bytes.
By that rule, FF is -1 (decimal) and00 FF is 255 (decimal).
In RSA, all integers are positive. Hence, the MSB bit of the leftmost byte is never set.

openssl-rsa c library


The difference between "das heißt" and "beziehungsweise"

Question: I am under the impression that both "das heißt" and "beziehungswiese" translate to "that is." Is there any difference between them?
Comment: Which translator did you use? "Beziehungsweise" is not even close to "that is". It means "respectively".
Comment: Related: https://german.stackexchange.com/questions/9894/when-to-use-beziehungsweise
Answer: "beziehungsweise" might be better translated with "respectively" instead of "that is".
Both may be used when further explaining some subject. But whereas "das heißt" is mostly used to deepen the meaning of whatever was said before, "beziehungsweise" may in addition also be used to introduce a slightly different meaning/topic or to express an alternative or may be used as a conjunction bringing to subjects together.
For example (first explaining the subject better with both phrases):
Um die Bedeutung besser zu erklären, das heißt verständlicher
zu machen, verwendet man ein Beispiel.

Um die Bedeutung besser zu erklären beziehungsweise diese
verständlicher zu machen, verwendet man ein Beispiel.

Both translate to
To better explain the meaning, that is to be more comprehensive, it
is a good idea to use an example.

Another example using "beziehungsweise" to express an alternative:
Dienstag bzw. Mittwoch kann ich diese Arbeit erledigen

which translates to
Tuesday or (respectively) Wednesday I can do this work

A third example using "beziehungsweise" to glue together two subjects:
Die Fahrzeuge fuhren 50 bzw. 150 km/h

which means there were two vehicles, one driving at 50 kmph, the second at 150 kmph.
Comment: Perhaps good to bear in mind: many users of German, especially when sitting in an office and writing official stuff, use *beziehungsweise* (or rather *bzw.*) thoughtlessly and without awareness of meaning and style. In such texts it is often just a pompous replacement of *oder*.


The importance of having a "big name" as your thesis advisor

Question: When it comes to postdoc positions in mathematics in the US, does it make any difference for the hiring committees if your thesis adviser is a big name (say, someone like Gromov or Milnor)?
Comment: @user37208 Wow - "the single most important factor" does not involve at all the quality of your research work? If it is really so, it is disappointing.
Comment: It doesn't just make a difference. Assuming they write you a good letter, the name recognition of your advisor is (perhaps unfortunately) the single most important factor in getting a good postdoc.
Comment: I assume you have a PhD  and since you have no longer an alternative for your thesis adviser, what is the relevance of asking if it make any difference if your thesis adviser is a big name or not?
Comment: Presumably, getting a good letter from a well known person *is* about the quality of your research work, @Federico Peloni.
Comment: @OswaldVeblen Of course, a student with a good letter from a top-level advisor has the best opportunities. There is no arguing against that. But "the single most important factor is your advisor" to me means "a bad student from a well-known professor has better chances than an excellent student from University of Nowhere", and that bothers me.
Comment: Yes, that quoted statement is not true in my experience. But user37208 did say "assuming they write you a good letter"...
Answer: I'm surely not the most qualified person on this site to answer, but I have been on a postdoc hiring committee in pure mathematics and I quite disagree with the existing answers. The single most important factor is going to be your letters of recommendation (with second on the list being your publications and preprints). I think having a famous advisor is going to be of minor importance in comparison; most people understand that also great mathematicians sometimes have students that are just mediocre, so that it's no great predictor of future success. In fact I heard in a sense the opposite argument being made, that if an applicant from a smaller university with a less famous advisor has strong letters from big names, then this is more impressive than if a student at a "top" university had the exact same letters.
Answer: In spite of the obsession with objective assessment and quantification that supposedly governs science, personal recommendations often still matter the most during the hiring process. Hence, if you have a big shot PhD advisor, you'll probably have an easier time finding a good postdoc in a group that your advisor has good contacts with.
If you don't have the big shot backing, you can (partly) make up for it by approaching potential postdoc advisors in person (e.g. at a conference) and convincing them that you're not only a scientist with high potential but also a nice person.
The point is, when you apply for a postdoc in a good group, your application is likely to go to the "meh" pile if neither your nor your advisor's name ring a bell with the group leader.
Comment: I downvoted this answer because it does not (in my opinion) reflect the situation in mathematics, which the original question asked about; for example, postdocs in mathematics are not usually in a "group", good or otherwise, but rather in a good department. However it might be more applicable in other fields.
Answer: Yes, it makes difference.
However, your personal relationships with the prospective advisor make even more difference.
Comment: I downvoted this answer because it does not (in my opinion) reflect the situation in mathematics, which the original question asked about; for example, postdocs in mathematics may not have a single "prospective advisor", or any particular advisor at all. However it might be more applicable in other fields.
Comment: I agree with Tom Church. Of course, no department wants to hire a postdoc that nobody can work with. But apart from specialized applications (e.g. the NSF postdoc in the US), math postdoc applications don't really require pre-existing relationships with anyone in the target department.


stackstatus.net SSL_ERROR_BAD_CERT_DOMAIN

Question: Apparently stackstatus.net is being served over https using the tumblr certificated instead of it's own domain. I presume there should have its own certificated.
Comment: What do you mean by "there should have its own certificated"?
Comment: @PeterMortensen change "there" for "here", it's an indicative of place. I presume *in that place it* should have its own certificated.
Answer: Tumblr does not support SSL certificates on custom domains:

You're currently using a custom domain name ("stackstatus.net"). That's cool, but we're not currently able to serve custom domains over SSL.

Given that this domain needs to stay 100% seperate from our existing infrastructure, there's no easy way for us to enable SSL for this domain at the moment.
We can't even go behind CloudFlare for this unfortunately. We will evaluate alternatives in the future.
Comment: Mark's been around here for years, @rene. Many adjectives have been used to describe him, and many adjectives fit... but I don't know that "ordinary" is among them.
Comment: @rene as Shog alluded to, it's not my decision whether I get a diamond on MSE. The only reason I have one on serverfault.com is because I was an elected moderator there before I started working for Stack. The quick hover-over on my display profile should hopefully clear things up for anyone else who is confused in the future.
Comment: Oh well, at least we tried :(
Comment: Would you mind enabling your diamond on MSE? I find it highly confusing when *ordinary* users answer these questions that accurate AND slam the status-declined on the question....
Comment: @MarkHenderson yeah, I have had a few words with him in chat and I rest my case. Thanks for being on the team!
Comment: Note: as of the changes to the StackStatus website last year (as described in [Improvements to site status and incident communication](https://meta.stackexchange.com/q/378941/335251)), the site is no longer hosted on Tumblr, and now uses HTTPS.


How to submit a canu job on LSF high-performance computing cluster farm?

Question: I am currently running canu on an LSF Linux server using the following script called assemble.sh:
canu -p species -d output genomeSize=100m -pacbio-raw subreads.fastq

I then submit this script with the following in a computer node:
bsub -q basement -E 'test -e /nfs/users/nfs_c/cr' -R "select[mem>25000] rusage[mem=25000]" -M25000 -o canu.o -e canu.e -J canu 'bash assemble.sh' -n8 -R"span[hosts=1]"

On my laptop, using 8 cores and 16 GB memory, assemble.sh took about 48h. On the cluster, it's been running for 72h and it is still running. I wonder if I am allocating resources correctly or if I can do something better. On my laptop, I can see in my activity monitor that canu is using many cores at the same time. Do you know how I can check this in an LSF server?
This page talks about submitting jobs on LSF. In particular, it mentions this: gridOptions="your options list" but I don't know how to use this option.
Any help would be appreciated.
checking the queue with bjobs -u all shows there are 125259 jobs running. My own job is running, it's not pending. Does the number of other jobs affect the running of my own job? I will ask IT if there are preferred writing locations. I did not consider that could change the speed of the job. Do you know a command to check how many resources my job is using?
Answer: I haven't used canu for several years but looking back at my labbook I ran it with two additional flags:
-minThreads=8 -maxThreads=8
My memory on the subject is a bit hazy but  think I had to play around with these settings to get it to work.  I also set the flag:
-maxMemory=6


Referee's mistakes in football/soccer

Question: Please somebody explain, why can't referee just wait a few seconds, and look at the at the telebim, and then decide if it was a foul, or if ball crossed the goal line. It would solve many issues.
Comment: I think it's because not every league can afford that kind of technology.
Comment: It would also dramatically increase the length of the game.
Comment: I don't think so. In the time after whistle players are trying to convince referee and discuss with him. it takes preety long time. If referee would decide after waching the replays, discussion with him would be pointless.
Comment: I answered a similar question to this http://sports.stackexchange.com/questions/4309/goal-line-technology-in-football/4310#4310
Answer: Short version answer: Because is not in the rules.
Long version answer: It can be implemented, but if you look at this question answers, you could see that there are other important aspect of the game that could be improved..
The 4th referee (or the 6th in a 5 referee game) could watch and decide, but it would involve several changes in the rules, like stopping time, give power to another officer to make the call, and what to do in that situation.

Referee's mistakes in football/soccer


Are there consequences for taking the dragon phylactery out of the Rymrgand's realm?

Question: In the "Beast of Winter" DLC for POE2, your main task is to deal with an undead dragon, who keeps trying to escape the Rymgrand's (the god of ending and entropy) realm. But in the end, you don't have to actually fight the dragon - with enough skills, you can tell her that you will take the artefact (which she bound her soul to) away, to the real world.
Rymgrand's avatar (the titular Beast of Winter) will ask you to give him the artefact, giving some cryptic warning, but he doesn't press the matter. In the end, you can safely take it out to the normal world and use it as a trinket:

Which is actually quite mediocre (it can be upgraded a bit if joined with other trinkets from the other two DLCs)

But are there any long-lasting consequences (i.e. described in the endings) regarding releasing vs destroying the dragon?
Answer: I recently talked the dragon into coming with me and then beat Rymrgand to leave.  It changes some dialogue plus the end-game wrap-up, but there were no practical effects that i noticed.


Synology DS415+ setup USB Printer

Question: I have a HP LaserJet P1102, I am trying to install it connected via USB cable to my NAS, I can not find my P1102 in my Mac, instead it was showing "usbprinter1@diskstation". If this printer is selected the printing window shows sending and printing but the printer does not print at all.  Any help is more than welcome
Answer: Got HP LaserJet Pro P1102 connected to Synology DS110j to print from Mac through LPD.
Download and install driver pack from Apple (https://support.apple.com/kb/DL907).
System Preferences, Printers & Scanners, "+", Add Printer or Scanner..., IP tab.
Address - IP address or network name of DiskStation,
Protocol - Line Printer Daemon - LPD,
Queue - usbprinter1 (queue name can be found in DS's control panel, external devices, printers, name).
Name, Location - choose by yourself.
Use - Select software..., HP LaserJet Professional P1100, 6.9.
That's all, print test page and enjoy.
Comment: Yes, printer is connected directly to NAS via USB.
Comment: Hi Aleksey, thanks for the info, did you connect your HP printer direct to the USB port of your  NASs?
Comment: Dear Aleksey, you are great, works perfect in all Macs at home. Thanks a lot, I am sure many users will benefit from your help.
Answer: There are 2 possible problems. The first one is that some NASs use the USB port only for thumb-drive support, not printers.
The second problem is that the P1102 is a "host-based" printer, which relies on the Mac's graphics engine to convert a page into dots on the page. Such printers are notoriously hard to network via a "printserver".
There are 2 ways to network them:

share the printer from a PC or Mac. This works reliably.
use a printserver that specifically supports your printer.

If you want to use method 2, look for a list of supported printers from the printserver manufacturer. If your printer model is not in the list, you must assume it will not work.
Synology have a printer support list here, which includes the P1102w, up to OSX 10.6. More recent versions of OSX have not been tested, so they may not work. You could try and contact Synology to see if they have more up-to-date information. And, have a look at their printer setup webpage - which only talks about Windows.
Comment: Thanks for the detailed reply, I will contact synology their support is amazing

Synology DS415+ setup USB Printer


Replace low-res startup login picture by high-res

Question: Whenever I start up my Mac I need to fill in the password to my user account and it shows this ugly low-res user picture stretched out as my user account picture in the login screen. After being logged in and Filevault on my Mac is unlocked, returning to the login screen shows the regular high-res user picture. My question being: Where is that low-res cached user picture located, how do I reach it, and would it be possible to replace it by a high-res image, and if so how?
Comment: If I remember correctly, that image is stored in the EFI partition (because it needs to appear before Filevault is unlocked), so there is limited space available for it.
Answer: When you boot up your Mac, it starts from a non-encrypted part of the disk that only contains a very limited subset of macOS. Basically it can display that login screen and that's it. The pictures displayed are "hardcoded" into it - so it is not loading those account pictures like usual.
As soon as you have logged in, the ordinary disk can be unlocked (i.e. decrypted) - and then the full macOS system takes over - and now your account pictures are loaded from the file system like usual.
If there's a problem with the account picture during the first part of the boot, I would suggest simply trying to change the account picture. When you do that, the information in that non-encrypted part of the disk is updated. You can check by rebooting and seeing the new picture. Afterwards you can change it back to the original picture you want, and the login window information will be regenerated - this time hopefully without any flaws.


Why does the redshift formula hold true when measuring the expansion of the universe?

Question: As far as I understand, photons get 'stretched' as the universe expands, and the expansion rate is not constant. This means that the redshift observed on Earth is the sum of individual redshifts arising from the expansion of space at each instant. Therefore, I'd think the 'velocity' of the object we are looking at at the moment the observed light was emitted should be proportional to $$λ_0\int a(t)λ(t)dt$$ (where $λ_0$ is the original wavelength of the emitted light, $λ(t)$ is the wavelength at time $t$, and $a(t)$ is the scale factor at time $t$), with $a(t)$ behaving in a manner that we are trying to find. If that were the case, it would render drawing any reasonable conclusions based on redshift data practically impossible, as it would create a logical loop (in order to find $a(t)$, we need to know how it changes with time, which we can only determine by knowing what $a(t)$ is). Where am I wrong?
Comment: you are not wrong, and proper cosmology does look into that, there are complex equations relating the expansion over the whole past of the universe and the redshift. For small redshifts though, only the present rate is sufficient (as a first-order approximation)
Comment: @NickPavlov Would you mind giving me a link to one of the equations (even if they are complicated - I just want to see what factors affect the velocity)? Also,  the Wikipedia article (https://en.wikipedia.org/wiki/Hubble%27s_law#Recessional_velocity) says that, "... [light] is red shifted due to the expansion of space, and this redshift z is simply $$\frac{R(t)}{R(t_0)}-1$$".  Why is it simply that, or why is it that "for small redshifts... only the present time"? Even for small distances, the resultant redshift would be the accumulative effect of the expansion of space throughout the distance
Comment: Right? Why would the approximation work?
Comment: You can find a derivation on [Wikipedia's page for redshift due the the expansion of space](https://en.wikipedia.org/wiki/Redshift#Mathematical_derivation).
Comment: regarding your edited question: physics often deals with models that involve self-referring aspects, which might appear like a logical loop; there are ways to handle such aspects carefully and not illogically
Comment: @Max [Sorry, in a previous version of this comment I had a wrong link, but it's too late to edit it, so I just delete and repost] In terms of the actual scale factor, it is as simple as that. I thought you wanted to relate it to the expansion rate which is the derivative of the scale factor - then it needs to be integrated over a time period. The equations I referred to are the Friedman-Robertson-Walker metric equations: https://en.wikipedia.org/wiki/Friedmann-Robertson-Walker_metric
Comment: for small redshifts, $R(t) - R(t_0) \approx (t-t_0)dR/dt|_{t_0}$ and $t-t_0 \approx d/c$, where $d$ is the apparent distance to the object; when you put these together you get Hubble's law
Comment: @NickPavlov No no no, I think you did have the right link :). Yes, apparently, it all simplifies nicely. For small distances, however, I can see that what you wrote is Hubble's Law, but I don't see how that means the redshift is directly proportional to recessional velocity without the integral proof that you provided me with. Anyways, thanks :)
Comment: For small distances, recessional velocity, when you think about it in terms of expansion of the scale factor, is just $v \approx \frac{d}{R_0}{\left(\frac{dR}{dt}\right)}_0$ which is what you get from my previous comment. Essentially, it is the same as saying that for small time periods, the expansion rate hasn't varied much, so we can approximate it as a constant (equal to the current value)
Comment: Yes, but that wasn't the problem; my problem was understanding why the redshift was equal to $\frac{R(t)}{R(t0)}−1$. I now understand it is trivial.
Comment: @NickPavlov Actually, having thought about it, assuming a straight-line relationship is wrong by definition, as $v=\frac{a'(t)}{a(t)}d$, and $\frac{a'(t)}{a(t)}$ can't be even close to constant if $a∝t$. Another reason such reasoning is flawed is that $t−t_0$ will not remotely equal $d/c$ even assuming $a∝t$, as the light from the galaxy we are observing will have been stretching all the millions of years the galaxy is away from us. Mathematically, the error would be equal to $\frac{c}{b}ln(\frac{t_0}{t})-\frac{d}{c}$, with $a(t)=bt$, and I presume it will quite large for distances of millions
Comment: of light years.
Comment: but that is the whole point - you will only get a (approximately) straight-line when the object observed (galaxy or whatever) is **not** too far away. In that situation, $a'(t)/a(t)$ will be close to a constant. The question is, what does *not too far* actually mean? (And that's exactly what troubles you, isn't it? Judging from your last comment to Cristoph's answer.) To put a validity bound on the approximation, you would need to consider a particular expansion model, e.g. linear, quadratic, exponential, etc. Am I correct in understanding that this last part is what you want an answer to?
Comment: Yes, that is exactly my problem. More specifically, I know that expansion only affects structures on extragalactic scales (others are in gravitationally bound systems), and at these scales, it seems obvious to me that Hubble's Law is going to be irrelevant. I want to see where I am wrong.
Answer: In the following, I will adopt the notation of $a(t)$ for the scale factor, and take $a(t_0) = 1$ as an arbitrary unit for it. Then the expansion causes a redshift given simply by
$$ z = \frac{R(t_0)}{R(t_e)} - 1 = \frac{1}{a(t_e)} - 1, $$
where $t_e$ is the time of emission of the observed photon.
On the other hand, computing the present-day distance to the object that emitted the photon requires an integral over the whole time of flight:
$$
d = \int_{t_e}^{t_0} \frac{cdt}{a(t)} $$
because the distance increments $cdt$ travelled at some time in the past have subsequently "stretched" by $1/a(t)$; equivalently, we can think of this as calculating the distance travelled in co-moving coordinates, which with the convention I adopted ($a_0 = 1$) are the same as current coordinates. All this you seem to already know, but I include it for completeness.
As Cristoph's answer already suggested (I'll try not to repeat too much of it), if we assume a particular expansion model, we can now find redshift and distance, both as functions of $t_e$; if we then eliminate $t_e$ from these two equations, we get distance as function of redshift. No-one is claiming that it has to be linear in general. But for any reasonable expansion model, it will be linear for small enough distances/recent enough emission times. So, first question: what is, after all, "not too far"/"not too long ago?"
Well, that depends on the model. You've already calculated that for linear expansion we get a logarithmic curve: if $a(t) = 1 + H_0(t - t_0)$, then $d = (c/H_0)\ln(1 + z)$. The approximation $\ln(1+z) \approx z$ holds for $z \ll 1$, which in turn implies $|a-1| \ll 1$, and then $|t - t_0| \ll 1/H_0$. With an exponential model, $a(t) = e^{H_0 t}$, one finds $d = (c/H_0)z$: that one turns out to be linear for all distances/times. Any model I've come across, linearity inevitably ends up being a valid approximation for small redshifts $z \ll 1$, whatever that means in terms of time/distance, and this is why cosmologists often treat redhsift itself as a (model-independent) measure of "nearness" (in an abstract sense). But for any particular model, we do have a theoretically predicted redshift-distance relation.
Which brings us to the second part of your question, how do we know which model is the right one, so that we can use it to deduce distance from redshift alone. If we only had redshift as observable data, it would be - as you say - a logical loop. But we do have other things to work with. Cristoph touched on that, too: first we need to judge our models based on other input. Theoretically, the expansion is driven by the distribution of energy in the universe. While there are still a lot of open questions in that respect, we do know a little bit. And, very importantly, we have other ways to infer something about distance. At such large scales, usually they involve arguments of homogeneity and isotropy of the universe.
For example, the mean density of "stuff" in the universe is assumed to be mostly constant. That means that if we constructed a cumulative frequency function for number of observed galaxies up to a given redshift, we would expect that number to be proportional to the volume of a sphere whose radius is the distance corresponding to that redshift. So we can get distance through volume. If we assume the mean brightness of a galaxy is also mostly the same everywhere, we can use apparent brightness to deduce distance, this time through area (assuming all directions equivalent, light from a point source spreads out evenly over the surface of that same sphere, so intensity is inversely proportional to its surface area). Finally, as Cristoph mentioned, a direct radial estimate might come through time itself, if we expect mean age of stars or galaxies to be about the same everywhere (information about age at time of emission is present in the spectral properties of the light). These are just the ones that come to my mind, there may be other methods. Interestingly, since they all give a different "type" of distance (geometrically speaking), they allow us to infer something about curvature as well, which plays back into the metric equations and thus links back to the theoretical foundation of the models.
So all these considerations are interconnected, and the thought process is not just linear from observation to conclusion. We come up with models, explore their implications, compare to observations, if necessary adjust the models, and do this with many models in parallel. The scientific process is often one of guessing and fitting; much like a young kid, who knows nothing about equations, can still solve a riddle like "what number plus 5 is equal to twice that number?"
Comment: Good answer. One question, and if you I answer it, I'll tick this post. Isn't z<<1 only valid for intergalactic distances, for which systems are gravitationally bound? If not, that's it, you finally answered my question.
Comment: Wow, way to resurrect an old question. A redshift of 0.1 corresponds roughly to 30000km/s recession. There are plenty of graphs online showing data for redshift velocity vs distance. You can even find Hubble's original plot, I believe, here (and in many other places): http://www.pnas.org/content/pnas/101/1/8/F1.large.jpg showing quite a few objects with v less than that. Alternatively, with current value of Hubble constant, z=0.1 is a distance of about 400Mpc; you can also find huge lists of galaxies with their distances and see that many are closer than that.
Comment: Haha, yeah, it's been a long time, but now I started thinking about it again and noticed your answer. OK, so Hubble's law works - but only for the nearest billion or so light years. I've actually seen Hubble's original plot before - just not in redshift terms - but now I have an idea for the sort of range that the law is applicable. Answered my question. Thanks for dedicating all that time to answer this one pesky question :P
Answer: In the Friedmann model, proper distances at constant cosmological time evolve according to
$$ r = \frac a{a_0} r_0 $$
The same goes for wavelengths, ie
$$ 1 + z = \frac \lambda{\lambda_0} = \frac a{a_0} $$
which you can also derive kinematically by parallel-transporting momentum vectors along null geodesics.
This means cosmological redshifts directly correspond to scale factors. To experimentally measure the time evolution of the scale factor, you'd then have to determine the age of the object in some other fashion (perhaps the age of the oldest stars in a given galaxy?). On the flip side, if you have fixed the parameters of your cosmological model and computed the evolution of the scale factor by solving Einstein's field equations, you can then determine the age of an object from its redshift.
Hubble's law relating velocities and distances follows directly from the first equation:
$$ \dot r = \frac {\dot a}{a_0} r_0 = \frac {\dot a}a r \equiv H r $$
However, the observed linear relation between redshift and distance is only an approximation:
$$ 1 + z \approx \frac{a + \dot a \Delta t}a = 1 + H \Delta t$$
and thus
$$ z \approx H \Delta t \approx H \Delta r c^{-1} $$
under the additional assumption $\Delta r \approx c \Delta t$.
Note that historically, this has been interpreted in terms of Doppler shifts (eg in Hubble's famous paper, even though Lemaître had already published his interpretation). Such an interpretation also yields recession velocities
$$ v \approx H \Delta r $$
as special-relativistic Doppler shifts reduce to $z \approx \frac vc$ if $v \ll c$.
Comment: Yeah, but my question is: how can we assume it's linear? If it has something to do with solving Einstein's equations then that's the answer, but is that really why we know the time derivative of the scale factor is small for small distances?
Comment: @Max: *why we know the time derivative of the scale factor is small for small distances?* That's just Taylor expansion: Given a sufficiently smooth dependence of the scale factor on time, the relationship will be approximately linear if the light's travel time is small enough
Comment: Yeah, but how do we know what is 'small enough'? It could be a few seconds, or it could be millions of years. Incidentally, it happens to be the latter, but how do we know that the scale factor changes soooo smoothly that such long periods of time barely have an effect on its derivative?


Who owns a copyright of a work that is found to be infringing? For example Warhol case that SCOTUS heard

Question: Warhol made screen prints from Lynn Goldsmith's photograph. Those prints have earned millions of dollars. If SCOTUS finds that Warhol infringed, who owns copyright to the Warhol prints? If they are not transformative enough to qualify as fair use, does Goldsmith own the copyright to the prints? Or does Warhol own them and he has to pay a licensing fee?
Answer: Arguably, no one owns the copyright in the general case. This is a similar case to a previous question I've answered. In short, the US has a statutory provision which bars infringing derivatives from gaining copyright.
In this particular case, it's helpful to take a look at what the Court of Appeals for the Second Circuit had to say. While evaluating transformativeness, they did not declare Warhol's works to be derivatives, but left that possibility open and stated it was closer to being a derivative than transformative fair use:

Nonetheless, although we do not conclude that the Prince Series works are necessarily derivative works as a matter of law, they are much closer to presenting the same work in a different form, that form being a high-contrast screenprint, than they are to being works that make a transformative use of the original.

That Warhol's prints might have no copyright attached to them does not mean that anyone can use them though – they are still very much based on Goldsmith's photo and the underlying copyright to the original still belongs to Goldsmith. This could well mean that Goldsmith would be able to use the Warhol prints as if she owned its copyrights.

Update: The Supreme Court has now affirmed, albeit on a narrow appeal from the Second Circuit Court of Appeal which dropped the issue that this question is about.
Only the first fair use factor of transformativeness was challenged by the Andy Warhol Foundation (AWF). Additionally, and more important for this question is that only a single use was ruled on: the licensing of one of the prints by AWF for a 2016 magazine article reprint following Prince's death. This is because Goldsmith dropped the wider infringement claims.
Here's where I realize I missed a key distinguishing fact in the case: There was indeed a narrow license for use of the photo for "artist reference" in relation to an article to be published in a 1984 Vanity Fair issue.
In effect, due to the license, the (probable) derivative could be considered non-infringing1. Nevertheless, the court ruled that the use in the 2016 issue was not fair (given there was no license for use beyond the 1984 article, AWF had to rely on a fair use defense).
In other words, the Warhol prints as a whole are not necessarily infringing derivatives2, rather, the specific use in the 2016 article was affirmed to be infringing.
In particular, I'd like to highlight the following from court:

The fair use provision, and the first factor in particular,
requires an analysis of the specific "use" of a copyrighted
work that is alleged to be "an infringement." §107. The
same copying may be fair when used for one purpose but
not another.

The full license text is not in any of the court decisions, so it's impossible for us to know for sure, but the portions that are quoted lead me to believe the license is vaguely worded. In particular, its in the realm of possibility that only the single derivative used on the 1984 article was licensed, but I would argue its reasonable to expect an artist to try multiple derivatives given a license for "artist reference." This could potentially have been of some consequence as the print used in the 2016 article is not the same as the one used in the 1984 article.
But since this case was initiated in district court by the AWF seeking declaratory judgment of non-infringement, my understanding of the matter is that once the case is passed back to the district court, it will enter in that declaration given Goldsmith dropped the wider infringement claims. Take this with a grain of salt, I'm not very well-versed in trial procedure.
Comment: I find the ownership questions intriguing, because if we start with a photo, and make a copy, and a court determines that it is not distinct or transformative, then is it considered the "same as" the original work and thus the owner of the original also owns the copy? Or does the owner not own the original, but she is still the only person who can sue people for use the warhol prints in an infringing manner?
Comment: @jqning I'm not sure I fully understand either of your questions there. For your first question if the copy is the "same as" the original work, then there's no new copyright, so nothing to "own." For your second question, I believe that's the case, but I thought the last sentence in my answer already implied that?
Comment: @jqning the owner of the copyright is distinct from the owner of any given copy.  When Alice paints a painting and sells it to Bob, Bob owns the painting, but Alice owns the copyright.  If Goldsmith gave a copy of her photo to Warhol, he owned that copy.  She still owns the copyright.  If he created an infringing derived work then he owned that work itself regardless of who owns the copyright.
Answer: Warhol owns them and has to pay damages
There are a number of remedies but the best for Goldsmith will be an accounting of profits - they get every cent of profit that the works have made. And they can't make any more without permission which would mean a license.
Comment: I don't know why this is being downvoted, because it's true and it addresses future use of the infringing work. Because yeah Goldsmith will really make out if she is awarded profits. Maybe people want you to link to 17 U.S. Code § 504. Or perhaps they don't think that Warhol owns the work, like it's unownable but only Goldsmith can use them?