Suppose I have the following function $e : \mathbb{N} \times \mathbb{N} \to \mathbb{N}_1$, where $\mathbb{N}_1$ is the set of natural numbers starting from 1 instead of 0:  $$e(m,n) = 2^m (2n+1)\ \ \ \forall m,n \in \mathbb{N}$$  I want to show that the map $e$ is bijective.  So I have to show it is both injective and surjective. To show that it's injective, here are my thoughts:   Show for all $m,n$, we have $2^m$ and $2n+1$ being strictly increasing, and so the function is also a strictly increasing one. Since it is strictly increase, there can only be a one-to-one input to output mapping, and so the function is injective trivially.   Now surjection will be harder to prove.  My thoughts are:   This problem has actually 2 arguments instead of the standard 1 argument function, so I suppose I would need to prove individually for each $m$ and $n$. Since they are natural numbers, induction come into mind. I should try to prove that for $\forall m$, starting from $e(0,n)$ and proving the inductive hypothesis, that $2^m$ is surjective. (is this true? A brief idea of Cantor's diagonalization argument makes me think this might be false). Then I try to prove for all $2n+1$ it is surjective. This can be done quite easily since if we keep $m$ constant, then the image $2n+1$ is essentially enumerable. In fact, can we use this argument to prove that $e(m,n)$ is enumerable for all $m$ we vary and $n$ is constant? Finally, having proven that for both cases where $m$ varies and $n$ is constant (and vice versa) they are injective, we can see that the resultant function is surjective as it is closed under multiplication. Is this the right way to define it?   That is the most reasonable shot I can give so far but I've no idea whether this is correct.  Note: the goal is to prove this without using the fundamental theorem of arithmetic.

Prove that the function ${2}^{n}\cdot(2m+1)-1$ from $\Bbb{N}\times\Bbb{N}\to\Bbb{N}$ is invertible  I know that a function to be invertible must be injective and surjective, I am not sure how to calculate this since in this case I need a pair $(x,y)$ since the function comes from ${\Bbb{N}}^{2}$.


I am a bit confused about how to display qualitative research findings in a UX research portfolio. I know that people spend like a minute on each project and I don't know how to quickly give them a sense of my findings without making it boring. I know images can be the best way to represent some findings but I don't want to entirely depend on them because sometimes images don't load due to internet issues.

I'm a beginning in a UX field and currently building up my portfolio. In portfolio projects how do I include the research element of the UX process when I have no money to spend on formal UX research?  My research background (in psychology) is a big part of my interest in UX and a significant portion of my resume so I feel like I should include a research element to my projects, but I'm not sure how. The only "users" I have access to is my friends and family, and this is obviously biased. Any advice or guidance is extremely appreciated, I'm completely at a loss and I have no idea how others have solved for this problem.


I want to create a collection of actions for specified class types. I was attempting something as follows.   Map<Class<?>, Function<String, ?>> mapper = new HashMap<>();   I end up populating this as   mapper.add(MyClass.class, s -> someMethod(s));   and the usage then looks like  mapper.get(MyClass.class).apply("someString");    This is all good, But I also want to force the return type of Function to match the key for the mapper. That is have the mapper defined as   Map<Class<T>, Function<String, T>> mapper = new HashMap<>();   The objective is that mapper should only be populated with functions which return an object of the type specified by the key. In effect, I want to make sure that   mapper.get(MyClass.class).apply("someString");   returns an object of the type MyClass. However using the T instead of the wildcard does not appear to work. I get a compiler error. Is this even possible in Java or I am kidding myself and should stick to the wild card approach?

Is there a way in Java to have a map where the type parameter of a value is tied to the type parameter of a key? What I want to write is something like the following:  public class Foo {     // This declaration won't compile - what should it be?     private static Map<Class<T>, T> defaultValues;      // These two methods are just fine     public static <T> void setDefaultValue(Class<T> clazz, T value) {         defaultValues.put(clazz, value);     }      public static <T> T getDefaultValue(Class<T> clazz) {         return defaultValues.get(clazz);     } }   That is, I can store any default value against a Class object, provided the value's type matches that of the Class object. I don't see why this shouldn't be allowed since I can ensure when setting/getting values that the types are correct.  EDIT: Thanks to cletus for his answer. I don't actually need the type parameters on the map itself since I can ensure consistency in the methods which get/set values, even if it means using some slightly ugly casts.


this is my first post in this community and I am not entirely sure if it is appropriate. I am not an educated physicist, just an ethusiastic person trying to understand the universe. So I apologise if this is not the right place or form to ask this question, if so, I would appreciate directions. As far as I come to understand, it is clear that space itself expands, meaning that the distance between i.e. our Sun and other stars grows larger while this objects themselves do not move (that much) through spacetime. Now what I dont understand: If this is happening, why does the space between all things that exist not expand at the same rate, so that I, as an observer, would not be able to noice it at all? Let me try to picture it: The space between Sun and Alpha Centauri expands, fine. What is about the space between me and my desk? Between the molecules / atoms / smallest parts of matter that my body and my eyes are made of and so on? Why do Earth, Sun and Alpha Centauri not grow with the same rate as the space between them grows, so that in the end the effect would even itself out to the eyes of an observer? Or is there a force that keeps me and my desk at the same distance, woking against the force of expanding space? If so, what force is that? This is the best that I can do to explain my question, I hope it is understandable enough. I really hope someone can help me understanding this, because it really gives me a headache.

I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for.  So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object.  If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it.  I have a few potential answers for this, which raise their own problems:   Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me.


I've been doing a bit of study in number theory and modulo operations to prove certain things. This one in particular is a question I came across recently:  $$\text{Find the largest and smallest positive values of n for which} (n^{300}+100)\text{is divisible by} (n+10)$$  This is what I was able to come up with:  Take $d=n+10 \rightarrow n=d-10$  $\begin{align} n^{300}+100 &= (d-10)^{300} \\  &\equiv 10^{300}+100 \quad \bmod d \end{align}$  $\begin{align} 10^{300}+100 &= 10^2(10^{298}+1) \\ &= 100(100^{149}+1) \\ &= 100((101-1)^{149}+1) \end{align}$  So from 100 the smallest factor one can produce from d is 1, but that would lead to a negative value for n($-9$) which should probably also work but still.  The next one thus is 10 which gives $n=0$, something that could've been guessed from the beginning when you think about it. But I'm not entirely sure if 0 would be counted as a positive integer so I'd go for $20 \implies n=10$ and from the expression in brackets the $\bmod 101$ from both are -1 and 1 respectively so they cancel out. Thus the expression is divisible by 101.  The greatest factor you can produce then should be the greatest from $100$ and $100^{149}+1$ which is $101 \cdot 100 = 10100$  $n=10100-10=10090$  Am I right or can you still get a bigger factor? Or is my logic flawed at any step?

What is the largest positive $n$ for which $n^3+100$ is divisible by $n+10$  I tried to factorize $n^3+100$, but $100$ is not a perfect cube. I wish it were $1000$.


As the title states, why is this? The original sequence is $b_n=\frac{2+\sqrt[]{2}+\sqrt[3]{2}+\cdots +\sqrt[n]{2}}{n}$, however:  $$b_n=\frac{2+\sqrt[]{2}+\sqrt[3]{2}+\cdots+ \sqrt[n]{2}}{n}=\frac{\sum_{1}^{n} 2^{1/i}}{n}\Rightarrow \lim_{n\rightarrow \infty } b_n=\lim_{n\rightarrow \infty } \frac{\sum_{1}^{n} 2^{1/i}}{n}$$ I would assume $\sum_{1}^{n} 2^{1/i}$ to converge to an $a$, as $lim_{n\rightarrow \infty }\sqrt[n]{2}=1$, so that $\lim_{n\rightarrow \infty } \frac{a}{n}$ would go to 0, however, the result is 1, why is that? And, how could I properly evaluate this expression?

I have this problem I'm working on. Hints are much appreciated (I don't want complete proof):  In a normed vector space, if $ x_n \longrightarrow x $ then  $ z_n = \frac{x_1 + \dots +x_n}{n} \longrightarrow x $   I've been trying adding and subtracting inside the norm... but I don't seem to get anywhere.  Thanks!


I've been thinking a lot about this problem, but couldn't come up with an answer.  Any help would be appreciated!

Show that if $p$ is an odd prime coprime to $7$, then $\left( \frac{7}{p} \right) = 1$ if and only if $p \equiv \pm 1, \pm 3,$ or $\pm 9 \pmod{28}$. HINT: If $p$ is an odd prime, determine which values can $p$ take $\mod28$, and consider each of these values in turn. Note that if we know $p \mod 28$ then we know  $p \mod 4$, and hence we know whether $\frac{p-1}{2}$ is odd or even.   Here, $\left( \frac{a}{b} \right)$ is the Legendre symbol.   The bit I don't understand in the hint is, what do they mean by consider the values that $p$ can take $\mod 28$. Do they mean the values that would make $p$ a quadratic residue $\mod 28$, i.e all the $x$ values satisfying $x^2 \equiv \mod 28$, because then isn't this just $1,4,9,16,25$?  What do they mean the to "consider each of these values in turn"?


I was experimenting with the formula for length contraction, when I realized that anything traveling at the speed of light shrinks out of existence. This is the formula for length contraction: $$T=T'\sqrt{1-\frac{v^2}{c^2}}$$ Where $T$ is the observed length and $T'$ is the proper length. When the speed of light, $c$, is plugged in for $v$, then the formula simplifies to this: $$T=T'\sqrt{1-1}$$ Which further simplifies to this: $$T=T'(0)$$ Therefore, anything traveling at the speed of light will not be seen, regardless of actual length. So, wouldn't we not be able to see any particle traveling at the speed of light?

Is the Lorentz transform applicable to speeds that are lower than light only?Because I'm trying to calculate length contraction of objects moving at speed $c$ (not near it) and it turns always 0. Is my calculation correct?Please help I'm just a beginner  Suppose a 5 m object is traveling at $c$,so $$        x'=x/γ$$  \begin{align} x&=x'\sqrt{(1- (v^2)⁄(c^2)}\\ x&=5\sqrt{1-1}\\ x&=5\sqrt0\\ x&=0 \end{align} Not infinite right? If so then the rule will have no length?


\documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class \usepackage{amsmath}  \begin{document} \abovedisplayskip=0pt\relax% remove this line in  your production \begin{gather*} \int \sec^2(5 - 3x/4)\,\mathrm{d}x\\ \int \frac{1}{\cos^2 (5 - 3x/4)}\,\mathrm{d}x \end{gather*} \end{document}     How to remove the white space on the left of gather* when using standalone class?

\documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \begin{gather*} 6x^2-30x+36=0\\ 6(x^2-5x+6)=0\\ 6(x-2)(x-3)=0\\ x-2=0 \quad \text{or} \quad x-3=0\\ x=2 \quad \text{or} \quad x=3 \end{gather*} \end{document}   Is it ?


I want to remove the wp- prefix from the wp-admin folder. I don't want to use a plugin, this because I want to code myself this wordpress hack.  My question is, what files I need to edit after I've renamed the wp-admin folder? Is there any list out there that I can consult to know how many files are affected if the wp- prefix is removed from wordpress files and folders?  UPDATE:   I've reached the scope,  is a working draft from github.

Is it possible to rename the wp-admin folder?  I know I could just rename it, but unless it's supported by the code lots of things would break.  If I use a custom folder name, it will make it slightly more secure, security by obscurity and all that.


I have installed an Ubuntu server on a VMWare workstation with a space of 20GB storage as seen below:    After the installation I've attached another 40GB worth storage to the existing Ubuntu server installation (seen below):    Now I want to add this 40GB to my / (root) directory or to /var/ directory but my df -h result shows;  root@Userver:~# df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda1        18G  900M   16G   6% / udev            990M  4.0K  990M   1% /dev tmpfs           400M  308K  399M   1% /run none            5.0M     0  5.0M   0% /run/lock none            999M     0  999M   0% /run/shm none            100M     0  100M   0% /run/user root@Userver:~#   What should I do now? Further, I have only ssh access to the server.   some one told me to do :  sudo mkfs.ext4 /dev/sdb -I   and when i do this command :  root@Userver:~# ls /dev/sd* /dev/sda  /dev/sda1  /dev/sda2  /dev/sda5   if you look carefully you , you don't see  "sdb" or "sdb1"  Next , i'm restart Ubuntu-server and after restart there was a "sdb" on "/dev/"  like this :  root@Userver:~# ls /dev/sd* /dev/sda  /dev/sda1  /dev/sda2  /dev/sda5  /dev/sdb   now when i do this command :  root@Userver:~# mkfs.ext4 /dev/sdb -I mkfs.ext4: option requires an argument -- 'I' Usage: mkfs.ext4 [-c|-l filename] [-b block-size] [-C cluster-size]         [-i bytes-per-inode] [-I inode-size] [-J journal-options]         [-G flex-group-size] [-N number-of-inodes]         [-m reserved-blocks-percentage] [-o creator-os]         [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]         [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]         [-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]   ,,,,,,,,,  please help me, i want to add the 40G hard to ubuntu 12.04, and mount it to "/var/www/"  but i cant do that  i use some how to's and i get this error's :  root@Userver:~# mount /dev/sdb1 /var/www/ mount: mount point /var/www/ does not exist   i dont know what should i do

I have installed an Ubuntu server on a VMWare workstation with a space of 20GB storage as seen below;    After the installation I've attached another 40GB worth storage to the existing Ubuntu server installation (seen below);    Now I want to add this 40GB to my / (root) directory or to /var/ directory but my df -h result shows;  root@Userver:~# df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda1        18G  900M   16G   6% / udev            990M  4.0K  990M   1% /dev tmpfs           400M  308K  399M   1% /run none            5.0M     0  5.0M   0% /run/lock none            999M     0  999M   0% /run/shm none            100M     0  100M   0% /run/user root@Userver:~#   What should I do now? Further, I have only ssh access to the server.


I just got a new computer today, its an inspiron 3542, which runs on windows 8.1 and a 64-bit OS. After which i download texstudio to edit some documents, everything works fine until i try to build and compile. When i press compile / build & view nothing updates at all, the document remains the same. But i do notice that on the bottom right there is a message that reads:  Failed to find "C:\Users\ -----\AppData\Local\Temp\texstudio_Zy5708.pdf"; perhaps it has been deleted  I had the same problem on another computer after i downloaded it, which also had a 64 bit OS and ran on windows 8.1  I am pretty new to this latex thing, therefore im not exactly the greatest at understanding it in complex terms. So please try to answer in a way that is understandable if at all possible.   Thank you in advance

I just downloaded and installed Texmaker. I've never used any (La)TeX before.  When I click the Run button with an arrow next to "Quick build" I get an error saying "Could not start the command". Why? What do I need to do?


I am on ArcDesktop 10.3 and wondering if there is a way to change the default rounding decimals and alignment numbers for all columns across all attribute tables?  ie. a global default?  In the image above it is the two circled values I would like to change the default of so they always come up 1 decimal place and 0 Alignment spaces  The problem happens when links to the data-driven FC are broken and subsequently the link to the joined table breaks, and I have to break these links frequently as I point the MXD to different geodatabases.  After I re-path things the rounding and alignment values default back to 6 and 12.  I did find a workaround where I can save a layer file of the data-driving feature class linked to the joined spreadsheet, then make sure other MXD's are closed and add that layer file to a new MXD it does come in with the table joined and the decimal/alignment settings retained, but it would be nice if I could just know that the numbers would default to this behaviour.

Anyone who has worked with numbers that have more than 14 digits has run into ArcMap's wonderful habit of converting any number of such length to e-notation. While changing this is a simple matter of going into the Field Properties and setting the number format, doing this repeatedly for every field in every table grows tiresome. Is there some secret environment setting or method to make number formats default to something besides "Numeric"?


I just stumbled on the  on SO. I think it is just a typo and thus it should be deleted.

During the re-tagging of questions, tags sometimes become orphaned from existing questions.  Are these zombie tags ever removed from the ?  What if a tag is misspelled and needs to be removed? How do we get rid of it?


Everytime I touch the screen, even in a non text entry area, this keyboard pops out.  How can I disable it?  It is very jarring

I'm in 17.10. Whenever I touch the screen, whether to change windows/apps, scroll within a browser, or press a button, the stupid little keyboard pops up in the bottom left corner.  I have never left Screen Keyboard enabled in Universal Access, but if I toggle it on, that's the same keyboard popping up in the bottom left corner.    In this screenshot, I'm simply touching the screen in a full-screen youtube video. You can see the menu pop up on the right, under the point where I'm touching.  I don't have a before pic, but it was similar look/color keyboard, but it was smaller, maybe half as wide, and only in the bottom left section of the screen, as opposed to stretching across the entire width. This change from little left-hand keyboard to full-width keyboard happened after following @pomsky 's advice below.    This is a . You can mark yourself affected by it to hopefully increase its received attention.


I want to build a health bar which show's the energy of the player.I have two buttons "PLAY" and "IDLE" to show the animation.when I click on the "PLAY" button the character start running along with that the health bar should decreases it's energy.Here is the code written for the two button clicks  void OnGUI() {             if (GUI.Button (new Rect (100, 200, 50, 50), "PlAY")) {                     animation.Play ("run");             }     if (GUI.Button (new Rect (100, 500, 50, 50), "IDLE")) {         animation.Play ("idle");     }     }   Now I need to create a health bar to show the decreasing of energy when the player starts its animation.Could you please help me in coding out creating energy bar.    Done the code for creating the progress bar,but the bar is not getting decremented.Here is the code  private float loadBarProgress = 0.0f; private const float loadBarSpeed = 0.25f; public Texture loadBarTexture = null; void OnGUI() {     //Draw loading bar with offset texture coordinates     GUI.DrawTextureWithTexCoords(new Rect(Screen.width * 0.4f, Screen.height * 0.4f, Screen.width * 0.2f, Screen.height * 0.1f), loadBarTexture, new Rect(loadBarProgress, 0.0f, 1.0f, 1.0f), false); } // Use this for initialization void Start () {  }  // Update is called once per frame void Update () {     //Move the bar along; keep it's position between zero and one for best float point precision     loadBarProgress += Time.deltaTime * loadBarSpeed;     if (loadBarProgress >= 1.0f) loadBarProgress -= 1.0f; }

I want to display a debug message when the progress bar is loaded fully and I have a button "refresh", when I click this it should reload the progress bar. Here is the code I have tried:  var energyBar : GUIStyle ; var bgImage : Texture2D; // background image that is 256 x 32 var fgImage : Texture2D; // foreground image that is 256 x 32 static var playerEnergy = 1.0; // a float between 0.0 and 1.0  function Start() { }  function Update() {     playerEnergy=Time.time *0.02;     if(playerEnergy<=0)     {         Debug.Log("stopped working");     } }  function OnGUI () {     // Create one Group to contain both images , the first two numbers define the on    screen placement     GUI.BeginGroup (Rect (10,10,256,32));      // Draw the background image     GUI.Box (Rect (0,0,256,32), bgImage, energyBar);      // Create a second Group which will be clipped     // We want to clip the image and not scale it, which is why we need the second Group      GUI.BeginGroup (Rect (0,0,playerEnergy * 256, 32));       // Draw the foreground image      GUI.Box (Rect (0,0,256,32), fgImage, energyBar);       if(GUI.Button(new Rect(100,200,60,30),"Refresh"))      {          // code to Restart the progress bar      }      // End both Groups     GUI.EndGroup ();     GUI.EndGroup (); }   From the above code I am able to display the progress bar, but the problem is that the "refresh" button is not getting displayed and I need help in reloading the progress bar when refresh button is clicked. I also need to print the debug message when the progress bar is fully loaded, but here the debug message is getting displayed when the progress bar starts loading. Can anybody please help me out.  Here I have attached the texture also


My question is not about your right to use a title or gender identification (or lack thereof) — it's a right you already have. My question is purely about the necessity to do so within the scope of the SE sites, especially the technical ones like StackOverflow. So no offence meant.  Why should users be forced to consider titles or gender — or even use them — when discussing a topic that has nothing to do with either? I have never seen a technical question (programming, math, etc.) where the title/gender/gender identification of the person asking, or that of the person answering, the question played any role whatsoever. Is it not enough to require users to show each other the basic respect that every human being deserves and block/suspend/remove those who refuse to do so?  Yes, I understand that it's important for some (not even all) of the questions on sites like The Workplace but does it really matter on StackOverflow? Any introductions that state the name of the person asking the question already gets edited out so why does my title/gender/gender identification matter more than my name? Do I not also have the right to be called by my name then? Is your editing out "Hello, my name is Isak" from my question disrespectful? Should you be allowed to remove part of my identity from my question? Or does it even play a role when the goal of the site is to ask and answer questions that have nothing to do with your name/title/gender/gender identification?  I believe that every human being is deserving of the same amount of respect and that respect can not be forced by silly 'call them by their title' rules. A respectful environment is build when users refusing to be respectful are blocked/suspended/removed and the rest are left to show respect in their own way. Forcing naming conventions creates a more politically correct environment but that has nothing to do with respect.  In my opinion the FAQ on gender pronouns should be more like:     We understand that people identify by different gender pronouns and   respect your right to do so. However, unless it is relevant to your   question we ask you to word your question in a gender neutral form.      We also ask users to not address other users by a gender   pronoun that they have not identified with on a SE site. Even if they   have identified with a specific gender pronoun we understand that you   still have to right to refer to them in a neutral way (not use their   specified pronoun), as long as it does not force a gender pronoun on them that they have not identified with and is done in a respectful way.   In my opinion the less rules you have and try to enforce the more authentic the community is. Then when someone does use your preferred gender pronoun to refer to you, you know that it's out of respect and not because they are afraid of breaking the rules.  What I love about the SE network is that you can ask questions and get honest feedback. To me it has never had anything to do with gender and I believe that for sites like StackOverflow gender doesn't matter at all. I want a place where I can ask a question about programming and get an answer about programming, nothing more. I want it to be as simple as possible because StackOverflow (and the SE network) is a tool that I use to get help and help others and when that tool becomes too cumbersome and cluttered by rules I will find another one.

Reading a bit about recent Monica Cellio related posts, I am afraid that I may be using a language that is a lot like English, but might not be the Stack-Exchange-approved version of English. For example, my English has had a certain gender-neutral pronoun in living use for centuries. That pronoun is used throughout the literature written in this version of English. It is used in the English I was taught as a grammar school student and later as a graduate student working on a master's thesis. I believe that this English is good enough to communicate about topics relevant to the various Stack Exchange sites.  The last thing I want from Stack Exchange is to be booted out because I slip up and accidentally use the language that has served me so well for a lifetime.  The topics discussed on Stack Overflow (I almost referred to it as a "sister site;" would that have been allowed? "mother site?" Good thing I didn't?) are often centered on languages which have formal descriptions.  Where is the formal description of the language that is to be used on Stack Exchange?     Strive not with a man without cause, if he have done thee no harm.      He shall die without instruction; and in the greatness of his folly he shall go astray.


Minmal working example:  #include <iostream>  struct Printer {     template<class T>     static void print(T elem) {         std::cout << elem << std::endl;     } };  template<class printer_t> struct Main {     template<class T>     void print(T elem) {         // In this case, the compiler could guess T from the context         // But in my case, assume that I need to specify T.         printer_t::print<T>(elem);     } };  int main() {     Main<Printer> m;     m.print(3);     m.print('x');     return 0; }   My compiler (g++) gives me the error "expected primary-expression before ‘>’ token". What's wrong and how to fix it?  C++11 accepted.

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


I have 101 reputation on AskUbuntu (1 initial plus 100 bonus as I've reached 200 on StackOverflow). I wanted to add answer for  question, it requires 10 reputation minimum on that site as stated on that page below answers. But I couldn't post my answer.  Is it a bug? Or do I need 10 non-bonus reputation on that site? Or am I missing something that caused such a restriction for me?

I have association bonus on superuser.com. After that I've started a bounty worst of 50 rep and earned more than 10 rep. Now I have 89 rep (38 of which is earned at superuser which is more than 10) but still not able to answer protected questions.  So, currently new user with 10 rep can answer protected question and I with 89 (38) rep can't.   How does it work now: after registration on new Stack Exchange site you get 101 rep Association Bonus and are able to answer protected questions only when you have 111+ rep on that site. How should it work: after registration on new stackexchange site you get 101 rep Association Bonus and are able to answer protected questions only when you have earned 10+ rep on that site.


Determine all the permutations $\sigma \in S_5$ that commute with the permutation $\alpha = (1 \space 2)(3 \space 4 \space 5).$

This is a homework problem and I'm having trouble just getting a basic understanding.  I understand that $S_6$ is a symmetric group of degree $6$.  I'm not sure how to start looking for elements.


Imagine situation  int? customerId = null; // works fine int? customerId = 5; // also fine int? customerId = someCondition ? 5 : null; // There is no implicit conversion between int and null int? customerId = someCondition ? 5 : (int?)null; // now is ok   How is this possible? Is it the language specification? For me the obvious would be implicit conversion. What do you think?

I am curious as to why an implicit cast fails in...  int? someValue = SomeCondition ? ResultOfSomeCalc() : null;   and why I have to perform an explicit cast instead  int? someValue = SomeCondition ? ResultofSomeCalc() : (int?)null;   It seems to me that the compiler has all the information it need to make an implicit casting decision, no?


I was attempting to create a bash script to run a backup of my Raspberry Pi to my Box account via FTP. Most of it works, but for some reason it won't convert variables to the text they stand for. When I run this script:  #!/bin/bash  FILENAME=backup-$(date +%Y-%m-%d).tar.gz  tar -czvf /tmp/$FILENAME /home/pi/  lftp -c 'open -e "set ftps:initial-prot ""; \    set ftp:ssl-force true; \    set ftp:ssl-protect-data true; \    put /tmp/$FILENAME; " \    -u "USERNAME", "PASSWORD" \    ftps://ftp.box.com:990/Automation/RPI/Backups   It creates the archive and connects to the server fine, but it gives me this error:  put: /tmp/$FILENAME: No such file or directory   I have tried replacing $FILENAME with "backup-$(date +%Y-%m-%d).tar.gz", but that still returns  put: /home/pi/+%Y-%m-%d).tar.gz: No such file or directory   and using "backup*.tar.gz" returns similar. I can only get it to work if I use the specific file name in place of any variables or wildcards, but this doesn't work for me since I want to set up a cron job to back up automatically.  So, does anybody know how to get around this, or a better alternative? Thanks!

I used to use '' and "" (single and double-quotes) interchangeably on the command line, but I recently noticed that '$HOME/some/dir' is not expanded, while "$HOME/some/dir" is. I searched around a little bit and found that "" allows some protection of special characters, while '' allows full protection. So what other characters are protected by '' and not ""?  EDIT: What are practical situations in which these differences might be significant?


I have a program that will read the contents of a file into some sort of list or array.  This list/array could contain any number of items.  I need to split it into smaller groups, say of 50 items each and then do some processing on each item in each group.  List<string> stuffFromFile = new List<string>();  while ((line = fileReader.ReadLine()) != null)       {            stuffFromFile.Add(line);       }   I have been looking through some examples online about how to chunk stuff but to be honest, I don't really understand the examples and some of them seem overly complex.  I just need something simple that will chunk/split/break the original list of items into groups of 50 and then let me iterate through each item in each group until the processing is complete.  The total number of items read in will most likely not be a number that I can divide evenly by 50 so most likely the last group may contain less than 50 items, but would still need to be processed just like the rest.  Can anyone help here?  It sounds like it should be simple but I don't really know how to do it.  I've seen example about using LINQ but I don't understand it either.

Is there a nice way to split a collection into n parts with LINQ? Not necessarily evenly of course.  That is, I want to divide the collection into sub-collections, which each contains a subset of the elements, where the last collection can be ragged.


$$\sum^{∞}_{n = 1} \frac{1}{(2n + 1)(2n - 1)}$$ This series does not look like a power series, and I also tried using partial fraction integration which did not work. I also can't think of a known function that has similar terms. Is there another method for finding the sum of a series?

Show that $$\frac{1}{1 \cdot 3} + \frac{1}{3 \cdot 5} + \frac{1}{5 \cdot 7} + \cdots = \frac{1}{2}.$$  I'm not exactly sure what to do here, it seems awfully similar to Zeno's paradox. If the series continues infinitely then each term is just going to get smaller and smaller.  Is this an example where I should be making a Riemann sum and then taking the limit which would end up being $1/2$?


I'm trying to add textures to an object through the materials/textures panels, but no matter what I do, it won't work.  Render viewport mode just gives me black. Texture and material viewport modes give the color of the material but not the texture. Cycles render, blender game, blender render, all useless.  Maximum Draw Type is already set to "textured" and nodes don't work. I've been searching for an answer for hours and nothing's worked.  EDIT: There is no option to add an "image texture" anywhere in the materials tab. Not that it matters, because even the pre-loaded textures don't appear.  Here is the file:    EDIT EDIT: I also do not get an option to "unwrap" and even before that, I get nothing but a black texture.    EDIT EDIT EDIT: I get the brick texture on the body but not the hair. Using an image also gets just plain gray, not the image as a texture. And when I switch to Blender Render it turns bright orange.

I am creating a model of a glass and I would like to put a drawing on it (a png picture).  I know how to do it using Blender Render, but not with Cycles Render. Help :)


I was doing a program in Python a little puzzle where the user only have to order the numbers, whatever in the program I create a list of lists. The main list it's empty, I create a method where the program fill the list with another 4 lists using a for with an enumerate and when the account comes every 4 times save the secondary list inside the main list and here comes where need someone explain me or if it's a bug. I clean the secondary list but the main list cleaning to and I don't know what's going on only when I create a new list works but with the other method doesn't. class Puzzle:          def __init__(self, array):         self.array = array         self.account = 0          def fillPuzzle(self):         """Method that fill the list of lists"""         # account = self.account         newlist = list()         for account, number in enumerate(range(1,17),start=1):             number = str(number) if number != 16 else 'X'             newlist.append(number)             if account in (4,8,12,16):                 self.array.append(newlist)                 newlist.clear()# here it's the problem, if i use newlist = list() works         return self.array     def showArray(self):         print(f"\nLista : {self.array}")  emptylist = list() newpuzzle = Puzzle(emptylist) #  newpuzzle.showArray() newpuzzle.fillPuzzle() newpuzzle.showArray()

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Recently  was closed as duplicate. However, the duplicate target isn't showing in the close banner. It shows:  This questions already exists: Closed 3 mins ago.   However,  are showing the target.

Obligatory: This is not a duplicate of , which is concerning the much older duplicate closure process.  Have a gander at . Notice anything weird?  The Community♦ user was invoked by the question asker to self-close as a duplicate (presumably of the comment below, which links to ), but the list of duplicates is entirely empty. So it would seem the question asker was able to close their own question as a duplicate of... nothing?  Screenshot, in case the post is altered later:    Any idea what happened here?


I'm looking to apply a size based graduated style a point layer based on numerical values in the attribute table. Bigger value, bigger point. Basic procedure. However. In the symbology tab when I go to select the graduated value, the field II am looking for is absent... the majority of the fields are not selectable, despite me being able to view them in the attribute table. Below are 2 images. The first shows the symbology tab showing that I can't access the other fields. The second shows the layer properties and all the fields that are in the file. Can anyone tell me why I can't select these fields for graduated symbology?

I m working on a project on QGIS. I have a point shapefile vector that represents my store. In the attribute table, i have bunch of data such as size, unit per transaction and most importantly store turnover. When I want to graduate the symbology, the turnover isn't present in the list I can choose from. Does someone know why, and how to fix it?


Is there any plugin for QGIS which would help me in exporting the map document as a geospatial PDF (similar to Terrago's GeoPDF)?

Since QGIS uses GDAL, does any map exported as a PDF become a Geospatial PDF? I am hoping to import maps from QGIS into the Avenza PDF Map app on my phone. Previous posts mentioned exporting as Geospatial PDF's and GeoTiff's, but none had an exact answer or process.


We are a bunch of newbies, have just completed our first campaign and are one evening into the second campaign. It is now that I noticed that despite playing role-playing games, almost no one is exactly role playing. Instead, we (including me) are all metagaming, and this seems more like a round of stratego or risk where everyone is in one team. We have talked about this and everyone wants to role-play, but we find it hard to stay in character.   What is the best way to get players to actually role-play their hero both in-game and outside the game? Or is this something that will solely come with experience?

I'm going to be hosting a game at the end of the month. Myself, I am a semi-experienced DM but I will be playing with those who know only the basic mechanics of the game or have never roleplayed before. The group will consist of my wife, myself and three friends. My friends don't really know my wife as well as I do, which makes me think things might be tricky if we're going to be playing a role playing game.   Is there anything I can do to provoke role playing in the PCs (Such as making loose rules about it)? How can you encourage improvisation and in-character actions for newbies?


I'm trying to count how many * symbols i have in my string. however im getting an error.      An unhandled exception of type 'System.ArgumentException' occurred in System.dll   I'm simply using a regex match to check it. When i tested with any other string it worked perfectly, but when i search for " * " it get's an exception.  Here's the code that gives expresion  string abc = "i am just trying *** for a sample code"; var count = Regex.Matches(abc, "*").Count; Console.Out.WriteLine(count);   This one works perfectly  string abc = "i am just trying  for a sample code"; var count = Regex.Matches(abc, "a").Count; Console.Out.WriteLine(count);   Any Idea why ?

I am doing something where I realised I wanted to count how many /s I could find in a string, and then it struck me, that there were several ways to do it, but couldn't decide on what the best (or easiest) was.  At the moment I'm going with something like:  string source = "/once/upon/a/time/"; int count = source.Length - source.Replace("/", "").Length;   But I don't like it at all, any takers?  I don't really want to dig out RegEx for this, do I?  I know my string is going to have the term I'm searching for, so you can assume that...  Of course for strings where length > 1,  string haystack = "/once/upon/a/time"; string needle = "/"; int needleCount = ( haystack.Length - haystack.Replace(needle,"").Length ) / needle.Length;


What exactly is  Common Language Runtime in Dot Net. Is it an exe or dll. Can I see common  language runtime in task manager. Where is it located.

I want to know what exactly is the difference between CLR & CLI? From whatever I have read so far, it seems to indicate that CLI is a subset of CLR. But isn't everything in the CLR mandatory? What exactly may be left out of CLR to create a CLI?


Original problem:  If $\alpha$ be the greatest positive root of $x^3-3x^2+1=0$, then show that $[\alpha^{1996}]$ is divisible by 17. ($[x]$ denotes the greatest integer less than or equal to $x$)  My work: It is easily found that if the roots are $\gamma < \beta <\alpha$, then $-1 < \gamma < 0 < \beta < 1$ and $2 < \alpha < 3$, and that they must be irrational. We also have, $\begin{align*} \alpha + \beta + \gamma &= 3 \\ \alpha\beta + \beta\gamma + \gamma\alpha &= 0 \\ \alpha\beta\gamma &= -1 \\ \alpha^2 + \beta^2 + \gamma^2 &= 9 \\ \alpha^4 + \beta^4 + \gamma^4 &= 81-12 = 69 \equiv 1 \pmod{17}\\ \end{align*}$ Now, we also note that $-\beta < \gamma < 0 < \beta < 0.9$, and using the inequality $(1+x)^r \leq e^{rx}$, we have that $0 < \beta^{1996} + \gamma^{1996} < 0.5$. From Newton's identities, we know that $\alpha^{1996} + \beta^{1996} + \gamma^{1996} \in \mathbb{Z}$. Hence, from the definition of the greatest integer function, $$[\alpha^{1996}] = \alpha^{1996} + \beta^{1996} + \gamma^{1996} = \left(\alpha^4\right)^{499} + \left(\beta^4\right)^{499} + \left(\gamma^4\right)^{499}$$ But we have that $\alpha^4 + \beta^4 + \gamma^4 \equiv 1 \pmod{17} \implies (\alpha^4 + \beta^4 + \gamma^4)^{499} \equiv 1 \pmod{17}$. To prove the required result, we must show that the rest of the terms of the expansion must sum to a multiple of 17. Although we know that the sum must be an integer, as the terms themselves are irrational, I can't think of any way to show this, or even if it is true or not. Any help or hint regarding this will be appreciated. I am also grateful to any hints on how to solve the original problem in any other easier way.

Let $\alpha,\beta,\gamma$ be the roots of $x^3-3x^2+1 = 0$. Prove that $$\alpha^n+\beta^n+\gamma^n \equiv 4^n+5^n+(-6)^n \pmod{17}$$ where $n$ is an integer.   It sort of makes sense why they are congruent since we can say $x^3-3x^2+1 \equiv (x-4)(x-5)(x+6) \pmod{17}$, but since $\alpha,\beta,\gamma$ aren't integers, how do we prove this?


I am using Ubuntu 12.04 LTS.  I want to know the following    How to find the latest version of Libre Office How to upgrade to the latest version

There was recently another release of , but it is  a pain to have to manually go to their website and download the packages every time there is a new release. Is there a PPA that always has the latest version of LibreOffice?


I am using using a custom .sty file which uses report document class. For List of Acronyms, I am using glossaries package. The space after the heading of List of Acronyms and the first acronyms is litter more then what is it for List of figure and tables. I want to reduce this to be the same as the space after LOF and LOT.

I'm using the glossaries package for producing of nomenclature/symbols/acronyms lists, but I don't know how to influence the vertical gap between the glossary title and the first glossary entry. Namely, a smaller gap is needed. I've found a dirty hack how to make it smaller using \begingroup .. \endgroup and \titlespacing*, but is it possible to affect this gap with some glossaries-in-built means? Even when defining a new style, I don't know what property/command is responsible for this space.  \documentclass[11pt,onecolumn,twoside,draft,titlepage,fleqn,a4paper,openright]{book}  \usepackage{titlesec} %----------------------------------------------------------------------- \usepackage{longtable} \usepackage{makeidx} \usepackage[nonumberlist, acronym, toc, section, shortcuts, nopostdot, nogroupskip]{glossaries} \renewcommand*{\arraystretch}{1.3}  % sets the line indent in glossaries \setlength{\glsdescwidth}{12.5cm}    \setlength\LTleft{0pt} \newglossary[slg]{symbols}{syi}{syg}{Nomenclature} \newglossary[ilg]{indices}{iyi}{iyg}{List of indices} \makeglossaries  \newacronym{ECD}{ECD}{equivalent circuit diagram} \newacronym{RES}{RES}{renewable energy source} \newglossaryentry{Rx1} {   name={\ensuremath{R_{x1}}},   description={Equivalent series resistance},   sort=Rx1, type=symbols } \newglossaryentry{ref} {   name={*},   description={Indicates reference value},   sort=ref, type=indices }  \begin{document} \begingroup \glsaddall                                 \titlespacing*{\section} {0pt}{0pt}{4pt} % dirty hack \printglossary[type=\acronymtype, style=long, title=List of Abbreviations and Acronyms] \vspace{40pt} % Another dirty hack \printglossary[type=symbols, style=long, title=Nomenclature] \vspace{40pt} % Another dirty hack \printglossary[type=indices, style=long, title=List of indices] \endgroup \end{document}


I just learned about sector velocity and how you can manipulate the equation to show that angular momentum $L$ is conserved by $L/2M$. I know that sector velocity is constant and therefore angular momentum is constant. I have made it that far but I still can't see why a constant angular momentum would explain the coplanar concept.

If I take r as the radial vector of the moving object and v as the velocity vector of the moving object in central force field.   Then r should be perpendicular to r×v . So that depicts that r.(r×v) = 0 . So how does this say that the particle is lying on a constant plane ?


Is it possible to check which application is requesting specific port in a debian server? I'm getting a ton of these in iptraf:     x x UDP (77 bytes) from 172.16.0.2:25748 to 212.59.1.1:53 on eth0   x x UDP (105 bytes) from 212.59.1.1:53 to 172.16.0.2:25748 on eth0   x x UDP (77 bytes) from 172.16.0.2:15956 to 212.59.1.1:53 on eth0   x x UDP (93 bytes) from 212.59.1.1:53 to 172.16.0.2:15956 on eth0   x x UDP (77 bytes) from 172.16.0.2:64869 to 212.59.1.1:53 on eth0   x x UDP (105 bytes) from 212.59.1.1:53 to 172.16.0.2:64869 on eth0   x x UDP (77 bytes) from 172.16.0.2:27489 to 212.59.1.1:53 on eth0   x x UDP (93 bytes) from 212.59.1.1:53 to 172.16.0.2:27489 on eth0   x x UDP (77 bytes) from 172.16.0.2:32834 to 212.59.1.1:53 on eth0   x x UDP (105 bytes) from 212.59.1.1:53 to 172.16.0.2:32834 on eth0   x x UDP (77 bytes) from 172.16.0.2:31633 to 212.59.1.1:53 on eth0   x x UDP (93 bytes) from 212.59.1.1:53 to 172.16.0.2:31633 on eth0   x x UDP (55 bytes) from 172.16.0.2:31892 to 212.59.1.1:53 on eth0   x x UDP (83 bytes) from 212.59.1.1:53 to 172.16.0.2:31892 on eth0   172.16.0.2 is the internal IP (using dummy package) of virtual machine inside xen (which I'm monitoring right now - this snippet is from 172.16.0.2 machine), 212.59.1.1 is my ISP DNS server.  Is it possible to see which application/PID is making these requests? Or is this a normal behaviour? Investigating this because I might be flooding myself by those request, even losing my network connectivity.

My machine is continously making udp dns traffic request. what i need to know is the PID of the process generating this traffic.  The normal way in TCP connection is to use netstat/lsof and get the process associated at the pid.  Is UDP the connection is stateles, so, when i call netastat/lsof I can see it only if the UDP socket is opened and it's sending traffic.  I have tried with lsof -i UDP and with nestat -anpue, but I can't find wich process is doing that request because i need to call lsof/netstat exactly when the udp traffic is sended, if i call lsof/netstat before/after the udp datagram is sended is impossible to view the opened UDP socket.  Call netstat/lsof exactly when 3/4 udp packet is sended is IMPOSSIBLE.  How I can identify the infamous process? I have already inspected the traffic to try to identify the sended PID from the content of the packet, but is not possible to identify it from the contect of the traffic.  Anyone can help me ?  I'm root on this machine FEDORA 12 Linux noise.company.lan 2.6.32.16-141.fc12.x86_64 #1 SMP Wed Jul 7 04:49:59 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux


Basically, I have a bunch of photos from a field data capture software that I am exporting into Arc. I need to create a map for these photo locations labeled in the the order the photos were take.    I will have to sort on the timestamp, add a field and then sequentially number the field based on the sort.    This is a map that will be created after each inspection is done, so I would like to automate the process as much as possible.

I am in ArcMap and I want to sort the records based on a field and then do a Calculate Field with an auto-incrementing value with the sort in-place. Any ideas?    It looks like I could get an update cursor on the feature class then do an auto-increment, but I would still like to see if there is a way to do this in the Field Calculator in ArcMap.


I need to prove that the following sequence is unbounded: $$ Z_n := \left(1+\frac{1}{n}\right)^{n^2} $$ for $n\in \mathbb N$.  I know that I essentially need to show that $\forall M \in\mathbb{R}$ there exists $z_N \in Z$ such that $M < z_N$, i.e., $$ M < \left(1+\frac{1}{N}\right)^{N^2}, N\in\mathbb{N}$$ But frankly, I'm lost as to how to prove that. I was able to prove that $(1+\frac{1}{n})^{n}$ was bounded above by say, 3, by using the fact that $$\left(1+\frac{1}{n}\right)^{n} = \sum_{k=0}^n\binom{n}{k}\frac{1}{n^k} = \sum_{k=0}^n\frac{1}{k!}(1)\left(1-\frac{1}{n}\right)\left(1-\frac{2}{n}\right)\dots\left(1-\frac{k-1}{n}\right)$$ and then showing that $$\sum_{k=0}^n\frac{1}{k!}(1)\left(1-\frac{1}{n}\right)\left(1-\frac{2}{n}\right)\dots\left(1-\frac{k-1}{n}\right) < \sum_{k=0}^n\frac{1}{2^k} < 3 \text{ (telescoping sum)}$$ But the same method does not work for the sequence $Z_n$. Any ideas? (Please have mercy) Thanks!

How can I compute the limit $\lim_{n\rightarrow\infty}\left(1+\frac{1}{n}\right)^{n^2}$? Of course $\lim_{n\rightarrow\infty}\left(1+\frac{1}{n}\right)^{n} = e$, and then $\left(1+\frac{1}{n}\right)^{n^2} = \left(\left(1+\frac{1}{n}\right)^n\right)^n$. Since the term inside converges to $e$, the whole thing is $e^n$, and can I conclude that the limit is infinity as $n\rightarrow\infty$?


Consider an electric circuit with a battery and a resistor connected through a wire of zero resistance. Since the wire offers no resistance, all points on the wire are at same potential, then why on earth does the electrons flow towards the resistor? And what if there was no resistor at all. Why would a potential difference arise in such a case? What would be the source of potential drop in this case?

So I started off with electrostatics and everything seemed nice and mathematical and justified and then "DC circuits" happened!  I just cannot understand the model of electron flow in electrical circuits.  Here are my specific doubts-:  1) If potential difference across a tiny cross section of conducting wire is zero, then why on earth does electron flow across that cross section at all? Never mind potential difference across the whole circuit.   2) Is there a constant electric field across a wire connected to a battery? If yes then how is potential difference across a zero resistance wire constant?   Shouldnt it be increasing?  Doesnt it violate ohms law?  If no,  then why do electrons flow at all?  Please take time to consider these doubts and relieve me of my frustration.  I havs searched through the net for this but every answer seems like beating around the bush.  All of the 4 books I have consulted do not address these facts to my satisfaction.   Frankly I think nobody understands this.


I'm writing a custom SSH server. Whenever I connect to it via ssh user@subdomain.example.com, I need to know the value of the subdomain.  Right now I can only get remote and local IP addresses.

I've grown quite fond of HTTP reverse proxies in our development environment and found the DNS based virtual host reverse proxy quite useful. Having only one port (and the standard one) open on the firewall makes it much easier for management.  I'd like to find something similar to do SSH connections but haven't had much luck. I'd prefer not to simply use SSH tunneling since that requires opening port ranges other than the standard. Is there anything out there that can do this?  Could HAProxy do this?


Always have we heard that there isn't a root of a negative number. That's why we call the root of -1 an imaginary number. But why, why do we need it and how even did they discover this case? I would want a good answer, not someone that says "we need it in engineering"(someone said me that). Thanks.

At school, I really struggled to understand the concept of imaginary numbers.  My teacher told us that an imaginary number is a number that has something to do with the square root of $-1$.  When I tried to calculate the square root of $-1$ on my calculator, it gave me an error.  To this day I still do not understand imaginary numbers.  It makes no sense to me at all.  Is there someone here who totally gets it and can explain it?  Why is the concept even useful?


i bought an hp laptop pavillon 15. the keyboard is an AZERTY keybord (image shown below) . The < and > key are normally positioned left the W key. But in this disposition are combined with ; and : keys. I can't figure out which combination can use.

Originally my keyboard is QWERTY , and greater than (>) and less than (<) symbols work well, but when I switch my language from english to french ( AZERTY) . I don't know where is the location of those keys. I will be thankful for your help. Regards!


When I open my URxvt I can see this:  [username@Lenovo ~]$ ...   however, I can see someone can edit it to make it look like:  username ~ $ ...   with username formatted with a color. Is there a way to do it?

Is there an easy way to change my Bash prompt to modify the colors and what text is displayed? I've heard that this is done in .bashrc, but I haven't found any nice, easy ways of modifying it. How are colors expressed in Bash?


im struggling to prove the following problem.   Let $A \subseteq \Bbb R$ be a non empty set, (multipication is for example $A\cdot B= \{a \cdot b\ |\ a \in A,\ b \in B\}$)  Show: If $A$ is bounded, then $A\cdot A$ is bounded too!  I know that from the completenes axiom the set A has an infimum and a supremum. what should I do next . I'm new to this material and i dont understand it to it's fullest.   pls help, thanks

Definition: Let $\varnothing$ $\neq$ $A,B$ be a subset of $\Bbb R$, then we define   $A \cdot B$ $:=$ $\lbrace$ $a\cdot b$ | $a \in A$ , $b \in B$ $\rbrace$     Let $\varnothing$ $\neq$ $A$ be a subset of $\Bbb R$.     Question: Prove or disprove the following statement: ''If $A$ is bounded, then $A \cdot A$ is bounded''.   Can someone help me with the proof?


I would like to show that $\frac{1}{2}\cdot\frac{3}{4}\cdots \frac{2n-1}{2n}\leq \frac{1}{\sqrt{3n+1}}$ holds for all natural numbers. I got stuck here:  $\frac{1}{2}\cdot\frac{3}{4}\cdots \frac{2n-1}{2n}\cdot\frac{2n+1}{2n+2}\leq \frac{1}{\sqrt{3n+1}}\frac{2n+1}{2n+2}.$  I would appreciate your help.


It's a two-wire light fixture without ground. When the switch is on I measure 120 volts between the hot and neutral in the ceiling fixture. If I switch it off I measure 50 volts. Why?

I am doing some work on a ceiling light and I notice that, even though the light-switch is off, my voltage tester shows voltage present.  Answers to other questions (below) explain about phantom voltages but how exactly do I test for these and know what voltages are real and what are phantom so that I can work safely?    Phantom voltage questions


I've read many times that a plethora of people have tried to prove Euclid's parallel postulate but to no avail. However, I do not know of any proof of how it cannot be proven. Is it because modifying it leads to different and consistent geometries and you can just state such a thing? How do you know your geometry is consistent?

Euclid's fifth postulate:     If a line segment intersects two straight lines forming two interior angles on the same side that sum to less than two right angles, then the two lines, if extended indefinitely, meet on that side on which the angles sum to less than two right angles.   Every example (that I've seen) of proving that the parallel postulate in Euclid's five postulates is independent of the others  seems to rely on the fact that one can invent a new kind of geometry where the first four postulates hold without the existence of the parallel postulate. Hyperbolic and elliptic  geometry are often used as examples. Is this the only known method or approach to prove the parallel postulate's independence?  Is discovering these curved geometries as counterexamples the only way?


I installed mysql workbench from Ubuntu Software Center and it was correctly installed , but when I opened it I saw this error:  TextBox_append_text_with_encoding() takes exactly 3 arguments (4 given)   then the server stopped.

My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.  This is the error I see when trying to install/reinstall it:  Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ... Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.7 (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server:  mysql-server depends on mysql-server-5.7; however:   Package mysql-server-5.7 is not configured yet.  dpkg: error processing package mysql-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                    Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing:  mysql-server-5.7  mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)   I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.  EDIT: Looks like I'm not the only one:


Can I use a header location in jQuery for redirection or refresh?  Like in PHP:  header('location:www.google.co.in'); header("Refresh:1,url=home.php");   If not, what is the alternative way?

How can I redirect the user from one page to another using jQuery or pure JavaScript?


How a string object can be validate whether it is a link or not? I don't want to open any connection or network operation I just to want to check the pattern of string is matching to the pattern of a link or not. e.g       let str1 = "https://stackoverflow.com/questions/ask" // It is a link     let str2 = "https://stackoverflow.com" // It is a link      // Could be other combinations as well of a valid link      let str3 = "this is not a link" // Not a link    How to do that? Is It possible to check with regular expression or any other way or not possible?

How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.


Let $S_3$ act on $\Re^3$ by the permutation matrices P(σ), where P(σ) permutes the basis vectors: $$P(σ)(e_i) = e_{σ(i)}$$  Show that, with this formula, $$\sigma(x_1,x_2,x_3) = P(\sigma)(x_1e_1 + x_2e_2  + x_3e_3) = (x_{\sigma^{-1}(1)}, x_{\sigma^{-1}(2)}, x_{\sigma^{-1}(3)} )$$  this is an action of $S_3$ on $\Re^3$.  It seems to me that this is not true, since the inverse of a product flips the order. Am I missing something?

Let the permutation group $S_3$ act on $\mathbb{R}^3$ by permuting the elements.   How can we show that this action can be written as  $\sigma (x_1, x_2, x_3) = ( x_{\sigma^{-1}(1)}, x_{\sigma^{-1}(2)}, x_{\sigma^{-1}(3)})$ for $\sigma \in S_3$, $(x_1, x_2, x_3) \in \mathbb{R}^3$.  For instance, if $\sigma = (123)$, we have $\sigma (x_1, x_2, x_3) = (123)(x_1, x_2, x_3) = (x_3, x_1, x_2)$.  Just looking at some examples, this seems so obvious, but I'm not sure how to go about showing it.


Which one of the below is more appropriate?  an investigation into sleep score, which indicates the quality of sleep, and life stress revealed significantly negative correlation between life stress and the quality of sleep  or  an investigation into sleep score indicating the quality of sleep and life stress significantly negative correlation between life stress and the quality of sleep  to make my question more specific, I want to make sure that sleep score only measures the quality of sleep not life stress...in other words it was an investigation into sleep score and life stress, and sleep score indicates the quality of sleep.

I saw a question today asking which one is correct, and the answer is (2) (1)  Literacy opened up entire realms of verifiable knowledge to ordinary men and women having been previously considered incapable of discerning truth for themselves.  (2)  Literacy opened up entire realms of verifiable knowledge to ordinary men and women who had previously been considered incapable of discerning truth for themselves.  Question: I originally thought both are ok because I remember adjective clauses involving participles, both "which had.." or "which have...", can be reduced to "having..." Am I wrong? Or there are other reasons that make (2) the answer?


When I connect to my server (ubuntu server 10.10), I get this:  name@server-name.belkin ~>   How can I remove ".belkin"?

I want to change the OS hostname but I do not want to restart.  I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this?


I am currently reading about fourth order Runge-Kutta methods, and I noticed that for first order the total error is a factor of $O(h^2)$, and for fourth order the error is in order of $O(h^5)$, where $h$ is the step size. I understand that fourth order Runge-Kutta methods are better than first order since the error rate for each step is smaller, which only makes sense if $h < 1$.   My question is why must the step size be smaller than $1$? I've tried setting $h$ to something bigger than $1$ in my simulation and it exploded, but I'm not sure if that's a result of the approximation not working for step sizes bigger than $1$, or maybe my other coefficients were too large. So is there a requirement for $h$ to be smaller than $1$, and if so, why?

The local truncation error of Runge-Kutta 4 is $O(h^5)$, while those of RK1 is $O(h^2)$.  I wonder then what happened when the step-size of RK methods is greater than 1: will the accuracy be improved if we choose RK1 instead of RK4?


This is from an example in Chapter 4 of Book of Proof by Richard Hammack. The thing is that I do not quite understand why it is been solved in this way, in my understanding it seems redundant or I am misunderstanding somethings. My approach here is to quote the text directly from Hammack followed from comments of how I think it should be approached (I could be wrong). I would greatly appreaciate if you could point me where I got it wrong The text reads as:  If $a,b,c \in \mathbb{N},$ then lcm (ca,cb) = c · lcm(a,b)   Proof. Assume a,b,c ∈ N. Let m = lcm(ca,cb) and n = c·lcm(a,b). We will show m = n. By definition, lcm(a, b) is a positive multiple of both a and b, so lcm(a,b)=ax=by for some x,y ∈ N.  Why he writes that lcm(a,b) is only a positive multiple of a & b instead of the smallest one?  From this we see that n=c·lcm(a,b) = cax = cby is a positive multiple of both ca and cb.  Again, Why he assumes "n" is only positive? The definition of lcm states clearly that it must be the smallest number, not any number.  But m = lcm(ca, cb) is the smallest positive multiple of both ca and cb. Thus m ≤ n.  Why not state here that m=n, since we know from the defintion of lcm(a,b) that we are referring to the same value? I mean m = lcm (ca,cb) is the same as n= c * lcm (a,b) since we know lcm(a,b)=ax=by is the smallest integer multiplied by c  On the other hand, as m = lcm(ca, cb) is a multiple of both ca and cb, we have m = cax = cby for some x, y ∈ Z.  Why not consider "m" as the smallest multiple again?  Then $1(/c)m$ = ax = by is a multiple of both a and b. Therefore lcm(a, b) ≤ $1(/c)m$, so c · lcm(a, b) ≤ m, that is, n ≤ m.  Why not state that they are the same, again?  We’ve shown m≤n and n≤m, so m=n. The proof is complete.  Was it necessary to do it in both hands side? In my perspective it could have done considering only half of Hammack's answer

I'm trying to prove that $(ma, mb) = $|$m$|$(a, b)$ , where $(ma, mb)$ is the greatest common divisor between $ma$ and $mb$. My thoughts: If $(ma, mb) = d$ , then $d$|$ma$ and $d$|$mb$ → $d$|$max + mby$ → $d$|$m(ax+by)$. This implies that $d$|$m$ or $d$|$(ax+by)$. This is the same as  $d$|$m$ or $d$|$a$ and $d$|$b$, so $d$|$m$ or $d$|$(a,b)$. This is the same as $d$|$m|$ or $d|(a,b)$, so $d$|$|m|(a,b)$. I don't know what to do.


Let $\omega = e^{(\frac{2\pi i}{n})}$ why $1+ \omega + \omega^{2} + ... + \omega^{n-1} = 0 $?  I saw this on a algebra PPT slice. However the teacher did not explain why this equation is correct, can somebody show me some clue?   Thank you for your honest help!

I'm being asked to prove that $$1 + \omega + \omega^2 + ... + \omega^{n-1} = 0$$ where $\omega \ne 1$ is an n-th root of unity, and I don't know where to start  I feel like there's something terribly obvious that I'm missing here.


What wrong here? I'm looking the simplest way to realise sequence nextval over true primary key ID, stored into the table  DECLARE smth NUMBER; LOOP    smth := (select gen_ns_ces_id.nextval from dual);    EXIT WHEN smth > (select MAX(ID_NS_WORK) from CES.NS_CES) END LOOP;      CREATE SEQUENCE  "CES"."GEN_NS_CES_ID"  MINVALUE 1 MAXVALUE   9999999999999999999999999999 INCREMENT BY 2 START WITH 1837 NOCACHE    NOORDER  NOCYCLE ;   ID    NAME 1845  JONNY ..    ....

In , I can do something like this:  ALTER SEQUENCE serial RESTART WITH 0;   Is there an Oracle equivalent?


Background Knowledge  Researching on light led me to wave-particle duality and its properties regarding photons. All the sources I have seen agree that the frequency of the wave nature defines how we perceive light. And the amount of photons (maybe particle nature, it's sort of unclear) defines the light's intensity or brightness. There is also little to no interactions between photons. But I've come across a conundrum of when photons interact.  Question  If I point two lasers that emits different frequencies with the same intensity at a single spot at the same time, what would be observed?  Edit: More specifically what happens to the photons when they intersect?  Constraints  When answering, keep in mind the following:   The photons are traveling in a vacuum between the source and the detector. The observation should describe the configuration of the photons, not the color representation, at the point of intersection.   (When I say the "configuration of the photons" I mean what happens to the wave and particle nature of the photons, like if interference occurs)

I want to arrange some red lasers along a 90 degree arc of a circle, aimed towards the center of the circle.  When their beams hit the opposite side of the circle, will I notice any interference effects?  What if I use dozens of lasers?    If they do interfere, how do I calculate the interference pattern?


I want to print array rows but with this code I just print last row. How can I print all rows? pq = [[0]*3] * 8 count = 5 M_ids = [3,5,7] for i in M_ids:     print(i)     random_q = randrange(0, count)     random_p = count - random_q     pq[i][0] = i     pq[i][1] = random_p     pq[i][2] = random_q     print('M', pq[i][0], ':', 'p=', pq[i][1], '| q=', pq[i][2]) print(pq)

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I have a problem with two updates for Windows 10 Preview - they are constantly failing. I want to skip them, but using new 'Windows Update' UI I have no idea where to find this option.  I'm using latest Windows 10 preview.  I just want to skip and hide two updates which are failing every time.  In Windows 8, I could click on any update and say "please don't install this one and don't bother me again with this update." I cannot find this option in Windows 10 Preview.

Starting with windows 8 I have many many many hardware issues (that are not present in Windows 7). One of these issues is the fact that an initiated restart does not work. It shuts down, the bios shows up, loads, then the windows boot loader begins loading and suddenly the progress ring halts and nothing happens anymore (I have tested it for several hours). While this is not really a problem usually (If a service attempts to initiate a restart I just pull the power after saving everything) with windows 10 it became a problem. A while ago obviously a new build was released and it tried to install said build. This is done using an initiated restart. The restart happens, it hangs in the boot loader and when I reset the machine I get the usual "Your windows has been reverted to an earlier version" message. So far so good. The problem is that since then every day this happens. It randomly asks me if I want to apply the update now, I obviously dont want it to, and set it to remind me again in 8 hours. I dont know what insane person had the idea that a forced shutdown that kills every living thing on your computer was the appropriate action for something as utterly unimportant as an update but sadly after these 8 hours it does exactly that.   After loosing a several gb download and a very long compilation has been corrupted I'm now ready to do everything to stop this madness. I first tried it the nice way and checked the update settings. Windows responds witht he following:   A note here: I am the system administrator, this is a home computer and I am on the only account there is. How do I get rid of this non-sense?   Next I tried to forcefully kill the entire update service. It seems it worked for regular updates, but the preview build update is something that is not covered by that. When I go to the settings for new build installations all I am able to change is the time new builds should be installed (if available). Is there a way to completely disable that?  So to summarize: Is there a way to prevent windows from performing any action if there are updates? Or disable updates completely? Making everything manual? In the end the updates have destroyed more on my computer than they have prevented.


I'm trying to solve the following question:  Prove: For every set of 2016 natural positive numbers there is a non-empty subset such that the sum of its elements is divisible by 2016.  It feels to me that this statement is valid for every natural number (other than 2016) and could be proven by the Pigeonhole Principle. I've tried to scale down the problem, but no luck.  Any suggestions?

Prove: Each set which consists of 2016 natural numbers contains a non-empty set that has a sum divisible by 2016  My attempt: Use the pigeonhole principle. Let $A$ be a set of 2016 natural numbers. I'll split the answer to two different possibilities:   $A$ contains at least one number which is divisible by 2016. In this case the claim is true. $A$ does not contain numbers that are divisible by 2016. In this case, we'll apply the pigeonhole principle.    Holes: $\{1,2,3,4,...,2016\}$, A set of all possible remainders when dividing a number (which is not divisible by 2016) by 2016. In total there are 2015 holes. Pigeons: 2016 numbers.   Each number will be divided by 2016 and put into the appropriate hole according to the that number's division remainder. By the pigeonhole principle, at least in one hole will be $\lceil \frac{2016}{2015} \rceil$. objects. In this case, the claim is also true.   Is my proof sufficient? Can I prove this not using 2 different possibilities, or maybe not using the pigeonhole principle?  Edit: As stated in the comments and in the answers, my proof is false. The proof shows that there exists at least 2 numbers in the set $A$ with a difference divisible by 2016. It does not prove that there is a non-empty set with a sum divisible by 2016.


Let $X$ be an infinite compact Hausdorff space and let $C(X)$ be the ring of real-valued continuous functions on $X$. Does $(0)$ have a primary decomposition in this ring?   I feel like the answer is no. My reasoning is as follows: suppose $(0)$ has a minimal primary decomposition $(0) = \bigcap^n_{i = 1} \mathfrak{q}_i$ with $r(\mathfrak{q}_i) = \mathfrak{p}_i$. Now every ideal in $C(X)$ is contained in a maximal ideal of the form $\mathfrak{m}_x$ consisting of the functions which vanish at $x$ (and all the maximal ideals have this form). It must also be the case that each $\mathfrak{q}_i$ is contained in a unique $\mathfrak{m}_i$ by the minimality of the primary decomposition (i.e. $\mathfrak{q}_i \not\supseteq \bigcap_{j \neq i} \mathfrak{q}_j$). Then all the $\mathfrak{q}_i$ intersect at $0$ only; therefore the $\mathfrak{q}_i$ are not unique and our decomposition is not minimal.  I am unsure of the step where I claim that each $\mathfrak{q}_i$ is contained in a unique $\mathfrak{m}_x$. I was thinking if that wasn't the case then we would have $\mathfrak{q}_i \supset \mathfrak{a}$ for some $\mathfrak{q}_i$ and thus $\mathfrak{q}_i \supseteq \bigcap_{i \neq j} \mathfrak{q}_j$, which contradicts the minimality of the prime decomposition.

An ideal $I$ of a commutative unital ring $R$ is called decomposable if it has a primary decomposition.     Can you give an example of an ideal that is not decomposable?    All the examples I can think of are decomposable. Thanks.


I am trying to create a shuffle play feature for a music streaming app and I'm trying to figure out the best way to create this.  I want to be able to shuffle through an array by selecting a random index but not selecting one that has already been selected. I can think of a few ways to do this but none seem very elegant. Has this problem been solved before? Is there a simple solution to this?   Thanks

I'd like to generate unique random numbers between 0 and 1000 that never repeat (i.e. 6 doesn't show up twice), but that doesn't resort to something like an O(N) search of previous values to do it. Is this possible?


I came across the following question and am wondering if there's a simple way to cook up a distribution achieving the Chebyshev lower bound:  Suppose $X$ has $\mu_X = \sigma^2_X = 9$. Define the lower bound for  $$\mathbb{P}[3 \leq X \leq 15]$$  Chebyshev tells us the answer is $\frac34$.  Can we come up with a specific distribution for $X$ that follows this?  More specifically, I'd prefer $X$ be discrete and restricted to take non-negative values.  A more general constructive proof would of course be more instructive!

I am interested in constructing random variables for which Markov or Chebyshev inequalities are tight.  A trivial example is the following random variable.   $P(X=1)=P(X=-1) = 0.5$. Its mean is zero, variance is 1 and $P(|X| \ge 1) = 1$. For this random variable chebyshev is tight (holds with equality).  $$P(|X|\ge 1) \le \frac{\text{Var}(X)}{1^2} = 1$$  Are there more interesting(non-uniform) random variables for which Markov and Chebyshev are tight ? Some examples would be great.


I want to change the color of the body whenever I scroll, if I use the jquery css() method, everything works but the thing is I want to put some delay on this effect so I need to animate instead but when I use the following code, the color is not animating, what am I missing?  $("body").animate({     backgroundColor: "white !important" });  // works well with $("body").css("background-color", "white");   I don't want to use css transitions.

I am trying to animate a change in backgroundColor using jQuery on mouseover.  I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js error. The element I am working with is a div.  $(".usercontent").mouseover(function() {     $(this).animate({ backgroundColor: "olive" }, "slow"); });   Any ideas?


Can anyone help me with the following question.   If $a_{n} \geq 0$ and $\sum a_{n}$ converges then how to prove $\sum \frac{\sqrt{a_{n}}}{n}$ converges.    Any idea where to start. My idea was to try using comparison test since $\sqrt{a_{n}} \leq a_{n}$ but it appears that it wouldn't work if $0 \leq a_{n} <1$.

Let $a_1,a_2,a_3,\ldots$ be reals. Prove that if $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$.   For this I have shown the case for when $ a_n^{2} \le\frac {|a_n|}{n}$ $\Rightarrow$ $ |a_n|\le\frac {1}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le \frac{1}{n^{2}}$ and we know that $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges and hence $\sum_{n=1}^{\infty}\frac {a_n}{n}$ converges by the comparison test. Now considering $ a_n^{2} \ge\frac {|a_n|}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le a_n^{2}$ $\rightarrow$ combining the two cases for any n we have: $\frac {|a_n|}{n}\le\frac{1}{n^{2}}+a_n^{2}$ Hence using the comparion test again we know that $\sum_{n=1}^{\infty} a_n^{2}$ converges and $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges hence the sum converges so we can conclude that $\sum_{n=1}^{\infty} \frac {a_n}{n}$ is absoluetly convergent $\Rightarrow$ convergent.  Not to sure if this is correct, any help would be much appreciated, many thanks.


I am trying to learn probability. Although I tried a few courses (Stat 110 Harvard for example), I felt the progression was fast and I kind of lost interest. However, I am dead-set on learning probability, right from the basics. Although I have some idea, I feel my absolute basics are not strong enough. Would the good people of Mathstackexchange suggest me a good book? I am looking for books that have a story approach, building an interest and not a book that gets into the brass stacks right away.   I did check the common names, like Sheldon M Ross and a couple more. I am not sure which one fits me.   Edit: I have completed a course on probability during my undergrad which covered probability, but it was more of a pass grade. I can solve mechanically but I do not under the basics and the whys.   Thanks!

Question is quite straight... I'm not very good in this subject but need to understand at a good level.


If I blink  with something like , does he come back and instantly die?

If I were to use a blink effect on a Planeswalker say after an ultimate (largest cost) Loyalty ability (and providing it still had Loyalty remaining), would its loyalty restore to the noted amount on the card?  From what I remember, if a card is exiled, unless stated otherwise, all counters are removed.  If this is so, when the planeswalker returns to the battlefield, would it then add the loyalty counters to match its noted amount back on the card?


I am trying to use AjaxForm to update data. On first call it works great and updates the html text in my  by id.                 On my fetching file I got this line:     And I got this on the functions file:      function ShowSlot($tid, $position_json) { ?><form action="fetch/add_entry.php" method="post" class="entry_form"><input type="hidden" name="tid" value="<?=$tid;?>" /><input type="hidden" name="position" value="<?=$position_json;?>" /></form><?php    }   Any idea why it works only on first refresh?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Is it possible to create my own Tags in Stack Overflow? If yes, how can I create tags, does it need a specified amount of reputation. I have seen the tag listings and in that screen creator for each tag, rename list etc is also shown.

Can someone please create the tag  on our site? We need to have it because        Foo is a recent/upcoming release / edition / model / episode of a popular, established OS / board game / bike brand / TV show   Foo is a hot new language / ingredient / game   we're currently using some other tag for questions about Foo, but it's causing ambiguity with a separate thing that's also named Foo      This is not a joke post. We get a lot of feature requests that ask for this or that tag to be created, and every time, a discussion ensues wherein people explain that there is no "tag creation department" and that community members create tags just by using them. I'm posting this "question" so that future requests of that type can be closed as a duplicate of this, saving time and eliminating redundant conversations for everyone involved.     See also:


As I said, Before I begin, this is not a duplicate of , so idk why it has been marked as a duplicate this is an entirely different question. What im talking about is what is the difference between DDR3 and GDDR5? I have a desktop PC, and I am looking to upgrade the ram from 4GB to 8GB. But as I have discovered GDDR5, im not sure which one is better.  Can someone help me with the difference? (Ports are PCIe like all desktops)

I am trying to buy a laptop, and I have seen in many place that they show GDDR3 and sometimes  DDR3. What is the difference between them?  afaik DDR3 is a type of RAM used for system memory, while GDDR3 is a type of RAM used for graphics cards. So does "G" only stand for Graphics or does it have another particular meaning?


Let's say that I make a 3D list  list = [[[0, 0], [0, 0]], [[0, 0], [0, 0]]]   and I run  list[0][0][0] = 1 #set the first element of the first list of the first list to 1  print(list)   I'd expect to get  [[[1, 0], [0, 0]], [[0, 0], [0, 0]]]   but instead, I get  [[[1, 0], [1, 0]], [[1, 0], [1, 0]]]   Can someone figure out how to make it assign a variable to ONLY ONE element of a 3D list, instead of every first element? Thanks!  If it matters, I'm using Python 3.7 32-bit.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I'm trying to connect to a remote MySQL database running on server1.com on localhost.  I've executed this on my client server:  ssh user@server1.com -L 3306:localhost:3306   And are trying to connect on my client server with:  mysql -h localhost -u mysql-user -p   But are getting:  Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)   Googling a bit tells me localhost forces the mysql client to setup a socket which I don't want to do.  Trying to use:  mysql -h 127.0.0.1 -u mysql-user -p   fails, because the remote server server1.com doesn't accepts connection to the mysql database via 127.0.0.1, only localhost.  What to do?  I've tried socket forwarding like:  ssh -L /tmp/mysql.sock:/var/lib/mysql/mysql.sock user@server1.com   but fails (on the remote server) with:  channel 2: open failed: administratively prohibited: open failed   I have checked that the local and remote server doesn't have AllowTCPForwarding and PermitOpen is not set.

Quick question - I run two linux boxes, one my own desktop and the other my VPS. For security reasons on the VPS end I opted for socket connections to MySQL (/var/run/mysqld/mysql.sock). I know I can tunnel like this: ssh -L 3307:127.0.0.1:3306 user@site.com if I set up the remote sql server to listen on some port, but what I want to know is can I do something like: ssh -L /path/to/myremotesqlserver.sock:/var/run/mysqld/mysql.sock thereby tunnelling two sockets, as opposed to two ports?  A perfectly acceptable solution would also be to forward a local port to the remote socket file, but where possible I'm trying not to have tcp servers running on the remote box.  (and yes, I know tcp would be easier).


Can anybody show me the way of proving it without induction.My textbook showed the way but it was unclear for me.It used the statements such as $(n+1)a^n < b^n +b^{n-1}a.....+a^n < (n+1)b^n$             I don't know how they come to this statement I know it's a duplicate question but the type of answer I am searching for should be derived from above statement so that I could understand how author intended to prove

How could we prove that this inequality holds      $$ \left(1+\frac{1}{n+1}\right)^{n+1} \gt \left(1+\frac{1}{n} \right)^{n} $$   where $n \in \mathbb{N}$, I think we could use the AM-GM inequality for this but not getting how?


I have tried some solutions from other questions, but they did not work well. I have a table with 2 columns, and I need to remove the row duplicates.   Column1 --- Column2  1 ----------------    3  1 ----------------    1  2 ----------------    1  1 ----------------    1  (remove this)   I found the duplicates with this:  select c1,c2, count(*) from table   group by c1,c2 having count(*) > 1   How can I remove the duplicates and keep one entry? (sql server 2008r2)

What is the best way to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows)?  The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field.  MyTable  RowID int not null identity(1,1) primary key, Col1 varchar(20) not null, Col2 varchar(2048) not null, Col3 tinyint not null


I have dozens of scripts, all in different directories. (exported/expanded Talend jobs)  At this moment each job has 1 or 2 scripts, starting with the same lines, most important one:  CD ***path-to-script***   and several lines to set the Java path and start the job.  I want to create a script, which will be ran from all these scripts. e.g.:  /scripts/talend.sh   And in all talend scripts, the first line will run /scripts/talend.sh, some examples of where these scripts are ran from:  /talend-job1_0.1/talend-job1_0.1/talend-job1/talend-job1.sh /talend-task2_0.1/talend-task2_0.1/talend-task2/talend-task2.sh /talend-job3_0.1/talend-job3_0.1/talend-job3/talend-job3.sh   How can I determine where the /scripts/talend.sh is started from, so I can CD to that path from within /scripts/talend.sh.  The Talend scripts are not run from within the directory itself, but from a cronjob, or a different users home directory.  EDIT: The question was marked as duplicate, but  is not answering my question 100%. Problem is:  - The basic script is being called from different scripts  - Those different scripts can be run from command line, with, and with or without a symbolic link.  - The $0, the $BASH_SOURCE and the pwd all do some things, but no solution mentioned covers all the difficulties.  Example:  /scripts/talend.sh      In this script I want to configure the $PATH and $HOME_PATH of Java, and CD to the place where the Talend job is placed. (It's a package, so that script MUST be run from that location).  Paths to the jobs are, for example:  /u/talend/talendjob1/sub../../talendjob1.sh  /u/talend/talendjob2/sub../../talendjob2.sh /u/talend/talendjob3/sub../../talendjob3.sh   Multiple jobs are run from a TMS application. This application cannot run these scripts with the whol name (to long, name can only be 6 long), so in a different location I have symbolic links:  /u/tms/links/p00001 -> /u/talend/talendjob1/sub../../talendjob1.sh /u/tms/links/p00002 -> /u/talend/talendjob1/sub../../talendjob2.sh /u/tms/links/p00003 -> /u/talend/talendjob1/sub../../talendjob3.sh /u/tms/links/p00004 -> /u/talend/talendjob1/sub../../talendjob4.sh   I think you get an overview of the complexity and why I want only one basic talend script, where I can leave all basic stuff. But I only can do that, if I know the source of the Talend script, because there I have to be to start that talend job.

How do I get the path of the directory in which a  script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application


I was practice this question on a website. it says that ''Add an .add_grade() method to Student that takes a parameter, grade.  .add_grade() should verify that grade is of type Grade and if so, add it to the Student‘s .grades '' could anyone please explain to me what "check the type" mean? and when I wrote below coding, the question didnt get checked and pop up a line saying "Does .add_grade() add grade to the instance’s .grades list?". I took a look at the answer, it shows code should write like if type(grade) == Grade:. I could not figure out why class Grade:   minimum_passing = 65     def add_grade(self, grade):     if type(grade) == type(Grade):       self.grades.append(grade)

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


Tier 2 and Tier 3 ISPs always connect to a higher up Tier (from what I hear). But how do the Tier 1 ISPs get their connectivity to the Web?  Do they just have a bunch of cables connected to other web servers and download data to their own servers then send anything back that the user requests?  Or does all of the web servers connect in a Web like manner and the ISPs connect to one of them?

I've been wondering recently about how the infrastructure of the Internet really works.    I know that I have an Internet Service Provider (ISP) that supplies my connection to the Internet.   But what I don't know is: Who provides the Internet to the ISP?  And who supplies it to them? Is there a never-ending loop that eventually connects us all together?


I was reading an article about the polar motion of the Earth: . A regression is performed between observed and modeled complex time series of data - the type of regression is not specified. The regression coefficient is then calculated for different values of the estimated parameter (quality factor); its amplitude and phase are shown in Figure 2 (I don't know if I am allowed to post it directly here). My question is why can the amplitude of the regression coefficient be as high as 2.3? I thought that the absolute value of the regression coefficient, for real series, had to be in the range 0-1. Therefore I was expecting a maximum amplitude of $\sqrt{2}$ for a complex series. Is there a more general definition of regression coefficient that I'm missing?

I was reading an article about the polar motion of the Earth: . A regression is performed between observed and modelled complex time series of data - the type of regression is not specified. The regression coefficient is then calculated for different values of the estimated parameter (quality factor); its amplitude and phase are shown in Figure 2 (I don't know if I am allowed to post it directly here). My question is why can the amplitude of the regression coefficient be as high as 2.3? I thought that the absolute value of the regression coefficient, for real series, had to be in the range 0-1. Therefore I was expecting a maximum amplitude of $\sqrt{2}$ for a complex series. The definition of regression coefficient is not mentioned in the article. At first I thought it may be a linear regression since if the model is correct, the modelled and observed series should be very close; however, this seems incompatible with a value of 2.3. Is there a more general definition that I'm missing?


I've spent hours looking on the net, tried various things. One site said that this particular card is not supported by the b43 driver so I have to use wl. And make sure that b43 is blacklisted which I was unable to do (always I try to blacklist the b43 it says permission denied). So, is it even possible to use this network controller with Ubuntu (16.04) I've had my new laptop a week now and still not up and running - Win 10 works though :(

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.


I am currently using mint.How can I replace it with ubuntu without any data,files loosing? Can anyone tell me how to boot only ubuntu without  any personal data loss? Thanks!

Recently I installed Ubuntu 12.10 x64 Server Edition on my PC. Unfortunately, I attempted to install a lightweight desktop but due to the fact that I have an old graphics card, the PC does not perform so well. I am thinking of re-installing an Ubuntu version but I do not want to lose the contents in my home folder. Is there any way to do that with a Live CD?


I am evaluating two machine learning models. The output is count data which has a range of 0 to 30, which most of the output values being small values. Large output values are rare.    One model has lower MAE and RMSLE and the other model has lower RMSE. I am not sure which model is performing better. It is worth noting that Model 2 is the result of model after taking log transformation of the output variable.

Why use Root Mean Squared Error (RMSE) instead of Mean Absolute Error (MAE)??    Hi  I've been investigating the error generated in a calculation - I initially calculated the error as a Root Mean Normalised Squared Error.  Looking a little closer, I see the effects of squaring the error gives more weight to larger errors than smaller ones, skewing the error estimate towards the odd outlier. This is quite obvious in retrospect.   So my question - in what instance would the Root Mean Squared Error be a more appropriate measure of error than the Mean Absolute Error? The latter seems more appropriate to me or am I missing something?  To illustrate this I have attached an example below:                    The scatter plot shows two variables with a good correlation,  the two histograms to the right chart the error between Y(observed ) and Y(predicted) using normalised RMSE (top) and MAE (bottom).     There are no significant outliers in this data and MAE gives a lower error than RMSE. Is there any rational, other than MAE being preferable, for using one measure of error over the other?