I would like to understand the following behaviour. I have WPF application with button click event handler in which I start Parallel.ForEach. In each loop I update UI via Dispatcher. After the Parallel.Foreach I do the "final update" of the UI. However this "final update" actually happens before any of the updates from the Dispatcher. Why is it happening in this order? private void btnParallel_Click(object sender, RoutedEventArgs e) {     txbResultsInfo.Text = "";      Parallel.ForEach(_files, (file) =>     {         string partial_result = SomeComputation(file);          Dispatcher.BeginInvoke(new Action(() =>         {             txbResultsInfo.Text += partial_result + Environment.NewLine;         }));     });      txbResultsInfo.Text += "-- COMPUTATION DONE --"; // THIS WILL BE FIRST IN UI, WHY?     //Dispatcher.BeginInvoke(new Action(() => txbResultsInfo.Text += "-- COMPUTATION DONE --"; - THIS WAY IT WILL BY LAST IN UI }  My intuitive expectation was that the code continues after all branches of the Parallel.ForEach loops are finished, meaning the Dispatcher has received all requests for UI update and started to execute them and only then we continue to update the UI from the rest of the handler method. But the "-- COMPUTATION DONE --" actually always appears first in the textBlock. Even if I put Task.Delay(5000).Wait() before the "done computation" update. So it is not just a matter of speed, it is actually sorted somehow that this update is happening before updates from Dispatcher. If I put the "done computation" update to dispatcher as well, it behaves as I would expect and is at the end for the text. But why does this needs to be done via dispatcher as well?

Just wondering what the difference between BeginInvoke() and Invoke() are?   Mainly what each one would be used for.  EDIT: What is the difference between creating a threading object and calling invoke on that and just calling BeginInvoke() on a delegate? or are they the same thing?


Related:  and   But the answers therein do not address amorphous matter / fluids. So there is a puddle of water on the ground. Or a lake of lava. Or some spilled soup. Or . Air. Cloud. Farts. Pools of radiance. Molten iron. The T1000 terminator (probably a creature, ain't so).  But I digress. Are portions of amorphous matter/fluids considered objects?

The description of the  spell in the PHB states, under the "Object" section of the spell:  You can try to move an object that weighs up to 1,000 pounds. [...] You can exert fine control on objects with your telekinetic grip, such as manipulating a simple tool, opening a door or a container, stowing or retrieving an item from an open container, or pouring the contents from a vial.  For reference, the definition of  is:   a material thing that can be seen and touched.   The answers to the question  seem to imply that any material that is inanimate is an object. However, the use of 'object' does not jibe well with what I typically consider to be an object, as I would say that an object needs to be discernible from its surroundings, something you can pick up and manipulate. Is uncontained liquid (like a puddle of water) considered an object? Can it be controlled with telekinesis?


I’m running Windows 7 and I have an icon on my desktop called _USAJ-PRDDSFS1_Candidate_6334_13727_7FF2294F-9C5D-462F-818D-B3903872BAF8.doc   When I try to remove it I get the message:     Could not find this item. Verfy the items location and try again.   This thing has been pestering me since 2012 and will not go away. Can help me out?

A friend sent a long a file (a .rar) he wanted me to check out for him before he installed it.  I downloaded it and unrared it with no problems, but it was full of .exe's instead of the intended contents (fonts) so I advised him to delete it immediately and not use.  I then proceeded to do the same, but the folder simply will not delete. Oddly the files went fine, and I never ran anything, but this is what I'm seeing:   Could not find this item  This is no longer located in C:\Users\This_User\Desktop. verify the item's location and try again.   I've tried the following things with no help:   Using "Unlocker" to Unlock and delete Using move on reboot and rebooting Using PendMoves (from sysinternals) and rebooting Elevating a cmd line, doing a dir /x to get the short name of the folder, and then del 'shortna~1' Moving the folder to a new folder and then trying to delete the parent folder   I'm on Windows 7 RTM, very fresh install. Any thoughts?  Update: Just to confirm, I've run Hijack this and half a dozen other malware detectors, and everything came back clean (no extra processes, no other obvious badness). Rebooting in safe mode didn't help either.


$X>0$, $Y>0$ and $X^2+Y ^3\geq X^3+Y^4$. Prove that $X^3+Y ^3\leq 2$  First I tried:  $0<X\leq1$ and $0<Y\leq1$, but this in not the only case for $X^2+Y ^3\geq X^3+Y^4$ and get nowhere.      Can somobody give me an idea?

As in the title. If $x,y>0$ and $x^2+y^3\ge x^3+y^4$, prove that $$x^3+y^3 \le 2.$$  This seems to be a very tricky one. I tried applying various inequalities like AM-GM, unfortunately, none of techniques I'm familiar with seem to work here.  I'd greatly appreciate any hints.


I have to prove that $e$ is irrational using this result  $1/e = \sum_{k=0}^{\infty} \frac{(-1)^k}{k!}$   and getting the estimation for the partial sums $0 < 1/e - s_{2k-1} < \frac{1}{(2k)!}$  I tried, but I obtain $0 < 1/e + \frac{1}{(2k-1)!} = \frac{1}{(2k)!} < 1$, and I don't think it's good

Prove that e is an irrational number.  Recall that $\,\mathrm{e}=\displaystyle\sum_{n=0}^\infty\frac{1}{n!},\,\,$ and assume $\,\mathrm{e}\,$ is rational, then  $$\sum\limits_{k=0}^\infty \frac{1}{k!} = \frac{a}{b},\quad \text{for some positive integers}\,\,\, a,b.$$  so  $$b\sum\limits_{k=0}^\infty \frac{1}{k!} =a$$  or  $$ b\left(1+1+\frac{1}{2} + \frac{1}{6} +\cdots \right)= a. $$  Where can I go from here?


Let's say ABC drug company claims their medicine cures 90% of patients. Now a doctor conducts a trial by taking a random sample of 15 patients. Result shows 11 of them are cured but 4 are not.   In this case, $H_0$ should be: $p=0.9$. And $H_1$ is: $p<0.9$. If we use $X$ to represent the number of people cured in the sample, then $X \sim B(15,0.9)$.   If significance level ($\alpha$) is set as 5%, the critical region in this case should be defined as:     $P(X<11)<\alpha$ where $\alpha=5\%$   , $H_0$ will be rejected if the expression is true.   This really confuses me. The smaller of $P(X<11)$ is, the larger of $P(X>11)$ should be. Then the more patients should be cured and more likely H0 should be accepted. Anything wrong with this?    To me, it seems to make more sense if $P(X>11) < \alpha$  proves to be true to reject $H_0$.

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


I have stumbled on the equality $[\sum i]^2 = \sum i^3$ which holds when both sums are over the range 1 to k.  The equality is readily demonstrated inductively, but I wonder if anyone can provide an algebraic proof?

I recently proved that  $$\sum_{k=1}^n k^3 = \left(\sum_{k=1}^n k \right)^2$$  using mathematical induction.  I'm interested if there's an intuitive explanation, or even a combinatorial interpretation of this property. I would also like to see any other proofs.


These DNSUnlocker things are everywhere on every page on my PC. I don't even know how it even got on my system. After finding it in control panel and uninstalling it, it seems to still terrorize my pc, with most words becoming links for "ads" which is really annoying when trying to click play on one of my games.  I won't be able to add images because the images button has been taken over by the adware.  How can I stop this "DNS Unlocker" adware from messing up my PC?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


Dumbledore says:     Very few people know that Lord Voldemort was once called Tom Riddle.   I taught him myself, fifty years ago, at Hogwarts. He disappeared   after leaving the school … travelled far and wide … sank so deeply   into the Dark Arts, consorted with the very worst of our kind,   underwent so many dangerous, magical transformations, that when he   resurfaced as Lord Voldemort, he was barely recognisable. Hardly   anyone connected Lord Voldemort with the clever, handsome boy who was   once Head Boy here.   Also we know that everyone knows that Voldemort was in Slytherin. At least when Ron mentions this      “Gryffindor,” said Ron. Gloom seemed to be settling on him again. “Mum   and Dad were in it, too. I don’t know what they’ll say if I’m not. I   don’t suppose Ravenclaw would be too bad, but imagine if they put me   in Slytherin.”      “That’s the House Vol-, I mean, You-Know-Who was in?”      “Yeah,” said Ron. He flopped back into his seat, looking depressed.   Then how do very few people know the real identity of the Voldemort as Tom Riddle, surely people would have searched and found out this once he disappeared. Actually everyone should know this considering Voldemort is really famous among wizards.

Often called "He-Who-Must-Not-Be-Named" and "You know who", was it common knowledge at the Ministry of Magic that Voldemort was the same person as Tom Riddle?


I wonder why my professor said that Gamma's canonical link is $\frac{1}{\mu}$. My thoughts are:  EDIT: $\theta$ is the canonical parameter.  Since $$\mathbb{E}_\theta(Y)=b^{'}(\theta)=-\frac{1}{\theta}=\mu$$ then $$\mathbb{E}_\theta(Y)=-\frac{1}{\theta}=\mu \iff \theta=g(\mu)=-\mu^{-1}$$ So $g(\cdot)=$ minus-inverse.  I clearly see a minus!! Shouldn't it be $-\frac{1}{\mu}$ instead of $\frac{1}{\mu}$?

Consider $Y_1, \dots, Y_n$ independent from the Gamma distribution. For $y > 0$: $$\begin{align} f(y \mid \alpha, \beta) &= \dfrac{1}{\beta^{\alpha}\Gamma(\alpha)}y^{\alpha-1}e^{-y/\beta} \\ &= \exp\left[-\log(\beta^{\alpha}\Gamma(\alpha))+(\alpha-1)\log(y)-\dfrac{y}{\beta} \right] \\ &= \exp\left[y\left(\dfrac{-1}{\beta} \right)-\log(\beta^{\alpha}\Gamma(\alpha))+(\alpha-1)\log(y) \right] \end{align}$$ I define an exponential dispersion family as any distribution whose PMF/PDF is  $$f(y \mid \boldsymbol\theta) = \exp\left\{\phi[y\theta - b(\theta)] + c(y, \phi) \right\}\text{, } y \in \Omega$$ where $\Omega$ is in the support of a random variable $Y$ in the family.    Method 1:  Therefore, $Y_i$ is of the exponential dispersion family with (assuming $\alpha_i$ is known) \begin{align} \phi &= 1 \\ \theta_i &= \dfrac{-1}{\beta_i} \\ b(\theta_i) &= \log[\beta_i^{\alpha_i}\Gamma(\alpha_i)] \\ &= \log[(-\theta_i)^{-\alpha_i}\Gamma(\alpha_i)] \\ &= -\alpha_i\log(-\theta_i) + \log \Gamma(\alpha_i) \\ c(\phi, y_i) &= (\alpha_i-1)\log(y_i)\text{.} \end{align} It follows that \begin{equation} \mu_i = b^{\prime}(\theta_i) = \dfrac{-\alpha_i}{-\theta_i}(-1) = \dfrac{-\alpha_i}{\theta_i}\text{.} \end{equation} and our canonical link is   $$g(\mu_i) = \theta_i = -\dfrac{\alpha_i}{\mu_i}\tag{*}$$    Method 2:  Credit due to .  Let $\theta = -\dfrac{1}{\alpha\beta}$. Then rewrite $$\begin{align}f(y \mid \alpha, \beta) &= \exp\left[y\left(\dfrac{-1}{\beta} \right)-\log(\beta^{\alpha}\Gamma(\alpha))+(\alpha-1)\log(y) \right] \\ &= \exp\left[y\left(\dfrac{-1}{\beta} \right)-\alpha\log(\beta)-\log\Gamma(\alpha)+(\alpha-1)\log(y) \right] \\ &= \exp\left[y\alpha\theta-\alpha\log(\theta^{-1})-\log\Gamma(\alpha)+(\alpha-1)\log(y) \right] \\ &= \exp\left\{\alpha[y\theta-\log(\theta^{-1})]-\log\Gamma(\alpha)+(\alpha-1)\log(y) \right\}  \end{align}$$ in which case, since $\phi$ cannot vary depending on $i$, \begin{align} \phi &= \alpha \\ \theta_i &= -\dfrac{1}{\alpha\beta_i} \\ b(\theta_i) &= \log(\theta_i^{-1}) = -\log(\theta_i)\\ c(\phi, y_i) &= (\alpha-1)\log(y_i)-\log\Gamma(\alpha)\text{.} \end{align} In this case, $b^{\prime}(\theta_i) =-\dfrac{1}{\theta_i} = \mu_i$, which means that $$g(\mu_i) = \theta_i = -\dfrac{1}{\mu_i}\text{.}\tag{**}$$     cites (**) as the canonical link function. Why is (**) preferable over (*) for the canonical link function?  What makes this even more confusing is that  says that the canonical link function is $\dfrac{1}{\mu_i}$ (also mentioned in McCullagh and Nelder).     First main question: Are canonical link functions unique, when provided a random component?      Second main question: Is there only supposed to be one canonical link function for each random component? If so, what is wrong with the work above?


I have 27 items of post_meta data that I need to get out in a class that I use through-out my website.  Currently I'm using:  $this->postMetaData = get_metadata("post", $postID);   This returns an array of arrays... such as...  Array( [first_element] => Array(     [0] => firstValue ) [second_element] => Array(     [0] => secondValue )   I then have to 'loop' through the array and 'flatten' it down so it becomes:  Array( [first_element] => firstValue [second_element] => secondValue etc )   I then assign the array elements to variables in the class such as:  $this->firstElement = $myArray["first_element"];   As part of some micro-optimisation I was looking at I wondered if there was a better way of doing this. I've read about get_metadata and get_post_meta and wondered whether I'm better using get_post_meta (or get_metadata) as singles... for instance:  $this->firstElement = get_post_meta($postID, "first_element", true); etc   Or whether I should just use a bespoke query to get the items out of the database?  Any idea which is better?  Thanks :-)

I have the posts which have many custom defined meta fields. On posts I am calling them on requirement using get_post_meta. Means for 10 meta fields I am using it 10 times.   Am I doing it right? Means, is there any performance issue with the above method and if yes then how to reduce the number of calls.  I am aware of the answer available here:  which explains that the use of 'single query'. But it is not clear and sound so asking again if somebody knows and want to share in detail.


Can you re-enter Schengen if for example you entered October 1st and left 60 days later December first but want to come back for another two months before the end of the 180 days?

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


Show that the set $\mathbb{R}^{n-1} \times 0$ has measure zero in $\mathbb{R}^{n}$.  Well, I resolved as follows:  We have $\mathbb{R}^{n-1} \times 0 \subset \mathbb{R}^{n}$. Let $\cup_{\lambda \in L} A_{\lambda}$ be an open cover of $\mathbb{R}^{n-1} \times 0$. So, the Theorem of Lindelof we say that $\cup A_{\lambda}$ admits an enumerable under coverage $\cup_{i=1}^{\infty} A_{\lambda_i}$. Set $$A_{\lambda_i} = ( x_{1,i} - \frac{\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}}, x_{1,i} + \frac{\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}}) \times ( x_{2,i} - \frac{\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}}, x_{2,i} + \frac{\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}}) \times \cdots \times ( x_{n-1,i} - \frac{\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}}, x_{n-1,i} + \frac{\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}}) \times ( - \frac{\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}},\frac{\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}}),$$ where $(x_{1,i},x_{2,i}, \cdots , x_{n-1,i}, 0) \in \mathbb{R}^{n-1}\times {0}.$  Being $v(A_{\lambda_i})$ the volume of $A_{\lambda_i}$. We have to $v(A_{\lambda_i}) = \left( \frac{2\sqrt[n]{\epsilon}}{2\sqrt[n]{2^{i+1}}}\right)^{n} = \frac{{\epsilon}}{{2^{i+1}}}$. So we have to $$\sum_{i=1}^{\infty} v(A_{\lambda_i}) = \epsilon \sum_{i=1}^{\infty} \frac{1}{2^{i+1}} = \frac{\epsilon}{2} < \epsilon.$$    I would like to know if this solution is correct. My biggest question is if I can do $A_{\lambda_i}$ as done above.

I want to show that $\mathbb{R}^n\times\{0\}$ has measure zero in $\mathbb{R}^{n+1}$.  For example, take $n=1$. I want to show that the $x$-axis has measure zero in the plane. I cover it with the sets $[-1,1]\times[-\epsilon/8,\epsilon/8]$, $[-2,2]\times[-\epsilon/32,\epsilon/32]$, $\ldots$  The goal is to have the volumes be $\epsilon/2, \epsilon/4, \ldots$ so that they sum to $\epsilon$.  I think this method generalizes to $\mathbb{R}^n$, simply by choosing $[-1,1]^{n-1}\times[-\epsilon/2^{n+2},\epsilon/2^{n+2}],\ldots$. I don't think it is very elegant though. Is there a "better" way to do this?


Sometimes, when I try to play Minecraft on a singleplayer or multiplayer world, it crashes. Here's the crash log:  Completely ignored arguments: [--nativeLauncherVersion, 307] [14:53:18] [Client thread/INFO]: Setting user: Rightenz [14:53:20] [Client thread/INFO]: LWJGL Version: 2.9.4 [14:53:21] [Client thread/INFO]: Reloading ResourceManager: Default, Tiny Pixels - 25th October - Copy, PF.Resources, novaskin [14:53:23] [Sound Library Loader/INFO]: Starting up SoundSystem... [14:53:23] [Thread-5/INFO]: Initializing LWJGL OpenAL [14:53:23] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org) [14:53:25] [Thread-5/INFO]: OpenAL initialized. [14:53:25] [Sound Library Loader/INFO]: Sound engine started [14:53:27] [Client thread/WARN]: Texture minecraft:textures/blocks/portal.png with size 8x8 limits mip level from 4 to 3 [14:53:27] [Client thread/WARN]: textures: dropping miplevel from 4 to 3, because of minimum power of two: 8 [14:53:27] [Client thread/INFO]: Created: 1024x512 textures-atlas [14:53:49] [Server thread/INFO]: Starting integrated minecraft server version 1.10.2 [14:53:49] [Server thread/INFO]: Generating keypair [14:53:49] [Server thread/INFO]: Preparing start region for level 0 [14:53:50] [Server thread/INFO]: Preparing spawn area: 0% [14:53:51] [Server thread/INFO]: Preparing spawn area: 10% [14:53:52] [Server thread/INFO]: Preparing spawn area: 30% [14:53:53] [Server thread/INFO]: Preparing spawn area: 51% [14:53:54] [Server thread/INFO]: Preparing spawn area: 75% [14:53:55] [Server thread/INFO]: Preparing spawn area: 96% [14:53:56] [Server thread/INFO]: Changing view distance to 4, from 10 [14:53:57] [Server thread/INFO]: Rightenz[local:E:b3a537fb] logged in with entity id 1729 at (-167.2159220274755, 65.0, 113.5371539039923) [14:53:57] [Server thread/INFO]: Rightenz joind teh gaem [14:53:58] [Server thread/INFO]: Saving and pausing game... [14:53:58] [Server thread/INFO]: Saving chunks for level 'New Burld'/Overworld [14:54:00] [Server thread/INFO]: Saving chunks for level 'New Burld'/Nether [14:54:00] [Server thread/INFO]: Saving chunks for level 'New Burld'/The End [14:54:03] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 5092ms behind, skipping 101 tick(s)  # # A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x27204960, pid=4148, tid=4928 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) Client VM (25.25-b02 mixed mode windows-x86 ) # Problematic frame: # C  [ig4icd32.dll+0x44960] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\VIC\AppData\Roaming\.minecraft\hs_err_pid4148.log # # If you would like to submit a bug report, please visit: #   http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release   Is there any way to fix this bug and continue the game without crashes?

When I try to launch Minecraft 1.7.4 or newer, the game crashes on startup, and the game output screen says this:  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=*, pid=*, tid=* # # JRE version: Java™ SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13) # Java VM: Java HotSpot™ Client VM (* mixed mode, sharing windows-* ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] OR # C  [ig4dev64.dll+0x55ec] OR # C  [ig4icd32.dll+0x104a77] OR  # C  [ig4icd64.dll+0x84930a]   This happens with both Java 7 and 8.  What causes this error, and what can I do to fix the issue?


Prove that if $a_1,a_2,\ldots $ converges to $a$ then $\lim_{n\rightarrow\infty} \dfrac{\sum_{i=1}^n a_i}{n}= a$.  Let $\epsilon>0$. We know that there is natural $N$ such that $\vert a_n-a\vert <\epsilon$ whenever $n>N$. Since $(a_n)$ is convergent we also know that it is bounded by some constant $M>0$.  Now,  $$\left \vert \frac{\sum_{i=1}^n a_i}{n} -a \right\vert \le \frac{\sum_{i=1}^N \vert a_i-a\vert }{n} + \frac{\sum_{i=N+1}^n \vert a_i-a\vert }{n} \le \frac{NM}{n}+\frac{n-N-1}{n} \epsilon \rightarrow \epsilon.$$  Since $\epsilon$ was any positive number we must conclude that $\left\vert \dfrac{\sum_{i=1}^n a_i}{n} -a \right \vert$ converges to $0$.  Is this a correct explanation? How can I make it more "explicit"?  Edit (thanks to Kitty): Obviously $M$ must be a bound for $|a_i-a|$, $i=1,\ldots,N$.

Prove that if $\lim_{n \to \infty}z_{n}=A$ then:  $$\lim_{n \to \infty}\frac{z_{1}+z_{2}+\cdots + z_{n}}{n}=A$$ I was thinking spliting it in: $$(z_{1}+z_{2}+\cdots+z_{N-1})+(z_{N}+z_{N+1}+\cdots+z_{n})$$ where $N$ is value of $n$ for which $|A-z_{n}|<\epsilon$ then taking the limit of this sum devided by $n$ , and noting that the second sum is as close as you wish to $nA$ while the first is as close as you wish to $0$. Not sure if this helps....


I find there are many documents for a software that I've installed. I know we can show man document by using man command.     How about others, is there any formal way to access those document, or I have to CD to the directory and vi it ?

I recently learned that there is a huge pile of documentation in /usr/share/doc.  It seems like much of it is gzipped so that it is not directly accessible without administrative privileges:  $ gunzip examples/letter.tex.gz  gzip: examples/letter.tex: Permission denied   While one solution to this would be for every user to duplicate each item in their home directory just to read it, this arrangement hardly seems conducive to regular browsing.  How do normal people read this documentation?  I am not inclined to believe that the typical user is expected to install and maintain a web server just to read local text documentation.


A domain name I've been eyeing, has not been renewed by it's registrant this year. The domain was with godaddy.com all these years.  According to godaddy's documentation:     Day 43    We assign the domain name to the winner of the expired domain   name auction, backorder, or closeout. If there are no bidders, we   return the domain name to the registry.   That Day 43 ended on the 19 Nov, 2015, but I still cannot register the domain name, and it shows as Not Available  Whenever I check with whois.godaddy.com, I get the message:     Registrar: GODADDY.COM, LLC    Whois Server: whois.godaddy.com    Creation Date: 05-OCT-2007    Updated Date: 26-NOV-2015   Expiration Date: 05-OCT-2015      Nameserver: No nameserver      Registry Status: redemptionPeriod   What does this mean, and when can I register this domain?

I'm trying to purchase a domain name that was registered and apparently already expired. This is its status:  Status: clientHold http://www.icann.org/epp#clientHold Status: clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited Status: redemptionPeriod http://www.icann.org/epp#redemptionPeriod Updated Date: 14-oct-2015 Creation Date: 01-sep-2014 Expiration Date: 01-sep-2015   From what I'm seeing from ICANN policies, it should already be available to be registered by third parties, but maybe I'm missing something. When will it become available for me to register it?


I hope you can help with the following problem. I have a shapefile and want to project it using a projected coordinate system with meters as unit. What I did was to change the projection from ArcCatalog and then importing the shapefile into ArcMap. But when I do this, there are two problems:   Distances are completely wrong. By using the Measure tool, houndreds of kilometers are measured as less than a meter! The numbers on the bottom-right which indicated the position and the units of the map are also wrong. When displayed in Decimal Degrees, are either 0 or 1. When I change this in meters, numbers are still very small.   The problem persists even after the projection is added to the dataframe. What am I doing wrong? Thanks for any help and suggestion.

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


Suppose that $n$ lines are drawn on a plane in such a way that no lines are parallel and no three of them intersect at a point. Let $r(n)$ be the number of regions the plane is divided into after drawing the $n$ lines. Find a recursive formula and prove it without induction. Progress I found that the formula $r(n)=r(n-1) + n$ works but am having trouble proving it.

Show that $n$ lines separate the plane into  $\frac{n^2+n+2}{2}$ regions if no two of these lines are parallel and no three pass through a common point.   I know we start with the base case, where, if we call the above equation P(n), P(0), for 0 lines would be 0.  But I really have no idea how to begin the inductive step.  How do we know what k+1 we're supposed to arrive at?  Thanks!


I want to use the following chapter style in my book:  \usepackage{color,calc,graphicx,soul,fourier}   \definecolor{nicered}{rgb}{.647,.129,.149}   \makeatletter   \newlength\dlf@normtxtw   \setlength\dlf@normtxtw{\textwidth}   \def\myhelvetfont{\def\sfdefault{mdput}}   \newsavebox{\feline@chapter}   \newcommand\feline@chapter@marker[1][4cm]{%   \sbox\feline@chapter{%   \resizebox{!}{#1}{\fboxsep=1pt%   \colorbox{nicered}{\color{white}\bfseries\sffamily\thechapter}%   }}%   \rotatebox{90}{%   \resizebox{%   \heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%   {!}{\scshape\so\@chapapp}}\quad%   \raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%   }   \newcommand\feline@chm[1][4cm]{%   \sbox\feline@chapter{\feline@chapter@marker[#1]}%   \makebox[0pt][l]{% aka \rlap   \makebox[1cm][r]{\usebox\feline@chapter}%   }}   \makechapterstyle{daleif1}{   \renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}   \renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape\color{nicered}}   \renewcommand\chapternamenum{}   \renewcommand\printchaptername{}   \renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}   \renewcommand\afterchapternum{\par\vskip\midchapskip}   \renewcommand\printchaptertitle[1]{\chaptitlefont\raggedleft ##1\par}   }   \makeatother   \chapterstyle{daleif1}      Which should look like this:   However, this chapter style is meant to be used in the memoir class and I already wrote more than half a book in the book class, so it would be hard for me to chenge class. There is some way to use this chapter style in the book class?  Thanks!

As fncychap has no such chapter style, and using the memoir class will cause a lot conflicts with my current settings (book class), how to make this style (perhaps using the titlesec package)?   title style for table of contetns, Nomenclature, References, etc title style for chapters


Given that $H$ and $K$ are finite subgroups of $G$ of order $o(H)$ and $o(K)$,   prove that    $$o(HK) = \frac{o(H)\,o(K)}{o(H\cap K)}$$   I have proved for specific case when $H$ and $K$ have only $e$ in common, but how do I prove the general case? Hints?

Let $H$, $K$ be subgroups of $G$. Prove that $o(HK) = \frac{o(H)o(K)}{o(H \cap K)}$.  I need this theorem to prove something.


I am working on a dataset in which a variable has following levels  Levels:      0   1  2  3  4 5 8  Frequency: 608 209 28 16 18 5 7   The target variable is binary. To combine levels in a factor variable while the target variable is continuous, I learned that levels which have an approximately equal mean of the target variable should be combined. This can be found by plotting the boxplot (factor variable vs target variable).   But on what basis can one combine levels of the factor variable when the target variable is binary (i.e., in a classification problem)?

Penalized models can be used to estimate models where the number of parameters is equal to or even greater than the sample size. This situation can arise in log-linear models of large sparse tables of categorical or count data. In these settings, it is often also desirable or helpful to collapse tables by combining levels of a factor where those levels are not distinguishable in terms of how they interact with other factors. Two questions:   Is there a way to use penalized models such as LASSO or elastic net to test for the collapsibility of levels within each factor? If the answer to the first question is yes, can, and should, this be set up in such a way that the collapse of levels and the estimation of model coefficients occurs in a single step?


I just installed Ubuntu 20.04 on my MacBook Pro 2010 (it was playing dead, so I helped it along with Ubuntu). I get this message on the screen when it's powered on and then it goes on to start the desktop. Failed to set MoKListRT:Invalid Parameter  Could not create MoKListRT:Invalid Parameter Importing MOK states has failed:import_mok_state0 failed: Invalid Parameter Continuing boot since secure mode is disabled_  Is this crucial for the operation of Ubuntu or not important?

I have a MacBook Pro and only use Ubuntu on it. I just upgraded from 18.04 to 20.04. Now when I start the computer it says: Failed to Set MokListRT: Invalid Parameter Could not create mokListRT: Invalid Parameter Importing MOK states has failed: import_mok_state() failed: Invalid Parameter Continuing boot since secure mode is disabled.  Does anyone know EXACTLY how I can fix this?? Step-by-step process I don't want to mess anything up trying to fix this.


I am trying to conduct a simple correlation analysis between a group of variable, however I have a number of these variables in percentage change (or percentage yield) form and the others in strictly numerical prices. I was wondering whether it is possible to find the correlation coefficients between a percentage variable and a numerical variable?  I have tried with the data as it is as well as with all variables in some percentage return format with varying results, hence my current confusion!  The data I am working with relates to the prices of stocks, gold etc and the percentage yield/change of bonds and CPI %change.  Any help would be greatly appreciated!

I have two datasets, one containing the percentage of people with flu and one which has the number of searches for Tea-recipes in google. Problem is, I get different results when i choose to include the percentage number instead of the real number of people with flu.  Im using Excel function Correl(peoplwithflupercentage, teasearches)  My question is, can I somehow use percentages to look for correlation with real numbers. Like correlation between a dataset (percentage numbers) and another dataset (real numbers)? I know this probably is a simple question, but  can't seem to find a good example in the forum or google.


I created these figures in tikzpictures. The two left ones are the first figure and the two right ones are the second figure.  How can I give them two separate captions respectively while keep both figures next to each other? If I add a second caption, the second figure always goes to the next line.  MWE:  \documentclass[12pt]{article} \usepackage{caption} \usepackage{tikz-qtree} \usetikzlibrary{arrows.meta} \usepackage{subcaption}  \begin{document} \captionsetup[subfigure]{labelformat=empty}  \begin{figure}[ht] \centering \begin{subfigure}[b]{0.25\textwidth} \centering \begin{tikzpicture}[scale=0.25] \tikzstyle{every node}=[font=\tiny] \draw  (4,9) node(a) [circle, draw] {} (4,1) node(b) [circle, draw] {} (1,3) node(c) [circle, draw] {}; \draw [->,line width=0.8pt](a) to (b); \draw [->,line width=0.8pt](b) to (c);  \draw [->,line width=0.8pt](c) to (a); \draw (3,4) ellipse (6cm and 10cm);  \end{tikzpicture} \captionof{figure}{Q} \end{subfigure}% \begin{subfigure}[b]{0.25\textwidth} \centering  \begin{tikzpicture}[scale=0.25] \tikzstyle{every node}=[font=\tiny]  \draw  (1,1)   node(a) [circle, draw] {} (0.5,9)  node(b) [circle, draw] {} (4,8)  node(c) [circle, draw] {} (4,4)   node(d) [circle, draw] {}; \draw [->,line width=0.8pt](a) to (b); \draw [->,line width=0.8pt](b) to (c); \draw [->,line width=0.8pt](c) to (d);  \draw [->,line width=0.8pt](d) to (a); \draw (3,4) ellipse (6cm and 10cm);  \end{tikzpicture} \captionof{figure}{V-Q} \end{subfigure}% \begin{subfigure}[b]{0.25\textwidth} \centering  \begin{tikzpicture}[scale=0.25,remember picture] \tikzstyle{every node}=[font=\tiny]  \draw  (3,1)   node(x) [circle, draw] {} (0,5)  node(y) [circle, draw] {} (2,9)  node(z) [circle, draw] {}; \draw [->,line width=0.8pt](x) to (y); \draw [->,line width=0.8pt](y) to (z); \draw (3,4) ellipse (6cm and 10cm); \end{tikzpicture} \captionof{figure}{Q} \end{subfigure}% \begin{subfigure}[b]{0.25\textwidth} \centering  \begin{tikzpicture}[scale=0.25,remember picture] \tikzstyle{every node}=[font=\tiny]  \draw  (1,9)   node(a) [circle, draw] {} (6,7)  node(b) [circle, draw] {} (6,3)  node(c) [circle, draw] {} (1,1)   node(d) [circle, draw] {}; \draw [->,line width=0.8pt](a) to (b); \draw [->,line width=0.8pt](b) to (c); \draw [->,line width=0.8pt](c) to (d);  \draw (3,4) ellipse (6cm and 10cm); \end{tikzpicture} \captionof{figure}{V-Q} \end{subfigure}% \begin{tikzpicture}[overlay, remember picture] \draw[->,line width=0.8pt] (d) to (x); \draw[->,line width=0.8pt] (z) to (a); \end{tikzpicture} \caption{Figure X} \end{figure} \end{document}     The desired outcome is:

How can I put two figures side-by-side? Not two sub-figures, but two actual figures with separate "Fig.: bla bla" captions.  A figure is supposed to spread over the entire text width, but I have two figures which are narrow and long, and I need to save the space in order to withstand the pages limit.


I am trying to import architectural interiors from online 3d model marketplaces like CGTrader or Turbosquid. My workflow is that I download the fbx file, corresponding textures file and put it in a folder called textures at same level as fbx file. Then goto Blender and import the fbx. What I get after import is always a mesh with no textures applied and totally unlit. No matter whether I choose rendering engine as Eevee or Cycles, the textures never get rendered. In the Shading preview (in lookdev portion), the interior is always dark, even then there are lights included in the downloaded fbx. For example, consider the free 3d model available here:  I download the bathroom.fbx and texture.rar. Then created a folder and placed the fbx inside the folder and also put the texture folder extracted from texture.rar here, at same leves as .fbx (see in the screenshot, my folder structure  ) and here is what I see in Blender  As you can see that in the Viewport Shading using Cycles, the whole interior is dark and with spots like its still rendering (even though Blender completed by saying "Rendering Done"). Here is how it should look like: What am I missing? If it helps, I am using Blender 2.91.

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


I have become a more honest person.   Is there a way in which I can replace the word honest in the above sentence with an adjective with the same root as integrity?

I'm looking for the adjectival form of "integrity." Instead of "Be a person of integrity," I'd like to say something like "Be [one word I'm looking for]" I did a  for this, but I also wanted to know what stackexchange folks would like to say.


If I have a class variable foo, injected via Spring and I use foo to initialize another class variable like below, why does it throw a NullPointerException? However, if I perform the initialization in a method call of the class, it works fine.   class Baz {     @In    Object foo;     Object bar = foo.someMethod();  }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


We've implemented an ETL extraction out of SFDC using the "Change data capture" mechanism with SFDC as the Data Master (described ).  We do daily delta extractions using a filter on systemmodstamp and using the extract_all functionality of DataLoader CLI so we also include records with IsDeleted = true.   However we've noticed that sometimes deleted records are not returned as part of the ETL query result. In most cases they are, but sometimes they're not.   I suspect this has to do with many records being deleted at once, thus forcing a purge of the Recycle Bin within the day. This would mean that our end-of-day delta query will not pick up those deletes and the data will stay in our BICC system forever (as it will never be updated/deleted from SFDC again).  (Some background info on the recycle bin process , by the way)  So the question is:      is there any way that we can make the delta queries in this daily ETL extraction process 100% reliable?   Can I force deleted records to stay in the Recycle Bin for at least 24 hrs? Or should we do a full database dump each night? (I hope not..) We can't be the first company struggling with this?

I have the need to synchronize the data in certain Salesforce tables (user, account, opportunity, lead, task, contact, etc.) to a local database. For reasons that I won't go into here, I can't use the streaming API. I want to kick off a local process every X minutes that will:   Go through each of the tables on my list Insert any new records Update any existing records that were updated Delete any records locally that were deleted on the server (either deleted directly or indirectly (e.g. through a foreign key relationship, like when an account is deleted its associated tasks are deleted as well).   Can you please offer advice on what API's might be good to use here, and whether one stands out more than the others? Are there any specific design recommendations that might be useful for achieving this goal? Or is there really no practical difference between what REST vs SOAP can do?  It comes down to what is the easiest to maintain/implement? Is there some other route that might be beneficial to use (example: bulk data load to start out followed by outbound messaging tied to all of the objects in question to get updates/inserts/deletes)?   I am using C#/.net.


I'm working on an assignment that requires me to create an area column in miles without changing the projected coordinate system. ArcGIS has a tool that can do this ('Calculate Geometry')-- does QGIS have anything analogous? I know about using $area in the Field Calculator but I cannot tell what units the resulting answers are in.

In the QGIS function editor, it is possible to transform geometry using transform(geometry,'EPSG:xxx','EPSG:yyy') - however there isn't an area() function to recalculate the area of this.   The reason I am looking to do this is to have area calculated when a map is produced (labelled and as a virtual field in the attribute table); rather than store the area within the database as it is likely to change frequently as users modify the polygons?


I am using a Lenovo laptop I removed Windows and using Xubuntu xfce and Kali Linux on my system for many years. I have enough free space on my disk to reinstall Windows. Since I don't have Windows installation media but I have Windows recovery ISO. How I can install Windows without loosing other Operating Systems on my system?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I am working on a presentation. My presentation is made like this:  \documentclass[hyperref={ linkcolor=black, urlcolor=black, citecolor=black, colorlinks=true  }]{beamer} \usepackage[utf8]{inputenc} \usepackage{tcolorbox}%installiert pgf, verbatim \setbeamertemplate{headline}{ \begin{tcolorbox}[width=\linewidth*4/5] \hspace{2em} {\large\thesection.\thesubsection.~\insertsubsection} \hspace{2em} \end{tcolorbox} }  \setbeamertemplate{footline}{ \begin{flushright} \hfill\textcolor{red}{\rule{10cm}{.4pt}}\vspace{5pt}\\ \textcolor{gray}{{\tiny{~Name~\vline~\inserttitle~\vline~Folie~insertframenumber~\text{ }}}} \end{flushright} }  \setbeamerfont{footnote}{size=\tiny} \begin{document} bla \end{document}   Now I would like to put my footnotes in the footer. For Example: "My Car is red"^2. And in the footer on the left side I find: ^2 Book about cars, John et al., 2005. On the right  side the text defined in the preamble

I must place footnotes and footcites at the bottom of the frames, like shown in the picture:   The line above the footnotes must always be there, and it must have a minimum distance to the bottom of lets say 2.5em.  So I see two possible solutions:   Add the footnote via \setbeamertemplate to the footline. Change the format of the footnoteline and let it always appear, even if no footnote was used.   For the last hours, I tried to accomplish point 1, but I had absolutely no success. Can you please help me? Otherwise I have to use *whisper* Powerpoint. ;)    EDIT: Do you know the phenomenon that only after you ask someone, you can get the right ideas? ;)  Here is a MWE of my current solution:  \documentclass[xcolor={dvipsnames}]{beamer}  \usepackage[absolute, overlay]{textpos} \usepackage{environ}   \usetheme{default} \setbeamertemplate{navigation symbols}{}%remove navigation symbols   \newcommand{\makemyrule}{%     \setlength{\unitlength}{14pt}%      minimum distance to bottom     \ifdim\footnoteheight>\unitlength \setlength{\unitlength}{\footnoteheight} \fi%     check which distance is bigger     \begin{textblock*}{\linewidth}(0pt,\dimexpr\textheight-\unitlength)%    place with use of textpos         \textcolor{blue}{\rule{\paperwidth}{.3ex}}     \end{textblock*} }   \let\oldfootnote\footnote%      redefine the footnote command \renewcommand{\footnote}[1]{\Addheight{#1}\oldfootnote{#1}}  \newlength{\footnoteheight} \newsavebox{\mytext} \newcommand{\Addheight}[1]%     measure height of the text         {%                 \savebox{\mytext}{\small\strut\parbox{\textwidth}%                 {\hspace*{2em}\thefootnote#1}\strut}%       approximated by eye, not perfect!                 \addtolength{\footnoteheight}{\ht\mytext}%                 \addtolength{\footnoteheight}{\dp\mytext}%         }     \NewEnviron{myframe}[1]{%     \begin{frame}{#1}%     \setlength{\footnoteheight}{0pt}%     \BODY%     \makemyrule%     \end{frame}%     }    \renewcommand\footnoterule{}  \begin{document} \begin{myframe}{} \frametitle{Beamer example} using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al and a lot more information to create a linebreak} excessively \footnote{You do not need to read this, this is only blindtext to create even more and more text. Blindtext will go on forever, nobody can stop the allmighty blindtext. I think I am a blindtext author.} \end{myframe}{} \begin{myframe} \frametitle{Beamer example} using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al} \end{myframe}{} \begin{myframe} \frametitle{Another example} without footnotes\\ \end{myframe} \end{document}   What this does: At the beginning of each myframe-environment, the length \footnoteheight is reseted to zero. When a \footnote is placed, the height of the text is added to this length. At the end of each frame, via \makemyrule the bottom rule is created, which is above the footnote texts (my solution is not perfect) or, if there are no footnotes, at least 14pt above the bottom.  My wishes (not real problems, but I want it to work better) are   The height of the footnotetext is only approximated. I would like a solution where you can measure the height of the formatted footnote. The frame environment needs to be renamed to myframe. I would like a solution which works without changing the document. But it all failed, because I could not execute \makemyrule before \end{frame} automatically.


I have used this procedure to change the root password:   Get to GRUB screen Press e to edit add rw init=/bin/bash to end of the kernel line ctrl-x to reboot from there I would mount -rw -o remount / then passwd, etc...   That has worked in the past. This time I get:  bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell root@(none):/#   Then nothing. No response to any keyboard entry.  I also tried to boot to the recovery mode but when I hit to "Drop to root shell prompt", it shows me the message:  Give root password for maintenance (or type Control-D to continue)

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


I have an mp3 audiobook and each track has exactly 1 second of static at the end. Is there a way to bulk cut out last second from each track?

I have a bunch of mp3 files that have silence at the beginnings and ends, is there any program to trim this automatically? I would prefer that I can just give it a list of files to trim as opposed to having to do them individually.


How to know whether a Gibbs sampler is irreducible?  I know that the Gibbs sampler in e.g. two variable case constructs a sequence of r.v.s $(X_1^{(i)}, X_2^{(i)})$ by sampling from the related conditional distributions, rather than the joint distribution of these r.v.s  However, how would I infer, whether the Markov chain in this is irreducible or not? I've only seen examples reading that from the transition matrix, but I don't know how to even construct such matrix in this case.

I have a few related questions regarding the convergence of continuous-state Markov chains.  The theorems that I found claim that Markov chains converge in  if they are $\phi$-irreducible and aperiodic (e.g. , Theorem 4). I am confused by the fact that the way this result is phrased, it does not seem to depend on the choice of $\phi$ but $\phi$-irreducibility seems to always hold for the . Maybe I misinterpreted the definition of $\phi$-irreducibility? Could somebody help me understand this important result?  The other question that I have is: Under which conditions do Markov chains converge in KL-divergence (ideally with respect to $D_\text{KL}[P^n(x, \cdot), Q]$)? Is this known?  tells me that convergence in either KL-divergence is stronger than convergence in total variation.  Thanks!


Currently, in the edit profile section, we have two buttons: Save changes just for this community and Save and copy changes to all stack exchange communities.  Instead a drop down check box list will be helpful to select the communities in which I want my changes to appear. Scenario I want the same details for sites Stack Overflow, Software Engineering, CS Educators, Code Review, and Computer Science. Another set of information for Software recs and Hardware recs. Another set of information for Travel and Expats. Currently I have to edit on one community. Then copy the details and update each communities manually. For the first case, edit five communities manually. Proposal Add a dropdown checkbox list to select the target communities in which the information should be updated.  Advantage  Whenever I update some details in my profile, I am able to update the same for selected set of communities. No need to copy and paste it on each communities one by one.   We're able to set different details for different communities. So Stack Overflow stores the profile information of each community differently and hence no need to alter the database for this.

The "Save And Copy Profile To All Stack Exchange Accounts" button is quite useful for users with many accounts across the Stack Exchange network.  However, many users have profiles on certain sites that intentionally differ from the rest of the network, such as .  Can someone add an option to allow copying the profile to all Stack Exchange accounts except for selected sites?


so I am a beginner with Python and face one problem. The problem is that I have the following dict:  topperformer1 = {"Olivia":19, "Maria":18, "Pedro":15, "Nuno":17, "Julia":19, "Vasco":17, "Carla":18}   Now I would like to print the 3 highest grades (value), but if I sort the dict after the value and print it, I only get the value with no key.  I hope you can help me and best regards

I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.  I can sort on the keys, but how can I sort based on the values?  Note: I have read Stack Overflow question here  and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.


I basically don't know how to leave or abandon fireteam.

In Destiny, I got invited to a fireteam. How do I leave the fireteam without having to log out? Is it different for different systems?


Similarly to  (now fixed) where the slug ?blb=1 was forcing the blog to remain in mobile view in Chrome, I'm now experiencing the same issue with links form the community bulletin with the slug ?cb=1. For example, when I click a blog link to  from the community bulletin I am presented with the mobile view.  When I click the exit button in the footer the page reloads, still in the mobile view - I'm stuck.  Removing the ?cb=1 slug takes me back to a normal view. I've just noticed that I can only reproduce this on the War of the Closes Article, though it persists after a cache clear and in incognito. Chrome 27.0.14 Windows 7

Stack Exchange blog is showing me the mobile site and won't let me exit on Chrome 21. Could someone take a look? Thanks. Edit I noticed it was with the special query string, that I can't exit it.


I'm half way through a chance fighting program and I wanted to shorten my work by using functions. But I got the error,  UnboundLocalError: local variable 'Ehealth' referenced before assignment    This is my code so far...  import random import sys import time  print ("You encounter a wild boar.")  time.sleep(1)  Weapon = input("Do you use a 'Bow and Arrow' or a 'Sword'.")  Ehealth = (100) health = (100) Ealive = (1) alive = (1)  def attack():     damage = (random.randrange(5,21))     time.sleep(3)      print ("You attack the Boar for " + str(damage) + " attack points.")     time.sleep(3)      Ehealth = (Ehealth - damage)      print ("The Boars health is at " + str(Ehealth) + ".")     time.sleep(3)  if Weapon == ("Bow and Arrow"):     Emiss = (20)    #out of 40     miss = (15)     #out of 40      Espeed = (random.randrange(1,11))     speed = (random.randrange(1,11))      if Espeed > (speed):         print ("The Boar is faster than you so he attacks first.")         time.sleep(3)          print ("Your health is at " + str(health) + " and the Boars health is at " + str(Ehealth) + ".")         time.sleep(3)          while (alive == 1):      #1 = alive, 2 = dead             Emiss = (random.randrange(1,41))             if Emiss < (20):                  print ("The Boar missed.")                  attack()                  if Ehealth > (0):                     alive = (1)                      continue                  else:                     alive = (2)                     print ("You Won!")                      sys.exit()                Edamage = (random.randrange(5,16))              print ("The Boar attacks you with " + str(Edamage) + " attack points.")             time.sleep(4)              health = (health - Edamage)             time.sleep(4)              print ("Your health is at " + str(health) + ".")             time.sleep(4)              if alive <= (0):                 print ("You died...")                 sys.exit()              attack()              if Ehealth > (0):                 alive = (1)              else:                 alive = (2)                 print ("You Won!")                  sys.exit()   I got the error at the line on   Ehealth = (Ehealth - damage)   Any help would be appreciated.

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


I'm using typescript and I'm receiving a value with object format, but it's a string. Lets call it as: myVar. MyVar have this value (image below) as string. const string myVar = '{"value":"1"}'  How can I transform this string to object for access your value?

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


How to use the binomial Theorem to prove that for all integers $x$ and $y$, $a\mid (a+b)^n-b^n$. I am stuck after expanding the expression, which is $$ a \mid \sum_{m=0}^n \binom{n}{m}a^{n-m}b^m-b^n $$ Could anyone please give me a hint about how to proceed after this step? Greatly appreciated!

In respect to a larger proof I need to prove that $(n-m) \mid (n^r - m^r) $ (where $\mid$ means divides, i.e., $a \mid b$ means that $b$ modulus $a$ = $0$). I have played around with this for a while now but to no avail and would be grateful if you could help me.


There are many specific terms that are mostly only used in mathematical papers, e.g. Axiom, Lemma, Postulate, Definition (I know that it is used quite frequently in other domains), Proposition, Theorem.  Are there more terms that I am not aware of?  (Terms that are used specifically in context to proofs in a mathematical paper)

Definition: Theorem, Lemma, Proposition, Corollary, Postulate, Statement, Fact, Observation, Expression, Fact, Property, Conjecture and Principle   Most of the time a mathematical statement is classified with one the words listed above.  However, I can't seem to find definitions of them all online, so I will request your aid in describe/define them.  Also, when is a mathematical statement a theorem versus a lemma ? I've read that a theorem is important while a lemma is not so important and used to prove a theorem. However a theorem is sometimes used to prove some other theorem. This implies that some theorems are also lemmas ?  Is it subjective with respect to the author, which statements become a theorem, lemma, etc. ?


I'm writting instructions for someone else, and I want to know if I need to include a couple apt install commands in my snippet to make it completely copy/paste-able on a fresh Ubuntu installation.  How do I see if a given program was included with my Ubuntu installation or if I installed it myself later?  They're running the same Ubuntu version as me, so I don't need to know if the program only started being pre-installed in a certain Ubuntu version.

I'd like to get a list of packages installed manually by apt or aptitude and be able to find out whether a foobar package was installed manually or automatically. Is there any neat way of doing that from the command line?


I have a UDP socket which I bind to 0.0.0.0. After doing that, how can I know the exact network interface on which I am receiving the packets? I tried getsockname, but it returns 0.0.0.0.

If a socket is bound to IN6ADDR_ANY or INADDR_ANY and you use a call such as recvfrom() to receive messages on the socket. Is there a way to find out which interface the message came from?   In the case of IPv6 link-scope messages, I was hoping that the from argument of recvfrom() would have the scope_id field initialized to the interface Id.  Unfortunately it is set to 0 in my test program.  Anybody know of a way to find out this information?


I unlocked bootloader on my Xiaomi Redmi Note 9 and tried to Root it with Kingo Root mobile and desktop. Both keep failing and mobile gives error code 0x11f116. Now mobile version crashes when lauching. I couldn't find any information about that code, so can anyone help?

A couple years ago, it was easy to root any device: Install KingRoot, KingoRoot, or a similar app, hit the large ROOT button, and let it do the rest. After 5 minutes or so, a green "Root Succeeded!" prompt will pop up, and we can choose to keep the root app, or uninstall it and install a clean root manager app like SuperSU/Superuser.  How do they work? Why aren't they working anymore? And if they work, should I use them or not?


I have seen in my legacy embedded code that people are using signed char as return type. What's the need to put signed there? Isn't that implicit that char is nothing but signed char.

The code below compiles, but has different behavior for the char type than for the int types.  In particular     cout << getIsTrue< isX<int8>::ikIsX  >() << endl;    cout << getIsTrue< isX<uint8>::ikIsX  >() << endl;    cout << getIsTrue< isX<char>::ikIsX  >() << endl;   result in 3 instantiations of templates for three types: int8, uint8 and char. What gives?  The same is not true for ints: int and uint32 which result in the same template instantiation, and signed int another.  The reason seems to be that C++ sees char, signed char and unsigned char as three different types. Whereas int is the same as a signed int. Is this right or am I missing something?  #include <iostream>  using namespace std;  typedef   signed char       int8; typedef unsigned char      uint8; typedef   signed short      int16; typedef unsigned short     uint16; typedef   signed int        int32; typedef unsigned int       uint32; typedef   signed long long  int64; typedef unsigned long long uint64;  struct TrueType {}; struct FalseType {};  template <typename T> struct isX {    typedef typename T::ikIsX ikIsX; };   // This  int==int32 is ambiguous //template <>            struct isX<int  >    { typedef FalseType ikIsX; };  // Fails template <>            struct isX<int32  >  { typedef FalseType ikIsX; }; template <>            struct isX<uint32 >  { typedef FalseType ikIsX; };   // Whay isn't this ambiguous? char==int8 template <>            struct isX<char  >  { typedef FalseType ikIsX; }; template <>            struct isX<int8  >  { typedef FalseType ikIsX; }; template <>            struct isX<uint8 >  { typedef FalseType ikIsX; };   template <typename T> bool getIsTrue(); template <>           bool getIsTrue<TrueType>() { return true; } template <>           bool getIsTrue<FalseType>() { return false; }  int main(int, char **t ) {    cout << sizeof(int8) << endl;  // 1    cout << sizeof(uint8) << endl; // 1    cout << sizeof(char) << endl;  // 1     cout << getIsTrue< isX<int8>::ikIsX  >() << endl;    cout << getIsTrue< isX<uint8>::ikIsX  >() << endl;    cout << getIsTrue< isX<char>::ikIsX  >() << endl;     cout << getIsTrue< isX<int32>::ikIsX  >() << endl;    cout << getIsTrue< isX<uint32>::ikIsX  >() << endl;    cout << getIsTrue< isX<int>::ikIsX  >() << endl;  }   I'm using g++ 4.something


I have read multiple explanations of escape velocity, , and I don't understand it.  If I launch a rocket from the surface of the Earth towards the sun with just enough force to overcome gravity, then the rocket will slowly move away from the Earth and we see this during conventional rocket launches.  Let's imagine I then use slightly excessive force until the rocket reaches 50 miles per hour and then I cut back thrust to just counterbalance the force of gravity. Then my rocket will continue moving at 50 mph toward the sun. I don't see any reason why I can't just continue running the rocket at the same velocity and keep pointing it towards the sun. The rocket will never orbit earth (by "orbit" I mean go around it). It will just go towards the sun at 50 mph until it eventually reaches the sun. There seems to be no need whatsoever to ever go escape velocity (25,000 mph).  Answer: just to clarify the answers from below and the other linked question... Escape velocity is not necessary to leave the earth, unless the object has no thrust or other means of propulsion. In other words, if you throw a baseball, it has to go escape velocity to leave the earth, but if you have a spaceship with engines, then you leave the earth at any speed you want as long as you have the fuel necessary.

I had a recent conversation with my girlfriend, who is a physics grad student. She was kind enough to listen to me rant about an idea concerning escape velocity. Unfortunately, I am still thinking about this question, but don't want to bother her with it.  My thought is that we shouldn't actually need to reach 11km/sec to leave the earth's gravity. Instead of this, can we simply apply enough force to overcome earth's gravity without reaching that speed? How we would do this is not a part of my question.  Orbital altitude is $99$ miles. Travelling $60$ mph straight up should get you there in $1.65$ hours, granted you have enough force to push. I know some of the simpler math like $F=ma$, but that didn't help me understand.  I browsed some articles about space elevators and couldn't find my answer.  Then I thought about a regular elevator and the fact that it has enough force to move it away from the earth successfully. Even if the elevator moved at $1$ nanometer/sec, it would still move away from the Earth, overcoming the minute pull of gravity at that altitude.  If you missed it, my question was:  can we simply apply enough force to overcome Earth's gravity without reaching that speed?  Edit: In another example, let's say we could drive a car from here to low Earth orbit. As long as we had enough torque, we should be able to overcome gravity, much like a pickup truck pulling a bunch of lumber. Is that correct?


I am interested in computing the normalizer of Upper Triangular Matrices with diagonal entries $1$ in $GL_n(\mathbb{F}_p)$. Denote the subgroup of upper triangular matrices with diagonal matrices $1$ by $\mathbb{U}$ So I want to compute the following $\{M \in GL_n(\mathbb{F}_p) : M\mathbb{U}       M^{-1} \in \mathbb{U}\}$ So I am looking for elements $M$ such that $M(1+N_1)=(1+N_2)M$ where $N_i$ are the strictly upper triangular matrices. I was able to complete upto this. I cannot proceed further and hence I am stuck. Can I get some help from here?

Let $\mathrm{GL}(n,\mathbb{F}_p)$ be the general linear group over field of order $p$, and $\mathrm{U}(n,\mathbb{F}_p)$ be the subgroup consisting of upper triangular matrices with each diagonal entry $1$. Then   the normalizer of $\mathrm{U}(n,\mathbb{F}_p)$ in $\mathrm{GL}(n,\mathbb{F}_p)$ is the subgroup consisting of upper triangular matrices.  Is there any elementary way to prove this?  (The way I know is by using Bruhat decomposition. But, this decomposition may not be known to a beginner in group theory, it will be difficult to explain the proof by Bruhar decomposition.)


i have more than 60000 backlink too one page of my site because i put a hidden iframe in my free products. like this:  <IFRAME style="display:none;" SRC="http://www.domain.com/df/sdff.html" WIDTH=1 HEIGHT=1></IFRAME>   this backlinks Has positive or negative impact on my site ranking & seo ?

am sorry for my bad english. i have a site for download free website templates. i create a simple html file in my site and put my histats & google analitic code on that. then put a hidden iframe to this page in the free templates like this :(To increase the number of visitors to my site)  <IFRAME style="display:none;" SRC="http://www.domain.com/df/sdff.html" WIDTH=1 HEIGHT=1></IFRAME>   now after two years i have about 60000 daily visitors just to this one page from many of sites who using my free templates. please answer me step by step 1- is this backling The negative or positive effect for my site ranking & seo ? 2- who to i can delet this page from my site No further negative impact to my site ? 3- who to i can reject this backlink from my server ? because if this page will be delet all of the back link redirect to 404 page & this page in my site is large & The server puts a lot of pressure. please help me. thanks


I use next query:   SELECT ROUND(r/h) AS conv FROM table WHERE conv > 1   I receive error "Unknown column 'conv' in 'where clause'", But why? After AS conv is it not exists yet?

I have a simple query:  SELECT u_name AS user_name FROM users WHERE user_name = "john";   I get Unknown Column 'user_name' in where clause.  Can I not refer to 'user_name' in other parts of the statement even after select 'u_name as user_name'?


Consider the following:  x = 1 y = 1  print hex(id(x)) print hex(id(y))   Output:  0x2198158 0x2198158   x and y are two different variable that happen to hold the same value. Why is python assigning the same memory location to these two?  Next let us consider strings:  x = 'a' y = 'a' print id(x) == id(y)   Output:  True

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


I am trying to call a method when my webapplication starts. The purpose is to kick-off a timer that does some work at defined intervals. how do i call a function helloworld when my jboss 7.1 web application starts up?

I need to remove temp files on Tomcat startup, the pass to a folder which contains temp files is in applicationContext.xml.  Is there a way to run a method/class only on Tomcat startup?


I have apache2.2 on CentOS 6, having SSL enabled in   configuration block. It serves the  SSL pages for a host name first.defaultdomain.com (example) which is mapped to the default IP of the server. It is accessed via .  For the same default IP, I have multiple NameVirtualHost on port 80 (let's say there are two more hostnames, mapped to this IP, second.defaultdomain.com and third.defaultdomain.com).  If somebody mistypes the protocol part of the URL for second.defaultdomain.com, e.g. https_:_//second.defaultdomain.com, that person gets the SSL pages for first.defaultdomain.com and a warning about the certificate not matching the hostname (which is correct).  Is there a way to distinguish a request to https_://first.defaultdomain.com from https:_//second.defaultdomain.com (both hostnames mapped to same IP) ?  EDIT: I do not want to serve https for second.defaultdomain.com or third.defaultdomain.com, only first.defaultdomain.com.  regards, Gašper

Goals:   If the user support SNI and hit myurl1.server.com (https) or myurl2.server.com (https) it will match the right vhost. (the last 2 vhosts) If the user does not support SNI and hit myurl1.server.com (https) or myurl2.server.com (https) it will be catch by the fallback vhost (the first on port 443). It contains the SAN certificate and it  will hit the server again to do the match. This time it will hit the last 2 vhost.  If the user enter an unknown url with either http or https it will be catch in the first vhost that show a error page.   I have tested all 3 goals and it's working fine.  Questions:   When the user is hitting the SAN vhost (https) which make a new request to it self. How does Apache know it will match the last 2 vhost (443) when the proxypass in SAN vhost is using http(80) When the user is hitting the SAN vhost I can't see any requests in the SAN access log. The requests only appears in the  last 2 vhost even if it goes through the SAN vhost. However I can see some bot requests in the SAN access log.   The code only contains the important parts.  NameVirtualHost *:80 NameVirtualHost *:443  <VirtualHost *:80>   show error page </VirtualHost>  <VirtualHost *:443>   SSLCertificateFile san.crt   CustomLog san-access.log    ProxyPass / http://my-local-url-server/   ProxyPassReverse / http://my-local-url-server/ </VirtualHost>  <VirtualHost *:443>   ServerName myurl1.server.com   SSLCertificateFile myurl1.crt   CustomLog myurl1-access.log    ProxyPass / http://mybackend1/   ProxyPassReverse / http://mybackend1/ </VirtualHost>  <VirtualHost *:443>   ServerName myurl2.server.com   SSLCertificateFile myurl2.crt   CustomLog myurl2-access.log    ProxyPass / http://mybackend2/   ProxyPassReverse / http://mybackend2/ </VirtualHost>


As a new user on all three sites in the trilogy I am trying to write good questions but find one feature frustrating.  I was in a situation where I was posting  and wanted to link to several other questions on superuser to say, "Answers to these questions are not what I am looking for." But the spam filter blocked me and I was only able to link to one question because my reputation is low. (It would be nice if it had let me know that I could only include one link as soon as I tried to add the second rather than waiting until I hit post--but this is a minor quibble.)  My feature request is to allow more than one link in a question no matter the asker's reputation so long as the links are to other questions on Stack Overflow, Server Fault, or Super User (or meta).

Currently new users are limited to one two links in a post. If the purpose of this is, as I suspect, to prevent spam, I think it would be safe to allow unlimited internal links (i.e. links to M?S[OFU] posts).  It would be nice to do this on MSO at least, so that users can post links to examples of their problems.  Note: I know that MSO users can get unlimited links simply by linking to their S[OFU] account. Usually someone has to tell them this though; it isn't necessarily clear.


I would like to install Lubuntu 14.04 on an HP Omnibook with a Pentium 3 and 384MB of RAM and 10GB HDD, I would like to know if it is possible to install this new versions on old computers or I would have to install an old non-PAE version of Ubuntu, I can install via the alternative Ubuntu install or Core install, thank you.

I'm attempting to install Ubuntu 14.04.1 (the only version I have handy) onto my old Compaq Presario R3000 (this Ubuntu was recommended for this computer). The installation has stalled at about 60% and hasn't moved in an hour.  The message at the bottom says: Configuring bcmwl-kernal-source (i386).  I have no experience with Ubuntu (or with Linux, for that matter), coming from a strictly-Windows background). Can anyone offer some advice?


I had bought myself a phone, and then one day, it got stolen.      I bought myself a phone, and then one day, it got stolen.   Is the meaning of first clearer than the second? Is there a difference in both the sentences' meaning? Is using the past perfect necessary here?

I have never had this problem before. But after seeing some questions posted on ELU, I started to doubt. I have been through links1, pages of grammar books2, a lot of questions3 posted here and ELU. I now still can't seem to understand how the past perfect is exactly used. The references sometimes even contradict each other.  What I had understood so far was      The past perfect is not necessary if we are not 'going back' to the earlier past, and simply moving from one event to another.   but I then saw a lot of other 'rules' including      If the sequence is clear, the past perfect is not needed.   which is slightly different, less 'narrow' and can be applied in more situations than the first ruleA, and      The past perfect is optional only when talking about an action at a specific time.   This is confusing. Can anyone here clarify things out please?    A For example, for  Doing the survey [completed] -> Showing the result      We showed the result of the survey we did.      If the second rule is applied, the sentence above is fine (the sequence is clear), but not if the first rule since we are not moving from any event to the next and possibly even going back.    1  and   2 Practical English Usage (2005) by Michael Swan, Collins Cobuild Student's Grammar (1991). Upper-Intermediate Cutting Edge.  3 including , , ,  etc.


After I open a terminal, I run sudo su. But it then gives me >>> /etc/sudoers: syntax error near line 27 <<< sudo: parse error in /etc/sudoers near line 27 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin  I tried running su and then input the password but the terminal closes after a few seconds. What command do I use to become root? Also, I'm on Ubuntu 18.

How do I edit an invalid sudoers file? It throws the below error and it's not allowing me to edit again to fix it.  Here is what happens:  $ sudo visudo >>> /etc/sudoers: syntax error near line 28 <<< sudo: parse error in /etc/sudoers near line 28 sudo: no valid sudoers sources found, quitting


I wanted to thank people for their visits to a profile but Google wasn't quite sure either. Is there another way to express the same meaning?

Are apostrophes needed in this phrase?     The whys and the hows   I searched for duplicate questions, but the closest I found was in regard to


I got some spam events in my Apple iCloud calendar events and have been able to delete them by deleting the calendars. However, when I make a new calendar, I am finding it's being shared with two Chinese fake emails. It only shows in the iPhone calendar app.    In the App, I click Calendars at the bottom to show them all - in the iCloud if I press the i button at the right side of the relevant calender, it says "shared with/add person" - when I click this it has my own iCloud email address and two Chinese spam email addresses. These two reappear with every iPhone iCloud calendar I make and I can't delete them. clicking on them just brings up a "new email" to that email address.  I cant find anything on Google about this, just how to block/remove events. How do I get rid of these spam email addresses sharing my iCloud iPhone calendars?  This is not about how to remove the events but finding that my calendar has been shared with two spam email addresses (probably appeared since the event hacking) that I now cannot remove.  I'd do a screen shot if I could share it.

Today I've suddenly received spam calendar invitation for $19.99 Ray Ban sunglasses (never subscribed, checked, searched or visited any related site, so clearly spam) and it has other visible email accounts within the invitation. I'm wondering if I should be worried whether my accounts been compromised or a simple email from anywhere just plops this in my calendar without review. Questions to be answered:  What should I check/setup in order to make sure my iCloud account is safe? How can I delete this invitation without sending a notification to the sender, so as to prevent them from knowing my email address is live? How can I prevent these notifications in the future?  Here's an image:


Amongst sailors there is a superstition that assigned the expression "Jonah" to anyone who is considered to bring misfortune or bad luck (Ref. ).  I would like to know if there is any equivalent slang for a person who intentionally spreads gossip or false rumours, or, let's say, someone who is considered the rotten apple (or black sheep) in a group and normally the one responsible for destabilizing or segregating this group. (I have such person in my family!)  I've already read the article  but those expressions don't quite fit my question since i'm looking for a slang or popular expression.  Cheers!

Some one who is not good at keeping secrets. In my native language it is called "chugalkhor" but it's a slang. So I can't translate it.  What do you call such a person who can't keep secrets because his instincts don't let him.


I have a string of "A   B   C" and I have this line of code to split it:  String[] reFormatted = TestString.split("   "); System.out.println(reFormatted.toString());   and the output I get is this:  [Ljava.lang.String;@30f1c0   if I put this string array in a foreach loop like this:  for(String s : reFormatted){    System.out.println(reFormatted); }   I get the output of:  [Ljava.lang.String;@30f1c0 [Ljava.lang.String;@30f1c0 [Ljava.lang.String;@30f1c0   what is the problem here? what am I doing wrong?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I want my usb to run a command or a script --like autorun-- when it is plugged in. I've also searching and found out that autorun was not present because of some security reason(s). How do you run a command after a specific type of USB is plugged in ?

Is there a way to run a script when a particular USB device is mounted?  I keep my videos on a separate USB and would like to run a script that would mount the video folder on the USB device to the one in the home folder.


This is a hypothetical situation, I'm not actually in this position. I'm also an amateur with this, so correct me if I make any mistakes.  Let's say a stock is $100. You buy $4,000 worth of $0.50 call options with a strike price of $102. This is 8,000 options.   Now let's say the price of the stock goes up $5. You want to exercise your options to get a profit of $20,000. This means you have to pay $816,000 to buy your stock at the strike price. What does someone do if they don't have $816,000? It's an interesting situation because they don't have the money, but they are guaranteed to make a profit if they did.

As a follow up to my other , I would like to know whether the following is possible:  I have $20,000 in my brokerage account The price of a call option with $300 strike price is $5.00 (1 contract = 100 shares) I buy 20 contracts of these $300 calls (cost is 20 * 5 * 100 = $10,000) The price of the underlying goes up, making my option in-the-money  I decide to exercise my options. Exercising my calls means that I buy 20 * 100 = 2,000 shares of the underlying at $300 per share. However, I only have $10,000 left in my brokerage account and am unable to pay for the shares (2,000 * 300 = $600,000). What now? How does this work? Do brokers recognize that my position is profitable, and buy and sell the underlying for me as soon as I exercise my calls? In other words, do I need to worry about being able to pay for the shares of the underlying if I decide to exercise my options? Can I just take my profit without bothering with the shares at all?


I've configured auditpol auditpol /set /category:* /success:disable /failure:disable - the size of the logs has decreased, but I would like to know if it is possible to make them 0... For all channels: System, Application, etc.

In Windows 10 Resource Monitor I found that the system process is constantly writing C:\ProgramData\Microsoft\Windows\wfp\wfpdiag.etl at like 30-100KB/s. This equals 1TB write/year which is not healthy for SSD. There are other log write like C:\Windows\System32\LogFiles*** too.   Although logs is needed for diagnostics, it's better to be turned on only when problem has already occured.  Is it possible to disable as much system logs as possible to decrease garbage write amoung to SSD?


Ubuntu comes with Gnome as window manager. They you can install lubuntu or xubuntu that have LXDE and Xfce consequently.   As far I can tell, the only difference is the window manager.  My question is this: if you can just remove gnome and install another window manager, which takes max 15 minutes, why would you bother making another distribution out of it?   There are also articles comparing those distributions online like there were completly different operating systems, but afaik they are not.  Thanks for your input.

TL;DR: how does an Ubuntu flavor iso installation ( for example Lubuntu ) differ from installing a desktop package via apt-get ? (for instance sudo apt-get install lubuntu-desktop)  Context for the question:   Some time ago I answered a question on AskUbuntu , where I tested in virtual machine removing unity-desktop and installing ubuntu-gnome-desktop. That makes the boot logo ( plymouth ) change, desktop changes, different packages get installed (gnome-network-manager instead of network-manager , if I am not mistaken). It appeared that in effect I've switched to different Ubuntu flavor, even though I started out with the standard Ubuntu system. Hence the question: what differentiates the pre-made Ubuntu flavor iso from installing a package ? Is it all the same base underneath the hood or does installation from iso have specific configurations ? If it's possible to install a flavor via package manager, why then separate flavor iso's exist ? (obvious answer is user convenience, but I think there has to exist other reasons. Canonical is a business , and it makes not a lot of sense for a business to provide additional flavor iso , if a sysadmin or end-user can get the same thing via package manager by themselves).


Basically the question is how to get from this:   foo_id   foo_name 1        A 1        B 2        C   to this:   foo_id   foo_name 1        A B 2        C


I'm having an issue with my Canon 6D. Whenever I shoot photos inside my house they turn out so grainy! I've tried turning the ISO down but anything lower than 6400 and my photos are basically black. Mind you this is mid-day, lots of light in our house, and yet the ISO on my camera will not go below 6400 and it is making my photos look terrible because they are grainy instead of sharp! Please help!!  Lens is 24 - 105mm f4.0. I shot at 24mm, f5.0, shutter 1/160th, ISO 6400 (this is on auto, but only because anything lower I set it at makes the photos black!).  I'm still kind of new to this, but I do understand ISO, aperture, and shutter speed need to be in certain places for light to come in!

I am shooting in natural light, with my subject facing a full floor-to-ceiling south facing window. You would think my meter would allow ISO between 200-400 in bright light, but I was lucky to get it to 640, with f/3.2 and 1/60 (manual mode).  I've read other places that people say put your ISO down to 100 for indoor shots for greatest clarity (especially sharp eyes) — but don't know how I can with subjects potentially moving. Is there a setting in my camera (Canon 5D Mark III) I am missing, or something that might be making my meter need more light?


I want to power a Rpi, Arduino Uno and some Ic´s and sensors parallel. My problem is how do I split the Amps over all the components that they are not damaged. Because the IC´s e.g. only can handle 50mA and the Pi a lot more.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


Let $E$ a normed vector space and the hyperplane $H=\ker f$ with $f\in \mathcal{L}(E, \mathbb{R})$. Prove that if $a\in E$ then $\displaystyle{d(a, H)=\frac{|f(a)|}{\|f\|}}$

Suppose $E$ is a normed vector space. Let $f$ be a continuous linear functional on $E$ and denote by $M$ the Kernel of $f$. Let $x\in E$. How to show that $$\operatorname{dist}(x,M)=\displaystyle\inf_{y\in M}\|y-x\|=\frac{|f(x)|}{\|f\|}\, ? $$


I want to know how can I compare two objects (which is of the same class) like the string.Compare() method.   Is there any way to do this?

If i have a complex object, what is the best practice pattern to write code to compare 2 instances to see if they are the same


Thought that's what dogmatic meant but apparently it's not. Is there a word that describes this?

Just wondering, if there's a word for:  One who makes it appear as if they're an expert on a subject while there are also signals (subtly or blatantly noticeable) that this person doesn't know very much on the subject or at least as much as they're acting like they do on the subject; pretending to have much knowledge on a subject matter.  I found pedantic but I don't suppose it's the right word.


I have no clue why this always happened. I tried to reload the supervisord process but still doesnt the same error appears  The error show this..    and the supervisord.conf

I'm trying to run a gunicorn_django process in supervisor but it always exits immediately, giving this error:   INFO exited: my_app (exit status 1; not expected) INFO received SIGCLD indicating a child quit INFO gave up: my_app entered FATAL state, too many start retries too quickly   My server script looks like this:  #!/bin/bash set -e LOGFILE=/var/log/gunicorn/my_app.log LOGDIR=$(dirname $LOGFILE) NUM_WORKERS=3 USER=my-www-user GROUP=my-www-user cd /home/my-www-user/my_app source /home/my-www-user/.virtualenvs/my_app/bin/activate test -d $LOGDIR || mkdir -p $LOGDIR gunicorn_django -w $NUM_WORKERS --debug \  --user=$USER --group=$GROUP \  --log-level=debug --log-file=$LOGFILE 2>>$LOGFILE\  --pythonpath=my_app --settings=settings.active \  my_app.wsgi:application   And my supervisor config looks like this:  [program:my_app] directory=/home/my-www-user/my_app/ user=my-www-user command=/home/my-www-user/my_app/server.sh stdout_logfile=/var/log/supervisor/my_app.log stderr_logfile=/var/log/supervisor/my_app-error.log autostart=true autorestart=true   When I su into the my-www-user account the server starts normally. When I do sudo supervisorctl start my_app it simply hangs until I do CTRL-c, then I find the error above in the supervisord.log file.  Does anyone have a clue about what I am missing?


I have several images saved in pdf. However, due to the way they are generated, each are 800 Kb each. (The maximum size I worked with previously was 200Kb)  Each figure is included in the file in the standard way:  \begin{figure}[ht]     \begin{center}         \includegraphics{my pdf}     \end{center} \end{figure}   This causes the pdftex to compile very slowly, and after compiling, the images will take a little longer to go from blurry to crystal clear. On average about 20 seconds but that is up from 8 seconds I am used to previously.   Is there a "switch" that allows me to turn on and off including images. Because when I work with the actual texts I do not need those images. This is when I wish to turn them off. After I have finished with the texts, and I want to add the images back in. This is when I should turn the switch on.   I have tried to put all images in a separate folder, and removing path to that folder, but of course that throughs a graphics not found error. Is there some better way to do this aside from commenting them all out?

Is it possible to prevent the contents of a figure from being rendered? I have a large book document, and to speed up compiling while working on a draft, I would like to have some way of ignoring the content of the images, but ensuring that the figure size remains.  In several cases I am using a line like:  \includegraphics[width=\linewidth]{figure.pdf}     so I do not know the actual size of the image.


EDIT: Please see my attempt below at a proof to show the answer is $log2$  Let $$\alpha = \lim_{n \to \infty} \sum_{j=1}^n \frac {(-1)^{j+1}}{j}$$  Part (1): Show that $\alpha$ exists.  Part (2): Show that $\alpha = log2$.  My work:  $\alpha$ exists, by the alternating series test - simple enough.  But how can I get started on part(2)?  Proof:  Start with $log(1+x)$.  Rewrite it as   $$log(1+x) = \int \frac{1}{1+x}dx$$  Should there be a constant, c, added to the L.H.S.?  Or, should I look to make the R.H.S. a definite integral instead?  Continuing along, I get that  $$\int \frac{1}{1+x}dx$$ $$= \int [\sum_{n=0}^{\infty} (-x)^n]dx$$  with the sum valid for $|x|<1$.  Inside the interval of convergence of this sum, i.e., inside (-1,1), we have uniform convergence, and so we can integrate term-by-term, getting   $$ \sum_{n=0}^{\infty} \int (-x)^ndx$$ $$= \sum_{n=0}^{\infty} \frac {(-x)^{n+1}}{n+1}$$  same question: do I add a constant to the result of the indefinite integration?  Now relabeling indices gives  $$ \sum_{n=1}^{\infty} \frac {(-x)^{n}}{n}$$  $$ = \sum_{n=1}^{\infty} \frac {(-1)^{n+1}x^{n}}{n}$$  but we started with $log(1+x)$, so this shows that we have the equation:  $$ log(1+x) = \sum_{n=1}^{\infty} \frac {(-1)^{n+1}x^{n}}{n}$$  and this implies that   $$ log(1+1) = log(2) = \sum_{n=1}^{\infty} \frac {(-1)^{n+1}1^{n}}{n}$$  $$ \ => \alpha = log(2) = \sum_{n=1}^{\infty} \frac {(-1)^{n+1}}{n}$$  as required.  What do you think?  Am I close?    My concerns are the indefinite integration that I used a couple of times.  Also, I completely neglected the interval (and boundary) of convergence for $log(1+x)$, and just plugged in $x=1$, since I arrived at an equation. Is this ok to do?  Any hints or comments are welcome.  Thanks,

I know that the harmonic series $$\sum_{k=1}^{\infty}\frac{1}{k}  = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} + \cdots + \frac{1}{n} + \cdots \tag{I}$$ diverges, but what about the alternating harmonic series   $$\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k}  = \frac{1}{1} - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \frac{1}{6} + \cdots + \frac{(-1)^{n+1}}{n} + \cdots \text{?} \tag{II}$$  Does it converge?   If so, what is its sum?


The moon shone bright like a diamond in the sky. 2. The full moon is shining bright in the sky. Why not they are brightly? Are they correct?

Is it acceptable to say "We'll get back to you as quick as we can"? Is "quick" a flat adverb in this case?


Up until some time ago, I saw accepted answers atop all other answers.  Today, in all stacks that I browse, I'm not seeing accepted answers being placed at the top - unless they get there by some other criteria such as being the most voted, or most active, depending on the filter I am using.  I couldn't find anything about it. Is this behavior new? Or have I changed some setting somewhere by mistake?

What does it mean to accept an answer? How do I accept an answer, and what are the rules? Can I accept my own self-answer? What are the reputation benefits? Which answer should I accept? Should I upvote the accepted answer? What should I do if none of the answers are suitable?      For more information, see "" in the .


I could substitute some strings by sed Next, I'd like to sed multiple strings by following Day='2020/12/1' Dir=/home/test/data i='test'  sql=$(sed "s|Day|$Day|g" < "$Dir/$code.sql") sql=$(sed "s|Id|$i|g" < "$Dir/$code.sql")  but it only substituteId. are there any way to achieve multiple substitution ? If someone has opinion,please let me know Thanks

I'm trying to use sed to edit a config file. There are a few lines I'd like to change. I know that under Linux sed -i allows for in place edits but it requires you save to a backup file. However I would like to avoid having multiple backup files and make all my in place changes at once.  Is there a way to do so with sed -i or is there a better alternative?


I have written a java program to read lines from an xml using buffered reader. This xml contains questions, multiple choice and answers. These questions, choices, answers are stored in List<String>. While presenting these questions to the user, the program requires List<Question>. I clearly understand that a list of String type cannot be copied into list of Question type. So, how do I do this? and what concept am I missing?  EDIT:  I think List<Integer> to List<String> or viz., is different to my question because .toString() and .parseInt() methods exist.

I have a list of integers, List<Integer> and I'd like to convert all the integer objects into Strings, thus finishing up with a new List<String>.  Naturally, I could create a new List<String> and loop through the list calling String.valueOf() for each integer, but I was wondering if there was a better (read: more automatic) way of doing it?


I am looking to enforce that my letter "a" should be pronounced as "ah".  In my book I am writing I have the name Gorak (Gore-ahk).  What would be the best way to explicitly show that it is Gore-Ahk and not Gore-aek or Gore-ak?  Also if I may, I am also looking to designate the il letter combo to sound like "eel".  I know there are symbols that you place above the letters to help with pronunciation but I am having a hard time googling it to find out what to use with what sounds.  Possibly maybe not asking the right question to google.

In dictionaries you'll often see a pronunciation guide next to words like (bakery would be beɪkəri).  Are there different standards of these pronunciation guides? Also, where can I learn how to understand the pronunciation guide?


What is the difference between upper and lower dimmensions in schematics?  So far I have assumed that those are simply maximum and minimum values specified by the tolerance. Is my assumption correct?  Edit 1:  There is also a statement bellow the datasheet that tolerances are +/- 0.15mm which is inaccurate in the case of 3.60/3.20 (or 2.90/2.50).  A relevant schematics here:

I am about to make a pcb footprint for this package:   But I am not sure what the two numbers mean, for example at pin 5 that 0,30/0,15. Are these maximum/minimum values in milimeters? Is that possible they have this huge difference between them?