When you are standing in a running train if you jump means will you be in same place or will you be in front or back?
A Basic Question about Gravity, Inertia or Momentum or something along those lines
"Least Astonishment" and the Mutable Default Argument Suppose I want a strong 20-bit blockcipher.  In other words, I want a function that takes a key (suppose the key is 128 bits), and implements a permutation from 20 bits to 20 bits.  The set of permutations should be close to a randomly-chosen subset of size $2^{128}$ of all $2^{20}!$ permutations on 20 bits.  I don't want you to build a new blockcipher from scratch.  Instead, assume you have a "strong" blockcipher like AES (128-bit blocksize, 128-bit keysize) and use this to build your 20-bit cipher.   Of course, your construction should be practical (i.e., you should be able to run it in both directions with reasonable amounts of time and memory). Is there a definition of  and proper explanation of it?  It is said "Electric charge is the physical property of matter that causes it to experience a force when close to other electrically charged matter."  How is it though that matter can get charged?  Defining charge as the property of feeling a force with other charged matter seems circular.  What is charge?  Is there a non-circular definition / explanation? What does $\dot\sim$ notation (dot over tilde) mean, in the context like $x \mathrel{\dot\sim} \mathcal N(0,1)$?  Turns out it is easier to find how to typeset it correctly:  that one should type \mathrel{\dot\sim} instead of simply \dot\sim to fix the spacing issue -- than to find what it actually means. It has only been used  on CV until now; is it standard? Internal "get/set" function of property? Here is my test code and picture:  import bpy   # Simple property reading/writing from ID properties. # This is what the RNA would do internally. def get_float(self):     return self["testprop"]   def set_float(self, value):     self["testprop"] = value  #bpy.types.Scene.test_float = bpy.props.FloatProperty(get=get_float,set=set_float) bpy.types.Scene.test_float = bpy.props.FloatProperty()   bpy.context.scene.test_float = 12.34     When I don't explicitly set the "get/set" function for my property, after assigning the value, I can get the property value by 'scene["test_float"]', but if I explicitly set the "get/set" function, then if I try to type in the same commands, I will receive a error "KeyError: 'bpy_struct[key]: key "test_float" not found'" . So what should I do to get the same results by using explicitly  "get/set" function? I was wondering why binary crossentropy can be used as the loss function in autoencoders trained on (normalized) images, e.g.  or ? I know that binary crossentropy can be used in binray classification problems where the ground-truth labels (i.e. $y$) are either 0 or 1 and therefore when predictions (i.e. $p$) are correct, in both cases, the loss value would be zero:  $$ BCE(y,p) = -y.log(p) - (1-y).\log{(1-p)} $$  $$ BCE(0,0) = 0, BCE(1,1) = 0 $$  However, binary crossentropy does not have a value of zero when neither of its arguments are both zero or one, which is the case for an autoencoder with ground-truth labels in range $[0,1]$ (i.e. assuming the input data has been normalized in this range). I thought a regression loss function such as mean squared error or mean absolute error must be used instead, which have a value of zero when labels and predictions are the same. What am I missing here? How to prove that $L=${$a^p$: p is prime} isn't regular? I tried using pumping lemma or finding infinite equivalence classes, but I didn't succeed.  It's clear to me that there is no automata that accepts this language, but I just can't formally prove that this language isn't regular.  How can you prove it? I know how to rename files in Unix:  $ mv ~/folder/subfolder/file.txt ~/folder/subfolder/file.sh       ^-------this part------^    ^------this part-------^   It takes too long time to repeat ~/folder/subfolder/file twice.  Is there a quicker way? When "Questions that may already have your answer" (similar questions) appear as a right column, it overflows and overlaps the footer.  (shown in the figure)        This happens on all SE network sites on which I have asked questions.  Also this happens to other columns also like "How to Format". Print total free memory from `free -m` free -m currently puts out something like this.     I would like to know using grep/awk how we can get the total free amount. i.e. 9083 If $r,s,t$ are prime numbers and $p,q$ positive integers s.t. $\text{lcm}(p,q)$ is $r^2s^4t^2$, then the number of ordered pairs $(p,q)$ is? If $r,s,t$ are prime numbers and $p,q$ are the positive integers such that LCM of $p,q$ is $r^2s^4t^2$, then the number of ordered pairs $(p,q)$ is?  My attempt to the solution:  Let $r^a s^b t^c$ be the LCM where $a=2,b=4,c=2$  Then the cases that arise are  I case   1) $p$ has $r^as^bt^c$ then there are a total of $(2+1)(4+1)(2+1)$ options  II case   1) $p$ has $r^as^b$ or $s^bt^c$,$r^at^c$ then there are total of $(2+1)(4+1)(2+1)(3)$ options.  The answers comes out to be $45*4$ but the answer is $45*5$. Which case am I missing? revtex4-1 and colortbl doesn't fill cells The MWE below shows that the \cellcolor command doesn't properly fill a table cell in revtex4-1 where it would do so in a simple article. Can anyone help me get fills that extend to the boundaries of my cells in revtex4-1?    \documentclass{revtex4-1} \usepackage{colortbl} \begin{document} \begin{tabular}{ |c|l|l| } \hline \rowcolor{red} A    &amp; B     &amp; C     \\ \hline Hello World         &amp; other     &amp; \cellcolor{blue}stuff\\ \hline \end{tabular} \end{document} Word for someone who pays attention to details How does Ethernet know how long a frame is? Start new chapter on same page So when we view reputation, there is graph view. However, it seems to be off by a day. Here's what I mean:   I'm sure 70 + 20 + 15 is not 15. Its 105, which is what we see below:   And 40 + 10 is NOT 105, unless you did  :)     Anyways 40 + 10 is 50:   So yeah. Did you do what that post on codegolf says? Devs better fix that :) I lost the sa password on a machine, and when I log in to the machine directly using an account in the admin group, SQL Server Management Studio will not allow me to log in using Windows authentication.  My plan was to simply log into the server, connect via Windows Authentication, and reset sa to use a new password. Since I cant' connect via Windows Authentication, this won't work.  How else can I reset the sa password? SQL query to convert columns into rows "This box of matches is empty" There are several Japanese books teaching Japanese students how to write in English. I found this example in  (Correcting Errors in English Composition Manuals) by Michio Kawakami and J.D. Monkman.  The authors of this book claim that this sentence is incorrect:     This box of matches is empty.   They note that a “box of matches” is a box containing matches (and not a box made for keeping matches), hence the sentence should instead be:     This matchbox is empty.   Likewise, an “empty bottle of beer” should instead be an “empty beer bottle.”  Is this actually an error that I should avoid in writing English? If so, is it a grammatical error or something else? A game called  is making rounds on social media. I am trying to determine the maximum score attainable for this game.  Let's assume WLOG that only 2s are returned (if 4s are possible the max score is doubled).  First, I'll relax some of the rules to create a game, $\mathcal{G}$, that can achieve a score at least as high as the original, 2048 game.  A run $R$  of $\mathcal{G}_n$ consists of a sequence of moves $m_1,\ldots,m_k$ which manipulate a multiset, $\mathcal{S}$ of maximum size n.  Each $m_i$ is either:   a put $p$, which inserts a 2 into $\mathcal{S}$, or a merge, $\alpha_i$, which replaces two $2^i$ elements from $\mathcal{S}$ with a single $2^{i+1}$ elt.   I allow sequential moves of the same type because 2048 allows multiple merges or no-merge turns.  The score of a position is the sum of $\mathcal{S}$.  What is the maximum score possible on a game of order n?  Note: The final position must have only unique values, else a merge and put would be possible in increase score.  I claim it is $\sum_{i=1}^{n} 2^i$, but couldn't come up with any good induction arguments.  It's pretty easy to prove that an element $2^k$ is producible in a game $\mathcal{G}_k$, but proving an upper bound for production got a bit hairy, and also doesn't cover the full space.