I am having some trouble with scoping for a project I was working and was able to generalize the problem as follows.   I have a list of objects that I want to iterate through using a foreach loop and pass into a helper function. In the helper function I want to have a locally scoped version of the object to operate on with out modifying the original object.  I understand that functions in javascript pass objects by reference but it should possible to locally scope the reference.   Does anyone have any as to what I am doing wrong? Is there a way to do this without cloning the object. I'd prefer not to have to rebuild each object since the objects are quite big and performance is important.  var gloabalList = [{n:0},{n:0},{n:0}]; var output = []; gloabalList.forEach((item,index)=>{     gloabalList[index].n = index;     //at this point the value n is the index     messUpItem(item);         //at this point n is 2 we want it to be the index     output.push(item.n); });  //we want this to be (1,2,3) but it is returning (2,2,2) alert(output);  function messUpItem(item){     var x = item;// this should copy object val but its grabbing a reference     x.n = 2;     return item; }

I have an object x. I'd like to copy it as object y, such that changes to y do not modify x. I realized that copying objects derived from built-in JavaScript objects will result in extra, unwanted properties. This isn't a problem, since I'm copying one of my own literal-constructed objects.  How do I correctly clone a JavaScript object?


I am learning proofs and a question was posed which asked us to prove that $\sqrt{2}^{\sqrt{2}}$ is irrational. They mentioned this - Hint: try using the log10 function...  I tried my hand at the proof by contradiction. Assuming $\sqrt{2}^{\sqrt{2}}$ is rational. Hence,   $\sqrt{2}^{\sqrt{2}} = \frac{p}{q} \implies \big({\frac{p}{q}}\big)^{\sqrt{2}} = 2$  Can I now say, that we know that $\sqrt{2}$ is irrational, but $\frac{p}{q}$ and $2$ are rational;   If $a$ is rational and $b$ is irrational, $a^b$ must be irrational. *(1)  In our case $a^b = 2$ which is rational: a contradiction to our original assumption.  This is just tomfoolery on my part. I don't know if *(1) is even true or not; how can I approach such a problem?

The fact that there exists irrational number $a,b$ such that $a^b$ is rational is proved by the law of excluded middle, but I read somewhere that irrationality of $\sqrt{2}^{\sqrt{2}}$ is proved constructively. Do you know the proof?


I found a non-spam message that was automatically placed in spam folder (a false positive). In the Gmail interface, I would click "Not spam" to remove the message from spam folder. But I could not find any such action in the Inbox interface.   How can I tell Inbox that this message (a) was not spam, and (b) should not be deleted in 30 days?

There is a newsletter I receive that Gmail insists should go into the spam folder.    How can I mark it as not spam and move it to the inbox?  I know how to do it in Gmail, but not in Inbox.  How can I tell Gmail not to send that newsletter to spam in the future?


I am having trouble understanding why a division is made between heat and work. The units for energy is $\text{kg} \, \text{m}^2 \, \text{s}^{-2}$. The only way to obtain this unit is if you exert a force over a distance - that is, if you do work. In other words, the only way to change the energy of something is if you do work on it. However, in thermodynamics, we are taught that there are two ways of changing the energy of a system: (1) heat transfer and (2) work. This got me thinking about how something other than work can change the energy of a system. But, given that heat transfer is just a transfer of energy through collisions at the microscopic scale, can we go as far as to say that heat is just work done at a microscopic level?

Although work and heat do the same thing (increase or decrease the internal energy of the system), There is still a fundamental difference between them. For example, The way in which entropy is defined is a very good way to differentiate between work and heat. But, why is there such a distinction between the two things? Is it the limitation of Newtonian mechanics that it never accounted for something like heat which could also change the energy of the system? Is the word "Thermodynamical work" or "Hidden work" suitable for heat?


Ubuntu 16.04 64bit. apt-get update hangs here..  $ sudo apt-get update  Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease                                                 Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]                                Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]        Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2 kB] Fetched 281 kB in 2s (126 kB/s)      Don't know what it's doing, but top reports a new process:    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                2476 root      20   0  134232  37976   9708 R  99.7  0.1   3:36.12 appstreamcli                                                                                The graphical updater doesn't make it to the end either. How can I fix this?

It started few days ago. I'm running sudo apt update command and it never ends. Terminal output is  Get:1 http://ru.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Hit:2 http://archive.canonical.com/ubuntu xenial InRelease                      Hit:3 http://ppa.launchpad.net/attente/java-non-latin-shortcuts/ubuntu xenial InRelease Hit:4 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease                    Hit:6 http://ru.archive.ubuntu.com/ubuntu xenial-updates InRelease              Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB]     Hit:8 http://dl.google.com/linux/chrome/deb stable Release                      Hit:9 http://ru.archive.ubuntu.com/ubuntu xenial-backports InRelease            Fetched 341 kB in 2s (150 kB/s)   While this proccess system fan speed is boosted on my laptop and it's kinda annoying to listen to this. There is no excessive cpu activity though. Can you guys hint me why it happens?


I want to submit my form to an iframe, but it does not work. It instead opens in a new tab. How can I do it? Thanks  <form action="https://cp.payguru.com/" method="post" id="paymentData" target="FormFrame">   @foreach (var item in data)   {     <input type="hidden" name="@item.Name" value="@item.Value" />   }

<input type="submit" value="Devam Et" class="btn btn-primary" />
 </form>


Let $(X,\|\cdot\|)$ be a normed vector space. Show that $X $ is a Banach space if and only if for every succession $\{x_n\}_{n\in \mathbb N} $ such that $\sum_{n=1}^\infty ||x_n|| \lt \infty $, we have that $\sum_{n=1}^\infty x_n $ converges to an element of $X $.  If $X $ is Banach, it's clear that the statement above is true for every succession $\{x_n\}_{n\in \mathbb N} $ such that $\sum_{n=1}^\infty ||x_n|| \lt \infty $, because this implies that $\{S_N\}_N=\sum_{n=1}^N x_n $ is a Cauchy succession in $X $.  However, in the other sense, I don't understand what to do: if I take a Cauchy succession $\{x_n\}_n$ in $X $, I could show that it always converges by showing that $\sum_{n=1}^\infty  (x_n - x_{n-1}) $ converges to some point of $X $. However it is not true in general that $\sum_{n=1}^\infty ||x_n-x_{n-1}|| \lt \infty $, even for a Cauchy succession. Do you have suggestions? Thanks

The following is an Exercise of Conway's Functional Analysis.   Prove that $X$ is a $\,Banach$ space iff whenever $\{x_n\}$ is a sequence in $X$, such that $\sum \| x_n \| < \infty$, then $\sum x_n$ converges.   I easily can show that if $X$ is a Banach space then $\sum x_n$ converges. My problem is showing that $X$ is a Banach space. For this I suppose that $\{s_n\}$ is a Cauchy sequence in $X$, then I want to make a series. For this I do not have any idea. Please help me.


In the İmages you can see the vase has a 2 different colours. The top is white and opaque, and the bottom is transparent and dark blue (thanks to my webcam you'll see it as black). My question is how can I colour my model vase like the real one?

I need to make the transition smoother between the 2 different colored objects in my scene, somehow like one of the colors fades into the other one, while still keeping the line between them.


This question is very basic one but at this moment I could not answer it.  We know $y=\pm\sqrt{x}$ is not a function because one value of $x$ corresponds to more than one value of $y$. Again $y=x^2$ is a function. But we can get the first  equation from the second one, so the first one should be a function, making contradiction.  Could anyone please tell me what I am missing.  Thanks in advance.

Why $f(x) = \sqrt{x}$ is a function (as I found in my textbook) since for example the square root of $25$ has two different outputs ($-5,5$) and a function is defined as "A function from A to B is a rule of corre- spondence that assigns to each element in set A exactly one element in B.", so $f(x) = \sqrt{x}$ is not a function?


Being a complete novice at this but having tried many methods, I cannot get my logo to look crisp in my Twitter or Facebook profile pictures. It looks fine in Instagram. I have been dabbling in GIMP and Inkscape to generate a simple  logo for my social media accounts. In my ignorance I first made a raster logo by tracing a picture in GIMP (pictured).  This worked out fine for Instagram (maybe because the size of the canvas, 1080 px sqaure, was the same as Instagram preferences?). After resizing the image as per Twitter/Facebook recommendations and trying both PNG and JPG uploads, it looks terrible in both at thumbnail size, particularly in the phone versions. I've tried a bunch of different things to solve this (thanks to this fab forum and a few youtube tutorials): changing pixel density, changing export quality, changing file type, using filters, e.g. Gaussian blur, making it transparent, making it white background, etc... I redrew it (roughly) as a vector in Inkscape using the bezier pen tool (pictured below). This was an experiment to see if having a vector version would solve the problem. It didn't, it still looks awful after uploading it at the recommended pixel dimensions, trying both PNG and JPG. It looks extremely pixelated as the thumbnail on a phone.  I'd be happy to start again but I don't know where to start. What do I need to do to create a black and white logo which compresses well in Twitter and Facebook profile pictures?

After uploading an image, Facebook converts it to a new image.  Their conversion process introduces artifacts and mottling to the magenta-ish parts of the image.  Original image:   Facebook's conversion:   Are there ways to preserve the original quality of this image and have the image appearance on Facebook reflect more of the original quality?


The devops tools ecosystem is puzzling to me. Instead of shell scripts that work everywhere everyone in the server orchestration/management space is bolting on their own proprietary formats. Ansible has their YAML playbooks, Puppet has its class/graph language, salt like ansible has some kind of YAML format, chef is an embedded Ruby DSL. Out of all of these approaches I like chef the best because it does the simplest possible thing. So I guess one benefit is better visibility into the fleet when you use one of these tools but that's orthogonal to the actual configuration and provisioning component.  I don't quite get why everyone is trying to re-invent shell scripts with YAML because more often than not ssh -t is all I need to get things done along with a library of some shell scripts. These scripts are usually packaged as self-contained tar files and are small and simple enough to be mixed and matched as necessary. They have zero dependencies other than bash and will pretty much just work anywhere. So why is it then that a simple solution like that is not good enough for ansible, puppet, chef, etc.? What do all these solutions gain by replacing bash scripts with some other format?

New to Puppet and Chef tools. Seems like the job that they are doing can be done with shell scripting. Maybe it was done in shell scripts until these came along.  I would agree they are more readable. But, are there any other advantages over shell scripts besides just being readable?


Which sentence is correct?  She, as well as her parents, love Dwayne dearly. She, as well as her parents, loves Dwayne dearly.  I thought it would be love as in “they love him dearly”.  But MS Word editor says it’s loves, as it is referring to the she in the statement. But MS Word editor is far from perfect.

My question arises from , where OP asks whether he should use the singular or plural verb form after "the title, as well as the tone,"  As luck would have it, when I searched Google Books for , I found...        ...and...        At the risk of having this question closed as just peeving, I feel that the first one should have been plural "err", because without the commas it seems to me both "the title" and "the tone" have more or less equal status as "joint" subjects of the verb, making it plural.  On the other hand, I feel the commas in the second example effectively demote "the tone" to "parenthetical" status (the clause is almost incidental). Since this encourages us think of "the title" as the primary subject, it should have been singular "derives".  I'm no great fan of "grammatical rules", but it seems weird to me that the only two relevant examples for this specific wording should both (in opposite ways!) contradict my inclinations.  What's going on?


In the computer world error messages are written without verb 'be'. For example,        file not found,   file not exist,   command not found,   no such file or directory      and so on. So why verb 'be' is being missed?  UPD My question is duplicate. See

Newspaper/news article headlines usually have different syntax rules, for example   No copula. North Korea trip 'successful' Past events written in present. Qantas cancels flight out of frozen Heathrow Predictions written with infinitive. Britain's 'crossbow cannibal' to die in jail Very often not in complete sentence. No indefinite/definite articles. Ivory Coast Faction Squeezes UN Force Using a comma instead of "and". Romania, Bulgaria face delay in joining Schengen.   Why these rules and are there any other rules?


I have a react website served by reverse proxy inside nginx. On top of that, I have SSL. Certbot is handling redirects from http to https. I would also like to setup redirects from www to non-www. I am wondering what is the correct way to do this?  My config looks like this:  server {     server_name example.com www.example.com;     location / {         proxy_pass http://localhost:8000;         proxy_http_version 1.1;         proxy_set_header Upgrade $http_upgrade;         proxy_set_header Connection 'upgrade';         proxy_set_header Host $host;         proxy_set_header X-Real-IP $remote_addr;         proxy_set_header X-Forwarded-Proto http;         proxy_set_header X-Forwarded-For $remote_addr;         proxy_set_header X-Forwarded-Host $remote_addr;         proxy_cache_bypass $http_upgrade;         proxy_hide_header X-Powered-By;         add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;         add_header X-Frame-Options "SAMEORIGIN" always;         add_header X-XSS-Protection "1; mode=block" always;         add_header X-Content-Type-Options "nosniff" always;         add_header Referrer-Policy "origin-when-cross-origin" always;     }     error_page 502 /index.html;     location /index.html {         root /var/www/subdomains/service;     }      listen 443 ssl; # managed by Certbot     ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot     ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot }  server {     if ($host = example.com) {         return 301 https://$host$request_uri;     } # managed by Certbot      if ($host = www.example.com) {         return 301 https://example.com$request_uri;     }      server_name example.com;     listen 80;     return 404; # managed by Certbot }   Note that both of the pages (www and non-www) are currently working. I just want to avoid duplicate links, so I would only like the non-www version.

I've checked out quite a few other answers to similar questions as well as tutorials on DigitalOcean, etc., with no success. Sorry for what is probably a very obvious problem - I'm new to this.  Essentially, I need to set up redirects so that http://, ., and . all redirect to https://.  Currently, https:// works fine and http:// redirects to https://. I need to redirect www traffic because the SSL cert is only configured for non-www. However, when I've tried to add another server block to the config to redirect www (http and https) to https://, the server closes the connection on all 4 variants.  Here's my config:  # HTTP - redirect to HTTPS server {     listen 80;     server_name www.example.com example.com;     return 301 https://example.com$request_uri; }  # HTTPS www - redirect to non-www RESETS CONNECTION #server { #    listen 443; #    server_name www.example.com; #    return 301 https://example.com$request_uri; #}   # HTTPS — proxy all requests to the Node app server {     # Enable HTTP/2     listen 443 ssl http2;     server_name example.com;      # Use the Let’s Encrypt certificates     ssl_certificate /etc/not/my/path/live/example.com/fullchain.pem;     ssl_certificate_key /etc/not/my/path/live/example.com/privkey.pem;      # Include the SSL configuration from cipherli.st     include snippets/ssl-params.conf;      location / {         proxy_set_header X-Real-IP $remote_addr;         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;         proxy_set_header X-NginX-Proxy true;         proxy_pass http://0.0.0.0:2368/;         proxy_ssl_session_reuse off;         proxy_set_header Host $http_host;         proxy_cache_bypass $http_upgrade;         proxy_redirect off;     } }   Can anyone tell me what I'm doing wrong? Again I know it's probably painfully obvious but I just can't get this to work. Should I be doing this with something other than an NGINX redirect?


I am interested to know about rules in writing abstract in social sciences. Is it wrong if you just cited in the abstract around two key authors of frameworks where your study was based? Then citations were avoided for the rest of the abstract?

I'd like to know your opinion on citations in abstracts. At my university, there is no rule on that matter so it's basically a question of preference.  Do you think it's okay to have citations in an abstract or do you  personally prefer to have the abstract be a ``stand-alone'' piece of  work?


I'm using the book class and I want to remove the final dot in the section number, i.e, I have  1. Chapter Name 1.1. Section Name 1.1.1. Subsection Name 1.1.1.1. Subsubsection Name   I want   1. Chapter Name  1.1 Section Name  1.1.1 Subsection Name  1.1.1.1 Subsubsection Name   Looking for similar post, I found [ and although the solution is very good I still have a problem: when I use the code es-nosectiondot the dot of the chapter disappears in the ToC, same is for LoF and LoT, i.e, Figure 1 (Table 1) instead Figure 1. (Table 1.), so, following the post I use the code \def\numberline#1{\hb@xt@\@tempdima{#1\if&#1&\else.\fi\hfil}}, which is useful because it solves the previous problem, but now the dot of the section, subsection and subsubsection appears in the ToC, i.e,  1. Chapter Name 1.1. Section Name 1.1.1. Subsection Name 1.1.1.1. Subsubsection Name   This is my MWE:  \documentclass{book}  \usepackage[spanish,es-nosectiondot]{babel}  \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3} \counterwithout{figure}{chapter} \counterwithout{table}{chapter} \addto\captionsspanish{%     \renewcommand{\tablename}%     {Tabla}% }  \makeatletter  %%add prefix Figura/Tabla in LoF/LoT  \long\def\@caption#1[#2]#3{%   \par   \addcontentsline{\csname ext@#1\endcsname}{#1}%     {\protect\numberline{\csname fnum@#1\endcsname}{\ignorespaces #2}}%   \begingroup     \@parboxrestore     \if@minipage       \@setminipage     \fi     \normalsize     \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par   \endgroup}   \renewcommand*\l@figure{\@dottedtocline{1}{0em}{5em}}%   \let\l@table\l@figure   %%egreg's code  \def\numberline#1{\hb@xt@\@tempdima{#1\if&#1&\else.\fi\hfil}} \makeatother  \begin{document}  \tableofcontents \listoffigures \listoftables  \chapter{Chapter} \section{Section} \begin{table}[h] \caption{Some table} \centering abc \end{table}  \begin{figure}[h] \caption{A figure} \centering xyz \end{figure} \subsection{Subsection} \subsubsection{Subsubsection}  \end{document}     I want  ToC 1. Chapter 1.1 Section 1.1.1 Subsection 1.1.1.1 Subsubsection  LoT Table 1.  LoF Figure 1.  1.1 The Section  Content 1.1.1 The Subsection  Content 1.1.1.1 The Subsubsection  Content

I wonder is there any way to change the format of section numbering from 1.1 to 1.1. ? I know this is trivial, but I really need to add one more dot after the section number. Does anybody know how to do that?  Thanks a lot


I am very new to ArcGIS and I hope I have over-looked something obvious with this!  I have a set of polygons that have been loaded into ArcGIS Pro 10.3 without coordinate information. Unfortunately, it is not possible for me to get the co-ordinate information however I have been able to move the polygons to the correct position on a world map (it was quite easy because they line up with roads). However, I am unable now to 'share' this data online because I get the error: '20028 Data source has no spatial reference'.  Please does anybody know a way around this? Is there another way of sharing it or, ideally, can I get ArcGIS to work out the spatial references given the positions of the polygons on the map?

I am very new to mapping and I have loaded a set polygons from a shapefile into ArcGIS Pro. They appear correctly however they have clearly lost (or didn't have in the first place), their longitudinal and latitudinal information as they are currently placed in the middle of the ocean, which I believe is the 0 lat, 0 long position.  I can manually move these polygons but it won't let me save the moves, so when I click 'select', it moves back to the original location. Both of the 'save' and 'discard' buttons are greyed out and cannot be clicked. If I click 'finish' on the move tool then it will snap back to the original location too.  Does anybody have any ideas?


Is is possible to prove that  $${10 \choose 1 } + {10 \choose 3} + {10 \choose 5} + {10 \choose 7} + {10 \choose 9} ={2^{10-1}}$$   Thanks in advance.

Show that $$\sum_{k=0}^n(-1)^k\binom nk=0$$ So for odd $n$ we have an even number of terms. So $\binom nk=\binom n{n-k}$ which have opposite signs. Thus the sum is 0.  For even $n$ we have that $$\sum_{k=0}^n(-1)^k\binom nk= \binom n0+\sum_{k=1}^{n-1}(-1)^k\binom nk+\binom nn$$ Now $$\sum_{k=1}^{n-1}(-1)^k\binom nk= \sum_{k=1}^{n-1}(-1)^k\left[\binom{n-1}k+\binom{n-1}{k-1}\right]$$ What would that sum be in the square brackets?


I want to create a function that allocates space for a pointer (from main) to point at. If having the memory allocated in a function, will this memory still be available and safe to use after the that function returns? Here is an example of code:  int foo(int **number) {     *number = (int*)malloc(sizeof(int)); }  int main() {     int *myVar;     foo(&myVar); }   So we see that the memory is allocated in the process of execution of the foo() function.   Will the memory for the myVar variable be allocated in "space" of the foo() function, or in "space" of the main()?   After finishing the execution of the foo(), its memory is being cleared. Will myVar point to the same "space"? Will it be safe to use?   Could it be overwritten by other function, or variable declarations?

Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster?


Example Sentence:     Can Amazon stock go down if the UPS or other Amazon shipping partners suddenly jack up their shipping prices?   Is it plural, jack, or singular, jacks? Usually with two singular nouns combined by or, I'm pretty sure it's a singular verb like The book or pen is in the drawer. But how about two nouns, one singular and one plural, combined by or?

I have been told that with the conjunction "or" we must apply the following rule: a singular verb is used if the subject that comes after "or" is singular. Is it correct?  I would naturally say the apple or the orange is good. But it seems that we should also say    the apples or the orange is good  but the orange or the apples are good.    Is it correct?  Otherwise, if I am thinking of "this or that or both", is it correct to use the plural? And say the apple or the orange are (both) good.


I'm using Ubuntu 13.04. When I try sudo apt-get update --fix-missing, I get a bunch of 404/Not Found and 403/Forbidden errors and it's preventing apt-get from working most of the time.  I can paste the full output if it's helpful, but here are just a few lines that might indicate the issue:  Err http://us.archive.ubuntu.com quantal-backports/main i386 Packages   404  Not Found [IP: 91.189.91.23 80] Err http://us.archive.ubuntu.com quantal-backports/restricted i386 Packages   404  Not Found [IP: 91.189.91.23 80] Err http://us.archive.ubuntu.com quantal-backports/universe i386 Packages   404  Not Found [IP: 91.189.91.23 80] Err http://us.archive.ubuntu.com quantal-backports/multiverse i386 Packages   404  Not Found [IP: 91.189.91.23 80] W: Failed to fetch http://apt.basho.com/dists/quantal/main/binary-amd64/Packages  403  Forbidden  W: Failed to fetch http://apt.basho.com/dists/quantal/main/binary-i386/Packages  403  Forbidden  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/main/source/Sources  404  Not Found [IP: 91.189.91.23 80]   I know that .   I don't really care about using Quantal stuff -- and in fact I'm not quite sure why these Quantal packages are here given that I'm using 13.04.  I don't want to upgrade to 14.  As a single isolated example, I'd like to install the default Java development kit:  user@device:~/ $ sudo apt-get install default-jdk   but this results in the above package errors, and more package errors if I try apt-get update --fix-missing, as noted.  How should I go about using apt-get to install the JDK without upgrading to a different version of Ubuntu?

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


I finished Super Mario World on the Wii U Virtual Console and I watched the credits. At the end was Mario, Peach and Luigi standing there with the words THE END. It won't go away no matter what I do. Whats going on?

I recently just beat the game on the Wii Virtual Console and the ending was just Mario, the Princess, and Luigi standing there. Does nothing else happen?


I've done fragments before and I've dealt with nnull pointers, but in this instance I get a null pointer when I try the onClickListener for the majorSecond5 button.  public class Intervals_and_chords extends Fragment {  Button majorSecond5;  public void majorSecond ()     {         notimportant     }  public View onCreateView(LayoutInflater inflater, ViewGroup container,                                  Bundle savedInstanceState) {             View view = inflater.inflate(R.layout.rhythm, container, false);           majorSecond5 = view.findViewById(R.id.majorSecond);           majorSecond5.setOnClickListener(new View.OnClickListener() {            @Override            public void onClick(View view) {                majorSecond();            }        });   return view;  }  }   Here's the Logcat:  01-29 14:44:46.826 2508-2508/com.stefanawesome.piano E/AndroidRuntime: FATAL EXCEPTION: main                                                                        Process: com.stefanawesome.piano, PID: 2508                                                                        java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference                                                                            at com.stefanawesome.piano.Intervals_and_chords.onCreateView(Intervals_and_chords.java:158)                                                                            at android.support.v4.app.Fragment.performCreateView(Fragment.java:2354)                                                                            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419)                                                                            at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)                                                                            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809)                                                                            at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799)                                                                            at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)                                                                            at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)                                                                            at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)                                                                            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229)                                                                            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)                                                                            at android.os.Handler.handleCallback(Handler.java:751)                                                                            at android.os.Handler.dispatchMessage(Handler.java:95)                                                                            at android.os.Looper.loop(Looper.java:154)                                                                            at android.app.ActivityThread.main(ActivityThread.java:6119)                                                                            at java.lang.reflect.Method.invoke(Native Method)                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

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 have a bunch of polygons to make from points that need to be more precise than the min bounding box of closest rectangle or circle but don't have an advanced license. Does anybody have a workaround for this? I'm using ArcMap 10.2.2.

I downloaded the georeferenced event dataset (top left) from this website:  It consists of coordinates of violent conflicts which differ in time and space. My aim is to connect the coordinates of one country during the same time (say a month) in a way that it forms a convex area. In other words, I want to create a polygon by connection only the outer coordinates with each other. I want to do this for every country for each time period; therefore, only an automatised process will do.  If you would like to see a picture, you can have a look at the code book of the top right(!) dataset. In case you wonder why I don't simply download the top right dataset: The data is only available until 2010, but I need it until 2014.  I work with the trial version of ArcGIS Pro 1.3  I have worked with ArcGIS before, but this is a few years ago and I used it for quite basic procedures.


public class Station {     String name;     boolean pass;     int distance;      // method to create a new Station taking the arguments of the name,pass and distance in the parameter     public static Station createStation(String name, boolean pass, int distance) {       }      // Array list containing all the Stations in London we will use     static Station[] StationList = {createStation("Stepney Green", false, 100), createStation("Kings Cross", true, 700), createStation(             "Oxford Circus", true, 200)};      public static String infoAboutStation(Station station) {         String message;         if (station.pass)             message = //string message         else             message = //string message         return message;     }      public static String checkInfo(String stationName){         String info = null;          for(Station station : StationList){                  if(stationName == station.name) { //it does not recognise it to be the same for some reason                 info = stationName + infoAboutStation(station);             }             else                 info = stationName + " message ";         }         return info;     }      public static void printInfo(){         Scanner scanner = new Scanner(System.in);         System.out.println("How many... ");         int totalResponses = Integer.parseInt(scanner.nextLine());          String choice;         for(int i = 0; i < totalResponses; ++i){             System.out.println("Enter a station: ");             choice = scanner.nextLine();             System.out.println(checkInfo(choice));         }     }     // psvm(String[] args) }  So the program runs fine but when we use "Stepney Green", "Kings Cross", "Oxford Circus" as the input for choice at checkinfo(choice), it does not recognise it to be the same for stationName == station.name in the method checkInfo(stationName //choice) Intellij debugger reads this at stationName == station.name -StationList = {Station[3]@980} -> 0 = {Station@994} 1 = {Station@997} 2 = {Station@998} -static -> StationList = {Station[3]@980} -stationName = "Stepney Green" value = {byte[13]@996} coder = 0 hash = 0 hashisZero = 0 -info = null -station = {Station@994}  -> name = "Stepney Green", pass = false, distance = 100 -station.name = "Stepney Green" -> value = {byte[13]@999] rest is zero Beside the statement it says stationName: "Stepney Green" station: Station@994. Instead of printing out stationName + infoAboutStation it goes to the else station and prints "Stepney Green is not a London Underground Station". I am so puzzled as to why. Also if you don't mind helping me as to making this code a little more efficient and better.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


There are a lot of sites copying SO questions & answers in the Internet (easily found in Google search results). I think it is done by robots. Is there anything SO can do to stop the robots to "steal" the contents from Stack Overflow ?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


Please refer to this snapshot of my English.SE profile rep page:    I have found six items that are confusing. I think they are by design, but they really fail on being intuitive and passing the user friendly bar. I have color coded them for easy reference.   Red - The two red bars encapsulate the exact same thing. This reiteration implies that I have collected 10 upvotes and 2 downvotes for this question when I have actually collected half. Orange - The orange boxes show that the events count is not equal to the total below it. I presume that it relates to there being those events in the time block, but with all daily events listed below this looks like a count error. Yellow - The yellow boxes show that the number there does not equal the sum of what is listed below. Again, I think it is relative to the time next to it, but, again, this is confusing at best when the whole day's events are listed below it. Green - The total daily rep count in the green box is correct, but because of the reiterations, it does not equal the sum of the events below. Plus it looks like it is off by one for what it appears to be summing. Blue - This is a reiteration as well, though it shows different content.   My profile now shows correctly, but this has happened before on a different SE site (don't remember which one). I figured it was a fluke, but with it happening a second time I thought I should post about it.

I have six upvotes for the one question with no intervening history. They have been summarised into two groups - one with 4 events and one with 2 events. However, when you expand either, both show all 6 events. Minor I know, just letting you know.


I have tried to reinstall Minecraft with Forge multiple times, but Minecraft still won't launch.  When I check "Launcher Visibility" and change it to "Hide Launcher" and re-open, I get this error log in the console:  [13:20:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [13:20:11] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [13:20:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [13:20:11] [main/INFO] [FML]: Forge Mod Loader version 7.10.18.1180 for Minecraft 1.7.10 loading [13:20:11] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_20, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_20 [13:20:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [13:20:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [13:20:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [13:20:11] [main/ERROR] [LaunchWrapper]: Unable to launch java.util.ConcurrentModificationException     at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_20]     at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_20]     at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-1.9.jar:?]     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]   How can I resolve this?

My minecraft will not start on only that version, I have a Windows 7 computer with Java 8u20 installed, because the latest java 7 update will not work at all(plus imma dev for other stuff).   [22:26:39] [main/INFO] [LaunchWrapper]: Loading tweak class name   cpw.mods.fml.common.launcher.FMLTweaker  [22:26:39] [main/INFO] [LaunchWrapper]: Using primary tweak class name   cpw.mods.fml.common.launcher.FMLTweaker  [22:26:39] [main/INFO] [LaunchWrapper]: Calling tweak class   cpw.mods.fml.common.launcher.FMLTweaker  [22:26:40] [main/INFO] [FML]: Forge Mod Loader version 7.10.25.1208 for Minecraft   1.7.10 loading  [22:26:40] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version   1.8.0_20, running on Windows 7:amd64:6.1, installed at C:\Program   Files\Java\jre1.8.0_20  [22:26:40] [main/INFO] [LaunchWrapper]: Loading tweak class name   cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker  [22:26:40] [main/INFO] [LaunchWrapper]: Loading tweak class name   cpw.mods.fml.common.launcher.FMLDeobfTweaker  [22:26:40] [main/INFO] [LaunchWrapper]: Calling tweak class   cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker  [22:26:40] [main/ERROR] [LaunchWrapper]: Unable to launch  java.util.ConcurrentModificationException     at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_20]     at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_20]     at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-  1.9.jar:?]     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]  Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and   will likely be removed in a future release


Would not the oscillation of the light wave slow down the wave? Does light travel at "c" of its net position over time, or does it travel at "c" on the wave?

This is my first time posting here, I am a school student who is just curious. So today I was wondering about how light works and how it travels, and this thought came to my mind:  Light is made of photons traveling in transversal waves, doesn't this mean that photons are moving in longer distances than light itself because photons don't move in a straight line, while taking the same time that light does to reach the same position, so does this mean that the speed of photons is actually greater than the speed of light?


Of the votes cast, 45 were up-votes and 25 were down-votes. Undo voted on questions $q$ times and $a$ times on answers.   Seen on the mobile site; on the overview of my profile.   Pretty self-explanatory. It's borked!

I just went to my  and saw this:     Something is not being parsed correctly it seems


I've just recently hit level 30 and completed all main missions that I'm aware of, minus two strongholds. There's no indication that I have to have completed the strongholds as well (although they're my next step)  According to sources online such as , you should receive your specialization at level 30 and get to pick one of the three.  However, I've been level 30 and received multiple caches for continuing to level up, yet no indication of where my specialization is.   Where/How do I choose a specialization?

What activity completions are needed to unlock the ability to pick a specialisation in the Base of Operations?


This post is basically a duplicate question of one I asked a little while back: . Unfortunately I can't get my own solution to work.  I'm trying to use a static variable in a custom module.  function tellafriend_userfullname_function() {   global $user;   $var = &drupal_static(__FUNCTION__);    if (!isset($var)) {     // generate contents of static variable     $var = user_load($user->uid);   }    return $var; }   The static variable will be used in the form submission handler and in hook_mail().  function tellafriend_form_submit($form, &$form_state) {   $var = &drupal_static('tellafriend_userfullname_function');   $params = array();    if ($form_state['values']['cv_included'] == '1') {     $params['1'] =  array('uri' => $var->field_cv_upload['und']['0']['uri'], 'filename' => $var->field_cv_upload['und']['0']['filename'],);   };    // Other email set-up goes here.    $message = drupal_mail('tellafriend', 'notify', $email, language_default(), $params); }  function tellafriend_mail($key, &$message, $params) {    $message['headers']['MIME-Version'] = '1.0';    $message['headers']['Content-Type'] = 'multipart/mixed;';    $message['body'][] = $var->field_full_name['und']['0']['safe_value']; }   What have I done wrong?

I'm trying to define a static variable for use in my custom module. I want it to let me pass a number from function to function. I'm using drupal_static() but I can't get it to work. How do I do this?  This is the code I'm using to define my static variable.  $var = &drupal_static(__FUNCTION__); if (!isset($var)) {   // generate contents of static variable   $var = '8'; } return $var;   I've tried putting it in a custom module.    function viewusercontact_locateuser($value, $key, &$counter) {    global $user;     /**********In here***********/     if ($value['uid'] == $user->uid) {       ........    } }   I can't seem to get it to work. What am I doing wrong?  (I got my code from the following guides)


Show that for $0<\theta<2\pi$:   $$\text{Re}\left(\frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}\right)=\frac{1}{2}+\frac{\text{sin}\left(n+\frac{1}{2}\right)\theta}{2\text{sin}\frac{\theta}{2}}$$   I am stuck up to this point \begin{align} \text{Re}\left(\frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}\right)&=\frac{1-\text{cos}\theta-\text{cos}(n\theta+\theta)+\text{cos}\theta\text{cos}(n\theta+\theta)}{2-2\text{cos}\theta} \\ &=\frac{1-\text{cos}\theta}{2-2\text{cos}\theta}+\frac{\text{cos}(n\theta+\theta)(\text{cos}\theta-1)}{2-2\text{cos}\theta} \\ &=\frac{1}{2}-\frac{\text{cos}(n\theta+\theta)}{2} \end{align}  I hint would be very helpful.

So I have this result  $1 + z + z^2 + ... + z^n = \frac{z^{n+1}-1}{z-1}$  which I proved already. Now I am supposed to use that result and De Moivre's formula to establish this identity     $1 + \cos\theta + \cos2\theta +... + \cos n\theta = \frac{1}{2} + \frac{\sin[(n+\frac{1}{2})\theta]}{2\sin(\frac{\theta}{2})}$   Can anyone help me?


As a new Ubuntu user I installed the OS by downloading the software via terminal commands without problems. Now I would like to install additional software packages. While trying to install downloaded packages via terminal I get errors. Please help me to install the downloaded Debian packages with terminal commands and please address possible repository dependencies.  The reason for not installing software from online repositories is that this produces reasonable internet traffic that cost me a lot. Therefore it would be good to find a way to install software packages without the need to download them each time.

I have looked at several pages and still am not getting clear instructions on how to download and install a .deb file. Specifically I would like to download this one:   How can I do this?


I have a new Lenovo laptop with Windows 8.1, and the alt-tab dialog looks like Windows XP.  Like this:   instead of like this:   It also contains a bunch of default icons that don't display a name. How can I fix this?

I've had an issue for a while now which makes my Alt + Tab not work and function correctly.  I can't:   Click on it It displays items which are supposed to be hidden (?) It doesn't use the Aero theme   I've tried the following:   Rebooting Closing dwm.exe Updating Windows.   If there is a need for OS: I'm running Win 8.1 x64.  Example:


I have been wondering what's the best way to install Ubuntu, on a Samsung Chromebook 2   Specification: Intel Celeron with 2GB of RAM and 16 GB of flash storage.  I am really not sure if that will be enough space for Ubuntu. I want to run my Linux games on here, then I realized it can't really do much. I am just a geek that wants to tinker with his hardware and operating system. And mostly because I want to use Ubuntu on the go, without using crouton. Even though it would void my warranty, but at the same time I don't want to brick my Chromebook since I just got it 2 weeks ago I somewhat enjoy Chrome os but I need my Ubuntu

I have installed Ubuntu 13.04 on my desktop (runs like a charm). Then I used Crouton to install Ubuntu 12. 04 on my chromebook samsung (ARM). It also works quite well.  Here comes my question. Can we have a true Ubuntu (preferably 13.04) on my ARM chromebook?  It seems that the Crouton/Ubuntu is not 100% the real thing.  The best option would be to have the full Ubuntu 13.04 and remove the Chrome OS.


I have something like this:  [ [span][link]              ]   but I would like something like this:  [       [span][link]        ]   Where the  and  element inside
 element are centered in the middle horizontally  span and a element have auto width  div has hardcoded width 250px  How to do that?  My current CSS code is not working, it's centered to the left ;(:  a {     margin: 0px;      padding: 0px;     display: block;     float: left;     width: auto; }  span {     float: left; }  div {     display: inline;     text-align: center;     margin-left: auto;     margin-right: auto;     width: 200px; }   and HTML:
    Name    Link

How can I horizontally center a
 within another
 using CSS?

Foo foo


My question is related to  question I asked last year. I am just getting around to picking up the problem again, and normally, I would just ask a follow-up question to the answer that was given, but the person who wrote it is away from MSE due to medical reasons, and I am in urgent need of an answer.  My original question was:     Let $p$ be a prime number and $\gcd(p,n)=1$.  Define an equivalence   relation on $\mathbb{Z}_{p}$ as follows: $x \sim y$ iff $n^{r}x = n^{t}y$ for some $r,t \geq 0$.  Let $m$ be the number of equivalence   classes of this equivalence relation.  Prove that $m-1$ is a divisor   of $p-1$.   I followed the answerer's advice and showed that $x \sim 0$ iff $x = 0$, and now am working on the next step,which is to show that any two equivalence classes of non-zero elements of $\mathbb{Z}_{p}$ have the same number of elements, call it $k$.  However, I am not sure how to do this part. Could someone please let me know how I am supposed to do this?  Thank you.

I am faced with the following problem:     Let $p$ be a prime number and $\gcd(p,n)=1$.  Define an equivalence   relation on $\mathbb{Z}_{p}$ as follows: $x \sim y$ iff $n^{r}x = n^{t}y$ for some $r,t \geq 0$.  Let $m$ be the number of equivalence   classes of this equivalence relation.  Prove that $m-1$ is a divisor   of $p-1$.   I must admit that I am at a loss as even where to begin with this one: the only thing I know for certain is that $m-1$ is certainly not a divisor of $p$! (Unless of course, $m-1$ is equal to either $1$ or $p$). Well, that and that since there are $m$ equivalence classes, one of them must be $[m-1]$.  I even tried working backwards, saying to myself okay, if $m-1|p-1$, then $\exists c$ such that $p-1 = c(m-1)\, \to \, p = cm-c+1$. But that also doesn't seem to get me anywhere.   It seems as though I have been staring at this forever with nothing to show for it. Thus, any assistance anyone out there could give me would be greatly appreciated.


I want to built a matrix like the picture:  Have a trial:  \begin{displaymath}  \left( \begin{array}{ccc}  b_{11} & \ldots & b_{1j} & \ldots & b_{1j} \\  b_{21} & \ldots & x_{22} & \ldots & b_{1j}\\  \vdots & \ldots & \vdots & \ddots & \ddots\\  b_{n1} & \ldots & x_{nj} & \ldots & b_{ns}  \end{array} \right) \end{displaymath}   However, it didn't work. Can someone help me? Thanks!

How do we add a matrix to a LaTeX document?


Let $(X,d)$ be a metric space and for $S \subseteq X$, $\Gamma \ge 0$, define the $\Gamma$-dilation of $S$ to be   $$S + \Gamma := \{x \in X : \exists s \in S \text{ such that } d(x,s) \le \Gamma\}.$$  If $S$ is compact then it's easy to see that $S + \Gamma$ is closed because, by the extreme value theorem, for any $x \notin S+\Gamma$ the function $S \ni s \mapsto d(x,s)$ has an absolute minimum $\Gamma_0 > \Gamma$.      My question is, is $S + \Gamma$ still closed if $S$ is only known to be closed, or is there a counterexample?   Any hints or solutions are greatly appreciated!

Let $X$ denote a metric space.  Whenever $S \subseteq X$ and $r \in \mathbb{R}_{\geq 0}$, write $f(S,r)$ for the following set.  $$\{x \in X \mid \exists s \in S : d(x,s) \leq r\}$$     Question. Given a closed set $S \subseteq X$ and any $r \in \mathbb{R}_{\geq 0}$, does it follow that $f(S,r)$ is closed?   If not, a counterexample $(X,S,r)$ would be appreciated.


I recently pulled a  from a Kaladesh booster box, and placed it into a deck I was working on. When playtesting the deck with some friends, I noticed a card with a clear visual marker on the card on the top of my deck. When I pulled it my next turn, it was my Padeem I had recently obtained.   Its a very, very clear marker, a white oval on the backside of the card. If it was on the front, I would just live with it, but I don't want to bring these cards to a LGS event and get accused of marking my cards, or having one of my friends always know whats in my hand. The frontside of the card is completely clean.   Do I have any options here? Can I get a refund or sell this type of card to someone who collects misprints? Am I just going to have to fill in the circle, and hope its not noticeable?

I bought a Magic the Gathering display box today with cards from the new edition Innistrad. Unfortunately one of the cards in a booster pack was damaged. It is not just a simple scratch - one corner is bent and a small part of the card is missing. According to different trading platforms this card would be worth about 6 Dollars minimum in mint condition. So it is not really expensive but also not totally worthless.  What can I do about this? Can I obtain a replacement card from the producer (WotC) or from the store I bought it from? How can I prove that the card was damaged when I opened the booster pack? I am sure I am not the first person who got a damaged card from a booster pack. How are such issues usually handled?


I have a div that has text that is right aligned.  I want to then center that div within its parent.  The code below only applies the right-alignment.  CSS  .outerDiv {     text-align: center;     width: 100%; }  .innerDiv {     text-align: right;     width: auto; }   HTML

         10
                      + 2
         12

   I know this can be done with using margin-left: auto; margin-right: auto in the outer div, but that requires that you set the inner div's width, which I don't know ahead of time.  Ideas?


By equivalence, i mean logical equivalence, not the String comparison. E.g. if I do Files.newBufferedReader(Paths.get("file.txt", System.getProperty("user.home")) and Files.newBufferedReader(Paths.get("~").resolve(Paths.get("file.txt"))), will I get the same file on Windows and other systems?

The difficulty is that it should be cross platform. Windows 2000, XP, Vista, OSX, Linux, other unix variants. I am looking for a snippet of code that can accomplish this for all platforms, and a way to detect the platform.  Now, you should be aware of  that user.home does not work correctly, so please do not provide me of textbook answers, I can find these myself in the manuals.


The same issue can happen with Deal. If I search for "AUG" I might get 100 results for 1 Group or 1 row, so in total I may have 300 rows with 100 results per row. So I obviously can't show that many deals. Which is why I am only showing a total # of deals. But if they search, what is the best way to show the matches? Would I put "Matched 2" after the # of total deals in a group?

I'm working on a redesign that needs to translate well from desktop to tablets. There is a table that could potentially hold thousands of entries. Think of this page as a dashboard. From what I gather, the user should be able to select multiple or all entries and apply a variety of actions (ex: delete, compare, edit). Unfortunately I only have screenshots to look at, so I'm not sure what all the interactions for this table are.  The full data for the entries should be available to the user on the tablet device (ie. all columns should display without scrolling or hiding columns). There are 8 columns ranging in width and the column on the end has a dropdown for extra actions specific to that entry.  I've explored this issue on Google and have found a few suggestions. My problem is similar to these questions: , . I've also looked at  that is referenced a lot in other similar questions.  However, as previously stated I cannot hide any columns. The strongest solution I've seen so far is displaying the data in card views, however this doesn't allow for entry comparison very well and it seems like it might be tedious if the user needs to select many entries at once.  Is there a more creative solution out there that would still allow the user to easily view and compare many entries at one time that translates well between desktop and tablet? Preferably the display would be the same for both desktop and tablet.  Sorry for the long winded details.  TLDR: I need a way to display large amounts of table data on a tablet without hiding columns or making the user scroll horizontally. The solution also needs to allow the user to select multiple or all entries to compare in the least-tedious manner.


A group $G$ is said to be solvable if, and only if, there exists a subnormal series of subgroups $\{e\} = G_0 \triangleleft G_1 \triangleleft \cdots \triangleleft G_n = G$ such that each factor $\displaystyle\frac{G_{i+1}}{G_i}$ of the series is an abelian group. Prove that a finite group $G$ is solvable if, and only if there exists a subnormal series of subgroups $\{e\} = G_0 \triangleleft G_1 \triangleleft \cdots \triangleleft G_n = G$ such that each factor $\displaystyle\frac{G_{i+1}}{G_i}$ of the series has a prime order (i.e. $\left| \displaystyle\frac{G_{i+1}}{G_i} \right | = p$ for some $p$ prime number). This exercise was proposed to us by our algebra teacher and I just keep thinking that there is something wrong here. Every time I looked up in the internet, other conditions were necessary for this to be valid. If it isn't, what are possible counter-examples? If it is valid, however, how can I prove it? Tried a huge amount of stuff and can't figure it out. NOTE: I do not have learned the definitions of solvable groups with derived series and commutators yet, so please do not use them. I mean, i want to learn but I think that this exercise just needs to be solved without them. NOTE 2: No, this is not my homework, this exercise will not be checked for points or anything like that, I just want to learn.

I'm trying to prove the equivalency of the following definitions for a finite group, $G$:  (i) $G$ is solvable, i.e. there exists a chain of subgroups $1 = G_0  \trianglelefteq G_1 \trianglelefteq \cdots \trianglelefteq G_s = G $ such that $G_{i+1}/ \ G_i$ is abelian for all $0 \leq i \leq s-1$  (ii) $G$ has a chain of subgroups $1 = H_0  \trianglelefteq H_1 \trianglelefteq \cdots \trianglelefteq H_s = G $ such that $H_{i+1} /\  H_i$ is cyclic for all $0 \leq i \leq s-1$.  (iii) All composition factors of $G$ are of prime order.  (iv) G has a chain of subgroups $1 = N_0  \trianglelefteq N_1 \trianglelefteq \cdots \trianglelefteq N_t = G $ such that each $N_i$ is a normal subgroup of $G$, and $N_{i+1}/ \ N_i$ is abelian for all $0 \leq i \leq t-1$.  It was simple to show that (iii) $\implies$ (ii) and (ii) $\implies$ (i). Now, I'm trying to prove that (i) $\implies$ (iii), and I'm getting stuck.   I know that If $G$ is an abelian simple group, then $|G|$ is prime, so all I need to show is that each $G_{i+1}/ \ G_i$ in the definition of solvable is simple.  If I knew that $1 = G_0  \trianglelefteq G_1 \trianglelefteq \cdots \trianglelefteq G_s = G $ were a composition series, then each $G_{i+1}/ \ G_i$ would be simple by definition. But the definition of solvable doesn't assume a composition series. I know every group has a unique composition series, but I'm not sure how to connect that to the subgroups in the definition of solvable.   More generally, I guess I just don't understand how being abelian connects to being of simple or of prime order.  Any pushes in the right direction would be appreciated!


If I've shown that, for a given deductive system, $$\vdash \alpha \Longrightarrow \nvDash \alpha$$ i.e the system isn't sound, can it be strongly sound? or in other words does strong soundness implies soundness?

let D be a deductive system. The system's axiom set, A, includes all propositions that are not tautology, and the only rule of inference is $\frac{\alpha \vee \beta}{\alpha \wedge \beta}$. I need to answer:  Show with induction on the proof that $ \vdash \alpha \Longrightarrow \nvDash \alpha $, i.e if $ \alpha $ can be proven from the empty set, then exists a model $ M $ such that for every $ \varphi \in A $, $ M(\varphi)=T $ and $ M(\alpha)=F$. Is the system strongly sound? Is $X\nvDash \alpha \Longrightarrow X\vdash \alpha$? Prove that the empty set isn't consistent in D    I've already asked about this part of the question here but I still have a problem with it, because every axiom, $a\in A$,  $\vdash a$ and $A \models a$, in contradiction to what I'm supposed to prove here. Moreover because the axiom set includes all what isn't tautology it also includes all that is contradiction, which means that there is no model $ M $ such that for every $ \varphi \in A $, $ M(\varphi)=T $ which means for every proposition $\psi$, $A\Longrightarrow \psi$. This one was fairly easy base on (1) the system isn't sound so it can't be strongly sound. I'm not even sure how to approach this, I don't even have an intuition whether this is correct or not. Assuming this is wrong, I need to find a set $X$ and proposition $\alpha$ such that $X\nvDash \alpha$ but $\alpha$ cannot be proven from $X$, and if it's correct I need to show that for every set, $X$, and every proposition $\alpha$ such that $X\nvDash \alpha$, $\alpha$ can be proven from $X$ On the surface this looks pretty easy, both $(\varphi \wedge \psi)$ and $\neg(\varphi \wedge \psi)$ are axioms, as they aren't tautology, hence $\vdash (\varphi \wedge \psi)$ and $\vdash \neg (\varphi \wedge \psi)$ and the empty set isn't consistent but this seems too easy, like I'm missing something.   EDIT: I might have come up with a solution for (3), if $X\nvDash \alpha$ it means that $\alpha$ isn't a tautology and if it isn't a tautology it is an axiom in D and therefore can be proven from $X$


I was amazed to learn that we can use Imaginary unit iota into physical quantities like time and Temperature but how exactly?  The explanation was not something I would say stellar so I am hoping can anyone explain Imaginary Time and Temperature and other Imaginary physical quantities wrt quantum mechanics and what is wick's rotation?

What is imaginary (or complex) time? I was reading about Hawking's wave function of the universe and this topic came up. If imaginary mass and similar imaginary quantities do not make sense in physics, why should imaginary (or complex) time make sense?    By imaginary I mean a multiple of $i$, and by complex I mean having a real and an imaginary part, i.e., $\alpha + i\beta$, where $\alpha, \beta \in {\mathbb R}$.


We can accomplish the same thing by doing:  localhost:3000/endpoint?var1=val1&var2=val2   That we can do by using POST with a JSON body.  So why should anyone use PUT/POST/PATCH if they can get the same goals by using url params? Even with auth, instead of header, you can send the information of the auth token back and forth by using a parameter?

From what I can gather, there are three categories:   Never use GET and use POST Never use POST and use GET It doesn't matter which one you use.   Am I correct in assuming those three cases? If so, what are some examples from each case?


I had created a Stack Overflow account 4-5 years back using an email id provided by the company for which I used to work back then.  I no longer work in that company and no longer have access to email address. So after a while I created this Stack Overflow account with my personnel email which I am using since then.  I came across the merge feature and gave it a try by filling in a form.  But as per the procedure it sends out two identical emails to both accounts to verify and confirm the merge.  As I no longer haver access to the older email address, I will not receive the second email by which I can merge two accounts.  Is there another way I can achieve this?

I used to log in to Stack Overflow using my Yahoo ID. Now that I've deleted my e-mail address I can't access my account on Stack Overflow. I am unable to log in through Stack Exchange either. Is there any way to merge my old profile and my new one?  My old profile:


I have the below xml:      <node1>     some text here     <newline/>     and some text here.     </node1>   the xml is 3rd party generated, hence can't modify it. I simply want to copy the text and ignore the <newline/>. Currently, I am getting the below output:      some text here<newline/>and some text here   While I want this output, replacing the newline tag with a whitespace:      some text here and some text here    Please help. Thanks!

wondered if you could help me please? I have node in xml that is as followed  $LOG: 08880xbpnd $ fhdsafidsfsd df sd fsd f sd fsd  I was wondering is there anyway to make all the text go on to one line so that it then can be passsed through to a javascript function? so it would turn out like this   $LOG: 08880xbpnd $fhdsafidsfsddfsdfsdfsdfsd


I have an AMD R5 M330 graphics card, but my system won't use it. I've tried checking if there are any proprietary drivers available, but nothing showed up. I want to know if there's a way i could configure my system to use that graphics card instead of my integrated Intel graphics card.  lspci -v | grep ATI 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] (rev ff) (prog-if ff)

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


Prove that the operator norm defined by $$\left \| A \right \| = \left \| A \right \|_{V\rightarrow W} = \sup_{0\neq v\in V} \frac{\left \| Av \right \|_{W}}{\left \| v \right \|_{V}}$$ (Given norms $\left \| \cdot  \right \|_{V}$ and $\left \| \cdot  \right \|_{W}$ on vector spaces $V$ and $W$, and an operator $A:V\rightarrow W$)  is a norm on the linear space of operators from $V$ to $W$.  That question () about operator norms but in no way answers my question

Exercise: Prove that the operator norm of the set $S$ of all linear operators $L:R^n\to R^m$ defines a norm on $S$  Definition of norm: A positive function $\| .\|$ on a real vector space $V$ is a norm if   $\|v\|=0$ if and only if $v=0$ $\|\lambda v\|=|\lambda|\|v\|$ for all $\lambda\in R$ and $v\in V$ $\|v+w\|\le\|v\|+\|w\|$ for all $v,w\in V$   Definition of operator norm: $\|L\|=sup_{a\ne 0}\|La\|/\|a\|$ or $=sup_{\|a\|=1}\|La\|$  First part (successful, I think):   if $\|L\|=0$, we have $sup_{\|a\|=1}\|La\|=0$, so $L=0$. if $L=0$, we have $sup_{\|a\|=1}\|0a\|=0$   Second part (unsuccessful):   $\|\lambda L\|=sup_{\lambda a\ne 0}\|\lambda La\|/\|\lambda a\|=sup_{\lambda a\ne 0}\lambda \|La\|/\lambda \|a\|=sup_{a\ne 0}\|La\|/\|a\|\ne |\lambda|\|L\|$   Third part (successful, I think):   $\|L(v+w)\|=sup_{\|v+w\|=1}\|Lv+Lw\|\le sup_{\|v\|=1}\|Lv\|+sup_{\|w\|=1}\|Lw\|=\|v\|+\|w\|$   Suggestions? Thoughts? Thanks!


Earlier today I wanted to flag a  on Workplace because - it seems to me - the answer could be very easily researched. Literally one quick Google search away.   I was unsure which option to choose under Flag/Should be closed. The options are:   duplicate of ... off-topic because ... (I didn't feel it was really off-topic, simply trivial, and a lazy on the part of the person asking it) unclear what you're asking ... too broad primarily opinion based   I didn't really feel that any of these apply, but ended up flagging it as "opinion based", simply because I felt it was a poor question and should be taken down.   Question 1: In the future, which option would be best suited to that type of situation?   Question 2: Could we edit the definitions of one of these options to include the text "this question is easily researched/trivial" option, or could we add an additional option for that purpose?  Question 3: Last but not least, was I actually being a "snob" in thinking that this question should have been closed? Aka, am I in the wrong, vs the person asking that question?

was recently closed (partly thanks to my own vote to close it.) While it was closed as being "off topic", I'm not sure that's actually the case. The poster asked about resources for understanding the facade and decorator patterns. While it's not a perfect fit for SO (e.g. there was no actual code) the reason I personally voted to close was my disdain for the complete lack of research effort made. (A simple Google search turns up a ton of resources.)  I know that downvoting is intended to mark questions that show little research effort (as pointed out in ) but should be a strong enough reason to close?  I find myself voting to close for this reason relatively frequently, so I suppose my two questions are:   Is this a legitimate reason to vote to close, or should I just be downvoting these questions? If it is a legitimate reason, can it be added to the list of reasons for closure? I don't think it fits comfortably in any of the current reasons.


I have the following line of commands used in sequence from the command window.  cd path 1 && file.bat && cd path 2 && printfNav path3 > Testing.txt  Is it possible to have this done through python?

I would like to execute multiple commands in a row:  i.e. (just to illustrate my need):  cmd (the shell)  then  cd dir  and  ls  and read the result of the ls.  Any idea with subprocess module?  Update:  cd dir and ls are just an example. I need to run complex commands (following a particular order, without any pipelining). In fact, I would like one subprocess shell and the ability to launch many commands on it.


can the higgs particle interact with himself as it is the antiparticle of himself?  as we know that the every particle is the excitation of their respective fields i.e higgs of higgs field so what about the antiparticle?

If the Higgs field gives mass to particles, and the Higgs boson itself has mass, does this mean there is some kind of self-interaction?  Also, does the Higgs Boson have zero rest mass and so move at light-speed?


I've declared a lot of math operators lately, e.g. \DeclareMathOperator{\Hom}{Hom}, \DeclareMathOperator{\End}{End} and so forth. This is getting a bit annoying and seems automatable: what I'd really like is to have this behavior for every capitalized word, e.g. if I type \Foo in a document I'd like for this to be interpreted as a math operator without having to specify it in advance. Is there an easy way to do this?

The preambles of my LaTeX documents often include many many lines of \DeclareMathOperator instructions, e.g.  \DeclareMathOperator{\Rep}{Rep} \DeclareMathOperator{\Tet}{Tet} \DeclareMathOperator{\Maps}{Maps} \DeclareMathOperator{\Diff}{Diff}   Is there a nice way to map some macro over a list, so I could do this more concisely, and with less copying and pasting when I add a new math operator?


I am running Windows 10 Pro, Build 16299.  I'm not sure why MS thinks it's okay to forcibly reboot people's PC in the middle of the night...but for years I was able to prevent this by turning off my windows updates. I also stop and disable the Windows Update service. But over the past few nights, my windows has automatically pulled down updates and forcibly rebooted in spite of the fact that my updates are turned off and the service stopped. I have lots of apps running so this is very disruptive.  I can only assume that they found some sneaky new way to do this without my permission because it shouldn't be possible for this to happen, given my current settings.  How can I prevent it in my current version of windows? Thanks in advance.

We've upgraded some machines to Windows 10 and realized there were some updates which updated as required. However, I realized there was no option available to stop the download similar to that on Windows 7 and 8.1. The only way I could stop the download was to stop the Windows Update service.  My question is does anyone know of a way to stop auto updates or is stopping the service is the only solution?


Obviously it will stop working.. but what would go first, how long till it halts etc. Lets say we're at the desktop with no running programs. Assuming disk is not hot-pluggable.

What would happen if I delete the / directory while logged as root into Ubuntu?  Would I get some sort of error to the effect of Error: unable to self-destruct? Or would I actually be able to delete the directory?


I got the following in composer.json:  "name": "drupal/drupal", "description": "Drupal is an open source content management platform powering millions of websites and applications.", "type": "project", "license": "GPL-2.0+", "require": {     "composer/installers": "^1.0.24",     "wikimedia/composer-merge-plugin": "^1.4",     "drush/drush": "^8.1.15",     "drupal/core": "^8.4.0",     "phpunit/phpunit": "^4.8",     "drupal/console": "^1.0" }, "replace": {     "drupal/core": "^8.4" }, "minimum-stability": "dev", "prefer-stable": false,   However when I go composer global update, drush does not get upgraded as per:  vendor/bin/drush --version Drush Version   :  8.1.9   Why is this happening?

I've been using Drupal for several years, but only just dipping a toe in with Drush - I've bought an ebook tutorial and working my way through. I've installed Composer, and used it to install Drush. The tutorial book specified a particular build of Drush to install (7.0.0-alpha5). I've navigated to a drupal folder and run   drush st    to get installation info which works fine. The tutorial explains that you don't have to navigate into the drupal folder to do this, instead using  drush --root=PATH-TO-DRUPAL-SITE st   however this brings an error:   Fatal error: Call to undefined function conf_path()   Googling this error suggests this a problem with the version of Drush and to upgrade.  SO I've navigated into the .composer/vendor/drush/drush folder and run      composer global update but composer says nothing to update, confirming the version as 7.0.0-alpha5 - I assume this is not the latest 7.x version, so do I need something changing in the composer.json file?


When I got my first Android phone (the rugged HTC Inspire), I was told that I should restart the device every week. The rational, which made sense at the time, was that it's a small computer and every computer needs a soft reset, right? Over time, my phone needed it from continual app crashes but it took forever to do so. Overall, it did help to restart  I've recently upgraded to the HTC One and, from what I can tell, I don't need to restart this thing every week. It's run for a couple weeks on end without problems (one app-hangup what wasn't fixed with a restart) and although my usage isn't intensive, it's getting heavier.  Is it a good idea to restart my Android device after a certain period of time or does it not do anything at all. I'm not so much worried about harming the device but just keeping all of my info current without needing to open up half-dozen apps every time.  EDIT: Sorry if this comes as a duplicate question. I tried looking around for other answers but my particular question related to normal/periodic rebooting not related to a slow-down of the OS or other apps. Most questions regarding rebooting of an Android device revolved around either a slow OS or apps hanging and not necessarily answering my question.

I've had my HTC Desire for a couple of months now and it is awesome! (A huge improvement to my previous phone... Nokia 3315)  Though recently, I've realised that the phone semi-freezes more and more often - ie. when swiping between homescreens it will either pause/freeze and I will have to re-swipe to get it to change screens. Or worse, it just won't respond to any further swipes and I have to lock the screen then unlock to get the phone back into action.  Got quite annoyed at this (was probably happening once or twice a day) so I thought it might help to turn it off and on again. So I did - not sure if it was a placebo effect but it seems to have helped a bit?  So given that this is my first smartphone, I was wondering if it is 'normal' to need to restart the phone every so often. If so, how often is 'normal'? If not, what can I do to diagnose/fix this problem?


A year ago, I took a statistics course at my university. The course was based on Rice's "Mathematical Statistics and Data Analysis". Apart from the fact that I did not find the book terribly good, I found that the lectures did not aid me a lot in understanding the material either. I did pass the course, but I didn't feel I really understood the material.   Fast forward a year. I have now come to realise that statistics can be a very interesting and useful subject, but I haven't done any statistics ever since the course I just mentioned. I'm thinking of doing some statistics courses for my Master's degree, though.   Question: do you know any good resources (video lectures, books, solved problems) which I can use to brush up my statistics knowledge? I like books that have a large number of solved problems and worked examples, so I can check whether I actually solved the problems correctly.

I'm looking for a full online course on college-introductory level statistics (and beyond). I've seen a few options on statistics.com ($600usd online courses ouch), and coursera (starts over a month from now).   I wonder if there are other good resources that could constitute a course on statistics (books seem to supplement courses well, but not replace them quite perfectly). Academic credit & certification options are a plus, but not necessary.  Thoughts?


I have a script that reads a file that contains urls and then prints out the ip addresses. However, I am unable to find resources as to why the pipe blocks when I add the command   cut -d" " -f4    at the end of the pipe. Here is the full command.   for url in $(cat urls); do host $url; done | grep "has address" | cut -d" " -f4   The output is printed asynchronously till the grep command. Any command that comes after the grep has its output blocked till all the urls have been processed by the host command. Can anyone give me insight as to why this happens?

I have a script which calls two commands:  long_running_command | print_progress   The long_running_command prints progress but I'm unhappy with it. I'm using print_progress to make it nicer (namely, I print the progress in a single line).  The problem: Connection a pipe to stdout also activates a 4K buffer, so the nice print program gets nothing ... nothing ... nothing ... a whole lot ... :)  How can I disable the 4K buffer for the long_running_command (no, I do not have the source)?


I need to find a list of all items starting with an underscore: _  The obvious doesn't work:  select * from role where Name like '_%'   This still returns all items.  The following also returns all items.  select * from role where Name like '\_%' select * from role where Name like '__%'   anyone knows how to escape a underscore? or how else I can achieve this StartWithUnderscore functionality?

How do I escape the underscore character?  I am writing something like the following where clause and want to be able to find actual entries with _d at the end.  Where Username Like '%_d'


How can the following equation be proven?     $$ \forall n > 2 : \sum_{p \le n}{\frac1{p}} = C + \ln\ln n + O\left(\frac1{\ln n}\right), $$  where $p$ is a prime number.   It's not homework; I just don't understand from where should I start.

Note the $ p < x $ in the sum stands for all primes less than $ x $. I know that for $ s=1 $, $$ \sum_{p<x} \frac{1}{p} \sim \ln \ln x , $$ and for $ \mathrm{Re}(s) > 1 $, the partial sums actually converge to a finite limit called the , which has an analytic continuation to the whole right-half plane but the actual series diverges in the critical strip. So anyway, I'm wondering what the asymptotic behavior of the partial sums are in the limit as $ x \to \infty $ for a given value of $ s $ with $ \mathrm{Re}(s) < 1 $. At first I intuitively conjectured it might be something vaguely like the following  $$ \sum_{p<x} \frac1{p^s} \sim f(s) \pi(x)^{1-s} , \quad f(s) = \lim_{n\to\infty} \int_0^1 g_n(u) u^{-s} du $$ but after some thought I'm not sure if this kind of formula will work after all. Any ideas?  Note again: I'm asking about asymptotics when $ \mathrm{Re}(s) < 1 $.


I need to restrict the use of a machine to two hours per day (total, across multiple sessions of being physically logged in at the console). Is there any way I can do that?  Edit: I suppose I could do something with pam_exec, but before I go that route and accidentally lock myself out of my machine (like I did with my Pi :( )....

Access to our computer (not only to the internet) needs to be restricted for the accounts of my kids (7, 8) until they are old enough to manage this by themselves. Until then we need to be able to define the following:   the hours of the day when computing is o.k. (e.g. 5 - 9 pm) the days of the week when computing is not o.k. (e.g. mondays to fridays) the amount of time allowed per day (e.g. 2 hours)   In 11.10 all of the following that used to do the job don't work any more:   : for > 11.10 no more available through the ppa. : command line alternative, but from 11.10 removed from the repositories. : Looks great but repeatedly crashes to force restarting X-server. So we can't use or recommed this program at the moment.   Are there any other alternatives?


Let $f: \mathbb{R}^n \rightarrow \mathbb{R}$ be a vector-valued function given by $f(x) = \sqrt{1 + \|x\|^2_2}$. Show that the gradient of $f$ is Lipschitz continuous, in particular with Lipschitz constant $L = 1$.  I want to show this directly from $\|\nabla f(x) - \nabla f(y)\|_2 \leq \|x - y\|_2 \; \forall x, y \in \mathbb{R}^n$. However, the gradient of $f$ is not exactly very clean, and I get lost in the algebra. Is there a simpler way to do this that I'm missing?

Given $f(x)=\sqrt{1+\|x\|^2}$ and $f:\mathbb{R}^n\to\mathbb{R}$. Prove $f\in C_1^{1,1}$, meaning$$\|\nabla f(x)-\nabla f(y)\|\leq\|x-y\|.$$   I've tried to see how to prove it for $n=2$ but got stuck at computing the norm of the hessian. I know if I can prove $\|\nabla^2f(x)\|_2\leq 1$ will be enough. I know that $\nabla f(x)=\frac{x}{\sqrt{1+\|x\|^2}}$ i thought maybe i can assume w.l.o.g that $\|x\|\geq \|y\|$ to prove this.


There are many brand names that are misspellings of real English words. Instead of calling them misspellings I would like a more positive term for this type of name.

These days, a majority of youth hate spelling here in India, not because they find it hard to grasp but because they think it is cool to deviate from standards and follow their own spelling whims. Any attempt to reason with these people is met with contempt. I was wondering if there was a word or term for intentional bad spellers.  My quick Google search threw up a word called  to refer to bad handwriting and/or bad spelling. I am not sure if we can derive cacographer from that word and use it for intentional bad spellers.


I was in France on a student visa which expired July 2017.  I exited France and entered the UK.  From the UK, I entered the Schengen in Norway, July 10th, 2017.   Since then, I went back to the UK for a month, and then back to Norway, which is where I am now.   Since July, I have been in the Schengen for roughly 40 days.   In October, I need to enter France again for 90 days.   My question is, has the clock started ticking the second I entered the Schengen in Norway in July??  If I enter France from a non-Schengen country like the UK, does my clock start again for 90 days?   Am I screwed?

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


I have found many equations which claim to be for weighted standard deviation, yet all of these differ very slightly, and I am confused as to which is the correct one.  I have some data in Excel, and need to use the weighted standard deviation, but want to have a correct equation in order to make a formula.    The image above is the basis I am working with, but I have found other versions in which the (N-1) is missing, the denominator is N-1, or the sum of the weights is multiplied by ((N-1)/N) so that there is a very subtle difference in brackets.   Each one of these options gives widely different results in Excel, hence the confusion.

So, I have a data set of percentages like so:  100   /   10000   = 1% (0.01) 2     /     5     = 40% (0.4) 4     /     3     = 133% (1.3)  1000  /   2000    = 50% (0.5)   I want to find the standard deviation of the percentages, but weighted for their data volume. ie, the first and last data points should dominate the calculation.  How do I do that? And is there a simple way to do it in Excel?


I want to remove word "a" from t1 object. Why t2 object also got affected?  Code:  package newproject;  import java.util.ArrayList; import java.util.Arrays;  public class NewProject {      public static void main(String[] args) {               String str[] = {"a", "b", "c"};         ArrayList<String> words = new ArrayList<>();         words.addAll(Arrays.asList(str));          Test t1 = new Test(words);         Test t2 = new Test(words);          System.out.println("Result Before ");         System.out.println("T1 " + t1.getWords());         System.out.println("T2 " + t2.getWords());          // Only T1 remove words, not T2         t1.removeWords("a");          System.out.println("Result After ");         System.out.println("T1 " + t1.getWords());         System.out.println("T2 " + t2.getWords());     }     }  class Test {     private ArrayList<String> words;      Test(ArrayList<String> words){         setWords(words);     }      void setWords(ArrayList<String> words){         this.words = words;     }      ArrayList <String> getWords() {         return this.words;     }      void removeWords(String word) {         this.words.remove(word);     } }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Hi, I'm interested to know a little more about how stakoverflow manage his HTTP cache strategy.   I see that the pages are supposed to be cached 60 seconds using these headers     Cache-Control: public, max-age=60   Expires: Mon, 15 Nov 2010 17:56:38 GMT   But I also see this header     Vary: *   and According      A Vary header field-value of "*" always fails to match and subsequent requests on that resource can only be properly interpreted by the origin server.    According my tests, pages are been cached on my browser despites the Vary header so I'm a little confused. I'd like to know the "vision" of the Stackoverflow team about the HTTP cache strategy. The official word about how cache is supposed to work.  Thanks!

What tools and technologies are used to build the Stack Exchange Network?  See also:


I am fairly new to the concept of supremum/infimum and slightly confused over idea of uniform convergence using these notations. According to the wiki for  we say that any $f_n(x)$ uniformly converges to $f(x)$ if $\lim\limits_{n\to\infty} sup|(f_n(x)-f(x))| = 0$.   Now my question is that for $f_n(x) = x^n(1-x)^n$ over [0,1] , If i take $f(x)$ = 1/4 how can I show that this equation holds. What I can see though that $\lim\limits_{n\to\infty} sup(|f_n(x)|) - f(x) = 0$ but won't value of $\lim\limits_{n\to\infty} sup|(f_n(x)-f(x))|$ will be equal to 1/4?

Does $f_n(x)=x^n(1-x)^n$ converges uniformely on $[0,1]$ and why?  If $x=0$ or $x=1$ we have $f_n(x)=0$. If $x\in (0,1)$ we have $x^n\rightarrow 0$ and $(1-x)^n\rightarrow 0$. So $f_n\rightarrow 0$. To check uniform convergence, we have to check that $\forall\varepsilon>0\ \exists N\in\mathbb{N}$ such that $\forall n\geq N, x\in [0,1]: |f_n(x)|<\varepsilon$.  How do I show that?


I tried to upgrade from 16.04LTS to 17.10 and got this.    What have I done wrong?

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


What are complex numbers, actually? You can prove $1=-1$ and a complex cosine function can have value greater than $1$ and so on, there are many unexpected results when we use complex numbers. So, what are they actually? Do, they have any physical meaning or are they just a method in mathematics to manipulate numbers?

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


// aoo.js          const c =950;         function hello(){            console.log(c);            }           export default hello;      // moo.js          import q from './aoo';          console.log(q());   How it is fetching variable c value in              "moo.js"  ,even though we are not exporting it?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I was just checking inner classes and I know we can declaired the private and static inner class however I do not under stand what can we achieve by declaring a inner class private and static.  class OuterClass {      private static class InnerClass{     } }   As this class is private no other class would be able to access InnerClass so Static would not help I think.  Is it just allowed for simplicity in java

What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?


Prove that the sum of all positive integers $k$ with $1 \le k < n$ and $gcd(k,n)=1$ is $1 \over {2}$$n\phi(n)$  I know that there's a duplicate of this question out there, but only hints were given. Any help with a formal proof would be much appreciated.

could any one tell me how to find the sum of all positive integers less than $n$ and relatively prime to $n$? $n>1$  For $n=7$, I have  $\phi(n)=6$ and  the sum is ${6(6+1)\over 2}={n\over 2}.\phi(n)$, is that true for any $n$?


Say I have this code:  <?php  $pdo = new PDO(         'mysql:host=127.0.0.1;dbname=test_sql',         'root',         '',         array(             PDO::ATTR_PERSISTENT => true));  header('Content-Type: text/plain');  for ($i = 30; $i > 0; $i--) {     echo 'SQL says ' . $pdo->query('SELECT CONCAT(CONNECTION_ID(), "/", NOW()) AS x')->fetchAll(PDO::FETCH_ASSOC)[0]['x'] . ' END|';     sleep(1); }   It's run in Apache, and so if I open a browser to this page and run SHOW PROCESSLIST in mysql, then I see 1 connection. Once the page has done loading (after 30 seconds), I will still see that connection in MySQL (because it's persistent, ok).  But now, if I open 2 tabs on this same page (no matter whether it's same browser, we don't care about that here since it has no impact), then I see 2 connections in the SHOW PROCESSLIST.  So I suppose PHP keeps the persistent connection open, but won't share it between "PHP instances". Is there a way to do so? To have 1 single connection to the mysql server running for the 2 PHP instances (no matter whether this connection is persistent or not, but I doubt non-persistent connection would work)?

Is it possible to cache database connections when using PHP like you would in a J2EE container?  If so, how?


I installed GNOME multi-monitor add on on Ubuntu 18.04.1 LTS to use top bar in both monitors. But after wakeup from sleep or suspend, the top bar of second monitor stops working.   After I set configuration again, the second monitor stays with an blank space on the top:    Every time my computer wakes up, I have to set configuration in GNOME and restart to work again.  Any ideas how to fix this?

After upgrading to 18.10 I am experiencing very strange behaviour of gnome extensions. After my laptop goes into hibernation they all switch off and enabling them back on  doesn't help: nothing changes and when I refresh the page they are disabled again.   The only way to turn them back on is to reinstall them.


In Newtonian physics, changes in gravity propagate instantly. In general and special relativity, gravity propagates at the speed of light, $c$. From reading answers to questions about gravity on this site, the consensus seems to be that the real world fits the relativity answer, $c$.  Numerous experiments have measured the speed of light in various media with increasing precision. Have there been any experimental measurements of the speed of gravity with generally accepted results?  If so, how did they work? Or if not, how might such a measurement be performed and why hasn't it been done yet?

In replying to a  I stated:     Gravitational waves have not been yet experimentally observed so as to have their velocity measured.   Which after the fact prompted me to try and verify it. I found a "speed of gravity" claimed measurement, which has been in a controversial discussion. In the last paragraph of  I found:     In September 2002, Sergei Kopeikin and Edward Fomalont announced that they had made an indirect measurement of the speed of gravity, using their data from VLBI measurement of the retarded position of Jupiter on its orbit during Jupiter's transit across the line-of-sight of the bright radio source quasar QSO J0842+1835. Kopeikin and Fomalont concluded that the speed of gravity is between 0.8 and 1.2 times the speed of light, which would be fully consistent with the theoretical prediction of general relativity that the speed of gravity is exactly the same as the speed of light.[18]   There has been criticism, described in the paragraph.   Has this matter been resolved ? is the measurement valid?  The speed of gravity has also been  calculated from observations of the orbital decay rate of binary pulsars and found to be consistent to the speed of light within 1% ( same link).  This is the speed that gravitational fields transfer information, and though the number itself depends on the theoretical framework solving for the system parameters it is true that just the existence  of gravitational damping in the binary system would imply that the speed cannot be infinite.  Along these lines I was wondering whether studying the second star in a binary system where the first has gone nova would not give a cleaner and model independent measurement of the speed of transfer of information gravitationally. In this day and age where everything is digital one should be able to have data on this from now on.     (Feb 11,2016) announced the observation of gravitational waves , at the same time  consistent with the speed of light being c, and thus measuring it. See the  for a summary.