What is the probability that there is at least one head and at least one tail? A coin is tossed three times. The probability of zero heads is 1/8 and the probability of zero tails is 1/8. What is the probability that there is at least one head and at least one tail?  So, if P(zero heads)= 1/8 , then that should be the same of p(all tails)?  We would use the complement rule and Multiplication Rule?   P(at least one head) = 1 - P(no heads) = 1 - 1/8= 7/8 P(at least one tail) = 1 - P(no tails) = 1 - 1/8= 7/8  would I multiply the two values?
What is the probability that all three tosses result in the same outcome? A coin is tossed three times: The probability of zero heads is 1/8 and the probability of zero tails is 1/8.  And my question is: What is the probability that all three tosses result in the same outcome?   So, if P(zero heads)= 1/8 , then that should be the same of p(all tails)?  If so, we could use the Addition Rule which is $P(A \cup B) = P(A) + P(B)$  where A and B are disjoint events, i.e. $A \cap B = \emptyset$, A is the event of tossing all heads and B is the event of tossing all tails.  I'm not sure how to continue after that... would the complement be used?
How can I use a command to delete all files in Downloads whose dates added are greater than 1 year? I am using a Mac. How can I use a command to delete all files in ~/Downloads whose dates added are greater than 1 year? How to reverse PCA and reconstruct original variables from several principal components? Principal component analysis (PCA) can be used for dimensionality reduction. After such dimensionality reduction is performed, how can one approximately reconstruct the original variables/features from a small number of principal components?  Alternatively, how can one remove or discard several principal components from the data?  In other words, how to reverse PCA?    Given that PCA is closely related to singular value decomposition (SVD), the same question can be asked as follows: how to reverse SVD? I have got the Client Cross Frame Scripting Attack alert in the recent CheckMarx scanner. However, it points to an auto generated ID.   I've seen the following links however, the I'm not sure about relavancy of the soluions given i.e.,          Regarding my visualforce component, I'm doing just one DML operation on a custom setting from a callout response. Also, I'm not passing any attribute to the component.   To give a background of the component, its just a list view of records from a different system retrieved through a callout on load via JavaScript.  Let me know if in case anything else is needed.   Thanks in Advance! Peace! pgfpages and section I'm making a Beamer presentation. I need to show some notes on a second screen, so I'm using pgfpages.  Whereas, when I put a section, it appears 2 times :/ Here, it's a minimal code with the problem. Have you any idea ?  \documentclass{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais]{babel}  \usepackage{pgfpages} \setbeameroption{show notes on second screen=right}    \begin{document} \begin{frame} \tableofcontents \end{frame}  \begin{frame} \section{test} toto \end{frame}  \end{document}   Thanks ! how to output text to both screen and file inside a shell script? Currently I have a shell script which logs messages to a log file like this:  log_file="/some/dir/log_file.log" echo "some text" &gt;&gt; $log_file do_some_command echo "more text" &gt;&gt; $log_file do_other_command   When executing this script, there is no output to screen, and, since I'm connecting to the server via putty, I have to open another connection and do "tail -f log_file_path.log", because I can't terminate the running script and I want to see the output in real time.  Obviously, what I want is that the text messages are printed on screen and into file, but I'd like to do it in one line, not two lines, one of which has no redirection to file.  How to achieve this? How can I join these two meshes in a proper way? I know I can Ctrl J to join them, but how can I do so without having overlapping faces? I'm on IBM AIX 7.1 where cURL and wget are not available. Also, I'm not in a position to install either.  Are there alternatives that would be available that would enable remote API calls using GET/POST? How might the weight of a falling object affect the damage it causes? Fall damage is 1d6 per 10 feet. What adjustments if any should I make for objects falling on a player character? (e.g. a bear)  Assuming the objects are meaningful threats but not instant character death, should the weight of an object change the calculation, e.g. more then 1d6 per 10 feet.  Or is this more in the spirit of improvising damage chart? i.e. the setback (cat to face) dangerous (orc fell on me), and deadly (the large bear).  If this is house-rule territory does any one have any experience or advice beyond  relevant to 5e. Python rounding error with float numbers Prove or find a counterexample: For all real numbers x and y it holds that x + y is irrational if, and only if, both x and y are irrational. The following is a Homework Question that I've been working on and I would like some feedback on my answer: Prove or find a counterexample: For all real numbers $x$ and $y$ it holds that $x + y$ is irrational if, and only if, both $x$ and $y$ are irrational.  So I've got (or at least like to think I've got) a counter example.  Let $x = 1$ and $y = \sqrt{2}$.   Thus $x$ is rational and $y$ is irrational. Adding $x$ and $y$ gives us $1 + \sqrt{2}$ which cannot be simplified any further (right?) and is an irrational number.  Thereby proving that $x + y$ can be irrational without both x and y being irrational.   Is this okay? Any feedback is greatly appreciated thank you! CentOS 7 DVD ISO vs Everything ISO different An image alt="" text should contain information about that image in the context of the page, so for instance if you have an article about cats on skateboards and then a photograph of the cat on his skateboard you'd probably give it the alt text of alt="Fluffy pulling some mad tricks on his pimped-out board".          &ndash; Wireframes created with   However, what should happen when that image is a link to a page (such as the Wikipedia cat page)?  I don't think there is any point using the title attribute here because screenreaders just ignore that when an alt attribute exists - the only people who would see the title attribute are mouse users who hover over the image, so that excludes keyboard only users too. It's not really any benefit to accessibility to include a title in this situation (Overall the title attribute is a bit useless really).  So, what should the image ALT text say in this case?   states:     Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language.    Therefore giving it the alt text of cat article page on Wikipedia is incorrect because that doesn't describe the image, neither does skateboarding cat image that links to the wikipedia article because the alt text should refer to the image itself, not the link associated with it. How can I access Apache (on VirtualBox guest) from host? I installed Apache on an Ubuntu VM. When I go into the guest and load up Firefox I can see that Apache is working fine when I browse to localhost.  I would like to access this same page through the host. I've tried using the IP address of the guest but nothing comes up. Ideally I would love to set up my Windows 7 (host) to request http://guestserver.com of the Apache server on the guest. How can I do this? If you try to execute a program that is not installed you will get a message  The program 'x' is currently not installed. You can install it by typing:  sudo apt-get install x   and instead of offering you to install the program for you, you have to type the actual command. How can this behavior be changed? As of late, and without my deliberately doing anything to make it happen, my Bash prompt has an  (i.e. @) prepended to it. This did not previously happen. Nor can I see anything in my ~/.bashrc that seems as though it ought to be making this happen.  This is on Debian Jessie GNU/Linux, using GNU Bash.  For example, my current Bash sessions look like this:  @sampablokuper@debianbox:~$ python3 Python 3.4.2 (default, Oct  8 2014, 13:14:40)  [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. @&gt;&gt;&gt; 1+2 3 @&gt;&gt;&gt; exit() @sampablokuper@debianbox:~$    whereas originally, they would have looked like this:  sampablokuper@debianbox:~$ python3 Python 3.4.2 (default, Oct  8 2014, 13:14:40)  [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; 1+2 3 &gt;&gt;&gt; exit() sampablokuper@debianbox:~$    Here are all the lines from my ~/.bashrc that appear to in any way relate to the Bash prompt:  # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] &amp;&amp; [ -r /etc/debian_chroot ]; then     debian_chroot=$(cat /etc/debian_chroot) fi  # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in     xterm-color) color_prompt=yes;; esac  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes  if [ -n "$force_color_prompt" ]; then     if [ -x /usr/bin/tput ] &amp;&amp; tput setaf 1 &gt;&amp;/dev/null; then         # We have color support; assume it's compliant with Ecma-48         # (ISO/IEC-6429). (Lack of such support is extremely rare, and such         # a case would tend to support setf rather than setaf.)         color_prompt=yes     else         color_prompt=     fi fi  if [ "$color_prompt" = yes ]; then     PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt  # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*)     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"     ;; *)     ;; esac   How can I get my Bash prompt to appear as it did originally? Starters on Stack Overflow tend to lose interest as soon as their first question starts getting downvotes. Their first question also sometimes gets closed because it was either not framed properly or it missed some very common things.  There should be way to cope with this for instance give some starter bonuses to new users. How to find multiple blank lines in Notepad++ and join the the separated text lines with a macro?  Below is screenshot of the file, where I want a macro to find out this blank line and correct the SEE and FIGURE should come to one line. It is company policy for admins to login to the servers via a personal username, and then run sudo -i to become root.  Upon running sudo -i, sudo will create an environmental variable called SUDO_USER, which contains the original user's username.  Is there a way to log ALL commands within syslog with something akin to the following syntax:  ${TIME/DATE STAMP}: [${REAL_USER}|${SUDO_USER}]: ${CMD}   An example entry would be:  Sat Jan 19 22:28:46 CST 2013: [root|ksoviero]: yum install random-pkg   Obviously it doesn't have to be exactly the above syntax, it just has to include a minimum of the real user (eg. root), the sudo user (eg. ksoviero), and the full command that was run (eg. yum install random-pkg).  I've already tried snoopy, but it did not include the SUDO_USER variable. How do I print all lines of a file with duplicate values in a certain column TeX editor with line-spacing preferences