I was curious what does $$\cfrac{1}{1+\cfrac{2}{2+\cfrac{3}{3+\cfrac{4}{\vdots}}}}$$ evaluate to. Empirically, I observed that it equals approximately $0.5819767$, and a calculator found that this value agrees with $\frac{1}{e-1}$ to at least 8 places. Is $\frac{1}{e-1}$ the exact value of this continued fraction? If this is true, is this result new? And how could the equivalence be proved?

A couple of years ago I found the following continued fraction for $\frac1{e-2}$:  $$\frac{1}{e-2} = 1+\cfrac1{2 + \cfrac2{3 + \cfrac3{4 + \cfrac4{5 + \cfrac5{6 + \cfrac6{7 + \cfrac7{\cdots}}}}}}}$$  from fooling around with the well-known continued fraction for $\phi$. Can anyone here help me figure out why this equality holds?


I have a custom QVector class, which has a single function: to return the element of the vector fulfilling some conditions. Here is some code: customvector.h #ifndef CUSTOMVECTOR_H #define CUSTOMVECTOR_H  #include "customfile.h"  #include <QVector>  template<typename T> class CustomVector : public QVector<T> { public:     using QVector<T>::QVector;      CustomFile find(int index); };  customvector.cpp #include "customvector.h"  template <typename T> CustomFile CustomVector<T>::find(int index) {     // Processing }   #endif // CUSTOMVECTOR_H  The code driving this: CustomVector<CustomFile> files; files[0] = CustomFile(0); files[1] = CustomFile(1); qDebug() << files.get(0).index;  customfile.h class CustomFile { public:     CustomFile(int index);     int index; };  customfile.cpp CustomFile::CustomFile(int index) {     this->index = index; };  The issue I am having is that I keep getting a LNK2019 error, telling me that the find(int) function is an unresolved external symbol. Can anyone help?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


In love letter there are some situations, when players have to compare their hands (after using the Baron card or at the end of the round). What happens if there is a draw? Situation 1:  A: House maiden (4), Baron(3), B: House maiden(4) , C: Priest(2) A plays baron on B, both have House maiden.  What happens? Also what happens, if there is no player C? Situation 2:  End of the round A: House maiden (4), B: House maiden(4) , C: Priest(2)  Who wins this round? Both A and B? C? No one? Edit the answer in  answered only for the second situation. the first one is answered by Ken.

At the end of the game, both remaining players have a Baron.   The sum of all cards discarded by both players is equal.  Who wins?


Im making a program to take the user input which stands for how many numbers they want, and i have to show as many random numbers as they say. heres the little part i have so far:  if(selection==3) {     System.out.print("How many numbers would you like to see?");     int ran=kb.nextInt();  }   (theres more code but i just cant figure out how to di this part. any help? thank you :)

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


I have at this time two remote machines to which I am connecting. For one I am using private key with passphrase, and another one I am using root password.   Now, when I want to connect to machine with root password authentication, first ssh asks me for passphrase for machine which private key is inside my ~/.ssh directory,and then when I enter correct passphrase let me enter password for machine to which I am connectign with root password.   Is there any way to save sessions, and connection options, for example like in Putty?

There are a few SSH destinations I will frequently be connecting to and I'm wondering if rather than remember the IP address I can create a host alias for them.  I'd like to be able to use...  ssh -p xx user@domain.ssh  I've tried establishing this host in /etc/hosts and unless there's a service I needed to restart it had no effect.


My Russian girlfriend has already been approved for a visa and bought an airplane ticket. She took a loan of $700 from a Russian bank. She was telling me that she may not be able to leave on December 2nd to fly to the USA because of the $700 loan that she needs to pay off before she can leave. She was told about this a few days ago she has no way to pay it off at this time. Her family doesn't have the money either. What are her options in this short time?

I met a girl from Russia and she wants to see Denmark. I told her to meet first in Moscow to know each other better - anyway she asked me for 500 Euro for an international passport (she never had one she says) and a visa for Denmark. All that could be finished within 14 days. I won't send the money anyway but is 14 days realistic for a NEW passport?


What is the difference between "on the map" or "in the map"? Is one of them grammatically incorrect? Thanks!

How can it be determined, if the correct version is "The Venue is in the map" or "The Venue is on the map"? And which is correct?


Are the data dumps available as torrents?  The official location for the database dumps appears to be , but they are direct HTTP links, and some of the files are quite large (over 10 GB for Stack Overflow posts, for example).  I have had some bad luck downloading big files directly and would much prefer torrents (or any other method that can reliably continue interrupted downloads and recover from minor corruption). It wouldn't even need to be the most recent, anything from the last year or so would be sufficient.

The original ClearBits link to the September 2011 data dump has broken. How can I access it and other previous data dumps? The Internet Archive only has .


When I have e.g. Firefox open and I press the Super key, type 'firefox' my existing window is shown. Can I change this to open a new window, instead of the already opened?   Thanks.

I have a terminal open and want to launch another one. I hit the Windows key, type 'terminal' and hit Enter...and I'm warped to my first terminal.  I can hit Control+Enter to launch a new terminal. This is unnatural to me. Can I change the key bindings so that Enter will launch a new instance and Control+Enter will warp to the existing one?  Edit: I'm interested in all applications, not just a terminal.


I brought my uncles old iPhone 4S and I've reset it, but now it's asking for his Apple ID and password and he can't remember it and he has lost his passcode. How can I activate the phone without the passcode?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


I do as follows  $(1+x)^n= \binom{n}{0}+\binom{n}{1}x+\binom{n}{2}x^2+...+\binom{n}{n}x^n$   differentiating in both sides  $n(1+x)^{n-1}= \binom{n}{1}+2\binom{n}{2}x+3\binom{n}{3}x^2...+n\binom{n}{n}x^{n-1}$  then, for $x=1$  $n \cdot2^{n-1} = \sum_{k=1}^{n}k\binom{n}{k}$  From here, I don't know how to proceed, I have tried to multiply both sides for $(1+x)$ to make $n \cdot2^{n}$ but then the summatory changes, I don't know how to prove the equality.

I am trying to prove this binomial identity $\sum_{r=0}^n {r {n \choose r}} = n2^{n-1}$ but am not able to think something except induction,which is of-course not necessary (I think) here, so I am inquisitive to prove this in a more general way.  The left side of an identity occurs while solving another problem (concerning binomial theorem) so I am more interested in deriving the right side from the left side, else I have to remember it now onward.  EDIT: I am more interested in an algebraic proof rather than combinatorial argument or something involving calculus (however I liked  and  solution), hence I am removing the combinatorics tag.


Suppose I have a posterior distribution, $p(\theta \mid y)$, where $y$ was my data and $\theta$ is a random variable with some prior distribution. If I specify a one-to-one transformation $\phi = g(\theta)$, how does the Jacobian look like? Would it be:  $$ p(g(\theta)\mid y) = p(\theta|y)|g(\theta)|^{-1} $$ ?  I am ultimately trying to prove that the MAP is not invariant to one-to-tone transformations and was hoping that the $|g(\theta)|^{-1}$ would be the key. However, I am not sure how to conduct function transformations of a random variable from a conditional density. Can someone offer tips? Thanks!

Suppose that we have a posterior distribution $p(\theta\mid y)$ and we wish to define a transformation on $\theta$ such that $\phi = f(\theta)$. I know that generally such transformations will not affect the MLE as it is on the data space, but will result in non-invariance on the Maximum A Posteriori (MAP) estimate as it is a function of the parameter space. I am wondering if there is an example to illustrate this? Thanks.


I'm curious about the behavior of the following code:  0.0 is 0.0 # True  a = 0.0 a is 0.0 # False   It seems to me that a is 0.0 should evaluate to True. In my particular case I need to distinguish when a variable is 0.0 specifically, so a == 0 will not work because it will fail when a is equal to False. What's the best way to accomplish this?

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


I have a  (59-358263) Laptop (3rd Gen Ci5/ 4GB/ 500GB/ DOS) and running Windows 10 Pro (latest version).  I’m getting blue screen of death (BSOD) a lot, mainly while gaming so I ran memtest.  I have  of the issue of which might help you recognize the problem.

I have a notebook here that I suspect has a faulty memory module. I therefore downloaded  and let it run.  Note that the screenshot is not my actual one, it's provided by memtest86+    How do I interpret the numbers on the screen? I've let it run for about four hours and now I'm in pass 7.  Especially, what does   the test number the count of Errors the count of ECC errors   indicate? What are sane values for memory errors? At which point should I consider replacing memory?


Proof that for all $x,y \in \mathbb{R}$: $$|x+y|+|x-y| \geq |x| + |y|$$  My (failed) attempt: $$|x + y| \leq |x| + |y|$$ $$|x - y| \leq |x| + |y|$$ $$|x + y|+|x - y| \leq 2(|x| + |y|)$$  Thank you

How would I go about proving that  $$|a|+|b| \leq |a+b|+|a-b|$$  Using the triangle inequality?  I tried squaring both sides, yielding:  $$|a|^2 +|b|^2 +2|a||b| \leq 2|a|^2+2|b|^2+2||a|^2-|b|^2|$$  Is it correct to move the terms to the other side? I tried $$2|a||b| \leq |a|^2+|b|^2+2||a|^2-|b|^2|$$ Then it is obvious that  $$0\leq |a|^2+|b|^2-2|a||b| +2||a|^2-|b|^2|$$ $$0\leq (|a|-|b|)^2 +2||a|^2-|b|^2|$$ $$0\leq ||a|-|b||^2 +2||a|^2-|b|^2|$$  But I have neither used the triangle inequality, nor it looks mathematically rigorous for my real analysis class. Any tips and tricks for solving these problems?


When i run this script via terminal on my dedicated server it works. But only while the window is opened (the terminal). When i close the window, it close the script for running. How can i make it running forever in the background?  #!/bin/bash     ./robots.sh &     ./update_robots.sh &     ./update_auctions_end.sh &     ./auto_bidders.sh

I'm working on a Linux machine through SSH (Putty). I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a file.  To my surprise, that doesn't work. As soon as I close the Putty window, the process is stopped.  How can I prevent that from happening??


I am using the default search block provided in druapl 8.2 and have languages 'english' & 'french' enabled on my site. However when i am doing a search on the site, the results return are for both the EN & FR version of the content. How can i limit the search for the current language only?   FYI: I am not using any views or modules for performing my search but simply using the default core search module.

I have a site with 4 languages and am using the builtin search to look for content on the site. How is it possible to restrict the search results only to the currently selected language?  I tried looking into Configuration > Search Pages, but do not see any way how to do that there.


Link 1   I realize that the above method of using javascript:void(0) is a bad practice and a better way of handling undefined would be  Link 1   My question is:  Is there ever a situation where we should be using javascript:void(0) as against

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.?    function myJsFunc() {     alert("myJsFunc"); } Run JavaScript Code     or    function myJsFunc() {     alert("myJsFunc"); }  Run JavaScript Code


Consider  preg_replace('/(lets go).*/', "going", "lets go somewhere")   It will output: "going", I want "going somewhere".   preg_replace seems to replace using the first match which is the whole string "lets go somewhere". How can I make it ignore index 0 and only target index 1?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I was introduced to table top RPGs last year, but then I got to move. The place where I live now is a very "cold" neighborhood. Houses are big and the land around them even bigger, so each family is kind of an isolated unity. I'm looking for a way to continue playing, but so far I had no luck, so I decided to check if there are online communities for playing RPGs. Could any of you give me some pointers on how I can do this? I'm 14 years old, male, don't know much about RPGs yet, but I have a genius IQ (160) so I can probably learn any set of rules relatively fast.

I'm sad to say that I have absolutely no friends who would like to play D&D with me however I would love to play. I know about Neverwinter Nights and I've played quite a bit of it, but I'm looking for more of the pen & paper experience.  Is this even possible?


I read through  by  and it has the following example: Func<int, Func<int, int>> adder =      (int x) => (int y) => x + y; // `int` declarations optional Func<int, int> add5 = adder(5); var add6 = adder(6); // Using implicit typing Debug.Assert(add5(1) == 6); Debug.Assert(add6(-1) == 5);  // Closure example int yEnclosed = 1; Func<int, int> addWithClosure =      (x) => x + yEnclosed; Debug.Assert(addWithClosure(2) == 3);  I've used lambdas in C# for years and yet I do not understand what is going on here. Obviously this adds an instance variable, but what in the declaration is defining all this? Is x or y the instance variable? And what's with the Closure example at the bottom?

What is a closure? Do we have them in .NET?  If they do exist in .NET, could you please provide a code snippet (preferably in C#) explaining it?


Given that various answers here at Physics assert that information isn't transferred (such as this ), and given recent , does this invalidate our understanding of what's happening? Is information actually translated superluminally?

According to the Wikipedia article for the :     In very rough terms, the theorem describes a situation that is analogous to two people, each with a radio receiver, listening to a common radio station: it is impossible for one of the listeners to use their radio receiver to send messages to the other listener. This analogy is imprecise, because quantum entanglement suggests that perhaps a message could have been conveyed; the theorem replies 'no, this is not possible'.   According to the Jet Propulsion's recent article on quantum teleportation:   they can effect an entangled photon (B) with another photon (A) to change the state of the other entangled photon.  Doesn't this contradict what the no-communication theorem states ?


I am trying to solve the following question but without any result so far:     Let $p_1, p_2, \ldots, p_t$ be different primes. Prove that $\log (p_1), \log (p_2), \ldots, \log (p_t)$ are linearly independent over $\mathbb{Q}$ that is, if $x_1,x_2,\ldots, x_t$ are rational numbers with    $$ x_1 \log (p_1) + x_2 \log (p_2) + \cdots + x_t \log (p_t) = 0 $$   then $x_1 = x_2 = \cdots = x_t = 0$.    We are supposed to use the following result:  Let $x \in \mathbb{Q}$ with $x > 0$. Then there is a unique sequence of integers $(n_2,n_3,n_5, \ldots)$, almost all equal to $0$, such that $$ x = \prod_{p \text{ prime}} p^{n_p}.  $$   Any tips are welcome for solving it, thanks.

Suppose we have a set of primes $p_1,\dots,p_t$. Prove that  $\log p_1,\dots,\log p_t$ is linear independent over $\mathbb{Q}$. Now, this implies $ \sum_{j=1}^{t}x_j\log(p_j)=0 \iff x_1=\dots=x_t=0$.  I think I have to use that fact that every $q\in\mathbb{Q}$ can be written as $\prod_{\mathcal{P}}$, where $n_p$ is a unique sequence ($n_2$,$n_3$,$\dots$) with domain $\mathbb{Z}$. Here, $\mathcal{P}$ denotes the set of all integers.  Now how can I use this to prove the linear independency?


We have given detail description of these tools in below section. or We have given detail description of these tools in section below.  which one is correct?

I have seen sentences similar to the following:  (1) See the reference above. (2) See the reference below.  And,  (3) See the above reference.  But not,  (4) See the below reference.  Are all these forms acceptable? Which is/are preferred in formal writing?


I have several sections and at the end of my article if I add \section{References} I get it numbered. How to add it without number.

I'm using the report document class for a thesis, and I need to add things like "Acknowledgements" and an "Introduction". I noticed that there is an \abstract command which would have been wonderful if applied similarly. How do I add these without messing up the chapters' numbering while being picked up by the ToC in proper order and page numbering?


I want to install Ubuntu 17.10 on my Asus ROG G20AJ computer, equipped with the Nvidia GTX 980 Ti GPU and Intel Core i5 CPU.  I've taken a USB drive with a live CD Ubuntu version (that I've already used to install Ubuntu with success on a laptop PC, also Nvidia, Intel, and Windows-powered), but I stick on the GRUB. I've disabled Secure Boot and Fast Boot. I enabled CSM and UEFI execution (my Windows system is installed with UEFI mode).  But by booting on the USB drive, I stick to the GRUB screen with any option (Install Ubuntu or Try Ubuntu without installing) broken. Indeed, when I boot in both options, I'm faced with these errors and the PC doesn't continue to boot:    I've also tried to add acpi=off nomodeset options to both boot commands. Instead of that error logs, the computer gets stuck on a black screen indefinitely.  How can I make Ubuntu installable on my computer via the USB stick, since the latter works on another computer before without any problems?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


If we let $f_n$ be a sequence of functions on $[a,b]$ such that,  -there exists a point $x_0\in[a,b]$ where $lim_{n->\infty}f_n(x_0)$ exists -each $f_n$ is differentiable -the sequence $(f'_n)$ converges uniformly on $[a,b]$  I want to prove that $f_n$ converges uniformly on $[a,b]$ to some function $f$  My logic:  if I use the triangle inequality to write,  $$|f_n(x)-f_m(x)|<=|(f_n(x)-f_m(x))-(f_n(x_0)-f_m(x_0))|+|f_n(x_0)-f_m(x_0)|$$  Then I can try and apply the mean value theorem to prove that $f_n$ converges uniformly on $[a,b]$ to some function $f$.    Applying the MVT to see the right side above  can be written  $$|(f_n-f_m)'(c)(x-x_0)|+|f_n(x_0)-f_m(x_0)| \le \sup_{[a,b]}|f_n'-f_m'|(b-a)+|f_n(x_0)-f_m(x_0)|.$$  from here how can I use "uniformly Cauchy" criterion for uniform convergence to prove my problem?

If we let $f_n$ be a sequence of functions on $[a,b]$ such that,  -there exists a point $x_0\in[a,b]$ where $lim_{n->\infty}f_n(x_0)$ exists -each $f_n$ is differentiable -the sequence $(f'_n)$ converges uniformly on $[a,b]$  I want to prove that $f_n$ converges uniformly on $[a,b]$ to some function $f$  My logic:  if I use the triangle inequality to write,  $$|f_n(x)-f_m(x)|<=|(f_n(x)-f_m(x))-(f_n(x_0)-f_m(x_0))|+|f_n(x_0)-f_m(x_0)|$$  Then I can try and apply the mean value theorem to the first term on the left hand side to prove that $f_n$ converges uniformly on $[a,b]$ to some function $f$.  The mean value theorem states,  Suppose f(x) is a function that satisfies both of the following conditions,  -$f(x)$ is continuous on the closed interval $[a,b]$ -$f(x)$ is differentiable on the open interbal $(a,b)$  Then there is a number $c$ such that $a<c<b$ and,  $f'(c)=\frac{f(b)-f(a)}{b-a}$


If Harry had witnessed his mother's death at age one, how come he couldn't see the thestrals on the carriage?  Many people may argue that he hadn't registered that she died at the time. And JK has stated the same.  But in The Prisoner of Azkaban, Harry had witnessed it again when he went close to a dementor. How come he didn't see them in The Goblet of Fire?  Some people see a loophole in this though. In Sarah Buckley's theory which I will put , It could have been Voldemort's soul in Harry that heard the voices.   In The Prisoner of Azkaban, Lupin that dementors affect him so much because.     "It has nothing to do with weakness," said Professor Lupin sharply, as though he had read Harry's mind. "The dementors affect you worse than the others because there are horrors in your past that the others don't have."   But, as I have stated before, it is confirmed that Harry cannot fully remember his mother's death. Sarah Buckley theorizes that the horror was when Voldemort was defeated. Her theory was,  "It wasn't Harry’s soul who reacted so badly to the dementors, but the piece of Voldemort’s. The night Lily Potter died and Voldemort was defeated was the worst experience Voldemort had ever had. Consider also that the memory stops (and Harry faints) just a few seconds after Lily screamed and died, which would place the end of the memory right around the time Voldemort tried to Avada Kedavra Harry and was subsequently defeated - killed, or as close to as possible."  But I also disagree with this theory. Why? Well, in The Chamber of Secrets Dumbledore says     "You can speak Parseltongue, Harry," said Dumbledore calmly, "because Lord Voldemort--who is the last remaining descendant of Salazar Slytherin--can speak Parsletongue."   And that is because there is a fragment of soul from Voldemort in Harry. This is my evidence that traits can be passed from Riddle to Harry.   This is also evidence for the dementor-Harry theory. But since harry can't see thesterals until Order of the Phoenix, not all traits can be passed down.   And in The first book he killed Quirrel! Shouldn't that count as witnessing someone die! I mean- There are so many plot holes with this subject I don't think I can solve the answer of this question. These are all the plot holes I can find, but I what to see an other opinion.

Why couldn't Harry see Thestrals at the end of Goblet of Fire after the senseless and shocking death of Cedric Diggory?   At the end of Goblet of Fire, the carriages still appeared horseless to Harry:     Hermione turned away, smiling at the horseless carriages which were now trundling towards them up the drive, as Krum, looking surprised, but gratified, signed a fragment of   parchment for Ron.   Goblet of Fire - Page 629 - British Hardcover - Adult Edition   At the beginning of Order of the Phoenix, Harry sees the Thestrals for the first time:     Here stood the hundred or so horseless stagecoaches that always took the students above first year up to the castle. Harry glanced quickly at them, turned away to keep a lookout for Ron and Hermione, then did a double-take.   The coaches were no longer horseless. There were creatures standing between the carriage shafts.   Order of the Phoenix - Page 178 - British Hardcover - Adult Edition   We know that only those who have seen death can see Thestrals:     ‘Don’ worry, it won’ hurt yeh,’ said Hagrid patiently. ‘Righ’, now, who can tell me why some o’ yeh can see ’em an’ some can’t?’   Hermione raised her hand.   ‘Go on then,’ said Hagrid, beaming at her.   ‘The only people who can see Thestrals,’ she said, ‘are people who have seen death.’   ‘Tha’s exactly right,’ said Hagrid solemnly [...]   Order of the Phoenix - Page 394 - British Hardcover - Adult Edition   A month went by between Cedric's death and the end of the spring term -- is this enough time for Harry to have truly internalized Cedric's death? Goblet of Fire indicates that Harry was in shock following Cedric's murder, but was able to relate the story of Cedric's death to Mr. and Mrs. Diggory.     When he looked back, even a month later, Harry found he had few memories of the following days. It was as though he had been through too much to take in any more. The recollections he did have were very painful. The worst, perhaps, was the meeting with the Diggorys that took place the following morning.   [...]   ‘He suffered very little, then,’ she said, when Harry had told her how Cedric had died.'   Goblet of Fire - Page 621 - British Hardcover - Adult Edition   So, then, why couldn't Harry see Thestrals at the end of Goblet of Fire?


Suppose I made a post which contains an image (which I uploaded the usual way using the uploader in the editor). Many months later, I decide to make another post using the image from the earlier post. Is it safe to reuse an image that was previously uploaded as part of an older post? I don't want my new post to have broken images in the future.

I assume, that Stack Exchange have some clean-up subsystem, which deletes all "abandoned" images (stored at i.stack.imgur.com), that is, all of them, that were initially uploaded, but no post is actually having link to them. Am I right?  If such subsystem is implemented and is doing its job on regular basis, then what about following scenario:   Start a new question or answer, anywhere. Hit button and upload an image. Copy generated image's URL  to clipboard. Close tab and drop editing post. Go to question on answer, you actually planned to reply. Post a comment to it and paste copied image's URL from clipboard to comment's body.   Will uploaded image, with URL pasted only to comment, be kept permanent? Does clean-up subsystem (if exitst) take care of checking for image's URLs in comments as well?


Drush is running on MAMP, PHP 5.6.6.   Inside /Volumes/Doxy/htdocs/omegadoen/sites/all/themes/omega   I run:   drush omega-wizard   I get:     Additional uncaught exception thrown while handling   exception. Original PDOException: SQLSTATE[HY000]   [2002] No such file or directory in drupal_is_denied() (line 1917 of   /Volumes/Doxy/htdocs/omegadoen/includes/bootstrap.inc).Additional   PDOException: SQLSTATE[HY000] [2002] No such file or directory in   _registry_check_code() (line 3169 of /Volumes/Doxy/htdocs/omegadoen/includes/bootstrap.inc).Drush   command terminated abnormally due to an unrecoverable error.   [error]   What now?

I installed Drush for the first time (so it may be a configuration error) and I'm trying to update to the latest core version of Drupal.  Drush is giving me this error - I'm on an OSX box.  dev5:clientnamedirectory my.name$ drush pm-update projects drupal-7.25
Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_get_installed_schema_version() (line 155 of /Users/my.name/Sites/proface/includes/install.inc).

Additional

PDOException: SQLSTATE[HY000] [2002] No such file or directory in system_list() (line 165 of /Users/my.name/Sites/clientnamedirectory/includes/module.inc).

  Drush command terminated abnormally due to an unrecoverable error.


Are there any cases when the row-rank and column rank of a matrix can not be equal? Or are they equal under all circumstances?  I understand the proof that they are equal but was wondering if there are any special cases when they are not equal.

Let $A \in \mathbb{F}^{m \times n}$. How do you prove that row rank of a matrix equals column rank ?  This question has been addressed  and , but the explanation in one case was descriptive and somewhat involved in the other. The answer below is an introductory-linear-algebra level answer.


import random s = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?" passlen = 4 p = "".join(random.sample(s,passlen)) p2 = "".join(random.sample(s,passlen)) print(p,"-",p2)   This is my code. But when i run it get something like this: RJ9e - zN0P I do not need the spaces in between. What am i missing here? Thanks!

In python, if I say  print 'h'   I get the letter h and a newline.  If I say   print 'h',   I get the letter h and no newline.  If I say  print 'h', print 'm',   I get the letter h, a space, and the letter m.  How can I prevent Python from printing the space?  The print statements are different iterations of the same loop so I can't just use the + operator.


If a real valued function $f$ is differentiable on a neighborhood of a point $'a'$ and If $ \lim_{x \rightarrow a^+}f'(x)$ exists. Then $\lim_{x \rightarrow a^+}f'(x) = f'(a)$  I have written what I thought of. Can that be considered as a proof? I am looking for mistakes (if any) and alternative proofs. (may be mean value theorem can be used but I am not sure about that)  My attempt :  Let $f$ be differentiable on $I = (a - \delta_0, a + \delta_0)$. Then for $h \in(0, \delta_0/2)$  $$ \lim_{h \rightarrow 0^+}\frac{f(x+h) - f(x)}{h} = f'(x) \hspace{4mm} \forall x \in(a - \delta_0/2, a + \delta_0/2)$$ hence  $$ \lim_{x \rightarrow a^+} \bigg [\lim_{h \rightarrow 0^+}\frac{f(x+h) - f(x)}{h}\bigg ] = \lim_{x \rightarrow a^+}f'(x) \hspace{4mm} \forall x \in(a - \delta_0/2, a + \delta_0/2)$$ Since the $f'(x)$ exist in $I$ we can interchange the limit to get  $$\implies \lim_{h \rightarrow 0^+}\lim_{x \rightarrow a^+}\frac{f(x+h) - f(x)}{h} = \lim_{x \rightarrow a^+}f'(x) \hspace{4mm} \forall x \in(a - \delta_0/2, a + \delta_0/2)$$  $$ \implies  \lim_{h \rightarrow 0^+}\frac{f(a+h) - f(a)}{h} = \lim_{x \rightarrow a^+}f'(x) \hspace{4mm} \forall x \in(a - \delta_0/2, a + \delta_0/2)$$ $$ \implies f'(a) =\lim_{x \rightarrow a^+}f'(x)$$ Now I have got an answer to this but why in this attempt why the limits cannot be interchanged as the $f'(x)$ lies inside the I.

Let $f$ be a function defined in the open interval $(a,b)$ and let $x_0\in(a,b)$. Suppose in addition that $f'(x)$ exists for all $x_0\neq x\in(a,b)$. Is the following statement true:      If $\lim\limits_{x\to x_0}f'(x)$ exists, then $f'(x_0)$ exists and $\lim\limits_{x\to x_0}f'(x)=f'(x_0)$.   Thanks!


I have two enumerates  \documentclass[12pt]{article} \begin{document}  \begin{enumerate} \item 5 + 7 = 12 \item 9 + 1 = 10 \end{enumerate}  lorel ipsum, blah blah blah  \begin{enumerate} \item 5 * 7 = 12 \item A+B = C \end{enumerate}  \end{document}     How can I make the item numbering goes like, 1,2,3,4 instead of 1,2,1,2? I know I can do by adding to second enumerate block   \setcounter{enumi}{3}    but this can cause problems if i change first enumerate block later?

I'd like to be able to resume an enumerated list, continuing the old numbering, after some intervening text which should not be formatted like a list item.  Is there a nice way to do this?    In particular, I don't want to start a second list with a hard-coded initial counter value, because that will break if I change the number of items in the first list.


I made an inset and want to extrude it along its local axis I'm trying to extrude the tip of this kettle,I have turned on from the transformation orientation local axis.I tried on the Y and Z, and both go incorrect direction. I'm trying to get it along the axis as shown in the example.   Thank you.

I am trying to extrude faces of a cylinder along local normals. 3dsmax can do it easy, couldn't find how to do it in blender.  The extrude region option extrudes it as shown in the first example. I want it done like the 2nd example.


How to avoid the circular patterns on a plain diffuse surface while projecting light?   I am trying to project a few patterns on objects in Cycles render. When I project a plain white light on a diffuse surface (a plane), I could see concentric rings on close observation. Could someone help on how to avoid it? Thanks in advance.

If I just render the default cube it will look like this:   It is rendered with color depth 16. I can see there are artefacts consisting of visible "line strokes" on some of the cube faces.  The bands seems to not go darker and darker, but alternates between light and dark, or is my eye fooled?  Why?  Edit  Here comes a gradient created by gimp without banding, using the same computer:


I'll be travelling to Europe from India and have a check-in baggage which has the normal number lock (like a 3-digit password) and also has the TSA lock. My entry would be in France and would return from Switzerland back to India.  I have never used TSA locks and DO NOT plan to use the TSA lock (just the number lock), but my question is does having the unused TSA lock pose any problems while travelling to Europe? I hope it does not cause any issues.

I understand if you travelling in or to the US, you can lock your luggage using the TSA Luggage Lock. (Immigration is still able to open your luggage using their own special keys)  How about Europe? Especially Heathrow + Charles de Gaulle?    If the TSA Lock is not acceptable in Europe, are there any other alternative precautions I could use instead?  (FYI, information about the )


a1, a2, ..., an sequence numbers are given. Now, give an algorithm with O(nlg n) running time to calculate the number of pairs (i, j) for i < j and ai > aj.  Input: The number of test cases has came in first. For each test case number has came n number for first and then a1, a2, ..., an in the next line. N <= 100000  ai <= 100000000   Now, I want the output as follows:  Output: For each test is printed only one number (that is the asked value in the beginning of the question).  Sample Input:  2 4 3 2 1 5 5  8 9 3 2 1   Sample Output:  3  9

I'm designing an algorithm to do the following: Given array A[1... n], for every i < j, find all inversion pairs such that A[i] > A[j]. I'm using merge sort and copying array A to array B and then comparing the two arrays, but I'm having a difficult time seeing how I can use this to find the number of inversions. Any hints or help would be greatly appreciated.


Is the following allowed? Player A: holds up two woods and says "I will take any one resource for two woods" Player B: Gives him a wood for his two woods. Player A: tries to say he meant any resource besides wood since this trade is not allowed.

I ran into this situation. I had helped out a player by not placing the robber on them with my knight card. To sweeten the deal, she agreed to give me 1 wood + 1 hay in exchange for 1 wood. Is this legal?  The board mentions that trading 1 wood for 2 wood is illegal, but is 1 wood + 1 hay considered legal?


I'm very new to Ubuntu again, I haven't touched it since Desktop 13, and I will need some hand-holding here. I can't connect to a network. I've been frustrated trying to find a solution to here and I've mashed more code through terminal than I'd like to admit. Would anyone be willing to help me solve this? I will do my best to answer any questions I can.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


How can I add my address (newly-built house) to an existing street on Google maps?  It shows on Bing maps OK but not on Google maps.  Existing answers to this question seem to be outdated.  Surely this is a common problem every time a new house is built.

I can't see my home address on Google Maps as it is a new neighbourhood.   How can I get my home address added into Google Maps?


I have to update ubuntu 13 to ubuntu 14. When I issued release-upgrade it is showing that about 700 MB data is to be downloaded from internet. I have slow internet connection now. So it will take hours to complete. I believe if I remove some optional packages then it will ignore their updates. Hence I can reduce the amount of data downloaded from internet. How can I do it easily?

In an attempt to learn more about Ubuntu and its packages, I want to remove all non-essential packages, so I can install what I need, when I need them and know what they do.  I'm using the commands dpkg --clear-selections and apt-get dselect-upgrade for this. I also slightly modify the selection by setting apt libstdc++6 (due to apt) install-info (due to grep) to install again (somehow dpkg thinks they are not essential, but apt-get complains).  Is this ok, or is this bad? If it's ok, what do I do with the large list of packages with "deinstall" status in dpkg?  An additional note, I'm doing this on a VPS template so I have no control over the initially installed packages.


I have this problem, I have an Ubuntu server (SSH enabled on port 4444). Inside this server there's a directory called /folder/a/, this directory literally contains millions of small size text files.  What i want to do is to find several thousands of files from those millions of files and copy or transfer those files to my local pc, i.e. using find command. When using scp or cpio it won't work properly.  Do you have any suggestion how to do this from my local pc, i.e not from running ssh terminal on my remote server.

I want to be able to search for files over 14 days and over 10k and than rsync those found files to a destination.  Is there a way to combine these two commands?  find ./ -mtime +14 -size +10k  rsync --remove-sent-files -avz /src /dest


I consider buying a Chinese tablet with an Exynos 5250 SoC. It is a Voyo A15. It is not supported by CyanogenMod, but there is a  available for this tablet. I would want to install Ubuntu Touch on it.  My question: Would it be possible to port Ubuntu Touch to this device? Considering it has the same SoC as the Nexus 10. I have enough Linux experience (of building kernels etc.), so I could do (at least try to do) the porting myself. The manufacturer has not yet released the source for their ROM, but the drivers for the Exynos chip are available. The Exynos is not the only chip on the tablet, so if the manufacturer doesn't release those drivers, is it still possible?  Maybe this is not the right place to ask this question, should I try at CyanogenMod forums? Maybe there is someone with experience of porting CyanogenMod/UbuntuTouch to exotic Android Tablets?

I would like to port Ubuntu Touch to a device that is currently not supported. What are the requirements for doing this and where do I begin?


I'm using Javascript to find if something is in an array or not, but when I'm using this code it doesn't alert anything at all, which means it's not working correctly. What am I doing wrong?  var theArray = new Array("one","two","three");  if (theArray.indexOf("one")) { alert("Found it!"); } if (!theArray.indexOf("four")) { alert("Did not find it!"); }

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


When should I use each of the following:   This may help. This might help.   I always get confused about the use of may and might.

I may not be coming in tomorrow...    I might not be coming in tomorrow...       When should I use "may" and "might"?


I am writing a scrartcl document using \begin{thebibliography}. The title of the bibliography is displayed automatically and it is "References". Can I change it to "Biography"?   I know that the command \bibname don't work in article class.  Thank you very much.

I'd like to modify the names used to typeset some of my document elements. For example, the caption of figure floats should change from "Figure" to "Fig.", and my \tableofcontents sectioning heading shouldn't read "Contents", but "Table of Contents". How can I do that?  \documentclass{article} % \usepackage[english]{babel} \begin{document} \tableofcontents \section{foo} \begin{figure}[h] \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document}


I know I can add an error to a field as follows:  Account someAccount = [select id, name from Account limit 1]; someAccount.name.addError('Bad Name');   How can I do that if the field name is only available as a String?  Account someAccount = [select id, name from Account limit 1]; String someField = 'name'; // if I could only do something like the below someAccount.addError(someField, 'Bad Name');

Is there a way to add an error on a dynamically referenced field? Let's take this simple example:  opp.get('Name').addError('Invalid name');   This is not working, I'm looking for a similar minded way.  Thanks


Does having a primary key column mean there is an index on that column? If so, what kind of index is it?

Say I have an ID row (int) in a database set as the primary key. If I query off the ID often do I also need to index it? Or does it being a primary key mean it's already indexed?  Reason I ask is because in MS SQL Server I can create an index on this ID, which as I stated is my primary key.  Edit: an additional question - will it do any harm to additionally index the primary key?


I would like to be able to enable on the fly transformation in version 3, I have followed the user guide instructions but I seem to be missing the options in the 'Options' window to allow this. In the version 3 user guide the following instructions are given to enable the 'enable on the fly transformation' to be seen in the Project CRS window. This screenshot shows the image of the 'Options' window in the user guide.     here are three ways to enable On The Fly CRS Transformation:           Select Project Properties ‣ CRS from the Project ( or Settings) menu. You can then activate the checkbox Enable on the fly CRS transformation (OTF) checkbox in the CRS tab and select the CRS to use (see Coordinate Reference System Selector)          Click on the geographic CRS status icon in the lower right-hand corner of the status bar, leading you to the previous dialog.          Turn OTF on by default in the CRS tab of the Settings ‣ Options dialog by selecting checkbox Enable ‘on the fly’ reprojection by default or Automatically enable ‘on the fly’ reprojection if layers have different CRS.      However, when I got to Settings, Options, CRS these options are missing (see screenshot). How can I activate them please?

In QGIS 2.8 there is a clear button to 'enable on the fly CRS transformation' in the "project properties" for a new project.  Seen here:   But in QGIS 3.0, I cannot find it to save my life.     Can anyone help?


I'm building a small website using PHP and MySQL.  I have a problem reading from a database. I can do all operations on DB, but when I SELECT from DB, I get some characters invalid or in wrong representation.  I get:     Koriste?i kriminalisti?ku pri?u Dostojevski je sastavio roman kojim je predo?io svu slo�enost u odnosu pojedinca prema postoje?im zakonima.   but in a database I see:     Koristeći kriminalističku priču Dostojevski je sastavio roman kojim je predočio svu složenost u odnosu pojedinca prema postojećim zakonima.    The problem is with Croatian letters: Č Ć Ž Đ Š. I think the problem is with collation of a database.  Any idea ?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I need to prove the following: $$\begin{aligned} &\text { Prove that } a^{N-1} \not\equiv 1(\bmod N) \text { if } \operatorname{gcd}(a, N)>1, \text { where } a, N \in \mathbb{Z} \text { and }\\ &N \geq 1 \end{aligned}$$  My attempt on a solution. set $d=gcd(a,N)>1$. Since $d$ divides a, we have: $$a\equiv 0 (\bmod d)$$ using this repeatedly we have: $$a^{N-1}\equiv 0 (\bmod d)$$ Since $d\mid N$ does that imply: $$\implies a^{N-1}\equiv 0 (\bmod N)$$?  I'm not quite convinced that this is true. If $d\mid a^{N-1}$ and $d \mid N$. Does that imply $N \mid a^{N-1}$? And how should I use the assumption $d>1$?. I believe it would be obvious if it was the other way around. if $N \mid d$

Isn't finding the inverse of $a$, that is, $a'$ in $aa'\equiv1\pmod{m}$ equivalent to solving the diophantine equation $aa'-mb=1$, where the unknowns are $a'$ and $b$? I have seem some answers on this site (where the extended Euclidean Algorithm is mentioned mainly) as well as looked up some books but there is no mention of this. Am I going wrong somewhere or is this a correct method of finding modular inverses? Also can't we find the Bézout's coefficients by solving the corresponding diophantine equation instead of using the extended Euclidean Algorithm?


The problem is that the following makes logically no sense to me, maybe anyone could explain (explanation what JSON.parse/JSON.stringify EXACTLY does would be appreciated too):  var hello = {norsk: "hei"}, parsedHello = JSON.parse(JSON.stringify(hello)); hello === parsedHello // false hello == parsedHello // false typeof(hello) // "object" typeof(parsedHello) // "object" hello.norsk === parsedHello.norsk // true

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


Most of us have seen Star Trek episodes. Suppose that we have a Star Trek type matter transporter. Basically this can be described as a machine which examines an object's structure down to the atomic scale, disassembles the object (i.e., vaporizes it), and then reconstructs the object again down to the atomic scale in another location. Suppose you step into a transporter. You hear the hum of the transporter starting up. But then you hear beeping sounds indicating an error has occurred. The transporter operator grabs a phaser (i.e., a "space gun), points it at you and says "I'm sorry, sir. The transporter malfunctioned. It made another 'you' down on the planet surface but for some reason it didn't automatically vaporize the original object (i.e., the 'you' still standing here), so I'm afraid that I'm going to have to do it myself. Sorry about this."  Or, to look at this from another perspective, suppose after hearing the hum of transporter you open your eyes and find yourself beamed down to a planet surface, but then the transport operator on the planet approaches you and says "I'm sorry, sir. There's been a transporter malfunction. You're a duplicate. The original 'you' is still standing on the transporter pad on the starship orbiting this planet, and he's demanding that I vaporize you so that we can reset the transporter and start the transport operation all over again."  Matter transporters seen in Star Trek (or movies such as "The Prestige") seem to assume that the soul is transported along with the atoms when a matter transporter reassembles a person. Is this true? If you were transported by such a machine, would you really be able to see out of the eyes of this fresh new copy of you as is shown in Star Trek? But if so, then how does one explain situations such as the first scenario above in the hypothetical case that a transporter 'error' leaves the original person intact for some reason? Doesn't the physical body of the original 'you' have at least as much of a claim to be the rightful physical owner of your soul as the duplicated copy of 'you'?

Consider a teleportation booth which exactly replicates ones body and mind in Mars, whilst destroying that on Earth; as in Parfits Reasons and Persons.   There is only one you at any one time; so where you are is easily tracked - at one point you were on the Earth, and at another later time, and suddenly you were on Mars.  But, suppose at a critical moment the machine breaks down and so there are two yous, one on Earth and the other on Mars. Which one is really you? Of course they both behave differently, after all one is on Mars and the other is on Earth; and thus faced with different circumstances that are immediately present; still each responds to the same name, claims the same woman as his wife (and another as his mistress); has the same memories of college, and of playing football on a field by a stony beach that ran out to a cold sea; and though they wear different clothes; they wear recognisably similar fashion choices; and their mannerisms would be familiar to their friends.  So which is the real you?   The conclusion to Descartes cogito is 'I am'; this sense of inner awareness; how can this be at different places separately?   One could for example, consider a conscious AI who had an avatar here on the earth and another on Mars; but his conscious would be unitary; his avatars, in a sense are mechanisms for perceptions and acts.  But we have two quite distinct persons, who are also the same.  If consciousness is unitary - perhaps this means that, in fact, no such machine is possible - and it is in fact just science fiction, whose fictional ontology is just that - fictional.  Is this a sensible conclusion to take?


Suppose m1, m2, ..., mk are positive integers > 1, not necessarily pairwise relatively prime. Also Suppose a1, a2, ..., ak ∈ Z. What can be said about the solutions of the following set of linear congruence equations? x ≡ a1 (mod m1), x ≡ a2 (mod m2), x ≡ a3 (mod m3), ..., x ≡ ak (mod mk).

Suppose $m_1, m_2, m_3,\ldots, m_k > 1$ and not necessarily pairwise relatively prime. Also $a_1, a_2,\ldots, a_k\in\Bbb Z$. What can we say about the solutions of the following congruence equations: $\begin{align*} x&=a_1\mod m_1\\ x&=a_2\mod m_2\\  &\phantom{1}\vdots\\ x&=a_k\mod m_k \end{align*}$


Found an very silly error with PHP 7 and checked internet for some solution, but didn't find any good answer. Below code snippet fails in PHP 7. Code Snippet: print_r( 0*-1.1 );   print_r(     floatval(     0*-1.1) );  Both Fails Desired Output: 0 Real Output: "-0" Any help is appreciated, is it a PHP bug?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I came across this video -  - where it says in 14:00:  Subwoofer is larger because it needs to be bigger for those larger low frequency waves to propagate through and the tweeter is smaller because higher frequency are very small waves and they don't need as much space to propagate  Remembering from basic physics, neither the amplitude nor the wavelength (or frequency) has anything to do with how fast a sound wave propagates. The speed of a sound wave should only be a matter of the medium, and within the same medium all sound waves should travel at the same speed. Perhaps temperature has an effect on the medium but certainly not the volume of the medium from what I recall. So the above statement does not make much sense to me. Great if someone can help explain the physics or the concept of why a subwoofer needs to be bigger for the lower frequency waves to propagate, and vice versa for a tweeter.

Is there any reason for why a small speaker cone cannot produce low end sound at a comparable volume to higher frequencies?  I can understand how a larger speaker would be in contact with more air and so would produce a louder sound, but why specifically is this important for the low end?  As an aside, I think this phenomenon can also be seen elsewhere, such as the size increase of the violin family (violin: small/high pitched, double bass: enormous/low pitched). If you tuned the strings of a violin to double bass pitch I doubt you’d hear much!


When I use tabs in Chrome I want to switch back and forth between the latest use tabs.  The Internet Explorer Tab sequence was adjustable to use the "latest use" sequence.  So pressing Ctrl+Tab releasing the Ctrl key and pressing it again, returns me to the previous page. So Ctrl+Tab moves me always back in the sequence of the latest used tabs.  The advantage is obvious. I opened a new tab from the current page. And I just want to get back to the previous page. If I already opened 2 other tabs from this page. I have to press Shift+Ctrl+Tab 3 times to get back to the previous page.   I couldn't find any addin that brings me back this feature. Or is there any other trick or keyboard sequence to achieve this?  EDIT: The question was closed, but the provided link doesn't answer my question. I don't want a new hotkey. I want to cycle back in the latest used sequence with the existing keystroke. Most of the addins in the links provide an additional UI.

How do I toggle back to the last tab used in Chrome on Mac? Ctrl-Tab and Ctrl-Shift-Tab navigates the tabs in order.  But I want to switch back and forth between two tabs similar to how how Cmd-Tab switches between the last two apps.  There's  but is there a solution for Chrome?


This is my problem: I've been provided an application and I have to write test casesin order to test it using JUnit. For example: Instantiate an object with a property String name and this field cannot be longer tan 10 characters. How do I catch it into the test method? Here is my code: The class to be tested is:  package hdss.io;  import hdss.exceptions.HydricDSSException;  public class AquiferPublicData implements WaterResourceTypePublicData {     private String myName;     private float currentHeight;      public AquiferPublicData (String name, float current)   throws HydricDSSException{          try {             if(name.length()>10) //name must be shorter than 11 chars                 throw new HydricDSSException("Name longer than 10");             else{                 myName = name;                       currentHeight = current;             }         } catch (HydricDSSException e) {                     }     }      public String getMyName() {         return myName;     } }   My test method is:  package hdss.tests;  import static org.junit.Assert.*;  import org.junit.Test;  import hdss.exceptions.HydricDSSException; import hdss.io.AquiferPublicData;  public class AquiferPublicDataTest {      @Test     public void testAquiferPublicData() {         String notValidName = "this-name-is-too-long";         try {             AquiferPublicData apd = new AquiferPublicData(notValidName, 10);             fail("Was supposed to throw Exception if name is longer than 10 chars");         } catch (HydricDSSException e) {             assertEquals("Name longer than 10", e.getMessage());         }     }  }   And the Exception is:  package hdss.exceptions;  public class HydricDSSException extends Exception{      /**      *       */     private static final long serialVersionUID = 1L;     String message;      //Esfuerzo Actual: 1.5 minutos      public HydricDSSException (String message){          this.message = message;     }      //Esfuerzo Actual: 1.5 minutos      public String getMessage(){          return this.message;     }  }

How can I use JUnit4 idiomatically to test that some code throws an exception?  While I can certainly do something like this:  @Test public void testFooThrowsIndexOutOfBoundsException() {   boolean thrown = false;    try {     foo.doStuff();   } catch (IndexOutOfBoundsException e) {     thrown = true;   }    assertTrue(thrown); }   I recall that there is an annotation or an Assert.xyz or something that is far less kludgy and far more in-the-spirit of JUnit for these sorts of situations.


Hi I am following the method here    To increase the table row height, I was wondering is there a way to create a new command for   \\[space]   to something like \\\ or similar so that I can change [space] globally?

How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 & column 2 \\      \hline     I really would like this less & crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.


On a Mac in Firefox 80.0.1, when I scroll the similar questions pane, the initial text visible in the pane doesn't scroll; the questions scroll under it. If I leave the page (like to post this question on Meta) and return, it resolves itself until new content is added to the pane when I continue typing a title. I initially noticed it on another site, but was able to reproduce it here on Meta as I was typing this question. I've tried shifting the focus between the body, title and the similar questions pane, but the only thing that has worked to "fix" it is to leave the page and come back. It seems like some event handler is missing a step?

Originally posted on Stack Overflow:   Requirements to reproduce:  Windows 7 x64  Firefox 71.0 x64  Steps to reproduce:   Go to the ask question section Write something to the title field Start scrolling similar questions Change the title field Start scrolling the similar questions again


There are several questions similar to what I'm trying to do here, but I can't find any that actually answer the question. Feel free to just link me if you find one.  I need to set the hostname of a Windows 7 machine. In Linux, it's a simple   hostname mymachine.mydomain.com   But on Windows, I can't figure out how to set my hostname to this without having an actual domain set up called mydomain.com.    Is it possible to do this? I have a DNS domain called mydomain.com but it is not a Windows active directory domain, so when I try to set it in the Network ID menu in sysdm.cpl, it doesn't recognize the domain and fails to connect.  Is there a simple way to do this in Windows?

How do you change your hostname in Windows 7? Not the computer name, but the hostname.


This may be marked down at an astronomical rate - but here goes...  I find myself viewing UX stack exchange quite regularly on my iOS device, when on the go and thinking a downloadable app would be of benefit for 'widening the net' of users who want to access the forum ad-hoc from anywhere, thus increasing the chances of askers getting the very best answers in return, Transparent benefits would include faster access and a broader audience.  This is not opinion based, but more can see potential benefits fomr this being developed, thoughts welcome!

I like using Stack Overflow (or any other Stack Exchange sites) and was wondering if there was an app I could install on my phone or other device that would allow me to use the site on-the-go or straight from my desktop.  Some systems to consider:   Windows 8 Android iPhone/iOS   What are some apps that I could install to my computer or phone to enhance my Stack Exchange experience?


The Higgs boson is lighter than the top quark. But the top quark was discovered in the mid-1990s where the Higgs boson escaped detection for two more decades. So if the energy has already been achieved to produce Higgs boson, why did it escape detection so far?    I understand that the couplings of Higgs boson to fermions is small and doesn't interact with the detector appreciably.   Does it mean that in LHC, with the increase in energy, the Higgs coupling increased and we finally detected Higgs?

The $W$ and $Z$ boson took a long time to be discovered because they were so heavy; we couldn't produce them in a particle collider until the 80's. But the Higgs boson isn't that much heavier than the $W$ and $Z$, so we presumably have been producing them for decades. The Higgs also couples to just about everything, so it's not hard to make.  Given the above, why did we have to build the LHC to find the Higgs? Was it just a matter of getting enough statistics, or was there another reason?


I have the URL of an image which I know is an attachment. Now, I need to find out the attachment ID.  This is what I've got (thanks to ):  // retrieves the attachment ID from the file URL function pippin_get_image_id($image_url) {     global $wpdb;     $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url ));          return $attachment[0];  }   This works fine for an URL like this:    My problem is, the URL is the URL of a cropped picture, so it is   My next problem is right now, I can't simply explode the URL to remove 300x297, since I might have pictures, which are not cropped but might have a file name like 'picture2-dontexplodeme.png'  Basically, I need a fool proof solution haha. If there is anyone out there, who has an easy solution, I would be very happy :)

Is there any way I can take a URL of an image and find the attachment or post id of that image in the database?  Here is the situation:  I'm in a loop going over all the 'img' tags that are surrounded by 'a' tags in my post content. if the src attribute of the 'img' tag does not match the href attribute of the outer 'a' tag, then i want to replace the 'img' tag. In doing this, if the 'img' that is to be removed is in the gallery, i want to delete that post, and then put my replacement 'img' in its place. I tried using a function like this:   function find_image_post_id($url) {   global $wpdb;   $postid = $wpdb->get_var($wpdb->prepare("SELECT DISTINCT ID FROM $wpdb->posts WHERE guid='$url'"));   if ($postid) {     return $postid;   }   return false; }   This apparently is not right because the guid is ironically not globally unique. I had (earlier in the same script) uploaded a file with the same name (why? because it was higher resolution and i am trying to replace low resolution versions of the same image) and although wordpress will save the image with a different name in the directory, the guid's were set to be the same. (possibly a bug).  Is there another technique I can use?


An example of the monster I have a question over is a Crab, Giant. It's Melee looks like this:  2 claws +4 (1d4+2 plus grab)  I am wondering about the "2 claws" part. Does that mean the crab gets to strike twice with both its claws as a full round action, thus possibly rolling 1d4+2 twice? Or is the stat block saying the crab attacks with both of it's claws and together does only 1d4+2?  Also, what if the Melee looked like this:  2 claws +4 (1d4+2 plus grab), bite +5 (1d8+4)  Does the above melee line allow for three full attacks as a full round action? Or only two attacks?  I just started DMing for the first time and am trying to become prepared.

Okay, I need some clarification. The  state this about natural attacks:     You do not receive additional natural attacks for a high base attack bonus. Instead, you receive additional attack rolls for multiple limb and body parts capable of making the attack (as noted by the race or ability that grants the attacks).   Let's say that I can shape into an . My BAB is +8/+3 and STR 5. An Oliphant has two natural attacks: Gore and Stomp (x2).  Reading the rules, it seems that I can't do two Gore attacks, like:   1st attack: AB +13. DAM 2d8 + 5 2nd attack: AB +8. DAM 2d8 + 5   because I don't get additional attacks for a high BAB. Does that mean I need to combine attacks instead? Example:   (Gore) 1st attack, AB +13. DAM 2d8 + 5 (2 Stomps) 2nd attack, AB +6*. DAM 2d6 + 5 * With the Multiattack feat, reduces secondary weapon penalty to −2.   Also, does the damage from the two stomps equal 2d6 + 5, or should I roll damage for each stomp? (1st foot = 2d6 + 5, 2nd foot = 2d6 + 5).


I am trying to evaluate the infinite series:  $$\sum_{k=1}^{\infty} \frac{1}{k(k+c)} $$  where c is a constant, positive integer.  Is my approach correct by using partial fraction decomposition? Then I break down the series into the form $\frac{1/c}{k} - \frac{1/c}{k+c}$ and I get a series of the form (after writing out few terms and noticing some cancellations)   $$\frac{1/c}{1} + \frac{1/c}{2} + \frac{1/c}{3} + ...$$  Is there a way for me to formalize the solution better (if correct), maybe into some kind of compact formula? Otherwise is there a correct/better approach to the problem?   I also used an online infinite series calculator which told me the sum of the series for different values of c. For c = 1,2,3,4 the sum of the infinite series evaluates to $1, \frac{3}{4}, \frac{11}{18}, \frac{25}{48}$ respectively. However, I don't really see the pattern here.  Any helps/hints would be much appreciated! Thank you!

I want to evaluate this sum:  $$ \sum^\infty_{k=1} \frac{1}{k(k+p)}$$  My first thought was to consider the partial sums, and after taking out a factor of $1/p$ from $\sum^n_{k=1} 1/k(k+p)$, I get:  $$\frac{1}{p}\left( 1 - \frac{1}{1+p} + \frac{1}{2} - \frac{1}{2+p} + \ldots + \frac{1}{n} - \frac{1}{n+p}\right)$$  As $n \to \infty$, it seems like the series in the parentheses converges to the $p^{th}$ harmonic number, so the series overall would converge to $\frac{H_p}{p}$.  But how could I prove that? I only noticed that this seemed to be that case after trying out a few numbers. Is it even actually true?


During his childhood, Utkarsh used to collect Pokemon Tazos. Pokémon Tazos were small collectible round discs that were found in bags of chips in the 1990s and 2000s. He wanted to collect all the different Pokemons Tazos.  He did some research and found out that there were a total of M distinct Pokemon Tazos. Each bag of chips contained exactly one tazo. One cannot see the tazo contained in the bag of chips before buying it. It was equally likely for any of the M distinct Pokemon Tazos to be present in a bag of chips.  In order to collect them all, he went to a shop and bought N bags of chips. Now he is worried whether he has bought enough bags of chips or not. You need to tell him the probability of getting all the M distinct Pokemon Tazos from the  N bags of chips.

I'm trying to solve the well known Coupon Collector's Problem by explicitly finding the probability distribution (so far all the methods I read involve using some sort of trick). However, I'm not having much luck getting anywhere as combinatorics is not something I'm particularly good at.   The Coupon Collector's Problem is stated as:  There are $m$ different kinds of coupons to be collected from boxes. Assuming each type of coupon is equally likely to be found per box, what's the expected amount of boxes one has to buy to collect all types of coupons?  What I'm attempting:  Let $N$ be the random variable associated with the number of boxes one has to buy to find all coupons. Then $P(N=n)=\frac{|A_n|}{|\Omega _n|}$, where $A_n$ is the set of all outcomes such that all types of coupons are observed in $n$ buys, and $\Omega _n$ is the set of all the possible outcomes in $n$ buys. I think $|\Omega _n| = m^n$, but I'm not even sure about that anymore, as all my attempts so far led to garbage probabilities that either diverged or didn't sum up to 1.


Let $\{W_t\}_{t \in \mathbb{R}_+}$ be a Wiener process. I wish to calculate $E \left[ W(t)e^{\lambda W(t)} \right], \lambda \in \mathbb{R}$.  Solution attempt  First define a function given by $f(t,x) = xe^{\lambda x}$. Then, \begin{align}  \frac{\partial f(t,x)}{\partial x} &= e^{\lambda x} +  \lambda x e^{\lambda x}, \\ \frac{ \partial^2 f(t,x)}{\partial x^2} &= 2\lambda e^{\lambda x} + \lambda^2 xe^{\lambda x}.\end{align}  So by Ito's formula, the differential of $f(t,W(t))$ is given by \begin{align} df =  \left[  \lambda e^{\lambda W} + \frac{\lambda^2}{2}We^{\lambda W} \right]dt + \left[ e^{\lambda W} + \lambda We^{\lambda W} \right] dW\end{align}   Or, rather, $$f_s = f_0 + \int_0^s \left[  \lambda e^{\lambda W} + \frac{\lambda^2}{2}We^{\lambda W} \right]dt + \int_0^s \left[ e^{\lambda W} + \lambda We^{\lambda W} \right] dW.$$ Then we take expectations, so that the stochastic integral disappears, then we define $m(t) = E f_s = E f(s,W(s))$, and then we take the derivatives. We then get $$m'(t) = E \lambda e^{\lambda W} + \frac{\lambda^2}{2}m(t).$$ The first term on the left hand side equals $\lambda e^{t\frac{\lambda^2}{2}}$.   At this point, as I am not good with differential equations, I am kind of stuck. And, either way, I would like to have my solution so far checked out as well, as I am unsure whether the stochastic integral really does disappear when I take expectations. What condition needs to be satisfied for this to hold, and how do I check whether it does?

I know that since it is a Brownian motion that $W(s)\sim{N(0,s)}$. One approach I tried, was to see that $W(s)-W(0)\sim N(0,1)$ and to let $X = W(s)$ and then solve $\mathbb{E}[X\mathrm{e}^X]$ but I end up with some awful integral. I was wondering whether there was an easier way? Or perhaps a simple way to solve this integral: $\int_{-\infty}^{\infty} \frac{1}{\sqrt{2{\pi}s}}x\mathbb{e}^{x}\mathbb{e}^{-\frac{x^2}{2s}}$


I have gone through other posts similar to my question, but i tried all solutions/ or their methods dont apply to my case.  There is no /forcefsck file on my system.  /etc/fstab contents:  UUID=6206c47e-b5aa-424f-876d-3c72889098b3 /     ext4    errors=remount-ro 0    1 UUID=caff3891-1cff-451f-8ab9-f5c074aa4dbc /home ext4    defaults          0    2 UUID=886f5731-2180-44cb-a46c-82b619bed4bd none  swap    sw                0    0   I did fsck with liveboot session on all ext4 partitions,and specially my main /home partition but didn't get any errors whatsoever.Ran this command: result no errors.  sudo e2fsck -f -y -v -C 0 /dev/sdb2   SMART check output:  $ sudo smartctl -H /dev/sdb smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.19.0-25-generic] (local build) Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED  $ sudo smartctl -i /dev/sdb smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.19.0-25-generic] (local build) Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org  === START OF INFORMATION SECTION === Model Family:     Seagate Momentus SpinPoint M8 (AF) Device Model:     ST1000LM024 HN-M101MBB Serial Number:    S2TTJ9HC801807 LU WWN Device Id: 5 0004cf 208283fbf Firmware Version: 2AR10001 User Capacity:    1,000,204,886,016 bytes [1.00 TB] Sector Sizes:     512 bytes logical, 4096 bytes physical Rotation Rate:    5400 rpm Form Factor:      2.5 inches Device is:        In smartctl database [for details use: -P show] ATA Version is:   ATA8-ACS T13/1699-D revision 6 SATA Version is:  SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s) Local Time is:    Sun Aug  2 07:50:04 2015 IST SMART support is: Available - device has SMART capability. SMART support is: Enabled     $ sudo dumpe2fs /dev/sdb2      But still, /dev/sdb2 (/home) gets checked every single time I do a reboot.  Any help?  PS: I've been getting this prompt very often on resuming the notebook from sleep.    There have been other users reporting about the annoyance of this dialog on the internet, with no clear explanation what this dialog is all about. This started appearing only when I upgraded to 15.04. Can this be related to my fsck problem?

The last two fields on each line in fstab (dump and pass) are some numbers (usually, 0). What do these numbers mean? # <file system> <mount point>   <type>  <options>       <dump>  <pass> proc            /proc           proc    nodev,noexec,nosuid 0       0 UUID=030ccf66-5195-4835-ba3e-f5d7a5403c05 /               ext4    errors=remount-ro 0       1


I'm a Turkish citizen living in USA (temporary resident on a H-1B) and I just bought a flight that transfers through Vancouver Airport.  The  itinerary is as follows:  Air Canada 8090 -> Seattle, USA to Vancouver, Canada     10:57am arrival and 12:00pm departure    -     1 hour 3 minutes layover Air Canada 63 -> Vancouver, Canada to Seoul, South Korea  Air Canada 64 -> Seoul to Vancouver     10:35am arrival and 1:45pm departure     -     3 hour 10 minutes layover Air Canada 8095 -> Vancouver to Seattle   I have my legal travelling required documents ready for both South Korea and USA. However I do not possess a Canadian Tourist Visa or any sort of transit visa.   Is there a connection area in Vancouver airport that would allow me to take these flights?  Vancouver airport told me that I need a visa, CBSA told me that I need a visa but many people online say that I don't. I only have a carry-on and will not have any luggage checked in.

I'm passing through Canada, on my way to somewhere else. I'm staying only a short time.   Is there a website, or some other way of find out out if I need a visa?


I'm trying to install glew and freeglut so I can program OpenGL. I have figured out how to fix my make all command but when I type make install I get this message:  Making install in src make[1]: Entering directory `/home/connor/Documents/freeglut-2.8.1/src' make[2]: Entering directory `/home/connor/Documents/freeglut-2.8.1/src'  /bin/mkdir -p '/usr/local/lib'  /bin/bash ../libtool   --mode=install /usr/bin/install -c   libglut.la '/usr/local  /lib' libtool: install: /usr/bin/install -c .libs/libglut.so.3.9.0 /usr/local/lib/libglut.so.3.9.0 /usr/bin/install: cannot create regular file '/usr/local/lib/libglut.so.3.9.0': Permission denied make[2]: *** [install-libLTLIBRARIES] Error 1 make[2]: Leaving directory `/home/connor/Documents/freeglut-2.8.1/src' make[1]: *** [install-am] Error 2 make[1]: Leaving directory `/home/connor/Documents/freeglut-2.8.1/src' make: *** [install-recursive] Error 1   How can I grant the permission?

I am trying to install gtk-server. First I typed the command ./configure and then make, but when I typed command make install it gave me this error:  osama@osama-HP-Compaq-6910p:~/Downloads/gtk-server-2.3.1-sr$ make install /usr/bin/install: cannot create regular file `/usr/local/bin/gtk-server': Permission denied mkdir -p /usr/local/bin /usr/bin/install -c gtk-server /usr/local/bin /usr/bin/install -c stop-gtk-server /usr/local/bin /usr/bin/install: cannot create regular file `/usr/local/bin/stop-gtk-server': Permission denied make: *** [install] Error 1


Suppose I have following equation:  $$ a_1 + a_2+\cdots+a_k=n$$ $$a_1,a_2,\cdots,a_k\in\{m,m+1,m+2,\cdots,m+l  \}$$ and  $$m*k<n$$  I am asked to calculate how many different solution that equation has. What I came up with is changing variables: $a_i=a_i'+m$ and then my equation looks like this: $$ a_1' + a_2'+\cdots+a_k'=n-k*m$$ $$a_1',a_2',\cdots,a_k'\in\{0,1,2,\cdots,l  \}$$ It may seem a little nicer to solve but still there's that $l$ limitation which I am not so sure know what to do with. Is there any  "general" method to do this type of task? I already tried substituting one of variables like that: $a_i'=a_i''+l+1$ and then solving "smaller" equation but it just doesn't feel like the right way to do this.  My original equation is: $$a+b+c+d=45$$ $$a,b,c,d\in\{5,6,\cdots,15\}$$  I'll be thankful for any help or tips.

The problem of counting the solutions $(a_1,a_2,\ldots,a_n)$ with integer $a_i\geq0$ for $i\in\{1,2,\ldots,n\}$ such that $$a_1+a_2+a_3+....a_n=N$$ can be solved with a stars-and-bars argument. What is the solution if one adds the constraint that $a_i\leq r_i$ for certain integers $r_1,\ldots,r_n$?  e.g. for $n=3$, $N=6$ and $(r_1,r_2,r_3)=(3,3,2)$, the tuple $(a_1,a_2,a_3)=(2,3,1)$ is a solution, but $(2,1,3)$ is not a solution because $a_3=3>2=r_3$.


I notice that beamer has everything in sans-serif by default, including math. In a regular article, simply using \sffamily doesn't cause math to be set in sans-serif. Using \renewcommand{\familydefault}{\sfdefault} doesn't work and the  sort of works, but seems to produce varying results with respect to whether letters are italic or not (e.g., in beamer \Gamma is not italicized, but with sansmath it is.)  Is there one "right" way to do this?  Edit: another problem is that \sansmath seems to turn \beta into "ﬁ".

For creating the graphics for my thesis (function graphs, flow charts, line art sketches) I've chosen to use the sans serif font by  \renewcommand\familydefault{\sfdefault}    However when I use mathematical symbols like $p_{s}$, they are still typeset in roman font and that looks weird:    So I wonder:   how could I force mathematical expressions also be typeset in \sfdefault if I do, are there any negative sideeffects to expect (with greek signs or other special symbols?) OR should I typeset all "mathematical" graphs (axis labels etc.) in roman font, and only make the other graphics like flow charts and sketches with sans serif font?


I'm very curious is there some kind of requirement(s) I'm unaware of for the Bollywood Achievement:  Bollywood As Gandhi, win a cultural victory with 3 or fewer cities in your empire.  I'm only asking this question because I have actually accomplished this achievement several times but Steam has never awarded me for the achievement.I went ahead and started a new game as Gandhi and accomplished the listed requirements (3 or fewer cities in my empire and win by culture victory) again just as is stated in the achievement and again no achievement received. Also, never had more than 3 cities the entire game. So I'm just wondering what gives? Is there some kind of unlisted requirements for the achievement? The achievement states as follows: Does it require a specific difficulty? Does it require that no game modifications are used? Does it require that you never go to war with any other civilization or city-state? I'm just at a loss because I just barely completed this achievement exactly as it is stated for like the 19th time and I still have not received the achievement.

Steam Bollywood Achievement:     As Gandhi, win a cultural victory with   3 or fewer cities in your empire.   I wish to do this achievement on a Pangaea Standard map size or larger and on Prince difficulty or higher,  What tactics do people recommend to achieve this. Any tips on the use of, Social Policies, Wonders, Diplomacy, City States and Military.


I have a default torus  In edit mode i have duplicate 2 times and select all and Press P key i get 3 option by loose parts and when i click get 3 torus separate in outliner.  But when i select the single torus in edit mode select all the faces and hit P key and select loose parts and nothing happens. Here im not getting all the faces separate like the torus separated above.  How can i get separate loose faces. Is there any addon or how can i get all 576 faces separate.

I am looking for a way to take all the faces of an object and make each face it's own object.   In the image above, you'll see a basic representation of what I'm trying to accomplish. On the left is a shape with faces, all attached. On the right is the result I want, an object for each face. The project I'm working on is much more complicated than this example, so I can't select each face and separate by selection. I have over 3,000 faces to work on.


Well, I know the fact that negative times negative is positive. It would be interesting to question this fact and try to prove it.

Someone recently asked me why a negative $\times$ a negative is positive, and why a negative $\times$ a positive is negative, etc.  I went ahead and gave them a proof by contradiction like so:  Assume $(-x) \cdot (-y) = -xy$  Then divide both sides by $(-x)$ and you get $(-y) = y$  Since we have a contradiction, then our first assumption must be incorrect.  I'm guessing I did something wrong here. Since the conclusion of $(-x) \cdot (-y) = (xy)$ is hard to derive from what I wrote.  Is there a better way to explain this?  Is my proof incorrect?  Also, what would be an intuitive way to explain the negation concept, if there is one?


Take a look at the article at : you will notice that mousing over hyperlinked citations generates a popup that previews the bibliographic entry corresponding to that citation. Is there a way to implement this in a tex-generated pdf?

I thought it would be useful to have bibliographic entries displayed as a tooltip so readers are not interrupted by following hyperlinks or trying to find the Bibliography, so I created the following command:  \newcommand\annocite[1]{\pdfmarkupcomment[markup=Underline,subject=Citation]    {\parencite{#1}}{\fullcite{#1}}}   Unfortunately this does not work. Instead of showing the bibliographic entry in the popup, it merely displays the citation key; i.e., the \fullcite command seems to have no effect. I believe the problem is related to argument expansion. Here is a MWE:  \documentclass{article} \usepackage{biblatex,pdfcomment,filecontents} \bibliography{\jobname}  \newcommand\annocite[1]{\pdfmarkupcomment[markup=Underline,subject=Citation]     {\parencite{#1}}{\fullcite{#1}}}  \begin{filecontents}{\jobname.bib} @article{Bli74,   author = {Blinder, Alan S.},   year = {1974},   title = {The economics of brushing teeth},   journaltitle = {Journal of Political Economy},   volume = {82},   number = {4},   pages = {887--891}, } \end{filecontents}  \begin{document} Hover over this citation: \annocite{Bli74}  The tooltip should contain the following text: \fullcite{Bli74}  \end{document}   Can anyone think of a solution, or better, a way to redefine biblatex' citation commands (e.g., \parencite, \cite) to do this automatically?


I understand that function expressions must be expressed at the top if you want to use them vs function declarations which are hoisted to the top.   When I call my constructor from with window.onload, it works. However if I don't have a window.onload, and call my constructor before my function expression, the code breaks.  <script type="text/javascript">          window.onload = function () {             var c = new C();         }  // this works, but if i delete window.onload the code breaks.          var C = function () {             console.log("test");          };   </script>

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


Within a few months, Nintendo will launch the first DLC of Pokemon Sword / Shield. As I understand it, in that DLC, they will introduce all the remaining legendary pokemon.  One of my goals is to try to get every legendary Pokemon in their normal and shiny form. But some of them are not legitimately available in shiny form.  I know that the first three legendary birds and Mewtwo are legal, since in Pokemon Let's Go you can get them by doing soft reset. But I'm not sure about other legendaries.  Therefore, I would like to know which are legitimately available as shiny (or which are not), and how to obtain them.

A bit of a multiheaded question here, but it didn't quite justify being four different questions.   Is it possible to get a shiny legendary pokemon in the Pokemon games? If so, when is it generated? Does the overworld sprite reflect the shiny status? Does this vary by generation?


In other words, I'm looking for a binary relation $P(x,y)$, being arithmetical, i.e being expressed in the first order language of Peano arithmetic (hence non-recursively, i.e. using addition and multiplication only - without using the very symbol $P$), which satisfies:   For every $x$, there exists a unique $y$, satisfying $P(x,y)$. $P(0,1)$. Every $x,y$, satisfying $P(x,y)$, satisfy $P(x+1,2y)$.   If such an arithmetical function (as defined above) does not exist, I will be glad to read the proof of this fact.  (No Gödel's coding please).

How would exponentiation be defined in Peano arithmetic? Unless $n$ is fixed natural number, $x^n$ seems to be hard to define.   Edit 2: So, what would be the way to define $x^n+y^n = z^n$ using $\Sigma_1^0$ formula?  Edit: OK, I say Peano arithmetic has addition and multiplication stuffs. This allows additions to be expressed without quantifiers but as for exponentiation Peano arithmetic is silent. That's why I asked this question. Just for clarification.


I generally have a tendency to underexpose images to avoid white clipping, especially when doing landscapes so that the sky doesn't get ruined as white clipping looks worse than black clipping. I know you can get use Lightroom tools to recover areas but I aim for the best shot when I'm taking it.  However I just read a book on Camera Raw ('Getting started with Camera Raw' by Ben Long - 2008) which explains you should lead towards overexposure rather than underexposure because the way cameras allocate bits towards capturing brightest is skewed towards the brightest part of the image. And therefore it has more data to play with when making adjustments in the brighter parts of the image than the darker.  Is this still true?  And why does it do this way rather proportionally the same for lights and darks? (The book didn't explain this).

Picking up from this  and this , What exactly is ETTR? How it may reduce the image noise? And how is it difference from film to digital sensors?  In the answer linked above, what are the 5 stops and is it related to ETTR?  In real life how can I apply this technique when I'm shooting?


How can I compute $$\sum_{i=0}^n i 4^i$$ this equation? What is the way?

I'm studying the calculus of finite differences and have read about summation by parts:  $\sum f(x)\Delta g(x) = f(x)g(x) - \sum g(x+h)\Delta f(x)$.  The tutorials I'm using go a bit woolly at the point of introducing this technique: they use examples where they set $\Delta g(x)$ to $2^x$, and don't really show how to use it for anything a bit harder. I'm at a loss for basic examples.  I wondered if it is possible to determine  $S.n = \sum\limits_{i=0}^{n}i\cdot a^i$  using summation by parts?  If so, how is it done?  Thanks in advance.


LG 4K monitor 27 inch (lg-27UK650) Macbook pro 2012 Non Retina 16gb RAM/256 GB SSD  Using 4K monitor with mini DisplayPort. Display works randomly, and sometime stops working while in use. Monitor keeps displaying no signal. I am using external monitor in 2K resolution. Earlier I used to connect full HD monitor on mini DisplayPort and never had this kind of issue. Monitor works fine with my other laptop. Thinkpad x260 over same mini display port. Any suggestions?

How do I find out the number, type, resolution & refresh rate of additional monitors I can attach to my MacBook or MacBook Pro?  This is an attempt at a canonical QA, as per the Meta QA -   to try prevent the myriad "same but different" questions we get on every possible combination of computers, cable & monitors There are perfectly good resources out there that Ask Different should not have to duplicate the efforts of.


I want to draw a smooth shape around a set of nodes, as illustrated here (I produced this picture manually):   Is there a way to do that automatically with TikZ or one of its extensions? By automatically, I mean something like: specifiying the positions of the nodes to be included in the shape, as well as the margin between the nodes and the shape.

I'm trying to draw a boundary around a convex set of circular nodes in TikZ. The aim is to have it padded by 1cm, with an arc at the corners between segments, like this:    I currently have the following code:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc}  \begin{document} \begin{tikzpicture}[every node/.style={circle,draw=blue}]    \node at (0,0) (a) {};   \node at (1,3) (b) {};   \node at (2,2) (c) {};    \draw[red]   ($(a)!1cm!-90:(c)$)   let \p1 = ($(a)!1cm!-90:(c) - (a)$),     \n1 = {atan2(\x1,\y1)},     \p2 = ($(a)!1cm!90:(b) - (a)$),     \n2 = {atan2(\x2,\y2)},     \n{delta} = {-Mod(\n1-\n2,360)}   in      arc [start angle=\n1, delta angle=\n{delta}, radius=1cm]   --   ($(b)!1cm!-90:(a)$)   let \p1 = ($(b)!1cm!-90:(a) - (b)$),     \n1 = {atan2(\x1,\y1)},     \p2 = ($(b)!1cm!90:(c) - (b)$),     \n2 = {atan2(\x2,\y2)},     \n{delta} = {-Mod(\n1-\n2,360)}   in      arc [start angle=\n1, delta angle=\n{delta}, radius=1cm]   --   ($(c)!1cm!-90:(b)$)   let \p1 = ($(c)!1cm!-90:(b) - (c)$),     \n1 = {atan2(\x1,\y1)},     \p2 = ($(c)!1cm!90:(a) - (c)$),     \n2 = {atan2(\x2,\y2)},     \n{delta} = {-Mod(\n1-\n2,360)}   in      arc [start angle=\n1, delta angle=\n{delta}, radius=1cm]   -- cycle;  \end{tikzpicture} \end{document}   I'm going to have to draw a lot of these, so it would useful if I could replace the \draw statement by something like:  \draw[red] \convexpath{(a) (b) (c)}{1cm};   where (a) (b) (c) are the nodes in the corners of the convex set in a clockwise direction. In the case of one node I would like it to draw a circle of the specified radius around the node in question.  Does anyone have any suggestions for how to go about writing such a macro?


Hi am new to salesforce , how to do code coverage for this class - page reference method is written. below is the code:  public with sharing class AttachmentController {     public Attachment attachObj {get;set;}      public AttachmentController(){         attachObj = new Attachment();     }      public PageReference saveAttachment() {         attachObj.ParentId = 'a0c410000055VT5AAM'; //  parent record id for an Attachment         try {             insert attachObj;         }catch (Exception e) {             ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,e.getMessage()));             return null;         }           ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Attachment uploaded successfully'));         return null;      } }

I'm struggling to test a class with pagereference. Following is the class...  public with sharing class redirectOrderPartner{  public String currentRecordId {get;set;} public orders__c orderId {get;set;}  public redirectOrderPartner(ApexPages.StandardController controller) {      }     Public Pagereference go(){      currentRecordId  = ApexPages.CurrentPage().getparameters().get('orderid');      system.debug('---currentRecordId  ---'+currentRecordId  );     orderId = [select id from orders__c where name =: currentRecordId limit 1];      system.debug('---orderid---'+orderId);      PageReference pageRef = new PageReference('/apex/OrderTrackingClass?id='+orderId.id);     pageRef.setRedirect(true);     return pageRef;    }   }   Following is what I tried....    @isTest  public class redirectOrderPartner_TEST  {             static testMethod void Test(){            Account acc = new Account(Name='ABC Corp.');           insert acc;            orders__c tempOrder = new orders__c(name = '0001234567', account__c = acc.id );           insert tempOrder;            Test.startTest();            PageReference pageRef = Page.redirectOrderPartner;           Test.setCurrentPage(pageRef);            ApexPages.Standardcontroller sc = new ApexPages.Standardcontroller(tempOrder);           ApexPages.currentPage().getParameters().put('Id',tempOrder.name);           PW_redirectOrderPartner ec = new redirectOrderPartner(sc);           ec.go();                                   Test.stopTest();       }   } I get the following error message on testing..     System.QueryException: List has no rows for assignment to SObject   What am I missing? Thanks


I installed Atom. Then I removed it with sudo apt-get remove atom command. Now when I tried sudo apt-get remove --purge atom, it shows  no apt package atom, but there is a snap with that name. How to remove that snap?

I used this command line  sudo snap install pwgen-tyhicks   to install pwgen but I can't findout how to use it. So I want to uninstall it. How to  uninstall it?


Is there a possibility to disable the monitor sleep in Ubuntu server 14.04? After 10 minutes my monitor goes to sleep. I've already tried several options, from

I am running a web server at home using Ubuntu 11.4 (maybe? I can't 100% recall) on an older AMD 2400+ desktop with 1 or 2 GB of RAM. Sorry I can't recall the details 100%.  Anyway, I have a KVM hooked up to a monitor and PS2 keyboard that I use to switch between the server and my iMac (The keyboard is only hooked up so I can switch between the two easily. Many times a week, Pingdom will tell me the server is down and I can't hit the server. When I get home (it rarely happens when I am home), I hit the Ctrl key twice to switch to the server, hit the space bar and everything is now up and running again. I need to look again, but I don't believe there is any power saving features turned on in the BIOS.  Does anyone have any other suggestions of what I may have going on? I have my uncle's website running on it now and I really would like to have a better up-time than 95%  As a note, I do not have any GUI installed so everything has to be done on the console (or through WebMin) and I know my way around, but I am by no means experienced.


There has been a nuclear war. There are now two sets of people: the barbarians and the scientists. The barbarians are distinguised by the type of weapons they are masters of, the rope/sword/short sticks etc. In the barbarian culture, they fight in a circle to sort out disagreements and arguments.    In one of the later books they are assaulting a mountain containing the scientists.  This is all I can remember.

Plot Summary/Details  I am a little fuzzy on some of the details on this story, including whether it was a short story or full-length novella.  What I do remember is that the protagonist is an adult male.  He hails from a nearby village, in a society or world that is rather primitive, and technologically backwards.  I recall the man being rather superstitious and/or fearful of certain taboos as well.  IIRC, one of his fears is the mountain or large hill he is currently hunting on - something about legends about the place or the like.  As it turns out, there is something more to the hill than first appears.  The man either stumbles upon, or is captured by, a group of people operating in a hidden base inside the hill.  I remember these people as being human like the protagonist, but much more advanced.  The protagonist may or may not be the first to be captured, but he comes the object of their intentions.  The man is physically augmented by his captors.  His muscle mass and density are chemically enhanced.  The vulnerable points of his body are protected with surgically-implanted plastic sheaths.   He is trained in all manner of combat skills.   The protagonist is also educated by the advanced humans, taught science and medicine and other disciplines.    When the physical and educational training is complete, the protagonist is tasked with carrying out a mission among his own people.  I cannot for the life of me remember what it is he was supposed to do, but it sticks in my mind it is a benevolent one.  The protagonist is released from the secret base and returns to his people.  It's possible the physical augmentation has made him unrecognizable as his former self, and may be initially seen as a stranger.   I do not recall much more of the story, except for the climax.  The protagonist is faced off against another man, who is (IIRC) both the local chieftain/ruler, and a former friend of the protagonists.  The two face off in a dueling circle, where the two must fight, and none are allowed to interfere.  The fight is not necessarily to the death, as best as I can recall.     In the course of the fight, the protagonist accidentally shatters the Adam's Apple of the chieftain, causing him to collapse and begin to choke to death.  The protagonist grabs a dagger and leaps on the fallen chieftain.  The other tribesmen, realizing the chieftain is doomed, and seeing the protagonist's actions as cruel and unnecessary, leap on the protagonist to stop him.  The protagonist is able to throw them off (several times) long enough to cut a hole in the chieftain's trachea.  He blows into it several times, in order to get the ruler breathing again.  The story closes with the very much alive chieftain, now with a breathing tube installed, thanking the protagonist for saving his life.  I do not recall what the protagonist does then (i.e. I don't know if he stays among his people, or if he returns to the camp with the advanced humans).  Publication Timeframe  No idea really when it was published.  I read it in the 1980s, so no later than that.  Possibly quite a bit earlier.


For which primes $p$ is $2^p+1$ divisible by $p$?  I am not quite sure how to approach this.

For which primes $p$ is $2^p+1$ divisible by $p$?  What I have been doing is:  $2^p+1\equiv 0\pmod p$  $2^p\equiv -1\pmod p$  Then by Fermat's Theorem, we get  $2^p\equiv 2\pmod p$  This shows $p=1,3$.  I feel like this is not right though...