Use of ./ in running the compiled code

Question: Why do we use ./ before running a compiled code in linux? It does not seem to necessary if I am in a directory higher than the one having compiled code. Let me explain by example. If my code is in /home/uname/code, and I am also in the same directory, I have to use ./a.out. But if I am in /home/uname/ then I can use ./code/a.out. Here I am using ./ but I think it is more to navigate through the directories and not as an indication that it has to run a code. So why do I need to use ./ to run a compiled code if I am in same directory as the code?
Comment: Just because it doesn't seem that anyone has come out and said it directly - `./` doesn't mean run code. `.` is current directory, `..` is parent directory. `./` is current directory, then slash for the directory separator. The program will only run if it is marked executable (`chmod +x`).
Answer: When you issue a command, your shell pulls a trick to make it seem like you can just call the command without specifying its full path. The shell looks for the command in each of the directories listed in the $PATH environment variable, and if it finds it, arranges for the command to be run.
If you want to run a command that is not in one of the directories in $PATH, you have to give the shell a hint where to find the file. In your example case, since /home/uname/code is not in $PATH, you need to give the shell enough path information to be able to find the file you want to execute. This is true whether your current working directory happens to be the directory where the file is located or in any other directory. If you happen to be in the same directory as the file you want to execute, the ./ before the filename is sufficient to tell the shell where to find the file.
Comment: The shell looks in `$PATH` for commands you pass on the command line. If the current working directory is not in the `$PATH`, then the shell will never look in it to resolve a command name. The only way to persuade the shell to run a command in a directory not in `$PATH` is to provide it with enough path information to be able to locate the file. In the current directory, that is `./` The prompt is simply there as a convenience to you, and is not used by the shell to resolve unqualified command names.
Comment: I am sorry I am probably asking you to repeat the same thing but can you please confirm that even if I am in the same directory as the compiled code I am trying to run, it still needs its path to be defined. I can understand necessity to define full path of a programme which is not in the $PATH as it does not know where it could be, but for a compiled code which is in the same directory from which the command is issued, there probably should not be any confusion and _usernam@computername:~/code$_ specifies the path anyway.
Comment: I should note that it's the presence of the slash that triggers a directory lookup instead of a PATH search. Any way you can insert a slash into the program's name is sufficient as long as it resolves to the correct program.
Comment: Ohh did not know about the prompt being there for convenience. Thankyou.
Answer: The input of the shell is always a path to an executable; either absolute or relative. This has to be composed of directory-path/filename. If you only specify an executable file name in your current directory the shell will automatically prefix that string you enter with each of the directories in the $PATH. That is why you always need to enter a path.
BTW, if your code is in /home/uname/code/ and you are in /home/uname/, you don't necessarily need to use ./code/a.outyou can also just use code/a.out because it is also a relative path.
Answer: If which can't find your executable, then your shell won't either.
which ./a.out works, as does which ./code/a.out - they print out the full path to the executable - but not which a.out.
As others have pointed out, it would work if you change your PATH environment variable before calling the relevant program.
e.g. In bash:

[uname@host:/home/uname/code]$ echo $PATH
/usr/bin:/bin
[uname@host:/home/uname/code]$ which a.out
which: no a.out in (/usr/bin:/bin)

[uname@host:/home/uname/code]$ which ./a.out
/home/uname/code/a.out

# add present directory to path
[uname@host:/home/uname/code]$ export PATH="${PWD}:${PATH}"

[uname@host:/home/uname/code]$ echo $PATH
/home/uname/code:/usr/bin:/bin

[uname@host:/home/uname/code]$ which a.out
/home/uname/code/a.out

Use of ./ in running the compiled code


SDK manager doesn't reload

Question: I recently installed the Android SDK on my Windows 8 PC (had it previously on Windows 7 too). Today, when checking for updates, I realised that it is not checking for updates at all. It only shows the packages I have already installed. I want to install some APIs but nothing shows up. Has anyone else got this problem? Is there a way to work around this and get it to update again?
Comment: How to migrate this question then?
Answer: I recently ran into the same problem. Close Eclipse and open the SDK manager from the SDK folder directly. From there try and update.
Using that method I was able to get some updates but not all. I actually had to copy the missing SDK level (17 for me) from a flash drive to trigger the rest of the updates to show up for me.
Edit
After a few days of having the troubles not completely go away I simply delated the entire SDK folder and downloaded it again from Google.
So far everything seems to be working fine.
Comment: I am opening from the SDK folder only not from Eclipse
Answer: Problems connecting to the SDK repository
If you are using the Android SDK Manager to download packages and are encountering connection problems, try connecting over http, rather than https. To switch the protocol used by the Android SDK Manager, follow these steps:
With the Android SDK Manager window open, select "Settings" in the left pane.
On the right, in the "Misc" section, check the checkbox labeled "Force https://... sources to be fetched using http://..."
Click Save & Apply.
Answer: It seems that you had permission issue..
try to run your sdk as administrator
Comment: I don't think his answer was nonconstructive keeping in mind that the question didn't clarify the use of admin rights.
Answer: The problem was Kaspersky blocking the Java exe's from running. Added exception and now it works.

SDK manager doesn't reload


List the number of distinct group homomorphisms from $ \Bbb{Z} / 120 \Bbb{Z} $ to itself.

Question: I have trouble finding how many distinct group homomorphisms there are from $ \Bbb{Z} / 120 \Bbb{Z} $ to itself. Does this have something to do with abelian groups of order $ 120 $? Furthermore, if we view $ \Bbb{Z} / 120 \Bbb{Z} $ as a ring, then is its unit group $ (\Bbb{Z} / 120 \Bbb{Z})^{\times} $ a cyclic group? What is the connection between these questions?
Comment: You seem pretty close to working this out on your own.  Consider where a group homomorphism would send the identity of $\mathbb{Z}/120\mathbb{Z}$, and since $1$ generates the group as "cyclic", the image of $1$ determines everything about the homomorphism.
Comment: As rings, $\mathbb{Z}/120\mathbb{Z}$ is isomorphic to $\mathbb{Z}/8\mathbb{Z} \times \mathbb{Z}/3\mathbb{Z} \times \mathbb{Z}/5 \mathbb{Z}$, and the units of $\mathbb{Z}/120\mathbb{Z}$ is then isomorphic to the product of the units of these three rings.
Answer: Consider a more general problem: finding the endomorphisms of $\def\Z{\mathbb{Z}}\Z/n\Z$, for $n>0$.
Denote by $\pi\colon\Z\to\Z/n\Z$ the canonical projection. If $f\colon\Z/n\Z\to\Z/n\Z$ is a group homomorphism, then $f\circ\pi\colon\Z\to\Z/n\Z$ has a kernel containing $n\Z$; indeed,
$$
f\circ\pi(n)=f(0+n\Z)=0+n\Z
$$
Conversely, if $g\colon\Z\to\Z/n\Z$ is a homomorphism such that $\ker g\supseteq n\Z$, this defines a unique homomorphism $f\colon\Z/n\Z\to\Z/n\Z$ such that $f\circ\pi=g$.
Since $\Z$ is a free group, a homomorphism $g\colon\Z\to\Z/n\Z$ is completely determined by the (arbitrary) image of $1$: $g(z)=zg(1)$.
If $x+n\Z\in\Z/n\Z$, then we can define $g(1)=x+n\Z$ and so $g(z)=zx+n\Z$. Since $g(n)=nx+n\Z=0+n\Z$, we get that any element of $\Z/n\Z$ can be chosen to define $g\colon\Z\to\Z/n\Z$ so that $\ker g\supseteq n\Z$.
Thus the number of endomorphisms of $\Z/n\Z$ is $n$.
Answer: About the group of units, note that if $x$ is relatively prime to $120$, then $x^4\equiv 1\pmod{8}$, and $x^4\equiv 1\pmod{5}$. Also, $x^2\equiv 1\pmod{3}$, so $x^4\equiv 1\pmod{3}$. It follows that $x^4\equiv 1\pmod{120}$. So every element of the group of units has order $4$ or less, while the group of units has order $32$.
Answer: $\DeclareMathOperator\Hom{Hom}\Hom_{\mathbf Z}(\mathbf Z/n\mathbf Z,G)\simeq 0:_G 120\mathbf Z$ for any abelian group $G$. Hence
$$\Hom_{\mathbf Z}(\mathbf Z/120\mathbf Z,\mathbf Z/120\mathbf Z)\simeq 0:_{\mathbf Z/120\mathbf Z} 120\mathbf Z\simeq \mathbf Z/120\mathbf Z.$$
The group of units $\;\bigl(\mathbf Z/n\mathbf Z\bigr)^\times$ is cyclic only in the following cases: $n=2^k\ (k\le 2)$ or $n=p^k\ (p$ odd) or $n=2p^k$. So $\;\bigl(\mathbf Z/120\mathbf Z\bigr)^\times$ is not cyclic.
Finally the connection is that $\;\operatorname{Aut}(\mathbf Z/120\mathbf Z)\simeq \bigl(\mathbf Z/120\mathbf Z\bigr)^\times $.
Answer: $\newcommand{\ZZ}{\mathbb{Z}}$
The key point is that $\ZZ/120\ZZ$ is cyclic. That means that it is generated by one element, namely $1\mod 120$. Certainly defining any homomorphism $\phi$ from $\ZZ/120\ZZ$ to any group $G$ requires knowing where what $\phi(1)$ is in $G$. Since $\ZZ/120\ZZ$ is cyclic, this is actually enough to determine where $\phi$ sends every other element of $\ZZ/120\ZZ$. In your case, setting $G = \ZZ/120\ZZ$, every homomorphism $\phi : \ZZ/120\ZZ\rightarrow\ZZ/120\ZZ$ is uniquely determined by $\phi(1)$.
This is because, if $\phi(1) = n$, then $\phi(2) = \phi(1+1) = \phi(1) + \phi(1) = n + n$. Similarly, $\phi(3) = \phi(1+2) = \phi(1) + \phi(2) = n + n + n$, $\phi(-1) = -\phi(1) = -n$,...etc.
Thus, there are precisely 120 distinct homomorphisms from $\ZZ/120\ZZ$ to itself, corresponding to the 120 possible choices for $\phi(1)$.


"Down in my boots"

Question: May Sarton, an early 20th century poet, wrote in a letter:

"Politically I am down in my boots."

What could she mean? Angry? Frustrated? Disheartened?
Comment: Welcome to ELU!  What does your research show?
Answer: To be phrase "down in [one's] boots" seems to have meant, at one time, "to have lost courage" or "to have felt [one's] spirits sink." Joaquin Miller, The Danites in the Sierras (1881) cites it and kindred expressions as indicating a lack of popular esteem:

"Hasn't got the soul of a chicken!" "Caved in at last!" Gone down in his boots!" "Busted in the snapper!" "Lost his grip!" "Don't dare show his hand!" These and like expressions, thrown out now and then from the little knots of men here and there, were the certain indications that Sandy had lost his place in the hearts of the leading men of the Forks.

And Walter Besant, The Chaplain of the Fleet (1881) has this:

'God bless my soul!' cried the merchant, changing colour so that I for one felt quite certain that his [money] was there too, and that his courage was down in his boots as well, to keep the money company. 'Bless my soul! hanging, mere hanging, is too good for such villains.'

Also common is this wording, from Gilbert Heron, "The Despatches for Gibralter," in The Harmsworth Monthly Pictorial Magazine, volume 1 (1899):

"Oh! The blackguards!" I yelled despairingly, my heart down in my boots again, for the cruiser was now rapidly nearing us.
There was, unfortunately, no chance of our torpedoing her, for our stern-tube had been knocked to atoms by the shell which had come in astern.

The wording was sufficiently common in 1869 that an adviser on proper speaking took the trouble to denounce it. From Robert Philp, "Correct Speaking, Hints on Writing" in Enquire Within upon Everything; to which is added Enquire Within upon Fancy Needlework, 37th edition (1869):

Avoid such phrases as "No great shakes," " Nothing to boast of," "Down in my boots," "Suffering from the blues." All such sentences indicate vulgarity.
Answer: It seems (I only find it in this Chinese resource!) it's a regionalism meaning:
/ be frightened out cf one's wits/go down in one's boots/frightened out of one's senses/

"Down in my boots"


Monitor cpu usage per thread in java?

Question: I would like to ask whether there is some simple way to determine cpu usage per thread in java. Thanks
Answer: I believe the JConsole (archived link) does provide this kind of information through a plugin

It uses ThreadMXBean getThreadCpuTime() function.
Something along the line of:
        long upTime = runtimeProxy.getUptime();
        List<Long> threadCpuTime = new ArrayList<Long>();
        for (int i = 0; i < threadIds.size(); i++) {
            long threadId = threadIds.get(i);
            if (threadId != -1) {
                threadCpuTime.add(threadProxy.getThreadCpuTime(threadId));
            } else {
                threadCpuTime.add(0L);
            }
        }
        int nCPUs = osProxy.getAvailableProcessors();
        List<Float> cpuUsageList = new ArrayList<Float>();
        if (prevUpTime > 0L && upTime > prevUpTime) {
            // elapsedTime is in ms
            long elapsedTime = upTime - prevUpTime;
            for (int i = 0; i < threadIds.size(); i++) {
                // elapsedCpu is in ns
                long elapsedCpu = threadCpuTime.get(i) - prevThreadCpuTime.get(i);
                // cpuUsage could go higher than 100% because elapsedTime
                // and elapsedCpu are not fetched simultaneously. Limit to
                // 99% to avoid Chart showing a scale from 0% to 200%.
                float cpuUsage = Math.min(99F, elapsedCpu / (elapsedTime * 1000000F * nCPUs));
                cpuUsageList.add(cpuUsage);
            }
        }

Comment: Just a note, you might also want to check that CpuTime is enabled in the JVM which you are running. 'threadBean_.isThreadCpuTimeEnabled()' will return boolean value and you can always set it if it is not with 'threadBean_.setThreadCpuTimeEnabled(true)'
Answer: by using  java.lang.management.ThreadMXBean. How to obtain a ThreadMXBean:
 ThreadMXBean tmxb = ManagementFactory.getThreadMXBean();

then you can query how much a specific thread is consuming by using:
 long cpuTime = tmxb.getThreadCpuTime(aThreadID);

Hope it helps.
Comment: getThreadCPUTime is NOT the same as CPU % consumption - CPUTime tells you how much time the thread has used the CPU, not how much of the CPUs resources are being consumed in that moment.
Answer:
Option_1: Code level

In your business logic code; in the beginning call start() API and in the finally block call stop(). So that you will get CPU time for executing your logic by the current running thread. Then log it. Reference.
class CPUTimer
{
    private long _startTime = 0l;

    public void start ()
    {
        _startTime = getCpuTimeInMillis();
    }

    public long stop ()
    {
        long result = (getCpuTimeInMillis() - _startTime);
        _startTime = 0l;
        return result;
    }

    public boolean isRunning ()
    {
        return _startTime != 0l;
    }

    /** thread CPU time in milliseconds. */
    private long getCpuTimeInMillis ()
    {
        ThreadMXBean bean = ManagementFactory.getThreadMXBean();
        return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime()/1000000: 0L;
    }
}

Option_2: Monitor level using plugins (AIX IBM box which don't have jvisualvm support)

If you think it is delay in adding code now, then you can prefer JConsole with plugins support. I followed this article. Download the topthreads jar from that article and run ./jconsole -pluginpath topthreads-1.1.jar

Option_3: Monitor level using TOP (shift H) + JSTACK (Unix machine which has 'Shif+H' support)

Follow this tutorial, where top command will give option to find top CPU thread (nid). Take that check that nid in jstack output file.
Answer: Try the "TopThreads" JConsole plugin. See http://lsd.luminis.nl/top-threads-plugin-for-jconsole/
Comment: Link has rotten, https://arnhem.luminis.eu/new_version_topthreads_jconsole_plugin/
Answer: Though this is platform dependent, I believe what you're looking for is the ThreadMXBean: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/ThreadMXBean.html . You can use the getThreadUserTime method, for example, to get what you need. To check if your platform supports CPU measurement, you can call isThreadCpuTimeSupported() .
Answer: Indeed the object ThreadMXBean provides the functionality you need (however it might not be implemented on all virtual machines).
In JDK 1.5 there was a demo program doing exactly what you need. It was in the folder demo/management and it was called JTop.java
Unfortnately, it's not there in Java6. Maybe you can find at with google or download JDK5.
Answer: My answer to this goes in a different direction.
A a very powerful and transparent way, and also super for production of collection thread CPU statistics is not by having your java program collect it internally, but by having an programing language agnostic approach to do it.
In linux for example, you have the TOP command that has options to collect CPU statistics focused a single java process.
top -bcH -n 1 -p ${theProcesIdYouWantToMonitor}

See: https://man7.org/linux/man-pages/man1/top.1.html

-H, --threads-show
Instructs top to display individual threads.  Without this
command-line option a summation of all threads in each process
is shown.  Later this can be changed with the `H' interactive
command.

Does not get any simpler than that.
If you then use jstack in parallel with a process that monitors CPU utilization per thread then you have the best of both worlds:
(a) You know at a given point in time what your code was doing via jstack thread dumps.
But this only one part of the picture.
This does not tell you who is actually burning your cpu, just what is happening.
If for example your CPU is being burned by garbage colleciton threads you will never know that out of the thread dump.
(b) You pair the jstack time stamp with that of a tool like linux TOP, as shown above.
You need to convert the linux thread id into a an HEX decimal.
And the hex decimal appears in our stack trace.
And there you have it.
Now you know at any point in time that you have sampled, who was burning your cpu and what it was doing. Finally, your strange CPU spiles are explained.
For windows, I have just discovered recently how to do the same.
Here is the reference:
https://xkln.net/blog/analyzing-thread-cpu-utilization-with-processexplorer-powershell-and-wmi/
So here is some code that could be useful to you:
# use the command:
#     Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
# in order to be allowed to run the powerhsell script

# SEE Original script: https://xkln.net/blog/analyzing-thread-cpu-utilization-with-processexplorer-powershell-and-wmi/

# (a) Discover the process we want to be monitoring
$process = ( (Get-WmiObject win32_process -Filter "name like '%java%'") | Where-object  {$_.CommandLine -like "*power*"} )
$processId = $process.processId

# (b) define the folder where we want to write out our staticis
$baseFolterForSamples="C:\dev\apps_standalone\powersheell_threadCpuUtilization\threadCpuSamples"

# (c) Definition of a function that loops forever collecting the thread id of a

    process
    function Get-ThreadProcessorUtilization() {

        Param(
            [Parameter(Mandatory=$true)]
            [int]$ProcId,
            [int]$DurationMs = 2000
        )

        $StatsPrev=$null;
        $ThreadAge = @{L="ThreadAge";E={[Timespan]::FromMilliseconds($_.ElapsedTime).ToString("hh\:mm\:ss")}}
        $ProcUtilization = @{L="ProcUtilization";E={(([Math]::Round(($_.UserModeTime - ($StatsPrev | ? Handle -eq $_.Handle).UserModeTime)/($_.ElapsedTime - ($StatsPrev | ? Handle -eq $_.Handle).ElapsedTime)*100,2)).ToString() + "%")}}

        # Define dome helper loop variables
        $currentItrationNumber = 0
        $previousIterationDateTime = $null

        while ($true) {
            $Stopwatch =  [System.Diagnostics.Stopwatch]::StartNew();
            $Stats = Get-CimInstance Win32_Thread -filter "ProcessHandle = $ProcId" | Select ProcessHandle, Handle, UserModeTime, ElapsedTime | Sort-Object -Property UserModeTime -Descending;

            # create some loop variables that we will use to define the file name into which we want to
            $currentTirationDateTime = $(get-date -f yyyy-MM-dd'T'hh:mm:ss.fff)
            $currentItrationNumberLpadZeros = '{0:d6}' -f $currentItrationNumber
            $currentOutputFileName = "$baseFolterForSamples\ThreadCpuTime_PID_${ProcId}_ItrationNr_$currentItrationNumber.txt"

            if ($StatsPrev -ne $null) {
                # This is the slow statement that is collecting the stats
                $CurrStats = $Stats | Select-Object ProcessHandle, Handle, $ThreadAge, $ProcUtilization
                Clear-Host

                # Write the current statistics into an output file
                $fileHeaderStart = "START Current Itration:  $currentItrationNumber Time Interval Sampled: [$previousIterationDateTime until $currentTirationDateTime]: "
                $fileHeaderEnd = "END Current Itration:  $currentItrationNumber Time Interval Sampled: [$previousIterationDateTime until $currentTirationDateTime]: "
                Write-Output $fileHeaderStart | Out-File -Filepath $currentOutputFileName
                Write-Output $CurrStats | Format-Table -AutoSize | Out-File -Filepath $currentOutputFileName -Append
                Write-Output $fileHeaderEnd | Out-File -Filepath $currentOutputFileName -Append

                # REM Explain what we have just done here:
                echo "Generated sample output file: $currentOutputFileName with stats for CPU thread utilization for time period: [$previousIterationDateTime until $currentTirationDateTime]"
            }
            $statsPrev=$stats
            $Stopwatch.Stop()

            # This value could be coming negative
            # $sleepDuration = $DurationMs-($Stopwatch.ElapsedMilliseconds)
            $sleepDuration = $DurationMs-($Stopwatch.ElapsedMilliseconds)
            $sleepDuration = [Math]::Max($sleepDuration,0)
            [System.Threading.Thread]::Sleep( $sleepDuration )

            # update the counter of curernt iteration
            $currentItrationNumber =  $currentItrationNumber + 1
            $previousIterationDateTime = $currentTirationDateTime
        }
    }

    Get-ThreadProcessorUtilization -ProcId $processId

You will see appearing in the folder:
C:\dev\pps_standalone\powersheell_threadCpuUtilization\threadCpuSamples
The code you see thre is not exactly the same as the one in the reference:
https://xkln.net/blog/analyzing-thread-cpu-utilization-with-processexplorer-powershell-and-wmi/
But it is close enough that you just need to read the reference to understand it.
And this, in my opinion, I was better approach because you apply it to any java project that you have ecounter along the way and manifests CPU spikes performance problems.
You do not a massive infrastructure to do a super high quality analysis. Jstack + Thread Per Cpu is all you need.
If you wish, of course, you can integrate into your big data server elastic server / or whatever  by reading the produced files of jstacks together with thread statistics and pumping them to your big data storage.
Well, the sky is the limit really.
Unfortunately, the graphical user interfaces like the task manager, they are nice to show you here is a spike ... something is somehow not going well. But you will not derive much more than that.
You then need to come down to worth and point your finger:
-> in that interval of time it was that thread that was gobling 50% cpu.
For linux the solution is way similar, you can just google how to get CPU per thread of a process with top command, and there you have the keys to to the ferrari.
So now you know how to do it properly.

Monitor cpu usage per thread in java?


What is a coherent state?

Question: In quantum mechanics, what exactly is a coherent state, and how does it differ from other states?
Answer: A coherent state is a state that is not an energy eigenstate, so the observables vary in time, but the uncertainty of the canonical conjugates (position and momentum) stays constant - unlike, for instance, in an ordinary wave packet moving in free space: this "floats away", the position uncertainty gets ever bigger and bigger.
Comment: @Peter: I don't claim this to be the most important feature - there is no such thing anyway, as there are many equivalent definitions. It's just a description that I consider easy to understand, and it allows this simple counterexample to see what sets "ordinary" states apart from coherent states.
Comment: Did you look at the wikipedia page en.wikipedia.org/wiki/Coherent_state ? Did you look at Qmechanic's comment? Can you justify this being the most important feature of a coherent state to keep in mind when reading something like the Wikipedia entry for someone new to the topic?
Answer: A coherent state isn't the same thing as a squeezed state.
$$a|z\rangle = z|z\rangle$$
is a coherent state.
$$(\alpha x + i\beta p)|z\rangle = z| z \rangle$$
is a squeezed state.
For both, the product of uncertainties is minimized, but the former is more related to the Hamiltonian.

What is a coherent state?


Broken clay drainage pipe

Question: Have a broken clay drainage pipe that just takes water away from the house.  It is near the wye on the bigger clay drainage pipe that where the difficulty is.  So any ideas how to fix it?

E we
Comment: What kind of water? Gray , black, gutter runoff? It looks clean but may affect how I would answer.
Comment: Rain water only
Comment: that corner looks like it was dodgy when it was new,
Answer: Use 5-inch to 4-inch Fernco reducers to fit the OD of the 4-inch clay pipe and connect them to a new length of SD35 PVC pipe. Cut the clay pipe with a masonry blade with a circular saw or angle grinder. A cheap black masonry blade will to the couple of cuts you need no problem.
Answer: With rain water only it is much easier. I am guessing that is 4" inside diameter clay pipe, I would excavate a bit more and cut the bell on the left or dig back to the next section. With both ends open purchase some flexible drainage pipe (commonly used for a French drain). Split the flex and put it over the clay and then cover the end where it is split with plastic. Then backfill and it will be fine for as long as the clay holds up. This is a small job and a heavy duty garbage bag wrapped around the split at rack end will work to keep dirt out. So you cut the end of the flex put it over the clay at each end then cover with the plastic trash wrapping snug at each end or opening. Backfilling with gravel is best but the dirt that was removed can be used for backfill,
If this was for sewer my answer would be much different but rain water it could be even something solid over the break then plastic to keep the dirt out , I have had patches like this last for quite a few years when another section failed and I replaced the entire line.
Comment: Might try it out
Answer: I'd suggest that you have 2 options:
1: If you have scope to build a manhole / inspection chamber over that point on the pipe, you could do that, possibly with little change to the pipe required.
2: Replace the broken pipe. (Note: here, I'm assuming UK practices...) You'll need to expose more of the pipe and obtain new pipe, Y-junction, and couplings. (Also note that the socket pipes pictured are not as available in the UK as they used to be and new pipes tend to be slightly different sizes). There are a couple of different options to accommodate the pipe sizes - bandseal couplings (basically a rubber coupling with Jubilee clips to tighten to fit the pipe) or the propriety couplings to adapt the new pipe to the old size pipe. (To use these, you may need to cut the centre out of the coupling to allow it to slide right over one pipe and back again once the pipes are positioned).
Comment: A manhole sounds like a lot of work to me for a small break like this.
Comment: This is the only place it is broken at.  Difficult to replace the rest of the clay tile pipes.
Comment: Would it be easier to do something about where the bend is near the broken pipe .

Broken clay drainage pipe


Adding Device UDID to XCode

Question: I am familiar with adding the device UDID to the developer portal…I don't want to add ids overthere .Instead of that I would like to add device ID through Xcode…..Is it possible to add devices through Xcode…..
Answer: As far as my knowledge it is not possible.
Answer: no you cant ..but you can buy a developer license for 1 device it cost 15$ (google for it) .. guys often used it to install crack applications without jelly break his device.
Answer: In XCode 4.2, if you open up the 'Organizer' and click your device in the left menu, there is a button in the bottom of the view, saying 'Add to Portal'. I think that does what you want.

Adding Device UDID to XCode


How would one implement Apple iTunes 'Genius' algorithm?

Question: I've always wondered about how and what the best way to go about implementing the 'Genius' feature on iTunes.
I could probably brute force it, but was just wondering if anyone had any insight.
Thanks.
Comment: near duplicate" http://stackoverflow.com/questions/819866/music-analysis-software/819922#819922
Answer: The Genius algorithm is an example of a recommendation system, which is a hot topic in E-commerce systems. So much so that Netflix had a $1 million prize that went on for several years to improve their recommendation system by a mere 10%.
On iTunes you have a collection of music. Genius can make assumptions that if you have this music that you must like it. If enough people have song B that have song A then Genius can say that if you have song A you'll probably like song B.
Just having the song would be a fairly weak recommendation. Better would be if the user had rated that music so you can improve the strength of the "recommendation" on that basis.
I'd highly recommend reading If You Liked This, You're Sure to Love That as a good primer on recommendation systems.
Comment: these books too

http://www.amazon.com/Algorithms-Intelligent-Web-Haralambos-Marmanis/dp/1933988665/

http://www.amazon.com/Collective-Intelligence-Action-Satnam-Alag/dp/1933988312/
Answer: Step1- collect the data, for all the clicks/play per user. That would be lots of data.
Step2- make a ranking/recommendation list generation system. For every song, generate a ranking/priority type list with all the products/songs people are viewing/playing. A simple example say no of people share the same combination or the amount of play time each song is played for.
Step3- keep a limit (say top10) to show your recommendations from the above made list for a song.
This was not so difficult, the trick or the genius lies in adding weights to the list you make in step2. How your recommendation system works with weights (for ex page rank).
I might have disappointed data mining engineers by giving such a naive/simple explanation to extremely complex computer science field. Do pardon me. :)
Answer: Have a look at this, term frequency–inverse document frequency, it's a method that ranks according to what you like, the more "unique" the more effect a liked song has on the recommendations.
Basically, if you only like and play U2, it will be hard for the algorithm/program to recommend something special, which is to your liking.
On the other hand if you are more varied in your iTunes usage, those lesser known bands that you really like will be weighted more, since they isolate you more from the masses.
Answer: Important point: you have to have data from lots of users. You couldn't do this yourself by brute force (unless you mean creating it entirely by hand).


Selenium / WatiN - Automating Embedded IE inside Desktop Application

Question: I am trying to automate functional test of web application that launches in the embedded IE.
I am using white automation framework to reach the point till application opens the web app in embedded IE. I am looking for a way to get the hook to embedded IE , so that i can drive the workflow. How do i do that? I know its not possible thru Selenium /Watin out of the box , let me know other ways to do it.
thanks
J
Answer: Try Autoit. It has pretty functional tool called "window info".


I need help running simple-scan 3.14.0

Question: I have Simple-Scan 3.14.0 downloaded on a Lenovo running Ubuntu 14.04.  Simply put, I can't get it to run.  Where do I begin?  Thanks.
Comment: You can't get it to run how? What have you tried already? What errors are you getting. There is not enough information in your question to give a helpful answer so please add more info about the issue.
Comment: Sorry.  I am beginning to think that I should concentrate on MaxView instead of Simple-Scan.  I imagine that I can run the scanner with MaxView.  However, here is what I get when I try to install.....'Dependency is not satisfiable:libpoppler-qt 4-3(>=0.10)   Error
Answer: Can you find the program in the Dash or the side bar or doesn't it start when you click it?
If you open up the terminal and type the following you will get to the man page of the program with information about the usage:
man simple-scan

(There's also a link for it: http://manpages.ubuntu.com/manpages/trusty/man1/simple-scan.1.html. For more info about man type man man in the terminal.)
If this doesn't work, let us know and give us more detailed info about what works and what doesn't.
Comment: I try to boot from the archive manager icon on the left.  I get something with various options other than scanning.  But let me back up.  I also downloaded MaxView, which I also can't get to run.  If I get MaxView to run, do I even need simple-scan?  Appreciate your feedback.   Hank
Comment: @user314056: Where did you download MaxView? I couldn't find it in the repositories, but I think found it as a download through Sourceforge. Is that correct? Also, does Ubuntu recognize the scanner. Check this Ubuntu page for [supported scanners](https://help.ubuntu.com/community/Scanners).
Comment: Yes, I downloaded MaxView from:   http://sourceforge.net/projects/maxview/    The printer/fax/scanner/copier is a Brother-MFC-9420-CN.   Ubuntu recognizes the printer, but I can't bring the scanner online.  I appreciate your feedback.

I need help running simple-scan 3.14.0


Hopeless with my Areca palms

Question: I've had my two Areca palms for over a year now and must tell you, taking care of them is very difficult but worth it!
I've been receiving advice from the internet and garden centers but right now I have no idea what I am doing wrong.
I water my areca palms once I put a finger in a soil down to 2cm and they feel a bit dump or almost dry. So I don't think I overwatered them. I mist them often as well and there is enough space for water run off.
What worries me is mold in between the palm stamps (not only on the top) so I can't remove it. And my stamps start to rot and get a bit moldy as well. I've been thinking to repot my plans and change the soil.
Anyone has been through the same problem as I do right now?
Thank you in advance for any tricks or advice.
Comment: Mold on an indoor plant is usually too much humidity or not enough airflow or both. An anti-bacterial treatment might help short term.
Answer: That's a lot of palm and not much pot -- after a year the roots could easily have displaced most of the dirt. Every palm I've ever re-potted has done better afterward. If it were mine, I'd pull it out of the pot, trim off any of the really long roots that wrap around the pot more than once, and refill with fresh soil. I wouldn't use standard potting soil -- it is too muddy for palms. I'd either buy palm/cactus potting soil, or mix in some perlite, mulch, or course sand/fine gravel with the standard stuff.
As Tim Nevins mentioned in his comment, too much dampness could be the cause of the mold. I believe your Areca palm can stand a lot more humidity than you can, but lack of airflow could enable the mold to grow. If it's otherwise happy in its current location, I'd leave it there; it's not easy to find a spot indoors that palms like. But if there is anything nearby, maybe I'd move it away just a bit to open up some area near the palm for better airflow. Also, I see more than a dozen stems. I believe your Areca would not mind at all if you cut out a few of those. I know, a lot of people hate to think about killing even one of their little guys, but thinning it out could improve airflow. And it would encourage the remaining stems to grow bigger, giving your palm more of a tree-like shape rather than a bush. Five or ten stems of varying heights can make a very pretty palm. Just something to consider. Cut the stem low, but above ground-level.

Hopeless with my Areca palms


adding property to an existing xcdatamodel crashes Xcode 4.2

Question: I am trying to add a new property/attribute to an existing xcdatamodel and when I do so it always gives me this spinny beach ball spinner and it crashes. Any idea?
Answer: Have you tried restarting the system? When I suffer from XCode hanging, I restart my Mac and it solves the problem.
Comment: I did all that and it still crashes


Inversions of Insertion Sort and Bubble Sort

Question: An array with bubblesort time $\Theta(n)$ is nothing but a sorted array like:
A = 1 2 3 4 5
No swaps are done so only $n - 1$ comparisons.
An array with insertionsort run time  $\Theta(n^2)$ is a reverse sorted array: A = 5 4 3 2 1
Each element is swapped in every iteration.
There cannot be any array that can have IS time as $\Theta(n^2)$ and BS time as $\Theta(n)$.
But how can i prove this in terms of their inversions?
Answer: Let's consider the swaps performed by insertion sort.
In the $i$-th iteration, insertion sort repeatedly swaps the element $x$ originally in $A[i]$ with some element $y$ originally in $A[1:i-1]$ until the subarray $A[1:i]$ is sorted. Then, since we must have $x<y$ for the swap to occur, we have that each swap induces an inversion in the original array. Notice that the $i$-th iteration takes time proportional to $1+s_i$ where $s_i$ is the number of swaps in the iteration.
If follows that insertion sort takes time $O(n+\sum_{i=1}^n s_i) = O(n + s)$, where $s$ is the number of inversions of $A$.
Thus, when insertion sort takes time $\Omega(n^2)$ we must have $s=\Omega(n^2)$.
Finally, notice that at most one inversion can be removed by each swap performed by bubble sort, implying that bubble sort takes time $\Omega(s)=\Omega(n^2)$.


When to use $\sin$ and $\cos$ to find $x$,$y$ components?

Question: I'm having difficulty understanding when to use $\cos$ and $\sin$ to find $x$ and $y$ components of a vector.
Do we always use $\cos$ for $x$-component or what?
Comment: Draw the problem. Find the triangles. See where the angle is (this may involve applying a little Euclidean geometry).
Comment: $\cos$ is always associated with the adjacent side. $\sin$ is always associated with the opposite side. That's all I ever remember, and luckily that's all that's needed.
Answer: It depends on your definition of the angle:

In the picture as drawn, $x$ is $r\cos\alpha$ and $y$ is $r\sin\alpha$. But if I chose a different convention for $x$, $y$ or $\alpha$ I would need a different equation.
Answer: One thing I've found useful is having a mental picture of the $\sin$ and $\cos$ functions. If you draw your vector and split it up into components like so:

and pick your angle $\theta$, then you can vary that angle in your mind and see what happens to the components.
If you let $\theta$ go to zero, all of the vector will be in the x-direction, so taking $F_x = |F| \alpha \hat e_x$ you'll see that we need to set $\alpha = 1$ ($\alpha$ is just a factor that varies between -1 and 1).
So at $\theta = 0$ we have $\alpha = 1$. Now redo this with $\theta = \pi/2$ and you'll see that there is no component in the x-direction, our $\alpha$ will be 0.
We now need to find a function of $\theta$ that returns 1 for $\theta = 0$ and 0 for $\theta = \pi/2$. Looking at this graph

we see that the $\cos(\theta)$ does just that. The x-component of $\vec F$ is therefore given by $F_x = |F| \cos(\theta) \hat e_x$.
By doing the same again but this time watching out what happens to the y-component, we will see that the $\sin$ gives you the right relation between angle and scaling factor.
So, without memorizing SOH CAH TOA or something like that, you can figure out how the components are given.


How to freeze and thaw black eyed peas

Question: I'm considering moving from canned black eyed peas to dry black eyed peas since they're cheaper. I'm thinking of batch boiling them and freezing them but I'm not sure if I could eat them straight after thawing without cooking them again. I usually eat black eyed peas cold as a salad/side dish. Would their texture be good after thawing? And what would be the best way to freeze them - after cooking do I just put them in a tupperware? Thank you so much!
Comment: I've made batches of black bean soup, put it into freezer bags, and then laid them out on sheet pans to freeze.  That thawed out well, but I don't know about just freezing beans as an ingredient.
Comment: I do the same as @Joe but with mixed bean chilli and various stews, all starting from dried beans.
Answer: Beans freeze very well in my experience.  We cook from dried, place extra in quart containers with some of the bean cooking liquor, and freeze.  Thaw slowly in the refrigerator (that helps protect texture).  Use however you like.
Comment: Thank you so much, I will try this
Answer: If you cook them before freezing, they will still be cooked after freezing, so no need to "cook them again" on that basis.
As for texture, the simplest thing to do is try a small batch and see what you think. Freezing does often affect texture somewhat - whether you find the change objectionable is going to be up to you.
Freezing will be more rapid and even if you get the beans into a thin layer, such as the freezer bags laid flat on a pan that @Joe uses for soup. If using tupperware or similar containers, try a large flat one with a thin layer and a deeper one and see if that makes any difference in your assessment of the texture. Usually faster freezing (thin layer) is percieved to be better, but experimenting might show that for your taste it either matters a lot, or not at all. All it costs is a container of beans, that will still be edible, even if the result tells you not to do it that way again.
Comment: I don't know if liquid in the container when freezing is also significant… if nothing else, it minimizes the air so would reduce the chance of freezer burn
Comment: Reasonable to try freezing with/without the liquid. With would also be "more similar" to canned beans. My read of the question is that the intent is short term freezing for meal-prep, not freezing a year's worth of beans at once, so freezer burn may not be a large problem, unless a container gets lost for a long time in the freezer.
Comment: Thank you for sharing this, I'm thinking of trying a small batch yes, but I'm still looking for opinions because I really only like black eyed peas cold in salads so if I don't like the texture of them thawed I will be at a loss on what to do. And yes, I'm planning on short term (3 months max) freezing for easier meal prep.
Comment: If you don't like the frozen/thawed texture, limit the amount you cook to what you will use before it spoils in the refrigerator, unless you want to get into pressure-canning.

How to freeze and thaw black eyed peas


How to force emacs to open a file always as a new frame rather than a new window

Question: Assume that I have already opened a file with emacs. Is it possible to force emacs to re-open that file in another frame when I re-open that file intentionally or a third party program open that file with emacs ?
Answer: Yes. Use C-x 5 f instead of C-x C-f or C-x 4 f. Or set pop-up-frames to t and use C-x 4 f.
If you just want to open the currently visited file in another frame, use C-x 5 2.
Comment: Do you mean to put (setq pop-up-frames t) ?
Comment: Drews, your solution works if I re-open that file from emacs interface, but what if I click on the file in my system (suppose that in my system opening that file is assigned to emacs)? This was my main motivation of this question.
Comment: Dunno - perhaps you need to use `emacsclient` and perhaps it has a switch (option) for opening in a separate frame. You might also need to set `pop-up-frames`. Perhaps someone else can help with that question.


Why the columns of $A$ are linearly dependent set?

Question: If $A_{m\times n}$ is a matrix such that $\sum_{j=1}^n a_{ij}=0$ for each $i=1,2,…,m,$ then why  the columns of $A$ are linearly dependent set, and hence $\operatorname {rank}(A)<n$?
Comment: She tried, @DonAntonio, but was missing braces around subscripts and bounds of summation, making it difficult to make out. Hopefully fixed (there was also some copy and paste inserted in dollar signs, so I'm hoping I got the summation correctly).
Comment: It's hard to understand what you wrote. LaTeXize it.
Comment: @amWhy, thank you for fixing my question, it's exactly what I tried to wrote.
Comment: You're welcome, @Diane. Note that when there is more than one character in a subscript, you need to enclose the subscript in braces. E.g. $A_{m \times n}$ = `A_{m \times n}`
Answer: Hint: the equation that is given actually gives an explicit linear dependence relation between the columns.
Comment: Since I am a pedantic kind of mathematician, I should add: provided that $n>0$, i.e., provided there are any columns at all. For $n=0$ that statement to prove is wrong: no columns makes an (empty) linearly independent set. But you may forget I said that.
Answer: I assume $m=n$ just to make it look good .
we have $\sum_{j=1}^m a_{ij}=0$ for all $1\leq i\leq m$
i..e, $\sum_{j=1}^m a_{1j}+\sum_{j=1}^m a_{2j}+\dots+\sum_{j=1}^m a_{mj}=0$
i.e., $(a_{11}+a_{12}+\dots+a_{1m})+(a_{21}+a_{22}+\dots+a_{2m})+\dots +(a_{m1}+a_{m2}+\dots+a_{mm})=0$
i.e., $(a_{11}+a_{21}+\dots+a_{m1})+(a_{12}+a_{22}+\dots+a_{m2})+\dots +(a_{1m}+a_{2m}+\dots+a_{mm})=0$
Do you see "the next step" would conclude that columns are linearly dependent. (??)
Answer: If $m < n$, then
$$\operatorname{rank} A \le \min \{m,n\} = m < n.$$
Let us now assume that $m \ge n$. Note that
$$A \begin{bmatrix} 1 \\ 1 \\ \vdots \\ 1 \end{bmatrix} = 0_{m \times 1},$$
Aiming for a contradiction, we assume that $A$ if of a full rank (i.e., $\operatorname{rank} A = n$). That means that $A$ has a submatrix $B$ of order $n$ such that $B$ is of a full rank (made of the linearly independent rows in $A$), i.e., $B$ is invertible. We know that
$$B \begin{bmatrix} 1 \\ 1 \\ \vdots \\ 1 \end{bmatrix} = 0_{n \times 1},$$
which is a contradiction with the invertibility of $B$, so $A$ is not of a full rank.


Show that the angle bisectors of angles A, B, C of triangle ABC are the altitudes of triangle DEF.

Question: Triangle ABC is inscribed in a circle $C(O, r )$. The angle bisectors of A, B, and C intersect the circle in D, E, and F
respectively. Show that the angle bisectors of angles A, B, C of $triangle ABC$ are the altitudes of triangle $DEF$.
Comment: Do you understand why the $\alpha,\beta,\gamma$ in $AGE$ are the same angles as the angles labelled so? Do you see why $2\alpha+2\beta+2\gamma=180^\circ$?
Comment: No I'm not to sure why sorry.
Answer: Using the Angle of Intersecting Chords Theorem
Using the Inscribed Angle Theorem, $\overset{\large\frown}{AF}=2\gamma$ and $\overset{\large\frown}{AE}=2\beta$; therefore, $\overset{\large\frown}{EF}=2\beta+2\gamma$. Furthermore, $\overset{\large\frown}{DB}=2\alpha$. Since they are the angles of $\triangle ABC$, $2\alpha+2\beta+2\gamma=\pi$. Therefore, using the Angle of Intersecting Chords Theorem, we get that the angle between $\overline{FD}$ and $\overline{EB}$ is
$$
\begin{align}
\frac12\left(\overset{\large\frown}{EF}+\overset{\large\frown}{DB}\right)
&=\frac12\left(2\beta+2\gamma+2\alpha\right)\\[6pt]
&=\frac\pi2
\end{align}
$$
The other intersections are similar.

Proof of the Angle of Intersecting Chords Theorem

Using the Inscribed Angle Theorem, $\overset{\large\frown}{AB}=2\angle ACB$ and $\overset{\large\frown}{CD}=2\angle CAD$. The Exterior Angle Theorem then says that $\angle AOB=\angle ACB+\angle CAD$.
Therefore, we get the Angle of Intersecting Chords Theorem:
$$
2\angle AOB=\overset{\large\frown}{AB}+\overset{\large\frown}{CD}
$$
Answer: All triangles drawn from a chord will have the same angle where they touch the circumference.
For instance triangles $\triangle AEF$ and $\triangle ACF$ make the angle $\gamma$ at points $E$ and $C$, respectively.
For the same reason
$\angle EAC = \angle EBC = \beta$.
In $\triangle ABC$, the sum of all angles must be $180^{\circ}$. Thus $2(\alpha+\beta+\gamma)=180^{\circ}$ implying $\alpha+\beta+\gamma=90^{\circ}$. Now if you look at the right triangle $\triangle EGA$, $\angle EGA=180^{\circ}-(\alpha+\beta+\gamma)=90^{\circ}$. Thus, $DG \perp EF$.
Similarly, if the intersection points of lines $ED$ and $CF$ are named $M$ and that of $EB$ and $DF$ are named $N$, the result can be proved for the other two bisecting lines by considering the traingles $\triangle EMC$ and $\triangle BDN$.
Answer: In $\triangle DGF$, angles subtended by a common chord in a circle are equal, you will get $\angle DFC=\alpha$ and $\angle CFE=\beta$ and summing them $\angle F=\alpha +\beta$.
Now $\angle ADF=\gamma$ for same reason.
$\Rightarrow$ $180^\circ - (\angle GDF+\angle DFG)=\angle DGF$
$\Rightarrow$ $180^\circ -(\alpha +\beta +\gamma)=\angle DGF=90^\circ$
Similarly all angle bisectors will be perpendiculars for $\triangle DEF$
Answer: Let $I$ be the incenter of $ABC$. It is well know'n that $D$ is a center of circle through $BCI$. The same is valid for $E$ and circle $ACI$. So $CI$ is radical line for circles $BCI$ and $ACI$ so $CI$ is perpendicular to line between their centers i.e. $DE$.
Answer: $$ 2 \alpha + 2 \beta + 2 \gamma = 2 \pi \rightarrow  \alpha + \beta +  \gamma =  \pi $$
Consider $\Delta EAG \, $
$$\angle HGA + \alpha + \beta +  \gamma = 2 \pi \rightarrow\,  \angle HGA  = \pi$$
$$ \angle \, bisector \, AGD  \, is \perp^{r} to \, line \,EGF... $$
So also for altitudes $ EF,BE$ making unlabeled point of congruence incenter of $\Delta ABC$ the same as orthocenter of $ \Delta DEF$.
Answer: (Name the intersection of AB and EF as I)
Join AF
Angle EFA = Beta
Angle BAF = Gamma
By exterior angle property,
Angle GHA = Angle GIA = Beta + Gamma
Angle HAG = Angle IAG = Alpha
From these we can say that Angle AGH = Angle AGI
Also Angle AGH + Angle AGI = 180
Thus, AD is altitude of ∆DEF
Similarly you can show others
(Sorry for not writing symbols)


Store: one click checkout?

Question: Is there a way to configure Store so that it redirects the customer to the checkout page upon adding an item to a shopping cart?
Answer: You can set a return parameter on the product tag to redirect the user to whatever page you want. If your checkout url was example.com/checkout you would have something along the lines of
{exp:store:product return="checkout" entry_id="{entry_id}"}

From the docs

return="path"
This parameter is optional. It will redirect the user to
the specified page after the form is submitted - such as the Checkout
page. If no redirect is specified, the form will display the current
page (useful if you just wish to update a sidebar cart)
Comment: Is it possible to have two `{exp:store:product}` tags within the same channel entry loop? One to be configured for "add to cart" and the other "add to cart and checkout"? How do I provide buttons for both scenarios for each entry?
Comment: While I haven't tested it should be possible you would just need to add 2 separate `{exp:store:product}` tag pairs with different returns paths set and if your products have modifiers those would need to be duplicated to along with quantity of you were wanting to allow users to add more then a single item to the cart. The product tags also could not be nested within each other or it would cause issues

Store: one click checkout?


How can I read and parse a URL's XML or JSON content with C++?

Question: I can easily do this with JQuery or PHP but I have a project for my Intro to C++ class and I thought it'll be pretty cool if I could mix C++ with some APIs like twitter, google, yahoo etc.
Could you tell me if there is a class ( I know OOP ) I can use to read an external XML or JSON file. The program has to run on windows and linux so I can't use commands.
Or, if this can't be done, what other cool project would you do? Thanks in advance.
Answer: XML: xerces(C++) http://xerces.apache.org/xerces-c/
JSON:http://sourceforge.net/projects/jsoncpp/


Anime about a character that is reincarnated after 1,000 years and bathed in an elixir to make him stronger

Question: Anime is about a male main character who is reincarnated after 1,000 years. He crosses a bridge as a test to get into a magical school. He studies and bathes in an elixir which makes him stronger.
Comment: This is a decent overview but it is quite brief. Can you remember anything else that happens in it? Why was he reincarnated? Why does he go to the school? What happens after that? Can you remember when you saw this? If you remember anything else please [edit] those details into your question.
Answer: Could this be Reikenzan: Hoshikuzu-tachi no Utage? The main character is a "time travelled soul" from an earlier time period. He ages normally and then attempts to gain entry to a magic school by crossing a golden bridge.

Long ago in the nine provinces of Kyushu, a calamitous event was
prophesied to take place: falling comets would exhaust the spiritual
energies of both the heavens and the lands and thus bring about an age
of chaos upon the world. But contrary to the prophecy, the comets
passed by with no calamity taking place. At the same time, as if
touched by the phenomenon, a boy was born in a remote village of the
Sokei region by the name of Ouriku.
Twelve years later, as the memories of the event have faded from
people's minds, the Reikenzan clan—one of the five supreme sects of
the nine provinces—decides to hold an examination in order to gather
the most talented individuals fit to become disciples and eventually
sages. Hearing about this news, Ouriku and his servant Ouchou head
toward the site, unaware that the organizer Oubu, despite her elegant
appearance, is infamous for being extremely irresponsible and
carefree; hence, making the trials in the examination unpredictable.
Reikenzan: Hoshikuzu-tachi no Utage follows the story of Ouriku as he
journeys through these trials to become a powerful sage.


Rigourous Treatment of Antenna Theory/Physics

Question: As a rising senior who has finished his QM sequence but not yet done an E&M/optics sequence, but is about to start a research project that will be a large part antenna design and optimization, what are some good references you would recommend I use to learn enough about Antenna physics to get a good enough intuition to start doing design work? Extra points if this reference deals has a good treatment of ultra high frequencies.
Comment: Staelin's **Electromagnetic Waves**, I've used this before, as did a physics course at Cornell, and it was rigorous. A book I haven't read, but downloaded because it looked like I need to read it, is **Electromagnetic Waves and Antennas** by Orfanidis... this might be more for what you what.
Comment: This is old, but probably still well worth a look if you can get it from your library http://www.amazon.com/Antenna-Theory-Inter-University-Electronics-Series/dp/0070117993
Answer: I'm an antenna design engineer, so I'll try to give you some pointers. I'll speak on a widerange of topics and hopefully give you (and others) info on where to start. Feel free to PM me with questions if you have any.

Classical Textbook References
The two most common references for antennas are the Balanis text and Stutzman / Thiele text. These are the standard undergraduate and first year graduate texts covering all of the topics needed to fully understand antennas (radiation, various apertures, wires, basic arrays, computational methods). Also, Balanis has a good advanced EM book.

Antenna Theory: Analysis and Design, 3rd Edition, Constantine
Balanis
Antenna Theory and Design, 2nd Edition, Warren Stutzman & Gary
Thiele
Advanced Engineering Electromagnetics, 2nd edition, Constantine
Balanis

I assume you'll be working in the 100 MHz regime and above. HF isn't something usually found in schools since it's too expensive to do (they're usually HUGE). You can do HAM stuff; the American Radio Relay League (ARRL) has a good practical guide for building antennas

ARRL Antenna Handbook.

It's a good reference to teach you things like building baluns, feeding wires, etc. They also have a handbook for practical electrical engineering topics. All of their stuff is readable, in my opinion, and I've learned many things from them. Just don't expect to find things like UHF patch antenna design with mathematical details.

Online References
Check out the stuff available online. The site Antenna-Theory contains a good practical introduction to all the topics you'd need to know to design. It's written by a PhD from Arizona State who studied under Constantine Balanis. LOTS of good stuff there on all the various types of antennas with some mathematics.
The guy above mentioned Ofanidis's text Electromagnetic Waves and Antennas. Orfanidis is pretty rigorous throughout his theoretical treatment, even including discussions of things like surface waves and plasmons (which requires some exposure to complex analysis). For a free book, it's awesome, but definitely not what I'd recommend as a starting point. He gets rather intense in his equations. However, I do go to him since I find him more rigorous than most sources (likely due to his background as a theoretical physicist who does signal processing).

Fundamental Papers to Read
If you plan on getting into rigorous treatment, there are a handful of papers out there that are absolutely fundamental. I can probably list a thousand of them, but I'll give you a few that will guide you towards theory.

On Diffraction and Radiation of Electromagnetic waves, Schelkunoff. http://dx.doi.org/10.1103/PhysRev.56.308
Diffraction Theory of Electromagnetic Waves, Stratton & Chu. http://dx.doi.org/10.1103/PhysRev.56.99
Physical Limitations of Omni‐Directional Antennas, Chu. http://dx.doi.org/10.1063/1.1715038
A Re-Examination of the Fundamental Limits on the Radiation Q of Electrically Small Antennas, McLean. http://dx.doi.org/10.1109/8.496253
Theory and Experiment of Microstrip Patch Antennas, Y. T. Lo. http://dx.doi.org/10.1109/TAP.1979.1142057
An Improved Theory for Microstrip Antennas and Applications, Richards & Lo. http://dx.doi.org/10.1109/TAP.1981.1142524
Theory of Slots in Rectangular Waveguides, Stevenson. http://dx.doi.org/10.1063/1.1697868
Slot aerials and their relation to complementary wire aerials (Babinet's principle), Booker, http://dx.doi.org/10.1049/ji-3a-1.1946.0150
Matrix methods for field problems, Harrington. http://dx.doi.org/10.1109/PROC.1967.5433

Computational Methods for Electromagnetics
To be a designer today, you have to know how to use computer aided design (CAD) tools. You should familiarize yourself with the modern computational packages, ANSYS High Frequency Structure Simulator, CST Microwave Studio (MWS), and Altair FEKO. MWS and FEKO have free limited use student editions to get you started with design and simulation. Run through the examples to build a patch, wire, and array.
You don't have to fully read up and understand the mathematics of Method of Moments, Finite Difference Time/Freq Domain, and Finite Element Time/Freq Domain. While knowing that will help you design, I know many antenna engineers who've only had a rough treatment but still use HFSS, CST, and FEKO all the time. These are more CAD than anything else. If you're going into industry, knowing these tools gives you an upper hand when looking for a job. However, most if not all antenna engineers have graduate degrees (at least MS but PhD recommended) because the mathematics and physics is far beyond what undergrads do.
Comments on Optimization Techniques
On the topic of genetic algorithms (or optimization in general), just be wary of relying heavily on them in your design practices. The prevalence of computational tools has lead to a huge interest in optimization techniques; however, if you truly understand the physics, the optimization problem can be solved faster by manual tuning. All too often, I open my monthly Transactions on Antennas and Propagation to find something like "novel radiator designed using ". Don't get me wrong; they're useful. I use them all the time, but you shouldn't rely on them over your intuition. Usually, I turn to them to find optimal lengths and locations for things like feed probes as well as impedance matching circuitry.
Answer: I've only really done antennas in undergrad, and the most we really looked at was phased arrays of half wavelength antennas and looking at the resulting field distribution far from the source, so take what I say with a grain of salt.
One interesting thing to look at might be genetic optimization processes for antenna design. I believe that there has been some work in this exact field (creating super efficient antennas that are essentually impossible to design by hand and work very non intuitively), but for a really good example of this process at work in a more general sense, take a look at the wind turbine blades generated in this video and how they out perform standard blades in the context of the simulation:
Evolving Wind Turbine Blades
Anyway, it could make for an interesting project if you have a bunch of time.
Comment: Ah, genetic algoritms. Later on in my pipeline genetic algorithms are going to come into play for optimizing the design but I need to have the intuition to set a reasonably good approximation unless I want the algorithm to take forever to explore a massive breadth of configurations


Why volumio.local was able to access the raspberry since it connected to local network

Question: After setting up volumio on raspberry, an interest feature was that you can use 'volumio.local' as the address to access the webpage hosted by raspberry, and there was not much to worry whether the ip address changed every time the raspberry connected to the local network. I was wondering how did volumio do that and how to setup an custom address for an raspberry to do the same.
Answer: It uses a system called Bonjour, which can locate devices and services on a local network using multicast Domain Name System (mDNS). See this Wikipedia article.


Work done against a resistive force

Question: My past year exam paper had a question about work done against the resistive force, where the answer key said it was resistive force * distance. As I understand it, work done is a measure of impact a force has on an object, but why is the resistive force, which is in the opposite direction of the direction of motion used?
Answer: the resistive force is not "used", it comes on its own
(these forces are found in nature as it is). they are generally unwanted but may be necessary sometimes. The best example is the force of friction. it opposes the objects motion and thus some work done by us to make a body move is dissipated as heat. However it is necessary as else without it we would not be able to move!!!!!. I hope I answered you
Comment: other than friction i cant think of any other resistive force
Answer: The words by or on or against are important in deciding the sign of the work done and what is doing the work.
The applied force does work on the object, equal to the applied force times the distance moved in the direction of the applied force. The effect of this work is to increase the kinetic energy of the object.
At the same time the resistive force is also doing work on the object, in the opposite direction to the motion of the object. This work is the resistive force times the distance moved in the direction of this force. This work is -ve, indicating that the object has done work against the resistive force, ie it has taken energy from the object. It has decreased the kinetic energy of the object.
The work done by the applied force and the work done against the resistive force are not the same thing, and they are not necessarily equal :
Work done by the applied force = net increase in KE of object + work done against resistive force.

Work done against a resistive force


Is there a way (not date) to number photos sequentially.

Question: My regular digital camera assigns numbers sequentially.  My Android 8.0 Galaxy S8+, after the date, assigns random numbers to each picture. If copied to a computer the pics all become "created" at the same time. I'd like them numbered in the sequence taken. Samsung says it's a logarithm naming matter and what I want "can't be done". I don't believe that. It's a computer. Why wouldn't it be able to do it?
Comment: Is it a random number or the time? Ex: 20181102_154430 Being Nov 2, 2018 @ 3:44:30 PM
Comment: "If copied to a computer the pics all become "created" at the same time." That means you use MTP to copy them, right? It's MTP that causes the date being set to "now". To correcting that, and naming them sequentially, there is e.g. `exiftool` you could use on the PC. The correct date is still held in Exif data inside the image files, which is what `exiftool` uses to fix the issue.
Answer: To my knowledge, all digital cameras follow the Design rule for Camera File system (DCF), a Japan Electronics and Information Technology Industries Association JEITA standard (CP-3461B) for digital cameras. This is why your digital camera sequences the photos.
Phones do not necessarily have to follow this standard, since they are not just digital cameras. Phone storage still used the DCIM folder to give a standardized placement for photos, but this does not mean that they photo file names will follow the standard.
As far as phones storing photo with sequential numbers, yes, it is possible that they could do that. It would mean changing how the file names are generated to use a sequencing number instead of the randomly generated number or, in my case with the S9, the use of the time in military format for the second half.


What does the search domain in the network preferences do?

Question: I'm setting up my DNS to go through my employers DNS server and have entered the addresses they provided. They say it's a dynamic DNSSEC provider. I kind of understand this. But I noticed that under the search domains section to the right, there is an entry. What does the search domain for DNS do exactly? I would think my query, would go to the name-server I specified, and they would return the IP. How does this work exactly?
Answer: This has actually been answered in quite a bit of detail over on sister-site superuser.com, here.
Comment: I see... so that's why it defaults to the IP address receiving local traffic on the router every time? Then the router must translate that to a FQDN, and then distributes the responses from the name-server queried by the machines on the network to the appropriate IP addrs in it's routing table... :) Bang! My apologies for my lack of googling and sincere thanks for pointing me to a clear explanation.
Comment: What that site doesn't answer, which might be more appropriate on the Apple-specific site here, is where that info gets stored in the Directory system on OS X (if that's where it goes) and how to query it from e.g. the command line.


When does Yahoo finance updates the info on the stocks?

Question: I'm not wondering when does the price of the stock gets updated. I'm wondering when does Yahoo finance updates information like p/e ratios, price estimates, gross profits, free cash flows, etc. I'm wondering about the detail information of the company's balance sheet and the likes?
Answer: From the information I found here it seems that Yahoo Finance updates all the data in real-time. They get the information from other sources thought, so Yahoo receives updates as soon as the sources upload them.
Keep in mind that some of the informations change periodically, because they are based on data that is calculated every X months, for example the p/e ratios you where asking about:

Share prices change on a daily basis and new earnings figures are
released every three months. As a result, a company's P/E ratio will
change constantly.

Source: Yahoo Finance
Comment: That's what i was wondering about, at what time of the month does yahoo updates the balance sheets and p/e ratios of the companies


Why does the Black Lives Matter movement organize protests while the incident they're protesting is still under investigation?

Question: Black Lives Matter is an American social justice movement which seeks to remedy the problem of extrajudicial killings of people of color by police officers among other issues. One aspect of this movement, that I found interesting was that they usually start demonstrating before the police department in question has had a chance to review the facts of the shooting and take any disciplinary or legal actions against the officer responsible.
For example, on July 6 2016, the world saw a video of Philando Castile after he was shot 4 times by a police officer. In the video, his girlfriend narrates, describing a horrific miscarriage of justice. She claims Mr. Castile was pulled over for a traffic stop and after announcing that he had a legal firearm with a concealed carry permit and reaching for his wallet, he was shot 4 times. Later that day he died. Immediately following, and in reaction to another fatal shooting, Black Lives Matter organizers set up protests throughout the country.
Meanwhile, another organization which champions the rights of concealed carry permit holders, the NRA, released a statement saying "The reports from Minnesota are troubling and must be thoroughly investigated, in the meantime, it is important for the NRA not to comment while the investigation is ongoing."
What are the reasons the Black Lives Matter movement members use to explain why they protest while investigations are pending; rather than waiting until law enforcement has had a chance to investigate, release relevant information, and punish officers who have broken the law or violated police procedure? I understand that there is no formalized platform of the grassroots Black Lives Matter movement, but I think prominent members, organizers, or reporters who have spoken to many members will be good enough sources to get a sense of the reasoning behind this decision.
Comment: The point of protesting before/during the investigation is to signal to those investigating and to the public that this is a big deal not to be swept under the rug.  If inactive stakeholders are sitting dormant then the investigators may think (perhaps correctly) that the public doesn't care and is ready to sweep it under the rug.
Comment: A movement that condemns the whole system as being unjust does not believe that the investigation will be accurate or just or provide the answers and accountability protesters seek, without the protests.  Plus, there are demonstrations (e.g. Walter Scott) of what kind of cover-up reports come out of these investigations when people aren't protesting to demand accountability and answers, and how that devalues the lives of the people who were killed.
Comment: Note that an investigations ultimate aim is to make a **legal** decision as to who is at fault and attempt to make harmed parties whole - again, in a legal sense only. But the BLM movements aim is to call attention to a broken system that causes the harm in the first place and fix that. The latter would have no reason for existing if the former worked effectively, and thus it's only logical to not need to wait on the legal a system to take its course before acting.
Comment: Despite all the answers in this thread, the biggest reason is that BLM just isn't organized. There's nobody calling the shots. If you want to stage a BLM protest, you're free to do so. You don't need approval. There's no concept of "membership".
Comment: `...it is important for the NRA not to comment...` Any idea what comment the NRA could possibly make in this case? Of course, the NRA has previously protested before investigations have completed when circumstances conflicted with NRA goals. Being much better financed and better connected, they tend to [go quickly to court](https://en.wikipedia.org/wiki/Criticism_of_government_response_to_Hurricane_Katrina#Confiscation_of_civilian_firearms) for their protests. And NRA lack of protests? See [When the NRA Opposed Open Carry](https://reason.com/blog/2014/06/17/when-the-nra-opposed-open-carry).
Comment: Due to people living in different bubbles and disbelieving anything not coming from their own bubble, no matter how justified a polic killing is (for example, a suspect drawing a gun on policemen), at least *some* part of the public will circulate it as the unarmed person begging for his life on his knees before the police shot him. No matter what the investigation concludes, there will be people on one side or the other who will claim it as a conspiracy.
Comment: Related question: ["Why has the shooting of Laquan McDonald become a focal point of protest and media attention?"](http://politics.stackexchange.com/questions/9400/why-has-the-shooting-of-laquan-mcdonald-become-a-focal-point-of-protest-and-medi/)
Comment: @user2338816: well, for example they *could* comment "it is outrageous that a citizen be shot by a police officer as a reaction to that officer encountering a legally and safely-carried firearm. Such reactions from the police are a serious threat to 2nd Amendment rights". This would be a bad move for them for a whole raft of reasons, including that it assumes the outcome of the investigation where the NRA as an organisation wishes to show a deal of deference to that process. But it's an option available to them ;-)
Comment: Strategy aside, a group doesn't always have to stop what they're doing if they're under investigation. Many police departments around the country are under investigation but are still active. "Innocent until proven guilty" is important here, but like others have said, Black Lives Matter isn't necessarily organized in a hierarchical sense and there is no central, absolute decision-making platform. So even if one of the respected members were to say "let's stop protesting"  there's no way to force others to listen.
Comment: @SteveJessop I suppose. But wouldn't they then also have to do the same whenever a white/Asian/Hispanic/other was killed by police? (Would a week go by without a protest by them? Their fundamental message could get lost.) (Oh, wait... isn't part of their message about self-protection from government agencies?))
Comment: @user2338816: If it was happening once a week that a person of any race was apparently killed by police as soon as they spotted a legal firearm with no (other) provocation then yeah, I suppose the NRA would want that issue to be constantly visible and it would become part of their fundamental message, that it's all very well something being legal but if the cops decide to just shoot you for doing it then that's still quite the restriction on your exercise of the right. But I doubt the NRA really does see that pattern weekly, so there's no such motive to highlight it.
Comment: So what I meant was, Castile's case does *potentially* relate to the NRA's core mission. You asked what the NRA could possibly say: they could say what it is that makes it "troubling" in respect of their core mission. If they're not going to do that because they're confident to wait for an investigation (or, you know, because they think he wasn't killed because of any systematic bias in the police against those who exercise 2nd Amendment rights), then it makes sense to issue a "no comment" statement given that the case seems relevant to their mission.
Comment: @SteveJessop Perhaps. But it's easy enough [to find 16 **unarmed** Latinos shot/killed by police in 2015](http://tinyurl.com/hw3po95). That by itself is a chunk out of 52 weeks. Of the perhaps 89 other Latinos that probably were armed, we might find a couple in circumstances similar to some shootings of protested blacks. And there were a number of whites killed as simple searches show. I suspect that Asians had a few, and maybe a native American or Arabic, Persian, etc. One a week doesn't seem too far fetched, though I haven't looked much beyond Latinos plus a basic 'white' search.
Comment: @SteveJessop And note that the tally of 16 Latinos in 2015 was made only in August, 2015. More might be found later that year.
Answer: The Black Lives Matter campaign is predicated on the position that people of color are met disproportionately with death or other mistreatment at the hands of law enforcement, and that this phenomena is enabled by generalized cultural under-valuation of Black lives. The complex is not merely in that the cops themselves are belligerent or apathetic or whatever, but that society as a whole is unconcerned with improving on the status quo, and therefore fails to subject the establishments of law enforcement with the scrutiny and interest necessary to make any changes.
So the notion of waiting to see what nuances the investigation turns up is rather beside the point, isn't it? Taciturn proceduralism is how events like these retain their mundanity and become the accepted order of the day. Philando Castile's Life Mattered, as they say, so you ought to be furious to see it ended in such a way! You shouldn't be waiting for further details, you should be rabidly demanding answers. How did this happen? Why did this happen? Explain all the factors which could have possibly contributed to this tragedy and justify why greater efforts aren't being taken to change them. That's what they're saying, at those protests.
Make no mistake, the circumstances around the flashpoint event in this case were almost perfect (in a sickening way): Mr. Castile's seeming benignity, the shocking depiction of his death rattle, and the superhuman calm and respect with which his girlfriend handled herself even in the midst of the officer brandishing his weapon and apparently slipping into hysteria. These characteristics make it easy to sympathize and to rally to the moral high-ground, and those features are certainly very important as the foundations of an effective activist campaign. There is an ugly reactionary impulse which searches for mitigating circumstances and weaknesses in the victim's character to write off events such as these, and in this case it looks like it's gonna be pretty tough outside of some kind of discovery in the investigation.
But, while it's certainly possible that something might come to light that moves the late Mr. Castile a little less beyond reproach, it really shouldn't be a matter of concern. The outrage, here, is not that a saint was killed, but that a person was. You've heard people bitching about the Black Lives Matter moniker and making the counterpoint that All Lives Matter, right? Well, yeah, that's actually the entire point. The precise details of this anecdote are irrelevant beyond the fact that a guy started the day with a burnt-out light bulb and ended it in a bloodbath. A person can go from A to B while acting entirely within the realm of reasonable and benign human behavior, and since that is clearly not a standard of conduct which people should be required to surpass just to avoid being slaughtered, something else has gotta change. The protesters have gathered to say: find that thing and change it, now.
Comment: I think this is a very good explanation of the general reasoning behind the Black Lives Matter movement. The reason that the "Blue Lives Matter" and the "All Lives Matter" responses exist is because a few people within the Black Lives Matter movement take their frustration to an extreme and attack police. This should be decried just as strongly as police going out of their way to attack Blacks.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/42441/discussion-on-answer-by-eikre-why-does-the-black-lives-matter-movement-organize).
Answer: I don't know their actual reasons, but I can offer two valid reasons:

Right now the horror of that event and video is fresh on everyone's mind. Protests held now have the maximum exposure and most chance of making people realize there is something systemically wrong, that it's not just an unfortunate incident. The main focus is not punishing those responsible, but effecting change in the entire way police forces approach black men specifically.
There is a higher chance that the people in charge feel pressured to make real work of the investigation they are promising in front of cameras right now, in response to the protests and unrest. If nobody protested, they would feel more free to let the incident fade from memory and then let the officers off with a warning or reprimand in a few months or a year, citing "lack of evidence" and signaling to other police officers that they can literally get away with killing (if the victim is black).
Answer: Three key reasons:

To influence the investigation. The position of BLM is that these incidents have been swept under the rug and ignored for decades. Waiting in the hopes that someone will care has not worked so far and it doesn't seem to be a strategy worth trying.
To draw attention to a problem that transcends a single event. Six months from now, people will barely remember this incident and any attempt to use it to draw attention will not be news and will face legitimate complaints of "dragging up the same old stories".
To get some healing in the families and the communities. Wounds won't wait for months, and these issues hurt. Making it clear that these lives matter and that people aren't dying for nothing helps make these tragedies more bearable.
Comment: Good answer for pointing out that individuals who may not trust law enforcement (rightly or wrongly) may not be inclined to wait to see what they have to say on the matter when video evidence (especially when taken out of context) paints a pretty bleak picture.
Comment: @jefflambert Do you seriously believe there is *any* kind of context that would make kneeling on the neck of an unarmed, non-resisting man who is *begging for his life* for *nine minutes* until he finally suffocates any less "bleak"?
Comment: @Shadur Nope. But that context didn't exist in 2016. Plenty of video however is being produced daily right now that is going to be shaped for our consumption by all sorts of people with all sorts of agendas. Just take a look at the President's church photo op produced yesterday, gained only after the gassing of peaceful protesters.
Answer: Why do they protest early, when the NRA withholds judgement?
I think the paradigm that best explains it is the risk/reward pay-off. Here is the relevant pay-off matrix (further explained below):
<code>                 NRA      BLM
act    risk      high     low
       reward    low      high
wait   risk      low      high
       reward    ?        low
</code>
This analysis explains this question, without digging into the subtle nuances of what particular groups usually support what.
The NRA
The NRA has a lot to lose if they back someone who turns out to be unfavorable. Thus the risks of rushing to defend someone who claims to be victimized is pretty high.
The NRA already has a lot of support. They are considered leaders on the 2nd amendment. Their reward for jumping on an issue that turns out to be a loser, would probably cost them a lot of supporters.
They would also not likely gain new supporters by jumping on a new story early.
So the reward aspect would be low.
As a result, it would be foolish for a rational NRA to jump on this bandwagon until it is completely clear that the claims of victimhood are real.
NRA's support of law enforcement
The history of the NRA's association with law enforcement is also relevant, but including it in the analysis of answering this question is unnecessary to come to the conclusion that we have. However, this political alignment would further explain the NRA's reticence to support the complainant against the police.
BLM
BLM does not have the same base of support that the NRA does. It is fairly new. I'm not sure whether it is well-organized or not, however, this is irrelevant to the conclusion that they should be expected to rush to judgement.
Assuming it is well organized
If they wait too long, they risk getting preempted for leadership by another organization. This hypothetical organization may not want to cooperate with them (share in press releases, headlines, etc.).
Also, the earlier they protest, the more likely that they may get a reaction formation - i.e. people that they target politically may choose to take a more extreme position against them - which will benefit them in terms of gaining followers and support.
Assuming not well organized
If it is not well organized, then there are likely fewer restraints on it. Perhaps any impulsive member could declare a rally, meeting, demonstration, etc.
In which case, they probably don't care enough about the risks of being wrong to let that guide their decision making.
Conclusion
The NRA is a very old organization, while BLM is very new. The NRA has a lot to lose if it is wrong. BLM has little to lose.
Comment: Culturally, the NRA is a "law & order" group, supported by many cops; to criticize police action (other than, y'know, seizing guns) goes against its grain.
Comment: "NRA withholds judgement" should probably be "NRA withholds comment."
Answer: Part of the problem is a double standard.  As if the deference traditionally given to officers' unsupported testimony were not enough, many jurisdictions have a "Police Officer's Bill of Rights" providing that an officer in Yanez's position has at least a few days to examine the evidence and rehearse his version of events before any questioning.  But supposing Yanez (Yáñez?) had been shot and killed while breaking into Castile's home at midnight, I for one would not expect the police to say "It would be premature to draw any conclusions before investigation is complete"; I'd bet on the chief to call it capital murder at a press conference the same day.
BLM aren't interested in "we're investigating and we'll get back to you as soon as we determine how our brother officer did absolutely nothing wrong."
Comment: I believe he may even have 30 days to make a deposition.
Comment: I believe it varies from place to place.
Answer: This question is, of course, politically charged, but let me try to give a neutral answer.
There are very legitimate reasons to not wait until an investigation is complete.
First, if you believe that the government is corrupt or biased, then you have no reason to believe that an investigation will be honest. Why bother waiting for a report that you know is just going to be a whitewash of a guilty person? Perhaps you are convinced that the important, relevant facts are already known, and an investigation is just a stalling tactic. Which leads me to ...
Second, when government officials are caught engaging in illegal or inappropriate behavior, a viable tactic is to announce an investigation, drag it out until other events in the news have taken over the public's attention, and then release a report that is as boring and equivocating as possible so that it will attract little attention. You drag the investigation out for months or years, and then when anyone tries to protest the original event, you piously declare, "it's not appropriate to comment until after the investigation is complete". Eventually you issue the report and declare that "mistakes were made" and give recommendations for new policies or regulations, carefully avoiding holding anyone responsible. If the situation is still hot, announce that the committee was deadlocked or otherwise unable to come to conclusions, and so a new investigation is required. Spend a lot of time debating how the new investigation should be conducted. If you're lucky, you may get away with just letting the matter drop. If not, you start the clock over on "you're not allowed to comment because it's still under investigation".
There is at least one very not-legitimate reason to protest before any investigation: If you don't really care about the facts of the case. You believe that your group is persecuted. You find a dramatic example. If it turns out that this person really brought his problems on himself, you don't care because there are so many other cases where a member of your group was persecuted for no good reason. You're not protesting for this one person; you're protesting for the group. The individual person involved is just a mascot to represent the grievance of the group.
To people involved, this often sounds reasonable: we know our group is persecuted. If this person turns out to not be a good example, that doesn't prove that we're not persecuted because there are so many other good examples. The catch, of course, is that if many of your examples prove to be bad examples, you're left with little or no evidence to back up the original claim.
In the absolute worst case, you're not organizing a protest because you care about any injustice, but because you want to draw attention to yourself and make yourself politically powerful (in one sense or another).
Answer: I think they are not protesting mainly for prosecution. Of course they want justice too but their primary goal is to draw attention to racism in the public authorities. In that sense the result of the investigation does not matter.
Answer: Zachary Hammond's case demonstrates the alternative.  An unarmed teen was shot while driving away from police, by an officer who was running up to the side of the car and claimed he thought the driver was trying to run him over, though the autopsy results and eventually the dashcam footage indicated otherwise.
There were no protests in the street; it was primarily the boy's parents trying to get the video out. Police refused to turn over the dashcam footage until the investigation concluded months later with the conclusion that this killing broke no laws and no charges would be brought.  By that time, the City Administrator also released a statement saying it was time to move on from Hammond's death, because the three months they took for the investigation had been hard enough and anyone who disagreed with that use of force was not a member of the community:

The past three months have been extremely difficult for the residents of Seneca, its city employees and the 45 members of its police force. While the effects of outside agitators to tear apart our community lingers, we are thankful the investigation has come to an end and shows Lt. Tiller was acting in self-defense.

Had there been protests in the street and political pressure for some accountability, there might have been more accountability, such as earlier release of evidence or real changes that hold officers accountable for tactics that very quickly put them in situations where they can claim they perceived enough danger to apply an instant death penalty for failure to follow orders.  That's the kind of accountability BLM seeks (at least) and history shows that waiting for the end of an investigation before protesting to demand it is not likely to be the most effective strategy.
Answer: For starters, they are not protesting a single event. They are protesting a systemic problem--of which these recent events are examples of.
Secondly, there's a lot of evidence out there right now. Given the systemic problem, the evidence that is available now, it seems like an appropriate time to question via protest.
Could further evidence bring a different perspective to these two particular events? Certainly. But to wait weeks if not months to protest would weaken the entire point of the protest to begin with. The public has short attention spans.
Answer: Why do people hold funerals rather than waiting for the biographical investigation to determine whether the person was worthy of a funeral?
The point of Black Lives Matter is that the lives of black people matter. Therefore, when a black life is ended, it is a tragedy. When a life is ended deliberately by police, it is an outrage.
The protests don't wait for investigations because they have completely lost faith in investigations. When was the last time a police officer was jailed for murdering a suspect? It happens far too rarely compared to the number and severity of incidents.
It is possible to run a police service that shoots people far less often than the US. Most of Europe manages it. US police kill as many people as 9/11 every couple of years, the majority of whom are black. If that mattered, then something would be done about it. Because nothing is done to improve this, it is taken as an assertion that the lives lost don't matter.
Investigation into the victim is irrelevant, because the principle of lives mattering per se is important here. It doesn't actually matter what someone has done or how they behaved, they don't deserve to die. This is a very human rights line of thinking, whereas a lot of America still holds some kind of belief that human life is inherently worthless and only gains value through virtue. Conversely, the moment someone transgresses, or appears like they might be about to, it's OK to shoot them dead.
Comment: _the majority of whom are black_  Citation doesn't exit. _Protestant belief that human life is inherently worthless_ Citation doesn't exist.
Comment: @deworde I think your stats are off. [The US population is ~12% black](https://en.wikipedia.org/wiki/Demography_of_the_United_States#Race_and_ethnicity), and at least in 2015 [among all people killed by police around 25% were black](http://newobserveronline.com/far-more-whites-killed-by-us-police/). This doesn't disprove your point, just  a point of information.
Comment: @pjc50 Probably want to add that link into your answer, and tweak it from "the majority" to "disproportionately", because it's still only 15% of all deaths, it's just that that's staggeringly high for a population that's only 2% of the citizenship.
Comment: @lazarusL Ah, I was going off the link, which on closer inspection focuses on a subset of the AA population. As you say, the additional information doesn't particularly weaken the high-level conclusion.
Comment: https://www.theguardian.com/us-news/2015/dec/31/the-counted-police-killings-2015-young-black-men "Final total of people killed by US police officers in 2015 shows rate of death for young black men was five times higher than white men of the same age"
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/42440/discussion-on-answer-by-pjc50-why-does-the-black-lives-matter-movement-organize).


Selecting a single column from all rows for chart range

Question: I want to specify a certain column from all rows (omitting the first few) to be the range for my chart. Currently I input this to specify the range: L6:L (note: this automatically changes to L6:L20 once I click "Update" in the chart data, 20 is the number of rows I have). However, as time goes on, I will be adding rows above row 6 with new data. That is to say, all the current rows will be shifted down by one and there will be new data in row 6. So now the chart should automatically update with the new data point (i.e. the range should be L6:L21). However, this doesn't happen because the range automatically changes to L7:L21. I've tried using L$6:L (and even L$6:$L) to specify the range but the same thing happens.
Answer: This issue can be avoided by including a header row (5th in your case) in the range of the chart. Then the new data points added at the beginning of the data series will be inserted between 5th and 6th row, so the reference L5:L20 will become L5:L21, etc.