I realize this is probably a dumb question but I couldn't find the answer anywhere... What is the purpose of the '&' symbol in C++ functions? Such as  vec2& operator+(vec2& left, const vec2& right) {     return left.add(right); }   I'm following a youtube series that's a little over my head, but I'm doing fine because all the code is there. However that 'and' symbol keeps popping up and I'd really like to know what it is... Does it have something to do with classes?  Here's exactly what I'm watching:  Guy from a channel called "TheChernoProject" making a simple game engine. Also, this is Visual Studio 2013 C++, if that changes anything.

This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles. Please edit the accepted answer to provide quality books and an approximate skill level — preferably after discussing your addition in . (The regulars might mercilessly undo your work if they disagree with a recommendation.) Add a short blurb/description about each book that you have personally read/benefited from. Feel free to debate quality, headings, etc. Books that meet the criteria will be added to the list.  Books that have reviews by the Association of C and C++ Users (ACCU) have links to the review. *Note: FAQs and other resources can be found in the  and under .


I just noticed that an old  for my post contains a more recent version of the post after my today edit.    I free-hand-circled a code from my post that I've added recently. At the time of suggested edit there was another code:    See  for details.

Yesterday I was pointed at some rejected suggested edits. Some of the corrections were valid, so I edited the posts accordingly, while making several further edits. Looking at the suggested edits now however, it seems that for those posts where only changes to the title were originally suggested, the post mortem suggested edit view now incorporates the body of the latest revision. (Or at least it appears like that to me)  Take for example . If you take a look at  of that post, you will see my later edits. The edited body seems to have been incorporated in the suggested edit view. For edits where originally changes to the body were suggested, there is no such confusion.   Why does this matter? In the case of some post mortem discussions or explanations it might help to see the actual situation as it was when the edit was suggested. Especially in the case of edits that might be considered too minor.   So have I stumbled upon a bug here?


I get errors thrown at me because of this kind of expression \begin{figure}     \caption{\( a = \begin{tikzpicture} \node at (0,0) {a}; \end{tikzpicture} \)} \end{figure}  What shall I do to use a Tikz picture inside caption?

I have a PNG plot with a couple of black patches in it, and I'd like to refer to it in the \caption of the figure. According to the TikZ manual, I'd have to  \tikz \fill[black] (1ex,1ex) circle (1ex);   which works perfectly outside a \caption. Using this inside a \caption, though, leaves me with the compile error  ! Use of \use@pgflibrary doesn't match its definition. \pgfutil@ifnextchar ...1\def \pgfutil@reserved@a {                                               #2}\def \pgfutil@reserved@... l.375 ...blah blah.}  ?   The following produces the compile error  \documentclass{article} \usepackage{tikz}  \begin{document} \tikz \fill[orange] (1ex,1ex) circle (1ex); \begin{figure} \caption{\tikz \fill[orange] (1ex,1ex) circle (1ex);} \end{figure} \end{document}   Any hints here?


In my experience, people say "it's" in place of "it is," but never in the form of a question. I think the question "It's?" sounds awkward, but I'd like to know if it's grammatically correct. Is it?  This question was inspired by this image on Merriam-Webster's website:

I heard this lyric in a song the other day and it just sounded so wrong that I assumed it must be incorrect grammar, but I can't find any specific prohibition that applies.     That's what it's.    That rolls off your tongue with the grace of a moose in a tutu, but I can't figure out why.  There is clearly no problem with ending other sentences with a contraction. These sound fine.     I thought I could, but I can't.   Stop touching that, it will fall off if you don't.   You say that the sky is green, but it isn't.   Also, it sounds just fine if you remove the contraction:     That's what it is.   So what's up with this construction? Should it be avoided?


I'm trying to move a crafting station and a steamer chest from Sanctuary to the Castle.  I have the two places linked up with a supply line, and the items in the workshop are showing up in both places. However, when I store the crafting station or the steamer chest, they show up in Sanctuary, but NOT in the Castle.  Is there a way to move them, or do I just have to go scrounging for screws so I can make a second crafting station?  I know for the steamer chest, I can just dump its contents into the workshop and access them at the other location. I am currently playing on PC.

I can setup a supply line to share crafting material between settlements. But does this also share any buildings/crafted entities I stored in the settlement?    If not, is there some other way to move them between settlements?


(Rogue One spoilers)                                 Leia: Darth Vader. Only you could be so bold. The Imperial Senate will not sit still for this. When they hear you've attacked a diplomatic... Vadar: Don't act so surprised, Your Highness. You weren't on any mercy mission this time. Several transmissions were beamed to this ship by rebel spies. I want to know what happened to the plans they sent you. Leia:  don't know what you're talking about. I am a member of the Imperial Senate on a diplomatic mission to Alderaan... Vadar: You are part of the Rebel Alliance and a traitor! Take her away!  Huh? Mere minutes/hours earlier she had been part of a criminal fleet that brutally attacked a Imperial base. Her men had clamored aboard her starship with a hard copy of Death Start plans spitting distance from Vadar who pursued them, and watched as Leia's ship pull away. It's hardly a mission of diplomacy, a fact I very much doubt that the Senate would dispute.  Why did Leia insist on such a obvious lie? Who was she trying to convince? Vadar? Her men? The stormtroopers? Herself?

Given the ending of Rogue One...      ...it is obvious that the Imperials and Vader know that the Tantive IV ship was just engaged in a rebellion battle.   Therefore why does Captain Antilles, while getting choked by Darth Vader, say:     We intercepted no transmissions. ... This is a consular ship. We're on a diplomatic mission.   Why would he say such an obviously false lie? Especially when it is his last words?


I apologize in advance for misuse of terminology.  If given a number $x$ from a normal distribution with mean 0 and standard deviation 1, how can I map that onto another distribution with a different mean $m$ and standard deviation $s$?  Is it simply $m + s\,x$ ?  Clarification - the real-world problem I'm trying to solve: I would like to generate random numbers in a normal distribution for which I know the mean and standard deviation, however, I can only generate random floating point numbers in a distribution with mean 0.0 and stddev 1.0. How can I translate or "map" this value onto a different distribution?

I was reading Robert Serfling's 1980 book "Approximation Theorems of Mathematical Statistics" and came across the following construction of the Dvoretzky–Kiefer–Wolfowitz inequality for arbitrary distributions $F$,  which DKW prove for distributions on $[0,1]$.     Given independent $X_i$ with d.f. F and defined on a common probability space, one can construct independent uniform $[0,1]$ variates $Y_i$ such that $\mathbf{P}[X_i = F^{-1}(Y_i)] =1,\forall i$.   Why? Is this true for arbitrary distributions (including discontinuous ones)?  Secondly,     Let $G$ denote the uniform $[0,1]$ distribution and $G_n$ the sample distribution function of the $Y_i$s. Then $F(x)=G(F(x))$ and with probability $1$, $F_n(x) = G_n(F(x))$.   Why?  Now I don't understand quantile functions as well I would like, and so am having some trouble following these arguments.   Edit: All of this is on page 59 of the book.    whuber, thank you so much for your careful answer. It is appreciated. The answer to my question does indeed lie in the last paragraph of your reply - now if I could only wrap my head around it.  What is throwing me off is the following example which I have recreated from Galen Shorack's "Probability for Statisticians" (page 111). Here, the Lebesgue measure of the set $[X\neq F^{-1}Y]$ is not zero. Would you agree? I am referring to the points in the interval $(2,3)$ and in $(3,3.5)$ for which the inverse transformation does not bring any points back. Thank you again for looking into this.   \documentclass[a4paper]{article} % Graphics \usepackage{graphics} \usepackage{graphicx} \usepackage{pstricks} \usepackage{pst-plot} \usepackage{pstricks-add} \usepackage{epstopdf} \begin{document}  % An arbitrary CDF \begin{figure}[htbp] \begin{center} \begin{psgraph}[arrows=<->](0,0)(-1.5,-.3)(6,1.2){.5\textwidth}{2.5cm}  \psplot[algebraic, linecolor=black]{-1}{1}{.025*x^2+.1*x+.175} % {this goes from .1 --> .3}  \psplot[algebraic, linecolor=black]{1}{2}{-.1*x^2+.4*x+.1}  % {this goes form .4 --> .5}  \psline[linecolor=black](2,.5)(3,.5)  % this stays at .5  \psline[linecolor=black](3,.6)(3.5,.6)  % this stays at .6  \psplot[algebraic, linecolor=black]{3.5}{5}{  -0.1333*(x-5)^2+.9}  % this goes from .6 --> .9  \psdots[dotstyle=*](3,.6)(1,0.4)   \end{psgraph} \end{center} \caption{Arbitrary CDF with discontinuities and flat sections} \label{fig:cdf} \end{figure}  % The quantile function \begin{figure}[htbp] \begin{center} \begin{psgraph}[arrows=<->](0,0)(-.3, -1.5)(1.2, 6){2cm}{5cm} % inverses using the Matlab finverse symbolic toolbox function \psplot[algebraic, linecolor=black]{.1}{.3}{20*(x/10 - 3/400)^(1/2) - 2}  \psline[linecolor=black](.3, 1)(.4, 1)   \psplot[algebraic, linecolor=black]{.4}{.5}{-((x-0.5)/(-0.1))^(0.5)+2}   \psline[linecolor=black](.5, 3)(.6, 3) \psplot[algebraic, linecolor=black]{.6}{.9}{-((x-.9)/(-0.1333))^(0.5)+5} \psdots[dotstyle=*](.6, 3)(.5, 2) \end{psgraph} \end{center} \caption{Quantile function of CDF in figure (\protect \ref{fig:cdf})} \label{fig:qf} \end{figure} \end{document}   PS. I could not use the comment box for the reply as I needed to use the <code> environment.


I am semi-new to blender and just got the new version. For some reason, everything is invisible in material mode and render preview. And this is not just a "you messed up the texture" problem. Even in the default startup file, everything is invisible. I rendered a short animation to see if it was just a viewport glitch, but no. Even when rendered nothing shows except for a few pink objects that have no texture.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


How can I reduce the noise inside an airplane? I am thinking of something like a headphone however I don't know what is the name of those headphone, the one that specially some workers in the loud workplace use. I searched for some of them but I just find some noise reduction headphone for playing music.

I have a pair of noise cancelling headphones which I love very much.  Putting them on during a long haul flight and keeping them on most of the time leaves me significantly less tense and more relaxed when I hit the ground.  They are the over-the-ear type which cost ~$200, and they are truly worth the investment.  The problem is...  When I travel for pleasure I like to travel light, typically only bringing a 35L backpack.  I usually bring a pair of earbud headphones, but they don't work nearly as well.  My questions are   Has anyone seen a good comparison of the in-ear noise cancelling headphones versus the over-the ear type?  Personal experience is ok, but I would be more interested in a comparison which includes some plots. I've been looking at non-headphone earplugs like the , , and .  These are made for musicians so I expect that they are effective at some frequencies, but I don't know how well the work for the low frequencies associated with flying.  Has anyone seen a comparison of these to noise-cancelling headphones?  Has anyone tried them out? Does anyone have any other recommendations for quieting the deafening roar of flying?


I'm trying to print a histogram, but am having trouble piecing it all together in main. I'm new to arrays, so if anyone can help with this, it'd be much appreciated. Here are my methods:  public static void main(String[] args) {   randomIntArray(5); }  public static int randomInt(int low, int high){   int x= (int)(Math.random ()*high)+low;   return x;        }  public static int[] randomIntArray(int n){   int[] a = new int [n];   for (int i = 0;i<a.length;i++){     a[i]=randomInt (0,100);   }    System.out.println(printHist(a));   return a; }  public static int[] printHist(int[]a){   int[] k = new int[11];   int i=0;   while (i<=10) {      int counter = 0;     int h=0;     while(h<a.length) {       if (a[h] == i) {         counter++;         h++;       }       h++;     }      k[i] = counter;     i++;   }    return k; }   And here's what I get as output.  [I@fb53f6   Do I need to rethink the way I'm doing this, or is there a simple fix?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


NO this is no duplicate of the above. My question is very specific to VPS and is not solely related to hosting but also to virtual desktop and such. The above barely writes 2 lines about VPS and never speak of virtual desktop needs.   CASE:  I'm going to upload a (small) symfony2 website soon. I plan to create another one after and maybe a little wt app ( which forces me to have a vps ). I also would like to have a 100% uptime virtual desktop + storage available from anywhere.   for symfony2, I need to be able to manage apc pecl cache extension at the very least. For wt I need root access to compile and run c/c++ code and play with apache.  Questions:   When it comes to VPS, price differences are huge for similar "front" characteristics. Why ? Given my needs ( website traffic should never exceed 100 dudes daily ). What should I look for ? ( CPU, RAM[guaranteed?], Bandwidth )   Basically I'm looking for one or two guys that have experienced professionally a few VPS and PHP-hosting solutions, and be advised about everything I ask... and did not ask !

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


I am new to Latex. I really like the awesome CV template and would like to use it. However I am not able to make it work. I am running it using the XELatex. I am getting the following error and I am not able to solve it. I would appreciate if anyone could help me to solve this. Thanks in advance, Jon

I am trying to use the AwesomeCV template () for creating a CV using TexMaker 5.0.3 with XeLaTex. However, I am not able to get this to work as I get the following error messages:    Does anyone know what the source of problem might be and how to solve it?  Thanks a lot in advance,  Cheers


A true or false question, is there a counter example or short proof for this statement? Let G be an abelian group. For all a, b ∈ G the order of a + b is the lowest common multiple of the orders of a and b.

My reference for learning abstract algebra says that in an abelian group $G$ the product of two elements (say $a$ with order $n$ and $b$ with order $m$) has order $mn$ if $gcd(n,m) = 1$.   What I don't understand is where the $gcd(m,n)=1$ comes into use in proving this fact? For example, $ a^{mn} = (a^n)^m = (e)^m = e$ (identity element). A similar argument for $b^{mn}$ together with the fact that $G$ is abelian is enough to show that $(ab)^{mn} = e$. From here, how do I conclude for an integer $r < mn$ that $(ab)^r \neq e$  Also, are there any other conclusion that can be drawn if $gcd(n,m) \neq 1$ ?  Thanks for any feedback in advance !


I'm trying to create an 8.5x11" document, but my system defaults to A4. Being in Canada where US letter is the norm, this is frustrating. I've tried adding   \documentclass[letterpaper]{article}   to the beginning of my document, but I still get A4. I'm on Slackware 14.1, and using pdflatex to generate my document.   Even this small example creates an A4 sized document:  \documentclass[letterpaper]{article}  \title{Title} \author{Your name!} \date{\today}  \begin{document} \maketitle \section*{Fun times with paper sizes} blah blah blah... \end{document}   What am I doing wrong with respect to declaring my paper size, and how can I set US letter to be the default on my system?    Edit:  Here is the command line output:  $ pdflatex swe.tex  This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./swe.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size10.clo)) (./swe.aux) [1{/usr/share/texmf-v ar/fonts/map/pdftex/updmap/pdftex.map}] (./swe.aux) )</usr/share/texmf/fonts/ty pe1/bluesky/cm/cmr10.pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmbx12.pfb></ usr/share/texmf/fonts/type1/bluesky/cm/cmr12.pfb></usr/share/texmf/fonts/type1/ bluesky/cm/cmr17.pfb> Output written on swe.pdf (1 page, 17745 bytes). Transcript written on swe.log.

I'm using \documentclass[10pt, a4paper]{article} in my TeX file. It all works fine, except, the lower bound of each page is cut off. So some text is either cut off, or at least the text reaches the very end of the page.  Has anyone experienced the same issue?  Here is an minimal working example:  \documentclass[10pt, a4paper]{article}  \usepackage[utf8]{inputenc} \usepackage{ngerman} \usepackage[cm]{fullpage}  \setlength{\headheight}{12.4pt} \setlength{\headsep}{1.5\headheight}  \begin{document}  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f  \section{a}  asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f asdlkjf sakfj saoekfsalk lksa jfsakfsaoel jfsaoelkfj saoeflksad jfoelksaf sadfoelkjsa f   \end{document}


I have a file named EX.txt with content inside of it:  user='\''member'\''   I want to use sed to replace those '\'' to ' so it would be like this:  user='member'   But it didn't work when i use   sed -i "s/'\''/'/g" EX.txt   How to solve this?

I have    Input:           NISHA =\455     Output:   NISHA = 455   I want to remove \ from output. I tried to use command sed "s/[\]//g" P but it is not working and it flags an error:  character found after backslash is not meaningful


My directory structure is like this:  app/ -sub1/   -sub1_1/   -sub1_2/   -sub1_3/ -sub2  -class1.py -app.py   I am running a flask app which is trying to execute app.py from the app folder. I want to import the classes from files inside sub1 in class files inside sub2.   I want to do this without setting sys.path  Update: I have _ init _.py in all folder levels

How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.


I installed ubuntu 14.04 LTS and ran the command:  sudo apt-get update   it gives the following error:  Err http://in.archive.ubuntu.com trusty InRelease  Err http://in.archive.ubuntu.com trusty-updates InRelease  Err http://in.archive.ubuntu.com trusty-backports InRelease  Err http://security.ubuntu.com trusty-security InRelease  Err http://archive.canonical.com trusty InRelease  Err http://extras.ubuntu.com trusty InRelease  Err http://in.archive.ubuntu.com trusty Release.gpg   Could not resolve 'in.archive.ubuntu.com' Err http://in.archive.ubuntu.com trusty-updates Release.gpg   Could not resolve 'in.archive.ubuntu.com' Err http://security.ubuntu.com trusty-security Release.gpg   Could not resolve 'security.ubuntu.com' Err http://archive.canonical.com trusty Release.gpg   Could not resolve 'archive.canonical.com' Err http://extras.ubuntu.com trusty Release.gpg   Could not resolve 'extras.ubuntu.com' Err http://in.archive.ubuntu.com trusty-backports Release.gpg   Could not resolve 'in.archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/InRelease    W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease    W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease    W: Failed to fetch http://archive.canonical.com/ubuntu/dists/trusty/InRelease    W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease    W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'in.archive.ubuntu.com'  W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Could not resolve 'in.archive.ubuntu.com'  W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Could not resolve 'in.archive.ubuntu.com'  W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Could not resolve 'security.ubuntu.com'  W: Failed to fetch http://archive.canonical.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'archive.canonical.com'  W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'extras.ubuntu.com'  W: Some index files failed to download. They have been ignored, or old ones used instead. now what should i do now?

When running sudo apt-get update I get these following errors:  Err archive.ubuntu.com quantal InRelease Err archive.ubuntu.com quantal-updates InRelease Err archive.ubuntu.com quantal-backports InRelease Err archive.ubuntu.com quantal-security InRelease Err archive.ubuntu.com quantal Release.gpg   Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] Err archive.ubuntu.com quantal-updates Release.gpg   Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] Err archive.ubuntu.com quantal-backports Release.gpg   Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] Err archive.ubuntu.com quantal-security Release.gpg   Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] Reading package lists... Done W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal/InRelease   W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-updates/InRelease   W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-backports/InRelease   W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-security/InRelease   W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-updates/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-backports/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-security/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] W: Some index files failed to download. They have been ignored, or old ones used instead.   I am using Ubuntu 12.04. This is the command I used after installing Ubuntu from window installer. I am sure my laptop is connected to internet. What can I do now?


I saw this type of toilet (see image 2) in North India. The commode is same as most of the others. But I couldn't find the jet (see image 1) which is generally attached with the seat.   So I'm wondering how do you clean yourself once you're done (image 2)?

I have noticed random bits of hose without proper fittings before I think for example in India and just assumed they are for use by the cleaners or for filling the water jug in .  But Now I'm travelling in Malaysia and Singapore and there are more western toilets than squat toilets in the places I've been yet proper hoses with proper fittings are very common in toilets:  (Hose next to a Western style toilet in my hostel in Chinatown, Kuala Lumpur.)  At one place in Singapore there were even signs on each cubicle door stating whether it contained a western or squat toilet, but also whether there was a hose! (I didn't take a photo of the sign, unfortunately)  This makes me think there is a use for the hose for clients, not just cleaners. But for what purpose? Should I know how to use it as a tourist? Please tell me it's not a kind of alternative to a bidet!  Possibly related is the fact that many toilet floors are awash with water. This can be a big problem if you're not wearing waterproof shoes or have to lower your trousers and keep them dry. Other than this toilets are pretty clean and I've seen both the hoses and the wetness in what I would regard as somewhat "fancy" places.


I am working on a LaTeX chapter for a Springer book for the  series. This is my header:  \documentclass[graybox,vecphys]{svmult}  For the bibliography, I am using the \bibliographystyle{spmpsci} command and my references have the following format:     Abadi, M., Barham, P., Chen, J., Chen, Z., Davis, A., Dean, J., Devin,   M., Ghemawat, S., Irving, G., Isard, M., Kudlur, M., Levenberg, J.,   Monga, R., Moore, S., Murray, D.G., Steiner,B., Tucker, P., Vasudevan,   V., Warden, P., Wicke, M., Yu, Y., Zheng, X.: TensorFlow: a system for   large-scale machine learning. In: Proceedings of OSDI 2016 – the 12th   USENIX Symposium on Operating Systems Design and Implementation, pp.   265–283 (2016).   But this is not the style requested by Springer MIMB. I need to find a style that puts the year after the names, puts "et al." after the third author, removes all the dots after the abbreviated first names, removes "In" and "and". That is, it should print the above example as:     Abadi M, Barham P, Chen J. et al. (2016) TensorFlow: a system for   large-scale machine learning. Proceedings of OSDI 2016 – the 12th   USENIX Symposium on Operating Systems Design and Implementation:   265–283.   Please notice the "et al." and the position of the (2016) year.  Which style can I use to achieve this result? Thanks!  EDIT: I found a way to insert "et al." after the 3rd co-author, to keep the reference list numeric, to remove the "In:" and the "and". The steps are the following.  At the top of my LaTeX file, I had to insert:  \usepackage[style=numeric, maxnames=3, minnames=3, firstinits=true, sorting=none, terseinits=true]{biblatex} \renewcommand*{\revsdnamepunct}{} \DeclareNameAlias{author}{last-first} \renewbibmacro{in:}{} \addbibresource{bibliography_file.bib}   At the bottom of my LaTeX file, I had to remove:  \bibliographystyle{spmpsci} \bibliography{bibliography_file}   and I had to insert:  \printbibliography   These commands led to the following result:     Abadi M, Barham P, Chen J, et al. “TensorFlow: a system for large-scale   machine learning”. Proceedings of OSDI 2016 – the 12th USENIX Symposium on    Operating Systems Design and Implementation. 2016, pp. 265–283.   I still need to solve an issues: I have to move the (year) to have it after the name list. How can I get that? Thanks!

I haven't had a lot of experience with biblatex so far and I decided to use the numeric style for citations in the text. However, the authoryear style for the bibliography is much nicer. I know, I can't actually combine numeric citestyle with authoryear bibstyle.  That brings me to my question: How can I achieve using the numeric citestyle and the formatting of authoryear in the bibliography?


In the UK where I live, we are taught the abbreviation BIDMAS/BODMAS for the order of mathematical calculations:  Brackets Indices / Others Division Multiplication Addition Subtraction  I know that in the USA, the abbreviation PEMDAS is taught:  Parenthesis Exponents Multiplication Division Addition Subtraction  I notice that in the UK, division is performed first followed by multiplication, but this order is reversed in the USA. It seems to me that this can result in different answers for the same question, for example  What is $1 \div 2 \times 2$?  In the UK, with BIDMAS/BODMAS, division is performed first: \begin{align} 1 \div 2 \times 2 &= 0.5 \times 2 \\ &= 1 \end{align} Whereas in the USA, with PEMDAS, multiplication is performed first: \begin{align} 1 \div 2 \times 2 &= 1 \div 4 \\ &= 0.25 \end{align}  So what is the actual value of $1 \div 2 \times 2$? Or am I misunderstanding something?

There is a huge debate on the internet on the value of $48\div2(9+3)$. I believe the answer $2$ as I believe it is part of the bracket operation in BEDMAS.  yields the same answer. I also believe that if $48\div2\times(9+3)$ was asked it would be $288$ which Mathway agrees with as well. However,  says it is $288$ either way. A friend of mine (who is better at math) told me that there is no such thing as 'implicit multiplication', only shorthand so that is in fact done after the division (going left to right, not necessarily because division occurs before multiplication. But he didn't explicitly give a reason) What is the answer and why?


Please help me in this  consider a table in oracle Database    SNo Name password ------------------ 1    x    1234 2    y    2314   A query to  fetch the headings such as SNO NAME PASSWORD

I need to query the database to get the column names, not to be confused with data in the table.  For example, if I have a table named EVENT_LOG that contains eventID, eventType, eventDesc, and eventTime, then I would want to retrieve those field names from the query and nothing else.  I found how to do this in:        But I need to know: how can this be done in Oracle?


Let $n\geq t\geq 0$. Show that $$\sum_{j=t}^{n}\binom{j}{t}=\binom{n+1}{t+1}$$   I am stuck on this question. The fact thats it is multivariable is confusing me.

After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$  What's the name of this identity? Is it the identity of the  modified.  How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?  Thanks for your help.    EDIT 01 : This identity is known as the  because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.


Main Question  If a user has been suspended from Stack Exchange as a whole and their rep has only been partially restored, and seemingly (from their end at least...) only on certain sites and not others, is this a normal thing and if not, what would be the appropriate waiting time before asking a question about it?  Supplementary   Is the decision regarding restored reputation made by individual Stack Exchange communities, or perhaps by the Stack Exchange community as a whole?  Are there particular levels of access enjoyed only by certain users or user-groups, or particular lines of appeal and escalation, particularly as in some circles Stack Exchange reputation may affect job prospects.

My account has been , besides the following restrictions:  an account will be locked at 1 reputation the user page will have a visual indication that the account is in timed suspension, and for how long the account holder will be unable to vote, ask, answer or comment  What else does timed suspension prevent me doing? For example, can I still edit my own posts or delete content? And what is a network-wide suspension?


I wonder if I provide someone with two public keys from different elliptic curves, is there any way to prove that these two public keys are generated from the same private key without revealing the private key itself?  For example, I have a private key (which is a large random 256-bit number) and I generate one public key on the secp256r1 curve and another public key on the secp256k1 curve, how do I provide the two keys to a third party and prove to them that these two public keys are generated from the same private key? Is there some kind of zero-knowledge proof or some algorithm that can accomplish that? Thanks.

Is it possible to prove key-equivalence across elliptic curves of different order? Specifically:   Suppose I have a key $x$ valid for both curves listed below On curve $g$ (for example, Curve25519) it maps to $X_1 = x*G$, where $G$ is the generator point for $g$ On curve $h$ (for example, Curve1174) it maps to $X_2 = x*H$, where $H$ is the generator point for $h$   Is it possible for me to submit some public proof that $X_1$ and $X_2$ are generated using the same key $x$, but without revealing the value of $x$?


I've found that comments have a restriction for minimum comment length. I.e. it's impossible to post too short comments.  Yet in the same time this can be overcome with using formatting. For example, simple Question fail comment is too short while _Question fail_ is not (added 2 symbols - actual length increased while comment have same content when it is displayed).    is a question about @username in comments and  - about "overcoming" minimum length, but they still aren't focused on formatting issue.  Is it a bug? Should comment length be counted without paying attention to formatting? (since we're able to show them properly, why do not count real, meaningful comment length - note, this has nothing to do with other special characters, like single _ or similar, only formatting)

A follow-up to , and an extension of .   shows that it is possible to circumvent minimum character requirements using null bytes.  Can we exclude such non-printing characters as ASCII NULL and other control characters from counting toward minimum character requirements?  Edit: Users have demonstrated that , unmatched or invalid HTML tags, and other content that is not displayed after Markdown parsing can be used to bypass such requirements as well.  Can we cover this case as well, except for links?


I bought a Mac this week. I uploaded several hundred pictures into Photos. I then drag and dropped them into folders under Documents (for organizational purposes). Unfortunately, the RAW files were automatically converted from RAW to JPG when I did this. How do I move the pictures from Photos to Documents without this automatic conversion taking place? Thank you.

I noticed that the new Photos.app reduces image size on export. If I drag & drop a photo from the Photos library, the size is reduced by at least 50%.  How do I get rid of this behavior and recover my original photo file?


That one bothers me a lot. If time is collapsed to an instant for the photon, and it experiences it's own end of lifetime, what should happen if photon is never going to be absorbed? Especially interesting in the context of constant expansion of the universe driven by dark energy, which allows more space to appear before photon's path, allowing it to move infinite time until time is not relevant anymore.  Update: Sorry, I don't think that this question is asked and answered in the linked one. The question is not about how photon perceives time (which I think was not answered in the related link), but about the paradox. If there is no paradox, then I would appreciate input on why (so for photon time is not one instant?). Link to a Feymann's interpretation of EM transaction is a good one, but it does not explain why photon should have a consumer in any way.

To an an external observer it appears that time has stopped for photon. But this relation is reflexive, so for an observer travelling with the photon it appears the universe has stopped everywhere.  Is this right?  Space also gets distorted parallel to the direction of motion, but not perpendicular to it.   Does this mean that for an observer travelling with a photon sees spacetime as a flat plane?  Note 1: I'm using language vividly not literally when I say a photon experiences space and time. Not that I'm against idealist or panpyschist interpretations of matter or energy come to that.  Note 2: Since it's been pointed out that an inertial frame can't be boosted into the frame of a photon and moreover there is no limiting behaviour here - no matter what frame you are boosted into, light will always appear to travel at c. Nevertheless, when an external observer watches a train chasing a photon by gradually increasing its speed, he will note that the train speed is approaching the speed of the photon (but will never match it) and when he looks at the clock inside the train he will not too that it is gradually slowing down (but never actually stops). Using this picture, we can attempt the thought experiment - if not one that can be carried out - of what a world looks like to a photon.


Let $X_{1},...,X_{n}$ be a random samples from  a population having the probability density function:  $f(x)= \frac{1}{\theta}e^{\frac{-(x-\theta)}{\theta}}$ where $x\geq \theta$.   When I solved the likelihood equation of the above density, the maximum likelihood estimator turned out to be mean of the sample but if you see the range of values that the parameter $\theta$ can take is $(0,X_{1}]$. How can this be possible that the likelihood estimator is out of the range of $\theta$. Please clear my doubt regarding this. Thanks

I have the following density:  $f(x)=\frac{1}{\sigma}e^{\frac{-(x-\theta)}{\sigma}}$ where $x>\theta$. It is required to obtain the maximum likelihood estimator and method of moment estimator for $\sigma$ and $\theta$. I have obtained the method of moment estimator by calculating the first and second moment as follows:  $E(X)=\theta+\sigma$, $E(X^2)=2\sigma^2+\theta^2+2\theta\sigma$   After a little simplification, the estimates turned out to be:  $\sigma=\sqrt{E(X^2)-(E(X))^2}$ and $\theta=E(X)-\sigma$.   I am not sure whether my estimates are correct. I have obtained the maximum likelihood estimator and they matched with what textbook calculated but method of moment estimator is something different according to textbook. Please take a moment to check where I was wrong. Thanks in advance.


Let's say that I arrived in England one month ago, and I'm going to stay two months longer. If someone asks me where I live, can I say "I've been living in England for one month" despite the fact that I'm going to stay a little bit longer?

I am very much confused with two aspects which are perfect aspect and present perfect continuous.  From the sentences below I am not sure what to use..  Perfect aspect:     I've lived here for ten years.   Perfect Continuous aspect:     I've been living here for ten years.


I'm trying to flatten a tuple with mixed types into a list. The following function does not produce the desired output:   a = (1, 2, 3, ['first', 'second']) def flatten(l):  return flatten(l[0]) + (flatten(l[1:]) if len(l) > 1 else []) if type(l) is list else [l]  >>> flatten(a) [(1, 2, 3, ['first', 'second'])] >>> flatten(flatten(a)) [(1, 2, 3, ['first', 'second'])] >>> [flatten(item) for item in a] [[1], [2], [3], ['first', 'second']]   the output should be:  >>> [1, 2, 3, 'first', 'second']

If I have sequence of sequences (maybe a list of tuples) I can use itertools.chain() to flatten it. But sometimes I feel like I would rather write it as a comprehension. I just can't figure out how to do it. Here's a very construed case:  Let's say I want to swap the elements of every pair in a sequence. I use a string as a sequence here:  >>> from itertools import chain >>> seq = '012345' >>> swapped_pairs = zip(seq[1::2], seq[::2]) >>> swapped_pairs [('1', '0'), ('3', '2'), ('5', '4')] >>> "".join(chain(*swapped_pairs)) '103254'   I use zip on the even and odd slices of the sequence to swap the pairs. But I end up with a list of tuples that now need to be flattened. So I use chain(). Is there a way I could express it with a comprehension instead?  If you want to post your own solution to the basic problem of swapping elements of the pairs, go ahead, I'll up-vote anything that teaches me something new. But I will only mark as accepted an answer that is targeted on my question, even if the answer is "No, you can't.".


I'm trying to write a script that uses sed to process lines in a text file to generate sample documentation. I've got most of the script working but I'm stuck with one edge case. Consider the following file  line-1 line-2, part2 line-3-should-be-a-very-long,     line-3-continued line-4   The problem is that some, but not all, lines end in a special token (it happens to be a comma). The token indicates that the line should be concatenated with following one to produce one long line.   So in my example line-3-should-be-a-very-long, should be concatenated with line-3-continued to give me line-3-should-be-a-very-long, line-3-continued (I do want to keep the comma). There is no special action on line 2 even though it contains a comma which is NOT at the end of the line.  The rest of the processing is done by piping a few sed and grep commands together, so a sed solution would fit well.

I have a list like so.  blue-image1.jpg, blue-image2.jpg, blue-image3.jpg red-image1.jpg, red-image2.jpg, red-image3.jpg   It's was originally a csv format but I added newlines because they needed a prefix at first. Now I need to put them together again so it becomes like this.  blue-image1.jpg,blue-image2.jpg,blue-image3.jpg red-image1.jpg,red-image2.jpg,red-image3.jpg   I tried cat list.txt | tr ',\n' ',' and cat list.txt | sed 's/,\n/,/g'  but neither seem to work properly.


I've been trying to find a book series I read when I was a kid. I don't have much information but one of the main things I remember was they invented gunpowder by using magic to boil water into a powder, and was ignited by rehydrating it. This was a major plot point several times. I also remember that the cleric lost their holiness but don't remember how. Also every time someone cast a spell the text read something like "words that can only be heard and forgotten".

I read the first book in the 90s.  The characters are taken back in time and into other bodies.  There is a man, woman and a dwarf at least.  They use their modern knowledge to help rule.  They make revolvers at the end and the main leader is killed.


When I try to upvote a question, it says that "votes from users with less than 15 reputation are recorded, but do not change the publicly displayed score." How are they recorded? Do they actually do anything?

Users below 15 reputation can't effectively vote. It says:     Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score   Does it mean that they will take effect after I reach 15 reputation or because they were cast before, they're recorded but ignored?


Solve $xu_x+(x+t)u_t=1$ such that $u(1,t)=t$. Is the solution defined everywhere?  I had known that this specific problem is related to a Heat Equation problem. I tried solving for its characteristic curves but I had difficulty solving for its parametrized initial condition. How am I gonna solve for its parametrized initial condition? I know that for an initial condition $u(x,0)$, $x(0,s)=s$ $y(0,s)=0$

Solve the following PDE $$xu_x+(x+y)u_y=1$$ when $$u(1,y)=y$$ using method of characteristics and find the projections of the characteristics on the xy plane  $$\begin{cases} a=x\\ b=x+y\\ c=1 \end{cases}\Rightarrow \begin{cases} \frac{dx}{dt}=x\iff \frac{dx}{x}=dt\iff ln(x)=t+c_1\iff x=ke^t\\ \frac{dy}{dt}=x+y\iff \frac{dy}{dt}=ke^t+y\iff y=(kt+m)e^t\\ \frac{du}{dt}=1\iff du=dt\iff u=t+c_2 \end{cases}$$ How do I solve $?_1$ and what should be my next step?


When Harry is hit by Voldemort's killing curse in the Deathly Hallows, why was he able to choose to come back? I've heard essentially 3 arguments, any of which might explain it.   The curse only killed the part of Voldemort's soul attached to Harry, who just took a ride with it to Limbo. Lily's enchantment of protection sustained Harry, maybe in part because it still existed in Voldemort's body. Harry owned all three Deathly Hallows, and therefore had command over death.   Has JKR confirmed any of these or other theories about Harry's non-death? Interview quotes are great, and obviously quotes from the books are good too.

I know that this question may sound like it has a very obvious answer, and many of you may just say that Harry didn't die because he was the Master of Death, as he had the possession of the three Deathly Hallows.  Couldn't, though, the "Master of Death" be purely a figure of speech, since the owner of the Hallows would be able to kill, resurrect and dodge death?   I know this is a question that is left open in the book, but couldn't Harry have lived because he carried a piece of Voldemort's soul, and Dumbledore gave Harry the choice to really die or just kill the piece of Voldemort's soul, and then Harry could live?    Is there anything in any of the books to support either theory?


I am a little bit confused about /proc directory. Each process frequently updating its state, memory info, progress etc in their process.  My question is that the /proc directory keeps the memory or writes on harddrive each information.  What I believe that It frequently updating the information it takes IO operations and it no further uses when computer restart so it might be in the memory.

The proc file system allows the kernel to communicate information about each running process on a Linux system.  Why is proc called a file system? It’s not a real file system like ext4. It’s just a collection of files containing information about the running processes.


I stumbled across  from J. K. Rowling the other day while perusing the questions on this site, and came across the following question:     Will there be, or have there been, any "late blooming" students in the school who come into their magic potential as adults, rather than as children? By the way, I loved meeting you, and hearing you speak, when you came to Anderson's in Naperville. I can hardly wait until you tour again.       Ahhh! I loved the event at Anderson's. It was one of my favorites. That is completely true. No, is the answer. In my books, magic almost always shows itself in a person before age 11; however, there is a character who does manage in desperate circumstances to do magic quite late in life, but that is very rare in the world I am writing about.    My question is, which character is J. K. Rowling referring to? I don't seem to recall any characters getting their magical powers late in life (granted, there are characters like Neville whose powers take some time to truly 'mature', but that doesn't sound like what she is referring to).

Q: Will there be, or have there been, any “late blooming” students in the school who come into their magic potential as adults, rather than as children? By the way, I loved meeting you, and hearing you speak, when you came to Anderson's in Naperville. I can hardly wait until you tour again. JKR: Ahhh! I loved the event at Anderson’s. It was one of my favorites. That is completely true. No, is the answer. In my books, magic almost always shows itself in a person before age 11; however, there is a character who does manage in desperate circumstances to do magic quite late in life, but that is very rare in the world I am writing about. (src: )  Who was JKR referring to in “there is a character”? Clearly, it not a student; so the most obvious guess of "Neville Longbottom" is wrong – both due to “no” answer regarding the question itself, and the fact that Neville bloomed in his 6th/7th year, well before you can legitimately term “quite late in life”.


I can't install anything or do anything without ubuntu giving me   E:Type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/spotify.list E:The list of sources could not be read   I only want to install adobe flash.   How can I fix this?

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


Nonabelian group of order $p^n$ for every $p$ prime and $n \in \mathbb{N}$  My idea was to just create some sort of generalized dihedral group, that's what I called it at least, maybe it is.  $G = <x,y | x^{p^{n-2}}=1,y^{p^2}=1, y^{-1}xy=x^{-1}>$  Will this work?

Question:      Let $p$ be any prime and $n \geq 3$. Show that there exists a non-abelian group of order $p^n$.    Attempt:   Take $n = 3$. Writing $\mathbb Z_p \times \mathbb Z_p = \{e, \alpha_1, \ldots, \alpha_{p^2 - 1}\}$ and considering $$\begin{align}\tau_{jk} : \mathbb Z_p \times \mathbb Z_p&\to \mathrm {Aut} (\mathbb Z_p)\,\\e &\mapsto id\\\alpha_j &\mapsto id \\\alpha_i &\mapsto \rho_k  \end{align}$$  $\forall i \neq j$ where $\rho_k : \mathbb Z_p \to \mathbb Z_p$ is such that $\rho_k (1) = k$, with $k \in \{2, \ldots, p-1\}$. Then we take the group $(\mathbb Z_p \times \mathbb Z_p) \ltimes_{\tau_{jk}} \mathbb Z_p$.   Then $$(\alpha_i , 2) \ltimes_{\tau_{jk}} (\alpha_i, 1) = (2\alpha_i, 1  + \tau_{jk} (\alpha_i)(2)) = (2\alpha_i , 1  +2 k)$$  and $$(\alpha_i , 1) \ltimes_{\tau_{jk}} (\alpha_i, 2) = (2\alpha_i, 1  + \tau_{jk} (\alpha_i)(2)) = (2\alpha_i , 1  +k)$$  taking $k = 1$ for example we have that the group $(\mathbb Z_p \times \mathbb Z_p) \ltimes_{\tau_{jk}} \mathbb Z_p$ is not abelian.    I was wondering if this is a good aproach. If not, is there an easier way to reach the result?  If this is the "best" way then would the higher cases ($n > 3$) be more of a notation play game?


I have a string  e.g. My column name is Start Date (GMT)  I want to replace Start Date (GMT) portion with start_date.  I am trying to do it like:      let a= "My column name is Start Date (GMT)";     let b = "Start Date (GMT)";     let str = new RegExp(b,"g");     console.log(a.replace(str,"start_date"));   With same code I am able to replace the string with desired value if brackets are not there, but since bracket '(' is there it is not able to identify the string and replace it.

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


First of all, is it a good idea to use FFMPEG as a music mixer? I want to mix audio files of separate instruments to build the music (all wav files and similarly recorded). How can I tell FFMPEG to mix n audio files according to a time map like audio1.wav from 0 to 60s audio2.wav from 3.5 to 18s audio3.wav from 10 to 17s audio4.wav from 61 to 90s

I have multiple audio files that represent the session. So in one folder I may have:  2016-06-22-15-59-59-000.mka 2016-06-22-16-59-59-001.mka 2016-06-22-17-59-59-002.mka   Filename is the date and time when this file has been created. For example, first file has been created on June 22, at 15:59. Second one on 16:59.  Audio duration may vary, there is no fixed duration. For example, the user can connect to the session for 5 seconds or for 10 minutes. So the first duration will be 00:05, and the second 10:00.  These files together represent the session - that's why they should be merged. You can think about it as multiple people are calling on the same phone number which is used for audio conference.  For example, Alice, Bob, and John want to discuss something. Alice is calling to the number 555-111-22-33, and the Bob is calling the same number 1 minute later. They talk together for 5 minutes. And 30 minutes later Bob and John call the same number at the same time. And then Alice is joining 1 minute later.   So in this case we have multiple audio streams. These streams will usually overlap, but not always. For example, when Alice is waiting for the Bob at the very beginning, we are already recording her, and there is nobody else in this session, so this audio stream is not overlapping with others.  I'm looking for the best way to merge audio recordings of each person into one single file. So in this file we must hear everyone. And between calls, when Alice, Bob and John are not in the session, there should be just silence.  I'm looking at ffmpeg doc, and can't find options that I can use to create overlapping streams, and specify exact time when the stream should start.  Do you guys know what would be the best way to do it? Maybe I need better tools than just ffmpeg, maybe I just need to use libraries and programming language to create my own program to do that? Thanks


I am visiting USA on a holiday next week. We would like to use a prepaid sim in our own mobile phones - Motorola G and a Samsung s4 mini. What is a recommended provider that will provide unlimited usa calls, free data up to 500mb and some talktime on international mobile phones?

My daughter is going to spend the next school year (August 2011 to June 2012) in Memphis, TN as an exchange student from Switzerland. She'd very much like to use her iPhone during her stay in the United States.  What are her options for getting prepaid talk, text and data services without also having to buy a new phone? I realize that she'll be limited to AT&T and T-Mobile because of the GSM network.  As far as I've read, T-Mobile SIM cards only work on T-Mobile branded phones, so is AT&T her only option there?


i have a shapefile of more than 8 points and i have written a code get the convex_hull geometry of of the points and output it as a shapefile using fiona. however the code returns an error saying:  ERROR:TypeError: expected string or bytes-like object  from shapely.geometry import MultiPoint, point, shape from fiona.crs import from_epsg outshape = fiona.open(".cache\ca2_points\ca2_points.shp") with fiona.open('.cache/mew.shp', 'w', 'ESRI Shapefile', outshape.schema.copy(), outshape.crs)   as output:     for feat in output:         feat = MultiPoint([shape(point['geometry']) for point in fiona.open(outshape)])         output.write(feat)

I have a points shapefile and I want to compute the convex hull of the points using shapely, and output the result as a shapefile using Fiona.  Does anyone know how I can do that?  This is what I have tried:  from shapely.geometry import MultiPoint from fiona.crs import from_epsg shape = fiona.open('.cache/town_points/ny_points.shp') with fiona.open('.cache/mew.shp', 'w', 'ESRI Shapefile', shape.schema.copy(), shape.crs) as output:     for feat in shape:         ch_area = MultiPoint(shape).convex_hull         output.write(feat)


In Fallout 4, Power Armor Frames are an essential item for any hoarder. From reading the  it appears you can only buy them, apart from one (as well as the one you get from the Preston Harvey mission).   But after a few hours of gameplay, I encountered a Bandit boss in Power Armor. I managed to salvage the shell, but I was unable to take the frame. Is it possible to loot Frames?

I've made my way to Corvega Assembly Plant and have encountered a "Raider Scum" enemy in Power Armor with a Fatman. I've killed him and could loot his power armor parts, as well as everything he had equipped with the exception of his power armor frame which he seems to be wearing still.   I am aware that NPCs can steal power armor frames with an intact fusion core, but is there a way to get frames from (preset) NPCs?


Is it possible to change color of all the occurrences of a particular character in entire document ?   link provide solution for changing color of a "word" but I am looking for changing color of "a character".  Note : A character can be can be inside a word or separate.

In order to revise a draft, and identify related sections, I would like to identify similar words (by color of text, highlight, underline, or otherwise) according to topic.   For example, I would like all uses of the terms "foo" or "bar" highlighted red and all uses of "biz" and "baz" highlighted green.  There might be four or five groups of words or word roots that I want to specify. This is only for revision, so it can be rather crude.  For example, replace this:    with this:    (In the example, it is hard to see the green text; perhaps bold+color or underline would be more useful)  Update A  provides an answer using XeLaTex. My document does not compile with XeLaTex, I would prefer a solution compatible with pdflatex if available (since that is what I use), though my document also compiles with luatex.  Other related questions:    (answer is not generic - requires seven lines per string to be replaced)  (only provides xelatex solution)   (uses chickenize, replaces string but does not add color)


I am trying to get an online reference to the exact specs of my second hand bike. What are a) Some good techniques/things to look for? b) Some resources to help the dating process.  E.g I see that  visually exactly matches my bike, however the later models are closer in terms of exact specs, but none are an exact match.  I want to find out for examples which models of tiagra RD were 9 speed (which mine is) but I dont know of any good place to find such information. (This hobby seems to be all about latest/greatest :( )  Alternately I want to find out where to find/locate the model numbers of the various components. Other clues I have is a Truvativ crankset 53/39. FD RD and shifters all tiagra.

This is a canonical question that will hopefully encompass all of the questions we get asking us to determine what year a bicycle was manufactured (how old is my bike, how old is my frame, etc.). Each "answer" should address a different way to determine the manufacturing year of a bicycle. To some extent, these will also help you narrow down the model as well as it will tell you what distinguishing features to look at.  The span of answers would include things such as:      Skiptooth cranks Cartridge bottom brackets (BB30/90 etc) Elliptical chainring Quick releases versus contemporary through-axles How the steerer attaches to the fork (quill vs. threadless)  Braking system (especially with mountain bikes: v-brake, direct pull, etc.)   Shifting ramps and pins on cassettes/sprockets and chainrings (versus flat sprockets) Frame material (e.g., shift from tubular steel to use of CF and hydroformed aluminium)  Frame tubing type (e.g. Reynolds 531 tubing introduced around 1934, still used today; Reynolds 501 tubing introduced around 1983). So a frame with an original 501 decal can't be from the 70', 531 decal doesn't help as much because of the range of years produced. Also, see Decals.   *Decals: style/design, amount, placement, color, etc. can help not only determine models, but also year of manufacture. Many changed decal design for the same model bike often yearly, with special/limited editions even more specific. This applies only if decals are original or have been replaced with the identical design. Tubing decals (Reynolds, Columbus, etc.) also changed designs for same tubing made in different years, although the changes aren't made as often, and manufacturers didn't always put tubing Brand decals on every model. Earlier bikes tended to have less fancy, less colorful, less quantity of decals.   Headbadges: most early bikes had actual "badges", often quite detailed and fancy, made of metal, then plastic, and finally just using decals on the headtube. Most bikes lost their metal badges in the 60's and early 70's, although some brands still have actual badges to this day, but in general a real badge indicates an earlier model bike. Dropout style (including the later inclusion of lawyers lips) Presence or absence of CPSC reflectors (USA only) Manufacturing method (shift from lugs to TIG welding, for example)  Number of gears (shift from 2x5 ten-speed to 3x8, 2x9, 1x11, etc.)  Inspection of lug design: pantographs, cut-out, stampings, custom brazing/filing, chrome, fork crow n sweep, etc. Frame/Fork Braze-ons. Race bikes tended have less braze-ons the earlier the year of manufacture. Most 60's racers and earlier had few or none with cable guides/stops, shifters, bidons, etc. being clamp-on. By the 80's if it was clamp-on, it was a sign of very cheap models and most frames had braze-ons for all cables, with multiple bottle and accessory bosses depending on style and use.   and so forth. Please edit this question if you have an answer that isn't in the index above.   A couple of caveats:   A previous owner could have replaced or upgraded components on a bicycle, so this guide only applies to original equipment There is a delay between the introduction of a technology (such as indexed shifting) and when manufacturers start selling products that use it. Low-end manufacturers may continue using technology that is severely outdated (such as one-piece cranks, freewheels, or quill stems) because it is cheaper to do so. A number of bikes are built in a Retro style, but with modern components.  Dutch bikes, trendy coffee cruisers, and beach cruisers may be modern but appear to be 1950s styling.  These tend to have modern rims and brakes as a giveaway.     Note that bicycles.stackexchange does not do valuations of bicycles. How much your bicycle is worth depends on the location of the buyer and seller, how much the buyer wants the bike, etc. etc. etc.


I use Ubuntu 16.04 with Nginx and Bash. I know that it's not possible to directly pipe data into zip.  For example, if you host websites on Apache/Nginx webserver, this command set would fail after filling in the password:  drt="/var/www/html" mysqldump -u root -p --all-databases | zip "$drt/db-$date.zip"   What will be your workaround if you really desire the end file to be a zip file?

I am running a script which is collecting a log of a server. I need to redirect this logs to a ZIP file. Right now I am collecting data into text file.  How can I redirect it directly to ZIP?


I have another somehow weirdly easy question: I would like to use the List view for ALL folders in Ubuntu. Is there some kind of template that I could use?

How to achieve List/Tree view in Nautilus like the following screenshot?    Cant find information about this. ps Im using Ubuntu Remix with pure Gnome 3, and last version of Nautilus.


i am trying to create a website with 10 million post but after half a million website posting goes too slow how i can optimize my database and import data like a new website

I am trying to Creat Wordpress website that will contain 10 Million post, such that when i upload a single its become a post with it's own name as title.  and i am importing these images with Wp-cli. now the problem i am facing is that i have uploaded about half a million images and now Wordpress has become slow, its taking too much time to import images. please suggest me any solution for this   Images Importing goes slow down, Server usage only 1% i am doing this Via WP-cli with this command  wp media import ~/Pictures/processed-images-medium/\*\*\/\*.jpg   every time when image upload its become a Unique post you can check it at here  http://www.wallpaper2k.com/naked-art-first/


Say we have a vector $\textbf{b}$ and $\textbf u$ such that:  $$A \mathbf b= \mathbf u$$ Where $A$ is a square matrix.  If $\mathbf b$ and $\mathbf u$ are known and $A$ is the unknown, How to get the matrix $A$  (perhaps it is not unique but how can one proceed to get it)?

How does one solve for the matrix $A$ in the system $$ Ax = b$$ when say, $A$ is a $3\times 3$ matrix and $x$ and $b$ are both $3 \times 1$. $x$ and $b$ are obviously known.  The obvious approach would be to Multiply $A$ and $x$ and compare coefficients. How does one solve this in a general setting.


I am not sure where to ask the question below. So I post it here for directions.     We are working on a feature on our web application to allow visitors to filter people (human service providers) by age and gender. The question is - would that introduce negative impact of age or gender discrimination? Would that be a concern at all?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I have multiple .csv files in a directory called mydirectory. I want to sort all these files using some bash/awk/sed command first based on LeftChr column and then RightChr column and get the result.    >Id  LeftChr  LeftPosition  LeftStrand  LeftLength  RightChr  RightPosition  RightStrand 1979     chr1        825881           -         252      chr2        5726723            - 5480     chr2        826313           +         444      chr2        5727501            + 5492     chr5        869527           +         698      chr2         870339            + 1980     chr2       1584550           -         263      chr1        1651034            - 5491    chr14       1685863           +         148      chr1        1686679            + 5490     chr1       1691382           +         190      chr1        1693020            +   result    >Id  LeftChr  LeftPosition  LeftStrand  LeftLength  RightChr  RightPosition  RightStrand 5490     chr1       1691382           +         190      chr1        1693020            + 1979     chr1        825881           -         252      chr2        5726723            - 1980     chr2       1584550           -         263      chr1        1651034            - 5480     chr2        826313           +         444      chr2        5727501            + 5492     chr5        869527           +         698      chr2         870339            + 5491    chr14       1685863           +         148      chr1        1686679            +

I have potentially large files that need to be sorted by 1-n keys.  Some of these keys might be numeric and some of them might not be.  This is a fixed-width columnar file so there are no delimiters.  Is there a good way to do this with Unix sort?  With one key it is as simple as using '-n'.  I have read the man page and searched Google briefly, but didn't find a good example.  How would I go about accomplishing this?  Note:  I have ruled out Perl because of the file size potential.  It would be a last resort.


From what I understand, information is communicated instantly between two quantum-entangled particles regardless of the spatial distance between them. However, does this necessarily imply superluminal data transfer? If the "distance" between the particles is simply assumed to be measured in our common 3D euclidean space then that would seem to imply superluminal communication. However, could there be other paths between the two particles that lie beyond our observable 3D euclidean space, other paths that involve additional dimensions in which the particles remain very close or some sort of folding of space on other dimensions that provide an information pathway? Anybody aware of any such research/findings? Thnx.

From everything I've read about quantum mechanics and quantum entanglement phenomena, it's not obvious to me why quantum entanglement is considered to be an active link. That is, it's stated every time that measurement of one particle affects the other.  In my head, there is a less magic explanation: the entangling measurement affects both particles in a way which makes their states identical, though unknown. In this case measuring one particle will reveal information about state of the other, but without a magical instant modification of remote entangled particle.  Obviously, I'm not the only one who had this idea. What are the problems associated with this view, and why is the magic view preferred?


I plan to travel to London in June and my Visa expires in August. Is it ok to travel? Or do I need to have atleast 6 months' validity before the Visa expires?

I will be entering the UK in the morning and leaving in the evening of my multiple entry visa expiry date as I have a 12 hr layover in LHR. Will I be granted entry if I have my itinerary showing that I'm leaving on that same day?


I creating a Custom Setting in a sandbox, called Global Settings (Global_Settings__c). I am trying to pull the Custom Setting into my SFDX project via Visual Studio Code, but "Custom Settings" does not appear in the Org Browser as a component type.  Using the Org Browser GUI, how can I find my Custom Setting in Visual Studio Code?

I want to know how to retrieve Custom Settings from my Sandbox into a local sfdx project. I know command force:source:retrieve but I do not know what parameter to use for retrieving Custom Settings. I have authenticated my Sandbox and tried   sfdx force:source:retrieve -u MySandbox -m CustomSettings   It returned "No result found".  I have tried using Org browser metadata from VS Code, but I could not find anything related to custom settings.  How do I retrieve Custom Settings from my Sandbox?


As the title says I've been working through the Vader quests and now he's asking me to 'Build another Imperial level to find out what to assemble next!'. I've already built all 16 Imperial levels. Obviously I could skip the quest but that costs 100 Bux, and I would feel exceedingly ripped off to waste 100 Bux on what feels to me like a bug which could happen again.  Have I reached the end of the quests, is that really what's happened here?

I have built 16/16 imperial levels, however the death Star behind the emperor is not complete (missing a small portion on the top). More disconcerting is that the imperial "mission" tells me I must build another imperial level in order to see what I must build next. It costs 100 bux to skip. Is this a bug, or is it simply wanting something from the "coming soon"future updates? Has anyone else experienced this or found a fix besides paying to skip (which may result in it happening again)?


sudo ecryptfs-unwrap-passphrase /home/username/.ecryptfs/wrapped-passphrase   This should work with my 'login' password. I'm logged in to the user account, I can see my files, yet that command fails with  ecryptfs-unwrap-passphrase /home/user/.ecryptfs/wrapped-passphrase Passphrase:  Error: Unwrapping passphrase failed [-5] Info: Check the system log for more information from libecryptfs   Of course syslog is silent  I've changed my pass few weeks ago, all works at the moment, except that command - so I'm a bit surprised, how can I unwrap the key?  Is that some version incompatibility?

After entering the correct passphrase at the command ecryptfs-mount-private, I am getting this error:  torben@torben-nettop:~$ sudo ecryptfs-recover-private INFO: Searching for encrypted private directories (this might take a while)... INFO: Found [/media/0f417b42-11a0-4539-9cae-e11ce3b289c3/home/.ecryptfs/   torben/.Private]. Try to recover this directory? [Y/n]: y INFO: Enter your LOGIN passphrase... Passphrase:  Error: Unwrapping passphrase and inserting into the user session keyring   failed [-5] Info: Check the system log for more information from libecryptfs torben@torben-nettop:~$    Syslog has this information:  ecryptfs-insert-wrapped-passphrase-into-keyring:     Incorrect wrapping key for file [/home/torben/.ecryptfs/wrapped-passphrase]   ecryptfs-insert-wrapped-passphrase-into-keyring: Error attempting to unwrap   passphrase from file [/home/torben/.ecryptfs/wrapped-passphrase]; rc = [-5]   --> Given that I am absolutely sure that I am entering the correct passphrase, what can I do to fix this problem so that I can read the encrypted home folder?  Some background:   I have installed Ubuntu 11.04 on a new drive and I want to copy my home folder from the old drive, which is encrypted (I have the passphrase). With the help of , I followed  yesterday and successfully gained access to the encrypted home folder. This proves that my passphrase does indeed work.  I then started the machine on copying from the old encrypted home folder to the new unencrypted home folder and went to bed. When I returned to the computer, I saw that it had suspended itself :( and had not finished copying the folder.  I rebooted the computer, and removed the temporary /recovery folders, then followed the exact same steps again, but this is when I encountered the error given above. I tried this several times; always the same result. I am absolutely sure that I am typing the passphrase correct.


Quoted from .     We called an integral domain $R$ a Euclidean domain if there exists a function $f$ from $R$ to strictly positive integers such that:   1) For $a,b$ non zero in $R$, $f(ab)\ge f(a)$.   2) If $a,b\in R$, $b\neq 0$, then we can write $a=bq+r$ with $q,r\in R$ such that either $r=0$ or $f(r)<f(b)$.     One of the answers below say that the definition is equivalent if we remove 1) above. To prove this, we take  $$ g(a)=\min_{x\in R^* a} f(x), R^*=R\backslash \{0\}. $$  Obviously $g$ satisfies 1). Now I am struggling to show that the new function $g$ satisfy 2), given that $f$ satisfies 2). Any hints?

Can anyone make me understand in simple language why the second condition for being an Euclidean domain is superfluous ?  Why $v(a)  \leq v(ab)$ is not needed?  How we can deduce from the first one?


I have two layers, one of points (locations of fruit trees) and one of Atlanta zip codes, in ArcMap 10, but the layers are not aligning. The fruit trees are in a corner and the map is in the middle top.   The fruit points were successfully converted to a shp file from a csv file.   The two layers have the same projected coordinate system NAD_1983_StatePlane_Georgia_West_FIPS_1002_Feet  and the same geographic coordinate system GCS_North_American_1983  I thought the error would be that the systems didn't match up, but that's not the case.

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


I was thinking too complicated the slicing in the  I want to include (a,b), not [a,b] like this don_crissti's command:  sed '/begin{document}/,/end{document}/!d;/end{document}/q' data.tex   So I do not want to include \begin{document} and \end{document} in the output.  How can you having an open interval in the output?

I'm going to submit form using cURL, where some of the contents is come from other file, selected using sed  If param1 is line matching pattern from other file using sed, below command will works fine:  curl -d param1="$(sed -n '/matchpattern/p' file.txt)" -d param2=value2 http://example.com/submit   Now, go to the problem. I want show only text between 2 matching pattern excluding the matching pattern itself.  Lets say file.txt contains:  Bla bla bla firstmatch It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. secondmatch The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.   Currently, lots of "beetween 2 matching pattern" sed command won't remove firstmatch and secondmatch.  I want the result to become:  It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.


when I try to assign a list to 2 variables, the following 2 ways get different results? # way1 a,b =  [[None,None],[None,None]] # way2 c,d = [[None,None]]*2   a and b have different addresses on memory caches, while c and d have the same one. print(id(a),id(b)) # out: 5243249856 5243249472  print(id(c),id(d)) # out: 5243246016 5243246016  The right-side lists are completely the same, the only difference is the way to create the list (way2 uses a '*' to expand the list). However, the left-side get different results. How is this happen? any one have any idea?

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?


When you write a comment which isn't long enough, then edit it so it is long enough, when you first initially attempted to submit the comment it set the last comment posted timer, so you have to wait 15 seconds to actually post your valid comment.  Shouldn't invalid comments that don't get accepted not reset the 15 second comment timer?  I probably think I'm normal but actually I'm living in a world where I am really thick without realising it, but I keep running into this annoying counter every now and then!

As a little feature to prevent comment spam, you can only enter one comment every 15 seconds. That's a very reasonable limitation, since you very rarely have a good reason to write comments that quickly. I've only seen it twice at all, I think, but both times it was extremely annoying.     Only 1 comment allowed per 15 seconds; timer reset.   The reason is that every time you hit the limit, the 15 seconds begin anew. You have no indicator that tells you when you are allowed to comment again, and if you hit enter after just 14 seconds, you're back to zero. Yesterday, I went through four cycles of not quite 15 seconds, counting in my head, before I got a myself a coffee and tried again afterwards.  I suggest that you do one or more of the following (in decreasing order):   Make the counter non-restarting Add a visible countdown Make it clearly visible that you can't comment right now You can actually increase the waiting time, if it is clearly visible and there is no unnerving invisible countdown. Actually, just remove all comment fields after one comment, and tell the user to reload the page. Just please don't have UI elements that look like they would work, but feel like they are trolling you.


light passes through transparent objects like water and glass ,where in case of glass the molecules are more tightly packed or concentrated then to it allows light to pass, Why?(yet reflection occurs but why the rest light passes)

Once I asked this question from my teacher and he replied "Because it passes light.". "And why does it pass light?" I asked and he said, "Because it is transparent.".  The same question again, Why glass is transparent? Why does light pass through it, while for opaque objects, it does not?


I made 100 measurements of a certain quantity, calculated mean and standard deviation (with MySQL), and got mean=0.58, SD=0.34.  The std seemed too high relative to the mean, so I made 1000 measurements. This time I got mean=0.572, SD=0.33.  I got frustrated by the high standard deviation, so I made 10,000 measurements. I got mean=0.5711, SD=0.34.  I thought maybe this was a bug in MySQL, so I tried to use the Excel functions, but got the same results.  Why does the standard deviation remain high even though I do so many measurements?

I'm struggling to understand the difference between the standard error and the standard deviation. How are they different and why do you need to measure the standard error?


I am creating some div and assigning click listener to those div in a for loop The code is like this.      function selectedPhotosDiv(path){  try{      var choiceDiv = document.createElement('div');         choiceDiv.id = "photos"+Buttler.User.chatid;         choiceDiv.className = "display_photos";     for(var i=0;i<path.length;i++)     {            var box = document.createElement('div');         box.className = "img_box";         box.id = "box"+i;         box.style.backgroundImage="url('file://"+path[i]+"')";         var close = document.createElement('div');         close.className = "img_close";         $(close).click(function(){             console.info(i);         });         box.appendChild(close);         choiceDiv.appendChild(box);     }     return choiceDiv; }catch(error){ }  }   However on clicking the close the value of i is always the last value of i ie path.length-1; I am not able to figure out where i am doing the mistake. Need Help

I'm working with a bit of html and Javascript code that I've taken over from someone else. The page reloads a table of data (via an asynchronous request) every ten seconds, and then re-builds the table using some DOM code. The code in question looks something like this:  var blah = xmlres.getElementsByTagName('blah'); for(var i = 0; i < blah.length; i++) {     var td = document.createElement('td');     var select = document.createElement('select');     select.setAttribute("...", "...");     select.onchange = function() {         onStatusChanged(select, callid, anotherid);     };     td.appendChild(select); }   When the onchange event is fired for a <select> element however, it seems like the same values are being passed to the onStatusChanged() method for every <select> in the table (I've verified that in each iteration of the loop, callid and anotherid are being given new, distinct values).   I suspect this is occuring because of the nature of how I am setting the event handler, with the select.onchange = function() syntax. If I understand how this is working correctly, this syntax sets a closure for the onchange event to be a function which refers to these two references, which end up having a final value of whatever they are set to on the last iteration of the loop. When the event fires, the value referenced by callid and anotherid is the value set in the last iteration, not the value set at the individual iteration.  Is there a way that I can copy the value of the parameters I am passing to onStatusChanged()?  I've changed the title to better reflect the question and the accepted answer.


I was looking at this javascript code:    var a = {i: 0}; var b = 0;  function change(a, b) {   a.i++;   b++; } change(a, b);  console.log(a, b);     You would expect to be logged: {i:1} 1 . It actually returns: {i:1} 0? Why is b=0 and not b=1?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Some one is showing his conservative and little thinking by voting down all of my questions & answers on Stack Overflow. Here is the snap shot of my reputation changes:    You can also visit my profile and see this by yourself. I know the person who is doing this to me.   How can I stop them from doing this?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


Whenever I feel a little light headed or tired, it helps to eat something sweet. Specifically, simply chewing or sucking on a sweet seems to aleviate the symptoms within a matter of seconds and then the sugar seems to kick in. So I was wondering whether it is just a psychological effect, or whether sugars are absorbed in our mouth and reach the brain (or wherever the sugars exert their effects?) within seconds. Or is perhaps the taste of sugar sufficient to signal the body that it can safely release some extra energy as resupply is imminent?

For instance, I realise being able to absorb simple sugars in the mouth is pivotal in the rapid action of oral glucose gel. Thus I was wondering what nutrients in general can be absorbed directly within the mouth, and at what speed?


why do we assume unity feedback system when designing a controller for a system? Please guide on this issue. It's urgent. Thanks!

Why is the unity feedback system used? This block diagram is for a 2 DOF ball balancing using a PID controller.


I am currently working on update 3 to my app, I wanted to add the ability to shake the iPhone and have it go to a random cell in my UITableView. I know Apple recommends against doing this kind of gesture, but I want to add it or at least try it out.   Any help would be appreciated!

I want to react when somebody shakes the iPhone. I don't particularly care how they shake it, just that it was waved vigorously about for a split second. Does anyone know how to detect this?


How to create Pascal's triangle like this:

I would like to typeset the top part of Pascal's triangle. To get the triangle with the names of the binomial coefficients, i.e., {n \choose k}, I used the following code  \begin{tikzpicture} \foreach \n in {0,...,4} {   \foreach \k in {0,...,\n} {     \node at (\k-\n/2,-\n) {${\n \choose \k}$};   } } \end{tikzpicture}   The result is this   Now I want to be equally lazy and do something like this for the values of the binomial coefficients, i.e., replace {\n \choose \k} in the node label with \CalculateBinomialCoefficient{\n}{\k} where \CalculateBinomialCoefficient is a hypothetical macro that calculates the binomial coefficient. Has anyone done something like that?  The result should look like this:


I am trying to copy the contents of one excel sheet into another sheet without the formatting applied to cells using Apache POI in java. But i have a NULL Pointer Exception Thrown in LINE switch (cell.getCellType()) { Why is this error appearing?   import java.io.File;     import java.io.FileInputStream;     import java.io.FileNotFoundException;     import java.io.FileOutputStream;     import java.io.IOException;      import org.apache.poi.xssf.usermodel.XSSFCell;     import org.apache.poi.xssf.usermodel.XSSFRow;     import org.apache.poi.xssf.usermodel.XSSFSheet;     import org.apache.poi.xssf.usermodel.XSSFWorkbook;      public class Automate {          public static void main(String[] args) {             // TODO Auto-generated method stub             final File myFile = new File(                     "sample.xlsx");             FileInputStream fis;             try {                 fis = new FileInputStream(myFile);                 // Finds the workbook instance for XLSX file                 final XSSFWorkbook wb = new XSSFWorkbook(fis);                 // Return first sheet from the XLSX workbook                 XSSFSheet sheet = wb.getSheetAt(0);                 System.out.println(sheet.getLastRowNum());                 XSSFWorkbook outWorkbook = getFilteredWorkBook(sheet);                  // save merged file                 File outFile = new File("C:\\filtered.xlsx");                 if (!outFile.exists()) {                     outFile.createNewFile();                 }                 FileOutputStream out = new FileOutputStream(outFile);                 outWorkbook.write(out);                 out.close();                 System.out.println("Files were created successfully");              } catch (FileNotFoundException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             } catch (IOException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             }          }          private static XSSFWorkbook getFilteredWorkBook(XSSFSheet sheet) {             // TODO Auto-generated method stub             XSSFWorkbook workbook = new XSSFWorkbook();             XSSFSheet outSheet = workbook.createSheet();             int i = 0;             for (int rowCount = 0; rowCount < sheet.getLastRowNum(); rowCount++) {                 System.out.println(rowCount);                 XSSFRow outRow = outSheet.createRow(i);                 XSSFRow row = sheet.getRow(rowCount);                 int j = 0;                  for (int colCount = 0; colCount < 10; colCount++) {                     System.out.println(colCount);                     XSSFCell outCell = outRow.createCell(j);                     XSSFCell cell = row.getCell(colCount);                     switch (cell.getCellType()) {                     case XSSFCell.CELL_TYPE_FORMULA:                         outCell.setCellFormula(cell.getCellFormula());                         break;                     case XSSFCell.CELL_TYPE_NUMERIC:                         outCell.setCellValue(cell.getNumericCellValue());                         break;                     case XSSFCell.CELL_TYPE_STRING:                         outCell.setCellValue(cell.getStringCellValue());                         break;                     case XSSFCell.CELL_TYPE_BLANK:                         outCell.setCellType(XSSFCell.CELL_TYPE_BLANK);                         break;                     case XSSFCell.CELL_TYPE_BOOLEAN:                         outCell.setCellValue(cell.getBooleanCellValue());                         break;                      default:                         outCell.setCellValue(cell.getStringCellValue());                         break;                     }                  }             }             return workbook;         }      }

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


Let $\mathbb M(n;\mathbb R)$ denote the set of all real matrices (identified with $\mathbb R^{n^2}$ and endowed with its usual topology) and $GL(n;\mathbb R)$ denote the group of all invertible matrices. Let $G$ be a subgroup of $GL(n;\mathbb R)$. Define $$H = \{ A \in G \mid \text{there exists } \phi : [0, 1] \rightarrow G \text{ continuous, such that } \phi (0)=A,\phi(1)=I\}.$$ Then is $H$ a normal subgroup?

Let $M(n;\mathbb{R})$ denote the set of all $n \times n$ matrices with real entries (identified with $\mathbb{R}^{n^{2}}$ and endowed with its usual topology) and let $GL(n;\mathbb{R})$ denote the group of invertible matrices. Let $G$ be a subgroup of $GL(n;\mathbb{R})$. Define $$H = \biggl\{ A \in G  \ \biggl| \ \exists \ \varphi:[0,1] \to G \ \text{continuous such that} \ \varphi(0)=A , \ \varphi(1)=I\biggr\}$$  Then is $H$ normal in $G$?  For proving $H$ normal i should verify two things:   First $H$ is a subgroup. For all $A \in G, B \in H$, we must have $A \cdot B \cdot A^{-1} \in H$.   That's it i  am not able to proceed any further.


How can I automatically have a space added before \to iff there is a [ before it?  It's just that   $f\colon]a;b[\to[c;d]$   looks awfully bad...  Thanks!

I have the code  \documentclass{amsart}  \begin{document}     \begin{equation}         ]-\pi,0[ \qquad -\pi \qquad \int_{-\pi}^0 \qquad [-\pi,0]     \end{equation} \end{document}   which produces    Why is the minus sign on the left so far away from pi and how can this be avoided?


I downloaded 64bit Ubuntu and I put it on my USB. It is bootable, and BIOS is configured to boot from it. But when I turn on the laptop with USB in it, it says:   Bootmgr is missing. Press Ctrl+Alt+Del to restart.   I have windows 7 64bit installed and I want to keep it. (dual boot or something)  Device: HP PAVILION G7 1303

The windows7 OS successfully removed, but can't boot in Ubuntu, said the bootmgr is missing. Also the hdd password is frozen.