I would like to pass an undefined number of optional arguments to a function. The optional arguments are stored a priori in a dictionary.  As an example:  def f(a=0, b=0, c=0):     return a  my_args = {'a':5, 'b':3}  print(f(my_args))   The expected output would be 5, however it is {'a':5, 'b':3}
In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):
Composition of 2 involutions How can we prove that any bijection on any set is  a composition of 2 involutions ?  Since involutions are bijections mapping elements of a set to elements of the same set, I find it weird that this applies to any bijection.  Thanks for your help ! Can I color text by using an image, so that the color isn't flat? I'm using tikz to attempt to make a book cover, and I have a "wallpaper" image that looks like leather (not that I've handled that many leather-bound books). I'm using the node command to place text over the top of it, but none of the colors I've experimented with look decent.  Can I use an image of gold-leaf as the fill/stroke for the text? Or for that matter, for the path lines as well?  I've tried googling for this, but I can't figure out a set of keywords non-generic enough to pull back useful results. Nginx installation error in Ubuntu 16.04 :~$ sudo apt-get remove nginx* && sudo apt-get install nginx-full*  Reading package lists... Done Building dependency tree        Reading state information... Done  After this operation, 5,579 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 nginx-full-dbg amd64 1.10.0-0ubuntu0.16.04.1 [3,789 kB] Fetched 3,789 kB in 33s (112 kB/s)                                              Selecting previously unselected package nginx-common. (Reading database ... 189767 files and directories currently installed.) Preparing to unpack .../nginx-common_1.10.0-0ubuntu0.16.04.1_all.deb ... Unpacking nginx-common (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full. Preparing to unpack .../nginx-full_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full-dbg. Preparing to unpack .../nginx-full-dbg_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full-dbg (1.10.0-0ubuntu0.16.04.1) ... Processing triggers for ufw (0.35-0ubuntu1) ... Rules updated for profile 'Apache Full' Rules updated for profile 'Nginx HTTP'  Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for man-db (2.7.5-1) ... Setting up nginx-common (1.10.0-0ubuntu0.16.04.1) ... Setting up nginx-full (1.10.0-0ubuntu0.16.04.1) ... Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.  invoke-rc.d: initscript nginx, action "start" failed.  dpkg: error processing package nginx-full (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of nginx-full-dbg:  nginx-full-dbg depends on nginx-full (= 1.10.0-0ubuntu0.16.04.1); however:   Package nginx-full is not configured yet.  dpkg: error processing package nginx-full-dbg (--configure):   dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                            Errors were encountered while processing:  nginx-full   nginx-full-dbg  E: Sub-process /usr/bin/dpkg returned an error code (1) Sometimes I want to underline some text, and it extends past the end of a line.  Why does \underline{} not automatically wrap my text for me ?    Also, how can I underline text so that it will still wrap ? I've created a map system for a game that runs on the principle of drawing the picture of the map from tiles. There are many reasons for this which I won't go into here but if you really want to know then I'm sure you can find out how to contact me ;)  I have  so you can see exactly where the problem lies and the source. The issue is the line between the top 2 tiles and the bottom 2 tiles, I can't figure out why it's gone like this and any help would be appreciated.  In the source is a marker called "stackoverflow", if you search for "stackoverflow" when viewing source then it should take you to the table in question.  I have also uploaded an . Which of the following sets are compact in $\mathbb{M}_n(\mathbb{R})$[NBHM_PhD Screening Test-2013, Topology] Which of the following sets are compact in $\mathbb{M}_n(\mathbb{R})$ (a) The set of all upper triangular matrices all of whose eigenvalues satisfy $|\lambda|≤2 $. (b) The set of all real symmetric matrices all of whose eigenvalues satisfy $|\lambda|≤2 $. (c) The set of all diagonalizable matrices all of whose eigenvalues satisfy $|\lambda|≤2 $.  (a) &amp; (c) are not true. But I am not sure about (b).can anybody help me please. Are there any distinct finite simple groups with the same order? In finite group theory, it's often quite easy to show that there are no simple groups of a given order $n$.  My question is different: is there some natural number $n$ such that there are two non-isomorphic simple groups of order $n$?  The two easiest families of finite simple groups - $\mathbb{Z}_p$ for $p$ a prime and $A_n$ for $n\ge5$ - clearly don't yield any examples.    It should be possible to check this using the , but I don't know enough about the fabled 'sixteen infinite families of groups of Lie type' to do the check myself.  Also, if the answer is 'no', I'd be much more interested to see an elementary(ish) proof than I would be to see a proof that relies on over 3,000 pages of non-stop hard group theory. How to make putty to not break my session after some time? Each time putty is closing the session after some time if it is idle.  There is no time parameter on putty, so how can I keep my putty ssh session always Alive? How to monitor disk activity? How do I view my Disk Activity on Ubuntu? For example, How can I monitor what is being written and read from disk as well as the percentage of disk usage?  I am looking for an application similar to the Resource Monitor in Windows. How to check if a string "StartsWith" another string? How to create complex conditional clauses / queries? I've been reading the documentatoin on  and also studied the api description for  and  but I fail to create a $query with 3 -&gt;conditions:   select all between 0 and 100 but exclude 23, 48 and 97 select also 107, 123, 126 and 128   That's what I have tried so far:  $query-&gt;db_or()   -&gt;condition('my_field', array(107, 123, 126, 128), 'IN')   -&gt;condition(db_and()-&gt;condition('my_field', array(0, 100), 'BETWEEN')                       -&gt;condition('my_field', array(23, 48, 97), 'NOT IN'));   But I get the following error:  PHP Fatal error:  Call to undefined method SelectQuery::db_or() in [... first line]   I've tried to play around with the syntax like that:  $query-&gt;condition(-&gt;db_or()   -&gt;condition('my_field', array(107, 123, 126, 128), 'IN')   -&gt;condition(db_and()-&gt;condition('my_field', array(0, 100), 'BETWEEN')                       -&gt;condition('my_field', array(23, 48, 97), 'NOT IN')));   But again getting errors like that:  PHP Parse error:  syntax error, unexpected T_OBJECT_OPERATOR, expecting ')' in [... first line]   I also tried working with variables:  $cond01 = array('my_field', array(107, 123, 126, 128), 'IN'); $cond02 = array('my_field', array(0, 100), 'BETWEEN'); $cond03 = array('my_field', array(23, 48, 97), 'NOT IN'); $db_and = db_and(); $db_and-&gt;condition($cond02); $db_and-&gt;condition($cond03); $db_or = db_or(); $db_or-&gt;condition($cond01); $db_or-&gt;condition($db_and); $query-&gt;condition($db_or);   But this again yields drupal errors like that:  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Array' in 'where clause'   How to create a complex conditional database query with both AND and OR statements? Max dimension of a subspace of singular $n\times n$ matrices I am sure the answer to this is (kind of) well known. I've searched the web and the site for a proof and found nothing, and if this is a duplicate, I'm sorry.  The following question was given in a contest I took part. I had an approach but it didn't solve the problem.     Consider $V$ a linear subspace of the real vector space $\mathcal{M}_n(\Bbb{R})$ ($n\times n$ real entries matrices) such that $V$ contains only singular matrices (i.e matrices with determinant equal to $0$). What is the maximal dimension of $V$?   A quick guess would be $n^2-n$ since if we consider $W$ the set of $n\times n$ real matrices with last line equal to $0$ then this space has dimension $n^2-n$ and it is a linear space of singular matrices.  Now the only thing there is to prove is that if $V$ is a subspace of $\mathcal{M}_n(\Bbb{R})$ of dimension $k &gt; n^2-n$ then $V$ contains a non-singular matrix. The official proof was unsatisfactory for me, because it was a combinatorial one, and seemed to have few things in common with linear algebra. I was hoping for a pure linear algebra proof.  My approach was to search for a permutation matrix in $V$, but I used some 'false theorem' in between, which I am ashamed to post here. It's not part of the artwork and doesn't seem to be hurting anything, but I get this on a lot of client logos and I'm wondering how to get rid of it.   I think it's part of the artboard, but can't find anything to select/change/remove it. How do you maximize the cycle count of your battery?  There seems to be a debate between:   Leave plugged in 24/7 but do a full cycle once a month Charge to ~100%, drain to ~10%, repeat.   NOTE: Taking your   Which method is better and why? How much of a difference does it really make?  Here are some of the better sources I've found about battery behavior so far. Even still I feel they don't conclusively answer the question above. See my elaborations below:           Elaborating on Option 1  Now IF Apple engineers were smart and optimized for AC draw when plugged in to not use up your charge cycles, then it seem logical to assume that you are using effectively none of your 1000 charge cycles while plugged in. If that's the case, it would seem that the LiPo drop from holding at 100% would be vastly outweighed by the fact you're not using any charge cycles.  However, this is a purely speculative assumption and I could find no evidence to either confirm or deny.  If this is NOT true, and the AC adapter only goes to charging the battery, then there would be no difference. Your battery would drain to 99%, then back up to 100%, then back down to 99%, etc. Those micro-charge cycles would add up at the same rate as 100% -> 0% -> 100%, and you would get no gain. In this case the negative effect of holding LiPo batteries at 100% would outweigh everything else.  Elaborating on Option 2  There are lots of good reasons why Option 2 is the way it is:   Because of known LiPo chemistry issues, holding a 100% charge for a long time causes the battery to degrade Apple specifically recommends not to leave it plugged in all the time  Draining a battery all the way to zero all the time is bad for the cell (Which is why ~10% is used) Heat is a killer, and when plugged in AND charging, you get extra heat that causes damage.   There are a couple reasons why I'm challenging Option 2:   It seems silly that the most intuitive use case for thousands of people that use their macs as primary computers is wrong. If the hypothesis in option 1 is true, you're just burning unnecessarily through your finite charge cycles. It's a pain to have to remember to keep plugging in and plugging out and be worried about whether or not your device is plugged in. I did a dumb thing... I forgot that Ubuntu 10.04 (Lucid Lynx) switched to &nbsp;2 which puts a ton of *.mod files (kernel modules) in /boot/grub. I thought they were soundtrack files put there erroneously, and I moved them. Needless to say, the next reboot was traumatic. I was presented with something I had no memory of ever seeing... a 'grub rescue>' prompt.  With the help of  however, I was able to recover...   I discovered that GRUB rescue does not have 'cd', 'cp' or any other filesystem commands except its own variation of 'ls'. So first I had to find the partition with the /boot directory containing vmlinuz file and other boot image files... (approximation from memory of failed attempts, as well as blank lines for clarity, added 2014-07-10 by docsalvage)    grub rescue&gt;  ls   (hd0,4) (hd0,3) (hd0,2) (hd0,1)    grub rescue&gt;  ls (hd0,4)/boot ... some kind of 'not found' message  grub rescue&gt;  ls (hd0,3)/boot ... some kind of 'not found' message  grub rescue&gt;  ls (hd0,2)/boot ... grub ... initrd.img-2.6.32-33-generic ... vmlinuz-2.6.32-33-generic   I found a /boot directory containing the vmlinuz file vmlinuz-2.6.32-33-generic on partition (hd0,2). Then I manually booted from the 'grub rescue>' prompt. The following commands will...   Set the root to use the /boot directory on partition (hd0,2). Load kernel module linux. Set that module to use the kernel image vmlinuz-2.6.32-33-generic. Set initrd(initialize RAM disk) to use the image initrd.img-2.6.32-33-generic. Boot Linux.  grub rescue&gt;  set root=(hd0,2)/boot   grub rescue&gt;  insmod linux   grub rescue&gt;  linux (hd0,2)/boot/vmlinuz-2.6.32-33-generic root=/dev/sda2 grub rescue&gt;  initrd (hd0,2)/boot/initrd.img-2.6.32-33-generic   grub rescue&gt;  boot    This boots and crashes to the BusyBox prompt which DOES have some rudimentary filesystem commands. Then I moved the *.mod files back to the /boot/grub directory...  busybox&gt;  cd /boot   busybox&gt;  mv mod/* grub busybox&gt;  reboot  The reboot was successful, but that was a lot of work.   Is there an easier way? Let $a,b,c\in \Bbb R^+$ such that $(1+a+b+c)(1+\frac{1}{a}+\frac{1}{b}+\frac{1}{c})=16$. Find $(a+b+c)$ Interesting topics to research in mathematical physics for undergraduates I just learned about the Monty Hall problem and found it quite amazing. So I thought about extending the problem a bit to understand more about it. In this modification of the Monty Hall Problem, instead of three doors, we have four (or maybe $n$) doors, one with a car and the other three (or $n-1$) with a goat each (I want the car).  We need to choose any one of the doors. After we have chosen the door, Monty deliberately reveals one of the doors that has a goat and asks us if we wish to change our choice.  So should we switch the door we have chosen, or does it not matter if we switch or stay with our choice?  It would be even better if we knew the probability of winning upon switching given that Monty opens $k$ doors. Google Chrome Address Bar Font has gone too large, how can we reduce it Running Unity on my desktop (2*20" LCD displays), I initiated a standard daily update on my Ubuntu 14.04 LTS today and Google Chrome updated itself to Version 35.0.1916.114.  The URL address bar input now shows IMO a too larger font size which then proceeds to auto show in green. I prefer the smaller font size and have no need for 'gooey slime green' auto complete font colours. Any advice on how to revert back to smaller, generic Address font styling.  I use both FF and Chrome for numerous tasks, Chrome being my primary browser and I've checked my system Unity 'default' theme (Ambiance! LOL.. yes I'm tired of that also).  Thanks for sharing. Can we implement temporary automatic comment ban on 'x' number of validated rude comment flags? There's been problems with abusive comments since the site started.   We still haven't managed to conquer the issue.   Users can be issued chat bans and post bans. The API automatically bans IP addresses with validated spam flags. (Would it be difficult to implement comment bans? Would mods have the power to impose comment restrictions?).   Although comments have been classically referred to as second class citizens, rude comments on the site are the one place that is driving people away.   Can we implement temporary automatic comment ban on 'x' number of validated rude comment flags? It would probably be better if the exact heuristics were not disclosed publicly, much like the serial voting scripts  This question  was asked 7 years ago. Can we revisit it?  This question is related, but is asking for a more complex approach: