I'm currently working on my Thesis in LaTex and have successfully used TexStudio (2.11.2) and MiKTeX (2.9.6069-x64) for two years now. Since a couple of days TexStudio always needs to be forced to save the File by holding down STRG+S for 3-4 seconds and when I compile my file any changes since that last forced save are not included but an older version of the Code is compiled.  I also noticed that everytime I compile the code a new copy of my .tex-file with an obscure file-ending is created (Base File is "Thesis.tex"; new Files are e.g. "Thesis.tex.if2720", "Thesis.tex.JC2720" et cetera).  Cutting almost all text from the file won't change anything, updating packages and completely wiping MiKTeX and TexStudio didn't help. Neither cutting  TexWorks does not suffer from the same problem.   Additional Information: The Files are saved inside a Dropbox-folder and I am using Windows File History for backup.   Has anyone encountered this issue before?

I need to compile between two and four times before I see changes I make in the editor (TeXstudio) and each time I compile, a new .tex file is created with random letters and numbers at the end.   For example, If I create the file hello.tex and compile two to four times I'll get the file,   hello.tex.QU6664      then I make some small changes in the editor and compile two to four times I'll get the additional file,   hello.tex.Ak6664   After continuing to do this (each time compiling between two to four times before I see the changes I made), I now have many files that look like  hello.tex.QU6664, hello.tex.Ak6664, hello.tex.YX6664, hello.tex.sN6664, hello.tex.Ss6664, ...   A little bit of additional information (in case it's relevant): Everything was working fine up until a few days ago, i.e. only needed to compile once and only the file hello.tex was created. I still only get one .aux,  .synctex and .pdf files. I use TeXstudio to write and compile. I don't think it has anything to do with the bibliography (I tried removing bibliography altogether and still having the same problem).  How do I prevent these additional files from appearing and only compiling once like I used to? Has anyone had a similar problem?


I checked my etc/log/mail.log and i find huge file that contain a lot of rows like those (every sec insert 20 rows):  Jan 31 06:25:20 myservername postfix/smtp[15459]: 02ACF5FBC3: to=<xxxx@yahoo.com>, relay=mta5.am0.yahoodns.net[98.137.159.28]:25, delay=412553, delays=412501/50/1.6/0.13, dsn=4.7.0, status=deferred (host mta5.am0.yahoodns.net[98.137.159.28] said: 421 4.7.0 [TSS04] Messages from myServerIP temporarily deferred due to user complaints - 4.16.55.1; see https://help.yahoo.com/kb/post$ Jan 31 06:25:20 myservername postfix/smtp[15459]: 02ACF5FBC3: to=<xxxxxx@yahoo.com>, relay=mta5.am0.yahoodns.net[98.137.159.28]:25, delay=412553, delays=412501/50/1.6/0.13, dsn=4.7.0, status=deferred (host mta5.am0.yahoodns.net[98.137.159.28] said: 421 4.7.0 [TSS04] Messages from myServerIP temporarily deferred due to user complaints - 4.16.55.1; see https://help.yahoo.com/kb/postmaste$ Jan 31 06:25:20 myservername postfix/smtp[15463]: 08B5359448: host mta6.am0.yahoodns.net[98.137.159.28] said: 421 4.7.0 [TSS04] Messages from myServerIP temporarily deferred due to user complaints - 4.16.55.1; see https://help.yahoo.com/kb/postmaster/SLN3434.html (in reply to MAIL FROM command) Jan 31 06:25:20 myservername postfix/smtp[15463]: 08B5359448: lost connection with mta6.am0.yahoodns.net[98.137.159.28] while sending RCPT TO Jan 31 06:25:20 myservername postfix/smtp[15464]: 680715EDFD: host smtp5.opco.com[208.88.204.132] refused to talk to me: 554 5.7.1 You are not allowed to connect. Jan 31 06:25:20 myservername postfix/smtp[15453]: 97AEE58388: host mx142.netapp.com[216.240.21.19] refused to talk to me: 554 mx142.netapp.com    I never sent those mails. Is it possible that my server hacked?  How can I set that only my server(ip) can send mail?  I have checked my php files and close any possible trigger mail function. I need my server that could send and receive mail.   main.cf  smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no  # appending .domain is the MUA's job. append_dot_mydomain = no  readme_directory = no  # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_tls_security_level=may  smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = MYDOMAIN.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = $myhostname localhost.$mydomain localhost $mydomain relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all  virtual_alias_domains = yooteam.com virtual_alias_maps = hash:/etc/postfix/virtual compatibility_level = 2

I have a postfix server installed on Ubuntu 14.04. A PHP script running on the machine uses it to send outgoing email. Additionally, I use postfix to receive mail sent to a local account, which is then forwarded to my personal gmail.  However, this means that anyone can connect to my server and use it as an open relay for spam. How can I  prevent remote connections from relaying email?  This is my main.cf:  smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = aviacao.pt virtual_alias_maps = hash:/etc/postfix/virtual alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = aviacao.pt, localhost.localdomain, localhost relayhost =  mynetworks = 0.0.0.0/0 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = ipv4   If I change mynetworks to 127.0.0.0/8 then people won't be able to send email to the local account.


He is tiring He is already tiring  (may be 2 different answers above, and below) He is tired He is already tired   Further, quoting from World Book Dictionary :-  "a participle is a form of the verb used as an adjective or noun",   Does that mean that a participle is a verb, or an adjective/noun?

I need an answer about this sentence please:     We had a reserved seat.   Reserved in this sentence is a verb. I read that in a morphology book.  My question is: how does this become a verb?  I thought it was an adjective.


In Percy Jackson and the Titan’s Curse, Annabeth’s dad, Dr. Chase comes in at the end of his book and uses a machine gun on his Sopwith Camel, along with some celestial bronze bullets he created in order to pulverize the monsters that are closing in on Percy and his friends.  In addition, Luke has a sword named Backbiter that is half steel half celestial bronze, so that he can kill both humans and monsters. Also, Chiron says that Demigods are vulnerable to both weapons aimed to kill mortals and weapons aimed to kill monsters.  So, at the Battle of the Labyrinth, Percy and his friends could have decided to defend camp with a bunch of machine guns loaded with celestial bronze bullets. Also, when Percy and his friend Beckendorf decide to raid Kronos’s ship the Princess Andromeda in Book Five The Last Olympian, why couldn’t they have carried guns? It would easily do away with all the sword fighting skill needed and it would just be “pow” and Luke is dead…  Clearly, there must be something wrong with my logic. But, is there any drawback in the Percy Jackson demigods using guns? What might prevent them from doing so? I'm looking specifically for practical reasons, but any reasons are fine, too :D

Instead of using short range celestial bronze (CB) weapons like swords and arrows why not make advanced weapons like machine guns or grenades with CB shrapnel in it?


I would like more than 3 author citations to show up using et al. rather than with full names.  Example: * were death cases because of the autopsy Rao, Sood, Pathak, and Dongre (2014).*  I need to show >3 author names like (Rao et al., (2014))  Code  \documentclass{UnimasThesis} \usepackage{graphicx} \usepackage[labelfont=bf]{caption} \captionsetup{labelfont=bf} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{dcolumn} \usepackage{booktabs} \usepackage{amsmath} \usepackage{cases} \usepackage[os=win]{menukeys} \usepackage[paper=a4paper]{geometry} \usepackage{multirow} %\usepackage{enumerate}   \usepackage{listings} \lstset{language=[LaTeX]TeX,columns=fullflexible, basicstyle=\ttfamily,texcsstyle=*\bfseries\color{NavyBlue}, commentstyle=\itshape\color{PaleVioletRed4}, frame=single,framesep=6pt, framexleftmargin=6pt,framexrightmargin=6pt, xleftmargin=12pt,xrightmargin=12pt, breaklines=true,breakatwhitespace=true}   \title{AUTOMATIC SEGMENTATION OF CARDIAC MAGNETIC RESONANCE IMAGES FOR OEDEMA ASSESSMENT} \author{Amajd Khan} \faculty{Faculty of Computer Science and Information Technology } \facultyColour{6c7a8c} %% 6-digit RGB hexadecimal code  \submissionyear{2017} \degreetype{Doctor of Philosophy\\(Computer Science)}  % If using APA bibliography style  \usepackage[natbibapa]{apacite} \bibliographystyle{plainnat} %\usepackage{natbib} %\bibliographystyle{apalike}  \makeatother  \begin{document} \maketitle  \frontmatter    \mainmatter % Each chapter from a separate file \input{chap1-Introduction}  % references are listed in refs.bib \bibliography{refs}  \end{document}   .bib file      @article{rao:2014,     title={Causes of Sudden Cardiac Death on Autopsy Findings; a Four-Year Report},     author={Rao, Dinesh., and Sood, Divya., and Pathak, P., and Dongre, Sudhir, D},     journal={Journal  of Emergency-An Academic Emergency Medicine},     volume={2},     number={1},     pages={12-17},     year={2014} }

\documentclass{UnimasThesis} \usepackage{graphicx} \usepackage[labelfont=bf]{caption} \captionsetup{labelfont=bf} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{dcolumn} \usepackage{booktabs} \usepackage{amsmath} \usepackage{cases} \usepackage[os=win]{menukeys} \usepackage[paper=a4paper]{geometry} \usepackage{multirow} %\usepackage{enumerate}   \usepackage{listings} \lstset{language=[LaTeX]TeX,columns=fullflexible, basicstyle=\ttfamily,texcsstyle=*\bfseries\color{NavyBlue}, commentstyle=\itshape\color{PaleVioletRed4}, frame=single,framesep=6pt, framexleftmargin=6pt,framexrightmargin=6pt, xleftmargin=12pt,xrightmargin=12pt, breaklines=true,breakatwhitespace=true}   \title{AUTOMATIC SEGMENTATION OF CARDIAC MAGNETIC RESONANCE IMAGES FOR OEDEMA ASSESSMENT} \author{Amajd Khan} \faculty{Faculty of Computer Science and Information Technology } \facultyColour{6c7a8c} %% 6-digit RGB hexadecimal code  \submissionyear{2017} \degreetype{Doctor of Philosophy\\(Computer Science)}  % If using APA bibliography style  \usepackage[natbibapa]{apacite} \bibliographystyle{plainnat} %\usepackage{natbib} %\bibliographystyle{apalike}  \makeatother  \begin{document} \maketitle  \frontmatter    \mainmatter % Each chapter from a separate file \input{chap1-Introduction}  % references are listed in refs.bib \bibliography{refs}  \end{document}   %%%refrence   @article{rao:2014,     title={Causes of Sudden Cardiac Death on Autopsy Findings; a Four-Year Report},     author={Rao, Dinesh., and Sood, Divya., and Pathak, P., and Dongre, Sudhir, D},     journal={Journal  of Emergency-An Academic Emergency Medicine},     volume={2},     number={1},     pages={12-17},     year={2014} }   %%%i use the chapter 1 file  (Example  this is my citation Rao et al.,(2014). (need to show like this


If you standardize your training data, then can it work on unstandardized data during predictions accurately?    Many algorithms require the feature data to be standardized and I am wondering how/why/if this works when using non-standardized data to predict on if the model was fit with standardized data?   For example, what if you only had a single observation (or a few) you wanted predict using the model? You wouldn't be able to standardize the data.   I'm following this tutorial here by Sebastian Raschka and it got me thinking about the above questions:

I have this confusion related to implementing linear regression with normalization. Let's say I have a training set trainX and trainY, and test set testX and testY. For the training set I take the mean and standard deviation of trainX, use it to transform the trainX data to have a  mean center and unit standard deviation. I do the same for trainY. Now I run a ridge regression for training. For cross validation, I use 10 fold and then get some coefficients optimal.  Now when I use these coefficients on the test sets testX and testY, I need to mean center and give unit standard deviation to both testX and testY using the mean and standard deviation I got from training data sets. I apply the coefficients to predict Y. To these predicted Y values, do I again need to add the mean and standard deviation used before to get the actual Y values? Is this the way to go?


Currently I have a setInterval javascript function which calls an ajax function to call a php script. This php script is a server that is waiting for a request from a client being run by another program. The client will send a String whenever there are changes made and this string  is to be echoed back through ajax.  setInterval(function(){getTopo()}, 2000);   getTopo() is a $.ajax calling server.php  I want to terminate the server.php file if there is no reply within 2 secs before running getTopo() again.  Else can I output through ajax an echo in the php's while loop?

Is it possible that using jQuery, I cancel/abort an Ajax request that I have not yet received the response from?


I am trying to prove that: $\sqrt{2 + \sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2 + \cdots}}}}}} = 2$ with the following figure:    The approach I'm trying to follow is to show that you can evaluate the sum and it will be between, for example, $2+\sqrt{2}$ and $4$. Also, I see a pattern with the triangles that are formed by the evaluation of the functions and how they decrease in size and are similar.  Any suggestion?

There are a number of extremely useful geometric techniques for visualizing results from number theory, such as various infinite sums, results from combinatorics, and so on.  (One of my favorites is the grid representation of the Euclidean algorithm for computing the greatest common factor of two integers, .)  Are there any analogous visualization techniques for nested radicals--to visualize, for instance, equations of the form:  $$\sqrt{n + \sqrt{n + \sqrt{n + ...}}} = \frac{1 + \sqrt{1 + 4n}}{2},$$  such as studied by Ramanujan and others?  The algebraic solution of that equation (in particular) is simple indeed, by denoting the left-hand side $x$, squaring and solving a quadratic equation.  But can one represent it (and others like it) graphically/geometrically?  For example, Viète's expression for $\pi$ is:  $${2 \over \pi} = {\sqrt{2} \over 2} \cdot {\sqrt{2 + \sqrt{2}} \over 2} \cdot {\sqrt{2 + \sqrt{2 + \sqrt{2}}} \over 2} \cdot \cdots$$   and its form strongly suggests there is some graphic involving linked hypotenuses of scaled squares and a circle that illustrates this result.  Is there one?


Using Illustrator CC 2014:  I'm trying to create a spiraled text in which the text size decreases as it spirals inward.  I've tried putting the text on a path created using the spiral tool and executing a script to decrease the size of each character, but I couldn't figure out how to access my text selection correctly.  This is the kind of spiral I'm looking for.    I've also put the text on a straight path, expanded, and used the free transform tool to make it a tapered art brush.  This achieves what I want with straight lines, but the spiral doesn't render the brush in an acceptable way.  Using brush shape on spiral path.    I also tried applying a triangular brush to the spiral path, typing and expanding my text on a straight path, and making an envelope distort using the spiral as the top object.  The results were kind of awesome, but not even close to what I was looking for.    I think the best way would be to figure out how to execute a script on the text selection.  I already have the basic logic of it solved (using JS):  function ChangeSize(){     var myDoc = app.activeDocument;      //Here's where I need to make a proper selection     var selection = activeDocument.selection;      //begin resize function     for (var i=0; i<characters.length; i++){         characters[i].characterstyle.textheight -= i * .05;      } }   This is the only thing holding me up from an otherwise very simple and straightforward design.  I've spent several hours trying and I've got nothing.  Does anyone have a simple solution for making my spiral look pretty much exactly like the Pi spiral in the sample t-shirt picture?.

I am attempting to do a logo where the phrase starts at the top of a spiral and continues throughout the spiral decreasing in size until the very middle of the spiral.    Tried the Spiral tool but not close enough and manually decreased font every three characters but the spiral did not continue to the very middle.  I think i need to use an Archimedean spiral?


I want to brush up my English and I just started to read some Grammar books. When I read the section about how to use an article before a single letter, it says that we have to use "a" or "an" depending on the pronunciation of the letter. My teachers in school have never told me about that and in fact I am not sure what is the correct article that should be placed in front of a single letter.  Here I tried to list all the 26 letters with articles. Please let me know if I am correct or not and be kind to point out my mistakes.   an "A" a "B" a "C" a "D" an "E" an "F" a "G" a "H" an "I" a "J" a "K" an "L" an "M" an "N" an ""O" a "P" an "R" a "Q" an S" a "T" a "U" a "V" a "W" an "X" a "Y" a "Z".

I was reading a comic book and I noticed that the author used "an A" and "an N" in a particular phrase (screenshot below). While I understand the usage of "An A" here (A being a vowel and what not) and "N" having a pronunciation which has a sound similar to "A".  Since most of English alphabets have pronunciations which start with a syllable similar to one of the vowels or semi-vowels; is it OK to prefix the letters using "An"?  For eg. An X, or An Y.        Zenescope's Grimm Fairy Tales - Werewolves: The Hunger, page #8 (Click to enlarge)


I'm working in one workspace. I switch to a different workspace and launch Firefox (by clicking its button in the sidebar). I switch back to the original workspace while Firefox is launching.   I wanted Firefox to run in the alternate workspace. But it opens its window in the original one.   Seems like there should be a way for apps to notice which workspace they're being launched into, and honor that choice.

Is there any way I can switch the application running in one workspace to another on command line? I use Ubuntu 10.04   UPDATE1 As  per suggestions below    wmctrl -l 0x02200003 -1 bond Bottom Expanded Edge Panel 0x02200049 -1 bond Top Expanded Edge Panel 0x02000020  0 bond x-nautilus-desktop 0x04e00004  0 bond bond@bond: ~ 0x0482a380  0 bond OMG! Ubuntu! | wmctrl - Chromium 0x05000072  0 bond how to shift applications from workspace 1 to 2 using command - Ask Ubuntu - Stack Exchange - Google Chrome   now when I type   wmctrl -r :OMG! Ubuntu! | wmctrl - Chromium: -t 2 No window was specified.   So how to use it properly what is the mistake in above?  UPDATE2  I tried      wmctrl -r 0x05000072 -t 2   but the windows had no effect and they remained in same work space.


I have some math structured like the following in a display math environment:  \left( \frac{ \left( \frac{a}{b} \right)^{e} }{L} \right)     Apparently, the outer fraction is centered vertically in the surrounding parentheses even though its numerator requires more space than the denominator L.  To me this looks unbalanced with too much space below the L.  Is there a way of shifting the entire content of the outer parentheses down?   MWE:  \documentclass[]{standalone} \usepackage[utf8]{inputenc} \usepackage{amsmath} \begin{document}     $\displaystyle         \left( \frac{ \left( \frac{a}{b} \right)^{e} }{L} \right)     $ \end{document}

Have a look at the following code:  \documentclass[letterpaper]{article} \usepackage{amsmath,amssymb} \begin{document}  $2-\frac{2}{1-\left(\frac{2}{2-\frac{2}{x^2}}\right)}$\quad  $2-\dfrac{2}{1-\left(\dfrac{2}{2-\dfrac{2}{x^2}}\right)}$\quad  $2-\cfrac{2}{1-\left(\cfrac{2}{2-\cfrac{2}{x^2}}\right)}$\quad  $2-\dfrac{2}{1-\left(\cfrac{2}{2-\dfrac{2}{x^2}}\right)}$ \end{document}   This gives:    Evidently, the first display is not the proper way. The second and last are the same I guess. The third has a better display but there is too much space above the 2 in \left(\cfrac{2}{2-\cfrac{2}{x^2}}\right). Essentially, non of the above displays satisfies, for me, a good Mathematical typsetting. Although, it may be argued that it is the default in LaTeX. I just can't get it right? Any insights? In a book I got this example from it looks like this without the excessive bold (this is a scanned image):


Let us take:   x = list<int>::iterator y = list<int>::const_iterator z = vector<int>::iterator t = vector<int>::const_iterator   Is there any difference between:   ++x and x++? ++y and y++? ++z and z++? ++t and t++?

In C, what is the difference between using ++i and i++, and which should be used in the incrementation block of a for loop?


I am working on a clustering problem for which I have to manually choose the number of clusters. I have a visualization tool that helps me decide whether the clusters are good. In order to automatically select the number of clusters, I tried the following: compute the silhouette associated to several clusterings and choose the configuration giving the best score. My clustering algorithm uses a correlation $p \in [0,1]$ to regroup the elements. Since silhouette requires a dissimilarity, I converted my similarity into a dissimilarity. I tried different formulas for this conversion: $1-p$, $1/(1+p)$, or $1/(1+\exp(1+p^2))$.  Every time, the clustering seems nice (visually), but the silhouette is poor (around 0).   I think the reason might be because the conversion formula I am using is not appropriate, but I don't have any idea of what a good similarity to dissimilarity conversion could be. Any idea?

I am using Silhouette width to compute the best value for k in k-means. As I am performing document clustering, I am calculating the values of a and b as follows in Python:  a = distance(data[index], centroids[clusters[index]], metric=metric, p=p) b = min([distance(data[index], c) for i,c in enumerate(centroids) if i != currentindex]) score = float(b - a) / max(a, b) if max(a, b) > 0 else 0.0   The original formula from the  is the following:    I am using a cosine similarity measure to compute the distances and was wondering if this formula needs to be changed or it can be left as is. In the above snippet of code, the function distance computes the cosine similarity metric.


I have tried this problem five times but I keep getting stuck. I keep following the proof for $\sqrt{2}$. I know that I have to prove that the set is nonempty. Which I do by induction.   $2^1 > 1$  assume $2^n > n$ and prove $2^{n+1} > n+1$  $2^n + 2^n > n+n > n$  Then I think I have to prove that it has an upper bound. Also, I think it has something to do with prime numbers?

It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well.  On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$.  It seems that any positive integer has a square root that is either an integer or irrational number.        How do we prove that if $a \in  \mathbb N$, then $\sqrt a$ is an integer or an irrational number?      I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational.  This suggests we can extend the previous result to other radicals.        Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational?


when adding an element to the history list it changes the rest by the element that I add inputt="^<<<" cordenadas=[0,0] historial=[] for i in inputt:     if i == "^":         cordenadas[0]+=1     elif i== "v":         cordenadas[0]-=1     elif i== "<":         cordenadas[1]-=1     elif i== ">":         cordenadas[1]+=1     historial.append(cordenadas)     print(historial)   this is the output [[1, 0]] [[1, -1], [1, -1]] [[1, -2], [1, -2], [1, -2]] [[1, -3], [1, -3], [1, -3], [1, -3]]

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


Suppose that a real sequence $u_n$ is such that $$u_{n+1}-u_n \rightarrow0$$  That is not enough to prove that $u_n$ is convergent (take $u_n=ln(n)$)  Now what if $u_n$ is bounded ? I guess it does converge, but how to prove this ? I tried to show that it had only one accumulation point...

This was the last part of an exam question. I have spent a long time looking for such an example but have failed (sequences when one of the three conditions is dropped are easily found but I couldn't find one when all three are required). Could you also give the way you thought of the example in your answer please?   Thanks!


Here's the program.  #include <iostream> int main (int argc, char * argv[]) {     int a[4] = {10, 11, 18, 32};     int x = 2[a];     int y = a[2];     std::cout << "x = " << x << '\n';     std::cout << "y = " << y << '\n';     return 0; }   The output is as follows.  x = 18 y = 18   How is "2[a]" legal syntax? What is happening in this program to make this work? Even  says 2[a] is a syntax error.

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


Recently I upgraded my Ubuntu to 14.04 and now my keyboard layout changes to "English (US)" each time I reboot, even though in the top right of my screen "German (Swiss)" is selected as the active keyboard. My list of selected keyboards shows "German (Swiss)", "Russian", "Greek" and "English (US)", in this order, where "German (Swiss)" should be the default setting.  Does anyone know how this problem can be fixed?

I had a problem with the keyboard layout changing from PT (I'm Portuguese) to EN automatically with the last Ubuntu updates in Ubuntu 13.10. After Ubuntu 14.04 came out, I formatted my computer and installed the new version.  After that I haven't had any problems until the recent Ubuntu base update 2 or 3 days ago, when I started having the same problem again. I even removed the English keyboard from the Keyboard configurations, left only the Portuguese one, but still, every time I reboot my PC I get the keyboard configured for EN, despite Ubuntu displaying the contrary?  How can I remove this? I don't want to format the PC again and I'm getting really tired of this problem, since it looks like many Portuguese/Brasilian Ubuntu users are having the same problem.


I'm struggling to retrieve data from an API using PHP. My PHP code: <?php $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "https://api.coronavirus.data.gov.uk/v1/data?filters=areaName=United%2520Kingdom;areaType=overview&structure={%22areaName%22:%22areaName%22,%22date%22:%22date%22,%22newCasesByPublishDate%22:%22newCasesByPublishDate%22,%22cumCasesByPublishDate%22:%22cumCasesByPublishDate%22}");  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($curl); curl_close($curl);  echo $output; ?>  Sadly this just outputs a random list of characters like this: ��9|_��M�\�E�JЀ���"�H*p�Kx���,:VK�`>���m��a˒��܆�V^��gt�d�e]���������������f�ӷ�7�?_�\=�^Z)�b�j��߽�����������{����������tu�������7����+/J���~���������>������o>|�y�v�����s��Et{���i��L;�+>�Pq�F7��ĵQ�u�q9s��e��*͈f hkh�T����Ӵn�ճ�4�Dk�4��E��q��J����XUi�4-r��j�9UZB���s)�J9��a&�z�� �$�Ͳ��n &��4���򺁖�� �a* ��UP�:Gz�4В:�Z�Pc�@KZsښJU'���mĔ3�@Kj�4KSU�@Kꜧ7�ڇ��ZR����ZUyݨ2I����`�֭�ӴQ�u-Y{JZX�i�%5*dwZ�;����4�Ű�FI�%A��3�������E�u��{@�e@TZm�uWidsVm� j�˱�`�V$��hrz�\���4�������Fǜ��%˩e�xQ��J-F�*�к�m��.��Q��y�m��2�4�+ݚJ��Ts�R�(!Ge�t���\��F�e���)� �kȤ�ZN4Tf��-���ςhَ&*���T�ɕ����ZA �R."��0�Y�#��Ԓ-��ֿ0�l#?թL�Uj��l,$�+md��t0�ȒLv�VM����f�$Abm�L#%)�hU�d�Sf�ݬ�vL�FǼ�k�VE�ܔ�%Y�/z�n��c�=UE&35��yd $3`�ʲ>jf��֬t�E��TvY��׬��(@"]�9%�u��4�'E���U�utQcК�}�T��*�浨0�J%T�Z� ��AkVr�kFj����iL ��0�+S��Y�H9�>u���S�O�S�I0��|�95-���g���Q +1d(HHԮ�Y�M=���IM�i8���T�PA��Ta�Ԇ��O���$*%�2����o�aU<��h��RR�2�.�@��cf�aT�8��JkF �!�O#y&����h$˔ #׎���yς�&è� ��|DO�;Z��$X3U��2yX�b��e��0��Ȩ�4���ZT<�iCK�D�t�i��D���m���Pa� k!����D3&^��������e֔i�2:��s�4�j��*��]z�3�G�tT�g<.�&7����V����^yY٦N$9�%���TF�a?ÿ�T׍��Q���e��6�w2�~L��m� �C�E��@wԏV^�7l5�uk�DPixZ\˅Ny��6�'���"�d�ͭ�5lj��}�J��88��Z�J���S�Ir5V��g�M��#[cx�5�}M�:��k{Suo� \7˔i�%��[�=BUe�U�p���%U��V]@[my�Z��.�V�*���z�4����݇�]�R^&�V�� o� �ɜ&^stS^(&���ʁv�W�p}l�\T)��]�@;�f *��S�U�YD�������\%��ft��*�(���ZO�z���@G�͐6L9*O�W�-[Qu�S������L��n��݊��B�sJ���M�Q����>�+ �F�)9�|��f7?�D�ó�%��Ҁ�������al6m�c#GUǄ(�pyl䨖Z��cVS�q�O�t�PV��1I�j��%Ŭ��F���(�*�)�7�h%�*�U��\����VA�ڠ�~Fл��{k����Rh�b{���i�nv��M� |Ƙhf-TZ����{���&6�z��uW��UC��&�7kC�����D�n��T3�i�.�'��6��w1���,M��B{7e�r@M��81��м�Tc���]TiDR�G�Y K5���`���d��9�G�%����=�r(Й �W���Zx���q�@�^�P���b Oi�S1� &���sB@��sF#G�oB�M(e U�_�26��M(� %6��M(�99�Y�?T�mB)爲J�']N3*��W���7��93&S��}W)mJ݄�P��O1l=����U]�>]_� �[��V��(��V���n�@�h+e�����R�Jl+e�����R�Jl+e�����R���2����l�e+e([)C�J��������7W��ǫ����w������_��}u�������������ot�����������������˻����W��?<�?}��t�|ֿ~����_��_/��}����_��>~۩ώ?����S�=��<}w��������5-��_��_fk��������ç�����m��3W��ߦ���x����⶷nx   Putting the url directly into a browser works fine, giving a nice JSON, see . I'm really scratching my head to know where to go from here to get this to parse properly in PHP. Can anyone help, I'm completely out of my depth here.

I'm retrieving a gzipped web page via curl, but when I output the retrieved content to the browser I just get the raw gzipped data. How can I decode the data in PHP?  One method I found was to write the content to a tmp file and then ...  $f = gzopen($filename,"r"); $content = gzread($filename,250000); gzclose($f);   .... but man, there's got to be a better way.  Edit: This isn't a file, but a gzipped html page returned by a web server.


I have a 2008 iMac, 3ghz with 24" display. I'm able to install 19.04 Desktop AMD64 distribution using the safe graphics feature, but once I reboot after the install, I'm left with a black display. My guess is, based on some reading that it is a video card driver issue. I added, what I thought to be the current driver to the lib/firmware directory, but suspect I must need to edit a configuration file or initiate a setup or probe of the hardware to take advantage of the driver, as the results are unchanged.   Is this the right direction to go, if so, can someone point me to the correct step by step process? Or is it a better idea with this device, to use a different image file, if so any recommendation to a better option would be greatly appreciate? Best Regards...

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I followed the instructions from  to an absolute t there and it works great. Only thing is that no matter what I try, whenever I double click on the icon for my second account it asks me to enter the password. Whether I have the "Remember my Password" box ticked or not on either account... no matter what combination I use... my PC will only remember 1 account's password (even, if as I said, the box is ticked) Any suggestions?

I'd like to switch between two Steam accounts (from the same windows user account) without having to re-enter their passwords. So basically I am trying to write a batchfile which takes care of the relevant files and/or registry settings, but for that I need to know     Which files and registry settings change when logging in as another user?   Obvious bonus points for providing a batch file for that task.


I have two vectors that I want to merge without sorting the elements:  A = [a d f h] B = [b c e g] C = [a d f h b c e g]  // I want this   std::merge and std::inplace_merge end up sorting the vectors. Is there any way of doing this other than manually reading the two vectors in succession and pushing the values into a new vector?


Clouds are made of extremely small droplets of water . Their high surface area to volume ratio means that air resistance would greatly slow their fall.  However, regardless of a water droplets total size, water's density is still much greater than air, and over time the earth's gravitational pull should cause the water droplet to fall with respect to its surrounding gas.  Why then, do water droplets in clouds  rather than fall to the earth? If drawing a Newton force diagram of a water droplet in a cloud, what forces pulling upwards equalize the force of gravity pulling it down?

Clouds are made up of tiny water or ice droplets, depending on temperature. This implies that cloud density is greater than that of dry air. Why don't clouds sink through their surrounding atmosphere rather than float by in a variety of formations?


I have written a simple arithmetic logic in both C and JAVA. But C takes nearly 23.4s whereas JAVA takes around 4s to finish executing. This question is not based on how I calculate time which I suppose is already mentioned in the code. This is based on the execution.  C code is as follows.  #include<stdio.h> #include<time.h>  main() {     clock_t begin = clock();     long i, temp;     for(i = 0; i<10000000000; i++)         temp = i * 5;      printf("temp : %ld\n", temp);      clock_t end = clock();      printf("time : %lf\n", (double) (end - begin) / CLOCKS_PER_SEC); }   The output for C is   temp : 49999999995 time : 23.477688   JAVA code is as follows  public class Test {     public static void main(String[] args) {         long startTime = System.currentTimeMillis();         long num = 5, temp = 0;         for(long i = 0; i < 10000000000L; i++)             temp = num * i;          System.out.println(temp);         long endTime   = System.currentTimeMillis();         long totalTime = endTime - startTime;         System.out.println("Execution time : " + totalTime);     } }   The output for JAVA is   49999999995 Execution time : 4194   Am I missing something to interpret JAVA is more efficient than C

How do I get a method's execution time?   Is there a Timer utility class for things like timing how long a task takes, etc?     Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want.


Suppose $G$ is a group and let $S$ be the set of all isomorphisms $f: G \rightarrow G$ Show, if $|S|=1$, that the group G is abelian with elements of order 1 or 2 Now so far I know that since $|S|=1$ there is a canonical map or canonical isomorphism but how do I use this fact concretely? Thank you in advance

If $G$ is a trivial group , obviously $Aut(G)$  is  trivial . Does the converse  hold $?$ .  When  we  are  given  that a  group $G$  has  trivial  automorphism  group , can we  conclude  that the group  will  be  trivial $?$ .  I  guess  not . For  one  thing , we know  that  $$G/Z(G)\cong Inn(G)$$. So , $Aut(G)$ being  trivial  would  imply  that $$G\cong Z(G)$$  i.e.  $G$  is  commutative . But I  see  nothing about $G'$s being trivial .   The problem  is  that  while I cannot  prove  it , I  could  not  find  a  counter example  either , from  among  the  groups  I  am  familiar  with .   What  is  the non-trivial  commutative  group  that  has  trivial  automorphism  group  $?$


Our application requires int? variables. I'm often checking both to make sure not null and not 0 and it does get lengthy.  Is there an out of the box version of String.IsNullOrWhiteSpace() or String.IsNullOrEmpty() for int?  Maybe this would require an extension method?  If there even was or when someone makes one, would something like this considered bad practice?

I'm working on a project where i find i'm checking for the following in many, many places:  if(item.Rate == 0 || item.Rate == null) { }   more as a curiousity than anything, what's the best way to check for both cases?  I've added a helper method which is:  public static bool nz(object obj) {     var parsedInt = 0;     var parsed = int.TryParse(obj.ToString(), out parsedInt);     return IsNull(obj) || (parsed && parsedInt == 0); }   Is there a better way?


How would I display the lines that do not contain certain letters? This is what I have already tried unsuccessfully to show the lines that do not consist of an a or b:  egrep *[^ab]* filename

Is it possible, using grep, to search for instances of John Smith but exclude instances of Mr John Smith?


PHP has the amazing  function which takes pretty much anything and turns it into a time.  I'm looking for something similar in Python?  As an example of why: I'm parsing syslogs which have the dumbest format ever (aka ) which omits a year and includes a space-padded day-of-month.  Currently in Python I'm doing this:  import datetime d='Mar  5 09:10:11' # as an example  # first remove the space, if it exists if d[4] == ' ':    d = d[0:4] + d[5:] # append this year (I know, it could be last year around Dec/Jan!) d =  str(datetime.datetime.now().year) + ' ' + d  # now we can feed it strptime date = datetime.strptime(d, "%Y %b %d %H:%M:%S")   This is really ugly.  Is there a better way?

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I have checked that www.example.com/sites/default/settings.php is reachable via web browser, even if it returns an empty page. What is more strange, in Drupal org webpage,  , it gives a 500 internal server error. Shouldn't the access be prohibited to that folder, or even a redirection made?  This is different to the question  , though somehow it completes it.

In the default installation, settings.php is located at sites/default/. There are no recommendations in the official Drupal website about changing the location of this file. Doesn't it pose a potential problem of security? I have seen Apache webservers eventually failing to interpret PHP files, and serving the content of the PHP file in pure plain/text format, instead of the supposed HTML content. That would completely expose the database connection user and password, which is not even encrypted. Why does it work this way?


I've been studying experimental physics on the book "The art of experimental physics" and on the chapter about error analysis there's something that has been bothering me. The author says:  Now that we have determined the "best value" for the measurement, that is, $\bar{x}$, we need to estimate the uncertainty or error in this value. We start with defining one way in which the spread of data about the mean value can be characterized. The standard deviation $s$ is defined as $$s = \sqrt{\dfrac{1}{n-1}\sum_{i=1}^n (x_i-\bar{x})^2}$$ If the standard deviation is small then the spread in the measured values about the mean is small; hence, the precision in the measurement is high. Note that the standard deviation is always positive and that it has the same units as the measured values. The error or uncertainty in the mean value, $\bar{x}$, is the standard deviation of the mean, $s_m$, which is defined to be $$s_m = \dfrac{s}{n^{1/2}}$$ where $s$ is the standard deviation and $n$ is the total number of measurements. The result to be reported is then $$\bar{x}\pm s_m.$$  Now, why to get the error on the quantity measured we must divide the standard deviation by $\sqrt{n}$ instead of just using the standard deviation? Why things are done in this way?

I have a number of measurements of the same quantity (in this case, the speed of sound in a material). Each of these measurements has their own uncertainty.  $$ v_{1} \pm \Delta v_{1} $$ $$ v_{2} \pm \Delta v_{2} $$ $$ v_{3} \pm \Delta v_{3} $$ $$ \vdots $$ $$ v_{N} \pm \Delta v_{N} $$  Since they're measurements of the same quantity, all the values of $v$ are roughly equal. I can, of course, calculate the mean:  $$ v = \frac{\sum_{i=1}^N v_{i}}{N}$$  What would the uncertainty in $v$ be? In the limit that all the $\Delta v_i$ are small, then $\Delta v$ should be the standard deviation of the $v_i$. If the $\Delta v_i$ are large, then $\Delta v$ should be something like $\sqrt{\frac{\sum_i \Delta v_i^2}{N}}$, right?  So what is the formula for combining these uncertainties? I don't think it's the one given in  (though I may be wrong) because it doesn't look like it behaves like I'd expect in the above limits (specifically, if the $\Delta v_i$ are zero then that formula gives $\Delta v = 0$, not the standard deviation of the $v_i$).


I have been seeing people using base64 encoding on a few small icons and styles, but nothing too important like the content itself.  I was wondering, is there an advantage to using base64 over a .png file? Is loading a base64 image faster than loading the image in a .png or .gif? Does this effect SEO in a bad way?  My assumption is that it won't effect SEO as long as its an image asset to design such as favicon or css background tile. What are the best practices and is this something I should integrate on my websites?

Do you think the use of image data URI is SEO friendly?   On the one hand saves you a HTTP request. On the other hand it really messes up your code. Especially for image files larger than 20KB or moving GIF image files of up to 200KB, the quantity of code inserted is enormous. As Googlebot reads usually from top to bottom, all data after the image data URI encoding will be harder to rank well in Google.   Consider that image data URI is not in the CSS files as they should normally be and for the time being I can use only TinyMCE editor which provides me with just two options, either insert image with the image data URI method or the traditional image link.   I would like to know which is more search engine friendly.


Fix an ambient finite set $X$, without loss of generality $X = \{1, \ldots, |X|\}$. You wish to identify some subset $B \subseteq X$ hidden to you. You can gain information about the subset as follows: you can choose any subset $C \subseteq X$, and you receive the number $|B \cap C|$.  In terms of $|X|$ (and possibly $|B|$), what is the least number of queries required to determine $B$? How about a special case, for example when $|B| \leq \log_2(|X|)$?    Some observations:   The case $|B| = 1$ allows binary search, and thus can be done in $\lceil\log_2(|X|)\rceil$. Already for $|B| = 2$, a way with fewer than $2\log_2(|X|) + C$ queries is not clear to me (although I can see how to do $\frac32 \log_2(|X|) + C$ on average). Trivially $|X|$ queries always suffices: just start with $C = X$ and remove one element for each query. This question was inspired by a recent Google Code Jam problem: there your query consists of a bit for each element of $X$, and you get $|X| - |B|$ bits back. However, in the Google Code Jam problem the returned bits are still ordered correctly, just with missing values. This allows you to match up the responses of multiple queries. Then $\lfloor\log_2(|B|) + 1\rfloor$ queries suffice.

I pick a random subset $S$ of $\{1,\ldots,N\}$, and you have to guess what it is. After each guess $G$, I tell you the number of elements in $G \cap S$. How many guesses do you need?


Assuming intelligence is defined by the speed a person can process/calculate information and combined with the fact that the Flash has to think really fast if he wants to control his speed, we can deduce that he has the ability to process the information coming in fast enough to control it. That being said, if this ability to think quickly exists even when he is not running (which there is no reason for it not to), he should be super smart based on the fact that he also has a quicker overall processing rate?

The Flash is a superhero whose power is super speed. In the TV shows (the current one and the one from the 90s portrayed by John Wesley Shipp), the super speed effect is often shown by slowing down/freezing events around The Flash. This probably means that The Flash also has super-reflexes in addition to his super speed, so that he does not crash into the first building in his way.  What about The Flash's thinking ability? Since the world seems to slow down around him, I guess he can analyze a situation faster than anyone else (at least while in motion) but has The Flash ever been seen using "super fast thinking" to solve problems (like a super complicated maths equation or science problem)?  Note: I know The Flash mostly from the TV shows, but any answer from the comics is interesting to me too.


I realize the following will not work but is there an equivalent?   const char *foo = "foo"; static char *end = sprintf ("%s_bar", foo);   What I want to do is concatenate strings and then make that concatenated string a static variable so that it becomes a global variable. Also I like not having to assign memory to a char. I need this to go in main() because I need to use a function (sprintf) to merge two strings.

I'm working in C, and I have to concatenate a few things.  Right now I have this:  message = strcat("TEXT ", var);  message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar));   Now if you have experience in C I'm sure you realize that this gives you a segmentation fault when you try to run it. So how do I work around that?


The close votes count has been bothering me for a while now. I want to make sure I fully understand how the system works and maybe update the FAQ so it's less confusing for people.  The  says we have 50 close votes each day.   I am 6K+ on SO.  I have used 40 votes in the Close Votes queue today but If I go into any question and click on close, it says that I have 12 votes left ( after using 8 close votes directly from question pages earlier today - not the queue )  Does that mean I actually have 60 votes? I am confused.  Is there anywhere to find the rep lvl vs. the amount of close votes allowed per question and review queue?  Something like  1K+ = 20 votes on questions 2K+ = 30 votes on questions 3K+ = 35 votes on questions / 40 in the review queue 4K+ = 40 votes on questions / 50 in the review queue

I am new to the review part of Stack Overflow and I am trying to understand what is the meaning of votes remaining in the Review | Close Vote.  For example: Today I was at my 39 vote and it said that there was still 21 votes remaining.        However, after my 40 vote:        So, apparently I have started with 60 votes but I can use only 40?


What is the fundamental reason as to why matter and antimatter annihilate?  Is it because both particles and antiparticles are excitations of quantum fields, and the annihilation process corresponds to a transition to the ground state?

How does  work? I'm wondering why matter and antimatter actually annihilates if they come into contact. What exactly happens? Is that a known process? Is it just because of their different charges? Then what about neutrons and anti-neutrons? I guess that would be about their quarks, but wouldn't it be very unlikely what all of their individual quarks would actually touch the anti-quarks of the other (anti-)neutron at exactly the same time?


I'm using the  to place a dollar sign and a decimal into a a couple of text fields. Now I want to add these two values, but I'm getting the NAN error because of the dollar sign that is placed in front of the number.  How do I remove the dollar sign (first character), add the values and place the total value into another field?  Sample HTML  <input type="text" id="value_one" />
 <input type="text" id="value_two" />
 <input type="text" id="total_value" />
   Sample jQuery  $("body").hover(function() {     var a = +$('#value_one').val();     var b = +$('#value_two').val();     var total = a+b;     $('#total_value').val(total); });

I have a text box that will have a currency string in it that I then need to convert that string to a double to perform some operations on it.   "$1,100.00" → 1100.00  This needs to occur all client side. I have no choice but to leave the currency string as a currency string as input but need to cast/convert it to a double to allow some mathematical operations.


I am trying to download a file using the bittorrent protocol but I can't get my browser to open the magnet link in my torrent client. I have qbittorrent installed but I still can't seem to download from magnet links.  A little box always shows up asking what application I want to use and there is a button that says "browse" but I can't choose anything.  How can I use such links on Ubuntu?  And when you go to explain, please explain every detail as if you are talking to someone who doesn't know anything about Ubuntu.

I can't find out how to make Firefox open magnet-links in Transmission.   There is no option to make it the standard program for magnet-links in its properties, and as I am not experienced with the filesystem so I can't add it as the standard program in Firefox either.


I have an ASUS K555L and it comes with a Mediatek MT7630E WiFi adapter which doesn't work out-of-the-box in Ubuntu. After looking in this very same website, , but I had to re-install it after almost every software update.  But now, after a kernel update (linux headers 4.2.0-42generic), this fix doesn't work. It throws the following error:  modprobe: ERROR: could not insert 'mt7630e': Required key not available  So, is there a way of fixing the fix?, is there a way to revert to my old linux headers?

This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it?


Can I use the Linux 64 bit version of the Firefox update!?

I want to install the latest Firefox on my Ubuntu (64bit) box.  What is the best way to do this? Is there a specific update site or should I download the binaries manually? If doing manually, in which directory should I put the files? In my home directory, or is there a better place?


How can I get a link for a specific answer on Stack Overflow? Like the url of the answer. Is there a place to do that or a specific way? And if you think there's a share button, I don't see one anywhere?

Is there a permalink I can use for answers/comments?


Prove or disprove 'If $\gcd(a,b)=1$ then, $\gcd(a^2,b^2)=1$, with $a,b\not= 0$'  I need to prove this statement. I think it is true and also the converse is true.  I took some examples such as $\gcd(2,5)=1$, and $\gcd(4,25)=1$...  But how can I prove this? I know that $1=ax+by$ for some $4x,y\in \mathbb{Z}$.. But not sure   How to go from there..   Any clue?

Show that if $a$ and $b$ are positive integers with $(a,b)=1$ then $(a^n, b^n) = 1$ for all positive integers n  Hi everyone, for the proof to the above question,  Can I assume that since $(a, b) = 1$, then in the prime-power factorization of a and b, they have no prime factor in common, when they are taken to the $nth$ power, they will still have no prime factors in common, and so $(a^n, b^n) = 1$ for all positive integers n.  I think I'm jumping to conclusions here again, if so, leave some tips on how to do the proof properly, thanks :)  And also, I do not know how to approach the reverse problem where if $(a^n, b^n) = 1 then (a, b) = 1$, any guidance will be much appreciated!


My credit card has a limit of $6000. If I want to book a $7500 vacation on Expedia, could I put a negative $2000 balance on my card, so when I pay for my trip on Expedia, it will get approved.?

I want to make a large purchase at a retail store to the sum of $10,000 but the credit limit on my card is set at $2000.  If I send $10K to my credit card will the purchase be allowed to go through?  Not sure if the credit limit is a hard limit or not?  I don't want to be left embarrassed if my card is declined in the store lol.  I called my bank but the answer they gave wasn't too convincing. It was kind of "Errr yes i think its OK!"  Does any one know first hand?


There are some cases of int to float casting, I found the original value changes.  For example:  int x = 49941310; float y = (float) (x); int z = (int) (y);  printf("%d, %f, %d",x,y,z);     Expecting: 49941310, 49941310.0000, 49941310... Actual:    49941310, 49941312.0000, 49941312...   In case of 18595769 I get 18595768.  I also tried static_cast in c++, same things happened. I know 23 bits to store the mantissa and 9 to store the sign and exponent. My question is, If I want original value back what should I do?

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


Me and my collegues stumbled upon a simple geometric question were non of us could provide a quick and descent answer. After some more puzzeling we still could not figure it out.  We all have the feeling it should not be that hard but fail at answering it. We hoped someone here could help us out!  Given 3 random points in a 2 dimensional space.  No point is the same position and the 3 points cannot be on the same line.  Question 1. Can a circle always be drawn which goes through these 3 points?  we assumed yes  Question 2. Is there a simple formula which gives you the radius of this circle?

Get the equation of a circle through the points $(1,1), (2,4), (5,3) $.  I can solve this by simply drawing it, but is there a way of solving it (easily) without having to draw?


Couple of us arguing about this and none of us can remember what this is or would be called. Commonly seen on forms where you are moving an option from one box on the left to a box on the right and commonly has buttons in between the two boxes to move a singular option or all options. Crude visual example below (since we can't remember it enough to search for an actual example).  ------------         ------------------- | Option 1 |         | Selected Option | | Option 2 |   ->    |                 | | Option 3 |   -->   |                 | | Option 4 |   <-    |                 | | Option 5 |   <--   |                 | | Option 6 |         |                 | ------------         -------------------   What would this be called?  ...and, no, you don't have to tell me how mind-blowingly and award winning my illustration is. I am aware. :)

Two list-boxes, side by side, one with available items, the other with selected items, with arrows in between to move items back and forth.


I can alias individual hosts in .ssh/config like this:  Host nickname     Hostname host1.example.com   But sometimes I want to alias a whole domain, so as to save typing on the command line for machines on that domain:  Host *.nick     Hostname %h.really.long.domain.example.com   That doesn't work as written, of course. Is there something that would?    Comments have suggested  as a duplicate, but that solution doesn't work for this use case; it requires all hosts to be explicitly listed in the config file. I'm looking for a global method; I want to tell SSH 'rewrite any host of the form host???.short as host???.really.long.example.com.'  Think of it like an equivalent of sed s/.short/.really.long.etc/

Say I want to configure my ssh options for 30 servers with the same setup in my .ssh config file:  host XXX      HostName XXX.YYY.com      User my_username      Compression yes      Ciphers arcfour,blowfish-cbc      Protocol 2      ControlMaster auto      ControlPath ~/.ssh/%r@%h:%p      IdentityFile ~/.ssh/YYY/id_rsa   where the only thing that changes between these 30 machines is XXX.   Instead than repeating the above structure 30 times in my config file, is there another way to define a range of machines?


Let $(a_n)_{n\in \mathbb{N}}$ and $(b_n)_{n\in \mathbb{N}}$ be two real sequences that satisfy $a_n\geq b_n, \forall n \in \mathbb{N}$ and converge to some $a,b$, respectively.  Is it always true that $a \geq b$?

I'm stuck with the proof of the following:  Suppose that $(s_n)$ converges to $s$, $(t_n)$ converges to $t$, and $s_n \leq t_n \: \forall \: n$. Prove that $s \leq t$.   I've tried starting with $s_n \leq t_n \: \forall : n$ and the definitions of each limit (i.e. $|s_n - s| \leq \epsilon \: \forall \: n > N_1$), but I'm not really getting very far. Any help is appreciated!


I've got a PHP routine that processes a form and outputs the values to a CSV file. I'm using array_keys() to create the header row (skipped if there is one). Everything works perfectly except the final header term is "submit" because, of course, my form includes a Submit button. So the data ends up looking like this:  name,email,cell,dob,study,submit "Temp One",fred@gmail.com,646-325-1111,1995-03-31,8,Submit "Temp Two",tom@gmail.com,646-325-2222,1995-03-31,4,Submit   How do I omit the submit button both from the header and the data?  Here's my code:  if(isset($_POST['submit'])) {     $data = array_values($_POST); // get only values     $headers = array_keys($_POST); // keys are headers      if( $fp = fopen('data.csv','a+')) {         $line = fgets($fp);         if(!$line == $headers) {                 fputcsv($fp, $headers);                 fputcsv($fp, $data);         }         else         {             fputcsv($fp, $data);         }         fclose($fp);         header('Location: thanks.php');      } }

Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?  I thought that setting it to null would do it, but apparently it does not work.


I am trying to create a bootable USB stick from a .iso image (it isn't a linux distro or anything of the sort) intended for use with a CD. I've tried UNetbootin and dd but they don't boot.

I want to burn a Windows ISO to a USB device in Ubuntu. How do I do this?   I know how to burn a Ubuntu ISO into a USB device, but with a Windows ISO it's not the same.


I want to buy Dishonored, but can I play open-world after finishing the main quest? I mean playing free-roam, killing anyone like in Assassin's Creed.

I was considering whether or not to buy Dishonored, and watching gameplay of it on Youtube, when a thought popped into my head: is Dishonored free-roam? Can you go anywhere you want, similarly to Fallout or The Elder Scrolls?


The principle for the case of three sets, states: $$|A\cup B\cup C|=|A|+|B|+|C|-|A\cap B|-|A\cap C|-|B\cap C|+|A\cap B\cap C|$$ I wonder whether there exists a similar formula, where $\cap$ and $\cup$ are exchanged; for example: $$|A\cap B\cap C|=|A|+|B|+|C|-|A\cup B|-|A\cup C|-|B\cup C|+|A\cup B\cup C|$$ If yes, is there a way to find the cardinality of the intersection of n sets?

The principle of inclusion-exclusion (PIE) is often used to count the number of elements in a union of $n$ sets in terms of an alternating sum of their various intersections:  $$ \left |\bigcup_{i \in [n]} A_i \right|  =\sum_{J \subseteq [n]}(-1)^{\left|J\right|-1}\left|\bigcap_{j \in J}A_j\right| $$  where $[n] = \{1,...n\}$. I'm running a psychology experiment that requires subjects to count the number of elements in various sets and in various unions of these sets. I would like to be able to calculate from the behavioral data the $implied$ number of elements in any arbitrary intersection of these sets. It seems this can be performed by writing the PIE in the following recursive form:  $$ \left|\bigcap_{j \in J \subseteq [n]}A_j\right| = \left[\left|\bigcup_{i \in J}A_i\right| - \sum_{S \subsetneq J}(-1)^{\left|S\right|-1}\left|\bigcap_{s \in S}A_s\right|\right](-1)^{\left|J\right|-1} $$  Two questions: (1) is this alternate (recursive) statement of the PIE correct? (2) If so, has anyone seen (or can they provide) a non-recursive solution that expresses the intersection of the $A_j's$ in terms of explicit unions only?


The first sentence is passive and second is simple past but how can we tell that surprised is participle in first sentence and adjective in second one?.  1.I was surprised by how well the students did in the test.  2.The lady was surprised at what happened to her pet.

I am confused about this sentence pattern (S+V+C):   I am surprised [ to see you ].  I am surprised [ at how many have never heard of it ].  I am surprised [ by his response ].  I am surprised [ that some people study the past ].    I think that the sentence "I am surprised" has the sentence pattern "Subject + Verb + Complement". So the phrases following the complement should be adverb phrases, because they modify the complement (surprised), right? But the sentence "that some people study the past" is a nominal clause. It should be unable to modify the complement (surprised). So why are these following phrases able to modify the complement?  to see you at how many have never heard of it by his response that some people study the past


I don't know if it is necessary for them to eat. But it makes me wonder why there is pudding in Harry Potter and the Chamber of Secrets when Nearly Headless Nick invited Harry to his Deathday Party.  (Feel free to edit and include the chapter)

Peeves was a poltergeist. It generally irritated people and rather then helping them as well as making fun of them.   Why was Peeves in the school? What is/was the job or work assigned to Peeves?


I would suspect that delete[] is O(n) and the others are O(1), but I want to be sure. Then again, it doesn't seem right that you would get constant time for allocating a variable amount of memory.

What is the time complexity of dynamic memory allocation using new, malloc, etc.?  I know very little about how memory allocators are implemented, but I assume the answer is that it depends on the implementation.   Therefore, please answer for some of the more common cases/implementations.  Edit: I vaguely remember hearing that heap allocation is unbounded in the worst case, but I'm really interested in the average/typical case.


I have two questions about Magnetic Field.   Given a particle with mass m, charge q and uniform B field.    B is going into the page, and particle is moving to the right   Like this. The textbook says that the particle will go in a circular motion with a centripetal acceleration due to the force by magnetic field.   Also, I was taught that the formula for the force of magnetic field is F(vector) = q*V x B. However, the formula for this particular situation, the text book says it's F = qVB.   What happened to the cross product? I considered the angle formula for cross product ||A x B|| = ||A||*||B||*sin(theta). However, the force formula does not have magnitude signs over V nor B. So How did it get converted to qVB ?   What does it mean by static B field, and how does it do 0 work on a free charged particle evne in a non uniform B field?

I learned that the force from a magnetic field does no work. However I was wondering how magnets can be used to pick up pieces of metal like small paperclips and stuff. I also was wondering how magnets can stick to pieces of metal like a refrigerator?


Prove that If $m'$ is a common multiple of $s$ and $t$, then $m | m'$. Here $m$ is the LCM of $s$ and $t$.    Although the statement is intuitively clear to me I don't know how to prove.

Is $$d_1\mid n,d_2\mid n\iff [d_1,d_2]\mid n$$ true ? And if yes, how can I prove it ? I recall that $[d_1,d_2]$ is the least common multiple.  My tries  For the implication : Let $d_1\mid n$ and $d_2\mid n$. Then, $d_1d_2\mid n^2$. By the way, since $d_1,d_2\mid n$, we have that $(d_1,d_2)\mid n$ where $(d_1,d_2)=:\gcd(d_1,d_2)$  and thus $$[d_1,d_2](d_1,d_2)\mid n^2.$$  Question: How can I get $[d_1,d_2]\mid n$ from this?  For the converse, since $d_1,d_2\mid [d_1,d_2]\mid n$, the claim follow.


I'm shooting a banquet room restaurant for website pitures and am having trouble getting the enitre room in focus. The shots Ive taken theres one set table in focus and the glasses and decor on the other table are really out of focus. How can I get everything in focus? I'm shooting with a Mark3 5D and lenes Ive used...70-200 mm 1.2, 50 mm 1.2,85mm 1.2, amd 24-105mm, Can someone please help me with settings and the best lense to use?

I am quite new to DSLRs and one of the first things I noticed was the incredible focus points and appearance of depth that you can achieve. That is great in a lot of scenarios, but not in all. When filming a landscape as a whole, I do not want to have the focus on that single tree, but on the whole skyline.  Is there a way by which you can sort-of "disable" the focus, so that the raw image is recorded without any added blur? I suppose something as simple as this is only a small function you can turn off, but I can't seem to find it in the manual of my camera.


Given : $$\frac{1}{1\cdot 2\cdot 3}+\frac{1}{4\cdot 5\cdot 6}+\frac{1}{7\cdot 8\cdot 9}+ ...$$  What is the sum of this series, how can one rewrite it to look simpler ?  EDIT :  Actually I found how to rewrite it :  $$\sum _{n=1}^{\infty }\:\frac{1}{\left(3n-2\right)\left(3n-1\right)3n}$$

Find this sum     $$I=\sum_{n=0}^{\infty}\dfrac{1}{(3n+1)(3n+2)(3n+3)}$$   My try: let     $$f(x)=\sum_{n=0}^{\infty}\dfrac{x^{3n+3}}{(3n+1)(3n+2)(3n+3)},|x|\le 1$$   then we have $$f^{(3)}(x)=\sum_{n=0}^{\infty}x^{3n}=\dfrac{1}{1-x^3}$$ then we find the $f(x)$,Following is very ugly(can you someone can post your follow solution,) have other simple methods? Thank you very much.


I'm using overleaf and getting errors while trying to run  \subsection{Decomposition of circular functions as a product of elemental trigonometric functions \footnote{We take elemental trigonometric functions to mean circular functions having a period of $2 \pi$ (i.e. $\sin x$, $\cos x$).}}    The error im getting is:  Argument of \@sect has an extra }.  <inserted text>                  \par  l.24 ...od of $2 \pi$ (i.e. $\sin x$, $\cos x$).}}  I've run across a `}' that doesn't seem to match anything. For example, `\def\a#1{...}' and `\a}' would produce this error. If you simply proceed now, the `\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. But if your `}' was spurious, just type `2' and it will go away.  main.tex, line 24  Runaway argument?  {\normalfont \large \bfseries }{\@xfootnote }\def \reserved@b {\stepcounter \ETC. ! Paragraph ended before \@sect was complete. <to be read again>                     \par  l.24 ...od of $2 \pi$ (i.e. $\sin x$, $\cos x$).}}  I suspect you've forgotten a `}', causing me to apply this control sequence to too much text. How can we recover? My plan is to forget the whole thing and hope for the best.

Trying to put a footnote in subsection title:  \subsection{Effect of Lateral Confinement on SW Band Structure\footnote{Parts of this sub--section are based on \citet{Venkat2013}}}   produces the following error:  Argument of \@sect has an extra } ...section are based on \citet{Venkat2013}}}   I am using:   \documentclass[paper=A4, fontsize=12, toc=listof, toc=index, toc=bib]{scrreprt}   Please advise.


As it is said in general classical statistical mechanics, that temperature is nothing but just an integrating factor and T($E_{avg}$). And as proton is not a fundamental particle rather have inner structure is it okay to ask for temperature of a single proton (in deep space, with no electromagnetic interaction, gravity nothing)?

A show on  the weather channel said that as a water molecule ascends in the atmosphere it cools. Does it make sense to talk about the temperature of a single molecule?


My question is what is the difference among these three sentences.   He is big enough to do such  heavy works. He is not big enough to do such heavy works. He is small enough to do such  heavy works.   I am so much confused between 2 and 3.Also, I don't get what the 3rd one means.

I'm confused because in my textbook there's a sentence:  He is small enough to walk.  because baby was so small that he couldn't walk. Why didn't they just use small instead of small enough?


My book consists of a meteorite that gave certain people telepathy/telepathic powers. There are 3 different powers and one of the groups is the strongest. They have telepathic duels to not only hone their powers but determine the strength of their power. It’s set on Earth and only certain people get the power(s). I keep coming back in my mind to the names of each group which are the Kes, Prit and one other, but I may be confusing those names with a Star Trek TNG episode. So I believe one of the groups wants to be in control rather than the ones who are in control. Battles ensue, mostly Mind battles as one group is weaker in telepathy and stronger in telepathic powers. Interesting story, written by an attorney. This has been killing me since I lost the book over 20 years ago.

3 groups of telepaths each with different powers.  They received their powers from a meteorite.  One group is the strongest and are kind of in control.  Another group wants to gain control.  One group, I believe the strongest, have telepathic battles to determine the strength of one another conjuring up swords, walls, etc. in their minds. It was written by a lawyer.  Could have been written in the ‘80s, or earlier.


I suggest a way to buy reputation on SO.   And yes I have seen the following link which is irrelavent:    But my purpose is completely different from the above.  My only purpose for buying reputation is not for looking more important/famous but  to be able to pay for bounties for absolutely critical and time sensetive questions.  I personally don't see a drawback here as SO makes some money here and questioner also get his /her question answered with more priority.  I completely disagree with the follwing statement:  "A reputation market makes the voting system useless".   Famous industry leading websites, such as Expert-Exchange have been using similar methods for making money for years and Expert-Exchange is now highly profitable.

Is there a feature by which we can buy reputation on SO (e.g 100 rep for $1)?, or a bot by which we can hack and increase our reputation?


What is the inverse function of $ y=x^3+x$? thanks

Can you help me find the inverse function for $y = x^3 + x$?  This question was posed at the beginning of AP Calculus, so we can't use any math beyond precalc.  Thanks!


I know mass bends the space around it and I also remember matter can be converted into energy and vice versa, so my question is: can energy interact with space in a similar fashion as matter does?

We know through  (GR) that matter curves spacetime (ST) like a "ball curves a trampoline" but then how energy curves spacetime? Is it just like matter curvature of ST?


I want to disable the boot menu and still be able to start Ubuntu instead of Windows by holding a key down.  Is this possible?

In Ubuntu 12.04 (or above), how do I set the GRUB time and the default OS (that I see at boot time) as I'm dual-booting Windows (7/8) and Ubuntu (12.04 or above)?


Basically what I need is to use the Type that i got using Type.GetType in a Generic Type, is it possible, if yes how ? I need something like this:  Type t = Type.GetType("mynamespce.a.b.c"); var x = GenericClass<t>();

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


So I have this code   public String getRounded(double amount) {     DecimalFormat df = new DecimalFormat("0.00");     df.setRoundingMode(RoundingMode.HALF_UP);     System.out.println(df.format(amount));     System.out.println(amount);     return df.format(amount); }   I've added those two lines to see the difference and this is an example of what they display.  The output is this for example:  1.25  1.255  Why does this happen? Isn't the point of HALF_UP to round up? I've tried with CEILING and it does round up, although that's not what I want in this case.  Thank you

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


Stack Exchange Android App Version 1.0.63  Samsung Galaxy S4 SPH-L7200T Android 5.0.1 Lollipop  There is a pretty odd bug I noticed today with the Stack Exchange App: certain Unicode strings do not appear properly.    As you can see in the preceeding screenshot, the text ᔕᖺᘎᕊ does not appear properly. This issue is not limited to just the Question and Answer text bodies, but also usernames.  The characters appear as the general invalid replacement character.     This issue makes it impossible to perform certain tasks. (Like tagging the aforementioned user.) I had to post this question from my desktop as the app won't properly copy/paste the user's name.  I'm curious if this isn't a font issue, though I have switched to the various fonts available on my device and none of them have fixed it. That said, when I edited this question from my Android device, it still correctly saved the username included above back to the database, which would indicate a font issue.  Also, and unrelated, the ask question icon is a tad blurry in the Android App, though this is beyond the main scope of this question.

For example,  when displayed in the Android app doesn't show the ǝ character properly  in the username:    This happens in their profile and on posts.  Android app version 1.0.18 on Samsung Galaxy S3 and Android version 4.1.2.


I have a footnote in the text. However, there is a table with \begin{table}[b]. The table appears below the footnote now. Like this:  How can I make sure that the footnote is at the bottom instead of the table?

\footnote[1]{\nameref*{8.1.16} is an अधिकार सूत्र it goes upto \nameref*{8.3.55}} \& अङ्गाधिकार (अङ्गस्य)\footnote[2]{\nameref*{6.4.1} is an अधिकार सूत्र it goes upto \nameref*{7.4.97}}  I am using footnote as shown above. However the footnote appears to be floating and when I don't have much in the page it appears in the middle of the page. I got by so far with \vspace{} but I think there must be a way to position this at the bottom of the page despite whats in the page. Thanks for your help


Trying to find a short story I read around 20 years ago. Probably from the 60s/70s, it's about a man in the Cold War, shot in an experimental rocket that goes into hyperspace or something. It specifically mentions that society in America is now pretty much the same as the USSR - the USSR not being able to win the Cold War outright, but have succeeded in making USA into a controlling surveillance society. It turns out that the universe is very unstable and changes every couple of hours. As he was out of the universe when it changed the man is the only person who moves with it. He meets a people who zap him with a ray gun so that he speaks their strange guttural language. They know all this, and know they've only existed for an hour and will vanish in an hour. The universe keeps changing, the man essentially becomes God, and he recreates the world he comes from. The stinger is that everyone now speaks in the weird language of the people who explained what was happening to him. Any ideas you might have about who wrote it would be greatly appreciated.

Here's what I remember about it:   The protagonist is sent a relatively short distance into the future (maybe a year? I've forgotten). When he arrives in this "future" he finds himself in a completely different world, with non-human inhabitants. The inhabitants use a machine to teach him their torturous language. He tries to return home, and (eventually) finds himself in a realm of chaos/nothingness. He laboriously reconstructs in his mind everything he can remember about his home and finds himself back there somehow. The twist is      that in his "home" reality everyone speaks the language he was taught by the non-human inhabitants at his first stop.


I set all my power settings to "always on", but the power to my monitor is turned off routinely after ten minutes.  I've tried everything from settings in the control panel to settings in monitors - nothing affects this, including the "automatic sleep inhibitor" I keep on the taskbar.  Any suggestions?  I would like to be able to watch a long video without having to move the mouse every ten minutes.

So I was looking through the Windows 7 power options via Control Panel today, and I realized I had a couple of unresolved questions as to the nature of various choices. I was wondering if someone could give me a clear and concise explanation of the difference between the following four selections:   Sleep Mode Hibernate Mode Standby Mode Turn off hard disks after...   For example, regarding option 4 - does this mean that after the elapsed time limit, the computer will go into standby, hibernate, sleep, or just turn off? Below is an image of the options (albeit on a Windows XP system, but I think the same concepts should apply):


Imagine a table tennis board divided into the usual 4 rectangles. From top-left going clockwise we have A1, A2, B2 and B1 (in that order). B1, B2 and A1, A2 are on opposite sides of the net.    In a doubles match, we start by serving from B2->A1. During the serve, if the ball hits the net and then falls into A2, is it called a wrong serve or a let?

In tennis if I serve the ball and it goes into the opposite service box, but hits the net on the way, it is a . Is there such a thing as a let in table tennis?


My Father bought A new brand Galaxy A71 this year (January) and He passed a way two weeks a go, I had to rest the phone for me to use and the phone is asking for previous email address the one my dad was using I don't Know. how can i bypass this security future called KNOX or should I keep in Dustbin.

I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock?


Is there any difference between due to and owing to? Are there some specific situations when owing to is to be used rather than due to?

Is it fine to use due to in place of because of ? How about the other way around? Are any of these sentences ungrammatical?   He was lost because of the storm. He was lost due to the storm. He lost his way due to the storm. He  lost his way because of the storm.


Question: I was wondering if the amount of sperm increase with the amount of abstinence?  Side questions:    Is their a max amount of sperm? What happens with the excess amount?

There have been papers discussing this, and whether the abstinence period should be 1 week, 2 weeks or other [1, 2]. Some think the time to maximum ejaculation volume is even longer than this.   doi:  PMID:


When I connect to a wireless network from my laptop, Network Manager somehow requests a DNS nameserver IP from the router and writes it to /etc/resolv.conf.  How can I request a nameserver address from cli without changing /etc/resolv.conf, if I only know address of the gateway?

Is there a simple ping-like command to test whether a DHCP service is running on a network? ...on Linux


My MS Access Application uses SQL Database as backend. The permission to SQL database is granted with Windows Authentication mode to a specific user group. Most of users in the group can get access to SQL database but there are some users reported to fail for login in the database. The error message: Connection failed SQLstate: '28000' SQL Server Error: 18456 Login failed for user Domain\UserID  I spent sometime searching for the solution but I could not find one with the same problem. Could anyone give me an advice on this? Many thanks.

Message that SQL Server Log File Viewer shows:   Login failed for user [User] Error: 18456, Severity: 14, State 38   What it actually means:  Failed to open the explicitly specified database   My Question:  Is there a list somewhere of all the variations of the 18456 errors (Login failed), for each combination of severity and state, with the helpful description text?  I've had a Google but can't find anything other than specific combinations.


I was asked to set up a PC with automatically logs in to a user account that's secured with several settings including blocked USB ports.   But whenever an Administrator has to log in to do maintenance, the automatic login on startup should be cancelled.  Is there a way to cancel the automatic login with a key combination?  I can't log out of the session because the USB ports are disabled, so I have neither keyboard nor mouse access to the system once it is logged in.  OS: Windows 7 Embedded Standard x64.

I know how i can disable auto logon in windows 7 by using netplwiz, but is there a way ( possibly a keyboard combination pressed during startup ) that will prevent autologon only for this one boot?


I asked my first question here a few minutes ago and Pascal Martin was kind enough to improve its formatting. I have two questions:   Is there a FAQ that explains how to use text formatting for questions? Is there some way to send a private message to a forum member (like there is in vBulletin-based forums)?

There has been quite a few times that I wished I could send a message to another user on SO - not ask a question for everyone to see, but just a short message informing them of something or requesting them to do something.  Are there any plans to allow this to happen in the future?  Related:


... the sort of justifications it does or does not get differ greatly.   In the above sentence, the verb differ agrees with a plural. Is the subject sort or justifications? And, if sort, why is that not with an s?  Can anyone please explain this verb agreement? It sounds correct, but I seek an explanation of the subject, ideally providing grammatical terms.

Is it correct to say, "What kind of patents are being issued in these sophisticated times?" It seems like it should be What kind of patents is being issued..., but that sounds wrong.  What kind of patent is being issued... is correct and sounds right, but loses a little bit of the original meaning.  Is there something magic about what kind that allows it to be plural, or do people just misuse it a lot?


When an edit is suggested to a post, it's noted in the following way:    If you are able to use the Suggested Review queue, clicking on edit (1) takes you directly to the review queue location where you can perform your review.  Can the same be done for those able to review the Close Votes review queue? That is, when you click on the close (1) button at the bottom of the post    it takes you to that specific entry in the review queue.  This has the added benefit of leaving the reviewer in the Close Votes review queue where other clean-up might be required.

Can you give us some way to access pending Reviews for a post from the post itself?  I think this would also help improve the accuracy and quality of reviews done, as users that come across the post naturally are more likely to be better qualified to evaluate the post, and are already taking the time to understand the post's content anyways.  In most cases, these users will be able to provide better reviews than those who are  [often quickly] going through the Review Queues.  In addition, I think it would help get more reviews done, as someone viewing a post through normal site usage would be more likely to take an interest in helping maintain that post. I know I definitely would be more active with this instead of having to go through the massive Review Queue. The task of helping fix one question that I am currently reading is far more do-able than cleaning up a large queue of questions that is largely full of content I don't care about.  I'm thinking of something like a reviews(1) link that is accessible from the post itself that appears based on your rep, or perhaps even on your rep within the post's tags.


I tried to refer to first and last item of enumerate list without using \label{} command in text.  However, it shows the sublist number as well with the item number. Is there any way to fix this so that  it does not show the sublist number "c" in the top line?  "Following list of Question from 1c and 5c has four options"  Following is the MWE:  \documentclass{book} \usepackage{enumitem} \usepackage{xpatch} \xapptocmd{\@item}{\label{cd:\arabic{page}.\arabic{enumi}}}{}{}  \begin{document} \subsection*{Following list of Question from \ref{cd:\thepage.1} and \ref{cd:\thepage.5} has four options} \begin{enumerate}     \item The important issue for test     \begin{enumerate}         \item this sublist create problem         \item do not want ``c'' appearing with 1 or 5         \item if  last sublist removed, it do not show ``c''     \end{enumerate}     \item The next important issue for test by list     \begin{enumerate}         \item 15 mm         \item 20 mm         \item 25 mm         \item 32 mm     \end{enumerate} \item important issue; \item another important issue; \item oh, and yet another critical thing.     \begin{enumerate} \item important issue; \item another important issue; \item if  last sublist removed, it do not show ``c''     \end{enumerate} \end{enumerate} \end{document}

I would like to redefine the enumerate environment so that each \item automatically sets \label{en:\arabic{page}\alph{enumi}}. I already tried  \usepackage{etoolbox} \gappto{\item}{\label{en:\arabic{page}\alph{enumi}}}   but this also triggers in the center environement, where I don't want it.  How can I do this, avoiding conflict with enumitem.sty if possible.  (Don't worry about non-uniqueness of labels - the document layout assures that.)


Is it possible insert more of one attributes in jQuery function with CSS? For me, it's necessary to insert more than one change in CSS.  For example, if I want change the width and height, I can do this:  <script>$(this).css("height","200");</script>   But if I want insert in the same width also and height?  I try do this with separated functions and works but inside no see examples for no need open new function each time

Is there any syntactical way in jQuery to define multiple CSS attributes without stringing everything out to the right like this:  $("#message").css("width", "550px").css("height", "300px").css("font-size", "8pt");   If you have, say, 20 of these your code will become hard to read, any solutions?  From jQuery API, for example, jQuery understands and returns the correct value for both   .css({ "background-color": "#ffe", "border-left": "5px solid #ccc" })    and   .css({backgroundColor: "#ffe", borderLeft: "5px solid #ccc" }).   Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name.


I have a class question where I must prove $A^2 = 0$ given $A^5 = 0$ with A being a 2x2 matrix.   I though that I could simply say that as $A^5 = 0$ then $A^2 \cdot A^3 = 0 \implies A^2 = 0$ as $A^2 = A\cdot A$ and $A^3 = A\cdot A\cdot A$ $\implies A = 0 \implies A^2 = 0$.  Could someone verify that my proof is valid and not just a circular argument (which I feel it may be)  Thanks

Assuming that given a $2\times2$ matrix $A$ with the property $A^3=0$ show that $A^2=0$.  Okay so this question is messing with me. When it says $A^3=0$ do you think it means the determinant? How would one approach this? Any help would be much appreciated


Of course, this question runs perilously close to this site's prohibition against discussing non-mainstream physics. However,  about what is acceptable and what is not acceptable regarding non-mainstream physics, says that it's okay to ask for an evaluation within mainstream physics of a new concept or paradigm. I believe my question falls under this heading. The new concept is that it might be possible (counter-intuitively) to accelerate a body in a vaccuum without a traditional propellant. My understanding from  (paragraph starting "Dr. White proposed") is that the engineers at NASA have some kind of theory which is supposed to fit into mainstream physics about how this would work. But I'll understand if people vote to close.  The article I've linked to is not technical, and provides no technical references. My Google-fu has not managed to uncover a more technical description anywhere (I can't even find a homepage for the group doing this research). So   Question: What exactly is the theoretical mechanism that NASA (in particular, Sonny White, in particular, not Roger Shawyer) is proposing? And where can I read about it?  The proposal is apparently precise enough to build a computer simulation off of it (see near the end of the article, the section labeled "Progress Update"), so I'm assuming that it must be intelligible.  For example, here's something that might be the sort of thing they're talking about. Imagine that on your spacecraft you have a gamma-gamma collider (powered by a nuclear reactor or solar panels or whatever). When the photons collide, they create lots of high-energy electron-positron pairs spraying out in all directions. By clever design of the hull of your spacecraft, let's say that you preferentially readsorb electrons / positrons moving toward the bow of the ship (e.g. put a big lead block to the bow of the collider). Then you will generate momentum going forward. Your propellant particles have been bought from the vaccuum.  Now, the EM fields involved in the NASA setup are nowhere near this strong, so the mechanism can't be quite this. The article I linked to says something about virtual particle-antiparticle pairs, so maybe the proposal is that the "propellant" is made up of waves in the electron field which are not localized as particles?  EDIT Earlier questions have focused on whether the proposed effect would violate conservation of momentum. My assumption is that if we actually look at NASA's proposed mechanism, we will see that it's not violating conservation of momentum, just sending that momentum off into "new" particles, as in the example version I sketched. I'm really mostly interested in seeing the actual proposal, so maybe this question is best viewed as a reference request.  EDIT I'm disappointed to see this question marked as a duplicate. I'm asking for a specific link, and I haven't seen that link, nor have I seen a definitive claim that the link I'm looking for doesn't exist.

In 2006, New Scientist magazine published an article titled 1 [] about the  [] which stirred up a fair degree of controversy and  that New Scientist was engaging in pseudo-science.   Since the original article the inventor claims that a "Technology Transfer contract with a major US aerospace company was successfully completed", and that papers have been published by Professor Yang Juan of The North Western Polytechnical University, Xi'an, China. 2   Furthermore, it was  that the Chinese were going to attempt to build the device.  Assuming that the inventor is operating in good faith and that the device actually works, is there another explanation of the claimed resulting propulsion?  Notes:  1. Direct links to the article may not work as it seems to have been archived. 2. The abstracts provided on the  website claim that they are Chinese language journals which makes them very difficult to chase down and verify.


I think there should be a separate community/site here on the topic of  (IoT).

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


Can someone help me on the right track for my proof for the statement below. I started and got stuck but I need help. Please guide me to answer what this statement requires and how to word it out correctly.     For all $x,y\in\mathbb R$ define that $x\equiv y$ if $x^{2}=y^{2}.$ Then $\equiv$ is an equivalence relation on $\mathbb R$, there are infinitely many equivalence classes, one of them consists of one element and the rest consist of two elements.   True.  Let $p=x,y,z\in\mathbb{R}$. For $x\equiv y$ if $x^{2}\equiv y^{2}$ on $\mathbb{R}.$ To be an equivalence relation on $\mathbb{R}$ we need to show that: $$\text{i).}\ \forall x\in\mathbb{R}; x\equiv x\ \text{such that}\ x^{2}=x^{2}$$ $$\text{ii).}\ \forall x,y\in\mathbb{R}\ \text{if}\ x\equiv y\ \text{then}\ y\equiv x\ \text{such that}\ x^{2}=y^{2}\ \text{but}\ y^{2}=x^{2}$$ $$\text{iii).}\ \forall x,y,z\in\mathbb{R}\ \text{if}\ x\equiv y\ \text{and}\ y\equiv z, \text{then}\ x\equiv z\ \text{such that}\ x^{2}=y^{2}\ \text{and}\ y^{2}=z^{2}\Rightarrow x^{2}=z^{2}$$  Therefore the equivalence class of $[0,0]=\{p=(x,y,z\in\mathbb{R}|p\equiv(0,0)\}=\{(0,0)\}$ then $p\equiv(0,0)\Leftrightarrow x^{2}=y^{2}$ which is equal to $0^{2}=0^{2}=0$ if and only if $x=y=0.$  Comment: I am stuck here I dont know where to continue on. Please help..thank you

For all $x,y\in\mathbb{R}$   define that $x\equiv y$   if $x^{2}=y^{2}$  . Then $\equiv$  is an equivalence relation on $\mathbb{R}$  , there are infinitely many equivalence classes, one of them consists of one element and the rest consist of two elements.  Solution  True. To show that \equiv  is reflexive we need to show that \forall x\in\mathbb{R}  :x=x.  Let x\in\mathbb{R}  , x\equiv\mbox{\ensuremath{x}}  if x^{2}=x^{2},   which is obvious.  [x]  ={y\in\mathbb{R}  |x\equiv y}  =[0]={y\in\mathbb{R}|0\equiv y}={0}  . Hence y^{2}  =0^{2}   =0   which implies that y=0  .


I can't figure out how to solve these functions. Any help or links to examples on how to do these will be much appreciated.  Thanks.

I am asked to prove that $\cos(\arcsin(x)) = \sqrt{1-x^2}$  I have used the trig identity to show that $\cos^2(x) = 1 - x^2$  Therefore why isn't the answer denoted with the plus-or-minus sign?  as in $\pm \sqrt{1-x^2}$.  Thank you!


I have an Ubuntu 10.04 Server with ext4 as file system. e2fsprogs is installed, but e4defrag is only packaged since Ubuntu 12.04. How do I defrag the file system or how can I install e4defrag? Maybe there is a backport of e4defrag for Ubuntu 10.04.

Why is defragmenting unnecessary in Ubuntu?


I have downloaded the package float in order to help in placing figures where I would like them.  At the moment, 'All' figures are placed at the 'end' of document.  I have run the script 'float.dtx.  Subsequently, the [H] option has been inserted as seen below example; however, nothing has changed and the figures still appear at the end of document.  Does any one have an idea as to what is needed to activate the float programs appropriately or as to how to implement them?    Thank you.  %%%%% Inserting figure %%%%%%%%%%%%%%  \begin{figure}[H]  \begin{center}  \maketitle {\bf Title}   \includegraphics[scale=0.9]{Figure}  \caption{Explanatory statement} \label{}  \end{center}  \end{figure}

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference