"dpkg: trying to overwrite '.../gsettings/gnome-settings-daemon.convert also in package gnome-settings-daemon" when upgrading to Trusty
How do I resolve unmet dependencies after adding a PPA?
There are four options. Which of them is correct?- (a)${p\over k}$ (b)${k\over p}$ (c)$\log({p\over k})$ (d)${\log p\over k}$ I somehow want to use the rule for evaluating this kind of sum using integration, i.e. $\int_{0}^{1} f(x) \ dx=\lim_{n\to\infty} {1\over n}\sum_{r=1}^{n}f({r\over n})$  But the given expression $\lim_{n\to\infty} [{1\over kn}+{1\over k(n+1)}+{1\over k(n+2)}+\cdots+{1\over k(n+p-k)}]={1\over k}\lim_{n\to\infty}{1\over n}\sum_{r=0}^{p-k}\frac{1}{1+{r\over n}}$, sum running from $0$ to $p-k$ instead of $n$. So, how to evaluate this limit? Thanks for assistance in advance. Changing sides in tennis This  says:      A player has to win six games, and at least two more than the foe, to claim a tennis match. Players switch sides after every odd game, as in the first, third and fifth games, and so on. Players also switch sides at the end of a set if they're playing an odd number of games.   So, you start, 1-0, and change sides. If the game ends 6-0, 6-2 or 6-4 (or an even number of games), you play the first game of the new set, change sides, and you are back to the previous rule.  But what if a player wins 6-1 or 6-3? You win the set, then change sides. Now, you play a new set, do you change again at 1-0 (therefore after having played just one game), or wait until the 1-1 or 2-0, therefore now changing after an even number of games in the second set? Consider the following MWE:  \documentclass{article} \usepackage{pstricks} \begin{document} A \end{document}   It produces the error  Runaway argument? ] {pgffor.code.tex}  ! Paragraph ended before \ProvidesPackageRCS@i was complete. &lt;to be read again&gt;                     \par  l.11   How do I fix this? I need to write a Java Comparator class that compares Strings, however with one twist.  If the two strings it is comparing are the same at the beginning and end of the string are the same, and the middle part that differs is an integer, then compare based on the numeric values of those integers.  For example, I want the following strings to end up in order they're shown:   aaa bbb 3 ccc bbb 12 ccc ccc 11 ddd eee 3 ddd jpeg2000 eee eee 12 ddd jpeg2000 eee   As you can see, there might be other integers in the string, so I can't just use regular expressions to break out any integer.  I'm thinking of just walking the strings from the beginning until I find a bit that doesn't match, then walking in from the end until I find a bit that doesn't match, and then comparing the bit in the middle to the regular expression "[0-9]+", and if it compares, then doing a numeric comparison, otherwise doing a lexical comparison.  Is there a better way?  Update I don't think I can guarantee that the other numbers in the string, the ones that may match, don't have spaces around them, or that the ones that differ do have spaces. Simulate repeated rolls of a 7-sided die with a 6-sided die What is the most efficient way to simulate a 7-sided die with a 6-sided die? I've put some thought into it but I'm not sure I get somewhere specifically.  To create a 7-sided die we can use a rejection technique. 3-bits give uniform 1-8 and we need uniform 1-7 which means that we have to reject 1/8 i.e. 12.5% rejection probability.  To create $n * 7$-sided die rolls we need $\lceil log_2(  7^n ) \rceil$ bits. This means that our rejection probability is $p_r(n)=1-\frac{7^n}{2^{\lceil log_2(  7^n ) \rceil}}$.  It turns out that the rejection probability varies wildly but for $n=26$ we get $p_r(26) = 1 - \frac{7^{26}}{2^{\lceil log_2(7^{26}) \rceil}} = 1-\frac{7^{26}}{2^{73}} \approx 0.6\%$ rejection probability which is quite good. This means that we can generate with good odds 26 7-die rolls out of 73 bits.  Similarly, if we throw a fair die $n$ times we get number from $0...(6^n-1)$ which gives us $\lfloor log_2(6^{n}) \rfloor$ bits by rejecting everything which is above $2^{\lfloor log_2(6^{n}) \rfloor}$. Consequently the rejection probability is $p_r(n)=1-\frac{2^{\lfloor log_2(  6^{n} ) \rfloor}}{6^n}$.  Again this varies wildly but for $n = 53$, we get $p_r(53) = 1-\frac{2^{137}}{6^{53}} \approx 0.2\%$ which is excellent. As a result, we can roll the 6-face die 53 times and get ~137 bits.  This means that we get about $\frac{137}{53} * \frac{26}{73} = 0.9207$ 7-face die rolls out of 6-face die rolls which is close to the optimum $\frac{log 7}{log6} = 0.9208$.  Is there a way to get the optimum? Is there an way to find those $n$ numbers as above that minimize errors? Is there relevant theory I could have a look at?  P.S. Relevant python expressions:  min([ (i, round(1000*(1-(  7**i )  /  (2**ceil(log(7**i,2)))) )/10)  for i in xrange(1,100)], key=lambda x: x[1]) min([ (i, round(1000*(1- ((2**floor(log(6**i,2))) / (  6**i ))   )    )/10)  for i in xrange(1,100)], key=lambda x: x[1])   P.S.2 Thanks to @Erick Wong for helping me get the question right with his great comments.  Related question: LWC to display salesforce objects as a picklist onclick I have a requirement where I need to display list of salesforce objects as a picklist when a radio button is clicked.  Being new to LWC development, I could not figure out what is the right approach to do so. I have come across  from Salesforce articles where we can display radio buttons but as per my scenario, i need to display list of all salesforce objects as picklist when a radio button option is selected.  Can anyone please suggest the right approach to do so. I'm trying to install KDE 5 on my Ubuntu 16.04 system as per the instructions in , but I'm getting the below error message when running sudo apt-get install kubuntu-desktop.  Is there something I can do to resolve this?  Need to get 682 kB/326 MB of archives. After this operation, 1,272 MB of additional disk space will be used. Do you want to continue? [Y/n] y Err:1 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64              gtk2-engines-oxygen amd64 1.4.6-1ubuntu1   Temporary failure resolving 'ir.archive.ubuntu.com' Get:2 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64              libkf5sendlater5 amd64 4:15.12.3-0ubuntu1 [45.2 kB] Get:3 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64              libthreadweaver4 amd64 4:4.14.16-0ubuntu3 [46.6 kB] Get:4 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64              libfarstream-0.2-5 amd64 0.2.7-0ubuntu1 [192 kB] Fetched 284 kB in 1min 9s (4,093 B/s)         E: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/pool/universe/g/             gtk2-engines-oxygen/gtk2-engines-oxygen_1.4.6-1ubuntu1_amd64.deb               Temporary failure resolving 'ir.archive.ubuntu.com'  E: Unable to fetch some archives, maybe run apt-get update or              try with --fix-missing? In $ \triangle ABC$ show that $ 1 \lt \cos A + \cos B + \cos C \le \frac 32$ Why is the order of $\mathbb{Z}[i]/\langle 3+i\rangle$ equal to 10? The reasoning my book uses is as follows:   Since $(3+i)(3-i) = 10$, $10 + \langle 3+i\rangle = 0 + \langle 3+i\rangle $. Also, $i + \langle 3+i\rangle = -3 + \langle 3+i\rangle = 7 + \langle 3+i\rangle$. So, $\mathbb{Z}[i]/\langle 3+i\rangle = \{k + \langle 3+i\rangle \mid k = 0,1,\ldots ,9\}$, since $1 + \langle3+i\rangle$ has additive order $10$.   I do not understand why the additive order of $1 + \langle 3+i\rangle$ is $10$, or why the fact that $(3+i)(3-i) = 10$, shows the additive order or $1 + \langle 3+i\rangle$  is $10$. If someone could please explain this I would greatly appreciate it.   Note: I apologize for not using MathJax to write this post. I intend to learn it over the coming weekend. I'm looking for a book that starts with the premise that (once the population size had exceeded a certain number) the future development of mankind (revolutions and wars in so and so many years, colonization of other planets in so and so many years, and so on) could be predicted completely by applied statistics. (IIRC, they used slide rules for those exact predictions, but that is certainly owed to the time the story was written). Next, the predictability was used to take a few tiny measures that would change mankind's fate in a favourable way. After a long time, the predictive system fails(?) because a mutation occurs in some person(s).  And now is the part where I'm not sure if it belongs to this or another story: The mutation results in the ability to "beam" by thinking of a place where one has been before... Can spells with movable areas of effect be moved out of sight or behind obstacles? With spells like Moonbeam or Flaming Sphere, how should we treat the movement of their areas-of-effect when it comes to passing them behind a thick pillar or around a blind corner?  Should we treat any movement of them as if they are being 're-cast' (and so requiring a clear unobstructed view)? Or could a mage presumably will them somewhere out-of-sight? What is the exact difference between an autoregressive (AR) and vector autoregressive model (VAR)?  I always thought that VAR would just be for more than two variables, until I learned that AR can also have more than two variables. I.e. I had a misunderstanding(?) that AR models are not always bivariate.  Before I write too much potentially false assumptions about the difference between AR and VAR, it would rather be interested to see if anyone can make provide a quick and good summary. Can I say: I have not gone to the cinema for a long time Sleeping in a batch file When writing a batch file to automate something on a Windows box, I've needed to pause its execution for several seconds (usually in a test/wait loop, waiting for a process to start). At the time, the best solution I could find uses ping (I kid you not) to achieve the desired effect. I've found a better write-up of it , which describes a callable "wait.bat", implemented as follows:  @ping 127.0.0.1 -n 2 -w 1000 &gt; nul @ping 127.0.0.1 -n %1% -w 1000&gt; nul   You can then include calls to wait.bat in your own batch file, passing in the number of seconds to sleep.   (at last!). In the meantime, for those of us still using Windows&nbsp;XP, Windows 2000 or (sadly) , is there a better way?  I modified the sleep.py script in the , so that it defaults to one second if no arguments are passed on the command line:  import time, sys  time.sleep(float(sys.argv[1]) if len(sys.argv) &gt; 1 else 1) How can I compute $\mathrm{Aut}(\mathbb{Z}/4\mathbb{Z}\times\mathbb{Z}/6\mathbb{Z})$? How can I compute $\mathrm{Aut}(\mathbb{Z}/4\mathbb{Z}\times\mathbb{Z}/6\mathbb{Z})$?  If $\varphi$ is one of this automorphism then $\varphi((1,0))=(1,0),(1,3),(3,3),(3,0)$ and $\varphi((0,1))=(0,1),(0,5),(2,1),(2,5)$.  So it seems to me that this groups contains 16 elements, am i right? And if I'm right there is a way to understand to which group of cardinality 16 this is isomorphic to?  EDIT: $\mathbb{Z}/4\mathbb{Z}\times\mathbb{Z}/6\mathbb{Z}\cong\mathbb{Z}/8\mathbb{Z}\times\mathbb{Z}/3\mathbb{Z}$. And $\mathbb{Z}/8\mathbb{Z}$ and $\mathbb{Z}/3\mathbb{Z}$ are characteristic (am I right?), so $\mathrm{Aut}(\mathbb{Z}/8\mathbb{Z}\times\mathbb{Z}/3\mathbb{Z})\cong\mathrm{Aut}(\mathbb{Z}/8\mathbb{Z})\times\mathrm{Aut}(\mathbb{Z}/3\mathbb{Z})\cong\mathbb{Z}/8\mathbb{Z}^*\times\mathbb{Z}/3\mathbb{Z}^*$ and this group has cardinality 8, right? Where is my mistake? How can I change media volume when no media is being played? Sometimes I want to play games in (near) silence, and don't like the background music to disturb people. If I use the volume buttons, the ringtone volume is changed instead of media volume. When I'm already in the game, the volume buttons do change the volume of background music, but it's kinda too late.  Is there a way for me to change the media volume to a level I like, from the home screen, before starting apps/games? Any open subset of $\Bbb R$ is a countable union of disjoint open intervals Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.    This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome. What is hardware enablement (HWE)? I see the  package as part of the kernels you can install in Ubuntu.  What is hardware enablement (HWE)? Very large log files, what should I do? unable to reset root password of mysql I need to reset the root password of my local mysql installation but it woudln't let me. I've tried this:  $ sudo /etc/init.d/mysql stop  * Stopping MySQL database server mysqld                                                                                                              [ OK ]  [1]-  Exit 1                  sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking [2]+  Exit 1                  sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking reg@regDesktopHome:~$ sudo mysqld --skip-grant-tables &amp; [1] 13651 reg@regDesktopHome:~$ 140627 19:02:02 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.  reg@regDesktopHome:~$ mysql -u root mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) reg@regDesktopHome:~$ sudo mysql -u root mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) [1]+  Exit 1                  sudo mysqld --skip-grant-tables   How can I get the password reset? edit 1 I got this:  $ ps ax| grep mysql 16515 ?        Ssl    0:00 /usr/sbin/mysqld 16551 pts/23   S+     0:00 grep --color=auto mysql reg@regDesktopHome:~/semios/v3upgrade$ sudo kill -9 16515 reg@regDesktopHome:~/semios/v3upgrade$ ps ax| grep mysql 16678 ?        Ssl    0:00 /usr/sbin/mysqld 16715 pts/23   S+     0:00 grep --color=auto mysql reg@regDesktopHome:~/semios/v3upgrade$ mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)   looks like a process is automatically restarting mysql as soon as I kill it...