Copying and printing arrays?
I get these weird characters when I try to print out a vector element!
A disk is stuck in my slot-loading Dell Studio Hybrid. How can I get it out? The slot-loading optical drive in my Dell Studio Hybrid has been acting up. Sometimes it works fine, sometimes it churns and makes some unpleasant sounds. Now I can't even get it to eject the disc that's in there.  Many drives have an "emergency eject" pinhole, but I don't see one here. How can I get the disc out? Cross product term in linear regression why is it zero I'm trying to see why this is the case. I have taken  the LHS and added $X\hat{\beta}$ and subtracted $X\hat{\beta}$.  From this I can get both terms on the right but I end up with a cross product term  $2(y-X\hat{\beta})^T(X\hat{\beta} - X\beta)$  that I can't prove equals to zero. I think there is some trick I'm missing, anybody remember it? # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package.  # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022  # if running bash if [ -n "$BASH_VERSION" ]; then     # include .bashrc if it exists     if [ -f "$HOME/.bashrc" ]; then     . "$HOME/.bashrc"     fi fi  # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then     PATH="$HOME/bin:$PATH" fi   Can anyone explain the contents of the ~/.profile file? So when you enter into the ~/.profile file what does all the writing mean? Help evaluating a gamma function Should academic papers necessarily carry a sober tone? I was reading  titled "Optimal Symmetric Rendezvous Search on Three Locations." While talking about the history of search problems, the author mentions the following anecdote in passing.     In 2007 a letter writer to the Guardian newspaper queried, “I lost my wife in the crowd at Glastonbury (a music festival). What is the best strategy for finding her?” A reader replied, “Start talking to an attractive woman. Your wife   will reappear almost immediately.”   While I found it quite amusing to read this, I do not often come across papers with such witticisms. Is there an unwritten rule about the tone of sobriety that is considered appropriate in academic papers? Are jokes or anecdotes fine as long as they do not appear forced? I was naively validating my binomial logit models by testing on a test dataset. I had randomly divided the available data (~2000 rows) into training (~1500) and validation (~500) datasets.   I now read a post in another thread ( Frank Harrell) that causes me to question my approach:     Data splitting is not very reliable unless you have more than 15,000   observations. In other words, if you split the data again, accuracy   indexes will vary too much from what you obtained with the first   split.   How serious is this worry and what are ways around it? The OP speaks of "resampling" but not sure how that works here for validation.   Edit: Adding context as per @Bernhard's comment below: In Magic, at the start of the game, you draw 7 cards. How would you calculate the likelihood of drawing a specific card in your opening hand?  For example, let's say I have a 60 card deck, and I'm running 4 . What is the percent chance that I will have at least one Bird in my opening hand? Prove that $(x+y+z)^2(yz+zx+xy)^2 \leq 3(y^2+yz+z^2)(z^2+zx+x^2)(x^2+xy+y^2)$ This is Problem 6 of the 2007 Indian National Math Olympiad (INMO).  If $x, y, z$ are positive real numbers, prove that $(x+y+z)^2(yz+zx+xy)^2 \leq 3(y^2+yz+z^2)(z^2+zx+x^2)(x^2+xy+y^2).$  My best idea was to expand this and simplify. Although that doesn't look very feasible. Another idea is to see that $x^2+y^2+xy \geq x^2+y^2$. Then we just have to show that $(x+y+z)^2(yz+zx+xy)^2 \leq 3(x^2+y^2)(x^2+z^2)(y^2+z^2)$ if that is even true. Caption makes Table move in statsoc class How to make pipes work with Runtime.exec()? Proof about Graph with no triangle event.preventDefault() vs. return false How to execute a JavaScript function when I have its name as a string How can I view and examine the Android log? Searching a virtual printer, that sends emails I need a software, that emulates a printer, converts the printed documents to PDF/TIFF and send it via eMail to a specified address (for windows).  The virtual printer / PDF conversion is possible with a lot of PDF-converters. But I need a software, which is also able to directly mail me these PDFs. It's always the same mailaddress, and I have an SMTP server.  Any suggestions? Summability vs Unconditional Convergence I'm reading that summability and unconditional convergence are the same. (At least if the index set is countable, so unconditional convergence makes sense.)  Then unconditional convergence is nothing else than convergence of the net of all rearranged partial sums. Thus uniqueness of the limit becomes fairly easy as the limit of every net in a Hausdorff space is unique.  But the usual proof deals with separating functionals on Banach spaces, which is a much more serious technique. So I think there must be a hook in my reasoning. Can somebody resolve this issue? Thanks a lot!  Best Regards, Freeze_S Find all polynomials $P(x)$ such that $P(x^2)=P(x)^2$ Find all polynomials $P:\mathbb{C}\rightarrow\mathbb{C}$ such that $$P(x^2)=P(x)^2 .$$   Here is what I tried:  First, it is easy to see the constant solutions, namely $P\equiv 0,P\equiv 1$.  Let $r$ be a root of $P$ (i.e. $P(r)=0$). It follows that all terms in the infinite sequence $r,r^2,r^4,\dots,r^{2n},\dots$ are roots of $P$. To avoid a polynomial with infinite roots, we have to have the sequence be periodic. So it turns out that either $r=0$, or the roots of $P$ are roots of unity of degree $2n$ for some $n\in\mathbb{N}$.  In the first case, we get $P(x)=xQ(x)$. Plugging in, we get $$x^2Q(x^2)=x^2Q(x)^2\implies Q(x^2)=Q(x)^2 ,$$ i.e. that $Q$ satisfies the same condition as $P$.  In the second case, we have $P(x)=(x^{2n}-1)Q(x)$. Plugging in, we get $(x^{2n}-1)Q(x^2)=(x^{2n}-2x^n+1)Q(x)^2$. I was not sure how to proceed from here. Support for hardware components How can I find out if Ubuntu supports a particular hardware component, that is, if it works in Ubuntu?  I am going to put together a computer and I am choosing components.   How do I know if Ubuntu supports this or that motherboard, or this or that sound card, or this or that graphics card, etc? How do I know that there is no conflict in Ubuntu between this and that hardware component?   What resources are there to help with such situations?  I know that there are computers with Ubuntu pre-installed and that there are  for whole computers but this is not what I'm looking for. I'm looking for resources to find out support for particular hardware components and conflicts among particular hardware components. Is it possible to link multiple leaders lines to one piece of annotation?  I'm working in ArcGIS 10.2 Desktop Advanced with non-feature linked geodatabase annotation. I have hundreds of numbers labeling various polygons, but some polygons share a number. Instead of creating multiple numbers/annotations for each polygon I'd like to have one number with multiple lines pointing to each polygon.   So, in the image below, the number 5 corresponds to multiple polygons. Here I've moved 5 from it's ideal location to show that the second leader line is not connected to the number annotation. My workaround has been to create another piece of geodatabase annotation with a blank text string to serve as a placeholder for a leader line. The other option was to use map/graphic annotation to create the second leader line, but with the multiple disadvantages of not being in the same annotation feature class as the number annotation.    My goal would be for each piece of number annotation to be connected to multiple leader lines like appears below. Due to the implementation of Java generics, you can't have code like this:   public class GenSet&lt;E&gt; {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack&lt;T&gt; {     public Stack(Class&lt;T&gt; clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.