How can we compute the gradient of max pooling with overlapping regions?

Question: While studying backpropagation in CNNs, I can't understand how can we compute the gradient of max pooling with overlapping regions.
That's also a question from this quiz and can be also found on this book.
Answer: When gradients in a neural network can follow multiple paths to same parameter, the different gradient values from the sources can often be added together, because the operations in the forward direction are also sums and $\frac{d}{dx}(y+z) = \frac{dy}{dx} + \frac{dz}{dx}$.
That is the case already with gradients of kernels (which are sums over the image area), and is equally the case for overlapping aggregation, including maximums, minimums or averages.
So in the 1d case, if you have a max pool over the input params $[a_0, a_1, a_2, a_3, a_4]$ a max function $m_0 = max(a_0, a_1, a_2)$, $m_1 = max(a_2, a_3, a_4)$ which overlap at $a_2$, and gradients $\nabla_{\mathbf{m}} J = [\frac{\partial J}{\partial m_0}, \frac{\partial J}{\partial m_1}]$, then you would allocate those gradients to vector $\mathbf{a}$ according to which items in each group was the max of that group, adding them when they overlapped.
Examples:
If $\mathbf{a} = [3,0,1,2,0]$ and  $\nabla_{\mathbf{m}}J = [0.7, 0.9]$, then $\nabla_{\mathbf{a}}J = [0.7, 0, 0, 0.9, 0]$
If $\mathbf{a} = [3,0,4,2,0]$ and  $\nabla_{\mathbf{m}}J = [0.7, 0.9]$, then $\nabla_{\mathbf{a}}J = [0, 0, 1.6, 0, 0]$
Answer: Denote x(h,w) input to max-pooling, and y(h,w) - output.
Then $\frac{dL}{dx}(h,w)= \sum \frac{dL}{dy}(h',w')$
over all y(h',w') which have been obtained  from x(h.w) such that y(h',w') = x(h,w).
related to this p 11
Comment: So this is the same answer as mine (add the gradients when they overlap), but for the 2D case.


Unable to boot into Zorin OS - ending in BusyBox

Question: I'm running Zorin OS 12.2 (downloaded and installed in September 27th this year) on a Dell XPS 13. I installed Zorin instead of the pre-installed Windows 10 (I'm aware that Dell XPS ships with Ubuntu pre-installed, but the one I have was ordered bulk via my workplace).
For the past six days the system has been unable to boot. I end up in BusyBox (v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1)) with an initramfs prompt. In the BIOS it lists Windows Boot Manager (twice). I wonder if I did something wrong when I installed Zorin, as I thought I got completely rid of Windows.
I suspect that the error (that causes me to end up in BusyBox) stems from me sometimes had to force-shut down my laptop because the screen would not turn on after the laptop had been folded together, or after I had accidentally pushed the power button (which just turns on the screen on my other laptop if it's been idle for a while and has turned off the screen). At least it appears that Zorin can't handle my laptop being treated like the hybrid PC it was built to be. This could have nothing to do with the problem, but the problem arose when I turned the computer on after (yet again) having had to force-shut down becuase I pressed the power button to turn the screen back on.
I tried booting into Zorin with Linux 4.10.0-38 (and 37 and 33) via "Advanced options for Zorin GNU/Linux", instead of 4.10.0-40 which is listed first, but the same thing happens. I also tried booting 4.10.0-40 in recovery mode, but that doesn't make a difference either.
I've tried running Boot Repair (https://help.ubuntu.com/community/Boot-Repair) from the live USB. The output is located here: http://pastebin.ubuntu.com/26155667/.
I tried following a bunch of suggestions from askubuntu and ubuntuforums:

https://ubuntuforums.org/showthread.php?t=1561735
https://askubuntu.com/questions/516217/alert-dev-disk-by-uuid-xxxxxxxxx-does-not-exist-dropping-to-a-shell - was unable to do this. See Screenshot.
https://askubuntu.com/questions/137655/boot-drops-to-a-initramfs-prompts-busybox
https://ubuntuforums.org/showthread.php?t=1018403
https://ubuntuforums.org/showthread.php?t=2112153 (Couldn't try out the suggestions from ahallubuntu since I can only see the live USB and not the laptop's drive when accessing via the live USB. Didn't try the other solutions as they all specifically talked about encrypted drives and I didn't encrypt my drive.)
https://ubuntuforums.org/showthread.php?t=765195&page=33&p=6581939#post6581939 (via link from source 4)

Writing "exit" as suggested in source 3, I get:
Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules: is /dev)
ALERT! UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX does not exist. Dropping to a shell!

When trying fsck /dev/sda1 (cf. source 3), I get the message:
fsck from util-linux 2.27.1
fsck: error 2 (No such file or directory) while executing fsck.ext2 for dev/sda1

I also tried with sda2 which gave the same result.
When trying Amith KK's suggestion in source 3, I get nothing with the first line:
zorin@zoring:~$ sudo fdisk -l|grep Linux|grep -Ev 'swap'
zorin@zoring:~$

uname -a (cf. source 4) gives me:
Linux (none) 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 GNU/Linux

I tried the solution suggested by quixote in source 1, but it doesn't show me any files like he suggests it would:
grub> ls
(hd0) (hd0,gpt3)  (hd0,gpt2)  (hd0,gpt1)
grub> ls (hd0,3)
    Partition hd0,3: Filesystem type ext* - Last modification time 2017-12-04 Monday, UUID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - Partition start at 8705024KiB - Total size 419690496KiB
grub> ls (hd0,2)
    Partition hd0,2: No known filesystem detected - Partition start at 513024KiB - Total size 8192000KiB
grub> ls (hd0,1)
    Partition hd0,1: Filesystem type fat, UUID YYYY-YYYY - Partition start at 1024KiB - Total size 512000KiB
grub> ls (hd0)
    Device hd0: No known filesystem detected - Sector size 512B - Total size 500107608KiB

I also tried using blkid as hhoyt suggests in source 1, but like with source 5 it doesn't look like it shows anything other than the live USB. I get:
root@zorin:~# blkid
/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="ZZZZ-ZZ-ZZ-ZZ-ZZ-ZZ-ZZ" LABEL="Zorin OS 12.2 Core" TYPE="iso9660" PTUUID="239ad0b8" PTTYPE="dos" PARTUUID="239ad0b8-01"
/dev/sda2: SEC_TYPE="msdos" UUID="398E-230F" TYPE="vfat" PARTUUID="239ad0b8-02"

... which looks very similar to the output I get from trying the solution in source 2. If I try sudo mount /dev/sda1 /mnt I get /dev/sda1 is already mounted or /mnt busy.
Adding all_generic_ide to the kernel boot parameter, as suggested in source 6 (I didn't have a line starting with kernel but instead had a very similar one starting with Linux and tried that one), didn't help .
Does anyone have an idea what could be wrong and how/if I could fix it? (e.g. from looking at the Boot Repair output at http://pastebin.ubuntu.com/26155667/)?
Answer: blkid is only seeing the USB drive at /dev/sda.
Your laptop's HDD/SSD is not working.
It is likely dead to hardware failure.
You will most likely need to replace it.
I hope your backups are recent and working.
Comment: Thanks for your answer. Fortunately I use cloud storage for pretty much everything. It's just very bothersome to have to set up the entire system again. This might sound stupid, but is there any way to make sure that it's the SSD that's dead and not some other issue that's causing this?
Comment: @Idall You can try removing the drive and connecting it to another computer to see if it still works.


Understanding convolutional layers shapes

Question: I've been reading about convolutional nets and I've programmed a few models myself. When I see visual diagrams of other models it shows each layer being smaller and deeper than the last ones. Layers have three dimensions like 256x256x32. What is this third number? I assume the first two numbers are the number of nodes but I don't know what the depth is.
Answer: TLDR; 256x256x32 refers to the layer's output shape rather than the layer itself.

There are many articles and posts out there explaining how convolution layers work. I'll try to answer your question without going into too many details, just focusing on shapes.
Assuming you are working with 2D convolution layers, your input and output will both be three-dimensional. That is, without considering the batch which would correspond to a 4th axis... Therefore, the shape of a convolution layer input will be (c, h, w) (or (h, w, c) depending on the framework) where c is the number of channels, h is the width of the input and w the width. You can see it as a c-channel hxw image.
The most intuitive example of such input is the input of the first convolution layer of your convolutional neural network: most likely an image of size hxw with c channels for example c=1 for greyscale or c=3 for RGB...
What's important is that for all pixels of that input, the values on each channel gives additional information on that pixel. Having three channels will give each pixel ('pixel' as in position in the 2D input space) a richer content than having a single. Since each pixel will be encoded with three values (three channels) vs. a single one (one channel). This kind of intuition about what channels represent can be extrapolated to a higher number of channels. As we said an input can have c channels.
Now going back to convolution layers, here is a good visualization. Imagine having a 5x5 1-channel input. And a convolution layer consisting  of a single 3x3 filter (i.e. kernel_size=3)

input
filter
convolution
output

shape
(1, 5, 5)
(3, 3)

(3,3)

representation

Now keep in mind the dimension of the output will depend on the stride and padding of the convolution layer. Here the shape of the output is the same as the shape of the filter, it does not necessarily have to be! Take an input shape of (1, 5, 5), with the same convolution settings, you would end up with a shape of (4, 4) (which is different from the filter shape (3, 3).
Also, something to note is that if the input had more than one channel: shape (c, h, w), the filter would have to have the same number of channels. Each channel of the input would convolve with each channel of the filter and the results would be averaged into a single 2D feature map. So you would have an intermediate output of (c, 3, 3), which after averaging over the channels, would leave us with (1, 3, 3)=(3, 3). As a result, considering a convolution with a single filter, however many input channels there are, the output will always have a single channel.
From there what you can do is assemble multiple filters on the same layer. This means you define your layer as having k 3x3 filters. So a layer consists k filters. For the computation of the output, the idea is simple: one filter gives a (3, 3) feature map, so k filters will give k (3, 3) feature maps. These maps are then stacked into what will be the channel dimension. Ultimately, you're left with an output shape of... (k, 3, 3).
Let k_h and k_w, be the kernel height and kernel width respectively. And h', w' the height and width of one outputted feature map:

input
layer
output

shape
(c, h, w)
(k, c, k_h, k_w)
(k, h', w')

description
c-channel hxw feature map
k filters of shape (c, k_h, k_w)
k-channel h'xw' feature map

Back to your question:

Layers have 3 dimensions like 256x256x32. What is this third number? I assume the first two numbers are the number of nodes but I don't know what the depth is.

Convolution layers have four dimensions, but one of them is imposed by your input channel count. You can choose the size of your convolution kernel, and the number of filters. This number will determine is the number of channels of the output.
256x256 seems extremely high and you most likely correspond to the output shape of the feature map. On the other hand, 32 would be the number of channels of the output, which... as I tried to explain is the number of filters in that layer. Usually speaking the dimensions represented in visual diagrams for convolution networks correspond to the intermediate output shapes, not the layer shapes.
As an example, take the VGG neural network:

Very Deep Convolutional Networks for Large-Scale Image Recognition
Input shape for VGG is (3, 224, 224), knowing that the result of the first convolution has shape (64, 224, 224) you can determine there is a total of 64 filters in that layer.
As it turns out the kernel size in VGG is 3x3. So, here is a question for you: knowing there is a single bias parameter per filter, how many total parameters are in VGG's first convolution layer?
Comment: "256x256 seems extremely high", it looks to me just like the input image size :) Not so high.
Comment: OP seemed to have suggested it corresponds to the filter size *"Layers have 3 dimensions like 256x256x32"*. So I was actually referring to a kernel size of 256x256 being extremely high. But of course, it corresponds to a feature map, not a kernel.
Answer: Sorry for the short answer, but when you have a digital image, you have 2 dimensions and then you often have 3 for the colors. The convolutional filter looks into parts of the picture with lower height/width dimensions and much more depth channels (in your case 32) to get more information. This is then fed into the neural network to learn.
Answer: I created the example in PyTorch to demonstrate the output you had:
import torch
import torch.nn as nn

bs=16
x = torch.randn(bs, 3, 256, 256)
c = nn.Conv2d(3,32,kernel_size=5,stride=1,padding=2)
out = c(x)
print(out.shape, out.shape[1])

Out:
torch.Size([16, 32, 256, 256]) 32

It's a real tensor inside. It may help.
You can play with a lot of convolution parameters.


$\vdash\phi \land \diamond\psi \to \diamond(\psi\land\diamond\phi)$ in KB

Question: I've been trying to prove $\vdash\phi \land \diamond\psi \to \diamond(\psi\land\diamond \phi)$ in natural deduction where it's allowed to use $\phi\to \square \diamond \phi$ and/or $\diamond\square\phi\to\phi$ (that is, in $KB)$, but I failed. How can one prove this? I'm not including my work because it consists of dozens of pages and doesn't lead anywhere...
Comment: You've listed the axiom B, but when you say "in natural deduction", I guess you're also including the rules of the modal logic K?
Comment: @AlexKruckman Wikipedia says "K := no conditions", so I'm not sure what rules of K you mean.
Comment: The necessitation rule and the distribution axiom.
Comment: @AlexKruckman Yes, they are included. By "natural deduction" I meant the natural deduction system which includes box-subproofs and diamond-subproofs; and then those axioms can be proven.
Comment: Ok. If you want to ask for a proof in a particular system, it's good practice to include a link to the precise rules of that system. Every logic has a wide variety of proof systems!
Answer: Here's a sketch of the idea, which I'll leave to you to translate into a formal  proof in your system, if you care to.
Let's assume $\phi$ and $\lozenge \psi$. From B and modus ponens, we get $\square\lozenge \phi$, so we get $(\square\lozenge\phi \land \lozenge \psi)$
Now as an instance of the distribution axiom K, we have: $$\square (\lozenge \phi \rightarrow \lnot \psi) \rightarrow (\square \lozenge \phi \rightarrow \square \lnot \psi)$$
The contrapositive of this implication is: $$\lnot (\square\lozenge \phi \rightarrow \square \lnot \psi) \rightarrow \lozenge \lnot (\lozenge \phi \rightarrow \lnot \psi)$$
Turning $\lnot (p\rightarrow q)$ into $p\land \lnot q$ in two places, we get: $$(\square\lozenge \phi \land \lozenge \psi) \rightarrow \lozenge (\psi \land \lozenge \phi)$$
Finally, by modus ponens, we get $$\lozenge (\psi \land \lozenge \phi)$$
Comment: Thanks! It seems I'd have never come up with the idea of considering $\square (\lozenge \phi \rightarrow \lnot \psi) \rightarrow (\square \lozenge \phi \rightarrow \square \lnot \psi)$.


How to figure out the Scope of Work?

Question: If I am starting out in my field as a freelancer, how can I determine what should be in a scope of work, and how can I decide what is acceptable in the Scope of Work before determining it must be changed?
Answer: The Scope of Work is the second essential contract you need signed before you start working; the first is the contract, of course. Let's go over a few small things first:

You are the expert. Do not forget this. You would not be jumping into freelancing, expecting to make thousands (millions?) of dollars if you didn't know what you were doing. No, this means that taking a "quiz" online makes you a smart realtor; you need experience too. Do not let the customer question your abilities too often, otherwise you will start questioning them yourself, and start looking bad. Again, YOU are the expert.
Get an understanding of what the client wants. Every client is different, and they all have different needs. If possible, have a tape recorder going as you're talking with them in the meeting, and write down as much information as possible about your project. Include drawings (even on napkins), notes, audio clips, video clips, photos, plans, ANYTHING. No matter how small the detail may be to the client, it could be the difference between a 2 hour job, and a 2 day job.
Break out the SoW into smaller sections. If you need to, call them Phase I, Phase II, etc. In each phase, describe what needs to be done before that phase and why, and why this phase needs to be done at this time. You should decide which order it gets done in, but have it written down for reference. Do not build the bathroom before building the frame of the house.
Agree on the scope BEFORE you start working. If the client has questions about what needs to be done, explain to them what they need to know, and nothing else. You need time to get the job done too, but you can't spend 4 days just answering questions before the client says "Yes". When you are meeting with the client, make sure your phone's ringer is off, and you are concentrating on the conversation; you will likely not miss important information this way.
Do not work until the contract and SoW have been signed and agreed upon. If you are charging a fee upfront, get the money before working.

If this is your first scope of work, I'd recommend a simple Microsoft Word document to start. Write out what you feel needs to be there, then do a role-reversal with a friend/family member: you are the client, and you want Project Y done within this time frame. As the client, what would be your questions? What would be your expectations? There is a lot to be said about role reversal, because it works! If you wouldn't like it if you're pretending to be paying for it, why would the real person paying for it appreciate it?
Comment: Well we should have information on where to go in some answers or comments, but the sites need to pay for a real advertisement
Comment: I think this is a great answer. I think it would be useful if you could share some resources on writing a contract or SoW. Do you know of any sites with good samples and instructive guides?
Comment: @Thomas To tell you the truth, I just wrote out the general steps I was taking for the SoW, and put it into a Word document. For the contract, there are websites online that have them available; I used a lawyer personally
Comment: There are many industries where "premade" contracts are common. Such as housing, where you can often pick up a stack of generic lease agreements at the courthouse. As for something similar for freelancer contracts etc. I know DocStoc has a number of good resources, but it can be painful sorting through the site to find them, and it is a pay site (though many of their resources are free). I think it would be helpful for future readers if we could point them to some good online resources. I don't know of much myself, my freelance work is on such a small scale I don't usually mess with contracts.

How to figure out the Scope of Work?


Ear monitors or headset to monitor my voice with PC

Question: Hello I have a question that I hope is in the right place because it involves several different subjects and I thought this forum was the best for this since it is close to singing along with an MP3 track.  I have been studying Japanese pronunciation and was wondering if I could use ear monitors to help me with this.  Right now when I study I have a Japanese vocal exercise recording I shadow which is just reading along a few seconds behind this track.  I use the mic on my headset with the volume turned all the way up and the audio track turned way down so I do not blast my ears.  I was hoping I could use ear monitors instead and that I would be able to hear myself more clearly and improve on my pronunciation more since it is kind of hard to hear myself with the headset.  I use a regular Windows 10 PC with just an MP3 player and headset I would like to do this without spending money on expensive audio equipment.  I do not have access to any kind of mic by itself but mine are all connected to headphones.  So basically I am asking if I could find out how to use ear monitors or headphones with a Windows 10 PC that would work while I follow along to MP3 tracks of spoken Japanese vocal exercises.
Thanks have a great day.
Comment: This seems to be an [XY Problem](https://meta.stackexchange.com/q/66377) - you seem to have already decided the solution to your issue is "ear monitors" [whatever they are] & are asking about those. You should really take a step back and ask us about what you are trying to achieve, not about what you already think you need to do to achieve it.
Answer: I believe your question is whether you can use headphones and a computer to monitor your pronunciation—that is, have your voice played back to you in real time so you can hear how you "really" sound as opposed to how you sound in your head. The answer is naturally yes, and many singers do use this approach when recording, sometimes putting the headphones over only one ear to avoid the cloistered feeling of hearing nothing but digital sound.
As for how, you will want to turn on the monitoring setting in your audio program. In Audacity, which is free, you can find instructions for how to do that here.
As for how well it will work, the answer will depend on the quality of your headphones, microphone, and (to a lesser extent) your computer's soundcard. For language purposes, you will probably find simple earbuds and the PC's built-in microphone (or the microphone on your headphone cord, if there is one) sufficient. If you want to start recording guitar, the first upgrade I would make is to buy a small audio interface like the Focusrite Scarlett Solo, which will allow you to plug your guitar directly into the computer.
Comment: Latency is going to be the biggest issue with any solution that doesn't involve external hardware.
Comment: For one track of audio, latency shouldn't be a major issue on a modern PC, especially for language purposes. For music, keeping time is important, which is one reason I suggested an audio interface as the first upgrade.
Comment: So basically I am able to do what I asked to about with my headset in audacity but with a slight delay, is there anyway to get rid of this delay?
Comment: That delay is called latency, and it's what @Tetsujin is talking about. An audio interface will help with that.


What is the difference between Protect and Detect?

Question: In Pokemon, there are two moves. Protect and Detect. On the outside, they seem to be exactly the same, besides PP amounts and move types. Are there any other differences between these two moves, or are they practically clones?
Comment: [This question here](http://gaming.stackexchange.com/questions/129435/why-use-the-move-detect-protect) seems to answer some of your questions.
Answer: From Bulbapedia:

Detect's technical mechanics, including formulas, glitches, and exceptions, function identically to Protect in all generations.

So yes, they're practically the same move.
The only difference I see, besides PP amount and type as you wrote, is that they have a different behaviour in Contests:

Protect is a Cute move, it rises Appeal by 1 unit in normal Contests and by 2 units in Constest Spectaculars.
Detect is a Cool move, it rises Appeal by 2 units in normal Contests and by 1 unit in Constest Spectaculars.

And, of course, Protect has its own technical machine, TM17.
Detect has none.
Answer: Not only are they clones in functionally every way right now, they also run off the same counter, so using Protect or Detect will also cause the other to have a chance to fail on the following turn.
If we ever see some ability that specifically affects Normal or Fighting-type moves, they might behave differently, but not right now.


Feasibility of reconstituting existing 5083 Aluminium

Question: Can I melt 5083 aluminium and then reconstitution into a mould.
I would like to know if it is possible to melt down existing 5083 aluminium lp and then pour the molten liquid into a yacht mould of 6mm thickness?
Comment: Aluminium is often poured into moulds - what is your issue.
Comment: looks like marine alloy and appropriate for casting. There may be additives for the process tho, research it... same for thickness in mold design. talk to a sand casting shop, they'll know.
Comment: @SolarMike Some alloys have properties going beyond plain chemical composition. Crystalline structure achieved by proper cooling rate, additives separating (e.g. floating to the surface) if not actively mixed in, additives that will simply burn away if allowed oxygen access, or decompose if heated too much, post-processing that introduces extra properties. Classic example: melt and cast damascus steel, see what you get.
Comment: ...another example: a friend tried to mend a broken, very cheap vise that snapped in half - he tried to weld the parts together. Due to excessive carbon content the vise caught fire and burned down to a small puddle of slag.
Comment: @SF. perhaps I understood that which was why I was prompting the op to provide more detail.....
Answer: Can you melt 5083 and cast it? yes, this alloy is ok for this role. It is not heat treated, it has somewhat good protection against environment.
I worry more about thin shell casting problem - metal may start to solidify in place before filling the mold with a size of a boat fully. Especially if you plan partial fill, using several pouring steps. And I assume you are not planning to heat up the mold. So, I think this will be the real problem, not the alloy.
Answer: Aluminum is usually melted in a protective atmosphere to reduce oxidation ; even more important with the Mg alloy content. Melting and casting aluminum is not a good backyard project. A charcoal bed on top of the melt and the right flux would make it possible although strength is likely to be reduced by loss of Mg. You would need to research the flux and maybe special treatment of the mold to reduce oxidation. The traditional high silicon alloys ( like 10 % Si ) would be better candidates for armature foundry.


Animating two objects rotating around a common axis with a driver affecting one of the objects

Question: I have two objects. Object A has a driver that causes Object B to translate in the Z direction when Object A is rotated around its Z axis.
I want to rotate both objects together around a common axis, when I do, Object A rotates as expected but Object B follows an elliptical path (I assume because of the additive effects of the rotation and the driver).
How do I get it to rotate as expected? How do I do it when animating when I want Object B to rotate around the common axis but still translate in the Z direction with Z axis rotation of Object A?
Answer: just animate the "delta transform" values instead the transform values, where the driver is.


Only edit visible lines in sparse tree view

Question: Consider the following org-mode document
* Foo
** bar1                            :g1:
** bar2                            :g2:
** bar3                            :g1:
** bar4                            :g2:
** bar5                            :g2:
** bar6                            :g1:

Now I do C-c / m and search for g1. The view will then be
* Foo
** bar1                            :g1:
** bar3                            :g1:
** bar6                            :g1:

as desired.
I would wish to be able to edit those three lines, e.g. by creating a selection and doing C-x r t in order to add foo to all three headings. If I do that, foo will also be added to the hidden headings. Furthermore, for some strange reasons, automatic newlines are inserted, the lines will look like
** foo
bar1                            :g1:

My questions are:

How can I edit several headings at the same time?
Where does that line break come from?
Answer: I found a solution:

M-s o for occur-mode, search for g1
C-x o to change to the other window
e to enable editing
Edit by rectangle tagging or similar
C-c C-c to switch back to occur-mode

However, I am still interested in a better or more elegant solution.


Coil in parallel with resistor

Question: In a circuit with an ideal coil, that is parallel to a resistor, what is the overall resistance of the circuit? If you do the law of resistances in parallel circuits I get 0. However, I don't think that can be right, since there is a resistance inside of the circuit. Then how can the overall resistance be 0
Comment: AC or DC voltage?
Comment: Draw the circuit you are describing.
Comment: DC. The circuit circuit just consists of an ohmic resistor parallel to an ideal coil
Comment: resistance is zero but the impedance is not zero. it is a function of frequency.
Answer: Assuming that by "ideal coil" you refer to a purely inductive coil with an ohmic resistance R = 0, you can assume that, for the purposes of calculating total resistance, the coil is simply a short-circuit that bypasses the resistor in parallel. Computing the parallel resistance gives R(parallel) = 0, which is indeed what you arrived at!
However, do bear in mind that the above is applicable in the case of a DC circuit only. If the circuit was to carry AC, the impedance of the inductive coil would matter (recognise that Z = Lw for an inductor with inductance L and angular frequency w). In a DC circuit, the angular frequency is 0 so the overall impedance of your coil is 0!
So ultimately, the answer to your question depends on what type of circuit you are dealing with. If DC, you are absolutely right to say the resistance is 0 effectively.
Answer: The opposition to the flow of current by an electrical component is due to its electrical impedance. Impedance is the broader term and applies to capacitors and inductors, as well as resistors. Pure resistance is a special case of impedance.
For your parallel combination of an ideal inductor (having no "resistance") and an ideal resistor (having no inductance), if the resistance of the resistor was, in fact, zero, then the resistance of the parallel combination would also be zero. But its impedance is only theoretically zero if you are dealing strictly with DC voltage sources. That is because the inductor has impedance if the source is AC and the resistor can have some self inductance for AC sources if the frequency is high enough.
Hope this helps.

Coil in parallel with resistor


Dotproject

Question: I Have install dot project on linux machine. using ssmtp for gmail account to sending emails for mails notifications . but when i create any user it doesn't send mails to user email ID for account creation. but i send maail form shell prompt.the error i am getting is Failed to send email: 530 5.7.0 Must issue a STARTTLS command first. 22sm11794837wfd.6 added :( . Please help me if any one have solution....
Answer: Gmail requires a secure connection (TLS or SSL).
You need to configure SSMPT (not dotProject) to talk securely with Google's SMTP server.
I think you can just add the following to your ssmtp.conf file and (assuming your SSMTP package was compiled with SSL support) it should then work:
UseTLS=YES

Or perhaps:
UseSTARTTLS=YES

More info here.
Comment: didn't know/see ssmtp ;) upping your answer.
Answer: I assume "530 5.7.0 Must issue a STARTTLS command first." means that you have to connect with TLS (Transport Layer Security). Does dot project support that?

Dotproject


Does the Wild Magic Sorcerer's surge casting of Fireball affect the Sorcerer as well?

Question: Am I understanding the PHB correctly in that if, during a Wild Magic Surge, you cast Fireball centered on yourself, you too are damaged?  That's a death sentence for lower level casters, which is quite possible since this sorcerous origin is chosen at level 1.
Comment: TLDR Don't play a Wild Sorcerer if your gameplan doesn't involve unpredictable and spectacular death.
Comment: possibly a duplicate https://rpg.stackexchange.com/questions/60528/
Answer: Yes, that's correct. Fireball's AoE is a sphere. From the Area of Effect rules on Spheres:

A
  sphere's
  point
  of
  origin
  is
  included
  in
  the
  sphere's
  area
  of
  effect.

So yep, you're going to hit yourself, and yep, it's going to hurt.
As a level 1 Sorcerer, you'll probably have between 7 and 9 max hit points. The saving throw DC will probably be 13, and your Dex bonus will probably be +2 or +3, giving you about a 50/50 chance of success. If you fail your saving throw, the average damage of 28 will probably kill you instantly, under the massive damage rules. If you make your saving throw, or your race gives you fire resistance, you'll probably still be making death saving throws.
You may want to suggest to your party members that staying 20 feet away from you  could be a good idea.
Comment: I think it's fairer to say that even if you make your saving throw, you'll probably still be dead. You need at least 8 hitpoints to have about a 50% chance to not be dead instantly, which requires a 14 con. And even then, there's still a good chance you'll die.
Answer: Yes, the Sorcerer is affected
From the description of Fireball:

Each creature in a 20-foot-radius sphere centered on that point (point of origin) must make a Dexterity saving throw...

I added the point of origin clarification. Since a wild-magic surged Fireball is centered on the sorcerer, and there is nothing indicating the sorcerer is exempted from the damage, they must make the Dex save, taking 8d6 fire on a fail, half on a success.


Spotty looking perilla plant

Question: I have several perilla/shiso plants grown from a batch of seeds. Right now all of them look spotty and yellowish rather than deep green like those you get from stores. Is this a disease or are they missing nutrients / particular minerals?
Comment: can you add a picture of the underside of the leaf in case there are bugs?
Comment: Thanks Kevinsky. At first I couldn't see any but I guess I wasn't looking closely. I can confirm I see these tiny red spots on the back of almost all the leaves. Are they bug eggs?
Answer: Perilla is an annual herb and can be subject to rust which shows as rust coloured spots.
As the spots on the leaves in the picture are light coloured it looks like aphids or spider mites which suck sap.
Spider mites are the size of a grain of salt and cluster on the undersides of the leaves. You may need a magnifying glass to see them. They make a web when populations get large and can spread to other plants.
Aphids are much larger and come in a variety of colours.
Both can be controlled with at least three applications of soap and water at five to six day intervals applied at a ratio of 25 ml of dish soap per litre of water.
As these plants are grown to be eaten and they are annual seedlings I recommend either planting them outside and hoping for the best or throwing them out.  Most seedlings are too delicate for the soap and water method of control.
Comment: Thank you so much! I think you are right, they look like spider mites from your description. Looks like I have to let all of them go. Do I need to treat the soil with soap water before planting a new batch?
Comment: @AoboSong you can bake the soil at about 200 deg c for 20 minutes to sterilize it.  If that is not possible then consider using that soil in the garden. Seedlings need the best conditions to prosper

Spotty looking perilla plant


Why can't you wash an amputated finger

Question: While taking first-aid classes I realized that you cannot wash an amputated finger.
Does anyone know why is that? Will it induce more damages?
And why should we rinse a knocked-out tooth then?
Comment: I searched about it and in this [article](https://orthoinfo.aaos.org/en/diseases--conditions/fingertip-injuries-and-amputations) it's written-'Gently clean the amputated part with water or, if possible, with sterile saline solution.' this is pertaining to a finger amputation
Answer: So, immediately after a finger amputation has occured, your first steps in terms of providing first aid are going to be ensure the scene is safe and that there are no additional life threats to the patient so. Life threats being things such as not breathing/no pulse and severe bleeding.
Now, for the finger... You're going to want to gently clean both the wound and the part that has been amputated with sterile water or sterile saline. It's not recommended on any of the resources I've looked at for the basic first-aider to be scrubbing out the wound or putting any heavy-duty antiseptics on either part at this point. Debriding the wound (scrubbing it) is best left to the medical professionals. You're going to then wrap the part that is still attached to the person in sterile gauze. You'll want to make sure that your bandage is not cutting off circulation since you still want good blood flow getting to that injury site for healing purposes.
Wrap the amputated part in a moist, non-fluffy sterile dressing, place it in a plastic bag and place that plastic bag on ice. I'd recommend double bagging this or sealing it in some other type of container. You do not want this ice and/or water getting in there and causing any type of freeze damage to that finger, nor do you want to risk that part becoming contaminated through the ice or water leaking into it.
You rinse both an amputated part and a tooth for the same reasons. To help remove any major debris as well as to give the part the cleanest environment you can prior to a doctor attempting any type of reattachment/reinsertion process.
I referenced Healthine's Severed Finger First Aid page,  the American Academy of Orthopedic Surgeons page on Fingertip Injuries and Amputations and The American Association of Endodontists page on caring for knocked out teeth for this answer. I hope this helps and I welcome any questions or comments about any part of this answer!

Why can't you wash an amputated finger


Scan for a specific virus type?

Question: Is it possible to tell an antivirus which specific virus type (worm, macro etc) to scan for? Assuming I know the type of virus and just want to save time and scan for it specifically instead of running it though the whole system.
Comment: Every anti-virus software is different. Some might have such a feature, some might not. You might want to look in the manual or consult the support of your anti-virus software.
Answer: It is not possible with most antiviruses, the reason being that it would be "penny-wise, but pound-foolish".
Most of the resources employed by the antivirus are spent in opening files and reading them (uncompressing, etc.). More often than not, interpreting them from the various executable formats.
It is possible - not in all antiviruses - to reduce time by not scanning classes of objects (Office documents for macros, inside ZIP files, inside email archives, etc.).
But normally an antivirus uses a complicated and optimized "tree" or state machine to scan for viruses. It is not, in other words, something like
<code>foreach signature in TenThousandSignatures do
    if filedata contains signature then
        call alarm
    end
end
</code>
which would benefit from replacing TenThousandSignatures with FiveMostProbableSignatures.
To be able to only scan for a single virus, you would need to have an optimized FSM for that one virus, and therefore one FSM for each virus you might want to choose. This would require, first, supplying a lot of FSM packages to the antivirus; and then when you wanted to scan for all viruses, or most of them, the time would be the sum of each time, since all those FSM's would not be integrated in a single one, and would need to run independently, their run time or resource requirements adding up.
That said, it is often done that antiviruses have several FSM packages and you can select the one you wish to employ: usually viruses, malware, adware, and PUA (Potentially Unwanted Applications) / PHA (Potentially Harmful Applications), such as patch droppers, cracks, hacking tools, password finders etc.. . Also, for convenience, you might get a "full database" FSM each first of the month, then the signature updates would be supplied daily as an additional, but much smaller, update package.
Also, some antiviruses use several strategies to scan for different virus families or technologies (polymorphic virus, heuristic scans, etc.), and you might be able to disable the strategies you aren't interested in. Each being independent of the others, the times there add up linearly, so deactivating undesired modules makes sense.
In such cases, the scan time is usually proportional to the number of FSM packages or scanning modules you activate (and, less clearly, proportional to the size/architecture of each).
Finally, there exist some targeted antiviruses that will only scan for their designated target, a single virus or a single virus family. I think ESET used to roll out some "quick response" tailored virus disinfectors for specific, "popular" viruses. Don't know if they still do that.
Comment: Is there a set type of FSM AV use as a standard? Or do they vary from AV to AV?
Comment: No, usually each firm has its own set of FSM - they actually usually are algorithmic machines more advanced (and specialized) than simple finite state automata. Heuristic engines are even more complex. And the algorithms that drive both, while approximately known, are proprietary in their details.
Answer: To answer the question: I don't think so, but it is possible some AV products include this, i haven't used them all. But in any that i use or have ever used, no. All the checking is done via heuristics and known signatures.
To correct the case: you don't want to do this. If indeed an infection has happened there can be many different actors at play. say you know a certain type of malware is present, and you want to scan for others. But there was an underlying malware that is used to continually regenerate the malware you are looking for in the event it is destroyed. You would never find it.
This is the main reason i don't think AV companies in the main stream make these options readily available to end users. All end users want to save time. sometimes we have to swallow the cost though, for the good of us all.
EDIT: but to add to it, you dont need to sit there and watch it either, most of the big AVs out there have a background scan mode, designed to be low overhead. You can run a full scan for everything and carry on your merry way.

Scan for a specific virus type?


Running emacs inside screen

Question:
I have a screenrc file but I am finding some conflicts when I run emacs inside screen. For e.g, moving across buffers in emacs, Ctrl-right arrow/left arrow, instead of moving back and forth sends some characters into the buffers such as 5C, 5D etc. This problem exists even when I invoke screen without any screenrc file. But at least the other conflicts were not there. But I would be very grateful if someone could tell me how to fix this ?
Since I have my own bindings in my screenrc file and I want to continue using it, so I was thinking that I will keep my screenrc file but when I want to start emacs in a new screen, I will not use my screenrc. Is there any way to while invoking screen to not to use screenrc ? Till now I have been managing by renaming my screenrc file to something else when starting emacs.
Is there any way in which emacs itself can work as screen, as in I am using screen so that my emacs session does not terminate whenever the remote ssh session goes down. I found some documentation regarding emacs client and emacs server but could not understand much. I would appreciate if someone could tell how to save sessions inside emacs and restore them so that I dont need to use screen for emacs if its possible, as in one should be able to restore the emacs process again.
Comment: May I suggest that you post three separate questions next time, to allow people to get credit for answering (only) one of them, and to make it easier to search for each of them?
Answer: I only have input on your question #3.
As of emacs 23, emacs has a daemon mode which for me has obviated the need to run emacs inside screen.  On my first login after a boot, I start emacs --daemon in a terminal.  This starts emacs in the background.  Then, whenever I need to use emacs, I either run emacsclient -nc to get an X window to my emacs session, or emacsclient -t to get a terminal session.
Multiple clients can coexist happily.  I routinely run an X client on my workstation screen at work, an X client through ssh login from home, and a terminal client on my phone.  All talking to the same emacs process, with all my buffers and other state intact.  And should my ssh connection on my phone die, I can just continue where I left off after logging in again.
I don't know enough about keybindings in screen to help you with your first two questions.
Comment: Thanks a lot for that emacs client thing. Now I dont need screen anymore for emacs. At least it wont conflict with the emacs key bindings :-)
Comment: How does this solve the problem of persistent sessions? If the shell in which you originally invoke `emacs --daemon` happens to be exited (for example, a random broken pipe for that ssh connection), then upon re-connecting, the original emacs session won't be available. Previously opened buffers will not be in the client sessions, etc. Isn't this virtually the entire use case for running emacs inside screen? I'm missing how this addresses it. It seems like you'd have to run `emacs --daemon` *inside* a screen session to ensure it was persistent, which defeats the purpose.
Comment: @ely If your emacs becomes unavailable after a client shell exits for whatever reason, your emacs is buggy.  I just tested, and this works for me:  logged in; emacs --daemon; emacsclient -t; do stuff; log out; log back in; emacsclient -t; see previous stuff; log in on alternate terminal; kill -9 the shell with emacsclient; log in again; emacsclient -t; my stuff is still there.
Comment: I think you're misunderstanding. What if the shell running `emacs --daemon` goes down. If that shell stays up, then I can log in and out of other shells, each of which is only bothering with `emacsclient`, and it works as you say. But if the connection to the original shell dies, the shell within which `emacs --daemon` is executed, then the daemon and all clients go with it. How would you persist the running daemon across different log ins? Background is not enough. You'd have to run it with `nohup` or something, which is the bad way of doing what you should use screen or tmux for.
Comment: @ely It wouldn't be much of a daemon if it needed help from nohup, screen or tmux.  Not needing that is the point of `--daemon`.  `emacs --daemon` properly detaches from the terminal and reparents to pid 1.  It has no dependency on its originating shell.  I tried, in my previous comment, to show a sequence in which I indeed exit the shell from which I started the daemonized emacs, but perhaps that was not clear.  For me, `emacs --daemon` works exactly the way you claim it can't. Calling something a daemon and not having it survive the invoking shell would be stupid. So the devs didn't do that.
Answer: 1) This has to do with the way in which Emacs interpets escape sequences sent by the terminal. This is fun stuff! You should configure your input-decode-map, e.g., by defining the following function in your .emacs file:
(defun terminal-init-screen ()
  "Terminal initialization function for GNU screen."
  (when (boundp 'input-decode-map)
    (define-key input-decode-map "^[[1;5C" [(control right)])
    (define-key input-decode-map "^[[1;5D" [(control left)])))

(Note that the ^[ in the above example is not a caret followed by an opening bracket, it's a single escape character which you type like this: C-q ESC.)
This function is magically called by Emacs running inside screen.
2) You can invoke screen with its -c option, to specify a different file than the default .screenrc. So if you have special configurations for screen that you only want to be applied when you run Emacs inside screen, you could put them in a file .emacs-screenrc, and run emacs inside screen like so:
screen -c .emacs-screenrc emacs

Note that this file could be empty.
3) Managing sessions in emacs can sometimes be tedious. Off the shelf, Emacs provides desktop save mode which I personally don't use, but I've read mixed reports on it. You might want to give it a try. A good overview over alternative approaches can be found on the Emacs wiki.
An alternative to session management in the first place is to run Emacs as a server and connect to it with emacsclient. I don't know which documentation you saw, but GNU's official Emacs documentation is usually very good. Have a look at it:
http://www.gnu.org/software/libtool/manual/emacs/Emacs-Server.html#Emacs-Server
Answer: For #1
Try invoking emacs like so from inside screen:
TERM=xterm emacs -nw somefile
CTRL+arrow should now work as intented
Answer: Another way to have part of 3) is to use tramp: with tramp you can use the Emacs running on your computer to edit a file on your server. Just open /ssh:user@host:/path/to/remote/file
This can also be used for other "remote" use for example

/sudo::/etc/bla for editing using sudo,
/ftp:user@host:/path/to/remote/file to edit remote file using ftp...

tramp will reopen the ssh connection when needed, and you can even use tramp to run program on the remote host (VCS stuff for example).

Running emacs inside screen


Tanegashima important?

Question: I've noticed that Robotics;Notes, Captain Earth, and Aldnoah.Zero all prominently feature Tanegashima (city in Japan). Are these series tied together in some way or is this just coincidence? (kind of like how Tokyo and Kyushu are featured in a lot of anime)
Answer: Tanegashima island is prominently featured, most probably due to the fact that:

The headquarters of JAXA, the Japan Aerospace Exploration Agency, the Tanegashima Space Center spaceport is located at the southeastern end of the island.

About Tanegashima Space Center:

The Tanegashima Space Center (種子島宇宙センター Tanegashima Uchū Sentā) (TNSC) is a Japanese space development facility. It is located on Tanegashima, an island located 115 km south of Kyushu. It was established in 1969 when the National Space Development Agency of Japan (NASDA) was formed, and is now run by JAXA.
The activities that take place at TNSC include assembly, testing, launching and tracking of satellites, as well as rocket engine firing tests. It is Japan's largest space development center.

Tanegashima Space Center is featured not only in the 3 anime as mentioned in the question, but also in:

Empire Earth: The Art of Conquest
Pokémon Ruby, Sapphire, and Emerald (Mossdeep Space Center is based on TNSC)
5 Centimeters Per Second (features a rocket launch from TNSC)
Comment: Also, Tanegashima is pretty much as far south as you can get while still being more or less on the home islands, which makes it geographically interesting. (It being closest to the equator is, of course, why Tanegashima was chosen as the site for the space center in the first place.)
Comment: @senshin: Feel free to edit it in. I'm making this a community wiki since I don't know much myself and most content is copied from Wikipedia.

Tanegashima important?


how wanam exposed work?

Question: I have a Samsung phone which is rooted and has xposed framework. There's an app "wanam exposed" it's runs using an xposed module. It can change themes of stock Samsung ROM. It can change color of notification bar, and almost anything. I want to ask that does it modify any configuration files? If so then what's the locationof those files? And all is changes can be reversed just by disabling the module in xposed app and restarting. How is that possible?
Comment: Wanam Xposed is an Xposed module. The magic is performed by framework it uses. A brief can be found here: http://repo.xposed.info/module/de.robv.android.xposed.installer Details are here: https://github.com/rovo89/XposedBridge/wiki/Development-tutorial#how-xposed-works
Answer: I've just published a blog article on that yesterday you might wish to read: Xposed: The mighty Android toolbox. Amongst others, it explains some background on how Xposed works.
Basically, the framework modifies the dalvik cache at boot time (or the corresponding art stuff on Android ≥ 5). So all changes take place on boot. Thus enabling/disabling modules only shows changes after rebooting the device: if you disable a module, it's changes simply won't be applied the next time you start your device.

how wanam exposed work?


BTRFS Raid 5 - Replace disk with SMART errors

Question: Can someone explain to me the steps i have to take to replace a disk in a raid5 btrfs stetup?
I' have a setup with 8*3tb disks and one disk displays smart errors.
I have a replacement disk of the same size but want to know how i can safely replace the broken disk
Answer: First step is removing the drive with errors simply by typing:
sudo btrfs device remove /dev/sdX /mnt/YYYYYY

where X is drive which we want to remove and YYY is path. It will take some time because btrfs utility will try to read all data from disk and place them somewhere else safely. After this command you can disconnect disk and connect new one. Adding new disk is done by:
sudo btrfs device add /dev/sdX /mnt/YYYYYY

Also after this commands it is recommended to do balancing:
sudo btrfs balance start /dev/sdX /mnt/YYYYYY

That's all. This is safest way to change disks. There is more dangerous way but it will save time. I don't recommend this but you can disconnect the disk immediately and after booting remove missing information of disconnected disk:
sudo btrfs device remove missing /mnt/YYYYYY

And then add disk and rebalance.
Comment: How about adding a new disk first, then removing the old one? In a case where there's so much data it wouldn't fit into N-1 disks, working (temporarily) with N+1 disks seems the right way. What are the reasons (if any) to prefer removing first?
Comment: I think removing and rebuilding is the standard way of doingf it
Comment: I don't know about BTRFS, but RAID 5 implies one disk's worth of redundancy... Is it necessary to "move data somewhere else"?
Answer: You can't use the btrfs remove command in this case because there would be only two devices remaining and you need at least three for RAID5. So there are two options:

Use the replace command.
Add the new drive first and then remove the old drive.

To replace the drive run this:
sudo btrfs replace start -B /dev/old_drive /dev/new_drive /mnt/YYYYYY

The -B flag makes the command run in the foreground. See the man page for details https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-replace


How did the adverbial use of "smack" come into use?

Question: How did the adverbial use of "smack" come into use? For example: "smack in the middle" or "smack in front" of something etc.
Answer: There are several similar phrases, all related to one another: smack dab, slap dab, smack bang, slap bang. They may be hyphenated or not.
Slap and smack, and bang and dab combine indicate a noise and suddenness.
OED

smack-dab, adv.
Forms:  Also smack dab.
Etymology: < smack v.  + dab adv.
U.S. dialect and colloquial.
Exactly, precisely; with a smack. Cf. slap-dab adv.
1892   Dial. Notes 1 232   He hit him smack dab in the mouth.

slap-dab
North American dialect and colloquial.
slap-dab   = slap-bang adv. Cf. smack-dab adv.
1886   Turf, Field & Farm XLII. 174/3   He was goin' that fas' he run
slap-dab agin me afo' he seed me.

dab, adv.
Etymology: The verb-stem or noun used elliptically.
With a dab, or sudden contact.
1600   R. Armin Foole vpon Foole sig. C2v   Hee droopt downe..as
heauy as if a leaden Plummet..had fallen on the earth dab. [He
dropped down…as heavily like a lead weight suddenly falling to the ground.]

slap, adv.
Etymology: < Low German slapp (German schlapp), of imitative origin.
colloquial.
1. With, or as with, a slap or smart quick blow; quickly, suddenly,
without warning or notice:    a. In general use (frequently
parenthetic); also with off, down.
1672   Duke of Buckingham Rehearsal iii. 21   First one speaks, then
presently t'others upon him slap, with a Repartee.

Smack (verb)
7. Used with adverbial force.
a. With, or as with, a smack; suddenly and violently; slap. Also
with down, through, etc.
1782   W. Cowper Hist. John Gilpin in Public Advertiser 14 Nov.
Smack went the Whip, round went the Wheels.
1799   King George IV in Paget Papers (1896) I. 150
He..tumbled..smack on his face.
Answer: According to Etymonline the adverbial usage of smack is quite old (late 18th c.) probably as a figurative extension of its original verbal usage.
smack(adv.)

"suddenly, directly, aggressively, plump, straight," 1782, from smack (v.1); the extended form smack-dab is attested from 1892, American English colloquial (slap-dab is from 1886).


Show that two certain groups are isomorphic

Question: Let $E,K$ be two abelian groups (additively written) and let the group law of $(G,\cdot_f)$ be defined as $$(e,k)\cdot_f(e',k') = (e + e',k + k'+ \varphi_f(e,e'))$$
where $$\varphi_f(e,e') = f(e+e') - f(e) - f(e')$$ for some function $f:E \to K$. We have the identity $$\varphi_f(e + e',e'') + \varphi_f(e,e') = \varphi_f(e,e'+e'') + \varphi_f(e',e'')$$ for any $e,e',e''\in E$ and thus $$\varphi_f(0,0)=\varphi_f(e,0)=\varphi_f(0,e')$$ Now I should show, that $(G,\cdot_f)$ is isomorphic to $E \times K$ with usual componentwise operation. My thought was to construct an isomorphism, but this did not guide me to an answer. Is there another way or a more strategic way of finding such an isomorphism?
Comment: Hint: what is the group identity of $(G,\cdot_f)$? That element must be mapped to the group identity of $E\times K$ (under any group homomorphism, so certainly under an isomorphism). And it seems that the first coordinate already acts the way you want, so the sought isomorphism is probably pretty simple there....
Comment: Have you tried to verify $G$ is abelian?  This might simplify the overall verification.
Comment: @hardmath Ah nice. I did not observe that until now. Thanks. I will consider this.
Comment: @GregMartin The group identity is given by $(0,-\varphi_f(0,0)) = (0,f(0))$. Yes, the first coordinate is alright. So we would like that the isomorphism maps $(0,f(0))$ to $(0,0)$. So I would say $\iota(e,k) := (e,k-f(0))$.
Comment: Great, so we have a concrete map in mind; can you determine whether that map is an isomorphism?
Answer: Method 1: Guess $\psi : G\to E\times K$ should be defined by $\psi(e,k) =(e,k-f(e))$ and check it is an isomorphism.
Method 2: Guess that $\psi : G\to E\times K$ should be of the form $\psi(e,k)=(e,k+\theta(e))$. Then since we want $\psi$ to be a homomorphism we obtain the equation:
$$(e+e',k+k'+\phi_f(e,e')+\theta(e+e'))=(e+e',k+k'+\theta(e)+\theta(e'))$$
and hence
$$\theta(e+e')=\theta(e)+\theta(e')-\varphi_f(e,e')=\theta(e) + f(e) + \theta(e') + f(e') - f(e+e')$$
so that
$$\theta(e+e')+f(e+e')=\theta(e) + f(e) + \theta(e') + f(e').$$
From this we see that if $\theta(e)=-f(e)$, then $\psi$ will be a homomorphism. Check it is an isomorphism.
Method 3:
Much too long and far to complicated but more structured.

Theorem: Let $K, E$ and $G$ be groups and let $p:G\to E$, $s:E\to G$, $q:G\to K$ and $r: K\to G$ be group homomorphisms such that $p\circ s=1_E$, $qr=1_K$, $pr=0$ and $qs=0$. If $G$ is abelian and $rq+sp=1_G$, then the map $\psi : G\to E\times K$ defined by $\psi(g) = (p(g),q(g))$ is an isomorphism.
Proof:
$\psi$ is a bijection since $\theta$ defined by $\theta(e,k) = s(e) + r(k)$
is its inverse. $$\theta(\psi(g))= \theta(p(g),q(g))=s(p(g))+r(q(g))=(rq+sp)(g)=g$$
and
$$\psi(\theta(e,k))=(p(s(e)+r(k)),q(s(e)+r(k))=(p(s(e))+p(r(k)),q(s(e))+q(r(k)))=(e+0,0+k)=(e,k)$$
Finally $\psi$ is a canonical map into a product (and hence a homomorphism). More concretely
$$\psi(g_1+g_2) = (p(g_1)+p(g_2),q(g_1)+q(g_2))=(p(g_1),q(g_1))+(p(g_2),q(g_2))=\psi(g_1)+\psi(g_2).$$

Now back to the problem. Notice that there is a natural homomorphism $p: G\to E$ defined by $p(e,k)=e$. This map has a section $s: E\to G$ which is also a homomorphism defined by $s(e)=(e,f(e))$. The kernel of $p$ is $\{(0,k)\,|\,k \in K\}$. Let us write $r : K \to G$ for the homomorphism defined by $r(k) = (0,k+f(0))$ which is an isomorphism onto the kernel of $p$. Since $G$ is abelian it follows that the map defined by $u(e,k) = (e,k)\cdot_f s(p(e,k))^{-1}$ is a homomorphism. Now since as mentioned $r$ is an isomorphism onto the kernel of $p$ and $$p(u(e,k))= p((e,k)\cdot_f s(p(e,k))^{-1}) = p(e,k) -   p(s(p(e,k))) = e-e=0$$ it follows that $u$ factors through $r$ via a homorphism $q: G\to K$. The theorem above then tells us that desired isomorphism will be $\psi : G\to E\times K$ defined by $$\psi(e,k)=(p(e,k),q(e,k))=(e,q(e,k)).$$ Now we would like an explicit formula $\psi$ and hence for $q$ and hence also for $u$. Since $s(p(e,k))=(e,f(e))$, solving $$(0,f(0)) = (e,f(e)) \cdot_f (e',k')= (e+e',f(e)+ k' + \varphi(e,e'))=(e+e',f(e)+k'+f(e+e')-f(e)-f(e'))=(e+e',k'+f(e+e')-f(e'))$$ for $e'$ and $k'$ we see that $e'=-e$ and hence $k' = f(0) - f(e -e)+f(-e)=f(-e)$ and hence $$u(e,k) = (e,k)\cdot_f (-e,f(-e)) = (0,k + f(-e) + \varphi(e,-e))=(0,k+f(-e)+f(0)-f(e)-f(-e))=(0,k + f(0)-f(e)).$$ Now since $rq=u$ solving for $q(e,k)$ in the equation
$r(q(e,k))=u(e,k)$ we find that $q(e,k)=k-f(e)$ and hence $\psi(e,k)= (e,k-f(e))$.


What is the difference between a policy and rewards?

Question: I don't understand the difference between a policy and rewards. Sure, a policy tells us what to do, but isn't the output of a neural network trained on rewards basically a policy (i.e. choose the maximum reward)? What is different about the policy? An extra softmax applied?
Answer: A (stochastic) policy is a set of conditional probability distributions, $$\pi(a \mid S=s), \forall s \in \mathcal{S}.$$ If the policy is deterministic, then it is a function $$\pi: \mathcal{S} \rightarrow \mathcal{A},$$ so $\pi(s) = a$ is the action that policy $a$ returns in the state $s$ - it always produces this same action for a given state, unless it's a non-stationary policy. A policy is also called a strategy (in game theory). To be usable, a stochastic policy must be turned into a decision rule, i.e. you need to sample from it. A stochastic policy generalises a deterministic one.
The rewards are the outputs of the reward function. A reward function can be deterministic (which is often the case) or stochastic. It can be defined as $$R : \mathcal{S} \times \mathcal{A} \rightarrow \mathcal{R},$$ where $\mathcal{R} \in \mathbb{R}$ is the reward space. If it's stochastic, then
\begin{align}
R(s, a)
&= \mathbb{E}\left[ R_t \mid S_t = s, A_t = a\right] \\
&=\sum_r r p(r \mid S_t = a, A_t=a),
\end{align}
where $R_t$ is the random variable that represents the reward at time step $t$ and assuming a finite MDP. Stochastic reward functions generalise deterministic ones.
So, policies are probability distributions or functions, while rewards are numbers. So, there's a difference between their definitions, even though they are related.
How are they related? In different ways. The most important one is that an optimal policy for a given MDP is the one that, if followed, maximises the expected return, which is a function of the reward (typically, a discounted  sum of rewards). The definition of an optimal policy makes more sense if you also know the definition of a value function - I recommend you take Sutton & Barto's book and read the relevant sections.
Comment: Detailed answer, thanks. But I still don't get how these two things are different under the hood, meaning the neural network output.
Comment: In deep RL, the neural network can represent the policy. To find the optimal policy, you need to explore the environment and collect rewards and understand which actions lead to more rewards. You then use these rewards to update the neural network, so the policy. So, the rewards are used to train the neural network. Maybe you should look at the equations of Q-learning or any other RL algorithm. In them, $Q(s, a)$ is the neural network, while $r$ is the reward. There's clearly a difference. One is a function, the other is a number, as I say in my answer.
Comment: I recommend that you read the first chapters of the book mentioned in my answer. I think you don't understand the difference because you're missing some details, but I don't know which ones. Let me give you this example - hopefully, you're more familiar with supervised learning. Do you think that labels (e.g. dog or cat) are the same thing as a neural network that classifies dogs and cats? Here, the labels would be analogous to the rewards, while the classifier would be analogous to the policy. See [this](https://ai.stackexchange.com/a/14168/2444).
Comment: Maybe I'm confused because a lot of papers, articles etc. refer to them as distinct things. What you're telling me I think is that the policy is the method (nn or other) and the reward is how we get to the method (which could also be value+advantage or something else).
Comment: I wouldn't say that a policy is a method, if you're using it as a synonym for algorithm, although a decision rule can be thought of as an algorithm. Maybe you meant model (and not method)? A neural network is essentially a model, i.e. it can be used to mimic something. That something is usually a function. Any (continuous) function. That's why neural networks are called function approximators, i.e. they approximate functions. In this case, the function that the neural network approximates is the policy. A policy is the solution to an optimisation problem defined in terms of an MDP.
Comment: So, we can say that a policy is the "solution" to an MDP, which is the "problem". As part of the definition of the MPD, you have a reward function. So, a problem is defined in terms of the reward function. Typically, the optimization problem you want to solve is defined in terms of this reward function. I could probably go on and on and try to explain more things, like the value function, but this discussion will become long. That's why I recommend you read the book. RL is not as trivial as it may seem at the beginning. It requires some time to get used to all the definitions and details.
Comment: Feel free also to ask more separate questions on the site, but comments should not be used for long discussions.
Comment: Thank you, this cleared up many things. It's just that the bibliography sometimes is a bit confusing.
Answer: Typically, the answer to a control problem in reinforcement learning (RL), is "What is the policy that maximises total reward?".
In really simple scenarios, that you might study to understand RL basics, this can be so obvious that you could just search ahead and discover the correct action without really using RL.
However, sticking to the formal definitions in RL allows you to tackle harder problems, where it is not obvious how to decide what to do, or maybe even how to access the best rewards.
In the formalism of RL:

Reward is a real-valued signal received after each time step. For RL theory to be useful, the distrbution of reward values should be the same if start state and action are the same (you may also make the distribution depend on the next state, but that doesn't change the rule, it just means reward and next state will be correlated).

A policy is a function for action choice, it takes the state as input, and returns a distribution over all possible actions $\pi(a | s): \mathcal{S} \times \mathcal{A} \rightarrow \mathbb{R} = \mathbb{Pr}\{A_t=a|S_t=s\}$. It may be deterministic and directly return a chosen action $\pi(s): \mathcal{S} \rightarrow \mathcal{A}$

These are clearly very different things. Often we are interested in finding a policy that maximises an aggregate of rewards, but that doesn't make the policy simply related to rewards. Think of a chess game - which piece should you move to win? There is no immediate reward, and the consequence for a good or bad move will happen much later. The relationship between the policy in an early game state, and the reward at the end (e.g. +1 for a win, -1 for a loss) is not at all clear.
Only in the very simplest of scenarios, where taking actions directly led to already-predictable rewards, could you use your idea of $\pi(s) = \text{argmax}_a r(s, a)$ where $r(s,a)$ was a reward function. For a start, this will not help you look ahead more than one time step. What if the best reward now was followed by a really bad reward?
RL has the toolkit you can use to decide how to offset immediate vs future gains, and also how to learn what to do when you don't already have a simple function $r(s,a)$ which tells you what is going to happen in advance.


Is the phrase "refuse the idea" wrong?

Question: It doesn't sound right, but I might be mistaken. A quick search shows that people do use it, but they could be wrong as well (I suspect the phrase is ok, and I am wrong).
Comment: it's not a common expression (that I'm aware of) but the meaning is clear.  What is more commonly used is ***"reject an idea"*** - to consider it, then opt not to use it,  or ***"dismiss an idea"***- as non-viable, for example.
Comment: What would be wrong with that?
Comment: Maybe nothing is wrong. If I knew for sure I wouldn't be asking.
Answer: It's a perfectly valid phrase.
However, it can be said by people who really mean they "refute the idea"; that they prove it to be invalid or untrue, or at least offer a strong argument.
However again, it more often happens the other way around; people say they "refute the idea" either as a hypercorrection (they somehow gather that refuting is "posher" than refusing) or because they fancy they have indeed refuted it, when they've offered no real argument against it, never mind a decisive one, and have merely refused it.
Perhaps you are half-remembering "refute the idea" and that is what has you unsure. All refutations are refusals, but refusals are only refutals if they at least offer an argument for the refusal.
Comment: Reject would also be correct and valid. Indeed, more common, *reject* just means you don't accept it, *refuse* means you won't allow it any credence, and *refute* that you refuse it because you have made a strong and convincing argument against it.
Comment: It's not that. For some reason I thought the proper verb would be "reject" and using "refuse" would be wrong (a case of hypercorrection, probably, but not the one you've mentioned).
Comment: Have you tried a simple Google search comparison? "Rejected the idea" : "refused the idea" gives hits in the ratio of roughly 45 : 1. I'd avoid the latter.
Comment: So *refuse an idea* means *refuse to entertain the idea*? If you say so, but I've never heard it used so.  *Deny* or *reject*, yes: but *refuse an idea* sounds as strange to me as *refuse the universe*.

Is the phrase "refuse the idea" wrong?


What color swatch preset to use for preparing graphics for print?

Question: I would like to know what color swatch preset should be used to print a design you made on illustrator, so there's no confusion on colors from you to the printing company.
Comment: To help get a useful answer, add a little more detail. What kind of design, for what purpose, and are you using any Pantone colors in the design? The term you're looking for is "color profile."
Answer: If you are sending it to a printer, your document color mode should be set in CMYK. It will be as close as you can get to the true color. A color will be read differently in RGB, than CMYK.
Answer: Avoiding "confussion" is a methodology and workflow, not only a color swatch.
1) You must have your monitor calibrated, so you do not see on your computer a happy color that it is not real.
2) You must have your proper color settings in your aplications, the correct profile for your region (inks and specifications) and type of paper.
3) You can use a physical color system, for example a pantone guide, toyo, etc, depending on your country. But you must have one phisical with you too. You should not rely only on the onscreen preview.
4) Use the proper color modes neccesary depending on the type of output. If it is digital or comercial offset print. If it is direct inks or color separations.
5) Look for a provider that has consistent color quality.
6) You should ask for a well calibrated color proof. If the project is small, a digital one could work. If it is a very large project, you can ask for a roll proof.
7) You can be "in situ" to authorize any special very last moment adjustments.
8) If it is a small digital project you need to make a sample, and go back to edit your project to "correct" the color deviations you percive.
9) You need to have a very clear comunication with the rest of the workflow.
It is a bit more than a color mode or a swatch.
Answer: For printing CMYK & Pantone colors are recommended. CMYK is the combination color, if you want to print in separate colors better you can design with pantone colors.


libc6 on debian wheezy and unmet dependencies

Question: I'm trying to install some packages that have a chain of dependencies, ending up requiring libc6 and libc6-dev at the bottom.
I have several machines in GCE set up with debian wheezy (fresh installs), and am getting these errors while trying to install libc6-dev:
<code># apt-get install libc6-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6-dev : Depends: libc6 (= 2.13-38) but 2.17-93ubuntu4 is to be installed
             Depends: libc-dev-bin (= 2.13-38)
E: Unable to correct problems, you have held broken packages.

# apt-cache policy libc6
libc6:
  Installed: 2.17-93ubuntu4
  Candidate: 2.17-93ubuntu4
  Version table:
 *** 2.17-93ubuntu4 0
        100 /var/lib/dpkg/status
     2.13-38 0
        500 http://gce_debian_mirror.storage.googleapis.com/ wheezy/main amd64 Packages
        500 http://http.debian.net/debian/ wheezy/main amd64 Packages

# apt-cache policy libc6-dev
libc6-dev:
  Installed: (none)
  Candidate: 2.13-38
  Version table:
     2.13-38 0
        500 http://gce_debian_mirror.storage.googleapis.com/ wheezy/main amd64 Packages
        500 http://http.debian.net/debian/ wheezy/main amd64 Packages

# cat /etc/apt/sources.list
deb     http://gce_debian_mirror.storage.googleapis.com/ wheezy         main
deb-src http://gce_debian_mirror.storage.googleapis.com/ wheezy         main
deb     http://http.debian.net/debian wheezy         main
deb-src http://http.debian.net/debian wheezy         main
deb     http://security.debian.org/   wheezy/updates main
deb-src http://security.debian.org/   wheezy/updates main
</code>
I looked up the libc6-2.17-93ubuntu4 version and it looks like it is for saucy, not wheezy.
Is this due to the custom wheezy kernel that Google is using?
Any tips on how to go about getting these packages installed?
Thanks.
Answer: I just created a fresh wheezy instance and performed a "apt-get install libc6-dev" without issue. I think one of your other packages is contributing to the dependency conflict.
The injected kernel isn't connected to apt-get so it wouldn't cause a dependency installation issue.


Is it possible to extract frames from corrupted mp4?

Question: I have an mp4 file that I'm trying to recover. The file is missing a moov atom. I've tried all the usual utilities like ffmpeg, remoover, untrunc but all of them failed. I'm wondering now if it is at all possible to just extract a few frames from the video. It is timestamped security footage so any frames I could pull could be useful.
Answer: Try TMPG Smart Renderer https://tmpgenc.pegasys-inc.com/en/product/tmsr5.html
If anything is recoverable, this tool should work. If it can't pull anything from the file, I don't know of any other tool that would. The trial version should work fine for you to get what you need.


Fast learning cycle, how to keep up with it?

Question: Recently I joined a small company as my first job out of college. Being a small company, the learning cycle is incredibly fast. I have to learn new technologies frequently and use them. When I look back at the last year, it seems I have come through working in a lot of technologies without me even realizing it. My question is will this really help me in the long term? And generally how does one keep up with it ?
Comment: Judgement on good or bad is out of scope for this SE.
Comment: You get used to it.  I've never worked at a huge software place (Microsoft, Blizzard, Google, etc) but everywhere I have the use of new technologies is always pretty fast.  It's how you stay current honestly.
Answer: I'd say it's a good thing.  The alternative being sinking in and really learning something in great detail in essence specializing you in that task.  Specialists are great, and sometimes they are necessary to figure out some problem that is highly specific to a platform only someone who has used the platform for many years would know.  However, the problem with specializing is when that technology is phased out and replaced, essentially so is your job if you don't move on and learn something new.
As a first job out of college it would be ideal to dip your feet into as many technologies as possible to see if anything really sparks your interest to attempt to specialize in, if not there is nothing wrong with continuing to be a jack of all trades.
As far as how to cope with it, just take everything 1 step at a time, solve the problems at hand.  Many times you can solve a problem without learning the entire scope of the tool used.  It may bite you later, but thus is life and will be an important learning experience for what to look out for in the future.  I think when learning a new technology you can only sit and learn so much before you just have to take a stab at solving your problem with what you know and then reflecting on whether it was a good solution afterwards.
Answer: It doesn't hurt. Getting involved with new technologies and being able to pick up and learn new things on a whim are important traits in any field imo. It's invaluable and it's better than the flip side which is someone who's so stuck in what they do that they have no motivation to learn something new.
Keeping your skill list for your resume up-to-date is more worrisome in this type of work environment ^_^.


L-functions and algebraic geometry

Question: Robert Langlands commented in a letter to Deligne that perhaps some of the deepest problems of algebraic geometry lie in L-functions. I want to understand the general philosophy and the connection between L-functions and algebraic geometry beyond the well-know Weil conjectures. L-functions encode something about counting points on varieties in weil conjectures. What similiar things are done by the other kinds ie. a general motivic L-function
Comment: Did you have a look at this?
http://mathoverflow.net/questions/119326/understanding-the-idea-behind-langlands
Comment: There are lots of articles and books and such on the "general philosophy" of $L$-functions from various points of view.  You might want to ask something a little more pointed.  For example, are you perhaps asking about what algebreo-geometric information can be gleaned from $L$-functions?  The Weil conjectures you mention, for example, say that $L$-functions encode something about counting points on varieties.
Comment: yes, i had but how does it help in algebraic geometric problems
Comment: yes that's i am asking
Answer: The book "Introduction to the Langlands program" (edited by Bernstein and Gelbart, 2003) contains articles by Bump, Cogdell, Gaitsgory, Kowalski, Kudla and Shalit on various topics pertaining this very subject.
Answer: In the general philosophy I don't know much about the connection between an $L$-function and algebro-geometric questions, but there is a big relation lying behind theory of automorphic $L$-function and $L$-functions arising from problems of Arithmetic geometry; namely Langlands functoriality which was started by Langlands to establish non-abelian class field theory and reciprocity. The conjecture can be described roughly as follows:
To every $L$-homomorphism $\phi:H^L\to G^L$ between to L-groups of quasi-split reductive groups H and G, there exists a natural
lifting or transfer of automorphic representations of H to those of G.
Another conjecture: Let $G$ be a connected, quasi-split reductive group over a number field $F$. Let $\pi=\otimes'_{v \ places}\pi_v$ be a cuspidal automorphic representation of $G(\mathbb{A}_F)$ ($\mathbb{A}_F$ adele ring of $F$ and $\otimes'$ is restricted tensor product). Consider the canonical homomorphism $\xi_v:G(F_v)\to G(F)$ and for a finite dimensional representation $r$ of $G^L$ define $r_v=r\circ\xi_v$. Now the local Langlands $L$ function is defined by$$L_v(s, \pi_v,r_v)=\det(I-r_vc(\pi_v)q_v^{-s})^{-1},$$ where $q_v$ is the order of the residue field $\mathcal{O}_v(F)/\mathcal{p}_v$, $\mathcal{p}_v$ is the maximal ideal. Now if $S$ is a finite set (carefully chosen to avoid ramification) of places of $F$ Langlands conjecture says:
$$L_S(s,\pi,r)=\prod_{v\notin S}L_v(s,\pi_v,r_v)$$ has a meromorphic continuation to the whole
complex plane and satisfies a standard functional equation.
Artin $L$-function is a motivic $L$-function you can think of. An Artin $L$-function $L(\rho,s)$ of some Galois representation $\rho$ is conjecturally (Artin conjecture) analytic over whole complex plane, for every non-trivial irreducible representation $\rho$. Langlands showed that, an automorphic representation of $GL_n(\mathbb{A})$ can be associated to every $n$-dimensional representation of a Galois group, also the associated automorphic representation will be cuspidal if the Galois representation is irreducible. Langlands attached automorphic L-functions to these automorphic representations, and conjectured (reciprocity conjecture) that every Artin $L$-function arising from a finite-dimensional representation of the Galois group of a number field is equal to one arising from an automorphic cuspidal representation.

L-functions and algebraic geometry


The rounded corners Ajax effect is useful for?

Question: I still don't get the point of investing some coding time to add this effect even knowing that it will (probably) not be compatible with all the web browsers available out there. I want to hear your opinions.
Comment: What do rounded corners have to do with Ajax?
Answer: The same reason your toilet seat isn't square.  Round just feels better.
Comment: That's 'cause the toilet really feels better XD
Answer: So you don't hurt yourself trying to create your own.
You see, awhile back as rounded corners grew in popularity, a series of unfortunate accidents occurred.  As newer, less experienced designers and developers were seeing the rise in popularity of rounded corners, they saw it as being time to upgrade their square corners.
Sadly in their excitement, they took for granted the safety needed in working with sharp square corners. At this time a single monitor setup was more the norm.  So as they flipped back and forth between their design tool and the tutorial, tragedy struck.
The community took notice, and knew something had to be done. "This must be automated! And to make sure people find it quicker, tell them its AJAX that's preforming the magic."
And the rest is history my friend.
Answer: Graphic design?..
Answer: just to give a good graphical look to your web.
Answer: Presentation? corporate ID? Layout? Nice to have?
Answer: To engage your users... Or you could save some real coding time and just go with plain old text.


How to get notifications when a donation is made to my non-profit on Facebook

Question: A donation was made to a non-Profit via a Facebook page I manage and we didn't know about it until over a month later when Facebook sent a "Payments Remittance" email. We would like to be notified the instant a donation is made to us, but it doesn't appear there is a way to do so. In page settings you can download transaction reports but obviously that isn't convenient.
Answer: I asked Facebook Support and they replied with the information below. If anyone in the future finds out they have enabled these types of notifications, please post a new answer and I'll mark it as the solution.

The functionality you're requesting is currently unavailable. Please note that I have forwarded your feedback to the appropriate team. We appreciate your patience and understanding as we work to enhance our product.
However, if you'd like to check to see how much has been donated to date, you have access to two types of reports in the Publishing Tools section of your Page Admin view. Donation reports are updated at the end of each day.
Daily Transaction Report - This report includes detailed information on each donation made to your organization, whether through the Donate button or through a fundraiser. This report includes fields like First Name, Last Name, Amount Donated and Email Address (if the donor decides to share it). These are updated daily, but won't show up on your report for 48 hours. For example, a donation made on January 1, 2019 will appear in a report available for download after January 3, 2019.
Payout Report - This report shows the funds that will be transferred into your account and are available at the end of every bi-weekly period. The resulting payout occurs about two weeks after the end of the donation period (if your organization has accrued at least $100 in donations). If you haven't accrued $100 in donations in a given period, the amount you've raised will roll over into the next two-week period, until you have accrued $100 in donations.
To access these reports:

Go to Publishing Tools on the top of the page.
Select Donation Settings on the left side of the page.
Click Download Donation Reports.
Note: These reports are downloaded as a .cvs file.

Thanks,
[redacted name]
  Facebook Payments Specialist


Time Series Stationary or Not

Question: Here is my time series plot of some data. There appears to be a constant variance, but I don't believe that the mean is constant (e.g., big dip around time $t=17$ and big increase around time $t = 57$). Is it correct for me to say that this time series does not have a constant mean, but it does have a constant variance? I am a beginner to time series analysis.
Answer: If you are a beginner to the time Sseries topic: I would advise you to someone, who has the same charm as Josh Starmer:
He is known under the channel ritvikmath:
https://www.youtube.com/watch?v=oY-j2Wof51c&t=6s
You should check if your series is stationary by applying visual, global/local tests of rolling windows (e.g. mean,variance) but the better would be a statistical test. Thus, I would advise you to check this video, and the video on

white noise

If you then still dont know how to deal with your time series, we are pleased to help you. But I would advise to first look into a few of his incredible vids.

Time Series Stationary or Not


Tomcat will start if I log into remote server directly and invoke it, but not when I try to invoke it via a remote command using ssh

Question: I am trying to start tomcat by invoking the ./start script under the tomcat_user dir. It works when I log into server directly and invoke /home/tomcat_user/start, but it doesn't if I use this from a different host:
ssh user@server '/home/tomcat_user/start'

I believe it has something to do with the files that get executed at the beginning (maybe like environment variables and such) being different when logging into remote server directly vs doing from within ssh like above.
Is there a way to achieve the same exact behavior for logging directly to server and executing a remote command using ssh like above to automate the logging part?
Thank you very much.

OK, after reading about nohup, while it's a great explanation, I am afraid it's not the problem here, since tomcat doesn't seem to get started to begin with (and not getting killed when the ssh is over (I actually do a sleep 500 at the end of the command passed to ssh, but still tomcat wouldn't start)). The more I think about it, the more I think it's env variables, but I don't exactly know what. There is no .bashrc, or .profile in tomcat_user home directory and I am not too familiar with them.
My reason for saying it's env variables is that when I login directly and start tomcat the console writes all the env varialbes (such as TOMCAT_HOME, CATALINA_HOME, JAVA_HOME, etc), and then it says "Starting tomcat", but when I do it via ssh, none of the env variables gets printed. I only get "Starting tomcat". I guess I can set those variables in my ssh script easily enough, but I am not sure if those are the only variables, so that's why I was wondering if I can mimic the same exact behavior of logging directly, within my script passed to ssh.
Still confused and not sure how to proceed. Help is appreciated!
Thanks,

When trying to start tomcat with nohup start& seems like it can't proceed, as it prints out the usage (not sure how to interpret the usage and how to start tomcat. Am I supposed to use the start differently to start tomcat?). Here is the content of nohup.out:
Starting tomcat_user...
Using CATALINA_BASE:   /prod/web/edmsserv/current
Using CATALINA_HOME:   /opt/tomcat-6.0.18
Using CATALINA_TMPDIR: /prod/web/edmsserv/current/temp
Using CATALINA_OPTS:   -DappName=edmsserv -server -Xmx768m -XX:PermSize=256m -XX:MaxPermSize=256m    -DEXPD_APPL_DOMAIN=QA    -XX:+UseG1GC    -XX:+UnlockExperimentalVMOptions    -XX:-UseStringCache    -XX:+AggressiveOpts    -XX:MaxInlineSize=75    -XX:FreqInlineSize=700    -XX:InterpreterProfilePercentage=10    -XX:CompileThreshold=20000    -XX:OnStackReplacePercentage=80    -XX:ReservedCodeCacheSize=128m    -XX:AllocatePrefetchStyle=2    -XX:AllocatePrefetchDistance=896    -Dsun.rmi.dgc.client.gcInterval=28800000    -Dsun.rmi.dgc.server.gcInterval=28800000    -verbose:gc    -XX:+PrintGCDetails    -XX:+PrintGCTimeStamps    -Dsun.net.inetaddr.ttl=0    -Dcom.sun.management.jmxremote    -Dcom.sun.management.jmxremote.authenticate=true    -Dcom.sun.management.jmxremote.port=26236    -Dcom.sun.management.jmxremote.access.file=/export/home/edmsserv/.jmxremote.access    -Dcom.sun.management.jmxremote.password.file=/export/home/edmsserv/.jmxremote.password    -Dcom.sun.management.jmxremote.ssl=false
Using CLASSPATH:       :/opt/tomcat-6.0.18/bin/bootstrap.jar:/export/home/db2inst3/sqllib/java/db2jcc.jar:/export/home/db2inst3/sqllib/java/sqlj.zip:/export/home/db2inst3/sqllib/function:/export/home/db2inst3/sqllib/java/db2jcc_license_cu.jar:.:
Using JRE_HOME:       /opt/java-1.6.0_26
usage:  pargs [-acexF] { pid | core } ...
(show process arguments and environment)
-a: show process arguments (default)
-c: interpret characters as 7-bit ascii regardless of locale
-e: show environment variables
-l: display arguments as command line
-x: show aux vector entries
-F: force grabbing of the target process
Comment: What is the error you see when trying to run the start script over ssh?
Comment: Can you confirm that the variables are being exported in the script ? Eg "export TOMCAT_HOME=/usr/tomcat/blah"

Versus only  "TOMCAT_HOME=/usr/tomcat/blah"
Answer: Can you try the following command instead ?
ssh user@server 'cd /home/tomcat_user ; nohup /home/tomcat_user/start &'
This will create a nohup.out file under /home/tomcat_user. Ideally this command should solve the problem ; if not, the nohup.out will provide details regarding why it failed.
If I recall correctly, ssh should initialize the env variables. If you think environment variables are causing an issue, issue the following command to run the startup script (assuming you are using bash shell).
ssh user@server 'cd /home/tomcat_user ; . ./bash_profile ; nohup /home/tomcat_user/start &'
Comment: Thank you very much for your fast response. I will try this Monday first thing in the morning. The problems seems to be along the line of variables (or whatever else happens during initialization) are not set/initialized correctly.
Comment: OK, after reading about nohup, while it's a great explanation, I am afraid it's not the problem here, since tomcat doesn't seem to get started to begin with (and not getting killed when the ssh is over (I actually do a sleep 500 at the end of the command passed to ssh, but still tomcat wouldn't restart)).
Comment: What is the content of nohup.out ? It should list out the failure.
Comment: The contents of nohup.out doesn't print here well. I added it to the initial question. Please see above.
Comment: Just took a look at the nohup.out but that does not tell much. Cant really tell why its executing pargs. I am wondering whether it cannot find JAVA_HOME. How is JAVA_HOME being set ?


What is Typical Variation Normalization?

Question: I was reading this paper and came across a term "Typical Variation Normalization". What does that mean intuitively and formally? Any resources I can refer to know more about it?
Answer: I suggest going straight to the source and giving the Google paper a read on it (including the TVN paragraph in the appendix), as well as the CORAL paper which underlies it:

https://www.biorxiv.org/content/10.1101/161422v1.full
https://www.aaai.org/ocs/index.php/AAAI/AAAI16/paper/download/12443/11842

Intuitively, there's a few assumptions + constraints that I believe go into it:

The image embedding statistics are dominated by "nuisance" variations (the differences we care about have smaller variance relatively speaking),
There are negative controls across the axes of batch variation (ex: plates),
If we fit a TVN transform to these negative controls, then this will generalize to non-negative controls. This may or may not be true depending on the nature of your data and embedding space.

TVN you can think of as 2 parts:

fit: using just the negative controls (which are assumed to have origins aligned), we fit a PCA to the entire bulk of negative controls which can be used to whiten the variances of this bulk distribution. We also compute covariance matrices: 1 on the bulk of negative controls (call it C_all), as well as 1 per subgroup of negative controls (call it C_i)
transform: For condition i, we can transform to the learned PCA basis (to get rid of the strong variations we captured by learning the PCA), then we can align correlations by first using C_i to whiten (correlations this time, not just variances) and then C_all to recolour (removing correlations and then adding other ones - see CORAL paper for details).

PS: awesome seeing you here Vasu! :)


What is the expected CP after evolving an Eevee with 376 CP?

Question: I am playing Pokemon GO and have caught an Eevee with 376 CP. How high will its CP be after evolving?
Answer: This is a difficult question to answer without knowing how the server generates Pokemon evolutions but I'll try and push you to the answer you need.
Behind your Pokemon you will see a semicircle with a dot on it, this indicated what percentage your Pokemon is to achieving it's maximum cp (This number changes every profile level-up). your Eevee might for example have a max cp of 400 so your percentage would be around 93.75% of your Pokemon's maximum. Now when you evolve a Pokemon what happens is the new Pokemon gets that percentage applied to it (93.75%) but since it will now have a higher maximum cp, for example 1000, It's new cp will be 93.75% of 1000.
Now taking this into account, we don't actually know yet how the Pokemon's max cp scales with accounts, we can only guess, but it will be scaled to your pre-evolution Pokemon
Answer: After Evolution you can expect an increase of ~150%*. In your case your Eevee (Vaporeon, Jolteon or Flareon) should have around 1000 CP*.
* Based on own game experience. (This only applies to Eevee.)
Comment: Yes, you missed the original CP. 564 + 376 = 940. It's increased *by* 150%.
Comment: @CarlKevinson If you want to treat it like that, it's ~2.5x the pre-evolved strength, or ~250%, then your maths make sense. I never did like math word problems in high school... They always tricked me.
Comment: 150% of 376 is 564.  Am I missing something that would make it 1000?


Defining an open submanifold with boundary - John Lee book's proposition and exercise

Question:
Above is from p.13 of John Lee's Introduction to Smooth Manifolds. I am curious if this proposition also holds when $M$ is a topological manifold with boundary, thus making it into a smooth manifold with boundary. I am quite suspicious, but not certain. I question this because I think I have to apply the above proposition to the exercise presented below. I think the atlas mentioned in (a) of Exercise 1.44 below is a smooth atlas for $U$. So, by the direction "define a smooth structure on U", does it mean that I have to apply the proposition 1.17 to this exercise?
Answer: I think I see your confusion. The way this proposition is phrased is a bit misleading. In part (a), the phrase "Every smooth atlas" is implicitly assuming that $M$ has a smooth atlas--otherwise part (a) doesn't apply. That is, all the topological manifolds in this proposition are secretly smooth manifolds.
To answer your second question, this proposition should be true for topological manifolds with boundary, but ${ \bf beware}$: Just as not all topological manifolds can be given a smooth structure, not all topological manifolds with boundary can be given the structure of a smooth manifold with boundary (Can you think of an example?).
To do the exercise, you will need to invoke the (manifold with boundary version of) the proposition to say that the suggested atlas determines a unique "manifold with boundary" structure on $U$. Note that you still need to show that the suggested atlas is actually an atlas in order for the proposition to apply.