Convert string of list to python list
Converting a string to a tuple in python
Where can I get a device with 'Ubuntu for phones' pre-installed? Canonical has recently announced , which is Ubuntu with a specific interface for mobile devices.  Where can I get phones with this version of Ubuntu pre-installed? If no devices are available yet, where can I pre-order one? Proving the two given vectors are orthogonal Find all functions $f$ such that $f:\mathbb{N}\rightarrow\  \mathbb{N}$ and $f(f(n))+f(n+1)=n+2$   Let us plug in $n=1$  $f(f(1))+f(2)=3$  Since the function is from $\mathbb{N}$ to $\mathbb{N}$, $f(2)$ can only take the values $1,2$. Now we divide the problem into cases.  Case-1: $f(f(1))=2,f(2)=1$  We can assume that $f(1)=c$ for the time being. Then plugging in $n=3$ and using $f(2)=1$ gives $$f(3)=4-c$$ and again since the range of the function is positive integers,then $4-c$ has to be positive and hence $c$ belongs to  {$1,2,3$}. Now, $$f(1)=c$$$$\implies f(f(1))=f(c)$$$$\implies 2=f(c)$$ by the assumption that $f(f(1))=2$ . Now,since $c$ can only take the values $1,2,3$,we start treating cases. If $c=1$,$$f(c)=2$$$$\implies f(1)=2$$ but we know from the deinition of $c$ that $f(1)=c=1$,a contradiction.If $c=2$,then $2=f(c)=f(2)$ but $f(2)=1$ by assumption. Finally,if $c=3$ $$2=f(c)=f(3)$$ but $$f(3)=4-c=4-3=1$$ which is once again a contradiction. Therefore there are no such functions in this case.  Case-2: $f(f(1))=1,f(2)=2$  Again assuming $f(1)=c$ and using $f(n)\le n$ along with plugging $n=c-1$ will give us that $f(1)=1$ and then it is easy to prove that such a function exists by recursion. I can only give a "sort of recursive" way to define the function. Here it goes $$f:\mathbb{N}\rightarrow \mathbb{N}$$$$f(1)=1$$$$f(n)=n+1-f(f(n-1))$$  But this case is harder to deal with.Some help will be appreciated. What are the key principles that effective designs share? You have arrived on this page because you are clearly curious about underlying fundamentals that you can incorporate into your thought process when designing.  According to many that came before us, there are key principles that can be considered when creating an effective design. In the following answers, you will find useful theories from a variety of respected sources.  Use this question as a reference for navigating the variety of topics:  Gestalt Principles  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  Other Fundamentals and Useful Information  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  If you know of a topic that hasn't been covered here, please add an answer with references to respected resources and it will be added to the list.  Of course direct quotes and paraphrasing from respected resources are a must, but should be limited to a small paragraph per topic at most and referenced back to their source as thoroughly as possible.  A  has been posted before, but not to create a collection of snippets that are enlightening for graphic designers of any and all skill levels. I need to concatenate two String arrays in Java.  void f(String[] first, String[] second) {     String[] both = ??? }   What is the easiest way to do this? What could cause a toilet to leave the flapper up and keep running? I have an American Standard toilet I installed last year. I don't know much about plumbing, but I was able to install this toilet. It seems to function okay, except for what I think is a mechanical problem.  Sometimes when the toilet is flushed, the flapper doesn't close and water keeps running.  The handle feels like it's slightly stuck in the up position.  I looked inside the tank once when it was doing this, and the chain attached to the handle was slack. I don't understand why the flapper isn't closing.  I've tried putting more slack in the chain and loosening the plastic nut that holds the handle on the toilet, but it doesn't seem to be helping.    How can I fix this? Like the ModelBuilder of ArcGIS Desktop to run simultaneous geoprocessing tools, is there any model builder available in QGIS? How do I space quads evenly? Is there a way in blender or an addon that allows me to select a bunch of faces (or verts) and evenly distributes (or relaxes) them into quads clean quads.  Without screwing up the vert ID/order.  Edit: I would like to have the shapes of my quads to turn into perfect squares while maintaining the volume of the object and the vertex order. I'm trying to compute the difference between the output of two awk commands but my simple attempts at it seem to be failing. Here is what I'm trying:  diff $(awk '{print $3}' f1.txt | sort -u) $(awk '{print $2}' f2.txt | sort -u)   This doesn't work for reasons unknown to me. I was under the assumption that $() construct was used to capture the output of another command but my "diff" invocation fails to recognize the two inputs given to it. Is there any way I can make this work.  By the way, I can't use the obvious solution of writing the output of those two commands to separate files given that I'm logged on to a production box with no 'write' privileges. How to append the contents of a list at the end of the other list? How do I append the contents of one list at the end of another list? Show that there exists a unique $v_0 \in H^1(0,1)$ such that $u(0)=\int_0^1(u'v_0'+uv_0), \forall u \in H^1(0,1)$ Recently I saw a widget on the Stack Overflow website which says Stack&nbsp;Overflow now has its own currency called "unicoins". According to this widget, a user can earn reputation, customize Stack Overflow by changing its colors and the user can also remove the vote down button from their questions and answers by spending "unicoins".  This widget does not look real, because this is out of standard of the Stack Overflow website.  Also today is 1st April. Is Stack Overflow fooling us?  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If $P(|X-19.1| \leq a) = 0.98$ then why is it necessarily $P(\frac{X-19.1}{17} \leq \frac{a}{17})= 0.99$? Unable to mount ISO in write mode general solution sum of two uniform random variables aY+bX=Z? is there a general solution to that? I have seen simple examples for Y+X=Z but I was wondering how this would be with rescaling? Where does the idiom "beating around the bush" come from? Where does the idiom "beating around the bush" come from? Add leading zeroes to number in Java? Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something)  static String intToString(int num, int digits) {     StringBuffer s = new StringBuffer(digits);     int zeroes = digits - (int) (Math.log(num) / Math.log(10)) - 1;      for (int i = 0; i &lt; zeroes; i++) {         s.append(0);     }     return s.append(num).toString(); } Is it fair to buy a return ticket I know I will never use just because it's cheaper? I am planning a trip to Asia and then back to Rio. The thing is that I am traveling on flexible dates, so I am thinking of buying a one way ticket to Hong Kong, and I was planning to do the same when I want to come back.  But what I noticed is that, for example, a one way ticket from Melbourne to Rio costs no less than $2700 dollars for the month of May.  When I do a search for a round-trip from Melbourne to Rio and back, I can find flights for $2200.  I know I will not be using that return to Melbourne, but I'd still prefer to save those $500.   Can there be any issue with buying a round-trip with a return that I will never use? I'm looking to build a guitar pedal switcher based on a Raspberry Pi or Arduino (have not yet decided, but I have an unused Raspberry around and I lean towards that). Anyway, digital logic.  Now, I need to switch audio signal obviously and I need to do it quietly (both physical silence and electrical silence). Please note that the signal is line level throughout most of the build, except for the input which is much lower. I will probably have 2 or 3 loops before the preamp so those may not encounter line level signal.  From what I read and know, so far, mechanical relays are not really an option due to the clicking noise they make. I also read something about FETs, but that's a bit out of my league and I would appreciate any info on these.  PS: I will probably use different power rails for the digital and analog paths.  PS2: The whole thing will be mounted in a 1U rack enclosure, so please tell me if I should take into consideration any thermal issues. Pass extra parameters to an event handler?