I am learning java and in my learning material I found the following question:     You are creating an application that includes a number of methods. These methods will change the values of both primitive and reference variables passed in as arguments. Which statement best describes the effect that changes made in the method will have on the original variables? Choose the best option(s) from those listed below.   The question is whether the value reference type can be changed, and the answer is no. But could anyone help with showing a code which demonstrates this behavior? Thank you

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


After his falling out with the family in the fifth book, Percy has walked out of a photo of the Weasley family. This suggests photographs can reflect what is happening with their subjects in real life.     A photograph of the Weasley family stood beside the in-tray. Harry noticed that Percy appeared to have walked out of it.   Order of the Phoenix - page 57 - Bloomsbury - chapter 8, The Hearing   However, in the seventh book when Harry finds a picture of the Marauders in Sirius' bedroom, all four boys are happy and laughing. One would think that the subjects of the photo would be angry/have walked out/etc in response to Wormtail's betrayal.     This was in contrast the only Wizarding photograph on the walls which was a picture of four Hogwarts students standing arm in arm, laughing at the camera.   Deathly Hallows - page 157 - Bloomsbury - chapter 10, Kreacher's Tale   What are the rules of the how subjects in magical photos act?    This is different from  because photos do not interact with real people like paintings do nor do they talk or make sounds. They seem to have a very different set of rules than paintings do. These rules seem to differ, however, depending on the portrait (which is what my question is about).

In the Harry Potter universe, the people in photographs and paintings can move and talk. You actually see characters interacting with the "people" in the pictures, particularly in the portraits that hang all over Hogwarts School. Then why can't Harry's parents photos interact with him ?


I am trying to find the tangent that is common to two quadratic Bezier curves. Concretely, I want to draw the corner of a bending piece of paper, like this:  Theoretically it looks simple: Given a Bezier curve $B$ through points $P_0$, $P_1$ and $P_2$, and another one $G$ though $Q_0$, $Q_1$, $Q_2$, i.e.: $$ B(t) = (1-t)^2P_0 + 2t(1-t)P_1 + t^2P_2 $$$$ G(r) = (1-r)^2Q_0 + 2r(1-r)Q_1 + r^2Q_2 $$$$ 0 \leq t, r \leq 1 $$ , I am looking for a solution $(r,t)$ of this system: $$ B'(t) \cdot G'(r) = 0 $$$$ (G(r) - B(t)) = \lambda B'(t) $$ , that is: the tangent vectors are parallel and the vector between the tangent points is on the tangent. I first spent a couple hours on paper isolating $r$ in the first and substituting in the second, but I gave up given the number of terms that came up. Then I used Maple to help me do the calculation, and even it cannot tract it. I found answers online that gave roughly the same idea that I have here, but no calculation is ever done. My question: It there a more clever way to approach the problem, any transformation that would make the algebra simpler? N.B.  A numeric approximation is enough for my application. I tried a Taylor expansion in Maple, with no success. I am actually interested in an application where $P_2 = Q_0$, not sure if it really matters. I am interested in other ways to draw what I want, but I spent so much time trying to solve the equations above that now I'd like to see a math solution anyway.

I have two quadratic bezier curves and I want to find whether they have a common tangent, and if so where it is.  If the first bezier is defined by points $(x_1, y_1)$, $(x_2, y_2)$, $(x_3, y_3)$, then the points on the curve have coordinates:  $x = (x_1 - 2x_2 + x_3)t^2 + (2x_2 - 2x_1)t + x_1 \\ y = (y_1 - 2y_2 + y_3)t^2 + (2y_2 - 2y_1)t + y_1$  Or to simplify things:  $x = A_xt^2 + B_xt + C_x \\ y = A_yt^2 + B_yt + C_y$  Likewise, I can get an equation for the second bezier:  $x = D_xs^2 + E_xs + F_x \\ y = D_ys^2 + E_ys + F_y$  The gradient of the tangent, $m$, to the first curve at $t$ is $\dfrac{2A_yt + B_y}{2A_xt + B_x}$,  which must be equal to the tangent to the second curve at $s$, $\dfrac{2D_ys + E_y}{2D_xs + E_x}$.  So $m = \dfrac{2A_yt + B_y}{2A_xt + B_x} = \dfrac{2D_ys + E_y}{2D_xs + E_x}$  Which I rearranged to get:  $t = \dfrac{2(B_yD_x - D_yB_x)s + B_yE_x - B_xE_y}{4(A_xD_y - A_yD_x)s + 2(A_xE_y - A_yE_x)}$  The gradient of the tangent is also equal to the difference in the y-coordinates over the difference in x-coordinates:  $m = \dfrac{D_ys^2 + E_ys + F_y - (A_yt^2 + B_yt + C_y)}{D_xs^2 + E_xs + F_x - (A_xt^2 + B_xt + C_x)}$  But that's as far as I got. The algebra looks too messy from here. Can anyone solve this, or is there a better approach?


hey im making a program in java were you type into a console then it responds back with the computer actually talking(with sound), im using the FreeTTs speech synthesizer. For some reason when i write the following code its output not what i want.  import java.util.Scanner;  import com.sun.speech.freetts.VoiceManager; import com.sun.speech.freetts.Voice;  public class TextToSpeech {     public static void main(String args[]){           Scanner input = new Scanner(System.in);          String userInput = input.nextLine();           if(userInput == "hi"){          Voice v;          VoiceManager vm=VoiceManager.getInstance();          v=vm.getVoice("kevin16");          v.allocate();          v.speak("Hey my name is jarvis");          input.close();          }else              System.out.println("you suck try again");     }  }

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 tried to find the curved surface area of a hemisphere without integration. I found a glitch over there as I didn't found any mistake in my approach. Anyone who has found please do answer. I got a handle of bucket and I formed a hemisphere by rotating it along the circumference of a imaginary semicircle of same radius 'R'(just for an idea for the figure). I found the curved surface area to be $\pi R \cdot \pi R$=$\pi ^2R^2$. But it is actually $2\pi R^2$.

When we were in school they told us that the Surface Area of a sphere = $4\pi r^2$  Now, when I try to derive it using only high school level mathematics, I am unable to do so. Please help.


I have two computers, one laptop and one PC. My laptop was the first to get the Anniversary update. I successfully installed WSL and get it working. Only a few bugs like inotify or my main one socket hang up randomly popping up when trying to do test units in node.js on local server... Later I updated my tower to anniversary and set up WSL. This one still had the inotify issue, but no more socket hang up. So I guess a new update fixed it. I tried removing WSL on my laptop using lxrun /uninstall /full and the reinstall, but still same issue. Windows is up to date. How can I update my WSL system on laptop?

Is there any possibility to update LXSS on Windows from 14.04 to 16.04?  sudo do-release-upgrade   does not work.


A few months ago I asked where the details of a custom toolbar were located with a view to restoring a backup. With the assistance of Psycogeek I got to the bottom of it.  I offer you the batch scripts which solved the problem.

A few years ago Umber Ferrule wrote that the toolbars in the taskbar are defined in   HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams.   This looks very plausible but cannot be the entire story.  Deleting this key will in no way affect the taskbar and on rebooting the system the key magically reappears.  Why do I want to know?  Simple.  I would like to export the key to a reg. file as a convenient backup.


I have to prove by cases that for any two sets $A$ and $B$  $A \subseteq B$ if and only if $A\cup(B\setminus A)=B$  I don't get what cases should I consider, I am thinking of proving it by definition of sets, subsets, and union. Can someone help me understand what is needed from me?

For any sets $A$ and $B$, show that $(B\smallsetminus  A)\cup A=B \iff A\subseteq B$.    I know I have to do the following:   1)  Assume  $(B\smallsetminus  A) \cup A=B$, prove $A\subseteq B$.   2) Assume $A\subseteq B$, prove $(B\setminus A)\cup A=B$.   This is what I have done so far:   1) Let $(B\smallsetminus  A)\cup A=B$ and $x\in A$. Then $x\in(B\smallsetminus  A)\cup A$.  Since $(B\smallsetminus  A)\cup A=B$, then $x\in B\smallsetminus  A$.  Therefore, $x\in B$ by definition of difference.  Thus, $A\subseteq B$.   2) Let $A\subseteq B$ and $x\in(B\smallsetminus  A)\cup A$.  Then $x\in B\smallsetminus  A$ or $x\in A$ by definition of union.  Then we have couple cases here:   a) If $x\in B\smallsetminus  A$, then we have proved the statement.   b) Show that $x\in A$ and $x\in B$.   I have no idea if I am doing this correctly or not. Thus, any help is appreciated.


If I see an old person, I will help (him - them - both are correct).   This could be silly. However I don't know whether to choose him or them or both.

Is it possible to change he/she (he or she) in a sentence into one word? For instance: When a student comes in, ask him or her to...


Like with a fighter at level 20, you have 3 extra attacks. Can you cast a spell, such as firebolt, and also attack in the same turn?

Specifically I am asking as a level 1 Half-elf Bard. As far as I know he doesn't have any dual wielding capabilities yet, or anything that states he has a bonus action to attack.  So I'm wondering if I can either cast my spells as bonus actions and use my action to attack, or if I can cast the same spell as an action and use my bonus action to attack?


"live far from each others" has 30000 Google results.  "live far from each other" has 60000 Google results.  So which one is right? "Each others" or "Each other"?

This always nags me... I would prefer a logical as well as a grammatical explanation of it.      We enjoyed each other's company.     We enjoyed each others' company.    Which one is correct? Why is the other not?


first things first this is not a duplicate as i have seen everey similar question i found so what im doing is im conning to a data base in a maven project  i have 2 concerns -  the build gives the following error SEVERE: Servlet.service() for servlet [webapp.login.loginServlet] in context with path [] threw exception java.lang.NullPointerException: Cannot invoke "java.sql.Connection.createStatement()" because "con" is null     at webapp.login.loginServlet.doGet(loginServlet.java:46)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)     at java.base/java.lang.Thread.run(Thread.java:832)  i made my connection null and later intilized it ...in a try catch request.getRequestDispatcher("/WEB-INF/veiws/login.jsp").forward(request, response);             // connect                                  Connection con = null;                     try {                         con = DriverManager.getConnection("jdbc:mysql://localhost:3306/to_be_done","root","");                     } catch (SQLException e) {                         // TODO Auto-generated catch block                         e.printStackTrace();                     }  if i remove null compile error here   try {                         st = con.createStatement();                     } catch (SQLException e) {                         e.printStackTrace();                     } }      "con" is not initialized  and if i leave it null and ignore the error i get  HTTP Status 500 - Cannot invoke "java.sql.Connection.createStatement()" because "con" is null

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?


At the end of the battle, you can recover half your expended   ammunition by taking a minute to search the battlefield. PHB.146   A ranger PC with a crossbow has three ordinary bolts. He's very creative and painted the bolts different colours, the primary colours. One bolt is red, one bolt is yellow, one bolt is blue.  The ranger fires the three bolts at an opponent. He then spends one minute searching the battlefield, what is the ranger able to recover?  Each coloured bolt has a different but equal sentimental value to the ranger PC.

A Monk PC has three ordinary darts.  He's very creative and painted the darts different colours, the primary colours. One dart is red, one dart is yellow, one dart is blue.   The monk throws the three coloured darts at an opponent.  He then spends one minute searching the battlefield, what is the monk able to recover?  Each coloured dart has a different but equal sentimental value to the monk PC.


So, I have this Struct. It has some functions and operators overridden, but that's not so important.  public struct Vector3 {     public float X, Y, Z; }   I'm filtering a Collection of these via a HashTable and it works fine. But I want to verify that only duplicates are removed. By default my IDE gave me this code for the GetHashCode() method:  public override int GetHashCode() {     var hashCode = -307843816;     hashCode = hashCode * -1521134295 + X.GetHashCode();     hashCode = hashCode * -1521134295 + Y.GetHashCode();     hashCode = hashCode * -1521134295 + Z.GetHashCode();     return hashCode; }   Which looks fishy to me. I'm pretty sure that the factors alone will generate a overflow on a INT_32. Furthermore i am confused that all three floats seem to have the same "weight" (-1521134295). Plus I am not really sure what GetHashCode() of a float does. It's bit Pattern itself should be unique already.   It has to be impossible, to create a unique 32 bit pattern from 96 bit's of input.  So how does it work?   Does the HashMap uses the equal Method before removing items with the same HashCode. Am I just lucky? And what are these Numbers my IDE generated as "weights" and startvalue?   PS: For those who are interested, the struct's code is here.  public struct Vector3 {     public float X, Y, Z;      public Vector3(float x, float y, float z)     {         X = x;         Y = y;         Z = z;     }           public static bool operator ==(Vector3 a, Vector3 b)     {         return (a.X == b.X && a.Y == b.Y && a.Z == b.Z);     }      public static bool operator !=(Vector3 a, Vector3 b)     {         return (a.X != b.X || a.Y != b.Y || a.Z != b.Z);     }      public static Vector3 operator +(Vector3 a, Vector3 b)     {         return new Vector3(a.X + b.X, a.Y + b.Y, a.Z + b.Z);     }      public static Vector3 operator -(Vector3 a, Vector3 b)     {         return new Vector3(a.X - b.X, a.Y - b.Y, a.Z - b.Z);     }      public float Magnitued     {         get         {             return (float)Math.Sqrt((X * X) + (Y * Y) + (Z * Z));         }         private set { }     }      public Vector3 Normalized     {         get         {             var mag = Magnitued;             return new Vector3(X / mag, Y / mag, Z / mag);         }          private set { }     }      public override bool Equals(object obj)     {         if (!(obj is Vector3))         {             return false;         }          var vector = (Vector3)obj;         return X == vector.X && Y == vector.Y && Z == vector.Z;     }      public override int GetHashCode()     {         var hashCode = -307843816;         hashCode = hashCode * -1521134295 + X.GetHashCode();         hashCode = hashCode * -1521134295 + Y.GetHashCode();         hashCode = hashCode * -1521134295 + Z.GetHashCode();         return hashCode;     } }

In .NET, the  is used in a lot of places throughout the .NET base class libraries. Implementing it properly is especially important to find items quickly in a collection or when determining equality.  Is there a standard algorithm or best practice on how to implement GetHashCode for my custom classes so I don't degrade performance?


So say I take an example from Telltale games, they pack all their file assets into ttarch files, now I guess this is a custom file format that allows many file assets such as dds, jpg, bik, wav, 3ds etc to be packed into one file.  So someone has worked out how to explore these ttarch files and inside as you would imagine there are hundreds of files each with non standard file extensions(apart from the  lua files) such as d3dtx, d3dmesh, vers, spline, style, scene, there are also lua files which we all know.  The d3dtx files will be dds, jpg, bmp etc, so do you actually encrypt a dds file in this way, can someone enlighten me on the process of file encryption/packing files together?

Well, one example is this file of the game The Sims 2 for PS2: quickdat.arc. The file contains this .arc extension, but it's no one an archive file and it contains some data of the game inside. How can I do this? Put so many files in one?  How to do something like this? All the game files inside one without using a file compressor?


I can create a new geopackage and write a tmp layer to it using code below: #Create a layer lyr = processing.run("native:randompointsinextent", {'EXTENT':'376242.90699403384,385761.27711294894,6245699.079987993,6249398.011089481 [EPSG:3006]','POINTS_NUMBER':10,'MIN_DISTANCE':0,'TARGET_CRS':QgsCoordinateReferenceSystem('EPSG:3006'),'MAX_ATTEMPTS':200,'OUTPUT':'TEMPORARY_OUTPUT'})['OUTPUT']  newgpkg = r'C:\GIS\data\testdata\newgpkg.gpkg' options = QgsVectorFileWriter.SaveVectorOptions() options.driverName = "gpkg"  QgsVectorFileWriter.writeAsVectorFormatV2(lyr, newgpkg, QgsCoordinateTransformContext(), options)  But how can I name the table? Here both the geopackage and the layer is named newgpkg. (This is just a workaround to create a new geopackage and table using code. So if there is another way of doing that, please let me know)

How to add layers (vector or raster to an existing GeoPackage)? While loading an existing layer of a GeoPackage is quite trivial: path = '/home/matteo/geopackage.gpkg|layername={}'.format('admin') iface.addVectorLayer(path, 'admin', 'ogr')  I couldn't find information about adding them via PyQGIS.


i have installed xosd an used osd_cat to display text in my screen. the problem is that i cant do it on the remote station on the remote screen through SSH.  I want to execute osd_cat on the remote HDMI Screen connected to the raspberry pi, not on my SSH screen  i tried    export DISPLAY=:0.0   and  adding DISPLAY=:0.0 before the command  but it didn't work  FIY:  when i use xrandr it gives me this:  xrandr: Failed to get size of gamma for output default Screen 0: minimum 1027 X 768, current 1024 x 768, maximum 1024 x 768 default connected 1024x768+0+0 0mm x 0mm    1024x768     0.0*

Once upon a time,  DISPLAY=:0.0 totem /path/to/movie.avi   after ssh 'ing into my desktop from my laptop would cause totem to play movie.avi on my desktop.  Now it gives the error:   No protocol specified Cannot open display:    I reinstalled Debian squeeze when it went stable on both computers, and I guess I broke the config.   I've googled on this, and cannot for the life of me figure out what I'm supposed to be doing.   (VLC has an HTTP interface that works, but it isn't as convenient as ssh.)  The same problem arises when I try to run this from a cron job.


There are SE sites which I want to use without being identifiable my main account. Thus, I have a secondary SE account, too.  (To prevent temptations ;-), currently there is no SE site for which I would be registered with both of them.)  Earlier it was very simple: simply I was logged in into the different SE sites with my different accounts. If I wanted to log in, I could simply choose, which of my accounts I want to use.  What I could do: I could use some browser addon (or multiple browsers) which would enable me to use different session cookies.  But I am looking for a better solution: ideally, for one which doesn't trigger your possible warning scripts, but makes this even looking legal.

The recent changes to the  system are disrespecting my explicit wishes. I am in the habit of logging out of some SE communities when I am done. In the case of one community I am actively heeding , spending as little time there as possible and much of that logged out. In the scheme of things it really doesn't matter what my motivation for logging out is though. When I log out of a community it is a positive action on my part, I have to find the "log out" link, follow it and then confirm that I want to be logged out. I am explicitly saying that I do not wish to be logged in to this community. Having done this, if I return to the community I do not expect or want to be logged in automatically and against my express wishes. The recent changes the global authentication system do exactly this. I understand from Anna's post  We are going to recognize you in some ways on sites where you don't have a profile. This is still a work in progress, but most notably you will see "join this community" in the top bar instead of "sign up" and "log in".  Please extend this to recognise that I have a profile with this community but am logged out and offer me the opportunity to "log in to this community" rather than forcing me to do so.


I have seen “data” used with “show” and with “shows” in the newspaper. For example,         Data show that domestic violence increases when there is a greater unemployment.   Data shows that domestic violence increases when there is a greater unemployment.      Which one is correct?  Please clarify is it grammatically correct to use shows  in above sentence.

Which sentence is correct:     In this section you can make a payment: verify carefully that all the data submitted is correct and confirm by clicking the Proceed button.   or     In this section you can make a payment: verify carefully that all the data submitted are correct and confirm by clicking the Proceed button.


First off, I have a dataset with sparse longitudinal data. There are 30 individuals with 1 sample, 30 individuals with 2 samples, and 5 individuals with 3 samples. Various categorical variables are known for each individual and I want to see if these variables are correlated with a drug level (a continuous variable). Let's just focus on one categorical variable: homelessness. The main issue is that the number of people who are homeless is not equal to those who are not so I cannot perform a simple wilcoxon signed rank test or most other paired tests. As a result, I generated a linear model to see the relationship between homelessness and the drug levels using a random slope/intercept for each individual and another for those who are not homeless. Of course, if I just perform an ANOVA(linearmodel1, linearmodel2) I get the result:  "all fitted objects must use the same number of observations".  Edit:   As pointed in comment by @Roland (see link below in comments), one approach is to combine the data and make 2 models: 1 with the variable homelessness and 1 without. Using polynomial regression this can be done with:  ###Create some example data mydata1 <- subset(iris, Species == "setosa", select = c(Sepal.Length, Sepal.Width)) mydata2 <- subset(iris, Species == "virginica", select = c(Sepal.Length, Sepal.Width))  #add a grouping variable mydata1$g <- "a" mydata2$g <- "b"  #combine the datasets mydata <- rbind(mydata1, mydata2)  #model without grouping variable fit0 <- lm(Sepal.Width ~ poly(Sepal.Length, 2), data = mydata)  ###model with grouping variable fit1 <- lm(Sepal.Width ~ poly(Sepal.Length, 2) * g, data = mydata)  #Compare models anova(fit0, fit1) enter code here  #But this doesnt work in nlme fit1 <- lme(Sepal.Width ~ Sepal.Length * g, data=mydata) #It throws an error: "invalid formula for groups"  ######Not sure if this is the correct way ###nlme #model without grouping variable model0 = gls(Sepal.Width ~ Sepal.Length,data=mydata) #model with grouping variable model1 = lme(Sepal.Width ~ Sepal.Length ,random = ~1|g,data=mydata) anova(model0,model1) ###lme4 #model without grouping variable fm0 <- lm(Div ~ TimeRaw,ddmerged) #model with grouping variable fm1 <- lmer(Sepal.Width ~ Sepal.Length+(1|g),mydata, REML=FALSE) anova(fm0,fm1)   But how do I create two models with and without a specific group using nlme/lme4?  Thanks in advance

So first of all I did some research on this forum, and I know   questions have been asked but they usually haven't been answered properly or sometimes the answer are simply not detailed enough for me to understand. So this time my question is : I have two sets of data, on each, I do a polynomial regression like so :  Ratio<-(mydata2[,c(2)]) Time_in_days<-(mydata2[,c(1)]) fit3IRC <- lm( Ratio~(poly(Time_in_days,2)) )   The polynomial regressions plots are:    The coefficients are :  > as.vector(coef(fit3CN)) [1] -0.9751726 -4.0876782  0.6860041 > as.vector(coef(fit3IRC)) [1] -1.1446297 -5.4449486  0.5883757    And now I want to know, if there is a way to use an R function to do a test that would tell me whether or not there is a statistical significance in the difference between the two polynomials regression knowing that the relevant interval of days is [1,100].  From what I understood I can not apply directly the anova test because the values come from two different sets of data nor the AIC, which is used to compare model/true data.  I tried to follow the instructions given by @Roland in the related question but I probably misunderstood something when looking at my results :  Here is what I did :   I combined both my datasets into one.  f is the variable factor that @Roland talked about. I put 1s for the first set and 0s for the other one.  y<-(mydata2[,c(2)]) x<-(mydata2[,c(1)]) f<-(mydata2[,c(3)])  plot(x,y, xlim=c(1,nrow(mydata2)),type='p')  fit3ANOVA <- lm( y~(poly(x,2)) )  fit3ANOVACN <- lm( y~f*(poly(x,2)) )   My data looks like this now :    The red one is fit3ANOVA which is still working but I have a problem with the blue one fit3ANOVACN the model has weird results. I don't know if the fit model is correct, I do not understand what @Roland meant exactly.  Considering @DeltaIV solution I suppose that in that case :  The models are significantly different even though they overlap. Am I right to assume so ?


I want to ask a question about programming languages that is opinion-based. , where it was quickly closed. I tried to find another StackExchange site, but cannot find one.  I understand that these questions do not belong in StackOverflow, but where to go to with them? Many opinion-based questions are interesting and many people can learn valuable things from other people's opinions and tips.

After my lie down, I posted  on SO. As I suspected would happen, it got moved to programmers. Unfortunately, the kind of people I'm interested in getting answers from (litb,skeet et al - the top SO programmers in their respective disciplines) don't frequent Programmers much. So my question is, where to ask somewhat non-specific questions of high-powered users?


I need to solve the limit $$\lim_{x\to0}\frac{e^{-\frac{1}{x^2}}}{x}$$  If I replace $x$ with $0$ I get $\frac00$ so that is not what I should do. Do you have any idea how to do it?

Purely out of curiosity, is it possible to compute the following limit without using L'Hopital?  $$\lim_{x\to 0} \frac{e^{-1/x^2}}{x}$$  Using L'Hopital and realizing that we cannot get what we want if we simply take derivatives of $e^{-1/x^2}$ and $x$ directly, we have that  $$\lim_{x\to 0}\frac{e^{-1/x^2}}{x}=\lim_{x\to 0}\frac{1}{x}\frac{1}{e^{1/x^2}} = \lim_{x\to 0} \frac{1/x}{e^{1/x^2}}=0$$  I am curious about whether there is a different way of computing this.


I am creating a script for my router (running busybox). In my script I generate a command in a variable like nvram set option='value with spaces' but when it is executed it complains that arguments are invalid. If I echo the same command and copy/paste it into the terminal it works fine. #!/bin/sh  client="client1" option="desc" value="Client number 4"  cmd="nvram set vpn_${client}_${option}='${value}'" echo $cmd; echo `$cmd`;  When running this script, it outputs the following: nvram set vpn_client1_desc='Client number 4' usage: nvram [get name] [set name=value] [unset name] [show] [commit] [save] [restore] [erase] [fb_save file] usage: nvram [save_ap file] [save_rp_2g file] [save_rp_5g file] [save_rp_5g2 file]  The first line is my echo of the command and the two next are output from the nvram set command which complains about the arguments. It works if spaces in the value are omitted. What am I missing here? PS. My router is an ASUS RT-AC87U running latest version of Merlin firmware.

$ ls -l /tmp/test/my\ dir/ total 0   I was wondering why the following ways to run the above command fail or succeed?  $ abc='ls -l "/tmp/test/my dir"'  $ $abc ls: cannot access '"/tmp/test/my': No such file or directory ls: cannot access 'dir"': No such file or directory  $ "$abc" bash: ls -l "/tmp/test/my dir": No such file or directory  $ bash -c $abc 'my dir'  $ bash -c "$abc" total 0  $ eval $abc total 0  $ eval "$abc" total 0


for the life of me, I can't remember the name or author of this book (or series). In it, there is this huge (infinite) wormhole like structure, that is home to a number of alien species, and can be exited at various points into strange universes etc, and through which the main characters (or some of them) are travelling. It is reminiscent of Baxter, Reynolds, Stephenson, Hamilton, Brin, etc...but if one of those authors, I cannot find the book/s (proabably a series). Any help much appreciated. Not that old, maybe 10 years ago or so (though I could be wrong)

I read this book many years ago and it had a nice plot. For the life of me I can't remember the name or author so I need help.  Story: one asteroid shaped object appears close to Earth orbit or in the Sol system.  People get on board and start exploring. They find machines/computers that can teach them anything in a very short time (languages, crafts etc).  Towards the end, something happens and one of the characters goes into a long tunnel where he/she opens a portal in time with the help of a device he/she has.  In the epilogue it states that he has been transported back in time to Egypt.  I think there were no pyramids.  Sorry for being brief but this is all I remember. Any help would be appreciated. Thanks.


I have seen postdoc job adverts which were asking for as many as three recommendation letters, despite being supervised positions and inviting freshly graduated PhD students.  Is this practice common and reasonable?  As a more practical question, how should an applicant deal with this situation?  It seems to me that it is not unusual that the only person a student worked with extensively is their advisor. In fact it would even seem like a good thing to have an advisor who does not lead a large group and has time to work closely with all their students. Yet such students would find it rather difficult to obtain three recommendation letters.

I am currently finishing my PhD thesis (in Mathematics) and trying to find a post doc position.   My PhD supervisor is a very nice person and is, of course, one of my referees. However, most places need 2-3, so I am not sure who else to ask.  I have a secondary supervisor but we only talked once really during a formal thing. So asking a referee who does not know much about the work or the personality is a bit... weird...  I had a decent relationship with my Master's supervisor, but unfortunately we have not corresponded once in the 3+ years after my masters, so me writing  "hey, do you remember me from waaaay back then, would you please write a reference for me" seems a bit ... strange .. too.  I have published several papers already but I don't have any co-authors whom I could ask.   I have given one talk outside my university but I am not sure who to ask there. I don't actually know these people, my supervisor referred me to them and they were OK so I gave the talk.  Any ideas?


How to break the while loop, when the condition is true?  I tried using break under an if statement, but it's not working.  def proallocate():     while True:             conn = sqlite3.connect('database.db')         cur = conn.cursor()         pid = cur.execute("SELECT project_id FROM Upload WHERE status= ?", ("NULL",))         for pd in pid:             a = str(pd)             projectid = re.sub('[\(\),\{\}<>]', '', a)             url = "https://picture-us.amazon.com/colorauthor/view/"+projectid+""             print(url)             req = requests.Session()             resp = req.get(url, auth=HTTPKerberosAuth(mutual_authentication=False), verify="./amazon_dev_certs.pem")             soup = BeautifulSoup(resp.text, 'html.parser')             project_status_latest = soup.find_all('tr')[-1].get_text()             if ("Project Ready" in project_status_latest):                 proid[0] = projectid                 print(proid[0])              else:                 cur.execute("UPDATE Upload SET status = ? WHERE project_id = ?", ("Reserved", projectid))                 conn.commit()   I expect that the loop should stop when the if condition passes.

Given the following code (that doesn't work):  while True:     #snip: print out current state     while True:         ok = get_input("Is this ok? (y/n)")         if ok.lower() == "y": break 2 #this doesn't work :(         if ok.lower() == "n": break     #do more processing with menus and stuff   Is there a way to make this work? Or do I have do one check to break out of the input loop, then another, more limited, check in the outside loop to break out all together if the user is satisfied?


I know that launchers can be made, but is the same true for keyboard shortcuts? I've tried myself, with just a copy and paste of the directory to no avail. I apologize, but I'm new to linux, can someone please chime in here?   Edit: Not duplicate because xbindkeys does not work on my PC. Had to use both/the stock keyboard shortcuts setup.

I want to change the key bindings on some of the keys on my keyboard.  I want some to run commands and others to activate different keys.  What applications can I use to do this?      Index:       (from within System Settings)             I'm still looking for answers using dconf and any other method.


As the title says, I was playing with friends a realm that I created, and now, we want to move the world to a friend's realm.    I want to copy it, so my friend can download it and we can play it in his realm.  How do I backup the realm or, it is saved in my computer?

I have played on my friend's Survival Realm for ~3 months and he was going to stop paying for the realm so I was wondering is there any way to get that world for my Personal Client.


I am having an issue with understanding how to calculate a specific case of the Coupon Collector's Problem. Say I have a set of 198 coupons. I learned how to find the estimated amount of draws to see all 198 coupons, using the following equation:  $$n \sum_{k=1}^n\frac1k$$  It turns out that for $n = 198$, the expected number of draws is approximately 1162. Let's assume, however, that I already have some of the coupons, say 50. How should I go about solving the same problem, given that I've already collected $X$ of them?

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


Is it possible to do a bindvalue for the table name? mine doesn't seem to pick it up basically the second 2 binds work fine if I remove the :table and add the tablename instead, but I want to use this for more than one table from the same form.  The field for table on the form is defined from a result of the previous query so the table name appears on the form in a value as $table which displays correctly so this should post the value of $table to the table bind???   try {     $sql = 'UPDATE :table SET                 archive = :archive                 WHERE id = :id';     $s = $pdo->prepare($sql);     $s->bindvalue('table', $_POST['table']);     $s->bindvalue('archive', $_POST['archive']);     $s->bindvalue('id', $_POST['id']);     $s->execute(); }

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I am new here and new with Ubuntu. I have version 15.10, connected to my macbook pro retina. I am trying to get wifi to work, but no networks are detected on my computer, so I am using an ethernet cable. I'm sure there are some drivers I am supposed to download, but I can not find them. Can someone help me find the drivers I need or help me otherwise? I can not use a different version of Ubuntu, because the program I need to run is specifically for 15.10. My computer has a BCM4360 802.11ac Wireless Network Ada. pter

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


This question is out of Rudin Functional analysis, but only attention was really brought to part (b) on this site, my apologizes if this is considered a re-post. I was just hoping for some assistance. I added what I have so far in my proof.   Let $L^1$ and $L^2$ be the usual Lebegue space on the unit interval. Prove that $L^2$ is of the first catagory in $L^1$, by the following.  Show that $\{f:\int |f|^2 \leq n\}$ is closed in $L^1$ but has empty interior.  proof:  Let $f \in L^2$ be arbitrary. Then $\int |f|^2 d \mu \leq n$, for some finite $n$. Observe that $|f g| \leq \frac{|f^2 + g^2|}{2}$. Suppose that $g = 1$. Then $$ \int |fg| d\mu = \int |f| d \mu \leq \frac{1}{2}\int |f^2 + 1| d\mu \leq \frac{1}{2}\int |f|^2 d\mu + \frac{1}{2} \int d \mu \leq \frac{1}{2}(n + 1) $$ Hence $f \in L^1$ $f$ arbitary and closed in $L^2$ implies that $L^2$ is closed in $L^1$.   I'm really struggling with showing that the interior is empty, and not sure how to make the argument.

How to show that $L^2([0,1])$ is a set of first category in $L^1([0,1])$?   Thank you.


SYSTEM: 4GB RAM; 500GB DISK I have tried some of the solutions I have seen about this error and none have helped. Here is the history: 1. I have been running 12.04 LTE for about a year now with no problems. Last week I booted and got error "Checking battery state ... [OK]" upon boot. I could do ctrl-alt-f1 and get to a terminal, so i tried some remedies online (e.g. reinstalling nvidia), and none helped. I finally bit the bullet and rebuilt my system from scratch.   I was about 80% through restore and boot my system and upon boot got error  "Could not write bytes: broken pipe" and could go no further unless i go to safemode (which is read-only). I tried memory check and fsck, and both came up clean. Bit bullet again and went for restore. I thought maybe my HDD was too hot, so I made sure it has better ventilation. I was about 95% through restore and boot my system and upon boot got error  "Could not write bytes: broken pipe" again. Bit bullet again and went for restore. Argghh!   In both cases I had a thumb drive with nothing but a simple text file, so I don't think that was an issue. In both cases I did a clean reinstalls. The only way I can boot now is in safe mode, or booting to install thumb drive.  If anyone knows the cause or fix, please help!  Thanks, Doug

The problem When I boot Ubuntu 11.10, the boot process hangs, before even getting to the login screen of the display manager, with the message   Could not write bytes: broken pipes   at the top of the screen, followed by some lines of text (where one yellow star left of "PulseAudio" is - don't know if this is important...), the last being       * Stopping System V runlevel compatability                                          [Ok]    After that I can only press Ctrl+Alt+Del to reboot.  The cause The problem occured after I did an update on feb., the 18th. In the process of the update a window popped up in which I had to choose the default display manager. Being in a hurry, I just clicked "ok" (gdm was the default selection in that window). Afterwards I found out that Ubuntu 11.10 us es lightdm so I figured, that maybe this was the cause of my problem. Before this update everything worked fine.  {What I tried so far to do to fix it [skip this, if its too long] I logged in as root in recovery mode and tried to reinstall lightdm. Using the apt-get command I get error that spans over 3 lines of text, the first of which is  Not using locking for read only lock file /var/lib/dpkg/lock;   but I don't know of any process that is using apt-get, that is preventing it from being run.  After that I used  dpkg-reconfigure lightdm  and selected lightdm as the default display manager. This exited with the line   mv: cannot move 'etc/X11/default-display-manager' to '/etc/X11/default-display-manager.pdkg-tmp': Read-only file system".   When I then booted in normal mode it still hung, but the message Could not write bytes: broken pipes was gone, there were just two lines of text, the first said something about the battery state and the last was identical to the one above ("* Stopping System V[...]"). I played around a little bit by also trying dpkg-reconfigure gdm and choosing gdm instead of lightdm, but none of that helped. The system still hangs, just with different lines of text showing up, but "* Stopping System V[...]" is always the last one. }  Other info This may be or not be relevant: I use multiple operating systems (the other ones work) and the kernel I use is 3.0.0-15-generic-pae.  Please help, I invested so much time in setting my Ubuntu system up, I don't want to do it all over again.


While trying to install qemu-5.2.0, I found the build method has changed to mesa.(I don't know why they change things sometimes to make our lives difficult... :) ) Under build directory, I did ../configure --target-list=aarch64-softmmu --enable-debug as usual, and it gave me at the last line ERROR: Could not detect Ninja v1.7 or newer  I tried installing ninja by sudo apt-get install ninja and in removed old version and re-installed ninja. But as you can see, the installed ninja version is too low. (it expects 1.7 or newer) ckim@chan-ubuntu:~$ dpkg -l | grep ninja ii  ninja                                                       0.1.3-2                                                     amd64        Privilege escalation detection system for GNU/Linux rc  ninja-build                                                 1.5.1-0.1ubuntu1                                            amd64        small build system closest in spirit to Make  What is the best way to install Ninja 1.7 or newer? (I'm on ubuntu 16.04) ADD : I found you can install ninja 1.7 on ubuntu 16.05 : git clone github.com/ninja-build/ninja.git, then cd ninja; git checkout v1.7.0; ./configure --bootstrap. now ninja is built on that local directory. you link to previous ninja executable like /usr/bin/ninja. this works ok. (but as others said, upgrading to higher version of ubuntu might be better)

In an ubuntu 14.04 system with the latest updates:  $ ansible --version ansible 1.5.4  $ apt-cache policy ansible ansible:   Installed: 1.5.4+dfsg-1   Candidate: 1.5.4+dfsg-1   Version table:      1.7.1+dfsg-1~ubuntu14.04.1 0         100 http://ca.archive.ubuntu.com/ubuntu/ trusty-backports/universe amd64     Packages  *** 1.5.4+dfsg-1 0         500 http://ca.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages         100 /var/lib/dpkg/status    How can I install the newest version of ansible (1.7.1) from trusty-backports ?  Is it in general safe to use the packages from trusty-backports ?


I have an application which sums up different numbers and I found out that there was a strange number in the application which was not showing the total of two numbers. I figured out that it is Javascript which is responsible for this number. Does anybody have an idea why this sum results in this unexpected number? I typed it also in the Chrome console:

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


I am always reluctant to run make install as root as the last step of installing an application from source. After all, it allows executing arbitrary code form the Makefile. It has already happened to me that due to the lack of proper quoting, Makefile commands deleted things they were not supposed to delete, including files outside of the source code directory.  For this reason, I am looking for a way to avoid running make install as root and restrict my activity as root to basic operations (like copying files or extracting an archive) that do not execute arbitrary code.

I am connected to a linux system with SSH in my college. I found that  is a console alternative of bitorrent. I have downloaded the tar.gz source but to compile/install it needs sudo access  Is there a way to install the program without sudo access?  I don't know a lot about linux and cannot make  work with ctorrent.


The proof said the following, let $A \in M_{n \times n}(\mathbb{C})$ such that $A^r=I_{n \times n}$ for some $r \in \mathbb{N},r>0$ then $A$ is diagonalizable. Mi attempt is the next, since $A$ is equal to the identity matrix, then we can approach the jordan normal form of the $A$, but, i can´t see, the zise of the jordan blocks. someone who give me a hint, or in her case the proof

Suppose $A$ is an $m \times m$ matrix which satisfies $A^{n}=1$ for some $n$, then why is $A$ necessarily diagonalizable.  Not sure if this is helpful, but here's my thinking so far: We know that $A$ satisfies $p(x)=x^{n}-1=(x-1)(x^{n-1}+\ldots+x+1)$.  If $A=I$ it is clearly diagonalizable so we may assume that $A$ is a root of the other factor.   Edit: Actually, I'm a bit confused and not even sure if we can say that much.  Since the ring of $m \times m$ matrices is not an integral domain, we can not conclude that if $A-I \not = 0$ then $(A^{n-1}+\ldots+A+I)=0$, correct?


I am trying to create an spritz app! Everything was working fine, but since yesterday I keep getting this error: ./spritz: line 176: syntax error: unexpected end of file  I have checked the script file and everything seems perfect! I am confused I have an if statement at last and it looks correct! Here is the last portion:      #checks if speed is 150 157 if [[ $2 -eq 150 ]]; 158 then 159 starttime=$SECONDS 160      FS=$'\n' 161      for j in `grep --color=always -iP '\b[^aeiou\s]*[aeiou][^aeiou\s]*\K[aeiou]' $1`; 162      do 163            #Reads the text file in the centre of the screen 164            echo "                                                    ___________________" 165            echo "                                                             $j"; 166            echo "                                                    ___________________" 167            echo "                                                                               Speed 150 wpm" 168            sleep  0.9; 169            clear; 170       done 171 endtime=$(($SECONDS - $starttime)) 172            echo "You read $words_read words in $endtime seconds!" 173       exit 8 174 fi

I am trying to create an spritz app. Everything was working fine, but since yesterday I keep getting this error:     ./spritz: line 176: syntax error: unexpected end of file   I have checked the script file and everything seems perfect. I am confused, I have an if statement at last and it looks correct! Here is the last portion:  #checks if speed is 150 157 if [[ $2 -eq 150 ]]; 158 then 159 starttime=$SECONDS 160      FS=$'\n' 161      for j in `grep --color=always -iP '\b[^aeiou\s]*[aeiou][^aeiou\s]*\K[aeiou]' $1`; 162      do 163            #Reads the text file in the centre of the screen 164            echo "                                                    ___________________" 165            echo "                                                             $j"; 166            echo "                                                    ___________________" 167            echo "                                                                               Speed 150 wpm" 168            sleep  0.9; 169            clear; 170       done 171 endtime=$(($SECONDS - $starttime)) 172            echo "You read $words_read words in $endtime seconds!" 173       exit 8 174 fi   What could cause that error?


I recently ran into a problem with discord updating and I want to uninstall it via command line to reinstall it, but I dont know how. would anyone know how to do that?

Suppose I download a .deb package from a website and install it. (I assume that when I double click the .deb file, the package is installed through a GUI that interfaces with dpkg right?)  How can I uninstall it?


This is not the same as       – My suggestion focuses on adding a Save button to   allow the user to save a review they are not sure on, despite whether   they choose Looks OK, Requires Editing,   Unsalvageable or Skip.   I sometimes review questions in the review queue and often I am unable to review questions due to them being out of my area of expertise. However, when questions are in my area of expertise, I sometimes become confused as to what to choose due to the state of the question. It would be extremely useful if a Save button was available, so that I can save the review and come back to it to see what everyone else marked the question as.  This would not only allow me to review questions I would not have been able to before, but also allows me to sharpen my current skills and review the questions I would normally review even better, as I am more aware of what other people choose and what I should choose.  There could be an extra section on each user's profile, which keeps a record of each review item that they have saved, similar to this:      I have added a small, minimal demo to show what I mean:    html, body{ margin: 0; width: 100%; height: 100%; } iframe { border: none; width: 100%; height: 100%; } <iframe src="https://n4qe3.csb.app/"></iframe>     The demo is also available at . Remember that this is a minimal demo and lacks features; most of the links are also broken.

I recently made it past the 2k reputation border on Stack Overflow and started to review suggested edits. In some cases I am not sure about whether an edit should be approved or rejected and thus I Skip the review.  Now I would like to see the outcome of the review, to be able to learn for future reviews, because there are several factors that allow to judge a review quite fairly:   If the suggestion has been approved and at least two approvers have a high approval rate and almost no rejects the result could be a robo-approval. If the suggestion has been approved and at least two approvers have a balanced approval rate with a healthy amount of rejects the result is most likely a valid one. If the suggestion has been rejected the result is most likely a valid one.   Is there a simple possibility to "review" (in the meaning of "take a second look") suggested edits that have been skipped by myself?  If not, could that be added to the "review"-list on the "activity"-tab on the profile-page, maybe combined with a CheckBox so that listing the skipped reviews is optional?  EDIT: After reviewing some of my suggested edit reviews, I have a suggestion to add to this feature request. In the review overview on my profile page, I would like an option to see whether the final result of the review differed from my vote - because that are those reviews where I probably was wrong.


I've upgraded the Ubuntu from 12.04 to 14.04. But there are something I want to change.  In 12.04, the view of file holder is as follows:    and we could open the file holder and its sub folders like this:    But in 14.04, the view style is changed into:    When I want to open the sub folder, I should click many times, especially the number of levels of sub folders is large.   So is there any way to back to the view style of file holder like 12.04? Thanks!

I'm using Ubuntu 14.04 LTS a little while and I consider myself a beginner.  I am using the Nautilus file manager:    I wonder if you can navigate the folders through the directory tree, like in Windows through folders or the + sign.


This is a follow-up question to  although the first question isn't really necessary to understand this one.    The command id seems pretty clear...  test@test ~ $ id test uid=1000(test) gid=1000(test) groups=1000(test),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),129(sambashare)   it shows the UID and GID of test (resp. its UPG) and then additionally lists all groups of which the user test is a member.    But then how should /etc/group be read?  test@test ~ $ less /etc/group | grep test adm:x:4:syslog,test cdrom:x:24:test sudo:x:27:test dip:x:30:test plugdev:x:46:test lpadmin:x:113:test test:x:1000: sambashare:x:129:test   The group-name at the beginning is pretty clear and also that the number is the GID; and after that the names of the group-members are listed. But why isn't the second last line test:x:1000:test instead of  test:x:1000: to indicate, that the user test is member of the group test?  bonus question: what is the x in the second column for?

Similar to , but different result set, can anyone help me with the output of getent group?  It's something like this:  groupname:x:0:   just not sure what the x:0: signifies?


If I write the following code:  var foo = [1, 2, 3, 4]; var bar = foo; Object.freeze(bar);   Does this mean foo is also immutable?  If not, how can bar remain constant if foo is updated?

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


If $X$ and $Y$ are independent random variables, is the following true? Is there an easy way to show this? $$E\left[\frac{X}{X+Y}\right]=\frac{E[X]}{E[{X+Y}]}=\frac{E[X]}{E[X]+E[Y]}$$ If this is not true in general, are there special cases when it is true (e.g. what $X$ and $Y$ are strictly positive and finite)?

$X_1$ and $X_2$ are two independent random variables whose expected values are known. I am trying to find the expected value of $(X_1/(X_1+X_2))$. Since $X_1$ and $X_1+X_2$ are dependent, I tried to use the formula for covariance to calculate the expected value of the product but this results in variance ($X_1$) being part of the resultant expression which is unknown. Is there any other way of finding the expected value of the expression $(X_1/(X_1+X_2))$?


We have a series $\displaystyle\sum^\infty_{n=1}a_n$ and a sub series $\displaystyle\sum^\infty_{k=1}a_{n_k}$ where $n_k\in\mathbb N$. Prove that $\displaystyle\sum^\infty_{n=1}a_n$ converges absolutely iff each each sub series converges. Hint: choose two converging sub series and use this to prove the original series converge absolutely.  $\Leftarrow$ Let there be two sub series for the odd and one for the even indexes of $a_n$, if both converge than the parant series must converge (but what if only one of them converge ? isn't that a counter example ?). $\Rightarrow$ Suppose $\displaystyle\sum^\infty_{n=1}a_n$ does not converge absolutely, than one of it's sub series diverges, in contradiction to the convergence of both sub series.

Question:  A subseries of the series $\sum _{n=1}^\infty a_n$ is defined to be a series of the form $\sum _{n=1}^\infty a_{n_k}$, for $n_k \subseteq \Bbb N$. Prove that $\sum _{n=1}^\infty a_n$ converges absolutely if and only if each subseries $\sum _{n=1}^\infty a_{n_k}$ converges.  Suggested solution:  $\Rightarrow$   We assume $\sum _{n=1}^\infty a_n$ converges absolutely $\Rightarrow \lim_{n \to \infty} |a_n|$=0. We know from the definition of series that it's actually the sequence of partial sums so $\sum _{n=1}^\infty a_n = S_n$. Therefore we can treat it like a sequence and say that it converges to L. Since $S_n$ converges to L, each of it's sub sequences also converge to L. Therefore $\sum _{n=1}^\infty a_{n_k} =S_{n_k} \to L$ as well.    $\Leftarrow$    We assume each subseries converges. Specifically the sub series $\sum _{\Bbb N even} a_n = A$  $\sum _{\Bbb N odd} a_n = B$ . Since these two series comprise all of the naturals, then  $\sum _{n=1}^\infty a_n =\sum _{\Bbb N even} a_n+\sum _{\Bbb N odd} a_n = A+B$ . Therefore it converges to A+B.   I would like to verify this proof, because I've given it a lot of thought, and still not 100 percent sure about it. Please hint me, and notify me about any mistakes. Thanks.


As from the subject, I want to see what's inside. I am seriously interested in finding the owner if possible and returning them, but I am worried it could be an attempt at social engineering. I own a MacBook Pro Intel with  (Snow Leopard). It is a very important install.  What would you do in my situation if you want to see the content without risks? Any proposal is welcome.  I decided not to plug them in, and I brought them to the hotel reception. They will forward it to the police.

I work at an embedded software company. This morning I found a USB stick in the parking lot in front of the building. With all the stories of "dropped USB stick attacks" in mind, I'm obviously not going to just plug it into my laptop. OTOH, I'm curious to know whether this was actually an attempt to compromise our systems, or it's really just an innocent case of somebody accidentally losing a USB stick. How do I safely inspect the USB stick without risking exposure?  I'm worried not just about malware and crafted file system images; there's also stuff like power surge attacks:.  EDIT: Many of the answers seem to assume I want to keep the drive and use it afterwards. I have no interest in that at all, I know USB sticks are cheap, and that it wouldn't be mine to keep anyway. I only want to know whether this was indeed a semi-targeted attack, partly out of curiosity whether this actually happens in real life and not just in security papers, but also so that I could warn my coworkers.  I want to know how I would figure out whether the stick contains malware. And that's not just a matter of looking at the drive contents and seeing a suspicious autorun.inf or a carefully crafted corrupt file system - I very much also want a way to inspect the firmware. I sort-of expected that there were tools for extracting that and comparing to known-good or known-bad binaries.


I do not get the following formulas :   The minimum perimeter of any triangle (abc), given the heights corresponding to the a and b-sides. The maximum height corresponding to the side b of any triangle (abc), given the value of its perimeter and height corresponding to the a-side.

I'm developing a web application that consists of a calculator triangles. Although I am not a mathematician, with paper, derive and Geogebra I managed to get a lot of formulas to calculate a triangle with the minimum number of data possible. Maybe some is unpublished, and limits to be introduced only correct data.  I do not get the following formulas :   The minimum perimeter of any triangle (abc) once known the heights corresponding to the $a$ and $b$-sides. The maximum height corresponding to the side $b$ of any triangle (abc) once known the value of its perimeter and height corresponding to the $a$-side.   I am looking for an answer in a way that could be implemented in php (programming language).


I just want to ask which is correct between the two sentences given.  You've found them. Or You'd found them.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


What is the basic difference between Lagrangian formulation and Hamiltonian formulations of mechanics? Why do we have two formulations when we can work with Hamiltonian most of the times (in quantum mechanics). I want to know a more conceptual answer rather than just the formulas.

Undergraduate classical mechanics introduces both Lagrangians and Hamiltonians, while undergrad quantum mechanics seems to only use the Hamiltonian. But particle physics, and more generally quantum field theory seem to only use the Lagrangian, e.g. you hear about the Klein-Gordon Lagrangian, Dirac Lagrangian, Standard Model Lagrangian and so on. Why is there a mismatch here? Why does it seem like only Hamiltonians are used in undergraduate quantum mechanics, but only Lagrangians are used in quantum field theory?


I've two field Date and a Picklist field Named Status with value;Active,Inactive,Pending.  I've written a time based workflow rule .  Evaluation Criteria: Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria.(because it should not fire after changing the other data)  Criteria: Status = Active  Action :fire email 1 hr before Date.  now when criteria matched, workflow fired and action will be in the Queue and it will fire at 1 hr before scheduled date. Its working fine.  The requirement is, when action will in queue and in mean time when I've changed the Status field to Inactive then action should not be fired. because record is not active.   Please suggest the workaround. thanks.

How can i deactivate the time based workflow action through code. If a time-based WF action is already schedule to send a mail on a date in near future. Can I change the date or deactivate the action through code.


Simple design question here:  In a Shoot'Em Up, where you often have to deal with hundreds of bullets / missiles / weird flying stuff, who's in charge of detecting collisions? The weapon or the ship?  As there is usualy less ships than bullets displayed on screen, I tend to believe that would be smarter if ships could be in charge of it. But is it really smarter?

I am developing a small 2D game engine. The characters have a paint method which currently does the following:   Calculate the new position of the character as per its speed, etc. Update the collision grid cell ** Draw the character at the new position   ** I have created a collision grid to reduce the number of intersection checks  Now the basic algorithm which I have thought for detecting collision is:   For Each Character     Check intersection with characters in surrounding 8 cells   I can simply place this code in the paint method. But here is the problem I anticipate.  Suppose two characters A and B lie in adjacent cells in the collision grid. Now as per the above algorithm in the iteration of character A it will detect that it has collided with B. In the iteration for character B it will detect that it has collided with A.  But I have an idea that when A detects that it has collided with B, it should inform B that it has collided with A. This would save lot of comparisons when there are more than 2 actors colliding. But I am not sure how to handle this. I think instead of every character checking for its collision, I should check for the collision inside the game loop.   Would this approach be correct? How have you handled this kind of problem? I thought of the collision grid thing myself. Are there any alternatives to collision grid logic?


I’m looking for a live-action TV show I saw in the USA on Sundays back in the 80's. It might have been on PBS, so possibly it was British.  It had a (CG?) metal pterodactyl or dragon-looking thing, kinda like  (one of the cassette tapes that comes out of Soundwave in Transformers).

I'm looking for the name of a sci-fi series, intended for children. Robots have control over the humans. There is a squad of humans who attack them. Every member in this squad has a badge on their suit, and when they touch this badge the suit becomes armed. This series was not cartoon series, it was performed by real people. The main robot character is very similar in style to Darth Vader in Star Wars. The series aired in the 1990s. I am sorry but I can't recall many details.


I have a Philippine ls passport and I want to renew my US tourist visa before it expires. Where can I get most likely approval: in my home country or where I currently reside with my spouse, South Africa (temporary resident visa only). Hoping for answers. Thanks!

I am currently a citizen of Russian Federation, but will be applying for a US B-type visa in Germany, because I need to attend a conference in the US in two months and visa waiting time in Russia is 300 days.  Do I need to justify the reason for applying in Germany while taking the interview? If yes, would the explanation above be enough?


I watched this "Animated Flag" Tutorial from Blender Guru and he didn't explain how to actually export the animation at the end of the video.  How do you export an animation in Blender?

Yesterday I was working on a simple animation, an animated logo.   Here is an image of the progress:    I already have the animation working and everything is okay with the project, but I can't figure out how I can render the animation and turn it into an AVI format video.  How do I render an animation in Blender?


I've just been re-reading the Harry Potter books for the hundredth time, and I'm finishing up The Chamber of Secrets, but I've found something weird.   Everyone who is petrified (and remember that they are petrified for months), just needs mandrake juice to cure them. Conveniently for the Hogwarts staff, Professor Sprout is growing some mandrakes with the 2nd years in old greenhouse 3.  Sure, it helps the narrative to have a long awaited mandrake juice so that they can't just ask Hermione, but it seems like they should have just gone to Diagon Alley and bought some mandrakes/mandrake juice. Otherwise, they could just send the students to St. Mungo's Hospital.   Is there ANY possible in-universe explanation for why they didn't just buy some? I mean, maybe they are rare, but Sprout bought enough babies for a full class, so they can't be that rare.  It seems like just a plot hole, but maybe Rowling mentioned it in some interview?  Note: I recognize there is one very similar question on the site already, but it was 5 years ago and not satisfactorily asked, or answered.

In Chamber of Secrets, it appears that Hogwarts is the only place in the entire country to get fresh mandrake juice to unpetrify the students/cat that were petrified by the Basilisk.    Wouldn't St Mungo's have had any, it being a hospital for magical maladies, whereas Hogwarts is just a school that happens to teach about herbology and have mandrakes growing?  Is it that much of an unusual ingredient for the potion required?


I am not able to prove it with euclidean evaluation $$ d(m+n\sqrt{7}) = |m^2 - 7 n^2 |$$. Is there any other way?

For which integer $d$ is the ring $\mathbb{Z}[\sqrt{d}]$ norm-Euclidean?   Here I'm referring to $\mathbb{Z}[\sqrt{d}] = \{a + b\sqrt{d} : a,b \in \mathbb{Z}\}$, not the ring of integers of $\mathbb{Q}[\sqrt{d}]$.  For $d < 0$, it is easy to show that only $d = -1, -2$ suffice; but what about $d>0$?  Thanks.


I am using Python 3.8. I have below list: [['Bangalore', 116.0], ['Mumbai', 132.0], ['Kolkata', 234.0]]  then I have created as a node & added in successors list like this: successors = [<__main__.Node object at 0x7f89582eb7c0>, <__main__.Node object at 0x7f89582eb790>, <__main__.Node object at 0x7f89582eb7f0>]  I have created a fringe list & adding each successor node. After than sorting it based on distance value. I am getting error - '<' not supported between instances of 'node' and 'node' for succ_node in successors:     fringe.append(succ_node) fringe.sort() <- Error Here  This is my node class: class Node:     def __init__(self, parent, name, g):         self.parent = parent         self.name = name         self.g = g  What am I doing wrong?

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves.  The list looks like:  >>> ut [<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>,  <Tag: aes>, <Tag: ajax> ...]   Each object has a count:  >>> ut[1].count 1L   I need to sort the list by number of counts descending.  I've seen several methods for this, but I'm looking for best practice in Python.


What's the adverb for the state of being panickily instantaneous? For example, when you play an action game, fighting a large bunch of enemies under great pressure, you just tap buttons ...ly in fear of losing the fight, while what you're supposed to do is be steady and calm.

I am looking for the verb or expression to use to describe when for instance you type quickly and nervously on your computer keyboard, perhaps to find something (on a search engine for instance).


I am using Emacs+Auctex. I need additional highlighting in math mode. How can I force Emacs to highlight braces and some commands (like \quad) inside math mode with different color?

I'm using Emacs with AUCTeX to do all my LaTeX. When it comes to syntax highlighting it seems that all mathematics is by default just orange. Do you know of a mode or package that adds some more fine grained syntax highlighting? For example all commands (\foo), matching braces, sub- and superscripts, etc. should get a different color.


My indentation has stopped working after one section of my document. Here is the beginning code:   \documentclass[11pt]{article}   \usepackage{amsfonts}   \usepackage{amsmath}   \usepackage{amssymb}   \usepackage{lastpage}   \usepackage[margin=0.85in]{geometry}   \usepackage{graphicx}   \usepackage{tabu}   \usepackage{textcomp,gensymb}   \usepackage{caption}   \usepackage{float}   \usepackage{indentfirst}   \usepackage{multirow}   \usepackage{array}   \usepackage{subcaption}   \setlength{\parindent}{6.5ex}   \setlength{\parskip}{1.5em}    \begin{document} This is the part when it does work anymore.  \section{blah blah}   Blah blah blah, $math$, blah blah, like blah:   \begin{gather*} more math \\ more math \\ more math \end{gather*}   Blah blah...   \end{document}   When I start including math environments within the paragraphs and outside, it does not seem to work anymore, what ever I try. I have tried using the \indent, using \setlength{...}, specifying all paragraphs using \par at the end, ending with \\, nothing works.   This is the part when it does work anymore.  \section{blah blah}   Blah blah blah, $math$, blah blah, like blah:   \begin{gather*} more math \\ more math \\ more math \end{gather*}   Blah blah...    After this section, no indentation works.

I am trying to write a text where the first line of each paragraph has an indent(tab). But for some reason, in a chapter or a section or subsection, except the first paragraph, the rest of the paragraphs have an indent(tab). Is there any way to add an indent to the first paragraph in a chapter or section or subsection?


Is $1$ and $-1$ the Supremum and Infimum of the set $A=\left\{\sin(n), n \in \mathbb{N}\right\}$ I actually assumed, let $M=Sup(A)$ and $M <1$, now if we could find a $k \in \mathbb{N}$ such that $\sin k>M$, then we can say that $1$ is the supremum of the set.But how to go about finding $k$?

My classmate asked a question during lecture about our discussion of bounded sequences, particularly the sequence $\sin(n)$. His question was, What is $\sup(\sin(n))$?


i added a folder to the machine in VirtualBox, but from inside Ubuntu i can't get to the shared folder.  host: windows 10 guest: ubuntu 18.04

I followed the steps for sharing folders between Windows 7 and Ubuntu in VirtualBox.  Despite that the folder appears with a X sign and gives me the following message when a try to open it:     The folder content could not be displayed   When I choose Shared Folder from the VirtualBox Device menu, the following warning is displayed:     On the system page, you have assigned more than 50% of your computer's memory (2.93 GB) to the virtual machine...   How can I successfully share folders between Windows and Ubuntu using VirtualBox?


I have the following Android program code. It does not work even I input "admin", the correct answer. Then I Toast my input which exactly the same as the == "admin". But it still does not work !!! Is there any trick ? Please help !! Many thanks !!  EditText etPassword =(EditText) findViewById(R.id.etPassword); String t_etPassword =etPassword.getText().toString();  // display the t_etPassword for checking since the "if" does not work Toast.makeText(getApplicationContext(), "<<" +t_etPassword +">>", Toast.LENGTH_SHORT).show();  if (t_etPassword == "admin") {     Intent intent = new Intent(getBaseContext(), ContactListActivity.class);     startActivity(intent);    } else {     Toast.makeText(getApplicationContext(), "Un-Authorised Access !!", Toast.LENGTH_SHORT).sho();     }   } });

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 installed a few hours ago Ubuntu 14.04 and since I started using it I'm seeing a weird error always appearing in terminal :  [ 3099.912152] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires Package (20140424/nsarguments-95) [ 3099.912316] ACPI: \_SB_.PCI0.PEG0.PEGP: failed to evaluate _DSM [ 3099.912343] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)   This error appears randomly when I'm writing in the terminal (not when I confirm a command, only when I'm looking at a terminal and not necessarily logged). Note that it occurred one time in the graphic terminal but never occurred again. Since that time it always happened in the Ctrl +Alt+Fx terminal.

Output of dmesg:  In the dmesg, there is the below error:  ACPI Warning: \_SB_.PCI0.RP01.PXSX._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)   which seems like BIOS or something related error.  How do I fix this? Is there any case to be related to this bug?   (I had filed this bug and am just using a new OS on the same machine.  Other details:   ~  lsb_release -a No LSB modules are available. Distributor ID: neon Description:    KDE neon User Edition 5.8 Release:        16.04 Codename:       xenial  ~  uname -a Linux neon 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux


First I noticed that Math.Round() doesn't round for 2 digits as I as for:  double dd = Math.Round(1.66666, 2);   Result:  dd = 1.6699999570846558;   and then I created a new project with same .NET framework and the result is 1.67 now as it should been in the first place.  I've never seen Round behaving like this before, what is causing this problem?

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


released 0.95 in June 2015 and 1.0 in May 2016, yet all I find for packages are various compiles of 0.91. Is there a problem with versions 0.95 and/or 1.0 that preclude any of debian-dom from using a recent driver?  Edit:  This is different than questions/answers about basic version-lag (e.g., ). That link discusses individual ubuntu releases, but the last release to FreeTDS was two full Ubuntu releases ago. The last version change in the freetds package was over four Ubuntu releases ago.  It appears that this package is being held back because (a) debian has not updated it, and (b) ubuntu has not. I understand version-lag and feature-freeze. That is not my question. There are definitely examples of second-order side-effects where upgrading a library cascades harshly through many applications that depend on it.  My question, restated: what incompatibilities are there in newer versions of FreeTDS that might be holding back a package update?  I'm expecting an answer along the lines of:   v0.95 (and above) break applications X, Y, and Z, so it is being held back pending fixes. There are no known problems. There has been no perceived need to upgrade it. The maintainers have not been concerned enough with TDS versions above 7.1 (e.g., SQL Server > 2000 and Azure use 7.2-7.4, with ) to put in the effort.   I'm not concerned with #2, it's perfectly understandable (with an easy workaround: compile it manually and do not rely on package management). I'm nervous about #1, where I may be bitten in the future.

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


I'm currently using the  to create a simple HTML/CSS editor. While FastColoredTextBox comes with some predefined formatting rules for HTML, etc. There is not one for CSS. It does support custom ones though.  This is where my problem is. I'm trying to write three Regular expressions to select the selector e.g. "div", the attribute e.g. "color" and the value e.g. "#fff" but I can't get them to work quite right.  Does anybody have any example of CSS regular expressions? Or does anybody know what they should be?  Thanks a lot

My program need to parse css files into an in-memory object format. Any advice on how this should be done ?


I don't use things like Ubuntu One. How do I disable it from Startup Applications? I believe it is hidden by default along with some other apps.

How do I manage (add/remove) all the startup applications in Ubuntu 11.10 and up?  Startup Applications doesn't show all the applications which are started during boot.


I bough droplet on DigitalOcean 1GB and 1CPU. I'm running cronjob there. Currently I'm able to run 30 background tasks(processes) at once, once I go up server cannot handle that much.  Those background processes are sending requests to an endpoint, collect a data to array and then send it to another endpoint. Each task process 100 data.  Can you help me choose the right server. I'd like to run at least 100 tasks(processes) in the background at once. Should I buy more RAM or CPU?  Here is current usage, I don't see that server is overloaded with 40 tasks but it can't handle it:    What am I doing wrong?

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?


Let's say I've used wild shape to assume the form of a mammoth that has 126 hit points. I take 26 points of damage, putting me at 100 hit points. If I use my next turn to take a bonus action to exit wild shape then an action to use wild shape to assume the form of a mammoth again, do I now have 126 hit points or 100 hit points?

I have a character that has Inspiring Leader, and I can grant temporary hit points to my team members.  We have a Druid in the group that tends to use Wild Shape frequently.  When the Druid uses Wild Shape, do the Temporary Hit Points transfer over to the new form, or are they "attached" to the original form?  Is there anything in the books that handle this?


$K \leq E$ an algebraic extension. I am asked to show that each subring of $E$ that contains $K$ is a field.  I have done the following:  $K \leq E$ algebraic $\Rightarrow \forall a \in E, \exists f(x)\in K[x]:f(a)=0$  A subring of $E$ that contains $K$ is $K[a], \forall a \in E$.  Since $a$ is algebraic over $K$,it stands that $K(a)=K[a]$.  Therefore, a subring of $E$ that contains $K$ is $K(a),\forall a\in E$, where $K(a)$ is a field since it is a ring and $1\in K(a)$ so $1=f(a)g^{-1}(a)\Rightarrow f^{-1}(a)=g^{-1}(a)\in K(a)$.  Is this correct??  Or is there something I could improve??

Let $E|F$ be an algebraic field extension and a ring $K$ such that $F\subseteq K\subseteq E$. It is true that $K$ is a field?


This question could seem dumb but both ($this and self) works to call a static method.  However, what is the correct way?  I personally tend to use "self" because the private static method is like an utility function which doesn't use any object states.  $data = self::calcSoldeNextMonths('sl', $data, $toSub); $data = $this->calcSoldeNextMonths('sl', $data, $toSub);

In PHP 5, what is the difference between using self and $this?  When is each appropriate?


NEW to elegant and not sloppy Javascript (I want to produce nice code)  I'm having a problem with my script:  'use strict';     let $openSearch = $('#menu-item-16095 i');     let $searchform = $('.x-searchform-overlay');     let $closeform = $('.x-searchform-overlay.in');     $openSearch.click(function() {         $searchform.css('display', 'block');         $searchform.addClass('in');     });     $closeform.click(function() {         console.log('ciao');     });   As you can see, my code is to create a layout for a menu (full-page) when I click a button, and consequently to close it from the parent. I won't add the CSS or the HTML but long story short it works, except for a caveat:  If I add the class in I can create a jquery variable because, the moment the page loads and create the DOM that div hasn't been created yet, so when I try to click it to "close" (display-none) my div, it is not going to work.  I'm trying to find a workaround but so far I've not been lucky.  Any suggestion?

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 am trying to write a query to pick one entry for each item for each month but the latest in the month from the following table:  Name  | Date      | Value a     |2015-01-01 |   1 a     |2015-01-02 |   2 b     |2015-01-03 |   1 b     |2015-01-04 |   1 b     |2015-01-03 |   3 c     |2015-01-02 |   2 c     |2015-01-29 |   10 a     |2015-02-10 |   2 a     |2015-02-20 |   1 c     |2015-02-10 |   2 c     |2015-02-22 |   23 b     |2015-02-25 |   1 b     |2015-02-19 |   2   return should be:   a     |2015-01-02 |   2  b     |2015-01-04 |   1  c     |2015-01-29 |   10  a     |2015-02-20 |   1  b     |2015-02-25 |   1  c     |2015-02-22 |   23   I wonder how would this be achieved instead of sending multiple queries to SQL server for each month I would like to load all the values with one query then filter the collection on the memory. Otherwise I would end up writing a query as below:  SELECT Name,Date, Value FROM MyTable mt INNER JOIN ( select max(Date) as MaxDate     FROM [MyTable] m WHERE YEAR(Date) =YEAR(@date)       AND MONTH(Date)=MONTH(@date)) mx ON t.Date = mx.MaxDate)   And this query needs to be run for each month.  Any better idea to return all entries with a single query?   Thanks,

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


I have already purchased Red Dead Redemption on Xbox 360, and played through it without any DLC content.  I was wondering the GOTY edition has extra add-on content compared to just buying the Undead Nightmare DLC.

I know that it includes the regular Red Dead Redemption game & the Undead Nightmare DLC, but are all of the other DLC's included also? Is everything included on the disc or do they just include a DLC code so you can download the additional parts?


td;tr I'm trying to do my hello-world with creating my own normal maps. I've took this . I'm doing exactly as in the tutorial. This is my "low-poly" cube.  This is my "high-poly" cube.  Node setup  And selection during baking, just in case.  But instead of correct normal map I get this weirdness.  Can anybody explain why this happens, please.

I'm trying to bake a normal map from a high poly mesh, and apply on a low poly mesh (in Unreal Engine 4). Bare with me as I'm new to Blender, and especially new to normal map baking with Blender.  I'm not sure how to accomplish this task. The guides I've seen and read, explain how to uv unwrap the low poly mesh -> select the high poly -> shift-select the low poly -> hit bake (normal -> "Selected Active").  For some reason, everything shows up completely blue (no color variation -> No elevation information), and I'm not sure how to accomplish the baking?  The UV of the low poly:    Normal Map:    Low poly VS. High poly:    Could anyone help me?  EDIT:  Of course I'm aligning the 2 meshes so Blender can read the elevation differences.


My computer has 16GB RAM and 1TB SSD. So I think the swap partition is not really needed.  What's the pros and cons of disabling the swap partition if the RAM is large enough?  Is it recommended to disable the swap partition in such a case?

Using swap space instead of RAM can drastically slow down a PC.  So why, when I have more than enough RAM available, does my Linux system (Arch) use the swap?  Checkout my conky output below:    Also, could this be the cause of speed and system-responsiveness issues I'm having?  Output of free -m :  $ free -m              total       used       free     shared    buffers     cached Mem:          1257       1004        252          0         51        778 -/+ buffers/cache:        174       1082 Swap:          502        144        357


I'm using 14.04 LTS. Installed programm is truecrypt-6.3a-setup-ubuntu-x86 I installed via following command  sudo ./truecrypt-6.3a-setup-ubuntu-x86   Ubuntu software center doesn't show me installed truecrypt None of   sudo apt-get remove truecrypt sudo dkpg --remove truecrypt   works. It shows me that truecrypt doesn't installed.  apt-cache pkgnames | grep true   returns none of either truecrypt or something similar Well, it probably should go, but I cannot find /usr/bin/truecrypt-uninstall.sh as well as usr/share/truecrypt-uninstall.shsearchmonkey returns zero of truecrypt except truecrypt.mod and downloaded files What can I do?

I installed TrueCrypt from their website (.tar.gz file) extracted through the archive manager to /usr/share/truecrypt. I no longer need the app but I cannot uninstall it through  sudo apt-get remove   I get an error message:  'virtual packages like truecrypt cannot be removed'.    All of the sub-directories and files in /usr/share/truecrypt have a padlock symbol on them.  I don't know how to remove unwanted apps beyond these basics, I'm hoping you can help. I have a small(memory),  elderly Toshiba Satelite laptop so it doesn't need to carry any baggage.  Thanks,  David


I've installed Ubuntu on one partition which utilizes all disk space (if we're ignoring the NFTS partitions). I forgot to define a swap partition.   How do I make a swap partition after installation? I need to "borrow" from the current one. I defined the current partition as logical and not primary. Is that a problem? Should/Can I change it?   Thanks!

I did not create a swap partition during Ubuntu installation.  Later, I freed up some space and made a swap partition.  Now after each boot up, I am manually opening gparted to right-click the swap partition to turn on the 'swapon' option.  How can I automatically enable the swap partition at boot?  Also, if I had not created the swap partition, what are my other options?


The new button in Contact related list on the Account page points to a VF page which serves as an extra step to create a new Contact (to require them to enter certain info).  Normally, when the new button is standard, AccountId is valued on the new Contact record.   How can I get that AccountId to my controller so I can set it on the new Contact record?

As the user goes into an account, there is a custom button that they can click that will redirect them to my Visualforce page.  How can I capture that account id  in my controller?  Thanks  public myControllerCBR(){     breachRecord = new List<wrapperClass>();      AccountTeamMember uId = [SELECT UserId FROM AccountTeamMember WHERE AccountId =:ApexPages.CurrentPage().GetParameters().Get('id') and TeamMemberRole = 'Sales Engineer' limit 1];      List<User> uName = [SELECT Name, Manager__c, MANAGERID, Email, MOBILEPHONE FROM User WHERE Id =:uId.UserId limit 1];       for(User rept : uName){         breachRecord.add(new wrapperClass(rept));     }  }   See button setup:


So I'm toying with the traveling salesman problem, and I have the following code to create random instances of the TSP. (tangent, does TSP stand for Traveling Salesman Problem, or Traveling Sales Person? in otherwords, is TSP problem redundant? But back to the main problem...)  import numpy as np import random import copy def generate_TSP(num_nodes, symmetric=False, triangleInequality=False, rangeStart=0.0, rangeEnd=100.0, dropEdges=0.0):     tsp = [ [0]*num_nodes ] *num_nodes     for i in range(num_nodes):         for j in range(num_nodes):             if i == j:                 tsp[i][j] = np.inf                 continue             else:                 tsp[i][j] = round(random.uniform(rangeStart, rangeEnd), 2)             if symmetric:                 tsp[j][i] = copy.deepcopy(tsp[i][j])             if np.random.rand() < dropEdges:                 tsp[i][j] = np.inf     return tsp   The Problem is that when I call generate_TSP(4, symmetric=True) it doesn't return a symmetric matrix. Instead, every row in the matrix is the same as the last row. I figured this has something to do with python assigning by reference instead of value or something like that, so I've tried it with the deep copy and without. Forgive my C++ ways, but I don't quite understand python's reference vs value system.  Here's an example of the output  josephfs@DESKTOP-IH0RR0A:~/cs312/TSP$ python3 Python 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0] on linux  Type "help", "copyright", "credits" or "license" for more information. >>> import TSP >>> print(TSP.generate_TSP(4, symmetric=True)) [[91.87, 15.11, 52.67, inf], [91.87, 15.11, 52.67, inf], [91.87, 15.11, 52.67, inf], [91.87, 15.11, 52.67, inf]]

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


How can I check the debug logs for my trigger when some goes to my website and clicks a button that inserts records on salesforce?

I am trying to setup a trace flag to debug. When I select User in the dropdown and try to find System in there. It doesn't show up. What can I do ?


I am measuring the voltage of a 24 V battery using the ADC from Arduino Uno. I use a voltage divider to bring the voltage below 5V (the maximum the ADC can accept).  I noticed that as long as the ratio of R1 and R2 is the same for my voltage divider - it's better to use higher resistance values to avoid slowly discharging the battery. I tried using resistors up to mega-ohm range. What do I sacrifice by using higher and higher resistances? The intuition tells me, that this cannot go forever, because high enough resistor would be equivalent to an open circuit.  By reading other similar questions it seems I might be sacrificing accuracy, but I am not sure, as other questions typically have a different setup.  If it is accuracy, is there a formula for that? When does the standard voltage divider formula break down? Giga-ohms, Tera-ohms? How to calculate that?    P.S. I am aware of , however the answer there seems very convoluted, comparing load and no-load scenarios (where I don't have any load at all). If that is the answer, I do not understand it.

I understand that the output voltage is determined by the ratio between the two resistor values, and that if the both resistors are same then output voltage will be exactly same for all; but what's the basis of picking the resistor values?there is any need of consider output current to choose resistor value.


Define $P=\{M\subset G: M\unlhd G, M\neq G\}$.  Let $\mathscr{C}$ be a chain of $P$.  I have shown that $\bigcup \mathscr{C}$ is a normal subgroup of $G$, but i don't know how to prove $\bigcup\mathscr{C}\neq G$. Moreover, i'm not sure whether this is true.  Is it true? If so, how do i prove it is not $G$?

$G$ is an infinite group.  Is it necessary true that there exists a subgroup $H$ of $G$ and $H$ is maximal ?  Is it possible that there exists such series $H_1 < H_2 < H_3 <\cdots <G $ with the property that for every $H_i$ there exists $H_{i+1}$ such that $H_i < H_{i+1}$?


Find all $|kh - ij|$ such that there are infinite integers $x$ such that $gcd(xh + i, xj + k) = 2019$ given that $(h, i, j, k)$ are all integers.   I tried using the Euclidian Algorithm, but I'm not that good with mods so I didn't get anywhere.

I was working on number theory homework, and this problem was the second part to  problem.  Let $a,b,c,d,m$ be constants and $n$ and $k$ be coprime such that there are infinitely many values of $x$ that satisfy  $$ax+b=mn$$ $$cx+d=mk$$  Find the values of $ad-bc$ such that the above is true.   Now, according to the answer suggested above, these equations are true if $n \equiv b/m\pmod a,$ and $k \equiv d/m\pmod c,$ but I can't really find any insight on how to find the values of $x$ that would help with this part of the problem.


Example: Fighter is engaged in melee combat with enemy. Warlock uses eldrich blast with "Repelling Blast" invocation. The enemy is pushed 10 ft. away. Is that creature no longer engaged in combat with the fighter? Would this free movement provoke an attack of opportunity?

If I cause an opponent to leave my reach with an ability, spell, or effect can I use my reaction to take an Opportunity Attack against them?


I have Ubuntu 10.04 LTS 64 bit OS. How do I install tor so that it works and doesn't give me an error message? I got tor as an archive file (tar.gz) and I have an amdx64 architecture. I am new to linux as I am coming from a windows background. Please help.

I tried to install Tor on my new version of Ubuntu, but it seems that Tor is not available in the repositories.  How else can I install and use Tor?