While learning about boolean algebra I came across this expression: $\{ 0,1 \}^n$. Given the context I understand that this is a set containing the values $0$ and $1$, but what the exponent here means is less clear, which leads me to my question: What does the exponent signify when the base is a set?
I'm reading .     The graph of $f: A \rightarrow B$ is the subset of $A × B$ consisting   of all ordered pairs $(a, b)$ with $f (a) = b$. If $A$ happens to be   $B^n$ for some $n ∈ N$, then we say that $f$ is a function on $B$ and   $n$ is the arity of $f$.   I don't understand the notation for the exponent of a set, I'm aware of what  is, it's the number of arguments or operands the function takes. I'm just not so sure if I can assume that a set with an exponent such as in $B^n$ means that a function has two operands.  I know the question may be too naive and perhapes the answer is the one I suggested and it's right in front of my face, I'm just searching for a confirmation or the negation of it. Thanks.
Changing timezone in PHP Alright, quick question.  A server is running in Eastern Time. PHP program needs to make date calculations using Central time.  At the moment, I am putting this line at the very top of my script:  putenv("TZ=US/Central");   Is that the best way to go about that or is there some PHP trick I'm not aware of?  Cheers. Does potential energy in gravitationall field increase mass? adding @2x to src above certain resolution on none retina devices Windows 10 has an extensive collection of lock screen photos, many of which have  here on Travel.SE.  Is there a website which lists the location of all of these photos? I imagine Microsoft has purchased an official license, so they should have a record about the photographer and the place where the photo was taken. How to install Chrome browser properly via command line? I am trying to install chrome browser via command line.  I tried this:  $ apt-cache search chrome browser   The results show that the proper term is "chrome-browser," so I tried that:  $ sudo apt-get install chrome-browser   And then "Y" for the Y/n question.  But the installation threw errors.  Does someone see anything wrong with the commands I issued? If $a\neq 1$, find $(a+1)(a^2+1)(a^4+1)\ldots(a^{2^n}+1)$. If $a\neq 1$, find $$(a+1)(a^2+1)(a^4+1)\ldots(a^{2^n}+1)$$   Or i.e.     If $a\neq 1$, find $\prod_{i=0}^n(a^{2^i}+1)$.   It really does seem like $$(a+1)(a^2+1)(a^4+1)\ldots(a^{2^n}+1)=a^{2^n+2^{n-1}+\ldots+2+1}+a^{2^n+2^{n-1}+\ldots+2+1-1}+a^{2^n+2^{n-1}+\ldots+2+1-2}+\ldots+a^2+a+1$$  Or i.e. $$\prod_{i=0}^n(a^{2^i}+1)=\sum_{i=0}^{2^n+2^{n-1}+\ldots+2+1}a^i$$  Is there an interesting proof of this? I'd appreciate any help. If you have a glass of water, say, three quarters full and you pour it at an angle of say, $45^{\circ}$ with respect to the the table, the water comes out of the glass and goes directly down towards the floor.  However, when the glass is more full, or even three quarters full and the 'angle of pouring' is far less with respect the table, when the water comes out of the glass, rather than going straight down it kind of stays stuck to the glass and travels down the outside of it.  Why does this happen? (I'm sure many of you have observed it yourself by accident and ended up making a mess). Which pronoun to refer to "person"? It? He or She? They? "When he found his seat on the plane, Sam recognized the person who was sitting in the seat next to his. It? She? was a woman he knew."  Which is more common/natural? Isn't 'it' more correct – grammatically speaking – than 'she', since 'a person' can be a 'he' or a 'she', and obviously you cannot use the singular 'they' here? Why was "An Update to our Community and an Apology" deleted? Recently, Sara Chipps posted her message . After reading it, I wanted to compare it with . It turns out that she deleted it. Does anyone know why? It looks strange since (as far as remember) it was a sort of official position of SE. Why would such a statement be deleted? We encountered a Vampire Spawn in the 10-foot-high basement of an old church. The first strike was mine, after which the creature attacked my ally and retreated onto the ceiling as the thundering roar of my Booming Blade punished its retreat. Still inexperienced and unsure about my reach, after a short consultation with my mind, I decided to spend my turn switching to my trusty crossbow and make some distance.  However this turned out to be a mistake, since right after, the creature was in in my face trying to gouge out my eyes. Due to my nimbleness I managed to avoid its attacks. Regretting my earlier choice to change weapons I was left with the options to switch weapons and miss another turn, attack with disadvantage, or use my crossbow as an improvised melee weapon and trust in Booming Blade to hold the enemy in place after I disengaged.  Perhaps I should have switched weapons, but I decided that 1d4 (improvised weapon) + 1 (magic ring) + 1d8 (booming blade) was good enough. I missed.  On the plus side, it was my crossbow's sneak attack assisted bolt that finally slayed the Vampire by piercing its heart.    In this situation, would it have been possible to just attack upwards instead of changing to the crossbow?  In session, this was something to be looked up later and decided against, but I haven't found any rules on attacking in 3D.  With me being more than 5 feet in height and my melee attack range considered to be 5 feet, I should have been able to reach the ceiling itself, not to mention the Vampire Spawn hanging from it.    As for exact measurements (read this part only if you enjoy pointlessly over-analyzing things):  My character is 5 feet 6 inches/5.5 feet, which gives an  (for a human, my character is a Kenku), . This should give me a height of 8.3 to 8.9 feet from standing statically.    Testing it in real life, my estimated and standing reach match to less than 0.2 inches of the estimation on the site and I'm just shy of reaching my ceiling standing statically. As a test I tried moving as if I was attacking my ceiling and based on where I could feel my hand touch the ceiling, the length of my fingers and how much distance I lacked to reach my ceiling, I estimate about 0.4 feet in additional height. Considering that I'm taller than my character, let's say that gives 0.3 feet, increasing the height to 8.6 - 9.2 feet and that's still without changing how you hold the handle of the sword. In addition, just lying on the ground, my torso and legs measure about 0.6 feet.  Because my Kenku isn't a human, only a humanoid, it's impossible to estimate arm length which influences standing reach, however, considering that birds usually have a high wingspan and long legs, I think it's reasonable to assume that the arms should be as long, if not longer than, a human's.    So that would require the Vampire Spawn to be flat against the ceiling without any parts hanging down more than 0.2 to 0.8 feet for it to be outside of my reach. I consider that unlikely.  What are the actual rules for this type of scenario, or how do you handle it in your group? Should I be allowed to melee attack an enemy that's on a ceiling or low in the air? Inspired by this ....  I am the sole person using my system with 12.04. Every time I issue a sudo command; the system asks for the user password (which is good in its own way).  However I was thinking; without activating the root account; how can I execute the sudo commands which will not ask for user password to authenticate.  NOTE: I want to execute sudo command without authenticating via password; only when they are executed via terminal. I don't want to remove this extra layer of security from other functions such a while using 'Ubuntu software center' or executing a bash script by drag-drop something.sh file to the terminal. What does the tilde (~) mean at the end of a filename? What is the file with the ~ at the end of the filename for?  $ ls # aliased to add flags -rwxrwxr-x  1 durrantm  2741 May 16 09:28 strip_out_rspec_prep_cmds.sh~* drwxrwxr-x 13 durrantm  4096 May 16 14:21 ../ -rwxrwxr-x  1 durrantm  2221 May 16 14:58 strip_out_rspec_prep_cmds.sh*   This is not the same as .swp files which are there while editing.  The two files have quite a few differences and the newer file (no ~ at the end) has the most recent changes and those changes are not in the older (~) file.  Looks like I can delete it? How to delete a full stop on reference ending According to APA rules, after each reference there must the digital object identification (doi). I use JabRef as a reference manager and for some reason, if I put an article doi on its "doi" field, it won't show up after the build on my editor, but if I put the doi on its "note" field it shows up. However, it's adding a period after the note field. I need a way to have the reference without an ending period.  Here's the LaTex document. I use TexPad as my editor.  \documentclass[12pt,a4paper,oneside]{report} \usepackage[utf8]{inputenc} \usepackage[portuguese, english]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[sort, longnamesfirst]{natbib} \usepackage[strings]{underscore} \bibliographystyle{newapa}  \usepackage{sectsty} \chapterfont{\fontsize{14}{15}\selectfont} \sectionfont{\fontsize{12}{15}\selectfont} \subsectionfont{\fontsize{12}{15}\selectfont} \renewcommand\bibsection{\section*{Referências}} \bibpunct[:\ ]{(}{)}{;}{a}{,}{,}  \title{} \date{} \makeindex  \begin{document}  \cite{aldous-newviewsgrandparents-1995}  \bibliography{/Users/Ricardo/Documents/Ricardo/library2.bib}  \end{document}   It produces this:     Aldous, J. (1995). New views of grandparents in intergenera- tional   context. Journal of Family Issues, 16(1), 104–122. doi:   10.1177/019251395016001006.   I need that last period out.  Thanks. If you copy the contents of   httpd.conf   and then paste it into a cat command.. such as this one..  #!/bin/bash cat &gt; /test &lt;&lt; EOF pasted here.. EOF   you run into this error:  -bash: command substitution: line 1: unexpected EOF while looking for matching `'' -bash: command substitution: line 4: syntax error: unexpected end of file   perhaps the solution is to escape the dollar signs and maybe even quotes and so on..  but given that this is such a large file.. can dollar signs be automatically be escaped ?  is my only option to escape them via another program and then give it to the cat command ? My regex is matching too much. How do I make it stop? I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}? I remember a story I have read buy could not remember the author the name or anything apart from the basic plot. The story is about some future where humanity has to fight with some aliens (not 100% sure). The story tells about a guy who was some kind of activist and who was in a prison two or more times and somehow helped humanity by being held in a prison (can't remember details). I think the story starts by saying that there is a statue in his honor that is not very well known but he did more to help humanity than famous politicians.   The story is most likely written by some famous English-speaking author, though I read it in a translation. In Markov inequality proof, why is $\int_a^\infty xp(x) \, dx \ge \int_a^\infty ap(x) \, dx$ Markov inequality,   $$\Pr(X \ge a) \le \frac{E[x]}{a}$$  Proof  $$\begin{aligned}      E(X) &amp;= \int_0^\infty xp(x)\,dx = \int_0^a xp(x)\,dx + \int_a^\infty xp(x)\,dx \\       &amp;\ge \int_a^\infty xp(x)\,dx \ge \int_a^\infty ap(x) \, dx  \end{aligned}$$  Why is the last inequality true? Why is it ok to change $x$ to $a$, and we know it is less than or equal to? How did they figure it out? Thanks! I recently installed Ubuntu Server edition 13.10 (Saucy Salamander). But I have run into a bit of problem. At the end of the installation, it asks about several extra packages whether you want them or not, like OpenSSH server and virtual machine host. Here's what I'm looking at:  Now, my problem is that I can't remember if I have checked the &quot;virtual machine host&quot; checkbox. How do I check if my server has the corresponding packages? What packages come with the virtual machine host? I have a point layer in QGIS. Each point represents a tree and each tree has information about its height as an attribute. I would like to build a query/expression to select all those trees that have an other tree higher than 7 meters within their 20-meter-buffer (20 meter radius).  I managed to do this "manually" by creating a 20-meter-buffer around all trees higher than 7 meters (after the selection of the trees higher than 7 meters) and then selected the ones within the buffer but I was wondering if its possible with a query/expression.  (maybe with a bit more complex one)  Unfortunately I do not have PostGIS so this should be done with Select by expression or Query Builder if possible.  (It would be also helpful to know if it's simply impossible) DKIM sign outgoing mail from any domain (with Postfix and Ubuntu) I got DKIM setup on my mail server (postfix and ubuntu) so it signs outgoing emails.  I used these instructions:   However, I need it to sign emails from any domain (in the From address) and not just my own.  I'm building an email newsletter service and clients will be sending their own email through the server.  First I set "Domain *" in /etc/dkim-filter.conf.  This got it to include the DKIM headers in all outgoing emails, no matter what the domain.  However, the verification check fails on gmail because it is checking the domain in the from address, and not my domain (and dns record).  Does anyone know how to do this?