I manage google analytics inside google tag manager and I don't have any separated script for google analytics in the head of my website.  I need to use ga() function like :   <!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');  ga('create', 'UA-XXXXX-Y', 'auto'); </script> <!-- End Google Analytics -->   See? It has created ga right after google analytics script. But as I said, I don't have any script for google analytics. I have just a script (which is located in the head of my website) from google tag manager:  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-{$google_tag_manager_token}'); ga('create', 'UA-{$google_analytics_token}', 'auto'); </script>   The problem is, it throws:     Uncaught ReferenceError: ga is not defined   Any idea where should I place ga('create', 'UA-{$google_analytics_token}', 'auto'); exactly?     It should be noted, when I run ga('create', 'UA-{$google_analytics_token}', 'auto'); in the console of the browser, it will be created as well. Do I need a settimeout() ?

I'm following :   But in my real code, I've used google tag manager to manage google analytics. So I have just one script in the head of my website which belongs to gtm:  (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P8F58CT');  ga('create', 'UA-124402662-1', 'auto'); // Uncaught ReferenceError: ga is not defined   As you can see, I've added ga('create', 'UA-124402662-1', 'auto') right after that google tag manager (the same as the tutorial I've linked in the first line of my question). And I have a ga('send', 'pageview', newURL); code which will be executed when the page changes using ajax.  The problem is it throws: (as I've commented in code above)     Uncaught ReferenceError: ga is not defined   How can I fix it? Someone told me no need to add ga('create', 'UA-124402662-1', 'auto'); at all, and gtm will handle it all. But in my tests:   When I open my website (homepage), and run ga('send', 'pageview', "/adv"); in the console, nothing changes in google analytics and it still points to the homepage. When I open my website (homepage), and run ga('create', 'UA-124402662-1', 'auto'); and then run ga('send', 'pageview', "/adv");, then the google analytics will be changed to the /adv (not homepage anymore). So I believe ga('create', 'UA-124402662-1', 'auto'); is needed. But why it is undefined?


A thought experiment:     A U-shaped tube with semi-permeable membrane at the base. The tube is completely thermally isolated from its surroundings. The liquid (solvent) is at some temperature $T$. When solute is added to one side of the tube the fluid level on that side rises until the increased pressure due to gravity ($\rho gh$) equals the osmotic pressure.   If I understand correctly, osmotic pressure could be used to do work (i.e. lift a weight as the solvent level in one side of U-shaped tube increases). Where does this energy come from? I guess it must be from the internal energy of the fluid.  At this point has the temperature of the fluid decreased?? If so, has it decreased by exactly the work done against gravity divided by the specific heat of the fluid? What does the quantitative treatment of this problem look like?

The hyperphysics article defines osmosis as a process driven by internal energy and internal energy is defined as energy associated with random,disordered motion of molecules. Osmosis develops pressure and lifts weight so it has the output of a machine.  But what drives osmosis? Is osmosis driven at the expense of thermal energy although there is no temperature gradient?


I brought a CD to upgrade my windows 7 to 8.1 pro, I use windows 7 alongside ubuntu on my PC. So if I proceed with the upgrade will the GRUB get damaged or only the windows 7 erases and 8.1 gets installed?

It's a rather simple question (I hope). I currently have Windows 8 and I am dual booting it with Ubuntu 13.04.   If I were to install the latest update for Windows 8, that being 8.1, will it affect Ubuntu or will there be any conflicts between the two?


When I try to login to my ubuntu 12.04 it accepts my account info and password but then a black terminal page appears and disappears very fast and it goes back to login page. I killed lightdm and then used this command:   sudo lightdm   then tried to login (while terminal keeps the log). this is the error I receive:  Warning **error reading existing Xauthority: Error opening file : Permission denied Error writing X authority:Error opening file ,/home/sam/.Xauthority': Permission denied   All of this started when I pressed M in answer to this question during boot. The Disk Drive for /tmp is not ready yet. S to skip mount or M for manual recovery   is the result to sudo df /etc/fstab   the result for sudo cat /etc/fstab  ask for more info if needed

Somehow, while playing around with LightDM and Webkit Greeter, the ownership of the .Xauthority file in my home dir was given to the root user and I couldn't login because I hadn't the privilegues to lock the file.  I was able to regain ownership of the file and I could login again. (After several hours of reinstalling LightDM and it's greeters)  So now everything's working fine again. But I'd like to know how this happened. Is this a bug in LightDM or Webkit Greeter or something else?


I'm trying to make web like this. and I can't figure out how to make effects that when user scroll down the page. And  backgrounds of the sections are became longer. How to know if user scroll down and element is visible to the user.  And my problem is a lot like

Is there an efficient way to tell if a DOM element (in an HTML document) is currently visible (appears in the viewport)?  (The question refers to Firefox.)


Let G be a commutative group, and a, b ∈ G. Suppose that ord(a) = m, ord(b) = n, and gcd(man) = 1. Prove that there exists an element in G or order mn.   What I've done so far, is I tried to find the order of ab. I can prove that the order is divisible by lcm(m,n)gcd(m,n) but I can't prove whether it is equal to lcm(m,n)...

Let u and v be elements of a commutative group, and suppose that their   orders are r and s, respectively. Show that if r and s are distinct   primes then the order of uv is rs.   I will use the follwing theorem to proof this.  Theorem: Let x be an element of order m in a finite group G. Then $$x^s=1$$ in G if and only if s i a multiple of m.    My attempt  We can here see that $$(uv)^{rs}=[commutative]=u^{rs}v^{rs}=1^s1^r=1$$ By the theorem, this tells us that this is true only if only rs is a multiple of the order of $uv$. Let the order be $ord(uv)=k$. We know that every positive integer can be written as $$a=bm+l, 0<=l<b$$ and since $r$ and $s$ is primes (positive integers), $rs$ can be written as $$rs=km+l, 0<=l<k$$ This gives ut that $$1=(uv)^{rs}=(uv)^{km+l}=1^muv^l=(uv)^l$$ If l>0 then the equation $(uv)^l=1$ contradicts that the positive integer k is the least positive integer for which $(uv)^k=1$. Therefore l=0 and $rs=km$ . We can here see that $rs$ is a multiple of k (and this proof also the theorem).  $$rs=km => k | rs => k|r     ORk|s$$ But we know that $r$ and $s$ are distinct primes, so k must be equal to one of the primes.  $$k=r => (uv)^k=(uv)^r=1v^r=v^r=1$$ And since we know that $ord(v)=s$ the theorem tells us that $r$ must be a multiple of $s$. But since both of them is primes, we get that $r=s$ but this is a contradiction (r and s are distincts as the exercise tells us).   Now, we try with $k=s$. Same as above, we get that $s=r$ which is a contradiction. Neither k=r nor k=s is right since by the theorem we get that $k=r=s$ and we have that $r$ and $s$ are distincts. This tells us that k cannot be equal to r nor s, since this gives us that $r=s$. And since we know (and as i did proof)that  $$rs=km$$, this tells us, as i wrote before, that $$k|rs$$ Since k is neither equal to $r$ or $s$, this tells us that k must be equal to $rs$. Therefore $$ord(uv)=k=rs$$.  Edit: i know that this can be prooved by l.c.m(x,y) but we have not used it so far. That's why i did not proof it with l.c.m(x,y)


What factors should one look for when purchasing a speedometer? Does wired vs wireless or anything else factor into its accuracy?

I have bought a new pair of road bikes.  I am a triathlete (Sprint mostly) and I am interested to know, what computer should I buy now? wired or wireless?  I mainly do not like wireless things (I don't do wireless accessories - they tend to fail on you when you most need them).  The reasons I may consider which type to buy will be: - Price (wired usually lower) - accountability - (wired will less fail)  I can only think of why NOT to buy a wireless computer, and would like to know your inputs as well please.


I'm having a lot of difficulties with this proof. Can someone please solve it and explain to me what's going on at each step? Thank you!

Show that we cannot have a prime triplet of the form $p$, $p + 2$, $p + 4$ for $p >3$   I was a bit lost with this proof until I found a  from a previous homework assignment in this class which said "If $a$ is an integer, prove that one of the numbers $a$, $a + 2$, $a + 4$ is divisible by 3. These problems seem very similar to me and would lead me to assume that they would be proven similarly, although I am unsure as to how I would approach this for prime triplets as I am brand new to them. Any help is appreciated


I want to buy DA2 for X360 from Marketplace. I wonder if when I buy it on my user, can other console users play this game?  Notice, I do not mean playing simultaneously just if the game will be available to play to other users.  Update:  Not necessary a duplicate - I have various experiences depending on actual game, publisher, etc. I am looking for confirmed experiences with Dragon Age II bought digitally for Xbox 360.

I'm thinking of starting to buy Xbox games digitally, since I love how Steam works on PC, and would love similar functionality on my console. I Just have one question: If I where t buy Assassin's Creed III (or any game) on Xbox digitally, would another Xbox user on the same console be able to play that game? My brother uses the same console as me, and in the past we've always just shared disc copies of games. It'd be ridiculous if we had to buy two copies of a game digitally to both be able to play it.


I want stop my beta.example.com being indexed by search engines, because it can generate duplication issue.

When I type site:example.com(using my domain obviously), I get several link errors showing up in the listing. Typically, they are of the form: /some/fixed/path/admin/unblockUser/11  I am thinking of adding the following line to my robots.txt file:  Disallow: /some/fixed/path/admin/*


New Question  Two questions:   I'm trying to put a commit before ALL commits. The bottommost commit has 660fb2a76211f36ec9a67d0454a90eab469e9fd0 as SHA. When I type git rebase -i 660fb2a76211f36ec9a67d0454a90eab469e9fd0 every commit but the last one gets displayed in the list. I really need this commit to appear so I can put the very first commit as very last! When I put the very first commit as first in the list (meaning second commit in total, because the very first is not in the list as mentioned above) I get an error: error: could not apply b722c76... v1.4.3 BEAT release I just cut it from the bottom of the list and put it to the top! I did not change the number! I also tried this several times. The same result.   That's it so far. If you have questions go ahead and ask!  Original Question  I just dicovered old backups of my project. These backups where created before I used git. I now would like to add them to my repository as old commits. That would mean I have to put these commit in front of all other commits.  Now there are several problems with this:   How do I in general put a commit before other ones? How could I do this fast? (I have many backups!) How do I set a date for these "old" commits? (I know the dates of the backups!)   If something is not clear, please mention it. I will fix the issue then!  One last thing:  I have published this on GitHub. And I mainly used their software to commit commits. So how do I push this back to GitHub?

I've asked before about how to  in a git repository.  While the solutions are rather interesting and not really as mind-warping as some other things in git, they're still a bit of the proverbial bag of hurt if you need to repeat the procedure many times along the development of your project.   So, I'd rather go through pain only once, and then be able to forever use the standard interactive rebase.   What I want to do, then, is to have an empty initial commit that exists solely for the purpose of being the first. No code, no nothing. Just taking up space so it can be the base for rebase.  My question then is, having an existing repository, how do I go about inserting a new, empty commit before the first one, and shifting everyone else forward?


I am a developer and am beginning to dabble with these mathematical concepts.  I got to know that continuity means that making small changes in the input means that the output will also change by small amount only.  This looks fine to me, as this means there will not be breaks in the curve leading to abrupt jumps i.e. discontinuity.  Now, similarly, differentiability, I heard it means that at a point you can do linear approximation of the curve or something like a tangent to the curve exists at that point...but I don't get it.  What does differentiability mean intuitively? What special property does differentiability confer to the curve?  Is differentiability related to continuity?  EDIT: I am trying to understand the input vs output relation under differentiability the same way in which I explained continuity above. The other question does not focus on this (I read it, it was defining it in terms of derivatives rather than an input-output perspective).  Thanks for your help.

A function is "differentiable" if it has a derivative. A function is "continuous" if it has no sudden jumps in it.  Until today, I thought these were merely two equivalent definitions of the same concept. But I've read some stuff today which seems to be claiming that this is not the case.  The obvious next question is "why?" Apparently somebody has already asked:    Several answers were given, but I don't understand any of them. In particular, Wikipedia and one of the replies above both claim that $|x|$ has no derivative. Can anyone explain this extremely unexpected result?  Edit: Apparently some people dislike the fact that this is non-obvious to me. To be clear: I am not saying that the result is untrue. (I'm sure many great mathematicians have analysed the question very carefuly and are quite sure of the answer.) I am saying that it is extremely perplexing. (As a general rule, mathematics has a habit of doing that. Which is one of the reasons why we demand proof of everything.)  In particular, can anyone explain precisely why the derivative of $|x|$ at zero is not simply zero? After all, the function is neither increasing nor decreasing, which ought to mean the derivative is zero. Alternatively, the expression  $$\frac{|x + a| - |x - a|}{a}$$  becomes closer and closer to zero as $a$ becomes closer to zero when $x=0$. (In fact, it is exactly zero for all $a$!) Is that not how derivatives work?  Several answers have suggested that the derivative is not defined here "because there would be a jump in the derivative at that point". This seems to assert that a continuous function must never have a discontinuous derivative; I'm not convinced that this is the case. Can anyone confirm or refuse this argument?


Today tens of upvotes where removed from the reputation list at top of the website. First I saw 12 "-10 User was removed" lines. In about an hour I saw more of these lines.  I know there are similar questions here and I'm not asking what does this mean.  I wonder why did it happen twice per hour. And is it possible to know what users exactly caused this?     In my profile, there is only one "removed" event listed:

Message appearing when a user was removed.     It seems I lost 1765 reputation points on Stack Overflow yesterday. The reason given in my history is "removed", with the description of "User was removed ()". I don't understand what that means. What caused this?


I had an argument with a friend about this and I would like to know what you think. If we are given a polynomial $f\in \mathbb{R}[X]$, then do only real numbers count as roots of $f$? Let me give you an example. Let's say we are given the polynomial $f=X^2+1 \in \mathbb{R}[X]$. It is obvious that $f(i)=f(-i)=0$, but are $i$ and $-i$ considered to be roots of $f$ since they are not in $\mathbb{R}$? I think that they are not and they would be only if we were told that $f\in \mathbb{C}[X]$. EDIT: After the discussion in the comments, I came to the conclusion that a polynomial whose coefficients are in a field can also have roots in another field. Can you give me some examples of this occuring in polynomials which are not in $\mathbb{Z}[X],\mathbb{Q}[X],\mathbb{R}[X]$?

If we have a polynomial in a polynomial ring, are its "roots" only valid if the roots are in the ring itself?  i.e. For $x^2+1 \in \mathbb{C}[x]$ we have roots $i$ and $-i$. But if we consider it as $x^2+1 \in \mathbb{R}[x]$, because $i, -i \notin \mathbb{R}$, do we say that $x^2+1$ has no roots?


I have this multiple-entry Schengen visa. I got my visa because of a recent business trip to Poland (Polish embassy issued my visa, with R/PL remark). After my business trip, I'm planning to go back to Europe for backpacking, but I don't have any plans to visit Poland.  Now I'm wondering if I can use my visa (issued by the Polish embassy) for my Europe backpacking trip? I mean, if they restrict me to visit Poland because their embassy is the one who issued my visa?  By the way, my entry point is Vienna, then Prague, Berlin, Amsterdam, Belgium, and my exit point is Paris going back to Philippines.

I have a type C multiple-entry visa for Latvia from the German consulate and have R/LV written below the remarks of my business visa. The sticker says "SCHENGENER STAATEN".   This is my first Schengen visa and I want to know that can I land in any Schengen state to start my trip? or do I have to land first in Latvia ?  Secondly is there any restriction on me traveling to other Schengen states as I got a 30 days visa.


steltz is my username but I have no idea where "Omkars-MBP" came from? I've always owned this computer since it was brand new, so I'm not really sure what to do...but this is weird. Any advice?

My computer name in System Preferences > Sharing is set to "archos", but is showing as "iphone" on Terminal. It just started doing this after I loaded Xcode for doing iPhone development: Last login: Mon Nov  7 14:46:55 on ttys001 iphone:~ travis$   Any ideas what could be causing this?


I have pondered that some say "32-bit is old news" because you are limited in RAM without cutting around, such as with . Assuming first that the following factors weigh in on the processor's speed itself:   Microarchiterual design, meaning things like cache size, implementation of microcode (if applicable), data/address bus and register connections, and, of course, design principles or structures. . Bus speeds, such as FSB speeds (front-side bus) and the related such. Special features, like parallelism, "hyper threading", "compute units", off-loading work with a co-processor or background processor, multi-core environments, etc.   Assuming (and we know all of those things weigh in on speed factors) the processor is 32-bit, would the fact that it is alone 64-bit make it faster just because of increased bit-width, memory addressing, size, etc.?  Basically, with two identical processors, would the 64-bit one be faster generally in machine code decoding, fetching, accessing memory, MMIO, computations, etc., than the prior 32-bit clone?

What are the differences between 32-bit and 64-bit systems?  If you have used both of them, what kind of sharp differences have you experienced?   Would it be a problem to use 32-bit programs on 64-bit systems in some cases?


When I render my 3D motion Tracked Scene It is See Through and I can see an outline. Please tell me why this is happening. It would be greatly apprieciated.

I have multiple scenes each with different objects. I want to combine all these scenes in the compositor but when they render, all the objects from each scene overlap each other and are all transparent, so I can see all the objects when some should be hidden behind others.   To join my scenes I'm using a mix node with add.


It was like more than 6 years ago, I was an undergrad senior in a south asian university, we did not have much internet connectivity back then.   I wanted to publish something on a journal/conference to get a feedback on my undergrad thesis (I was curious to know about the quality of my work) and submitted a paper to one of the journals listed on that notorious .  I was young and novice, above all, I had no idea that people could do such a scam with intellectual issues like "research papers", anyway.   but the thing is that when I search my name on a web search engine (google, duck-duck-go etc.), that biggest mistake of my life still comes up on the first page, I am now near the end of my PhD and looking for an academic/research job. So, I wanted to communicate with them so that I can request them to revoke my paper.  However, their site does not provide any specific contact address/person to whom I can discuss with.   I have no wish to resubmit that to any other place, after 7 years now I can understand that my undergrad thesis work was too "trivial" to be "published".   Is there anyone who is in the similar situation? and is there any way to retract the paper from  ?  any pointer will be greatly appreciated.   Apology: I am feeling very uneasy to share the link of my paper, but their website is provided.

I submitted one of my research paper in a fake conference by mistake. Now I want to withdraw my paper from it, But I am facing problem in withdrawal as no email id is given on that website. The problem is that now my paper has been accepted by another conference. But according to Turnitin, my abstract is already published somewhere else. Does anyone here know how and where to report such fake conferences?


Let $\mathsf{I}$ and $\mathsf{J}$ be equivalent categories. Let $\mathsf{C}$ be another category. I need to prove that the categories of functors $[\mathsf{I},\mathsf{C}]$ and $[\mathsf{J},\mathsf{C}]$ are equivalent.  Let functors $E\colon\mathsf{I}\to\mathsf{J}$, $E'\colon\mathsf{J}\to\mathsf{I}$ together with natural isomorphisms $\eta\colon 1_{\mathsf{I}} \Rightarrow E'E, \epsilon\colon EE' \Rightarrow 1_{\mathsf{J}}$ define an equivalence of categories.  Define a functor $y\colon[\mathsf{I},\mathsf{C}]\to[\mathsf{J},\mathsf{C}]$ which maps each functor $F\colon\mathsf{I}\to\mathsf{C}$ to $FE'$ and each natural transformation $\alpha\colon F\Rightarrow G$ to the natural transformation $\beta\colon FE'\Rightarrow GE'$ such that for any $j \in \mathsf{J}$ we have $\beta_j = \alpha_{E'(j)}$.  I have proven that this functor is faithful and essentially surjective on objects, but I'm not sure how to prove that it is full.

Suppose $A, B, C$ are categories. If $A$ and $B$ are equivalent, is it the case that $C^A$ and $C^B$ are equivalent? Also, is it the case that $A^C$ and $B^C$ are equivalent.  I first conjectured that $C^A$ and $C^B$ are equivalent, but then as I tried to prove the conjecture, I started to realize that it might not be the case. So now I'm trying to find a counterexample. So far I have not been able to find one. Maybe I'm stuck with "too complicated" ideas. I strongly believe that there are very simple counterexamples. Please help. (For more detail, I got to the point where I have a cube that I want to be commutative, but I can only show that 4 of its sides are commutative squares. That's when I realize the other two sides may not necessarily commute.)  And of course, there is the second part to the problem that's not just the dual problem. I would like to know about the special case in which $A$ is a preorder and $B$ is a partial order which is the skeleton of $A$. This may have nothing to do with the validity of the statement in question at all, but it is the setting that originated this question.


Consider the two following string sequences:  Salutation = ["Hello", "Hi"] Names = ["Alice", "Matt", "Franck", "Julia"]   I am looking for clean way to merge those sequences into  ["Hello_Alice", "Hi_Alice", "Hello_Matt", "Hi_Matt", "Hello_Franck", "Hi_Franck", "Hello_Julia", "Hi_Julia"]   or with whatever separator.   The equivalent in R would be:  c(outer(Salutations, Names, paste, sep="_"))

I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


I did something now viewport solid looks like this:  There is a point somewhere out at infinity projected through the shape and the only 2 faces showing are the ones in the projection. Material preview mode looks normal. What did I do?

When looking at my objects in 3d view I'm seeing a gray cone that seems to be hiding other objects.   Can anyone help me turn this off and explain what it is please.  Screenshots attached.


I've searched online but can't find a way to way to split a char array by space (" ") and store each word into a vector.   int main() { string input; vector <string> splitInput;  getline(cin, input);  char* chararray = new char[input.length() + 1];  strcpy_s(chararray, input.length() + 1, input.c_str());  //code to split chararray by space and store into splitInput  }

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


Why don't metals glow from red to yellow to green to blue etc.? Why only red, then yellow and then white? Shouldn't all wavelengths be emitted one by one as the temperature of the metal increases?   If some metals do glow at with different colours, could you give me examples of such metals and the reason why this happens in specific cases?

The  (unlike the quantized emission seen from atomic spectra), is continuous over all frequencies.  Many objects approximate ideal blackbodies and have radiation curves very similar in shape and continuity to that of an ideal black-body (often minus some emission and absorption lines from the atoms in an object, such as radiation curves seen from stars).  I am wondering what exactly gives rise to a basically continuous black-body radiation curve in real objects? Since atomic energy states are quantized, it seems real life black-body curves would have some degree of measurable quantization to them (or perhaps the degree of quantization is so small the radiation curves look continuous).


What unique property of light, makes it the conversion factor between energy and mass? It has to be more than a coincidence that the speed of light, just happens to be the correct number number to convert mass to energy

I will try to be as explanatory as possible with my question. Please also note that I have done my share of googling and I am looking for simple language preferable with some example so that I can get some insight in this subject.  My question is what is so special about $c$? Why only $c$. Its like chicken and egg puzzle for me. Does Einstein reached to $c$ observing light or does he got to light using some number which turned out equal to $c$.   Why is $c$ not relative. If something has zero rest mass like a photon why they only travel at $c$ in vacuum and not with $c+1$ or $c-1$?


How to upgrade directly to 12.10 (or latest) from 10.04. When i try to upgrade to 10.10, it gets following error.  Failed to fetch Fetching the upgrade failed. There may be a network problem   I'm just a beginner in Ubuntu. I have already installed win 7 and i don't want to format my computer. I'm hoping for a quick, easily applied solution.

How can I safely upgrade an Ubuntu installation from one release to another? What should I do before upgrading to ensure it goes smoothly, and is there any clean-up I need to do afterwards?  In particular, do I need to do anything special if I am using packages from PPAs, if I have a graphics card that needs drivers, or if I'm running a custom Linux kernel?  This is a general question , but as example we take Ubuntu 12.04 and Ubuntu 12.10


I have read several posts here about that, but I didn't understand what I'm wrong and why it doesn't work in my simple case.  My target is to disable (and also I would like to see them in light gray) the 2 items when myCondition is false.  //__________________________ /  final Context myContext = this; final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(myContext); final ListView listView = new ListView(myContext); List myListOptions = Arrays.asList(         "item 0",  //position=0         "item 1"  //position=1 ) ; final ArrayAdapter arrayAdapter = new ArrayAdapter(myContext, android.R.layout.simple_list_item_1, myListOptions ); listView.setAdapter(arrayAdapter);  //*****HERE THE PROBLEM IS!!!********* if (myCondition == false) {     listView.getChildAt(0).setEnabled(false);     listView.getChildAt(1).setEnabled(false); }  alertDialogBuilder.setView(listView); final AlertDialog alertDialog = alertDialogBuilder.create(); listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {     @Override     public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {         //__________________________         //__________________________         //longclick su Item 0         if (position == 0){             //Do something         }          //__________________________         //__________________________         //longclick su CopiaTesto         if (position == 1) {             //Do something         }         //__________________________         //__________________________          alertDialog.dismiss();          return true;     } }); alertDialog.show(); return true; //__________________________   I get an exception on the line if (myCondition==false):  04-17 07:06:27.471  25198-25198/com.test E/﹕ Classe 'HeaderFragment'  ----  'onClick Opzioni'  ----  Exception: null        ----  Nome Thread (che invoca il Log)='main'     java.lang.NullPointerException         at com.test.HeaderFragment$2$3.onLongClick(HeaderFragment.java:462)         at android.view.View.performLongClick(View.java:4142)         at android.view.View$CheckForLongPress.run(View.java:17031)         at android.os.Handler.handleCallback(Handler.java:615)         at android.os.Handler.dispatchMessage(Handler.java:92)         at android.os.Looper.loop(Looper.java:137)         at android.app.ActivityThread.main(ActivityThread.java:5118)         at java.lang.reflect.Method.invokeNative(Native Method)         at java.lang.reflect.Method.invoke(Method.java:511)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)         at dalvik.system.NativeStart.main(Native Method)   I already knew what is a Null Pointer Exception, but I didn't understand why I have it in this case, probably because I'm not familiar with arrayAdapter

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


I'm trying to compile a C++ project and got an error: xxx.so no such file or directory. In this case, normally I execute the command apt-cache search xxx and I can usually find a package name like xxx-dev, so then I simply execute apt install xxx-dev and it will be OK.  But in fact I don't know exactly what apt install xxx-dev will do. When we execute apt install xxx-dev, we can get some information about what would be installed, etc, but I want to know something more.  If I execute apt install xxx-dev, will it install more things than I need? For example, the error at the beginning told me that xxx.so was missing, however, when I execute apt install xxx-dev, I can usually see that many packages will be installed. Are all of these necessary? Is there a way to check exactly what apt install xxx-dev  will do or to check what a deb package contains?

What does the apt-get install ... command do?  When I enter apt-get install ... command, there are some texts appearing on the screen, but that does not have enough information for me. I want to know if any file is created / edited, any service is started and other activities...  Is there any .sh file executed when the apt-get install ... run? If so, how can I see the content of that sh file?  The reason for this question is recently I tried to install tomcat7 with apt-get install tomcat7. Everything works fine until I install tomcat7-admin (manager web application), the server became unresponsive to any request. I tried this many times, and this always happen.


I am running Xubuntu 14.10 amd64. I have the latest USB adapter from alfa, model AWUS036AC. I downloaded linux drivers for it, they are not packaged to easily install. I do not know how to install the drivers. I unarchived the .tgz file, and it has some folders and files, one file is named makefile. I think my problem is just a lack of knowledge about linux, not that the driver doesn't work. At this point I don't even know what dir the drivers go in. The lsusb command shows the device "Bus 002 Device 012: ID 0bda:8812 Realtek Semiconductor Corp.", it's just not showing up as a usable network adapter, most likely because it's pretty new. Any help would be greatly appreciated.

I bought this network adapter from Amazon and I don't know how to install the drivers. The adapter comes with a CD for drivers and when I put it in, it has .autorun.exe autorun.ico autorun.csp, and autorun.inf.  I know that it supports Linux because when I installed them on my Windows (Dual-boot) it asked me if I wanted to Linux drivers, Mac, or Windows.


I just changed my Operating System to Ubuntu 20.04 from Windows 10. On windows, I used an external software to manage my drivers and update them. But I cant figure out how to do that on Ubuntu. Any help would be appreciated.

Is there a package of Ubuntu drivers as driver pack solution? I tried to search for it, but I did not find it. If there is, how can I easily get it?


What is the name of the property of some function, $G(x)$, such that $\mathbb{E}[G(x)]=G(\mathbb{E}[x])$? Thank you.

One form of Jensen's inequality is     If $X$ is a random variable and $g$ is a convex function, then   $\mathbb{E}(g(X))\geq g(\mathbb{E}(X))$.   Just out of curiosity, when do we have equality? If and only if $g$ is constant?


If an effect or spell changes an NPC's Constitution (e.g. the  or the fortitude ), how does it affect that creature's max HP? I'm interested in Constitution decreases as well.   I have a player who wants to wear his dwarf belt as a collar when in wild shape, (which I could say no to) but the ioun stone seems entirely possible.  I'm also curious about how Con changes from such items/sources affect a druid in , if that creature can use the item.  I assume I'd modify by hit dice or CR? But that doesn't seem right.  If a wild Direwolf ((37hp(5d10+10) CR 1, CON 15 (+2)) was affected in a specific way, then should it be any different from a druid wild shaping into a Direwolf?  I was maybe thinking player level would affect this, but player level doesn't affect HP of Wild Shape. Also, if it's a level 3 druid Wild Shaped as a Direwolf, then technically that Direwolf is level 3?  I've read () that Wild Shaped druids (that are high enough level to maintain their form) CAN use their beasts hit dice and Con mods during short rests, leading me to believe that Con IS affected by hit dice, but it seems too easy to be correct.  Spells like polymorph and true polymorph match CR with level, but it doesn't seem like something tied to CON

Lets say I'm a fighter that just leveled up to level 4, and decide to bring my Constitution up from 16 to 18. How many hit points do I have?  Level 1 = 10 (base) + 3 (Con mod) = 13.  Level 2 = 10 + 6 (average HP per fighter level) + 3 (Con mod) x 2 = 22  Level 3 = 10 + 6 (average) x 2 + 3 (Con mod) x 3 = 31  Level 4 = 10 + 6 (avg) x 3 + 3 (Con mod) x 3 (3 level-ups) + 4 (increased Con mod, which is now 4) x 1 = 41?  OR  Level 4 = 10 + 6 (avg) x 3 + 4 x 4 (4 times current Con mod) = 44?  If it's the first option, it's simply better to level Constitution up at earlier levels.


How can I run a jar file in command prompt and pass arguments to it.  ie: "test.jar -get" would be entered in command prompt/terminal

How do I pass parameters to a JAR file at the time of execution?


Throughout my life I've been told that an inertial frame is one that is not accelerating and I was satisfied with that. Well up to this day, until I asked: accelerating with respect to what ? Now this seems as a flawed definition to me.  Another definition states that an inertial frame is one in which a body remains at rest or moves at constant velocity unless acted upon by forces. This definition seems to be flawed too, don't we usually tell whether or not a force is acting on a body by measuring its acceleration ? How can we switch to doing the opposite so quickly ?  Wikipedia defines an  as:     In classical physics and special relativity, an inertial frame of reference (also inertial reference frame or inertial frame, Galilean reference frame or inertial space) is a frame of reference that describes time and space homogeneously, isotropically, and in a time-independent manner.[1] The physics of a system in an inertial frame have no causes external to the system.[2]   Well this looks too complicated for me, can any one help explaining it in simpler terms please ? How can time and space be "homogeneous", "isotropic", and "time-independent" ?  Finally, can we define an inertial frame as the one in which Newton's three laws of mechanics hold?

I understand that you can (in principle) measure whether "free particles" (no forces) experience accelerations in order to tell whether a frame is inertial. But fundamentally, what determines which frames are inertial (i.e. what principle selects in which frames free particles will not appear to accelerate)? I've been told that the cosmic microwaves determine the ultimate rest frame of the universe, but that doesn't make sense to me, since one can still ask why that frame is an inertial frame.  Also, I understand that there are no real inertial frames in general relativity, but it seems like there certainly exists approximate inertial frames and we can ask why those frames are approximately inertial and not others. For example, in the frame of a person riding a merry go round, free particles appear to greatly accelerate; while in the frame of someone standing next to the merry go round there are no such great accelerations. Why does the guy (or gal) on the merry go round see free particles accelerating while the other guy doesn't.   And if you're gonna tell me that it's "the rest of the stuff in the universe" that determines whether the person on the merry go round sees free particles accelerate, I'll ask how you know that all that stuff is not spinning.  I hope this question sort of makes sense, it's been bothering me for a while and my study of relativity (most of special relativity and just the outline of general relativity) hasn't really clarified it for me much.


My LaTeX document looks like this:  \documentclass{article}     \usepackage{tikz-cd}  \newcommand{\commSq}[8] {     \begin{tikzcd}         #1 \ar[r, "#2"] \ar[d, "#6"] & #3 \ar[d,"#4"] \\         #7 \ar[r, "#8"] & #5     \end{tikzcd} }  \begin{document} %1 \begin{tikzcd}     A \ar[r, "f"] \ar[d, "g"] & B \ar[d,"h"] \\     C \ar[r, "i"] & D \end{tikzcd} %2 \commSq{A}{f}{B}{h}{D}{g}{C}{i} \end{document}   I figured that the part the code below %1 and the code below %2 do the same thing. However, using the command \commSq instead yields the error "Package pgf Error: Single ampersand used with wrong catcode. [...]" and I get this output:    What am I doing wrong here?

For  I wanted to define a shortcut for creating a matrix inside a tikzpicture. As a minimal example, consider  \newcommand\mymatrix[1]{     \begin{tikzpicture}         \matrix[matrix of math nodes] {#1};     \end{tikzpicture}% }   which would then be used as  \mymatrix{     a & b \\     e & f \\ }   But LaTeX complains about Package pgfbasematrix Error: Single ampersand used with wrong catcode at the line with the closing brace of \amatrix{}. Why does it do that and how can I avoid it?


I have installed my old pc with UBUNTU SERVER 14.10  I run the command sudo apt-get install phpmyadmin  But is shows Unable to locate package phpmyadmin  Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package phpmyadmin   I searched in askubuntu and tried many ways. But no use.   Please help.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


My physics teachers told me that there is no derivation of the Schrödinger Wave Equation and that Schrödinger actually wrote this equation from nothing. He wrote it from his mind. Even in my book there is no rigorous derivation of the Schrödinger Wave Equation. But how is this possible? How did Schrödinger make such a wild guess to such a equation that turns out to be the '$F=ma$' for quantum mechanics? I am pretty sure he hadn't just guessed the equation, right? I mean what are the odds of such a guessed equation to be so fundamentally correct? Why does everyone say that Schrödinger wrote his  Schrödinger Wave Equation from his mind? Why?

The  is the basis to understanding quantum mechanics, but how can one derive it? I asked my instructor but he told me that it came from the experience of Schrödinger and his experiments. My question is, can one derive the Schrödinger equation mathematically?


Let's say $\vec{x}$ is an $n$ dimensional observation, $\vec{\mu}$ the $n$ dimensional mean of the sample that $\vec{x}$ is from and $\Sigma$ the $n \times n$ covariance matrix of that sample.  Then the mahalanobis distance is defined like this $$ mahal(\vec{x}) = \sqrt{(\vec{x} - \vec{\mu})^T \Sigma^{-1} (\vec{x} - \vec{\mu})} $$ Intuitively this function does this   Center $\vec{x}$ around the mean $\vec{\mu}$ "Remove" the covariance and variance integral to $\vec{x}$ with $\Sigma^{-1}$ Compute dot product between the left $(\vec{x} - \vec{\mu})$ and the right transformed $(\vec{x} - \vec{\mu})$ Compute the square root of the dot product from 3. which amounts to the euclidean distance   The problem I see is that it only "removes" the covariance from the right $(\vec{x} - \vec{\mu})$ but not the left. Which means that this isn't the euclidean distance in the space with base $\Sigma$ since the left hand side didn't change base to $\Sigma$ like the right hand side.  As I see it the the mahalanobis distance would have to be defined like this for it to be like the euclidean distance $$ mahal'(\vec{x}) = \sqrt{(\Sigma^{-1} (\vec{x} - \vec{\mu}))^T (\Sigma^{-1} (\vec{x} - \vec{\mu}))} $$  I also tried to decompose $\Sigma = E \Lambda E^{-1}$ where $E$ are eigenvectors of $\Sigma$ and $\Lambda$ its eigenvalues. Then the mahalanobis distance could be written like $$ \begin{align} mahal(\vec{x}) &= \sqrt{(\vec{x} - \vec{\mu})^T \Sigma^{-1} (\vec{x} - \vec{\mu})} \\ &= \sqrt{(E^{-1} (\vec{x} - \vec{\mu}))^T \Lambda^{-1} (E^{-1} (\vec{x} - \vec{\mu}))} \end{align} $$ This fits my intuition of euclidean distance much more, except the right hand side is scaled by $\Lambda^{-1}$ which makes it not the same as euclidean distance.

I'm studying pattern recognition and statistics and almost every book I open on the subject I bump into the concept of Mahalanobis distance. The books give sort of intuitive explanations, but still not good enough ones for me to actually really understand what is going on. If someone would ask me "What is the Mahalanobis distance?" I could only answer: "It's this nice thing, which measures distance of some kind" :)   The definitions usually also contain eigenvectors and eigenvalues, which I have a little trouble connecting to the Mahalanobis distance. I understand the definition of eigenvectors and eigenvalues, but how are they related to the Mahalanobis distance? Does it have something to do with changing the base in Linear Algebra etc.?  I have also read these former questions on the subject:       I have also read .  The answers are good and pictures nice, but still I don't really get it...I have an idea but it's still in the dark. Can someone give a "How would you explain it to your grandma"-explanation so that I could finally wrap this up and never again wonder what the heck is a Mahalanobis distance? :) Where does it come from, what, why?   UPDATE:   Here is something which helps understanding the Mahalanobis formula:


I want to print a page to do so I have to click CTRL + P, so I would like to make a link to ease the process. Any help is appreciated!

I have a page with a "Print" link that takes the user to a printer-friendly page.  The client wants a print dialog box to appear automatically when the user arrives at the print-friendly page.  How can I do this with javascript?


The graph of $xy = 1$ is connected in $\mathbb{C}^2$.  The above statement is true. Why? Please show reason.  In $\mathbb{R}^2$ $xy = 1$ is not connected as it has two disjoint components in $1$-st and $3$-rd quadrant. I have no idea about this function in $\mathbb{C}^2$. I do not know multivariate complex analysis.   Thank you for your help.

The graph of $xy = 1$ in $\Bbb C^2$ is connected. True or false?  I know that it is not connected in $\Bbb R^2$, but what is the case of $\Bbb C^2$?


how to prevent sql injection by using escape string or other method?? i do have some codes, but i not sure how to do? any help?  <?php                             if (isset($_POST['submit'])){                             session_start();                             $username = $_POST['username'];                             $password = $_POST['password'];                             $query = "SELECT * FROM users WHERE username='$username' AND password='$password'";                             $result = mysql_query($query)or die(mysql_error());                             $num_row = mysql_num_rows($result);                                 $row=mysql_fetch_array($result);                                 if( $num_row > 0 ) {                                     header('location:dashboard.php');                             $_SESSION['id']=$row['user_id'];                                 }                                 else{ ?>
Access Denied
                                  <?php                             }}                             ?>

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I am looking for the term that describes the use of a certain word in a sentence in place of the correct one; a word that happens to look very similar to the one actually needed, but has a different meaning, and that, in turn, causes a big change in the meaning.  A little example: convolution and convulsion.  I know there is a word for this because I've read about it in Wikipedia, but forgot the term.  EDIT: Thank you all! The term I was looking for was malapropism.

I was reading about various terms for incorrect words, but they didn't seem to fit.  I saw a post where someone said "what do you like to do when you're board?".  That kind of thing.  Also, would that be considered a mistake in grammar?  I didn't think so, but my friend insists it is.  I'm not sure if there even is a word for that kind of mistake, but was just curious about it.  Thanks!


I need to put two logo images on the same line, vertically centered relative to each other. Something like this:  This alone I could easily achieve with CSS vertical-align: middle;, but I also need the images to be at the very left and and the very right respectively; so normally I would do it with float: left and float: right, but then vertical-align stops working... Another constraint is that I do not write HTML manually, but rather it is generated by a tool (pandoc, to be precise). So long story short, I have the following two options for HTML: Option 1:

  Option 2:

  Could you please help me styling any of these HTML snippets, so that I get the two images vertically centered within the "logo-block" boundaries, with "logo1" at the very left and "logo2" at the very right?

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I cannot seem to find an answer to the following problem: I am doing interreader correlation studies where I calculate ICC values. It is quite easy to do this in R, but how do I calculate a p-value to see whether the interreader correlation of one group is better than the other group?

I need to compare two generalizability (G) coefficients for data that are from two separate populations. G coefficients are a type of intraclass correlation coefficient (ICC).   The literature on statistically comparing G coefficients is sparse by all accounts, so I thought that the best I might do was find out the recommendation for statistically comparing ICCs. I've considered Fisher's Z, but I know ICCs are not normally distributed.


I saw this code in one of the tutorials. There isn't any error with it, but I just don't understand the code. Could someone guide me?  int trying[] = {3,4,5,6,7}; change (trying);  for(int y: trying) {     System.out.println(y);     } } public static void change (int x[]) {     for ( int counter = 0; counter < x.length ; counter++){         x[counter] += 5;      } }   Able to explain this part for me?  for(int y: trying) {     System.out.println(y);  }   I don't understand especially this line of code:      for (int y : trying)

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


I saw this in the comments on my latest question:     Please avoid extended discussions in comments. Would you like to automatically move this discussion to chat?   Clicking the second sentence starts a new chat automatically, and this I didn't want to do.  We need a YES/NO option.

When a comment chain is too long, new comments have to be loaded through the add / show 1 more comments link. After clicking on this link, I can add a reply:  After quickly misclicking on the textarea, a new chat is created. Without any confirmation...  I've experienced this [at least three times][2]. Can a confirmation dialog be added, so that chatrooms cannot be created by accident?


If you are in 7th grade like me, you probably have a school iPad. At school, they DO NOT let you download any games.  So far, I have tried ,  and  without any success.  Is there a way to download games onto the iPad?

This school iPad is not letting me get games or anything like that so I'm asking how can you transfer games from a mac computer onto a school iPad?


In the novelization of Star Wars: The Force Awakens Unkar Plutt runs into Rey at Maz's place due to a covert Imperial Homing Beacon, which he says is old technology.   Is this beacon the same one that Tarkin put on there those many years before, or was a new one added in between the events of A New Hope and The Force Awakens?

In Star Wars - Episode 4: A New Hope, Darth Vader has a homing beacon hidden aboard the Millennium Falcon. It is thanks to this that the Imperials are able to locate the Rebel base on Yavin 4.     TARKIN      Are they away?      VADER      They have just made the jump into    hyperspace.      TARKIN      You're sure the homing beacon is    secure aboard their ship? I'm taking    an awful risk, Vader. This had better    work.   Is it ever explained what happened to this homing beacon?   How long was it aboard the Falcon and tracking Han and/or the Rebels?   No mention of  its discovery is made during the rest of the movie, nor is it referenced during The Empire Strikes Back. In fact, the Imperials seem to have few solid leads as to where the Rebels are hiding at the beginning of Empire.


I want to show that $\frac{x^{n}}{n!}$ goes to $0$ for $n$ going to infinity for all $x \gt 0$.   I wish to prove this using the $\varepsilon$-$\delta$ method. So for all $\varepsilon > 0$ there exist $\delta >0$ so that $\frac{x^{n}}{n!} < \varepsilon$ where $n > \delta$.  This is not a duplicate since I ask for a delta-epsilon proof.

Why is     $$\lim_{n \to \infty} \frac{2^n}{n!}=0\text{ ?}$$   Can we generalize it to any exponent $x \in \Bbb R$? This is to say, is     $$\lim_{n \to \infty} \frac{x^n}{n!}=0\text{ ?}$$     This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


states that the orbit of every planet is an ellipse with the Sun at one of the two foci. Is there anything significant about the location, or any unusual properties about the other focus?

1.In classical mechanics, using Newton's laws, the ellipticity of orbits is derived. It is also said that the center of mass is at one of the foci.   2.Each body will orbit the center of the mass of the system.  My question is : Are the assumptions in 1 and 2 correct?   Follow up question : Assuming the distance from the centre of the mass to each body remains the same, do we have two bodies orbiting the centre of the mass of the system in an elliptical or circular orbit?   Finally : With elliptical orbits, if the heavier mass is supposed to be in one of the foci, if there is any significance to second focus, what is it? Is it a Lagrange point by any chance or does it have some other mathematical property?


I'm trying to insert a certain number of indentations before a string based on an items depth and I'm wondering if there is a way to return a string repeated X times.  Example:  string indent = "---"; Console.WriteLine(indent.Repeat(0)); //would print nothing. Console.WriteLine(indent.Repeat(1)); //would print "---". Console.WriteLine(indent.Repeat(2)); //would print "------". Console.WriteLine(indent.Repeat(3)); //would print "---------".

What it's the best way to generate a string of \t's in C#  I am learning C# and experimenting with different ways of saying the same thing.    Tabs(uint t) is a function that returns a string with t amount of \t's  For example Tabs(3) returns "\t\t\t"  Which of these three ways of implementing Tabs(uint numTabs) is best?  Of course that depends on what "best" means.     The LINQ version is only two lines, which is nice.  But are the calls to Repeat and Aggregate unnecessarily time/resource consuming? The StringBuilder version is very clear but is the StringBuilder class somehow slower? The string version is basic, which means it is easy to understand.   Does it not matter at all?  Are they all equal?   These are all questions to help me get a better feel for C#.     private string Tabs(uint numTabs) {     IEnumerable<string> tabs = Enumerable.Repeat("\t", (int) numTabs);     return (numTabs > 0) ? tabs.Aggregate((sum, next) => sum + next) : "";  }    private string Tabs(uint numTabs) {     StringBuilder sb = new StringBuilder();     for (uint i = 0; i < numTabs; i++)         sb.Append("\t");      return sb.ToString(); }    private string Tabs(uint numTabs) {     string output = "";     for (uint i = 0; i < numTabs; i++)     {         output += '\t';     }     return output;  }


I'm using "\documentclass[10pt]{article}" while preparing a document. Can the make the font even smaller? Does decreasing the font size from 12pt to 10pt reduce the size (in kB) of output pdf file?

I'm trying to make a document that has a very small font throughout, I tried this:  \documentclass[0.5mm, a4paper]{article} \documentclass[7pt, a4paper]{article}   But it doesn't seem that they allow me to go anything below 10pt.  This hack make it work, but not for the section headers:  \fontsize{4mm}{5mm}\selectfont   Does anyone know any better ways to do this?


I'm trying to fix my slow wifi connection and when I typed  the command I got an error message.  rmmod iwlagn: rmmod: ERROR: Module iwlagn is not currently loaded

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 reading "Introduction to Analysis Vol. 1" by Sin Hitotumatu.    There is the following theorem in this book.       Theorem:           $f(z) := \sum_{n=0}^\infty a_n z^n$.     The radius of convergence of $f(z)$ is $1$.     $\sum_{n=0}^\infty a_n = f(1)$ converges.     $\alpha \in (0, \frac{\pi}{2})$.     $A := \{z \in \mathbb{C} | |z| < 1\} \cap \{z \in \mathbb{C} | -\alpha \leq \arg(1-z) \leq \alpha\}$.           Then, $\lim_{z \in A, z \to 1} f(z) = f(1)$.     Let $B := \{z \in \mathbb{C} | |z| < 1\}$.    Please tell me an example such that $\lim_{z \in B, z \to 1} f(z) \ne f(1)$.

$D=\{z\in\Bbb C:|z|<1\}$. Let $f(z)=\sum\limits_{n=0}^\infty a_n z^n(a_n,z\in\Bbb C)$ be a power series, the radius of convergence of $f$ is $1$,   $\sum\limits_{n=0}^\infty a_n =s$.   Give a  power series $f$ such that  $$\lim_{D\ni z\to1 }f(z)\ne s$$ If $f$ is convergent at every point of the unit circle, is there  such an power series $f$ ?   P.s. the problem is related to


Let $G$ be a finite group of even order. Prove that there exists an element $a \in G$ of order $2$.  My attempt:   Since the order of $a$ is even, $o(a)$ = the least positive integer $n$ such that $a^{2n}$=e.  Let $o(a)= 2n$  $a^{2n} = (a^2)^n = a^n = e$

I am working on the following problem from group theory:     If $G$ is a group of order $2n$, show that the number of elements of $G$ of order $2$ is odd.   That is, for some integer $k$, there are $2k+1$ elements $a$ such that $a \in G,\;\; a*a = e$, where $e$ is the identity element of $G$.


I am trying to use a for loop to assign values to an array in C (I'm using minGW).  At first I tried doing:  double flag[5] = {0.1};   but that only assigned the first variable in the array to 0.1.  Then I tried doing a for loop to assign each individually.  The reason why I don't want to hard code it is because I want the size of the flag variable to be flexible to the user's input.  My current code looks like this:      int cnt;     double flag[5];     for (cnt = 0; cnt < sizeof(flag); cnt++) {         printf("sizeof(flag) is %d\n",sizeof(flag));         printf("size is equal to %d and cnt is %d\n",size,cnt);         flag[cnt] = 0.1;     }     printf("size is equal to %d\n",size);   The variable "size" changes from 6 as it was previously determined to a garbage number, and I cannot modify the number of iterations.  For example, if I set cnt < sizeof(flag)-1, there is no change.  -2,-5, etc no change.  However if I drastically reduce the size, it gets stuck in an infinite loop.  sizeof(flag) is 40, not 5 like I'd want it to be, but dividing by 8 also gets it into an infinite loop somehow.  Any advice?  This question was answered, thank you everyone!

How do I determine the size of my array in C?   That is, the number of elements the array can hold?


I need your help to cover my wrapper class in the test class : **Wrapper class :** @JsonAccess(serializable='always') public with sharing class HelicoRequestsWrapper  {          public CritereTechnique critereTechnique;     public CritereLocalisation critereLocalisation;     @JsonAccess(serializable='always')     public class CritereLocalisation  {         public AdresseHorizontale adresseHorizontale;          }         @JsonAccess(serializable='always')     public class AdresseHorizontale {         public String codeINSEE;         public String codeRivoli;         public String numero;         public String libelleVoie;      }      @JsonAccess(serializable='always')          public class GammeOffreOperateur {         public String nom;     }    @JsonAccess(serializable='always')     public class SupportAcces {         public String code;         public GammeOffreOperateur gammeOffreOperateur;     }     @JsonAccess(serializable='always')     public class CritereTechnique {         public List<SupportAcces> supportAcces;     }         }   Test class @isTest public class HelicoRequestsWrapperTest {  private static testMethod void testmethod2(){        HelicoRequestsWrapper offer = new HelicoRequestsWrapper();              HelicoRequestsWrapper.AdresseHorizontale adresse = new HelicoRequestsWrapper.AdresseHorizontale ();         HelicoRequestsWrapper.GammeOffreOperateur objGammeOffreOperateur = new HelicoRequestsWrapper.GammeOffreOperateur(); objGammeOffreOperateur.nom='FIBRE DEDIEE';  adresse.codeINSEE='23';         adresse.codeRivoli='44';         adresse.numero='23';         adresse.libelleVoie='rue';               HelicoRequestsWrapper.CritereLocalisation critlocalisation = new HelicoRequestsWrapper.CritereLocalisation ();   critlocalisation.adresseHorizontale=adresse ;         offer.CritereLocalisation = critlocalisation; } }  the coverage still zero .

I have written below Wrapper class.  global class BI_VA_AutomationWrapper {      global class BI_VA_AutomationRequest {      webservice String userName;     webservice String emailId;     webservice String buinessUnit;     webservice String orgName;     webservice String country;     webservice String environment;     webservice String myShopNumber;     webservice String BidsId;//for testing     webservice String Type; //for testing  }  global class BI_VA_AutomationResponse {      webservice String responseStatus;     webservice String myShopNumber;     //webservice list<Error> errorMessages;     webservice String  errorMessages;//for testing   } global class BI_VA_Error {      webservice String type;     webservice String message;    }}   And test class is,  @isTest public class BI_VA_AutomationWrapperTestClass  { public static testMethod void unitTest(){      BI_VA_AutomationWrapper.BI_VA_AutomationRequest wrap= new BI_VA_AutomationWrapper.BI_VA_AutomationRequest();        wrap.userName='Test@test.com';     wrap.emailId='Test@test11.com';     wrap.buinessUnit='AH';     wrap.orgName='ORD';     wrap.country='US';     wrap.environment='QA';     wrap.myShopNumber='123456789';     wrap.BidsId='123';     wrap.Type='ResetPassword';              BI_VA_AutomationWrapper.BI_VA_AutomationResponse res= new BI_VA_AutomationWrapper.BI_VA_AutomationResponse();     res.responseStatus = 'Success';     res.myShopNumber = '987654321';     res.errorMessages = 'Test error';      BI_VA_AutomationWrapper.BI_VA_Error error = new BI_VA_AutomationWrapper.BI_VA_Error();     error.type = 'Test';     error.message = 'Test';  }}   Code coverage is 0% only.


I am trying to show that $g(x,y)=y f(x,y)$ with  $$f: \mathbb R^2 \rightarrow \mathbb R $$ $$ f(x,y) =  \begin{cases} \dfrac {2xy^2}{x^2+y^4} & (x,y)\ne (0,0) \\\\    0 & (x,y)=(0,0)  ~ \end{cases} $$  is not totally differentiable in $(0,0)$.   What I already have found out about the functions is that $f$ is not continuous in $(0,0)$, the function $g$ has all directional derivatives and they are equal to $0$.  The criterion I use for total differentials is that $f$ is totally differentiable in $x$, if there exists a linear map $L$ such that  $$\lim_{h \to 0}\frac{g(x+h)-g(x)-Lh}{|h|}=0$$  For $(x,y)=(0,0)$ we get  $$\lim_{h \to 0}\frac{g(h)-g(0)-Lh}{|h|}=\lim_{h \to 0}\frac{h_2f(h)-0f(0)-Lh}{|h|}=\lim_{h \to 0}h_2\frac{f(h)-f(0)}{|h|}-\frac{Lh}{|h|}=0 $$  Is it legitimate to deduce from that that $g$ is not totally differentiable in $(0,0)$ because $$lim_{h \to 0}\frac{f(h)-f(0)}{|h|}$$ does not exist, as $f$ is not continous in $(0,0)$?

I am new to multivariable calculus and my textbook doesn't give out solutions so I'm just wondering how you go about proving something like this? I know that a function is differential at a point $a$ if it's continous at $a$ and and the partial derivatives of $f$ exist near $a$ but I have never actually seen an example. Heres the question:    Assume $f(0, 0) = 0$, and determine whether $f(x, y) = \frac{xy^3}{x^2 + y^4}$ is differentiable at $(0, 0)$.


I have a deployment script and in it I'm trying to add a cron job. This is the code I am using which I found on stackoverflow. I'm running debian 8.  # ADD CRON crontab -l > mycron echo "10 * * * * cd /var/www/test/ && ./test" >> mycron crontab mycron rm mycron   When I run these commands I get the reply: no crontab for root  What am I doing wrong here, and how can I get it so I can add this cron job using a bash script? Thank you.

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I am resampling a raster from one CRS to another, and from 0.5 m resolution to 10 m.  But I want the new cells to have even coordinate extents, instead the old coordinate decimals remain. How do I fix this?    I want the new raster to start at xMin 6875000.000,     but the new raster has 687499.521251    How do I change so new raster has even extents?

I have two raster files that are the same cell size but I cannot get them to align properly. (I want the black to line up with the pink)    When creating the black raster file (from using polyline to raster), I imported the pink raster in the Snap Raster section in the Environments setting. I thought that Snap Raster was supposed to make it line up?  Am I doing something wrong or is it a bug in Arc (I remember reading that this was a problem about two years ago), and if it is a bug is there a work around?  I have also read there is a Raster Shift, but I'm not sure what to enter in the X Coordinate and Y Coordinate. Since I only want the black raster to shift down, I know that the X Coor = 0 and the Y Coor should be negative something, but what are the units?  Thanks.


First of, i'm not from electronics background, i'm sorry if my question sounds stupid or irrelevant. I recently started a project as a hobby with a help of  i have purchased all the components and has built the circuit half way but i'm stuck at what kind of power adapter should i use i currently own a mobile adapter with output of 5V 350mA. But the Absolute ration of Arduino Pro Mini is 200mA as per   Is it possible to use a 5V 350mA DC input to my chip ? Or would it burn off my chip? if so what kind of adapter or a current regulator should i use ? A current regulator circuit would be much appreciated.

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


I'm trying to pass objects by value between threads with a queue.  Because there are multiple different objects, I made an abstract class.  class message { public :       virtual ~message(){}; };    then I have a subclass for each different type of message  class a_specific_message : public message { ... };   I read  for implementing the queue and I call it the following way:  concurrent_queue<message> queue; a_specific_message m{1, 2, 3}; queue.push(m);   My problem is that I need to override the operator= so the queue can clone the message  popped_value=the_queue.front();   I tried to add a virtual operator but it doesn't get called in the subclass.  I don't know how I could achieve something like this without passing object by reference.

Someone mentioned it in the IRC as the slicing problem.


Other related questions such as  and , plus the fact I actually cannot downvote a comment make me think downvoting a comment is not possible on Stack Overflow.  However I've seen today a loss of 1 reputation due to a downvote on a thread where I have posted a few comments but no question and no answer. The comments were discussed and some people didn't agree with me, hence the possible downvote, anyway I thought this feature didn't exist on Stack Overflow. See the reputation panel on my profile below:    The post in question is this one: *.  So if it's not a question downvote neither an answer downvote nor a comment downvote, which supposedly doesn't exist, what is this?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


Let $f$ be a real function defined on some interval $I$.   Assuming that $f$ both convex and concave on $I$, i.e, for any $x,y\in I$ one has $$f(\lambda x+(1-\lambda)y)=\lambda f(x)+(1-\lambda)f(y),\, \, \lambda\in (0,1) .$$ I would like to show that $f$ is of the form  $f=ax+b$ for some $a,b$.   I was able to prove it when $f$ is differentiable, using the relation  $$f'(x)=f'(y).$$  Anyway, I was not able to provide a general proof (without assuming that $f$ is differentiable, and without assuming that $0\in I$).   Any answer will be will be appreciated.  Edit: It is little bit different from tte other question . Here $f$ is defined on some interval, so $o$ not necessary in the domain. Please remove the duplicate message if this possible

Suppose $f:\mathbb{R}^n\to \mathbb{R}$ is both convex and concave, how to prove that $f$ is linear? or exactly speaking, $f$ is affine?  I thought for the whole day, but I cannot figure it out.   When I was working on this problem, I met another problem, are all the convex function continuous? If not, is there any counter example?  Actually, I can prove for one dimensional case, in which $f:\mathbb{R}\to \mathbb{R}$. However, I cannot generalize it into n dimensional cases.  By the way, I use definition for convex(concave) like this: $$f(t\vec{x}+(1-t)\vec{y})\leq(or \geq) tf(\vec{x})+(1-t)f(\vec{y}), \forall t\in[0,1].$$  Thank you so much!


I am new to blender and I have a 3D scan of a stone tablet (which I am unfortunately not able to share, so I will try to be as detailed as possible) which was imported as OBJ and MTL files.  The editor displays the texture and mesh perfectly, but when I render the scene (pressing F12) the texture is not there.  I am trying to use blender to reduce the file size of the tablet for use in a three.js visualizer for a website.  I have tried exporting the file as a JSON file (as well as several other file formats to the same effect) for use in my three.js webapp and thought it was an issue with three.js, but after seeing that blender did not render the tablet with the texture I now believe it is an issue with my blender configuration. I am unable to find within blender or online any way to check what current resources I have displayed and what options I have with them.  I have not applied a mesh or texture to the object, but when I do so it renders with the generated texture applied in the default pink.  I am confused as to where the disconnect is between the editor and the renderer. I am still figuring out what is important and where to find all the relevant information, so any help on that regard would be very much appreciated.  Here is what blender looks like for me with the sensitive parts censored (can't be too careful these days):   I have looked at this question:  And there is no material overwriting the texture - I have not assigned a material to the tablet at all. EDIT: In regards to the duplicate answer, I looked at that one as well and the issue I have is that it doesn't have an actual texture file that I can just put on it.  The OBJ MTL files come with their own file that can't be applied directly to the model.  Blender read the OBJ MTL files and recreated the object inside blender algorithmically - and now I need to know how to get blender to tell me where that texture is and how I can get it to show up in the render.  The texture is not on my hard drive, but entirely within blender which is the issue I am having.

I have added a texture to a cube in the UV editor and it shows up fine in textured view  But when I render it there is no texture  What have I done wrong?


Im trying to make a pipe using single edge, converted to curve, and then bevel it to add some thickness. but the result turns out weird.  as in the picture, the vertical section of the pipe is in uniform thickness, but the horizontal segment is much more thicker. This happen whether using built in bevel selector or using a bezier circle as bevel object.  how can i make it all uniform in thickness?

With the plane added delete 1 edge and bevel the side corner and with the bevel circle i have bevel it. Problem it bevel but the center part is flat and the both end are rounded like a tube. I have set the radius 1 yet to cant find the result to be fully tube.


I made the following edit whilst reviewing posts in the first posts review queue    It was immediately rejected by , there has been no other edit made to this post, how did this happen?  This situation differs from those presented in the following two questions           It differs in the following ways   The edit was not rejected as a result of another user with higher reputation making an edit. (see A user with full edit privileges saves an edit over yours ) The edit was not rejected as a result of the original poster making an edit of their own in within the five minute grace period. (see )   Unless a human decided to reject the edit, without giving a reason, this looks very much like a defect  I just noticed, that since the time that the edit was originally rejected another user has made exactly the same edits that I made to the question. The difference here is that the community user did not reject those exact same edits and I must add that the edits were made later than the original edit, so it's not likely there was a concurrency issue

I am sure this must have been asked quite a lot of times, but I am unable to find something about the guidelines the Community uses when approving / rejecting edits.  I just fixed a first question to be a bit more appealing, yet  was immediately rejected by the Community. I can live with that, but I was wondering what rules the Community user applies when looking at edits.  Any documents explaining that?


While I was reading  up on vehicular dynamics, I came across a point that when rear wheels are locked, lateral force acts on the front wheels.  Why does this happen?

are often used in motor-sports and stunt driving to turn around tight corners.  Essentially, the driver applies the handbrake as he enters the turn, in order to "kick out" the back end and slide the vehicle around the corner.  However, applying the handbrake hard enough to lock the rear wheels while traveling straight will cause the rear of the vehicle to "kick out".  Given enough speed, the vehicle will spin 180 degrees.  Why do sliding wheels on a car want to "get in front" of rolling wheels?


I have an Asus RT-N66U router (using the latest firmware) that is connected to my ISPs fiber modem using PPPoE.  I have signed up for VPN access to PIA and setup the router to connect using its VPN client.  I also have a number of ports that I've opened for various applications in my network.  Now, both of these are working correctly - when used separately.  When I activate the VPN client all of the port forwarding stops working both through my normal IP address and through my VPN endpoint IP address.  Even with the VPN connection up, should I not be able to still make connections to my regular local IP address?  EDIT: For everyone pointing me to "Access my home network printer while I am using VPN to connect to work" - this is not the same as my question.  In that question, the user could not connect to his printer INSIDE his network while having an active VPN link.  My issue is having connections from the Internet INTO my network while the VPN link is up.  For example, if I have my VPN link connected to PIA, I cannot access my cameras from my work computer because my router just rejects the connection on port 9000.

When I work from home, I am connected to the resources in my company via VPN. In my home network there is a network printer in the same local network.   The problem is that when I open VPN to my company, I cannot access my home network printer any more. So whenever I need to print, I have to disconnect VPN, print, reconnect the VPN. It's extremely annoying.    Is there any solution how to configure the stuff so I can access both the VPN and the home network printer at the same time?  While on VPN, I can normally print to the company printers and access public internet resources.  My network configuration (ipconfig) is like that:  Ethernet adapter Local Area Connection:  IPv4 Address. . . . . . . . . . . : a.b.c.d // my company IP address Subnet Mask . . . . . . . . . . . : 255.255.255.255 Default Gateway . . . . . . . . . : 0.0.0.0  Wireless LAN adapter Wi-Fi:  IPv4 Address. . . . . . . . . . . : 10.0.0.101 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 10.0.0.138   And I can ping the local gateway 10.0.0.138, however I cannot ping my printer on 10.0.0.3. How is that possible?


I am trying to append a row into a list of rows. When I use print statement, everything prints correctly. However, when I use append, only the last value of the for loop appends into the statement. I am not using Numpy, because I am learning how to use for loops. This question is not relevant to this answer here  since it is not about the behavior of the list. I am simply trying to append the row into the list. It is the issue in the for loop, not in the list behavior. mat = [[5, 1, 1, 6, 8, 1, 7], [5, 0, 9, 0, 3, 5, 4], [5, 8, 3, 2, 5, 6, 5], [2, 9, 0, 0, 9, 1, 5]] binrow = [0]*4 num = 0 bincol =[[0]*4]*6  matbinrow = []  for i in range(0,len(mat[0])):   for j in range(0,4):     lbs = mat[0][i] % base     binrow[4-j-1] = lbs     mat[0][i]//= base   print(binrow)    bincol.append(binrow)       print(bincol)    My output is [0, 0, 0, 1] [0, 0, 0, 1] [0, 1, 1, 0] [1, 0, 0, 0] [0, 0, 0, 1] [0, 1, 1, 1] [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 1, 1, 1]]  I want it to be: [[0, 1, 0, 1],[0, 0, 0, 1],[0, 1, 1, 0],[1, 0, 0, 0],[0, 0, 0, 1],[0, 1, 1, 1]]

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 3 drop downs. The first is for year, second is for month, and the last is for days. Now I want to know when I click the 2015 year and month February the third dropdown should display a days up to 29 days. Now my question is there a function in javascript to check the months if it's 29, 30, 31. Is there any example out there?   my current code is below but I generate it using php:  <div class="select_day">      <select id="year" name="year">          <option value=""> -- </option>          {for $i = 1970; $i <= 2015; $i++}              <option value=$i >{$i}</option>          {/for}      </select>      <select id="month" name="month">         <option value=""> -- </option>         {for $i = 1; $i <= 12; $i++ }             <option value=$i >{$i}</option>         {/for}     </select> </div>

I've been using this function but I'd like to know what's the most efficient and accurate way to get it.  function daysInMonth(iMonth, iYear) {    return 32 - new Date(iYear, iMonth, 32).getDate(); }


I am still pretty new to Java. I got a sample at class, to create a simple user interface and a button that should change text upon click.   The GUI opens fine, but once I click on the button, I get a NullPointerException error.   This is my code:   import javax.swing.*; import java.awt.BorderLayout; import java.awt.event.*;  public class GUISimple1 implements ActionListener { JButton button;  public static void main (String[] args) {     GUISimple1 gui = new GUISimple1();     gui.empezar(); }  public void empezar() {      JFrame frame = new JFrame();     JButton button = new JButton ("Click");       button.addActionListener(this);      frame.getContentPane() .add(BorderLayout.NORTH, button);     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     frame.setSize(300,300);     frame.setVisible(true); }         public void actionPerformed(ActionEvent event) {         button.setText("Me han dado un click!"); } }   And this is the error, I receive when I run the application:   Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at GUISimple1.actionPerformed(GUISimple1.java:27) at     javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6533) at javax.swing.JComponent.processMouseEvent(JComponent.java:3315) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)   Any help would be appreciated.   Cheers and thanks in advance.

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


I use QGIS in my daily work, but since a few months back I'm unable to do this due the OpenLayers plugin no longer being functional. When I try to load a background map nothing happen - the canvas remains white. I have tried it on several computers and the same problem occurs. I use the latest version of QGIS (Lyon).

The Google Maps in my OpenLayers plugin in QGIS 2.12 does not show anymore. The other maps do show, that is:   OSM Bing MapQuest Stamen Apple Maps   I tried in QGIS 2.8 and Google Maps does not show there either. This is the case in both my home and work computers, which are on different networks. Did the Google Maps go away?


I'm trying to validate an phone number using regex. Basically, i don't know more about regex :) I want to validate it with country code and only numeric value Like: +1-1234567891  I'm using below code to make validation:  'phone_no' => 'required|regex:/^([0-9\s\-\+\(\)]*)$/',   But it's not working for country code, but it's work for only numeric value.  Can anyone have an idea how to make this validation without creating custom validation?  Many thanks!!

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


I have a few watched tags I would like to pay attention to. But the problem is when I'm going through StackExchange questions, sometimes I have to double check to see whether I have subscribed to that tag or not. This a problem when you don't remember all tags that you're subscribed. This could be easily avoided if we can easily identity watched tags from other tags.    However, this should not be aggressive or distractive. Users must always be able to focus on the questions.  This is an example...  Normal (without the feature): Watched  Tag:     Highlight (after feature implemented): Watched Tag:

Each of us have our list of favorite tags.  When a question has tag(s) that match one or more of ours, the background gets highlighted, drawing our attention to the question.  It would also be nice to highlight (perhaps using a bold font) the tags(s) that matched our own, so one could quickly do a further filtering of the question to see if it is of interest at the present time, like the following:    e.g. arduino is in my list of favorites, but the other two in each question are not.


The problem I am encountering is the warning message I get when running the c++ .cpp code. Is there another way I can convert an integer to a string.     Here is a snapshot of the code I am running, and where the problem is:   string empId2 = to_string(empId);

I was wondering if there was an alternative to itoa() for converting an integer to a string because when I run it in visual Studio I get warnings, and when I try to build my program under Linux, I get a compilation error.


I have a bunch of survey responses from people all over the country. Each survey has one question: "How much do you like X?" (X isn't important here), where answers range from 0 (not at all) to 100 (a lot).  I want to group the results by (for example) State. However, when I group things by State, some of these groups have a couple hundred responses, whereas others might have fewer than 10.  I want to take an average of my results by State, but States with few responses are going to potentially be misleading.   So I've been asked to add a "confidence rating" so people can determine which averages are meaningful, which aren't, etc, and I'm not sure how to properly quantify / include this sort of metric.  Making up an example:  State             Num Responses Average Rating Rhode Island            4            96 Texas                  124           77 Alaska                  2           100 Arizona                15            55 Washington             23            76 California             34            67

I have been looking into the inner-workings of the standard error recently, and I found myself unable to understand how it works. My understanding of the standard error is that it is the standard deviation of the distribution of sample means. My questions are:  • how do we know the standard error is the standard deviation of the sample means when we usually take just a single sample?  • why doesnt the equation to calculate the standard error mirror the standard deviation equation for a single sample?


I have updated the OS from Kitkat to Lollipop using system update. Now I want to factory reset. Does anyone know that after the factory reset Lollipop OS remains or it reverts to Kitkat?

I have upgraded my phone to Android 2.1. I need to reset my phone but I don't want to lose the upgrade. Is it possible to do this? How?


Let $a$ and $n$ be integers greater than $1$.  Suppose that $a^n - 1$ is prime. Show that $a = 2$ and that $n$ is prime.    First of all let   $$p =  a^n - 1$$  Since both $a$ and $n$ are integers greater than one then $$p \ne 2$$   Thus $p$ is an odd prime  Rearanging: $$a^n = p + 1$$  Thus $a^n$ is an even integer, and then $a$ is and even integer.   Taking $\log_2$ of both sides: $$ n\log_2(a) = \log_2(p+1) $$ and $$n = \frac{\log_2(p+1)}{\log_2(a)}$$  Since n is an integer then  $$\log_2(a) = 1$$ and $$a=2$$  I managed to get thus far, but when it comes to proving n is a prime I don't seem to know how to approach it.

Suppose  $a,n \in \Bbb N $. How do you prove that if $a^n-1$ is prime, then $a=2$ and $n$ is prime .  Is the converse true I.E : (if $p$ is prime then $2^p-1$ is prime)?


Reading package lists... Done Building dependency tree        Reading state information... Done E: The package libwacom2 needs to be reinstalled, but I can't find an archive for it.   Running Ubuntu 16.04

Running Synaptic I get the following error message:  E: The package hl1440lpr needs to be reinstalled, but I can't find an archive for it. E: Internal error opening cache (1). Please report.   Upon accepting the message, Synaptic quits.


I am trying to create a simple python script that will spin an edge around a parallel axis to create part of a cylinder. The script should be executed in batch and do the following:   Copy an empty template to a new file Open the new file Create the geoemtry Save the file   So far I have the following script:  import bpy import shutil  shutil.copyfile("./temp/template.blend", "./temp/myfile.blend")  bpy.ops.wm.open_mainfile(filepath="./temp/myfile.blend")  # Create the geometry coord1 = (1.0, 0.0, 0.0) coord2 = (1.0, 0.0, 1.0)  Verts = [coord1, coord2] Edges = [[0,1]]  mesh = bpy.data.meshes.new("Mesh 1") mesh.from_pydata(Verts, Edges, []) mesh.update()  # bpy.ops.mesh.spin(steps=9, dupli=False, degrees=90.0, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 1.0))  # Create object obj = bpy.data.objects.new("Object 1", mesh) obj.data = mesh  # Link object to scene scene = bpy.context.scene scene.objects.link(obj) obj.select = True  # Save the file bpy.ops.wm.save_mainfile(filepath="./temp/myfile.blend")   Which is run from the command line with:  blender -b --python temp/test.py   This works OK, but when I try to spin the edge with bpy.ops.mesh.spin (commented out above) then I have an error:  RuntimeError: Operator bpy.ops.mesh.spin.poll() failed, context is incorrect   I understand that I need to be in the 3DView context, but how can I achieve this from python?  Any help is much appreciated.  EDIT  So finally after a bit of digging the following code worked for me. Note that the API docs for the spin also refer to a keyword argument "degrees" which does not work. Using "angle" in radians seems to do the trick.  import bpy import shutil   shutil.copyfile("template.blend", "myfile.blend")  bpy.ops.wm.open_mainfile(filepath="myfile.blend")   # Create the geometry coord1 = (1.0, 0.0, 0.0) coord2 = (1.0, 0.0, 1.0)  Verts = [coord1, coord2] Edges = [[0,1]]  mesh = bpy.data.meshes.new("Mesh 1") mesh.from_pydata(Verts, Edges, []) mesh.update()  # Create object obj = bpy.data.objects.new("Object 1", mesh) obj.data = mesh  # Link object to scene scene = bpy.context.scene scene.objects.link(obj) scene.objects.active = obj  # Enter edit mode bpy.ops.object.mode_set(mode='EDIT', toggle=False)  # Set correct context for spin for window in bpy.context.window_manager.windows:     screen = window.screen     for area in screen.areas:         if area.type == 'VIEW_3D':             override = {'window': window, 'screen': screen, 'area': area}             bpy.ops.mesh.spin(override, steps=30, dupli=False, angle=1.0*3.14, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 1.0))             break   # Save the file bpy.ops.wm.save_mainfile(filepath="myfile.blend")

I keep on getting context errors in the Blender Python API.  I don't understand the issue of the context in the API, how do I know which is the correct context?   Thanks!


I am performing a meta-analysis to compare the diagnostic accuracy of different modalities on the same population. I have constructed SROC curves and have calculated the AUC values in each case. Is there anyway to compare the AUC values to check for significant difference? Thank you.

I have a test set of 100 cases and two classifiers.  I generated predictions and computed ROC AUC, sensitivity and specificity for both classifiers.  Question 1: How can I compute p-value to check if one is significantly better than the other with respect to all scores (ROC AUC, sensitivity, specificity)?    Now, for the same test set of 100 cases, I have different and independent feature assignments for each case. This is because my features are fixed but subjective and provided by multiple (5) subjects.  So, I evaluated my two classifiers again for 5 "versions" of my test set and obtained 5 ROC AUCs, 5 sensitivities and 5 specificities for both classifiers. Then, I computed the mean of each performance measure for 5 subjects (mean ROC AUC, mean sensitivity and mean specificity) for both classifiers.  Question 2: How can I compute p-value to check if one is significantly better than the other with respect to mean scores (mean ROC AUC, mean sensitivity, mean specificity)?    Answers with some example python (preferably) or MatLab code are more than welcome.


I am building a midi piano in java. In this case, I want to play pitches ,record pitches and playback them.  Then I used java thread to add pitch to queue and add delay to queue. I used thread object to these process and call it in constructor. After the call this constructor it gives NullPointException.  Can you help me found out why?  public PianoPlayer() throws MidiUnavailableException{      queue = new LinkedBlockingQueue<NoteEvent>();        delayQueue = new LinkedBlockingQueue<NoteEvent>();      machine = new PianoMachine(this);      processQueue.start();      processDelayQueue.start(); }  Thread processDelayQueue = new Thread() {     public void run(){         while(true){             if(queue.isEmpty()){             }             else{                 try {                     NoteEvent e=queue.take();                     midi.Midi.wait(100);                     queue.put(e);                             } catch (InterruptedException ex) {                     Logger.getLogger(PianoPlayer.class.getName()).log(Level.SEVERE, null, ex);                 }             }         }    } };

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