I have a list which contains list of words.  Example:  [['A','B','C'],['D'],['E']]   To implement this i have create an empty list of list of size 4.  list1=[list()] *4   and then tried append element one by one.  list1[0].append('A') list1[0].append('B') list1[0].append('C') list1[1].append('D') list1[2].append('E')   Output:  [['A', 'B', 'C', 'D', 'E'], ['A', 'B', 'C', 'D', 'E'], ['A', 'B', 'C', 'D', 'E'], ['A', 'B', 'C', 'D', 'E']]   Expected was:  [['A','B','C'],['D'],['E']]
I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?
I have the following problem.      Let $f:D\to \mathbb C$ be a holomorphic function, where $D=\{z:|z|\leq 1\}.$ Let $$f(z)=\sum_{n=0}^\infty c_nz^n.$$ Let $l_2(A)$ denote the Lebesgue measure of a set $A\subseteq \mathbb C$ and $G=f(D).$ Prove that $$l_2(G)=\pi\sum_{n=1}^\infty n|c_n|^2.$$   After a long struggle I managed to come up with the following formula $$l_2(G)=\iint_D |f\,&#39;(z)|^2dxdy.$$ It looks like the right thing to use because $$f\,&#39;(z)=\sum_{n=1}^\infty nc_nz^{n-1},$$ which is similar to what I have to prove. I understand that the $\pi$ will appear when I integrate something over the angle $\phi$ in polar coordinates. But I don't know how to find the square of the absolute value of the right-hand side to even start integrating...  EDIT: The function is supposed to be  (one-to-one). (I'm not perfectly sure I'm translating the term correctly. The (Polish) word in the statement of the problem was "jednolistna". I have not met it before.) Why do we say "try and" [verb] instead of "try to" [verb]? (E.g., "Try and call me tomorrow.") In written and standard semi-formal (and above) spoken English, one would use &quot;try to&quot;:  Try to be a better person. Try to get the fishhook out of my thumb, please. Try to find a pharmacy when you need one.  But in spoken English, we (Americans, at least) usually substitute &quot;try and&quot; for all those cases. &quot;Try to&quot; makes sense because the &quot;to&quot; begins the construction of an infinitive: &quot;try to be&quot;, &quot;try to do&quot;, &quot;try to act&quot; and so on. &quot;Try and&quot; on the other hand doesn't seem to make any sense. I'm curious how the &quot;try and&quot; crept in, and when. It's really tough to Google small words like these, so I'm not finding anything on the Web. Is it a contraction of something like &quot;Try hard, and ...&quot;? Note: I've seen  and it is somewhat related but doesn't tell me what I want to know. Edit Observe how, even on this site,  construction. Turning it on its head Note that you can't make a negative construction with &quot;try and&quot;:  It's raining. Try not to get wet. It's raining. Try not and get wet. [?]  Even adding do doesn't help. The following means something different from &quot;try not to get wet.&quot;  It's raining. Don't try and get wet.  Even use of to instead of and there means something else:  It's raining. Don't try to get wet.  &quot;Try not to get wet&quot; means try to stay dry. &quot;Don't try to get wet&quot; means avoid actively seeking out a soaking, and implies that a soaking might in fact be what you are looking for. MORE I just happened to notice a video from an editor for Merriam-Webster on this very topic, so I include the link here: . IEEEtran - How to include ORCID in TeX/PDF with PdfLatex This question led to a new package:   I would like to display the ORCID id in an author list in an IEEEtran pdf, like that:  Is there a standard way to include it in an IEEEtran article with PdfLaTeX? I used two approaches from , but I failed. One is to insert the ORCID icon in the author list. I used the blow code: \author{Ali Al-Obaidi \href{https://orcid.org/0000-0000-0000-0000}{\includegraphics[scale=1]{figures/orcid_16x16.png}}}  where orchid_16x16.png is provided in the link . But the result is that the icon is not clear enough, even I replaced it with a different size. The other approach is to use the  package, like that: \usepackage{academicons} \definecolor{orcidlogocol}{HTML}{A6CE39} \author{AAA \href{https://orcid.org/0000-0000-0000-0000}{\textcolor{orcidlogocol}{\aiOrcid}}}  However, the result is like that:  And I also got two errors: &quot;Latex Error: Encoding scheme 'TU' unknown&quot; and &quot;Bad character code (59865)&quot;. In the latest academicons.sty (see ), academicons use the font TU. However, it seems that the compiler PdfLateX cannot support this font. Thus, is there anyone that knows a standard way to include it in an IEEEtran article with PdfLaTeX? Please help me. I want to make a logistic model from my survey data. It is a small survey of four residential colonies in which only 154 respondents were interviewed. My dependent variable is "satisfactory transition to work". I found that, of the 154 respondents, 73 said that they have satisfactorily transitioned to work, while the rest did not. So the dependent variable is binary in nature and I decided to use logistic regression. I have seven independent variables (three continuous and four nominal). One guideline suggest that there should be 10 cases for each predictor / independent variable (Agresti, 2007). Based on this guideline I feel that it is OK to run logistic regression.    Am I right? If not please let me know how to decide the number of independent variables? How to redirect output to screen as well as a file? My aim is to log all output from a script into a directory that the script is going to create.  For example, I have:  ~/.abc.sh:  #! /bin/bash rails new myapp   When I run...  cd ~/code . ~/.abc.sh   ...that will create a new Rails app in directory ~/code/myapp.  When Rails is creating an app, it outputs a whole lot of text that I want to capture and store in a log file in the same directory the rails command newly created. I also want to display that text in the terminal as well.  How do I go about doing this? Bag-of-Words for Text Classification: Why not just use word frequencies instead of TFIDF? A common approach to text classification is to train a classifier off of a 'bag-of-words'. The user takes the text to be classified and counts the frequencies of the words in each object, followed by some sort of trimming to keep the resulting matrix of a manageable size.  Often, I see users construct their feature vector using TFIDF.  In other words, the text frequencies noted above are down-weighted by the frequency of the words in corpus.  I see why TFIDF would be useful for selecting the 'most distinguishing' words of a given document for, say, display to a human analyst.  But in the case of text categorization using standard supervised ML techniques, why bother downweighting by the frequency of documents in the corpus?  Will not the learner itself decide the importance to assign to each word/combination of words?  I'd be grateful for your thoughts on what value the IDF adds, if any. What is NDSolve`FEM`*? I am using App Backup &amp; Restore for creating backup of my apps but with KitKat its using the internal SdCard as Storage.  When I explicitly set the external SdCard path it gives the error that it is unable to create folder,  I have also tried with creating folder under android/data/[packagename]/files/ but it is still not able to do the same.  Is there any solution so that apps can use external storage for writing files.  Note : I don't want to ROOT my Phone. Intermediate ring between a field and an algebraic extension. Is PCA still done via the eigendecomposition of the covariance matrix when dimensionality is larger than the number of observations? I have a $20\times100$ matrix $X$, containing my $N=20$ samples in the $D=100$-dimensional space. I now wish to code up my own principal component analysis (PCA) in Matlab. I demean $X$ to $X_0$ first.  I read from someone's code that in such scenarios where we have more dimensions than observations, we no longer eigen-decompose the $X_0$'s covariance matrix. Instead, we eigen-decompose $\frac{1}{N-1}X_0X_0^T$. Why is it correct?  The normal covariance matrix is of size $D\times D$, each element of which tells us the covariance between two dimensions. To me, $\frac{1}{N-1}X_0X_0^T$ is not even of the correct dimensions! It is $N\times N$ matrix, so what would it tell us? Covariance between two observations?! "Mixed declaration and code" warning, is it worth addressing? Well, the original task was to figure out what the following expression evaluates to for any $n$.  $$\begin{pmatrix} 1 &amp; 1 \\ 0 &amp; 1\end{pmatrix}^{\large n}$$  By trying out different values of $n$, I found the pattern: $$\begin{pmatrix} 1 &amp; 1 \\ 0 &amp; 1\end{pmatrix}^{\large n} = \begin{pmatrix} 1 &amp; n \\ 0 &amp; 1\end{pmatrix}$$  But I have yet to figure out how to prove it algebraically.   Suggestions? I saw a dog.       I have seen a dog.   What are the differences between them? Did these events happen on the same day? I have had a question since childhood.  Why do we always get circular waves (ripples) in water even when we throw irregularly shaped object in it? How do I disable touchpad when using a mouse How do I set environment variables from Java? How do I set environment variables from Java?  I see that I can do this for subprocesses using . I have several subprocesses to start, though, so I'd rather modify the current process's environment and let the subprocesses inherit it.  There's a System.getenv(String) for getting a single environment variable. I can also get a Map of the complete set of environment variables with System.getenv(). But, calling put() on that Map throws an UnsupportedOperationException -- apparently they mean for the environment to be read only. And, there's no System.setenv().  So, is there any way to set environment variables in the currently running process?  If so, how?  If not, what's the rationale?  (Is it because this is Java and therefore I shouldn't be doing evil nonportable obsolete things like touching my environment?)  And if not, any good suggestions for managing the environment variable changes that I'm going to need to be feeding to several subprocesses? One of my advisors suddenly passed away while I was in graduate school.  We had some discussions and ideas about future publications, but he passed away before any of the work was completed.  When the work was finally completed and published, I and my co-authors were therefore presented with an ethical dilemma about how best to acknowledge his contributions to the ideas behind the paper.  Should we list him as a co-author?  Put him in the acknowledgements?  Listing him as an author would give credit for the original idea, however, we would have no way of knowing if he actually approved of—and would want his name attached to—our methods and writing.  In the end my co-authors and I decided to list him as a co-author with a footnote stating that he passed away before publication.  I’m interested to hear from others who have been in similar situations and/or suggestions on what constitutes “co-authorship” when one of one’s collaborators passes away before the publication or work is complete. How to change LCD brightness from command line (or via script)? To work around  (changing LCD brightness via hotkeys impossible), I'd like to have one command line query for increasing and one for reducing the brightness of my LCD. I could then map a hotkey to each one of this queries.  The problem is: I don't know how to increase and reduce the LCD brightness on the command line. Do you? "Distribution not supported" when trying to install Intel Graphics Installer in Ubuntu How do I size a UITextView to its content? Is there a good way to adjust the size of a UITextView to conform to its content? Say for instance I have a UITextView that contains one line of text:  "Hello world"   I then add another line of text:  "Goodbye world"   Is there a good way in Cocoa Touch to get the rect that will hold all of the lines in the text view so that I can adjust the parent view accordingly?  As another example, look at the notes' field for events in the Calendar application - note how the cell (and the UITextView it contains) expands to hold all lines of text in the notes' string.