How does Python resolve global variables in calls between packages, especially in cases there are global variables with the same name present?  For example. Let there ba a package P1 containing BaseClass. Let there be two packages P2 and P3, containing classes Derived1 and Derived2 that inherit BaseClass correspondingly. Also, let P2 and P3 both contain variable named gvar (for example, defined in their init.py files).  Both of derived classes in their constructors have a call to baseClass constructor through super.  If in BaseClass constructor there is a reference to gvar, what would happen? Is there a way to ensure that during instantiation of Derived1 gvar from P2 would be used?  Why am i bothering with global variables: in my real life case there are tens of classes in P1 and P2, and i would like to avoid changing them all (to add package-specific gvar to their definitions, or adding another common ancestor with it).

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


Ordinarily in English, adjectives directly describe the noun being modified; thus an adjective indicating an emotion attributes that emotion to the noun - "I am happy" means that I am the one experiencing happiness. But if I say "it was a happy day", I am not claiming that the day experienced happiness - it is not a conscious entity. To my mind, these are two entirely separate functions performed by the same word "happy". In other languages, adjectives (or what might reasonably be labelled as such) commonly work this way - I have often seen native speakers of Chinese or Japanese confuse the English "scared / be afraid" with "scary / be frightening" because (as I understand it) in those languages, both concepts would ordinarily be expressed with the same word, inflected the same way. Yet as far as I can imagine at the moment, English does this only in very limited cases. I may be scared, but the cause was scary. I may be hungry, but my food is not - and neither is my mealtime, nor anything else related to my proposed solution to hunger. Am I overlooking something? Is there a term for this way of using adjectives in English, and are there a bunch more examples that aren't coming to mind at the moment? Or is "happy day" just a magical set phrase that I've been using unquestioningly all these years?

There's a verse in Bob Seger's song Mainstreet that has this wonderful little seemingly-nonsensical word pairing:     There was this long, lovely dancer in a little club downtown;    I loved to watch her do her stuff.    Through the long, lonely nights she filled my sleep,    her body softly swaying to that smoky beat.   On face-value, the word "smoky" to describe a "beat" just doesn't make sense; smoky isn't really a quality that a [musical] beat can have. And yet, the the words do make sense together and evoke a clearer (err, smokier) image of the nightclub.  Is there a term for this literary device? Are there other examples that come to mind?


I am analyzing dynamic web application and i am not able to find the datasource details anywhere in the application. In the application context all i could see is the below entry.  <je:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/App"/> <je:jndi-lookup id="mySQLDataSource" jndi-name="java:comp/env/jdbc/App_MySQL"/>   The application is deployed in Tamcat server. Where will be the datasource defined? Is it possible the DB details are configured in tomcat server?  Thanks

The Weblogic servers we are using have been configured to allow JNDI datasource names like "appds".  For development (localhost), we might be running Tomcat and when declared in the <context> section of server.xml, Tomcat will hang JNDI datasources on "java:comp/env/jdbc/*" in the JNDI tree.  Problem: in Weblogic, the JNDI lookup is "appds" whilst in Tomcat, it seems that that I must provide the formal "java:comp/env/jdbc/appds". I'm afraid the Tomcat version is an implicit standard but unfortunately, I can't change Weblogic's config ... so that means we end up with two different spring config files (we're using spring 2.5) to facilitate the different environments.  Is there an elegant way to address this. Can I look JNDI names up directly in Tomcat? Can Spring take a name and look in both places? Google searches or suggestions would be great.


I am an physics undergrad in my pre-final year. Recently, I tried learning some QFT (from the likes of Peskin and Schroeder’s 1st 4 chapters, David tong etc.) and got interested in it’s working in a condensed matter setting. As it happens, listening to broad applications of QFT in CMP got me interested in learning about Keldysh field theory and am curious to see how it handles non-eqm situations. Currently I am stuck about charting a  proper path/topics list that can help me reach Keldysh field theory in a proper manner. The only resource I have seen as such are ArviX articles which are quite inaccessible for me.  So I am asking about the necessary topics/chapters required to learn Keldysh Field theory. I’ve done some path integrals and am starting to know about imaginary time calculations. But I’ve no idea how exactly to proceed (another answer on  regd the resources is quite useful, but that assumes some pre-requisite, I wanted if a broad list of topics could be highlighted to reach there). Any resources/specific topics would be highly welcome.  As per my background - I have taken course work in Quantum mechanics (scattering/perturbation and relativistic) and am currently taking a course in solid state physics and stat mech. Ig some understanding of material here (i.e. coursework) would be pre-requisite, but till now following Negele and Orland’s book for the 1st couple of chapters, I’ve managed to build up whatever I need on the go. Hoping for suggestions!

I'd like some suggestions for good reading materials on the Keldysh formalism in the condensed matter physics community. I'm familiar with the imaginary time, coherent state, and path integral formalisms, but lately, I've been seeing Keldysh more and more in papers. My understanding is that it is superior to the imaginary time formalism at least in that one can evaluate non-equilibrium expectations.


My solution attempt for part (C)  $$\mathbb{E}[e^{\mu+\sigma Z}I_{Z>−d}]= \int^{+\infty}_{-\infty} e^{\mu+\sigma Z}I_{Z>−d} \, dx= \int^{+\infty}_{-d} e^{\mu+\sigma Z} \, dx$$ since $$\int^{-d}_{-\infty} e^{\mu+\sigma Z} *0=0$$  So I am left to integrate $$\int^{+\infty}_{-d} e^{\mu+\sigma Z} \, dx=e^\mu\int^{+\infty}_{-d} e^{\sigma Z} \, dx$$ which I don't know how to do since $Z$ is a r.v.

It's a little tricky to me, I am not sure how to proceed...my atempt was to stick strictly to the definitions given and the formula for the (continuous) expected value.  Prove that $E[e^{\mu+\sigma Z}\mathbb{1}_{Z>-d}]=e^{\mu+\frac{\sigma ^2}{2}}\Phi(d+\sigma)$, where $\Phi$ is the standard normal distribution function, $Z  \sim N(0,1)$(i.e. standard normal distribution) and $\mathbb{1}_{Z>-d}$ denotes the following indicator function of an event such that, $$\mathbb{1}_{Z>-d}=1 \text{ when } Z >-d \text{ and, } \mathbb{1}_{Z>-d}=0 \text{  otherwise}$$ during your work, denote the standard normal density function as $\phi$.  I only got up to thinking $e^{\mu+\sigma Z}\mathbb{1}_{Z>-d}$ is essentially just $e^{\mu+\sigma Z}$ if $Z>-d$ for some $d$ and $0$ otherwise. And so, the expected value is defined (for continuous random variables) $E[X]= \int_{-\infty}^{\infty}xf(x)dx$ where $f(x)$ is the probability for each random variable $x$. I thought this would lead me to using $\phi$ and ultimately leading me to $\Phi$ in my final conclusion as in the RHS. But I am not sure about how to proceed, would someone please help me? It would be great if you could explain the steps to me...thank you very much in advance...


int addmult(int ii, int jj){   int kk, ll;   kk = ii + jj;   ll = ii * jj;   return (kk, ll); } void main(void){   int i=3, j=4, k, l;   k = addmult(i, j);   l = addmult(i, j);   printf("%d, %d\n", k, l); }     I thought that it wasn't possible to return two variables from a function. How does the compiler know to print ll instead of kk? I know that in the function ii=3 and jj=4, k=7 and l=12, but then it goes on to return two variables.  Could someone please elaborate on why it ends up printing:  12, 12


In this example, the list disappears when not using the overflow property with the hidden value.Can some one explain why ?    ul {   list-style-type: none;   margin: 0;   padding: 0;   overflow: hidden;   background-color: #333333; }  li {   float: left; }  li a {   display: block;   color: white;   text-align: center;   padding: 16px;   text-decoration: none; }  li a:hover {   background-color: #111111; }

Home

News

Contact

About

     Here's a link to the tutorial:

Although elements like
s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: If floated elements have non-floated parent elements, the parent will collapse. For example:

Div 1

Div 2

    The parent div in this example will not expand to contain its floated children - it will appear to have height: 0. How do you solve this problem? I would like to create an exhaustive list of solutions here. If you're aware of cross-browser compatibility issues, please point them out. Solution 1 Float the parent.

Div 1

Div 2

    Pros: Semantic code. Cons: You may not always want the parent floated. Even if you do, do you float the parents' parent, and so on? Must you float every ancestor element? Solution 2 Give the parent an explicit height.

Div 1

Div 2

    Pros: Semantic code. Cons: Not flexible - if the content changes or the browser is resized, the layout will break. Solution 3 Append a "spacer" element inside the parent element, like this:

Div 1

Div 2

    Pros: Straightforward to code. Cons: Not semantic; the spacer div exists only as a layout hack. Solution 4 Set parent to overflow: auto.

Div 1

Div 2

    Pros: Doesn't require extra div. Cons: Seems like a hack - that's not the overflow property's stated purpose. Comments? Other suggestions?


I recently posted on answer on Stack Overflow which mentioned the discrepancy between windows and linux path separators in the answer. I enclosed both in inline code snippets like so: \\ and /. These render fine, both in the editor, and in the answer itself.   However, when I commented a similar remark on the answer (to ping the asker about the important discrepancy), the code formatting did not work. I eventually had to run the two together, because the backtick at the end would not close the first code snippet. (see comment section of this answer for an example).   For the record, when I type the inline code snippets (seen above), I write  `\\` and `/`   -exactly as show above. This is also exactly what I type in the comment below this post.  It appears that the way to get this code to format correct in the comments is to use double backticks on the first code block, as so:  ``\\``   This also works fine in the answer and editor itself: \\, however the discrepancy of rendering the original snippet in questions/answer/editor vs a comment should still be considered a bug in my opinion.

I'm trying to write a single backslash in a comment as code formatted by backtick. Like this:  `\`   but it escapes the backtick and doesn't close the "inline code block".  I've read  but couldn't figure out.  How do I format a single backslash in comment as code?


When I paste any code into Vim, I the following happens.    How could I tell Vim not to screw up my tabs?

Whenever I copy something from another application and then go to paste it into vim, it messes up the indentation.   For example, just now I tried to copy the manifest.json file from the hello-world tutorial for creating chrome extensions.  It looks like this:  {   "manifest_version": 2,    "name": "One-click Kittens",   "description": "This extension demonstrates a browser action with kittens.",   "version": "1.0",    "permissions": [     "https://secure.flickr.com/"   ],   "browser_action": {     "default_icon": "icon.png",     "default_popup": "popup.html"   } }   but, when I paste it into vim, it looks like this:   My vimrc is as follows:  "se t_Co=256 syntax enable  set nowrap set mouse=a set tabstop=4 set softtabstop=4 set shiftwidth=4 set expandtab  set number set showcmd set cursorline set showmatch  execute pathogen#infect() "filetype plugin indent on  "folding settings set foldmethod=indent   "fold based on indent set foldnestmax=10      "deepest fold is 10 levels set nofoldenable        "dont fold by default set foldlevel=1              set clipboard=unnamed  "share one clipboard for everyhting       It has something to do with this line:  execute pathogen#infect() "filetype plugin indent on   If I comment it out, The problem is resolved. However, this is what I use to achieve auto-indent for when I am coding in python. Is there another way to get auto-indent?


Im looking for a linear algebra textbook that meets two criterion:   The book should be proof-based.  The book should try and motivate most, if not most of the ideas, of the geometry of linear maps and matrix decompositions. For example, the permutation maps can be thought of as rotation maps because permutation matrices simply rotate the basis vectors. I’m looking for a book that explains all ideas and methods geometrically as well. A plus would also be that the book also foreshadows which properties can be generalized to a functional analytic setting.

I plan to self-study linear algebra this summer. I am sorta already familiar with vectors, vector spaces and subspaces and I am really interested in everything about matrices (diagonalization, ...), linear maps and their matrix representation and eigenvectors and eigenvalues. I am looking for a book that handles every of the aforementioned topics in details. I also want to build a solid basis of the mathematical way of thinking to get ready to an exciting abstract algebra next semester, so my main aim is to work on proofs for somehow hard problems. I got Lang's "Intro. to Linear Algebra" and it is too easy, superficial.  Can you advise me a good book for all of the above? Please take into consideration that it is for self-study, so that it' gotta work on its own. Thanks.


What are the solutions for $2^x=x^2$?  I noticed there were 2 roots: $2,4$.   Are there any other roots, and how do you calculate them?

I've been asked to solve this and I've tried a few things but I have trouble eliminating $x$. I first tried taking the natural log: $$x\ln \left( 2\right) =2\ln \left( x\right)$$ $$\dfrac {\ln \left( 2\right) }{2}=\dfrac {\ln \left( x\right) }{x}$$ I don't know what to do from here so I decided to try another method: $$2^{x}=2^{\log _{2}\left( x^{2}\right) }$$ $$x=\log _{2}\left( x^{2}\right)$$ And then I get stuck here, I'm all out of ideas. My guess is I've overlooked something simple…


We all have a moment in our life where something happens and that change the course of our life.

I heard the following comment of Mr. Marco Rubio about Mr. Donald Trump on CBS’s “Face the Nation” in a clip in February 29th AP Radio News:  “There is never gonna be a time where the Republican Party rallies around and says you have to get out or anyone has to get out for purposes of rallying around Donald Trump. Donald Trump is not Republican Conservative. Donald Trump is trying to pull off the biggest scam in American political history.”  I thought I misheard “There is never gonna be a time where –“ for “There is never gonna be a time when –“ at first, because I was in understanding that time should be trailed by “when” as a relative noun or adverb. An English Japanese dictionary at hand (Readers English Japanese Dictionary published by Kenkyusha) provides “where” singly as a relative to refer the ‘place.’ However, my lookup of the following two sources endorsed that I heard it right:  Here is what is never going to happen in this race. There's never going to be a time where the Republican Party rallies around and says you have to get out or anyone has to get out for purposes of rallying around Donald..  “Here is what is never going to happen,” Rubio continued. “There's never going to be a time where the Republican Party rallies around and says you have to get out or anyone has to ...   Is it common, at least not uncommon to use “where” after “time” as a relative?


How would I write a proof for this example?  We know that all polynomial functions on the reals are continuous by using the sequential definition of continuity. In particular, we know that the function $f: \mathbb{R} \rightarrow \mathbb{R}$ given by $f(x) = x^2$ is continuous. Prove this using the $\epsilon$-$\delta$ definition.

I am to show the continuity of this function with the help of $\epsilon$-$\delta$ argument.   The function is: $g: \Bbb{R} \rightarrow \Bbb{R}$, $x \mapsto x^2$.   Given the $\epsilon$-$\delta$ definition of limit, I tried as follows:   We must have: $|f(x)-f(x_0)|<\epsilon$, so then $|x^2-x_0^2|=|(x-x_0)(x+x_0)|=|(x-x_0)||(x+x_0)|$, so $|x-x_0|<\frac{\epsilon}{|x+x_0|}$. So now I will choose $\delta=\frac{\epsilon}{|x+x_0|}$.   Is it enough? I am writing this sentences like a machine, but I am not understanding intuitively.


I want to install the JSON extension as is mentioned in prerequisites to use People Api by Google. You can refer to . I've php7 installed on Ubuntu 16.04.

I have Ubuntu 15.10 installed. I have also installed LAMP using the . I then proceeded to set up Moodle via the web page installation. I hit a road block when I got  Moodle requires the json PHP extension.  Please install or enable the json extension.   With the link above, I have tried installing, whilst LAMP was still installed, only PHP5 (libapache2-mod-php5) -- and of course restarting the apache2 service. The problem is in the the /etc/php5/mods-available folder, no json.ini file appears. When I type in terminal sudo php5 -m, json is not a module running. However if I attempt to remove PHP5, it shows before I confirm the removal that the package php5-json will go.   The question I have is how do I get the json extension if I don't have it already, or if I do have it (and it's placed somewhere else) how do I enable it?  EDIT: output of apt-cache policy php5-json  php5-json:   Installed: 1.3.7-1   Candidate: 1.3.7-1   Version table:  *** 1.3.7-1 0         500 http://nz.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages         100 /var/lib/dpkg/status   Tried sudo apt-get install --reinstall php5-json but still missing file.


I.E. Why are relations where each member of the domain having one and only one mapping to a member in the range so important?  I was wondering since most of mathematics that I'm familiar with (high school math) focus much on functions.  Also do upper level mathematics study relations that are not functions just as much?

Why is it that math so focuses on the subclass of relations known as functions? I.e. why is it so useful for us in nearly all branches of mathematics to focus on relations which are left-total and left-unique? Left- (or even right-) totality seem to be intuitive, since if an element doesn't appear in the domain, we might throw it out. But why left-uniqueness?  I'm looking for something like a "moral explanation" of why they would be the most useful subclass of relations.  My apologies if this is a previous question; I looked and didn't find much.


how do i create a slideshow in GIMP image editor using jpeg images saved in a folder and use it as wallpaper in Ubuntu 12.04 LTS version? The slideshow has to be timed so that the wallpaper keeps changing at fixed time interval, and background music is also present..

How do  I create a desktop wallpaper slideshow with my own set of images?   With the images coming from a pictures folder, or pre-selected With the images displayed in order, or randomly With the images changing every few minutes, or after random periods of time


How does substitution for limits exactly work?   I see often answers that use the substitution $t=\frac1x$, then changing $x\rightarrow\infty$ to  $t\rightarrow0^+$.  I have seen , this appears to solve my question in the finite case. How does it work when going to infinty?   Books I'm using don't cover substitutions, but they seem very useful.

After , I was wondering if the following generalization holds true:     Claim: If $\lim \limits_{x\to a}g(x)=b$, then $\lim \limits_{x\to a}f(g(x))=\lim \limits_{y\to b}f(y)$.   I've seen some people use this change of variables before when evaluating difficult limits, but I haven't seen this presented as a theorem in a textbook. Is this claim true? If not, is the claim salvageable with additional hypotheses? For example, must $f$ be continuous for the claim to hold?


I tried to enter assertTrue into code and found that i need to import junit lib.   In this code,  import static org.junit.Assert.assertTrue; //import org.junit.Assert;   with this didnt worked  public class Person implements Serializable {        // some code there          assertTrue(p2.getAge() == p.getAge());         assertTrue(p2.getName().equals(p.getName())); }   So i tried with import org.junit.Assert; but that asserTrue didnt worked then I tried with import static org.junit.Assert.assertTrue; and then it works. I need explanation why need static ?

When used like this:  import static com.showboy.Myclass;  public class Anotherclass{}   what's the difference between import static com.showboy.Myclass and import com.showboy.Myclass?


Let $X$ be a Poisson random variable with parameter $\lambda$. What is the most likely outcome of $X$?   Please help me solve this exercise. Thanks in advance! :)

Lately, I am doing an investigation on Stirling's formula and its applications. So I thought I could use it to prove that the mode of the Poisson model is approximately equal to the mean. Of course, you do that by considering the curve that is formed by connecting the points of the probabilities of occurrence and the different values of the discrete random variable. Then you differentiate the p.d.f. where for $x!$ you use Stirling's formula $x!\approx \sqrt{2\pi x}~x^xe^{-x}$. The result is $\lnλ-1/(2x)-\ln x$ whose roots cannot be found analytically, but by iterative methods we find that as λ is larger and larger, the mode~mean.   Problem is, I found the following paper online, which seems to be the solution from a Harvard's undergraduate problem set.     It reads "You can also show this by taking the derivative of eq. (2), with Stirling’s expression in place of the $x!$. Furthermore, you can show that $x = a[=λ ~\text{in my case}~]-1/2$ leads to a maximum $P(x)$ value of $P_\max\approx1/\sqrt{2\pi a}$."   Does this puzzle you as much as it puzzles me? My main concern is over the "=" sign: how does this hold? The derivative=0 equation cannot have such an exact solution. Furthermore at such x, how does $P(X=a-1/2)$ give $1/\sqrt{2\pi a}$?  Am I (and my professor) missing something rather obvious or is the solution wrong?  Discuss!  PS: This sort of question might have been asked before, but still, I am really curious that somebody reads the paper in the link above, so that I can figure out what's going on.


A friend of mine is an Assistant Language Teacher at a junior high school in Japan. The textbook for the grade eight class has the question "Is Eri's host family kind to her?"  If I were to answer that question, I would use a plural and say "Yes, they are." But the main teacher of the class says that the proper answer is "Yes, it is," because the question is asked in the singular form. This seems really unnatural to me.  Which of these is correct, and why? The main teacher will not be satisfied with anything other than an answer that's backed up with proper rules of grammar.

Why would using the construct "is/their" instead of "is/its" in the following examples likely be frowned upon by some native speakers and marked as incorrect on tests?  The class is working on its assignment. (AmEng) The class is/are working on its/their assignment. (BrEng) The class is working on their assignment. (disputed usage)  -and-  The government is always changing its mind. (AmEng) The government is/are always changing its/their minds. (BrEng) The government is always changing their mind. (disputed usage)  -and-  The team is putting on its uniforms. (chiefly AmEng) The team are putting on their uniforms. (chiefly BrEng) The team is putting on their uniforms. (disputed usage)  -and-  The Smith family is at the beauty parlor getting its hair and nails done for the wedding. (chiefly AmEng) The Smith family are at the beauty parlor getting their hair and nails done for the wedding. (chiefly BrEng) The Smith family is at the beauty parlor getting their hair and nails done for the wedding. (disputed usage)  On the other hand, why might other native speakers consider this usage to be acceptable?


After computing the standard error of regression, my answer is 3.55 what does the value mean

I'm wondering how to interpret the coefficient standard errors of a regression when using the display function in R.  For example in the following output:  lm(formula = y ~ x1 + x2, data = sub.pyth)         coef.est coef.se (Intercept) 1.32     0.39    x1          0.51     0.05    x2          0.81     0.02     n = 40, k = 3 residual sd = 0.90, R-Squared = 0.97   Does a higher standard error imply greater significance?   Also for the residual standard deviation, a higher value means greater spread, but the R squared shows a very close fit, isn't this a contradiction?


If you were to graph all the integer points on the x-y planes, and then color all the points where x and y create an simplest fraction red, and the rest blue, what is the average density of red points if you look around the point of (a,b). What can we say about the points next to another point in terms of co-primeness.

This is a really natural question for which I know a stunning solution. So I admit I have a solution, however I would like to see if anybody will come up with something different. The question is     What is the probability that two numbers randomly chosen are coprime?   More formally, calculate the limit as $n\to\infty$ of the probability that two randomly chosen numbers, both less than $n$ are coprime.


I'm running the android app beta, and wanted to put a screen capture in an answer, but couldn't figure out how.  Is it possible, and the functionality is obscure, or is this feature not implemented?

I would like to request implementation of uploading images to questions/answers from the Stack Exchange Android app, especially now as it would definitely help uploading screenshots for reporting bugs and feature requests.


While the "normal" syntax for creating an array (lets say for this example an array of type MyClass) in Java is MyClass[] arr = new MyClass[3], I've noticed the next syntax also works:  MyClass arr[] = new MyClass[3]  That surprised me today, since by intuition a program would want a uniform syntax. My question is there is a reason for this syntax?   Is it because of an impact from another language or is it just to offer flexibility? Or, another option is that it is actually not weird and is just weird for me, but I will mention that I haven't seen this type of array deceleration anywhere.

I have recently been thinking about the difference between the two ways of defining an array:   int[] array int array[]   Is there a difference?


Wikipedia says a conservative vector field is a vector field that is the gradient of some function. For this vector field I think a potential function could be arctan(y/x), and thus every line integral of this vector field over a closed path is 0. As I calculated the line integrals directly, I found they were not 0. Then I checked if $\frac{\partial Q}{\partial x} = \frac{\partial P}{\partial y}$ and it turns out $\frac{\partial Q}{\partial x} \neq \frac{\partial P}{\partial y}$. Umm... why is that?

My question is really ''what is the definition of a conservative vector field''?  I've consulted 3 textbooks that all say a vector field $\vec{F}$ is conservative by definition if there exists a scalar potential $\phi$ such that $\nabla \phi = \vec{F}$. Then, they go on to talk about connected domains, path independence and the equality of mixed partials and how they are all related.   In particular, they emphasize that e.g. in $\mathbb{R}^2$ given $\vec{F} = \bigl<F_1,\,F_2\bigr>$, if $\frac{\partial F_1}{\partial y} = \frac{\partial F_2}{\partial x}$ on a simply-connected domain, then $\vec{F}$ is conservative on that domain.  However, without fail, all of them then offer the example of $\vec{F} = \bigl< \frac{-y}{x^2+y^2},\, \frac{x}{x^2+y^2} \bigr>$, pointing out:   it's line integral is not path independent, even though $\frac{\partial F_1}{\partial y} = \frac{\partial F_2}{\partial x}$   and this is explained by pointing out that the domain is not simply connected (if the path contains the origin).  That much makes sense to me: we cannot conclude $\vec{F}$ is conservative based on the partial derivatives, because the domain is not simply connected - totally consistent with what has been presented.  What none of them address is why $\vec{F} = \bigl< \frac{-y}{x^2+y^2},\, \frac{x}{x^2+y^2} \bigr>$ is not conservative when there exists a potential $\phi = \arctan(y/x)$ such that $\nabla \phi = \vec{F}$. None of the texts mention any necessary conditions on the scalar potential. So is the existence of a scalar potential the definition of a vector field being conservative or not?


I am confused by the last line in the proof that $\mathbb{P}^1$ is not affine, as presented in Ravi Vakil's algebraic geometry notes. First, he computes the ring of global sections. It turns out that $\Gamma(\mathbb{P}^1,\mathcal{O}_{\mathbb{P}^1})=k$. This is all fine. What confuses me is the next line. He says: "If $\mathbb{P}^1$ were affine, then it would be $\operatorname{Spec}\Gamma(\mathbb{P}^1,\mathcal{O}_{\mathbb{P}^1})=\operatorname{Spec}k$, i.e., one point. But it isn't -- it has lots of point." I don't know what to make of that sentence. In the second equality, isn't he just taking $\operatorname{Spec}$ of both sides of the first equality? If so, what does this have anything to do with assuming $\mathbb{P}^1$ is affine? Further, why do we know $\operatorname{Spec}\Gamma(\mathbb{P}^1,\mathcal{O}_{\mathbb{P}^1})$ should have "lots of points"? In short, what am I missing here? Edit: The question linked does not answer my question. I am asking about a specific line in this proof given by Vakil. The linked questions only asks why $\mathbb{P}^1$ is not affine in general. Further, none of the given answers there address my concern. The chosen answer uses dimension theory, which is clearly not what Vakil had in mind since dimension theory hasn't been discussed yet

I read a prove that the projective space $\mathbb P_{R}^{n}$ is not affine (n>0): (Remark 3.14 p72 Algebraic Geometry I by Wedhorn,Gortz).  It said that the canonical ring homomorphism $R$ to $\Gamma(\mathbb P_{R}^{n}, \mathcal{O}_{\mathbb P_{R}^{n}})$ is an isomorphism. This implies that for n>0 the scheme $\mathbb P_{R}^{n}$ is not affine, since otherwise $\mathbb P_{R}^{n}=Spec R$.  I am not clear about why is it impossible to have $\mathbb P_{R}^{n}=Spec R$? And is what sense does the $=$ mean here?


I am curious to know about this phenomena.

I was watching  today, and noticed this: in some moment the space station changed orbit and the people inside experienced zero-gravity. At that moment, a candlestick passed floating in the air, with the candles burning ().   But in our environment the flames go upward because the hot air is less dense, and that effect should disappear when no gravity is present, am I right? How would a candle flame look then?


I have over 3k reputation on stackoverflow. I have edited few questions but i never got any reputation from it. Is there any restriction on who gets the reputation from edit?

Possible Duplicate:          I have edited a few posts today and the edits got accepted. But, I did not gain any reputation.   What could be the reason?


I have two layers: first layer includes polygons of districts, second layer containts points (phytocoenological relevées).  The goal is to create a new layer that will contain max 3 randomly selected phytocoenological relevées belonging to one district area (now, particular district contain 0-16 relevées).  I went through all QGIS vector selection tools but was not successfull in it..

I have a polygon layer (where each feature has a class attribute), and a point layer, and there are at least 10 points within each feature of the polygon. Is there a way to randomly select only "k" points of these 10 points for each feature (class) in QGIS?  Thanks!


What are the mathematical and physics prerequisites for studying quantum field theory?

I'm interested in reading Dr. Peter Woit's article, Quantum field theory and representation theory: a sketch .  What math and physics background would be needed?  (A list of topics from the two fields would be more than sufficient.)  With great appreciation and regards.


How many solutions are there in $\mathbb{N}\times \mathbb{N}$ to the equation $\dfrac{1}{x} + \dfrac{1}{y} = \dfrac{1}{1995}$ ? I could solve till I got to the point where $1995^2$ is equal to the product of two variables but I couldn't sort out the pairs of factors solving the equation. Help is greatly appreciated.

I have a question about the following problem from a Putnam review:  Let $n\in \mathbb{N}$. Find how many pairs of natural numbers $(x, y)\in \mathbb{N}\times \mathbb{N}$ solve $$ \frac{xy}{x+y}=n. $$  I have found some solutions for all $n$, such as $(2n, 2n)$ and $(n+1, n(n+1))$, but I feel as though this is the wrong approach, as the question is only asking for the number of solutions to the equation.  I don't really want a complete solution, but any hints would be greatly appreciated.


I need to explain to someone why it's grammatically incorrect to use "artifacts reduction" as opposed to "artifact reduction." Can anyone help with an explanation?

Sorry for the title, it is not very evident and intuitive but I really do not how to tell it better...  Well, you know, several times, or better, many times, we use this form:  If I want to say:      "development of special weapons was   the first point in Hitler's   program..."   I will say this (a better form):      "special weapon development was..."   OK...  is it      "special weapon development"   or      "special weapons development" (note   the plural...)   what's the grammar rule in order to understand how to use this very used form?


Solve the recurrence relation: $$a_n = 5a_{n-1} - 6a_{n-2} + 3$$ With initial conditions $a_1 = \frac{3}{2}$ and $a_2 = 3$  I tried solving it with roots but I get a third degree polynomial with irrational roots and I'm sure that method isn't working.  Can someone help?

I need help solving the recurrent relation:  a(n) = 5a(n-1) – 6a(n-2) + 3 for n > 2 (n represents what # of a, it isn't another variable)  with initial conditions a(1) = 3/2, a(2) = 3  I started by solving the next few values: a(3) = 9, a(4) = 30, a(5) = 99, a(6) = 318  But I'm having difficulty trying to think of an equation that is equivalent to the original but can only use the value n oppose to a(n).


I'm a student at a large university, and recently had an especially hard semester due to a family emergency. I withdrew from two classes, and the only reason I didn't have to withdraw altogether was because of some very understanding faculty members in my department.   My department adviser, after realizing that I probably wouldn't be able to go to all of my professors explaining this issue and begging for extended deadlines without breaking down, emailed all of them herself and basically bought me a couple of weeks to pull myself together. One of my professors went above and beyond and gave me "indefinite deadlines" (i.e. whenever I feel like turning it in) for all of his class assignments. My grade for his class is made up of three essays, and, even though there's only a month left in the semester, I've turned in none of them; every attempt I've made to approach him and apologize for all of the trouble I've caused him has been casually waved away.   So, my question is: what's an appropriate thank you for everything they've done for me? I've tried to end every meeting I've had each of with them by thanking them, but they always seem a bit embarrassed and wave me off (they're both pretty reserved people). Knowing that they're embarrassed by even my little attempts to thank them, I'm not sure if they'd like me getting them a thank you card or a gift card. Also, scheduling an appointment with my adviser (that's the only way I'm able to see her) just to give her a thank you gift feels a bit weird. Any tips? Are my in-person "thank you's" enough, or should I try to get them something more? And, if a gift would be appropriate, is there any etiquette regarding how I get the gift to them?

As you might have seen from my history I had a very bad advisor who deliberately underpaid me, stole my research work and undermined my career at multiple phases.  Now I am done with my university and leaving next month. A professor in my department had been very supportive of me during these times, giving me advice on how to handle this situation, gave me recommendation letters to apply for PhD programs at other universities and also got me a internship. I just want to thank her for her help. I usually would have got a champagne or something but I know she doesn't drink alcohol. Any advice?


I want to write a query for the , but I'm not sure which language I need to learn in order to do so. At a glance it looks a bit like SQL, but I'm not entirely sure.  What language are SE Data Explorer queries written in?

Where can I find a syntax or language reference for the query language used on ?


Python rookie question, in the following code,how does batch_size passing into sub function eval_on_data ? Is it global variable?   epochs = 10  batch_size = 128  def eval_on_data(X, y, sess):     total_acc = 0     total_loss = 0     for offset in range(0, X.shape[0], batch_size):         end = offset + batch_size         X_batch = X[offset:end]         y_batch = y[offset:end]         loss, acc = sess.run([loss_op, accuracy_op], feed_dict={features: X_batch, labels: y_batch})         total_loss += (loss * X_batch.shape[0])         total_acc += (acc * X_batch.shape[0])     return total_loss/X.shape[0], total_acc/X.shape[0]     ...     val_loss, val_acc = eval_on_data(X_val, y_val, sess)

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I am not asking about the difference between array and list in general, I'm just asking about the difference between them in this scenario. I have one Array. The array index is a dynamic value, and I have one integer List. int DynamicValue=20 ;//It's any values should be coming from database or anywhere   int[DynamicValue] array1=new int[DynamicValue];//Array declaration  List<int> list1=New List<int>();//List declaration   Now I create one for loop to add values to Array and List: //First add values in array for(i=0;i<DynamicValue;i++) {   array1[i]=i; }  //Then add the values to list for(i=0;i<DynamicValue;i++) {   list1.Add(i); }   Now what is this difference between the above codes ? My questions are:  Array is type safe and also defined the index size. So why do many peoples like Lists in this scenario? (I know it's useful for generics coding, but I'm asking for this scenario) The array for loop is not accruing any boxing and unboxing, So why would we need List? Which for loop (Array or List) is best in this scenario ? Which for loop will give good performance (I think both of for loops are good, because this code does not attempt any boxing and unboxing and also this codes is type safe. But I'm not sure at this time which one is better) ?

MyClass[] array; List<MyClass> list;   What are the scenarios when one is preferable over the other? And why?


I just bought a house built in 1984 it has PEX plumbing. I need to remove a toilet to install a new floor and I noticed the water supply line to the toilet connects to a water shut off valve that I’ve never seen before. It looks like a PVC bonnet or nut cap thing With a half crescent ring that you turn left or right to turn the water on or off.   Are these reliable or should I replace with a quarter turn ball valve. I really don’t want to do anything unnecessary but a PVC shut off valve gives me anxiety as an inexperienced DIY homeowner


Given a credit card number and no additional information, what is the best way in PHP to determine whether or not it is a valid number?  Right now I need something that will work with American Express, Discover, MasterCard, and Visa, but it might be helpful if it will also work with other types.

I'm trying to figure out how to detect the type of credit card based purely on its number. Does anyone know of a definitive, reliable way to find this?


FileObserver works fine for the most part but sometimes the following exception occurs:  FileObserver: Unhandled exception occurs   When a new file is added to the folder the FileObserver observes. But this error does not occur every time a new file is added to the folder, but happens randomly, and I don't know how to fix it. I have attached the code to the FileObserver and the method that are using it.   (CallLatestReceiptData) just calls a different method which calls the addNewReceipt method with the file path of the new added file in the folder. Here is the code:  private void initializeFileObserver() {     observer = new FileObserver(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString() + "/" + "Receipt Manager" + "/") {         @Override         public void onEvent(int event, String file) {             switch (event) {                 case FileObserver.CREATE:                     callLatestReceiptData(file);                     Log.d(OBSERVER_LOG, "File created 1 [" + Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString() + file + "]");                     break;             }         }     };     observer.startWatching(); }  private void addNewReceipt(String path) {      Log.d(RECEIPT_SERVICE_LOG, "Called Database AddNewReceipt");     String picturePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString() + "/" + "Receipt Manager" + "/" + path;     Log.d(RECEIPT_SERVICE_LOG, "Set PicturePath AddNewReceipt");     Log.d(RECEIPT_SERVICE_LOG, picturePath);      Bitmap rotatedBitmap = createRotateAndScaleBitmap(picturePath);     Log.d(RECEIPT_SERVICE_LOG, "Rotated Bitmap AddNewReceipt");     byte[] byteArrayPicture = convertBitmapToByteArray(rotatedBitmap);     Log.d(RECEIPT_SERVICE_LOG, "Rotated Bitmap AddNewReceipt");      String date = picturePath.replace(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString() + "/" + "Receipt Manager" + "/", "").replace(".jpg", "");     Log.d(RECEIPT_SERVICE_LOG, "Set Date AddNewReceipt");     final Receipts receipts = new Receipts("", "", date, "", "", 0, byteArrayPicture, 1);     Log.d(RECEIPT_SERVICE_LOG, "Created New Receipt AddNewReceipt");      receiptDatabase.daoAccessReceipt().insertOnlySingleReceipt(receipts);     Log.d(RECEIPT_SERVICE_LOG, "Inserted In Database AddNewReceipt");     fetchReceiptData(receipts);     Log.d(RECEIPT_SERVICE_LOG, "Fetch Data To List AddNewReceipt");      isDone = true;     Log.d(RECEIPT_SERVICE_LOG, "ISDONE IS TRUE - ADD_NEW_RECEIPT"); }     private Bitmap createRotateAndScaleBitmap(String filePath) {      Matrix matrix = new Matrix();     Log.d(RECEIPT_SERVICE_LOG, "Matrix Called");     matrix.postRotate(90);     Log.d(RECEIPT_SERVICE_LOG, "Matrix Rotated");     Bitmap receiptBitmap = BitmapFactory.decodeFile(filePath);     Log.d(RECEIPT_SERVICE_LOG, "File Decoded");     Bitmap scaledBitmap = Bitmap.createScaledBitmap(receiptBitmap, 1280, 960, false);     Log.d(RECEIPT_SERVICE_LOG, "Bitmap Scaled");     Bitmap rotatedBitmap = Bitmap.createBitmap(scaledBitmap, 0, 0, scaledBitmap.getWidth(), scaledBitmap.getHeight(), matrix, false);     Log.d(RECEIPT_SERVICE_LOG, "Bitmap Rotated");      return rotatedBitmap; }

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


I've got an old mac mini A1103, without airport, running on Mac OSX 10.5.8 I decided to install Ubuntu but I can't. Could anyone help me? Which is the proper version for my mac?  my system:  1.25 Ghz PowerPC G4 512 Mb DDR SDRAM 37 Gb hard drive

My Mac mini doesn't have sufficient hardware for Ubuntu 11.04 (specifically Unity I think), and so I have to use the classic environment, which is fine, but it seems to run slower on 11.04 (I'm upgrading now to 11.10).  However, I heard  that if it runs slow I should use Xubuntu or Lubuntu.   So my question is:    What is the best way to upgrade from Ubuntu 11.10 to Xubuntu or Lubuntu and which one would be better for a late 2005 model Mac Mini PPC?


I want to echo html code with dots:  echo '
…
' . "\n";   But I get
���
   How can I solve this problem?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


How does one prove by induction that  $n! > n^2$  for $n \geq 4$

How can I show that $n^2<n!$ for all $n\geq 4$ Step 1 For $n=1$, the LHS=$4^2=16$ and RHS=$4!=24$. So LHS$<$ RHS. Step 2 Suppose the result be true for $n=k$  i.e., $k^2<k!$ Step 3 For $n=k+1$ $(k+1)^2=k^2+2k+1$ What will be the next step?


I want to mount /usr directory on different partition and keep the same owner on all files and subdirectories in /usr directory.  I want to mention that this issue is for linux ec2 machine where I can't enter to the single-user runlevel.  Is it possible?

I have a / partition which contains /var and is too small. I have another existing partition with enough space.  Here is my df:  File system          Size. Occ. Avai. %Ful. Monté sur /dev/sda1             5,0G  4,5G  289M  95% / tmpfs                 242M     0  242M   0% /lib/init/rw udev                   10M  2,7M  7,4M  27% /dev tmpfs                 242M     0  242M   0% /dev/shm /dev/sda2              15G  406M   14G   3% /home   How can I move the /var folder from sda1 to sda2 ?


So, this is my Android MainActivity, but specifically this code:  public void checkUser(View view) {     // Next Activity to move on to     Intent intentSuccess = new Intent(this, Home.class);     Intent intentFail = new Intent(this, LoginFailActivity.class);      EditText usernameText = (EditText) findViewById(R.id.user_field);     String username = usernameText.getText().toString();      EditText passwordText = (EditText) findViewById(R.id.pword_field);     String password = passwordText.getText().toString();      if (username == "admin" && password == "password") {         startActivity(intentSuccess);     } else {         startActivity(intentFail);     } }   Even when I type in "admin" and "password" it goes to intentFail every time. I have checked with a test activity and it properly passes the strings to it without issue.  Please help me and thank you in advance!!

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


I'm running an embedded poky linux (linux-yocto v3.13) on a beagleboard. However, I'm having trouble when logging in over a serial using PuTTY: the terminal does not resize at all. Usually, the terminal resizes automatically when the PuTTY windows is resized. Not so in my case. The terminal stays at 80x24.  dmesg says  [    0.000000] Console: colour dummy device 80x30   at the beginning. However, when I start e.g. nano right after boot, it's actually 80x24.  When I do  stty columns 200 stty rows 50 reset   manually, the terminal still stays at 80x24. However, the stty changes do carry over when using a program, e.g. nano. So nano will be the correct size (200x50), but the actual terminal will stay small.  SET yields (even after the stty commands above!)  COLUMNS=80 LINES=24 PS1='\u@\h:\w\$ '   Now, I wouldn't have a problem with 80 columns per sé. However, long commands don't wrap to the next line, they just overwrite the beginning of the current line for some reason.  opqrstuvwxyzabcdefghijkl^Cmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmn   I googled far and wide and the only "answers" that came up had to do with PS1 containing stray color codes that throw off the width calculation. However, that's not the case here.  I'd much appreciate some help in this matter, as I'm losing my sanity over this...

When using the serial console of my system I always end up with $COLUMNS=80 and $LINES=24.  While I can change these variables manually it is somewhat annoying to do this any time when the client side terminal window has been resized.  Usually I'm connecting to the console using screen /dev/mytty baudrate.  Changing the $TERM environment variable to "screen" or "xterm" does not help.  Will I need to call getty with some of those instead of vt100?  Needless to say that all of this works fine, when I connect to the same machine using ssh.


So, on my HP650 i have internal HDD on which i have windows 10. I installed Ubuntu 18.04. on external HDD which is connected via USB.  The problem is that GRUB menu doesn't show up at start, so I can't choose which OS to run, it goes to windows. Only way i can boot Ubuntu is manually, by pressing esc during startup, entering boot device options, and selecting Ubuntu.    These are boot options and boot order in bios   I also tried changing boot order in Ubuntu terminal with no luck.  I disabled fast startup in windows.   Any ideas?

I have installed Ubuntu 15.10 alongside Windows 10 with UEFI. To install Ubuntu, I chose the option install alongside Windows 10 or something similar to this. Then I created a new partition for Ubuntu and installed it. After installation, the boot menu did not show up. Initially I thought Ubuntu has not been installed, but when I plugged in the USB drive and wanted to install Ubuntu I saw an option of reinstalling Ubuntu on my machine. So, I found out that Ubuntu is installed. Pressing F8 and F12 also does not help. Can anyone help me bring up the GRUB boot menu? In Windows, I also entered the command bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi in cmd, but still the boot menu does not show up.  Reply (Himanshu) : Just boot in bios and, if you can, add boot option with name say ubuntu and path EFI/ubuntu/shimx64.efi. No need for live PCB or anything. Move the boot option to top. This is for dell GUI bios but I assume it works for all. Or you may want to see  or , where you can enable Windows Boot Loader for one boot or forever as you wish, and boot Ubuntu from it. If you want now, you can use the installed Ubuntu terminal to use the commands update-grub to use GRUB instead. (Not enough reputation to answer properly btw.)


I have a trigger which create sharing when a record is created and delete sharings when records are deleted. My problem is that I would like the request for the sharing to be basic and work when multiple records are deleted. What i have now:         List<AssignedResource> listAR = aRSel.selectUsersAndAccountFromServiceAppointments(setIdSAToRemoveSharing);         Set<Id> setUserId = new Set<Id>();         Set<Id> setAccountId = new Set<Id>();         for(AssignedResource ar : listAR){             setUserId.add(ar.ServiceResource.RelatedRecordId);             setAccountId.add(ar.ServiceAppointment.AccountId);         }          List<AccountShare> accShare = [select Id from AccountShare where UserOrGroupId in: setUserId AND AccountId in: setAccountId];         delete accShare;  My problem with the request for accShare is that it wont work the way it should if I delete multiple AssignedRessource (The object which will trigger the deletion of the sharing). It will delete more due to the double IN that i use in my request. E.G : Let's say I have: Record1 (R1) linked to Account1(A1) and User1(U1) Record2 (R2) linked to Account2(A2) and User2(U2) Record3 (R3) linked to Account2(A1) and User2(U2) If i delete R1 and R2. R3 will be deleted aswell and that I don't want. So is there a way to either add a field to the AccountShare Object so i can make a formula to have a field which is the pair I want to delete and request over that field ? Is there any other solution to have multiples IN in an SOQL statement without those taking too much records? In advance thank you.

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag. This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it. I have a collection of records, like a List<sObject> or the Trigger.new context variable. I need to query other records that are related to these records either directly or indirectly, and I want to use the related data to make further updates. When I write a query in a loop, like for (Account a : Trigger.new) {     Account parent = [SELECT Name FROM Account WHERE Id = :a.ParentId];     // ... }  I keep hitting Salesforce query limits, and I know this is not best practice. What can I do to avoid this problem and bulkify my code?


The title sums it up. I upgraded to full frame and when I reused my canon 100D I realized that I just could not see clearly through the viewfinder. Everything is blurry, even the parameters, even when the focus is clearly made on an object. The focus is clear however using live view.  I see well, on my 6D it is great but on the 100D it is very frustrating to just see everything blurry. Could it be something with the apparatus? (Else I suppose I will have to blame my eyes and the comfort of the bigger body's viewfinder)  Thank you for your answers

The viewfinder on my camera has diopter correction, but is there a "correct" way to set it up? In the past I've just allowed the camera to auto-focus on a distant point, and then make sure that is as sharp as possible, but this seems to be prone to error, and reliant on the auto focus of the lens. Is there a better way?


I recently installed Ubuntu 12.04 LTS on my system dual boot with XP . My computer teacher at school used to tell that if a linux system is shutdown repeatedly it corrupts. I wanted to know that does same thing happen when it is done in ubuntu. Thank you.

My company is considering the use of Ubuntu as an OS for use on a hardware device.     It would be installed on compact flash drive - apparently this is not standard flash drive but a specific type of memory that is supposed to "cope" with immediate power shutdown (I am not sure how this is achieved but they are supposedly a "high end" card).    The units that would be run using Ubuntu are the type of units that will not be gracefully shutdown - the power cable would be removed and that is that.     Can anybody give me some advice on the potential problems that can occur? Is Ubuntu a good system that can deal with this kind of power outage and reboot successfully on next startup?     I realise that nothing is unbreakable, but is it a commonly used OS for an embedded setup? Is it asking for trouble to use Ubuntu in this kind of environment?


I want to write a remark in parenthesis between an indefinite article and the rest of the subject. If I didn't write this clarification then using the "a" article would be correct; however for the clarification alone "an" should be used. Which one of the following examples is correct? Both sound weird to my ears.  This experiment used an (arguably small) set of data. This experiment used a (arguably small) set of data.

When a/an precedes a parenthetical aside (sometimes seen in informal/conversational writing), should the vowel rule depend on the first word in parentheses, or the next word in the "regular" flow of the sentence?     I need a (memorable) idiom (preceding an m word; use a)   or     I need an (memorable) idiom (preceding an i word; use an)


I've been transitioning to Ubuntu for the last year and have my main PC running Ubuntu as the only OS now.   My issue is that I will going on the road for 2 months and taking my desktop PC with me is obviously not an option.   I have a laptop that I'm happy to wipe. Is it feasible to take an image of my desktop PC before I leave and transfer it to this laptop when I leave (and then when I return to reverse the process and put my laptop's image back onto my desktop PC?  I'm looking to transfer all directories such as /etc (for apache/phpmyadmin for example) as well as /home.

I am going to change my machine: from a laptop with Ubuntu to another laptop where I am going to install Ubuntu...  I am quite happy with the current system, what I am afraid of is having to rebuild everything from 0.  So what do people often do to clone an Ubuntu system? That may include the data, packages, shortcut settings, etc...


I want to solve $$\int_{-\infty}^{\infty} \frac{e^{x/7}}{1+e^{x}}dx$$ using Cauchy's Residue Theorem, but according to Wolfram Alpha there's a total of 7 simple poles for this equation. I rewrite this as $$\int_{-\infty}^{\infty} \frac{e^{z/7}}{1+e^{z}}dz$$ and want to find residues using $$Res(f, c) = \lim_{z\to c}(z - c)f(z)$$ along with L'Hopital's Rule but I'm not getting the correct numbers. Also, is it really necessary to use all the residues from all the poles in the end for Cauchy's Residue Theorem? I apologize if this is trivial but I'm unable to find the correct answer. I'd really appreciate a simple walk through of the process. Thank you!

I am trying to evaluate the following:  $\displaystyle \int_{0}^{\infty} \frac{1}{1+x^a}dx$, where $a>1$ and $a \in \mathbb{R}$  Any help will be much appreciated.


I can get background image by doing   $('#item').css('background-image').   but the result is url('www.example.com/something/123.png')  How can get get only the 123 value? I can't use string position because the value of the img name doesn't' necessary is 3 characters.

I have this string  'john smith~123 Street~Apt 4~New York~NY~12345'   Using JavaScript, what is the fastest way to parse this into  var name = "john smith"; var street= "123 Street"; //etc...


I have dual booted my system Windows 10 and Ubuntu 16.04. Ubuntu 16.04 is installed on a different partition of my disk. I want to reinstall the same Ubuntu in the same partition. I want to have only Ubuntu 16.04 on my system not its data that I have stored in it.

I was experiencing problems with Ubuntu Desktop like missing and broken system packages, missing Unity package and other problems. So I decided that the best solution (without touching Windows files) is just to reinstall Ubuntu.  I looked everywhere and found the way but got confused as some say that I supposed to choose "Erase Ubuntu and reinstall", others say that I supposed to choose "Something else" and just select it manually while installation. I thought the first option would be better and just safer as I don’t want any of Windows files to be touched but it says that it has a bug that erases all other partitions...   Current Ubuntu version: 17.04 desktop 32bit will be replaced with 16.04.0 desktop 32bit (as 32bit 17.04 version is no longer available)   What’s the safer option to choose? And if the second one is, how to make sure it’s Ubuntu partition?


I am beginner in machine learning and I came across these terms while going through code of cnn, I want to know how to what exactly they mean and other question is that when the weights of network change? after each batch size or after every epoch? Thank you.

I'm using Python Keras package for neural network. This is the . Is batch_size equals to number of test samples? From Wikipedia we have  information:     However, in other cases, evaluating the sum-gradient may require   expensive evaluations of the gradients from all summand functions.   When the training set is enormous and no simple formulas exist,   evaluating the sums of gradients becomes very expensive, because   evaluating the gradient requires evaluating all the summand functions'   gradients. To economize on the computational cost at every iteration,   stochastic gradient descent samples a subset of summand functions at   every step. This is very effective in the case of large-scale machine   learning problems.   Above information is describing test data? Is this same as batch_size in keras (Number of samples per gradient update)?


I have catchment areas as polygons in a GIS layer. They were derived from two different sources (coded as "ws" and "dr" in a separate column named "use"). It's good to have these two sources as they complementing each other. However sometimes they overlap "too much": I want to exclude the "dr"-polygons that overlap (with the "ws" ones) with more than 70% (area). In any way I am want to keep the "ws"-polygons.  If "dr" and "ws" were two different tables I'd query as follows:   SELECT * FROM table.ws w JOIN table.dr d ON ST_Intersects(w.geom, d.geom) WHERE ST_Area(ST_Intersection(w.geom, d.geom) / ST_Area(w.geom) > 0.7;   However in my case ALL the polygons are in the same table only distinguishable by the "use"-column.  Any ideas how to do this? The data lies on a PostgreSQL DB and I access it mostly through PostGIS commands in R.

I have a table of polygons (census block groups) in Postgres. I want to tag each block group with the town (another polygon table) it mainly resides within. Is this possible? I'm thinking I'd need to essentially create something like: select b.*, t.name   from blockgroups b, towns t   where (st_area(st_intersection(b.wkb_geometry, t.wkb_geometry))/st_area(b.wkb_geometry)) > .5    but this query is taking forever (I've got about 5,000 block groups and 375 towns...). Any suggestions on how to make this query work either at all if it's incorrect, or faster if it is correct?


How could I show that a normal subgroup of a normal subgroup of a group is not always a normal subgroup of a group?  Here is what I did. I know the Algebra system GAP, so I wrote the following function:  performTheProve:= function()     local g, gDash, AFour, NormalOfAFour, NormalK;     AFour:=AlternatingGroup(4);     NormalOfAFour:=NormalSubgroups(AFour);     for g in  NormalOfAFour do         for gDash in NormalSubgroups(g) do             if(not gDash in NormalOfAFour) then                 return [gDash, g];             fi;                  od;     od; end;    This function produces the following result:  [ Group([ (1,2)(3,4) ]), Group([ (1,3)(2,4), (1,2)(3,4) ]) ]   So, now I am stating that the Group([ (1,3)(2,4), (1,2)(3,4) ]) is a normal subgroup of a ${A}_{4}$, Group([ (1,2)(3,4) ]) is a normal subgroup of a Group([ (1,3)(2,4), (1,2)(3,4) ]) and not a normal subgroup of a ${A}_{4}$.  Given this example I am proving that normal subgroup of a normal subgroup of a group is not always a normal subgroup of a group. Am I right?

Suppose $G$ is a group and $K\lhd H\lhd G$ are normal subgroups of $G$. Is $K$ a normal subgroup of $G$, i.e. $K\lhd G$? If not, what extra conditions on $G$ or $H$ make this possible?  Applying the definitions, we know $\{ghg^{-1}\mid h\in H\}=H$ and $\{hkh^{-1}\mid k\in K\}=K$, and want $\{gkg^{-1}\mid k\in K\}=K$. Clearly, the best avenue for a counterexample is if $gkg^{-1}\not\in K$ for some $k\in K$ and $g\in G-H$.  If no such element exists, $\{gkg^{-1}\mid k\in K\}\subseteq K$ implies $\{gkg^{-1}\mid k\in K\}=K$ because if $k'\in K$, $gk'g^{-1}=k\in K\Rightarrow k'=g^{-1}kg\in\{gkg^{-1}\mid k\in K\}$.


Is there a way to monitor the amount of processing power used in a program in Python?  My goal is to kill a program if someone is using too much power while connecting to my server in case of malicious intent.

What's your preferred way of getting current system status (current CPU, RAM, free disk space, etc.) in Python? Bonus points for *nix and Windows platforms.  There seems to be a few possible ways of extracting that from my search:   Using a library such as  (that currently seems not actively developed and not supported on multiple platform) or something like  (again no activity since 2007 it seems and no support for Windows). Using platform specific code such as using a os.popen("ps") or similar for the *nix systems and MEMORYSTATUS in ctypes.windll.kernel32 (see ) for the Windows platform. One could put a Python class together with all those code snippets.   It's not that those methods are bad but is there already a well-supported, multi-platform way of doing the same thing?


I know that $\mathbb{R}[x]$ is a PID. I have proven that all the ideals of the form $I=(x)$ are maximals ($\mathbb{R}[x]/(x)$ is isomorph to $\mathbb{R}$ which is a field. As a result I is maximal). I also proved that if $f(x)\in\mathbb{R}[x]$ is ireducable then $\mathbb{R}[x]/f(x)$ is isomorph to $\mathbb{C}$ which is a field, so $<f(x)>$ is maximal. Are those the only maximals ideals? How can I prove it? Are there any other prime ideals that are not maximals?

Find all the maximal ideals in the ring $\mathbb{R}[x]$.   My work:  If $M$ is maximal, then $\mathbb{R}[x]/M$ is a field. Then if $M$ is of the form $(p(x))$ then $p(x)$ must be irreducible. So the principal ideals generated by irreducible polynomials in $\mathbb{R}[x]$ are maximal in $\mathbb{R}[x]$.  But $\mathbb{R}[x]$ is not a PID. Hence, there are ideals which are not principal. So how can I find all maximal ideals? Can anyone please help me to find it?


Currently I've got this trio configured, but I would like to have one solution, because configuring those 3 separately is a head ache time to time. First add service to monit, then to nagios and after that to snmpd processes and cacti.  So is there something combining functionality of Cacti, Nagios and Monit provided not as SaaS?  Thank you.

For a more comprehensive list of monitoring tools and their features, check out .   As the question states, what are the most commonly used tools used for this task and what are their strengths and weaknesses?


If $p$ is a prime, then $(p-1)! \equiv -1 (mod p)$. Hint: $(p-1)!$ is the product of elements in $Z_p$. Match each element to its inverse.  I can understand by testing some primes that for any prime $(p-1)!+1$ is a multiple of that prime, but I'm not sure how to prove it in general or how inverses play into it.

How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks.


Please I need some help. Here is a scenario. I want to host my own openvpn server. I bought a raspberry pi 4 model B 8gb. I will be installing an ubuntu server on it, and OpenVPN server on it. My internet speed is 100mbp down and 20mbp upload. The goal is to have like 20 concurrent clients connected. I know that each of them will be streaming ressources form the internet, but they need to go through my vpn server. Can someone please tell me what can happen? I mean, will they be able to stream without any latency? I can't install vpn server on a data center like google cloud, aws etc... because I already tried, the website found out the users were connecting through a vpn service.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I am a frequent Minecraft player and I'd like to create a 1.3.2 Minecraft server as a tribute to the old days, but I'm not sure where to find a 1.3.2 version. I tried mcversions.com, but you have to pay money to have a server through there, which is not what I am trying to do. Thanks.

So me and my friends manged to make a server in Minecraft for us to play on and we would like to add mods. But the mods we want to add are a few versions lower than the updated version. Is there any way of making a server with a lower version of Minecraft that people can still play on?


I am trying to learn classical mechanics for continuous systems. Goldstein contains only one chapter on it. Is that chapter sufficient or is there more to the subject? If yes, what are some good books to learn the same?

I'm wondering what some standard, modern references might be for continuum mechanics.  I imagine most references are probably more used by mechanical engineers than physicists but it's still a classical mechanics question.   This came up in a conversation with my father (who is a mechanical engineer).  I was curious to see the types of mathematics they use in stress analysis.  Complex analysis gets used to study 2-dimensional isotropic material here:     N.I. Muskhelishvili. Some basic problems of the mathematical theory of elasticity.    3rd edition, Moscow-Leningrad. 1949. (Translated by J. R. M. Radok. Noordhoff. 1953.)    but that's quite an old reference and my library does not have it.  Any favourite more modern and easy-to-find references?   I'm fine with mathematical sophistication (I'm a mathematician) but I'm not particularly seeking it out.  I'm looking for the kind of references that would be valued by physicists and engineers.  References "for math types" are fine too but that's not really what I'm after.


I have tried everything, and it just trous put errors. How can I fix it?

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


Once when I was having a hard time a guy said to me, "I'm sorry you're having a hard time, I'll pray for you," in a way that made it clear that he was glad I was having a hard time because it gave him the opportunity to pray for me and feel good about himself.   I am interested in this phenomenon but also the much more general (probably universal) phenomenon of human beings finding justification for things they want to do, often by lying to themselves about the utility of the behavior to other people.  The best single word I can think of for this is contrived, but it is not close to precise. Similarly, dissembling, insincere, and so on don't really cut it.   I also looked at this  but was unable to find one that expressed this idea.   Is there a single word for this? If not, a short phrase?

There are many examples of this, and I'd like to give a few:   A person who puts a lot of effort to help the community and earns reputation points. But that reputation is the motivation behind helping the community, not because they really want to. A student approaches a professor, and helps them in their teaching and doing research in order to have a good LOR (letter of recommendation). To a SEO, the content of the website must be good (well, this one is a little tricky, but you get the spirit.)   I'm not saying that the reputation/LOR/high-ranked is not deserved. It is. I just want to focus more on the selfish reason(s) behind that.  Any kind of answer can be accepted: single word, phrase, proverb or idiom.


So I'm doing a Minecraft animation and everything was fine and I was rendering and then I check on it and see that half the renders are pink and my characters skins are gone I'm just wondering if anyone knows whats going on and how to fix it (I use Mcprep for textures, I used Mineways for the world and I used the black plasma studios rig)

I made a character, and its one of my first times texturing, and I saved my character into a new folder, and when I came back to the model ALL the textures were pink, I used to know what to do, but I stopped texturing, how do I bring my textures back?


so sorry for the wired title, i could not explain the problem in few words in the title. I am very new in javascript i have a problem.   I have a title for users that should be replaced by few text input (first name, last name ... ) when user add the data, the title change automatically. Then, an edit button appear under the title.  In my code, when user click on the edit button, the text inputs appear again to change the data. The problem is, the edit button, only works in the first time. And then we save the data again, the edit button does not works anymore.   as i know, when new data have been entered, the server change the title with html. The new title that contains the entered data have edit button as well, the new edit button that comes with the new title, does not work with the codes.  here is the code for the edit button:  events(){  $(".js-edit-name").on("click", this.openEditor.bind(this));  }  openEditor(){ this.body.find(".form-input, .form-submit").show("slow"); this.body.find(".form-block").removeClass("hidden"); this.body.find(".js-edit-name").addClass("hidden"); this.body.find(".js-cancel-name").removeClass("hidden"); }   here is the code for the edit button:
 <svg class="svg-inline--fa fa-pencil-alt fa-w-16" aria-hidden="true"  data-prefix="fas" data-icon="pencil-alt" role="img"   xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg>…. </svg>  " edit"     I hope i explain the problem clearly. Could anyone help me.  Thanks a lot

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


I've an issue with an obj file. Importing this file in blender:  the mesh not appear. Only by rotating and zooming-out something apperas, but not the whole geometry.  With other CAD and obj viewer the mesh is displayed correctly. What's wrong?  Thanks!

I try to import .obj files from this project:  - the files contain Polygon Mesh Data.  When I import the obj file into blender, the outliner shows a new mesh added, but nothing is visible in the 3D viewport:      Any help will be appreciated.


I know that nobody likes duplicate questions, but I haven't found my answer on any of the other questions with this topic.  I built a computer with a  (made by Gigabyte).  It supposedly has 512 CUDA cores.  I followed  tutorial, (which enabled the Nvidia proprietary drivers) and was able to enable dual monitors and all the desktop graphics that are needed.  Unfortunetly, the GPU processing option still doesn't show up in Blender.  I've tried installing nvidia-cuda-toolkit, and that didn't make a difference.  I also tried to update my drivers from nvidia-346 to nvidia-349, and this had no apparent effect either.  What can I do to enable GPU rendering?  (I've tried both blender installed and just downloaded from the site).

I want to enable GPU rendering, but there is no option in User Preferences > System:    Why is this? How can I get cycles to render using my GPU?


I have two update statements. Both of them gives the same output. How they are different and which is better to use?  Statement 1:  UPDATE li SET li.Description = im.Description FROM tbSupplierLineItem li JOIN tbIMPACArchieveNew im ON li.ItemId = im.CommomCode  WHERE li.ProcessedDate >= CONVERT(DATE,GETDATE())   Statement 2:  UPDATE li SET li.Description = im.Description FROM tbSupplierLineItem li JOIN tbIMPACArchieveNew im ON li.ItemId = im.CommomCode  AND li.ProcessedDate >= CONVERT(DATE,GETDATE())

After reading it, this is not a duplicate of . The answer may be related (or even the same) but the question is different.    What is the difference and what should go in each?  If I understand the theory correctly, the query optimizer should be able to use both interchangeably.


When reviewing reopen votes, when you click "Leave closed", it will prompt you with "Nominate this question for reopening?", causing a bit of confusion.

This is rather difficult to describe with fancy pictures with red circles but it's easily reproducible.  Whenever I click Leave Closed in the re-open queue on MSO the "nominate this question for re-opening" pop-up appears. I normally press escape out of shock and a leave closed vote is recorded.  This is the latest review it's happened to me on:   You can also test it on , I clicked reopen this time and a leave closed vote was recorded but I also got a red popup stating that an error had occurred.  This is also occurring when the Edit & Reopen button is clicked, the edit box opens for a second before being overridden by the popup.


I'm running into an issue with my code and I can't figure out what's wrong.  Basically the project I'm working on wants me to use static methods to perform a few different tasks using arrays.  What I'm stuck on now, specifically, is printing my array.  The first thing I had to do was ask the user for the size of their array, and then have them input the data. After, I'm supposed to take the minimum value and maximum value, and then swap them.  I'm pretty sure my  code it right, but when I call the method I'm running into an error. This is what I have so far and I keep getting an error on lines 42 (beginning of swap method), 66 and 69:  public class ArraysStaticMethods {     static int[] array;     static public int arraySize;     static public int max;     static public int min;      //will create an array with user's input     private static int[] readInputs(int arraySize){         Scanner keyboard = new Scanner(System.in);          System.out.print("Enter the length of your array:  ");         arraySize = keyboard.nextInt();         array = new int[arraySize];          for (int i = 0; i <= array.length - 1; i++) {         System.out.print("Enter an integer: ");             int num = keyboard.nextInt();             array[i] = num;         }            //to test         System.out.println("Your array before:");         System.out.println(Arrays.toString(array));          return array;     }      //finds index of max and min values and swaps them     public static int[] swap(int[] array){         max = array[0];         min = array[0];         int maxIndex = 0;         int minIndex = 0;         for(int index = 1; index < array.length; index++){             if (array[index] > max){                 max = array[index];                 maxIndex = index;             }              if (array[index]<min) {                 min = array[index];                 minIndex = index;             }         }         array[maxIndex] = min;         array[minIndex] = max;          System.out.println("Your array after:");         System.out.println(Arrays.toString(array));         return array;     }      public static void displayOutputs(){         readInputs(arraySize);         swap(array);     }      public static void main(String[] args) {         displayOutputs();     } }

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?


When I post the link to a Stack Overflow question in this question, the name of the link is converted to the title of the question:    When I post the same link in a comment (as shown below), it is displayed as a bare URL, which makes it harder to read.  Automatically including the name of the question makes these links easier to read, but it appears that links in comments don't automatically display the question's title. The readability of these links would be much improved if the names of the questions were automatically generated.

In questions, links get converted into question titles (see )  Can the same functionality be added to comments?


I have this problem of long exposure in harsh light. This in a lake side where I wanted to get that silky movement of water with a stone in foreground. However, since the daylight was harsh my images were over exposed and much of the details were lost. How should I get that silky look of water with long exposure in a harsh daylight?

Can anyone offer any tips on achieving long exposures (with the intention of blurring water, clouds etc)?


I tried to follow another question that had the same problem but the command:  sudo apt-get install linux-headers-$(uname -r) build-essential virtualbox-5.1 dkms returns E: Package 'virtualbox-5.1' has no installation candidate Can anyone help me with this?   I had this all working then I rebooted and my virtualbox installation had vanished .... which I'm sure is a whole another can of worms. I just want Virtualbox installed. Please help.  Just FYI I try and install this through Ubuntu Software (after downloading 5.1) and the Install button goes gray for about two seconds then in my launcher an icon comes up and says "waiting to install"  A solution to either of these problems would suffice .. help.

How do I install a .deb file via the command line?


While working out something in thermodynamics, I encountered an equation that had a term like $\log(n_1/n_2)$, where, $n_1$ and $n_2$ are the number densities. Now of course the argument of the $\log$ is dimensionless, but I can write the same as (at least mathematically) $\log(n_1)-\log(n_2)$, in which case we have inconsistency that the arguments are not dimensionless.   So even though, its mathematically possible, in the case of physics should we restrict from using this particular expression for $\log$ wherever we have some inconsistency?  EDIT : As it has been pointed out in comments, I am also interested in understanding in cases, where $n2$ or $n1$ is small since one can't use a series expansion !!

In log-plots a quantity is plotted on a logarithmic scale. This got me thinking about what the logarithm of a unit actually is.  Suppose I have something with length $L = 1 \:\mathrm{km}$.  $\log L = \log \mathrm{km}$  It seems that the unit of $\log L$ is $\log \mathrm{km}$, but I can also say $L = 1000 \mathrm{\:m}$ and now:  $\log L = 3 + \log \mathrm{m}$  This doesn't appear to have any units at all.  This suggests that $\log \mathrm{km}$ and $\log \mathrm{m}$ are actually dimensionless numbers. But wait, I can do this with any unit! Does it actually make sense to talk about the logarithm of a unit, or some other function for that matter?


Here is the code,  char *foo() {     static char s[10] = "abcde";     return s; }  char *bar() {     char *c = foo();     return c; }  int main() {     printf("%s\n", bar());  }   Typically, it is wrong to return a local pointer as I did in bar, but now c points to a static var returned by foo, would it be correct to return a local var c in bar?  I tried, it printf the right value, but I don't understand how it works. I thought, when bar() finishes, the var c should vanish, which should make printf print undefined stuff, right?  Follow Up  char *c is a local var, if char *c = "abcde";, I assume this: c is a local var which resides in the function's stack, while "abcde" is a constant var which resides in the constants-area (part of the heap?), so when bar() finishes, c vanishes, but "abcde" still remains in the heap, right?

I'm working with some code that widely uses the idiom of returning a pointer to a static local variable.  eg:  char* const GetString() {   static char sTest[5];   strcpy(sTest, "Test");   return sTest; }   Am I right in thinking that this is safe?  PS, I know that this would be a better way of doing the same thing:  char* const GetString() {   return "Test"; }   Edit: Apologies, the function signature should of course be:  const char* GetString();


In the past, we used to know the exact close reason we chose when voting to close a question.  However, in the new close dialog, it's no longer possible:        In the above, I chose "A community-specific reason --> This question does not appear to be about the software that powers the Stack Exchange network". I have no way to confirm this after the vote was cast because one can not click on top entries (first page) on the dialog to visit the subentries (subsequent pages).  Can this ability be added back please?

This week we rolled out a series of changes to  of the question close workflow.  You can read more about the details of these changes .    For context, the overall effort to improve the question close experience will be optimized for Stack Overflow. Given Stack Overflow’s scale, many of the pain points we hear about with question closing and reopening are unique to Stack Overflow and won’t make sense for other network sites. However some  changes are general improvements that should improve usability and guidance overall. Wherever possible, we plan to roll these changes out network wide as well. Any time we roll out a change network wide, we’ll make sure to cross-post here. This first phase is being rolled out to the network and is why I’m posting today.  Let us know if you run into any issues or have questions regarding the network here.


OK. I have two computers one is a windows vista the other is a windows 7/8. how do I set up a connection between the two so the windows 7/8 can take control of the mouse and key board so the win 7/8 pc's keyboard and mouse will control the vista pc. They are both using a different wireless network. Any ideas.

I'm trying to Remote desktop from Vista to Windows 7 to two machines on the same home workgroup.   On the Windows 7 box I have:   enabled the 'remote assistance' check box under computer > properties > advanced > remote opened the firewall port started the remote desktop services rebooted   on the Vista client I have   telneted to the IP address on 3389 and got no connection open - I tried repeating this and switching off the firewall on the server and got the same result   I still can't connect. (I can see the machine in my workgroup, and ping it on the command line, and explore it's file directory) (I don't see it in my list of terminal servers when browsing in terminal services client)  What else should I try?


I'm new to JavaScript and pulling my hair out over this...   A demo of the problem is here:   And this is the script:  var sections = function() {   $('.image').each(function() {     var $this = $(this),         x = $this.find('img').width()     $this.width(x);   }); };  $(document).ready(function() {    sections();  });  $(window).resize(function() {   sections(); })   The width of an image is calculated and assigned to the image's container. The idea is that the row of images will always maintain their aspect ratio, without gaps between the containers.   The problem is the code fails about 50% of the time and the images just squish together. Resizing the window fixes it so I think it's something to do with the loading sequence.   I've tried using window.onload and img.onload instead of document.ready, and these didn't solve it. Have I missed something in my script?

In jQuery when you do this:  $(function() {    alert("DOM is loaded, but images not necessarily all loaded"); });   It waits for the DOM to load and executes your code. If all the images are not loaded then it still executes the code. This is obviously what we want if we're initializing any DOM stuff such as showing or hiding elements or attaching events.  Let's say though that I want some animation and I don't want it running until all the images are loaded. Is there an official way in jQuery to do this?  The best way I have is to use <body onload="finished()">, but I don't really want to do that unless I have to.  Note: There is a  in Internet Explorer which actually does wait for all images to load before executing code inside $function() { }. So if you're using that platform you'll get the behavior I'm looking for instead of the correct behavior described above.


I need to prove this using the Chinese Residue Theroem. If i choose n even (n>2) then all even number are composite of course, but for the odd i don't know what to do. Plus, i don't see how the chinese residue theroem could be helpful. Thanks for your hints. I know how to prove that there is infinitely prime (and infinitely composite) and i think i will have to use this.

Recall that if $n$ is a positive integer, $n! = n(n-1)\cdots 3\cdot2\cdot1$.  a) Let $n$, $k$ be positive integers with $1< k \le n$. Prove that $n! + k$ is composite.  b) Using part a, find $100$ consecutive integers all of which are composite.  c) In part b you gave a sequence of $100$ consecutive integers all of which are composite. You should be able to use the same idea to find $\ell$ consecutive integers which are composite for any positive integer $\ell$. In other words, you can find sequences of any length which consist of consecutive integers and contain no primes. Does this contradict the fact that there are an infinite number of prime numbers?


I have this script  tests=() igrepy -l $1 . | while read -r line do     // some processing     tests+=("${second[0]}") done echo ${tests[@]}   I've checked that 'second' has a result and it does, however my echo returns a blank string. What has gone wrong here? This is on rhel6, 'igrepy' is an alias to a case insensitive grep that only search python files

I try to initialize an array in bash-4.2 next way:  ring=() ls -las | tail -n +4 | while read line > do > ring+=("$line") > echo ${ring[-1]} > done 3924 -rw-r--r-- 1 username group 4015716 Mar 23 15:14 script.jar 4 -rw-r--r-- 1 username group 9 Feb 29 12:40 rec.lst 5541 -rw-r--r-- 1 username group 5674226917 Mar 28 15:25 debug.out 8 -rw-r--r-- 1 username group 6135 Mar 25 12:16 script.class 8 -rw-r--r-- 1 username group 6377 Mar 25 11:57 script.java 8 -rwxr-xr-x 1 username group 4930 Mar 8 15:21 script-0.0.0.sh 8 -rwxr-xr-x 1 username group 6361 Mar 28 15:27 script-0.0.1.sh echo ${ring[0]}  echo "${ring[0]}"  echo "${ring[@]}"   What is wrong, why i get empty array after the finish of the loop?


$\fbox{$13x + 1 \equiv 0 \pmod {100}$}$  I solved the equation above by trying different multiples to isolate $x$ until I found something that worked. I have two questions:  $\fbox{$1.$}\ $ What if there was no solution for $x$?  How would I be able to prove it?     $\fbox{$2.$}\ $ Are there a set of steps that I could program a computer to follow and get an answer if other similar modular equations are inputted?  My solution is below:  $13x +1 \equiv 0 \pmod {100}$  $13x \equiv 99 \pmod {100}$  (added $99$ to both of equation and applied the $\mod 100$ to the left side)  $104x \equiv 792 \pmod {100}$  (multiplied both sides by $8$)  $4x \equiv 792 \pmod {100}$  (removed a $100$ from the left side)  $x \equiv 198 \pmod {100}$  (divided both side by $4$)  Like I said, I believe I got the right solution but only through trial and error.  I was wondering if there is a more systematic way of solving these problems.  Thank you for any help.

How to solve $ 13x \equiv 1 ~ (\text{mod} ~ 17) $?   Please give me some ideas. Thank you.


When flagging for moderator attention, I try to give concise and useful detail, then send.  Sometimes there are many issues and I point out each by shorthand, sometimes I just focus on the highly egregious one and hope the moderator will check thoroughly.  I'll also come back to a question or answer and want to flag it, to see that I already did! Occasionally my flag hasn't resolved yet. That's okay - mods are busy people and a few hours isn't much. Less frequently, I encounter a string of content from (a) user(s) that needs an encompassing behind-the-scenes check. I've already flagged one or two for whatever reason, but now I want to add the request for a wider check.  But all I know is that I flagged for mod attention. I don't know what I wrote, or what exactly it was about, and I don't want to cover something twice (for the obvious reason, and as to avoid the impression that I'm copy-pasting a flag, because that's annoying to them and doesn't get the flag done faster).  Can we please have the mod-flag comment saved in the comment section, if the flag has not yet been resolved?

The  (click on your number of helpful flags in your profile) is cool, however some posts have a gray background, some don't. What does it mean?  example: