I just had an odd experience on .    I asked the question. Another user (Rathony) answered and edited the question. I got notifications on both of these. Some time passed. Another user, origimbo, answered, and I got a notification. Another user, abelenky, answered, but I did not get a notification, nor did the answer appear on any refresh of the page done in the period between this step and step 9. Rathony made a comment on the question referring to multiple "new answers" (i.e. origimbo's and abelenky's). I refreshed the page multiple times, but could only see one new answer, and noted that in a reply comment. Even after the reply comment was posted, I kept refreshing and could only see origimbo's answer (and Rathony's).   On a subsequent refresh a few minutes later, abelenky's answer appeared.  No notification ever appeared in my Stack Exchange inbox regarding this answer.   According to a comment that disappeared shortly after abelenky posted it, abelenky had posted his answer (and apparently Rathony then loaded the page), then abelenky quickly deleted the answer to make some edits before undeleting it again, after which point it was posted as a visible answer to the question, without notification to the question-asker.  The basic action here was that of posting an answer, though it easily could have escaped notice unless someone happened to be manually looking.    Should answer undeletions (especially answers the question-poster had no tracked interaction with) be notified in a similar manner to answer postings, as in both cases there is one additional answer posted to the question?

I  and . This answer does not appear in my inbox. I never saw a notification, and as of now the latest notification from CS is  {"SiteUrl":"cs.stackexchange.com","FaviconUrl":"https://cs.stackexchange.com/favicon.ico","CreationDate":"17 hours ago","Url":"https://cs.stackexchange.com/questions/641/language-of-the-graph-of-an-affine-function/667#667","Title":"Language of the graph of an affine function","Summary":"Hint:\n\n$53 \\cdot 100000010000000000 + 4 = 5300000530000000004$.\n\nSketch:\n\n\n  ! Assume $a$ has $n$...","Type":"answers","Count":3,"IsNew":false}   This answer was posted, deleted and undeleted while I wasn't online. I suppose the deletion removed the entry from my inbox. Then the undeletion should have recreated an entry but didn't.


I want to strike out the superscripts and subscripts for an expression like  $$\Gamma^{\lambda}_{\mu\nu}$$  I tried the ulem package:   \usepackage[normalem]{ulem}  \sout{Hello World}   and the soul package   \usepackage{soul} \st{Hello World}   But neither of worked.   My Question  How do I strike out indices?

How can I strikeout words in math mode (similar to \sout with \usepackage{ulem} in text mode)? I've tried \usepackage{cancel} and \(\cancel{1+1=2}\) but that draws a diagonal line.


I am trying creating two tables, aluno = student and  usuario = user. MySQL Workbench keep showing me that codigo in table usario doesn´t exist. Anyone can help me plz?  drop database `web2`;  CREATE DATABASE `web2` DEFAULT CHARSET latin1;  USE `web2`;  CREATE TABLE `aluno` (    `id_aluno` bigint(20) not null auto_increment,    `nome` varchar(100) not null,    `cpf` varchar(20) not null,    `rg` varchar(20) not null,    `dataDeNascimento` date not null,    `endereco` varchar(50),       `cidade` varchar(150),       `telefoneFixo` varchar(14),    `telefoneCelular` varchar(14),    `email` varchar(30) not null,       PRIMARY KEY (`id_aluno`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;  INSERT INTO `aluno` (`id_aluno`, `nome`, `cpf`, `rg`,`dataDeNascimento`, `endereco`, `cidade`, `telefoneFixo`,  `telefoneCelular`,`email`) VALUES ('1', 'Marcela', '255665696363', '2153263699',  '1985-07-08', 'Rua Hum', 'Belo Horizonte', '(35)54321-9876', '(35)54321-9876','marcela@bh.mg');  INSERT INTO `aluno` (`id_aluno`, `nome`, `cpf`, `rg`,`dataDeNascimento`, `endereco`, `cidade`, `telefoneFixo`,  `telefoneCelular`,`email`) VALUES ('2', 'Paulo', '275865696361', '2183255599','1983-02-05', 'Rua Dois', 'Bela Vista', '(11)12345-6789',  '(11)12345-6789', 'paulo@saopaulo.sp');   INSERT INTO `aluno` (`id_aluno`, `nome`, `cpf`, `rg`,`dataDeNascimento`, `endereco`, `cidade`, `telefoneFixo`,  `telefoneCelular`,`email`) VALUES ('3', 'Marcos', '275812656361', '2183255599','1983-02-12', 'Rua Dois', 'Bela Vista', '(11)12345-6790',  '(11)12345-6789', 'paulo@saopaulo.sp');  INSERT INTO `aluno` (`id_aluno`, `nome`, `cpf`, `rg`,`dataDeNascimento`, `endereco`, `cidade`, `telefoneFixo`,  `telefoneCelular`,`email`) VALUES ('4', 'Rodolfo', '569865696361', '2183255599','1983-05-28', 'Rua Dois', 'Bela Vista', '(11)12345-6791',  '(11)12345-6789', 'paulo@saopaulo.sp');  INSERT INTO `aluno` (`id_aluno`, `nome`, `cpf`, `rg`,`dataDeNascimento`, `endereco`, `cidade`, `telefoneFixo`,  `telefoneCelular`,`email`) VALUES ('5', 'Larissa', '275865696361', '2183255599','1983-02-01', 'Rua Dois', 'Bela Vista', '(11)12345-6792',  '(11)12345-6789', 'paulo@saopaulo.sp');   CREATE TABLE `usuario` (    `id` bigint(20) not null auto_increment,       `login` varchar(10) not null,    `senha` varchar(10) not null,       PRIMARY KEY (`id`),    FOREIGN KEY (`codigo`) REFERENCES aluno (`id_aluno`),    UNIQUE KEY (`login`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;  INSERT INTO `usuario` (`id`, `login`, `senha`, `codigo` ) VALUES ('1', 'marcela', '54321', '1');  INSERT INTO `usuario` (`id`, `login`, `senha`, `codigo` ) VALUES ('2', 'paulo', '12345', '2');  INSERT INTO `usuario` (`id`, `login`, `senha`, `codigo` ) VALUES ('3', 'gustavo', '52321', '3');  INSERT INTO `usuario` (`id`, `login`, `senha`, `codigo` ) VALUES ('4', 'leandro', '19315', '4');  INSERT INTO `usuario` (`id`, `login`, `senha`, `codigo` ) VALUES ('5', 'bruna', '14045', '5');

I have these two CREATE TABLE statements:   CREATE TABLE GUEST (   id int(15) not null auto_increment PRIMARY KEY,   GuestName char(25) not null );  CREATE TABLE PAYMENT (   id int(15) not null auto_increment   Foreign Key(id) references GUEST(id),   BillNr int(15) not null );   What is the problem in the second statement? It did not create a new table.


Im trying to do a fire simulation.  Although I have it as fire on setting Physics property panel, my simulation still showing only smoke. Can anybody please tell how to fix this? Thanks in advance.

Good day! I am having a problem wherein fire does not render. I followed a . Followed everything in his tutorial. However, the fire in my scene does not render at all. I wanted it to look like rocket thrusters. As of now, this is what I currently have for my Smoke Domain material.  I temporarily set the smoke to 0 because it may be blocking the flame. I've provided the screenshots where the smoke is enabled and disabled. (Forgive the quality of the rendered images, I lowered down the samples to quickly render the image.  And for my scene, this is what it looks like.  I am rendering it using GPU compute. If there's anything missing in the  current scene setup, just ask for it and i'll provide the necessary requirements. I tried searching for solutions but nothing worked out for me. Thank you and have a nice day!


In Windows, we have the Windows task manager which can be used when the system becomes stuck or any programs become stuck (ie, ctrl+shift+esc). We can close the hung programs using this. I'm not too familiar with Ubuntu, are there any alternatives in Ubuntu for this purpose?

Is there any UI in ubuntu like the one in Windows to kill the processes forcefully.  My google chrome application is stuck and i can't close it, need to do it forcefully.Please help !


Is there a simple command to find out which DNS server I'm using right now? Preferably without resorting to tcpdump or parsing log files?  I found a lot of stuff about nm-cli and other nm-tools but that doesn't apply to a server...

Is there a command to list dns servers used by my system?  I tried   $ cat /etc/resolv.conf  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1 $ cat /etc/network/interfaces  # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback   But it doesn't list any servers, if I go to "Network Manager GUI Tool", in Wireless section it lists "DNS 192.168.1.1 8.8.8.8 8.8.4.4"  Can I get same information from command line?  I am using Ubuntu 12.04 LTS


Well,if theoretically we say the value of a resistor is zero then will there be any heat dissipation across the resistor(because heat is produced only when there's a resistance to the flow of current.)If there's zero resistance then won't current simply go on flowing?

Imagine a circuit consisting of just a battery and conducting wires which have zero dissipativity so that there is no loss of energy( Zero resistance). If the wires are connected to both terminals the current will flow in the direction of lower potential. Can we say that there has been a voltage drop in the current in going from positive terminal to negative terminal? I asked this question because  voltage drop happens across resistor and I don't understand why it should occur only there. Because  I think, considering a positive test charge its electric potential should decrease  as it travel from higher potential to lower potential  whether any dissipation occurs or not.Does voltage drop refers to loss in total energy of electron i.e. because in this case KE + Electric potential will be zero and the total energy of electrons remains unchanged and thus we can says that voltage drop is zero. Is voltage drop(assumed here to mean loss in electric potential) equal to work output under normal conditions. I think no - because electric potential difference gets converted into kinetic energy of electrons out of which only some gets converted into heat or is it the case that in a resistor entire kinetic energy gets converted into another energy such as heat? Is electric field inside circuit constant? If yes how? Will not the shape of circuit matter?


I'm quite new to statistics, so please bear with :)  I'm trying to estimate the uncertainty of a variable which is predicted using a linear equation. The linear equation is estimated with a series of observations. These observations have uncertainty in them.   I have dependent variable Y, an independent variable X, and an uncertainty in Y of u    Doing a linear regression produced the following parameters    Now, when I use the parameters and predict a Y value for an X lets say X = 4.5. With the parameters, we get a Y = a*4.5 + b  Doing Root Square Sum on Standard Errors of a and b gives 0.1426.   Is this the right way to estimate uncertainty from a linear regression prediction. Also this does not seem to take into account the uncertainties in the initial U of Y.   Sorry if this is a trivial question, but any help is much appreciated.  Thanks

I am trying to understand the origin of the curved shaped of confidence bands associated with an OLS linear regression and how it relates to the confidence intervals of the regression parameters (slope and intercept), for example (using R):  require(visreg) fit <- lm(Ozone ~ Solar.R,data=airquality) visreg(fit)     It appears that the band is related to the limits of the lines calculated with the 2.5% intercept, and the 97.5% slope, as well as with the 97.5% intercept, and the 2.5% slope (although not quite):  xnew <- seq(0,400) int <- confint(fit) lines(xnew, (int[1,2]+int[2,1]*xnew)) lines(xnew, (int[1,1]+int[2,2]*xnew))     What I don't understand are two things:   What about the combination of 2.5% slope & 2.5% intercept as well as 97.5% slope and 97.5% intercept? These give lines that are clearly outside the band plotted above. Maybe I don't understand the meaning of a confidence interval, but if in 95%  of the cases my estimates are within the confidence interval, these seem like a possible outcome? What determines the minimum distance between the upper and lower limit (i.e. close to the point where the two lines added above intercept)?    I guess both questions arise because I don't know/understand how these bands are actually calculated.   How can I calculate the upper and lower limits using the confidence intervals of the regression parameters (without relying on predict() or a similar function, i.e. by hand)? I tried to decipher the predict.lm function in R, but the coding is beyond me. I'd appreciate any pointers towards relevant literature or explanations suitable for stats beginners.  Thanks.


D=-1,-2,-3,-7 and-11 are the only five negative square free integers for which the corresponding quadratic Rings are Euclidean domains. Also D=-19,-41,-43 and-167 are the only four square free negative integers for which the  corresponding quadratic rings are PIDs but not EDs. Are there any negative square free integers <-167 for which the corresponding quadratic rings are UFDs but not PIDs? Thank you in advance for your valuable time.

I am looking for a reference which has a self-contained (elementary, that is, at the "undergraduate algebra level") proof of the the fact that any one-dimensional Noetherian UFD is a PID. Does anyone know such a reference?   (Note: I have looked at the similar questions on this website but don't find them particularly useful).


Light has energy, so does that mean it has mass due to what  tells us? And if light does have mass, then how does it still travel at the speed of causality? I feel like I'm getting confused between relativistic mass and rest mass or I'm misinterpreting $E=mc^2$.

Photons are massless, but if $m = 0$ and , then $E = 0c^2 = 0$. This would say that photons have no energy, which is not true.  However, given the formula $E = ℎf$, a photon does have energy as $ℎ$ is a non-zero constant and photons with a zero frequency do not exist.  What am I missing here, or does the famous formula not apply to photons?


I am right now playing with some code to try & get more familiar with Python & I made a change calculator in which you input a certain amount of money & it gives you the change you have to return (In Euros). However, I saw it would sometimes give a faulty result for the €0.01 change.  After doing some research, I saw the results for (x mod 20) would give a very strange number. For example, 20.03 mod 20 gives 0.030000000000001137. This problem also occurs for modulo 0.02 (in which the result becomes 0.030000000000001136). My code is as follows:  money = 20.33   # Input here the amount of money you would like to change moneydivs = [500, 200, 100, 50, 20, 10,              5, 2, 1, 0.50, 0.20, 0.10, 0.05, 0.02, 0.01] list = [] i = 0 countpos = 0 moneyoriginal = money   def printlines(pos):     print(f'{list[pos]} pieces of €{str(moneydivs[pos])}')   print('-----------[Steps in between (For bug hunting)]-----------') for num in moneydivs:     if money == 0:         break     list.append(int(money // num))     print(f'num = {num} & '           f'floor devision = {money // num} and modulus = {money % num}')     money = money % num     countpos += 1  print('-----------[Casual output itself]-----------') print(f'To change {moneyoriginal}, you have to give:') while i < countpos:     if list[i] == 0:         i += 1         continue     if i > 8 and i < 12:         moneydivs[i] = str(moneydivs[i]) + "0"         # Adds a 0 behind the decimal cents     printlines(i)     i += 1   And the output is as following:  -----------[Steps in between (For bug hunting)]----------- num = 500 & floor devision = 0.0 and modulus = 20.33 num = 200 & floor devision = 0.0 and modulus = 20.33 num = 100 & floor devision = 0.0 and modulus = 20.33 num = 50 & floor devision = 0.0 and modulus = 20.33 num = 20 & floor devision = 1.0 and modulus = 0.3299999999999983 num = 10 & floor devision = 0.0 and modulus = 0.3299999999999983 num = 5 & floor devision = 0.0 and modulus = 0.3299999999999983 num = 2 & floor devision = 0.0 and modulus = 0.3299999999999983 num = 1 & floor devision = 0.0 and modulus = 0.3299999999999983 num = 0.5 & floor devision = 0.0 and modulus = 0.3299999999999983 num = 0.2 & floor devision = 1.0 and modulus = 0.12999999999999828 num = 0.1 & floor devision = 1.0 and modulus = 0.029999999999998278 num = 0.05 & floor devision = 0.0 and modulus = 0.029999999999998278 num = 0.02 & floor devision = 1.0 and modulus = 0.009999999999998278 num = 0.01 & floor devision = 0.0 and modulus = 0.009999999999998278 -----------[Casual output itself]----------- To change 20.33, you have to give: 1 pieces of €20 1 pieces of €0.20 1 pieces of €0.10 1 pieces of €0.02   I don't understand where this offset comes from, or in case of my current code: Why 20.33 mod 20 = 0.33 - 1.7E-15. Where does the -1.7E-15 come from?  I should add that I'm using the Hydrogen package (in Atom) to give this output. Is there a possibility the issue may lay here?  Sorry if the question is a little bit messy. I get that I should not add my complete code, but I believe in the current case it is necessary to pull a conclusion & since my code is pretty short

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


I am trying to change a variable further down the program. I have a global variable declared at the start of the program and I want to change the variable in different functions down the program. I can do this by declaring the variable inside the function again but I would like to know is there a better way of doing this. Some test code is below to explain what I mean.  ID = 'No' project = ("Yep"+ID) # ID added with 'No' value which I later want to change  def pro():      ID = "YES"     print ID  def pro1(ID):      # I could declare project again to get this to work, but I would like to avoid this     print project # I want this to print with the new ID number.  if __name__ == '__main__':     pro()     pro1(ID)   Has anyone any ideas, thanks  I have tried the global variable but when I do this the project variable still prints out YepNo instead of YepYES. I want the new variable from the function proto change the variable in the project variable.

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


A new Stack Overflow user recently asked how he could improve a question that was not well received:   I told the user to click Close(3) to see why the community was not receiving the question well. @psubsee2003 corrected me with:     The OP doesn't have 250 rep, so can't see the "Close(3)" link   I think that's a bad strategy. The close reasons are important feedback for a user, and I'm having trouble understanding why the feedback would be with held from them.  The current strategy of denying feedback and allowing the question to whither and die does not seem like a good one. It clutters the site with poor questions, it does not reinforce user training of site features, it causes the creation of duplicate questions that don't materially improve, and it creates a poor user experience.  In fact, the cited question is an example of creation of duplicate questions that don't materially improve. The poster originally asked a similar question that was closed too.  And, here's another one that would have benefitted from a user learning what was going on:        Notice they do not suffer the "false, misleading or fictitious reason" as argued by some others below.  Request: Please allow new users to view close reasons on their questions.    Related to withholding close reasons, a custom off-topic close message is displayed immediately. So immediately providing feedback has a precedent. (You can see an example of the immediate feedback on countless questions, like ).  If withholding information is the strategy, then it seems to me the custom close message should be with held too.    Related: . But the request in this question is less encompassing than the related question.

Possible Duplicate:          I think it would be useful for the OP (not everyone) to see close reasons when close votes are present on their question, regardless of the OP's reputation.


In an  to a question I asked, the user included an extract from a text seemingly written in older English. Not Old English, but definitely older English, made evident by the fact it spelled e.g. own and owne.   But another thing I noticed in it was that I was written without capitalization, as in i. I was wondering if this was a typo by the user, a typo by the original author of the writing, or if it was a feature of English at the time of writing.   Considering the user's answer was devoid of any other typos, and considering he probably copypasted the writing onto his post, I didn't believe he had made the potential mistake. If it was a mistake by the author, then, less likely, the user could have included a "[sic]" behind to signalize it was a fault of the original author and not him.   So, this is why I find it circumstantially likely that it was perhaps a feature of older English. Is this the case?   EDIT: I believe it is from early-modern-English. Not sure though, it is for the experts to say.

Why should we capitalize the first person pronoun 'I' even when it does not appear at the beginning of a sentence? Why is it not the case for other pronouns?


I have tried understanding how to solve questions of these type using pen and paper, without access to a calculator.  Here's the question:     What is the remainder of $2019^2 + 2019^4 + 2019^6 + 2019^8$ $mod 4$ ?   I know that there's a pattern to these types of questions, but I am not exactly sure how to find it.  I thought about breaking the numbers into smaller numbers that are congruent to them, but I am not sure if that would be of any help.  Any help would be greatly appreciated!

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


I am looking for a similar solution as here   except that I want to use it with beamer. If I use enumitem with beamer, inner theme is replaced by enumitem. I do not want to use enumitem because of this problem. Is there any alternative package or solution which works only with description? Kindly suggest.

How to do right align a description list using beamer?        Name | Joel Spolsky    Address | Some address       Using the enumitem package as suggested in   does not seem to work with the beamer package


Which form is correct in expressions like this: 1) team's size or 2) team size?  And a similar one: 1) actual period length or 2) actual period's length.  Is there any rule?

Here are my constructions:        Only minimal signs of corrosion on the vehicle body surface which have been removed.   Only minimal signs of corrosion on the vehicle's body surface which have been removed.      So my question is, should I use 'vehicle body' or 'vehicle's body'?


Normally, I used to include device specific headers & sources provided by the chip vendor (ST) and CMSIS-Core headers in version control. There are not many of them and I didn't have a habit to update them. I use STM32 microcontrollers, but I don't use the CUBE framework or the Standard Peripheral Library.  Recently, I needed to use CMSIS-DSP libraries. CMSIS-DSP library comes with a large number of header and source files. I decided to use the precompiled library (libarm_cortexM4lf_math.a), which is around 5.4 MB. But now I started to question if they should go into the version control.  I know that managing the binary files in version control isn't a good idea. But as far as I know, CMSIS is not updated very often. So I'm confused. These are the options I can think of:   Include CMSIS headers and static binaries in repo: It may be good idea if I decide not to update these libraries. CMSIS itself doesn't get new releases very often and even if a new version is released, it may not be necessary to update it in the project. Or I may skip a few releases before I update it in my project. Include CMSIS header and source files in repo: Similar to option 1, but git will be happier to work with text files instead of a 5+ MB binary. But I'm not sure if letting 3rd party code changes to contaminate my source history is a good idea (Option 1 suffers the same problem, but header files only). Don't include CMSIS in repo: This results in a clean repo, but then I have to manually copy library files into project directory after cloning the project. I can also specify a system wide installation folder for CMSIS and add it to the project but it causes a "works-on-my-machine" situation. Find a way to fetch the library automatically: The first thing comes to mind is git submodules. However, I'm not sure if fetching the whole CMSIS repo will work, because I need to restructure it as there are lots of unneeded files, including precompiled binaries. I guess I need some kind of post processing script?   What is the best approach here? Can there be other options?  There is a similar question here:  It seems people have different opinions about the subject. But I believe using CMSIS in an embedded C project is a specific case and deserves its own question.

Should libraries that the application relies on be stored in source control? One part of me says it should and another part say's no. It feels wrong to add a 20mb library that dwarfs the entire app just because you rely on a couple of functions from it (albeit rather heavily). Should you just store the jar/dll or maybe even the distributed zip/tar of the project?  What do other people do?


In , in the first scene, Gerenal Brigham makes it clear that Tom Cruises character 'Cage' is going to be fighting on the front line in the upcoming 'invasion' of Mimic held territories in Europe.  However, as far as I can tell it's never made clear why Cage is going to be sent.  After all, by Cages own admission he is not 'battle trained' and as such he's going to be more hindrance than help when it comes to fighting as can be seen by his first 'tour' when he doesn't even know how to operate the battle suit.  So, is it ever revealed why he's being sent to fight ?  Note: once he realises he's got no apparent choice he rebels and gets demoted to 'private' and is labelled a 'deserter' however, what isn't explained was the original decision...

At the beginning of the movie Edge of Tomorrow, William Cage (Tom Cruise) was sent to the war base prior to going to fight. What caused him to be sent to the war base?


Evaluate $$\lim_{n\to\infty}n\sin(2\pi \mathrm en!)$$

I tried and got this   $$e=\sum_{k=0}^\infty\frac{1}{k!}=\lim_{n\to\infty}\sum_{k=0}^n\frac{1}{k!}$$ $$n!\sum_{k=0}^n\frac{1}{k!}=\frac{n!}{0!}+\frac{n!}{1!}+\cdots+\frac{n!}{n!}=m$$ where $m$ is an integer. $$\lim_{n\to\infty}n\sin(2\pi en!)=\lim_{n\to\infty}n\sin\left(2\pi n!\sum_{k=0}^n\frac{1}{k!}\right)=\lim_{n\to\infty}n\sin(2\pi m)=\lim_{n\to\infty}n\cdot0=0$$  Is it correct?


worked for some time on modeling shoe laces and as I rendered the image the laces are not being rendered in blender 2.8  In blender 2.78 it does render all the objects.  What am I doing wrong?

This is meant to solve this problem once and for all. What is every reason an object isn't showing up in a render or viewport in when using the cycles render engine?


In the below snippet, I made changes to the 'current' object, which is a copy of 'head' object. However, changes get reflected to the global head object.  class Node     {         public Node next; //pointer         public Object data; //data          public Node(Object d)         {             data = d;         }     }      public class CustomLinkedList         {             private Node head = new Node(null); //head of linked list              public void Add(Object data)             {                 Node newNode = new Node(data);                  Node current = head;                  while (current.next != null)                 {                     current = current.next;                 }                  current.next = newNode;             }     }

I want to do something like:  MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone();   And then make changes to the new object that are not reflected in the original object.  I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and then copying each property individually, but it always leaves me with the feeling that there is a better or more elegant way of handling the situation.  How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object?


A random sample, $X_1, X_2,... X_n$ is drawn from a Pareto population with pdf $$f(x|\theta)=\frac{\theta}{x^2}I_{[\theta,\infty)}(x)$$ I've been trying to figure out the distribution of  $$T=\log\Big[\frac{\prod_{i=1}^n X_i}{X_{(1)}^n}\Big]$$ where $X_{(1)}$ is the first order statistic, or $X_{(1)}=\min_i X_i$. The problem is boiled down to finding the distribution of $W_i=\log\Big(\frac{X_i}{X_{(1)}}\Big)=\log(X_i)-\log(X_{(1)})=Y_i-Z$ for $i=2,...n$, since $T=\sum_{i=2}^nW_i$ I made some transformation and ended up with the pdf of $Y_i$ and $Z$ are given by $$f_Z(z)=\frac{n\theta^n}{e^{zn}}$$ $$f_Y(y)=\theta e^{-y}$$ $Y_i$ and $Z$ are independent so the next thing is to find the distribution of $Y_i-Z$ by taking the integral of the product of those 2 pdf and the result should yield to $Y_i-Z$ following exponential(1). However, from what I've derived, I can't get the exponential(1) and I don't know where I went wrong in any calculations or reasoning, can you please help me have a look? Many thanks.

Let $X_1,X_2,\ldots,X_n$ be i.i.d variables having a Pareto distribution with density $$f(x)=\frac{a\theta^a}{x^{a+1}}1_{x>\theta}\,,$$ where $a,\theta>0$. What is the distribution of $\sum\limits_{j=1}^n \ln\left(\frac{X_{(j)}}{X_{(1)}}\right)$ ?   Suppose $\mathsf{Gamma}(p,\alpha)$ denotes the density $g(t)\propto e^{-\alpha t}t^{p-1}1_{t>0}$.  We have $$T=\sum_{j=1}^n\ln\left(\frac{X_{(j)}}{X_{(1)}}\right)=\sum_{j=1}^n\ln(X_{(j)})-n\ln(X_{(1)})=\sum_{j=1}^n \ln X_j-n\ln X_{(1)}$$  Now,   \begin{align}&\ln(X_j/\theta)\stackrel{\text{i.i.d}}{\sim}\mathsf{Exp}\text{ with mean }1/a\qquad,\,j=1,\ldots,n \\&\implies\sum_{j=1}^n\ln(X_j/\theta)=\sum_{j=1}^n\ln X_j-n\ln \theta\sim\mathsf{Gamma}(n,a) \end{align}  I could show that $X_{(1)}$ has another Pareto density, so that $$\ln\left(\frac{X_{(1)}}{\theta}\right)=\ln X_{(1)}-\ln \theta \sim \mathsf{Exp}\text{ with mean }1/(na)$$   Not sure if the last two facts help me get the exact distribution of $T$.    Edit:  Turns out this was rather simple had I simply rewritten $T$ as   $$T=\sum_{j=1}^n \ln\left(\frac{X_j}{X_{(1)}}\right)=\sum_{j=1}^n(\ln X_j-\ln X_{(1)})=\sum_{j=1}^n (Y_j-Y_{(1)})\,,$$  where $Y_j=\ln (X_j/\theta)$. Since $aY_j\sim\mathsf{Exp}(1)$, using  result I have $a T\sim \mathsf{Gamma}(n-1,1)$.   This is equivalent to $T\sim \mathsf{Gamma}(n-1,a)$ or $2aT\sim \chi^2_{2n-2}$.


If/Whether usage.  "It is doubtful whether he is telling the truth"  Why is it not possible to use "if" in this case? Thank you in advance.

Could someone please help me with these sentences? I need to know  Which one doesn’t sound natural? Which one is formal and which one is not?   A - I don’t know whether this word fits in the sentence. B - I don’t know if this word fits in the sentence.   C - I don’t know whether or not this word fits in the sentence. D - I don’t know if or not this word fits in the sentence.   E - I don’t know whether this word fits in the sentence or not. F - I don’t know if this word fits in the sentence or not.  For me only D doesn't work and sounds not idiomatic. Meanwhile for me all of these sentences can be used in both written and spoken languages. Do you confirm me?


Is it possible to prove Newton's second law of motion, $F=ma$? Or is it just realized because of proportionality and the definition of a Newton of force?

Why is force = mass $\times$ acceleration? I have searched in many sites but didn't actually get at it. Simply I want to know that if a mass in space moves (gains velocity thus further accelerates), how can I think, postulate and further believe that force = multiplication  of mass and its acceleration ?


String s1 = new String("abc");//it is created at heap area String s2 = "abc";//it is created string constant pool  System.out.println(s1==s2);//false System.out.println(s1.hashCode());same hashCode System.out.println(s2.hashCode());same hashCode   The last two lines give the same hashCode(), but the objects are different.while creating s1 object it create in heap area and s2 object is create in string constant pool.but both are gives same hashCode.i.e my doubt?

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 have no experience in graph theory and am a little confused with how Hugh Osborn represents a perturbation expansion with diagrams on page 15 of  notes.  We have a perturbation expansion     My questions are:  1. In the diagrammatic interpretation part, 2 points are joined to create one line. So shouldn't a vertex with $k$ indices be at the intersection of $k/2$ lines?  2. If $A_{ij}^{-1}$ is a straight line from $i$ to $j$, how do we have a vertex      with only one line?  3. Where do the points $i,j,k,l$, etc. go on the loops?

This is from Hugh Osborn's '' notes, Lent 2013, page 15.  I want to evaluate the expression   $$ Z = \exp\Big(\frac{1}{2} \frac{\partial}{\partial \underline{x}} . A^{-1} \frac{\partial}{\partial \underline{x}} \Big) \exp\Big(-V(x) + \underline{b}. \underline{x}\Big) \bigg\vert_{\underline{x} = \underline{0}}$$  assuming that $\underline{b} = \underline{0}$.  We use the notation   $$ V_{i_{1} i_{2} \dots i_{k}} =  \frac{\partial}{\partial x_{i_{1}}} \frac{\partial}{\partial x_{i_{2}}} \dots \frac{\partial}{\partial x_{i_{k}}} V(\underline{x})\Big\vert_{\underline{x} = \underline{0}}$$  Where  $\frac{\partial}{\partial \underline{x}} \equiv \Big( \frac{\partial}{\partial x_{1}}, \dots, \frac{\partial}{\partial x_{n}}\Big)$  We also assume that $V(\underline{0}) = V_{i}(\underline{0}) = 0$.  And $A^{-1}$ is an $n \times n$ matrix. I expanded the exponential with the derivative to get:  $$ Z = \Bigg(1 + \frac{1}{2} \frac{\partial}{\partial x_{i}} A^{-1}_{ij} \frac{\partial}{\partial x_{j}} + \frac{1}{2} \frac{1}{2}\frac{\partial}{\partial x_{i}} A^{-1}_{ij} \frac{\partial}{\partial x_{j}} \frac{1}{2}\frac{\partial}{\partial x_{k}} A^{-1}_{kl} \frac{\partial}{\partial x_{l}} + \frac{1}{6}\frac{1}{2} \frac{\partial}{\partial x_{i}} A^{-1}_{ij} \frac{\partial}{\partial x_{j}}\frac{1}{2} \frac{\partial}{\partial x_{k}} A^{-1}_{kl} \frac{\partial}{\partial x_{l}}\frac{1}{2} \frac{\partial}{\partial x_{m}} A^{-1}_{mn} \frac{\partial}{\partial x_{n}} + \dots\Bigg) \exp(-V(x))\biggr\vert_{\underline{x} = \underline{0}}$$  Then this series acts on $\exp(-V(x))$, where summation notation is implied. Am I proceeding correctly?  The answer is


I find it easier to get a visa for Portugal, as I have relatives there. But my aim is to 2-3 weeks in Italy, and just a few days to visit my Portugal relatives. If I book my flights  with a 2-3 week gap, will it be a problem to enter Italy?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


We're using SharePoint online, I've created a custom list, item is save and close per item. Is there such a thing as saving and adding another item (redirecting you to the add item again). Without clicking the add item again.

What is the best way to add redirect function into the save button on a newform in SharePoint 2013.  When the user create a list item, he/she should be redirected to another form. Is it possible to get and parse the new generated item ID?  Start - Newform URL:   End - Editform URL:   Thanks


I am using my Nikon D750 to record behavioural trials in the lab. It is a real pain to have to worry about battery level and having charged spares and a charger on hand in addition to all the rest of the organisational issues associated with the experiments.  Additionally, it is a really big problem if the camera shuts down in the middle of the recording.  It would be really great if I could hook it up to the mains via a USB charger or similar, I have, however, not found any microUSB port on it. Does it maybe have its own proprietary charger port which I just don't recognise? Can I hook it up via the battery pack contacts? Or via the accessory terminal?

I made some scripts on my Raspberry Pi to automate a daily shot at a specific hour.  My DSLR is plugged in through USB. I thought this would keep its battery charged, but no.  Is there really no way automate a DSLR to shoot every 24 hours without having to pick it up, charge/replace its battery, and put in back on the same spot?


I know that defining division by zero is not possible because it violates the zero product property we define, that is, $0\times a=0$ for every $a$. I wonder whether we can somewhat circumvent and change the definition of the zero product property (or make a new definition about multiplying by zero), then safely deducing a definition for dividing by zero and then possibly building a system when this definition exists and proving useful theorems?

We add negative numbers and zero to natural sequence to make it closed under subtraction, the same thing happens with division (rational numbers) and root of -1 (complex numbers).  Why this trick isn't performed with division by zero?


known that: $1\geq R_1 \geq R_2 \geq \dots \geq R_n \geq 0$ and $\sum_{i=1}^n R_i=1$ To prove: $\sum_{i=1}^n R_i^2 \geq \frac{1}{n}$    Using induction, the problem can be easily proved. I'd like to know is there any other ways can prove this?

$$\dfrac{x_1^2+ x_2^2 + \cdots + x_n^2}n \geq \left(\dfrac{x_1+x_2+\cdots+x_n}n\right)^2$$   I don't think AM, GM can be used here. And simple expansion doesn't help too. What should I do?


I am a Swiss citizen living in Vancouver, BC, Canada as a temporary resident (student visa). I am planning a small trip toward the USA and a friend of mine offered me to use her car for this trip. This friend is American (living in Vancouver, BC, Canada) and her car has an American license plate (insured with Liberty Mutual).  Someone told me that, as a non-Canadian, non-American, I might have a hard time crossing the border with a car with US plates. Should I be worried of being rejected at the border? Do I need to prepare some specific documents? Would it help if my name was added on the insurance contract (I don't know if this is possible). My son (7 weeks old) is Canadian. Does it make any difference if he is in the car?

What are the ramifications of driving someone else's car across  borders?  I'm planning a road trip from the US into Canada and back. My girlfriend has offered to let me use her car but I am not listed on her insurance as a driver and she will not be coming with me.    has already done a good job of covering the issue of driving someone else's car without insurance, but it does not address the issue of actually crossing the border in someone else's car.    Will customs officials take issue with the fact that the car I'm driving is registered to someone else?  Could I be denied entry or arrested for this?


I'm new to LATEX and having a tough time doing my homework and properly formatting code. As you see, the spacing is out of whack and the beginning of each line for each instruction does not line up. Could anyone recommend a better way to make sure they line up? Thanks.   P.S. - I tried using \quad, but it doesn't seem to work when it is the first instruction on a line in a LATEX document.  \indent \indent $IF\ Z_1 \neq 0\ GOTO \ C$\\ $[B]$ \indent $X \leftarrow X - 1$\\ \indent \indent $Y \leftarrow Y + 1$\   Rendering:

I have defined my own language whose syntax is very close to the one of Pascal. I would like to type the following program for instance. Many people use the packages algorithmicx or algorithm2e to print programs, but it seems that we have to use their specific keywords of its syntax like procedure, end while.  I just want to indent spaces when needed, and bold some words when I want (sorry that I could not bold letters in the following figure). Do I have to use  texttt for each line? Also, with verbatim, I could not bold words...  Also, as the program is not large, I would need to put it on the left side of the page, and leave space for some explanasion text on its right hand side. So I  guss I need to get them all together, and use multicols.  Could anyone help?  program test                                      some text here var   i : integer;                                    ...    b : boolean; begin    i := 1;                                        ...    b := true;    while i < 15 do       i := i  + 1;       b := not b                                  some text here    od end   Edit1: Following @Werner's tabbing solution, I have made the code a minipage:  \begin{minipage}[t]{0.48\linewidth}% \begin{tabbing} Werner's solution \end{tabbing} \end{minipage}\hfill \begin{minipage}[t]{0.48\linewidth} a paragraph \end{minipage}   Actually as the code shows, I want the texts to be another separated minipage on the right hand side of the code. I have then 2 questions:   is it reasonable to make 0.48\linewidth instead of 0.5\linewidth? 0.48\linewidth is a conventional choice? is it possible to make a frame around the code, and use \caption and \label to make it a reference (I prefer figures)?


My son has a BlackBerry which has pattern password. His younger brother has pressed it too many times and it is now locked. It is asking for his Gmail username but he does not know it. He has never used the email and did not set up a recovery email address. None of the guidance I can find tells me what to do.    How can I find his username?

I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: )


Let's say my opponent plays  and I have to choose to sacrifice a creature.  I have  on the board, so can I choose to sacrifice it, and then play it's ability at the same time?   I know that if the opponents card had him choose a target, and that target had an sacrifice ability, I could use it and it would resolve first. But since here I have to choose the target myself, how does the stack work here?   The spell is already on the stack once my opponent plays it, so does me choosing a target to sacrifice resolve the spell, meaning I can't play any abilities in between, or does it stay on the stack still and let me play abilities in between?  Edit: Similarly, if an opponent would play an ability that said f.ex: "Opponent discards 2 cards from his hand" and I had a card in my hand that said something like "Discard this card, draw a card" and a card in play that said "Discard a card, this creature gains +1-+1". Could I choose to discard the draw card to trigger the effect and another card to trigger the creature effect at the same time the opponents spell resolves?

I asked a general question about , but thought it better to ask a specific question. If a creature has a "Sacrifice this creature for X" ability, can you sacrifice it for that ability and satisfy the requirement of the  with the same sacrifice (assuming it is done during the upkeep)?  Oracle Text:   Creatures you control get +1/+1, have flying, and are indestructible. At the beginning of your upkeep, sacrifice a creature. If you can't, sacrifice Eldrazi Monument.


A co-worker and I had a discussion about what style is used to express the AND NOT condition in C#. While both methods work, we disagree about the style of the operator.   He says that && ! is the preferred way. For example:  db.Widget.Where(w => w.Name == "Foo" && !w.IsBlue);   I say that that will work, but &! will work. For example:  db.Widget.Where(w => w.Name == "Foo" &! w.IsBlue);   I used to have a book about C# style, but do not remember seeing this covered. What does SO use?

I have always used || (two pipes) in OR expressions, both in C# and PHP. Occasionally I see a single pipe used: |. What is the difference between those two usages? Are there any caveats when using one over the other or are they interchangeable?


I am working on a project in which it's necessary for me to overlay 2 layers (a map of precincts and a map of census tracts).  I need to be able to determine the %area of each census tract covered by each precinct. For example, if Census Tract 1 is 25% Precinct 1, 40% Precinct 2, and 35% Precinct 3.  How do I go about doing this?   I am using QGIS 3.8 and have the necessary shapefiles.

I have two polygon layers, model and ntem, whose features overlap and intersect one another. I would like to calculate the proportion of the area of the model polygons which fit within each ntem polygon. Some model features fully fit within ntem features, others overlap multiple ntem features. Both layers are in CRS OSGB:1936.        For example, model feature 50209 falls partly in each of the three ntem features 2202, 2205, 2206 and I'd eventually like to know the proportion of 50209's area in each ntem area.  From initial research, I understand that the Vector > Geoprocessing Tools > Intersect function should do what I want, however I get a completely blank layer of results when I attempt this. (Shapefile is created, empty attribute table, no features!)  Can anyone either point out if I am doing something wrong and suggest an alternative method of achieving the area proportion calculation?


I'm trying to prove this: Let $R$ be a ring, and $A \in M_n(R)$.  Write $L_A$ for the linear map $L_A : R^n \to R^n$ determined by left multiplication by $A$.  Shows that if $L_A$ is injective, then $\det(A)$ is not a zero divisor.

Alternately, let $M$ be an $n \times n$ matrix with entries in a commutative ring $R$. If $M$ has trivial kernel, is it true that $\det(M) \neq 0$?     deals with the case that $R$ is a polynomial ring over a field. There it was observed that there is a straightforward proof when $R$ is an integral domain by passing to the fraction field.  In the general case I have neither a proof nor a counterexample. Here are three general observations about properties that a counterexample $M$ (trivial kernel but zero determinant) must satisfy. First, recall that the  $\text{adj}(M)$ of a matrix $M$ is a matrix whose entries are integer polynomials in those of $M$ and which satisfies  $$M \text{adj}(M) = \det(M).$$  If $\det(M) = 0$ and $\text{adj}(M) \neq 0$, then some column of $\text{adj}(M)$ lies in the kernel of $M$. Thus:     If $M$ is a counterexample, then $\text{adj}(M) = 0$.   When $n = 2$, we have $\text{adj}(M) = 0 \Rightarrow M = 0$, so this settles the $2 \times 2$ case.   Second observation: recall that by Cayley-Hamilton $p(M) = 0$ where $p$ is the characteristic polynomial of $M$. Write this as $$M^k q(M) = 0$$  where $q$ has nonzero constant term. If $q(M) \neq 0$, then there exists some $v \in R^n$ such that $w = q(M) v \neq 0$, hence $M^k w = 0$ and one of the vectors $w, Mw, M^2 w,\dots, M^{k-1} w$ necessarily lies in the kernel of $M$. Thus if $M$ is a counterexample we must have $q(M) = 0$ where $q$ has nonzero constant term.  Now for every prime ideal $P$ of $R$, consider the induced action of $M$ on $F^n$, where $F = \overline{ \text{Frac}(R/P) }$. Then $q(\lambda) = 0$ for every eigenvalue $\lambda$ of $M$. Since $\det(M) = 0$, one of these eigenvalues over $F$ is $0$, hence it follows that $q(0) \in P$. Since this is true for all prime ideals, $q(0)$ lies in the intersection of all the prime ideals of $R$, hence     If $M$ is a counterexample and $q$ is defined as above, then $q(0)$ is nilpotent.    This settles the question for reduced rings. Now, $\text{det}(M) = 0$ implies that the constant term of $p$ is equal to zero, and $\text{adj}(M) = 0$ implies that the linear term of $p$ is equal to zero. It follows that if $M$ is a counterexample, then $M^2 \mid p(M)$. When $n = 3$, this implies that $$q(M) = M - \lambda$$  where $\lambda$ is nilpotent, so $M$ is nilpotent and thus must have nontrivial kernel. So this settles the $3 \times 3$ case.   Third observation: if $M$ is a counterexample, then it is a counterexample over the subring of $R$ generated by the entries of $M$, so     We may assume WLOG that $R$ is finitely-generated over $\mathbb{Z}$.


I want to validate URL in PHP but the function should accept the URL even if http:// or https:// not present in the input.  Following URL's should be acceptable:  http://example.com http://www.example.com https://example.com https://www.example.com www.example.com example.com   It should not accept ftp protocol, IP address, Port, URL path, query, or fragment.

I've been looking for a simple regex for URLs, does anybody have one handy that works well?  I didn't find one with the zend framework validation classes and have seen several implementations.


$1 \gamma \rightarrow 1 e^- + 1 e^+$       (pair production)  Then why  $1 e^- + 1 e^+ \rightarrow 2 \gamma$       (annihilation of matter)  instead of  $1 e^- + 1 e^+ -> 1 \gamma$ ?

In reading through old course material, I found the assignment (my translation):     Show that a single photon cannot produce an electron-positron pair, but needs additional matter or light quanta.   My idea was to calculate the wavelength required to contain the required energy ($1.02$ MeV), which turned out to be $1.2\times 10^{-3}$ nm, but I don't know about any minimum wavelength of electromagnetic waves. I can't motivate it with the conservation laws for momentum or energy either.  How to solve this task?


EDIT: someone tagged it as a duplicate, but it's quite clear that this is not the case, but mostly an API bug.  I've encountered a strange problem using Maps.  First of all my code:  @Override public void onListUpdated() {     // Cleaning all the markers.     if (mGoogleMap != null) {         mGoogleMap.clear();     }      List<PetrolStation> petrolStationList = mPetrolStationsList.getList();     final HashMap<Marker, PetrolStation> markerPetrolStationHashMap = new HashMap<>();      // Get the fuel selected by user.     String fuelPrefs = loadPreferences(SETTINGS_PREFERENCES, FUEL_KEY);     long fuelId = Long.valueOf(fuelPrefs);      for (PetrolStation petrolStation : petrolStationList) {         double lat = petrolStation.getLat();         double lon = petrolStation.getLon();          if (mGoogleMap != null) {             Marker marker = mGoogleMap.addMarker(new MarkerOptions().position(new LatLng(lat, lon)));              PROBLEM IS HERE -> marker.setIcon(BitmapDescriptorFactory.fromResource(getMarkerIcon(fuelId)));             markerPetrolStationHashMap.put(marker, petrolStation);         }     }      ...  }   This is a method of an interface I've declared.  Testing the code on phones with older APIs everything is working fine, but using an emulator with API v23, it crashes with this log message:  java.lang.NullPointerException: null reference at maps.w.c.a(Unknown Source) at maps.ad.g$a.<init>(Unknown Source) at maps.ad.g.a(Unknown Source) at maps.ad.S.a(Unknown Source) at abq.onTransact(:com.google.android.gms.DynamiteModulesB:204) at android.os.Binder.transact(Binder.java:387) at com.google.android.gms.maps.model.internal.zzf$zza$zza.zzak(Unknown Source) PROBLEM IS HERE -> at com.google.android.gms.maps.model.Marker.setIcon(Unknown Source) at com.myfuel.fragments.MapFragment.onListUpdated(MapFragment.java:317) at com.myfuel.utils.PetrolStationsList$PetrolStationsAsyncTask.onPostExecute(PetrolStationsList.java:229) at com.myfuel.utils.PetrolStationsList$PetrolStationsAsyncTask.onPostExecute(PetrolStationsList.java:151) ...   I've pointed out the line causing the crash in my code and the reference inside of the log.   I've found out this is probably a bug (not fixed after all this time), but it's quite annoying and I hope someone will point me out some kind of solution.  Thank you.  EDIT:  public static int getMarkerIcon(long fuelId) {     int drawableId = -1;      switch ((int) fuelId) {          case 1: {             drawableId = R.drawable.marker_petrol;              break;         }          case 2: {             drawableId = R.drawable.marker_special_petrol;              break;         }          case 3: {             drawableId = R.drawable.marker_lpg;              break;         }          case 4: {             drawableId = R.drawable.marker_diesel_image;              break;         }          case 5: {             drawableId = R.drawable.marker_special_diesel;              break;         }          case 6 : {             drawableId = R.drawable.marker_methane;              break;         }     }      return drawableId; }

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


I have a class that is supposed to draw the Sierpinski triangle to a given degree, determined by increase/decrease buttons to alter that degree. However, the degree (variable x) always reverts to 0 after I process the button press.  Where is my problem?  import javafx.application.Application; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.shape.Line; import javafx.stage.Stage;  public class Recursion4 extends Application {     @Override     public void start(Stage primaryStage) throws Exception {         BorderPane pane = new BorderPane();         Button plus = new Button("+");         Button minus = new Button("-");         HBox h = new HBox(5);         Pane p = new Pane();         h.getChildren().addAll(plus, minus);         h.setSpacing(10);         pane.setBottom(h);         pane.setCenter(p);         h.setAlignment(Pos.CENTER);         Scene scene = new Scene(pane, 900, 900);         primaryStage.setTitle("Triangles");         primaryStage.setScene(scene);         primaryStage.show();         int x = 0;         draw(450, 300, 300, 600, 600, 600, x, p);         plus.setOnAction(e -> {              plus(x, p);          });         minus.setOnAction(e -> {             minus(x, p);         });      }      public static void main(String[] args) {         launch(args);         int x = 0;     }      public static void plus(int x, Pane p) {         p.getChildren().clear();         ++x;         draw(450, 300, 300, 600, 600, 600, x, p);      }      public static void minus(int x, Pane p) {         p.getChildren().clear();         if (x == 0) {             draw(450, 300, 300, 600, 600, 600, x, p);         } else {             x--;             draw(450, 300, 300, 600, 600, 600, x, p);          }     }      public static void draw(int x1, int y1, int x2, int y2, int x3, int y3, Pane p) {         Line l1 = new Line(x1, y1, x2, y2);         Line l2 = new Line(x2, y2, x3, y3);         Line l3 = new Line(x3, y3, x1, y1);         p.getChildren().add(l1);         p.getChildren().add(l2);         p.getChildren().add(l3);     }      public static void draw(int x1, int y1, int x2, int y2, int x3, int y3, int z, Pane p) {         if (z == 0) {             draw(x1, y1, x2, y2, x3, y3, p);         } else {             draw(x1, y1, x2, y2, x3, y3, p);             int xa, ya, xb, yb, xc, yc;              xa = (x1 + x2) / 2;              ya = (y1 + y2) / 2;             xb = (x1 + x3) / 2;             yb = (y1 + y3) / 2;             xc = (x2 + x3) / 2;             yc = (y2 + y3) / 2;              draw(x1, y1, xa, ya, xb, yb, z - 1,p);              draw(xa, ya, x2, y2, xc, yc, z - 1,p);             draw(xb, yb, xc, yc, x3, y3, z - 1,p);          }     } }

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?


My kids helped unpack groceries last night and left a bag of uncooked pork chops in the original packaging out overnight.  They were still in the shopping bag on the floor of the kitchen.  There was also ground beef that comes in the chub packaging left out.  The chubs were frozen when I bought them. When I put them away in the refrigerator, they were still partially frozen.  I am on a very limited budget and can't afford to replace these items.  Are these items safe to eat?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


My book directly writes-  $$\frac{1}{2}-\frac{1}{3}+\frac{1}{4}-\frac{1}{5}+\frac{1}{6}-\cdots=-\ln 2+1.$$  How do we prove this simply.. I am a high school student.

I know that the harmonic series $$\sum_{k=1}^{\infty}\frac{1}{k}  = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} + \cdots + \frac{1}{n} + \cdots \tag{I}$$ diverges, but what about the alternating harmonic series   $$\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k}  = \frac{1}{1} - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \frac{1}{6} + \cdots + \frac{(-1)^{n+1}}{n} + \cdots \text{?} \tag{II}$$  Does it converge?   If so, what is its sum?


In my book there is a chapter with "There is/are".  Is it ok to say: "There aren't cats in..." instead of "There aren't any cats in...".  The second example sounds better but I wonder if the first sentence is also correct.

I wonder what differences a native speaker could point out between these three sentences.  1) There is not an apple on the table.   2) There is no apple on the table.   3) There is not any apple on the table.


I do not have Illustrator, but need to send a file to someone as a vector. Can I save my Photoshop image as a vector?

I know people prefer using CorelDraw or Adobe Illustrator, but I want to know if there is a technique I can follow to use Adobe Photoshop to make vector Images.


We have a process built with Process Builder, that updates a customer field on Account from a related object. When the related object is created, it copies a date from the related object, to a date field on the account.  Some accounts are not getting updated properly, which got me digging. I found that the users who are executing the update on the related object are assigned a security profile with Read Only access to the field on the Account object. However, when I log in as one of those users, the process updates the read only field with no problem.  I checked the effective permissions on that field, and it does indicated that profile has read only access.  I also enabled change tracking on that field and it shows the user with the read only access to that field made the change.  I checked for any permissions sets that might be enabling write access to that field, and there are none.  So how can a user, whose security profile has read only access to a field, execute a process that updates that field?

Regarding field-level security, does Lightning Process Builder run as system-level permissions or user?  That is:   Can I trigger an update to a field that the current user cannot edit? Can I filter based on a field the current user cannot read?


I know that the answer to that question is to obtain the Elder Wand, but I think that approach doesn't really make sense.   We know that death is not necessary for the Elder Wand to change hands (Grindelwald stole it from Gregorovitch, and Albus obtained by beating Grindelwald in a non fatal duel) which means we know Voldemort didn't have to kill Snape to obtain the wand, that was just one way of doing it.   Snape was a powerful wizard(maybe one of the strongest of the death eaters) and had proven himself more useful than almost any Death Eater(providing years of information on Dumbledore and later killing him), Voldemort probably didn't want to kill him unless it was absolutely necessary.   Couldn't there have been some other way to get the wand from Severus? Like challenging Snape to a non-fatal duel for ownership of the wand, or perhaps even giving Severus the wand and then stealing it, Grindelwald style?

made me think about the movie versions of the 7th book.  In Deathly Hallows Part II      Voldemort has Nagini attack Snape because Voldy thinks that Snape has the Elder Wand's allegiance. We know that Snape didn't actually have the allegiance, Draco did (and by then Harry did) and his plan had failed.   But if Voldy's plan had succeeded with Snape, would he have gotten allegiance?      Since voldemort didn't kill Snape, Nagini did...


I can upvote/downvote some questions(not all)(, ) asked by  two times; Is it okay? or bug?   Initial vote (It was 120)        I clicked once on upvote button,and the upvote button didn't changed its color to blue(Now the vote is 121)        I again clicked (two times)Now the vote is 122

What limits are there on how I can vote?  How often can I vote? How do my votes become locked/unlocked?


When looking at a statistics hypotheses such as, Suicide will be supported when faced with a terminal illness just at letting one die?  When looking at surveys it was a yes/no question.  Does this make suicide and letting one die both nominal since there is no order to the question?  I am tying to figure out which formula to use in a cross tabulation that will give the most accurate level of association lambda, gamma, and Person's r. But need to know if I am looking at nominal or ordinal?

Binary data is often mentioned as a nominal sub-category, especially in such examples as female/male, smoker/non-smoker, etc. However, binary data with such values as pass/fail, correct/incorrect, absent/present, etc, seems to give some weight to its values. It's not like in the example of the gender, where both values are equal and differ primarily by the nominal and other context-related traits. Instead, this type of binary data clearly indicates that one value means something and the other means nothing.   In case of such distinction, can binary be considered ordinal? If yes, what are statistical tests that are usually used for such data? Also, are there any interesting books or papers on this case?


I'm writing a program to test my knowledge of certain Japanese letters. Basically I want the program to output a random letter such as あ and then I type my answer a into the scanner, and if my answer is correct, it will output "Correct" and otherwise "Wrong".  I'm honestly not sure what I'm doing wrong in my program. It all seems logical to me yet my console keeps outputting "Wrong" when my answers are clearly correct:  public class Gojuon {     public static void main(String[] args) {         List<String> list = new ArrayList<String>();         list.add("あ");         list.add("い");         list.add("う");         list.add("え");         list.add("お");          for(int i = 0; i < 3; i++) {             String gojuonLetter = list.get(new Random().nextInt(list.size()));             System.out.println(gojuonLetter);             Scanner scanner = new Scanner(System.in);             System.out.println("Type Romaji:");             String answer = scanner.nextLine();              if(gojuonLetter == "あ" && answer == "a") {                 System.out.println("Correct");             } else if(gojuonLetter == "い" && answer == "i") {                 System.out.println("Correct");             } else if(gojuonLetter == "う" && answer == "u") {                 System.out.println("Correct");             } else if(gojuonLetter == "え" && answer == "e") {                 System.out.println("Correct");             } else if(gojuonLetter == "お" && answer == "o") {                 System.out.println("Correct");             } else {                 System.out.println("Wrong");             }         }     } }

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?


So I'm building a simple TextEditor with the help of Jpanels But I keep gettin the NullPointerException when I try to assign my JFileChooser on to a variable. I've got 2 classes. A viewer which contains all the Jpanels and a Controller which handles the logic when pressing buttons. I've got a Load button when pressed is supposed to show a file chooser were I can select a text file and append that to my TextArea.  Viewer:  private JFileChooser fc = new JFileChooser();  //....  if(e.getSource() == btnOpen){             controller.loadText();         }  public JFileChooser getFc(){     return fc; }   Controller:  public void loadText(){     JFileChooser fc = view.getFc();        //Throws NullPointerException     JTextArea taMain = view.getTaMain();     int returnVal = fc.showOpenDialog(fc);          if (returnVal == JFileChooser.APPROVE_OPTION) {             File file = fc.getSelectedFile();             taMain.append("Opening: " + file.getName() + "." );         } else {             taMain.append("Open command cancelled by user.");         } }   I do undertstand the exception, but how come this occurs? The TextArea doesn't have to contain anything.

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?


In the below output, what does automatic mean? $apt search exfat Sorting... Done Full Text Search... Done exfat-fuse/focal,now 1.3.0-1 amd64 [installed,automatic]   read and write exFAT driver for FUSE  exfat-utils/focal,now 1.3.0-1 amd64 [installed,automatic]   utilities to create, check, label and dump exFAT filesystem  And in this context are there any similar/other output details to be known about apt (and the apt family tools) output?  Any refs will be great. Edit 1: In place of automatic, what other values are possible? I have searched: apt  -qq list | grep installed | grep -v automatic apt-file/focal,focal,now 3.2.2 all [installed] aptitude/focal,now 0.8.12-1ubuntu4 amd64 [installed] base-passwd/focal,now 3.5.47 amd64 [installed] console-setup/focal,focal,now 1.194ubuntu3 all [installed] dash/focal,now 0.5.10.2-6 amd64 [installed] diffutils/focal,now 1:3.7-3 amd64 [installed]  I don't see anything like manual as suggested in the comments. Both apt-file and aptitude were installed manually by me, so shouldn't there be a manual tag for these packages? Edit 2: To clarify completely. There is no tag called manual. So it's implicit: if it's not automatic then it has to be inferred as manual.

When packages are already installed and I run an apt-get install <package-name>, sometimes it will print a line <package-name> is set to manually installed.  What does that mean?


I seem to have a storage issue on my Google Drive.   The storage used indicated on the home page, visible on the image below, is 5x larger than the storage used on my Home folder calculated with this application: .    I looked for large files through the 'quota' page, accessible with the 'i' button on the image. Some were old files which I thought I deleted, and which I cannot locate on my drive (example on the left in the image below). Their location is not indicated, and there is even an 'add to my drive' option available. But they seem to take up space on my drive nevertheless.    My trash is empty.   How do I locate and clear these files from my drive?

I have a paid 100GB Google Drive plan. It is reporting that I am at 99% capacity.  According to the the storage both within the desktop and web application, I have used 90.53GB within Drive.    My Drive is mapped to my OS X filesystem, and when fully synched it reports only 61.28GB used.    So what is going on here? I need to do a cleanup but cannot account for the 30GB difference.


I know you get the chance to become a vampire lord in either branch of the story (after brining Serana to the castle if you betray Dawnguard or before entering Soul Cairn if you don't), will I be able to become a vampire lord later if I refuse/cure my vampirism?

So, I am working on a new playthrough of Skyrim with the two new DLCs and I would like to work in being a vampire lord early into the game. Doing a bit of reading however it seems I have to select to be a dawnguard if I want to be able to craft crossbows and bolts... which I do want..  Can I choose to join the dawnguard up front and then become a vampire lord later down the road or is this the only time this option will come up?


Let $S= \{ 1,2,\ldots,n \}$. and $V$ be the set of all functions $f: S \to \mathbb{R}$. $V$ is a vector space defined by: $$(f+ g)(x) = f(x) + g(x) \text{ and } (cf)(x)=cf(x). $$ Find a basis for $V$ and $\dim V$.  I'm not sure how to answer this question, it seems different than how I learned solving a basis, which was through a set of vectors, anyone know how I can tackle this?

Let $V=\{f : S \to \mathbb{R} \}$ be the set of all the functions $f : S \to \mathbb{R}$. Let $S=\{ 1,2,...,n$}, now my train of thought was that the basis of V must be a linearly independent set that Span V so somehow show that there is a set of functions on S that can compose as a linear combination and map to any number in $\mathbb{R}$. Any idea how to get a general answer for basis for dimension of V?


At the end of book 5, Umbridge was exposed to be the one who sent Dementors after Harry Potter, and she attempted to perform the Cruciatus curse on Harry Potter!!!! In book 6, Rufus Scrimgeour took over as the Minister for Magic, but why didn't he remove Umbridge from the Ministry in the first place?  Surely, he was more proactive than Fudge right?

Dolores Umbridge sent two Dementors to kiss Harry Potter illegally. She used a Blood Quill — a dark artifact — on at least two students — Harry and Lee Jordan. She was planning to use the Cruciatus — one of the Unforgivable Curses — on Harry to give up Dumbledore's location. She used what she thought was Veritaserum on Harry illegally.  So, why was she not arrested immediately? In fact, it seems that she wasn't even fired from the Ministry when Scrimgeour became Minister. Considering that Dumbledore had Sirius Black exonerated after his death , arresting and convicting Umbridge should have been quite simple. Yet, she was arrested only after his seventh year.


Yesterday I was experiencing a weird issue with Windows 10; the computer was outputting weird beeps (in Win10, not the BIOS) at random intervals. It sounded like Morse Code, to be completely honest.  After some reading online, it was suggested that I update drivers. After downloading the latest drivers for the system, a BIOS update was included.  I downloaded said BIOS update and installed it. The installation went fine, however now the system won't POST. The system now beeps twice on boor (after an extended period).  I've found the  which provides instructions for recovering a failed BIOS. So far the recovery has run through twice (if the system shuts down, the recovery was "successful"). The first time, I tried a new BIOS version, dated 2019. The system failed to POST. The second attempt was with a BIOS version from 2016 and the system still fails to POST.  Currently I'm at my whit's end. I need this system to run again.  More links where I've followed the instructions:       EDIT: The answers in the question marked do not help this problem in the slightest.  As I've mentioned, the problem is with the BIOS. Not the RAM, not the HDD, not anything. I've attempted disconnecting and re-seating the memory, I've tried recovering the BIOS all to no end.  Is there another way the BIOS can be restored?

We have a Lenovo ThinkCentre, brand new, that has on occasion failed to start when trying to restart. It simply gives off loud beeps, that I suppose have meaning: 1 long and 3 short. There is nothing on the screen. After holding the power button until it shuts down, then starting it again, it works fine. We experience no other performance issues.   I do not know enough about computer hardware to know what to check/troubleshoot, etc. C̶a̶n̶ ̶a̶n̶y̶o̶n̶e̶ ̶g̶i̶v̶e̶ ̶t̶i̶p̶s̶ ̶i̶n̶ ̶f̶i̶g̶u̶r̶i̶n̶g̶ ̶o̶u̶t̶ ̶w̶h̶a̶t̶ ̶t̶h̶e̶ ̶b̶e̶e̶p̶s̶ ̶m̶e̶a̶n̶,̶ ̶a̶n̶d̶ ̶o̶t̶h̶e̶r̶ ̶t̶h̶i̶n̶g̶s̶ ̶I̶ ̶c̶a̶n̶ ̶d̶o̶ ̶t̶o̶ ̶n̶a̶r̶r̶o̶w̶ ̶d̶o̶w̶n̶ ̶t̶h̶e̶ ̶i̶s̶s̶u̶e̶?̶  Signs seem to point to issues with the RAM. I have reseated the RAM. Since then, it has never failed to start.  Specifications:   Lenovo ThinkCentre M700 Signature Edition Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz 3.19 GHz 8.00 GB RAM 64-bit OS-- Windows 10 Pro 1- 1 TB HDD 1- 256 GB SSD Anything more needed?


I read the book of Introduction to Probability SECOND EDITION by John N. Tsitsiklis et al. and in Sec. 4.3 Conditional Expectation and Variance Revisited, I think the $var(X|Y)$ is not $nY(1-Y)$ but $nY(1-nY)$.    My understanding is that since $var(X|Y)=E(X^2|Y)-[E[X|Y]]^2$ and $E[X|Y]=nY$ and $E(X^2|Y)=nY$, so $var(X|Y)=nY(1-nY)$ rather than $nY(1-Y)$.  How do you think about it?

so I'm trying to use the equation: $Var(X) = E[X^2] - (E[x])^2$, And for the $E[X^2]$ part, I'm trying to use the method of indicators... However, when I do that, I get the same value as with $E[X]$... Is it wrong to try to use the method of indicators for this case? Basically, I end up with $Var(X) = np(1-np)$,  when it should be $Var(X) = np(1-p)$.


I'm trying to make a simple "store" program with a prompt to exit the program at the end. If the user types yes, it will exit. But if they say no, it's supposed to just print a message to let them know they can keep shopping. For some reason that message doesn't appear though. Here is the object.  public class HelloShopper1 {    public static void main(String[] args) {               Scanner scanner = new Scanner(System.in);               System.out.print("Hello Shopper, what is your name?\n");               String input = scanner.nextLine();               if(!input.matches("[a-zA-Z_]+")) {               System.out.println("Nice try " + input + " . Get out of my store!");               } else {              System.out.println("Thank you, " + input + ". It is my pleasure to help you today.");              System.out.println("Do you want to close this program?");              String input1 = scanner.nextLine();              System.out.println(input1);              if(input1 == "yes") {              System.exit(0);              if(input1 == "no") {              System.out.println("Thank god. Please continue shopping.");            }         }     } }

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 was upgrading my ubuntu dist to version 19.04 and it said 1,2 pB/s. I think it is petabytes(or bits, idk which for sure) per second. Is that a bug, or doesnt mean peta?

I have problem (seems to be trivia) about Ubuntu Terminal. Once my network connection slow down then it (sometimes but very rare to happened) showed some information like this.     I shocked because I have been got 2,919 PB/s. Sorry my mouse block some part of letter 'P' (I actually rush to print screen) but I believe you can recognize it.    EDIT    based on answer given to me, and I got similar info then, I'd like to add more clearly new image after.    Can someone explain it to me?  Best Regards!


I've bought an ASUS TX300CA Windows 8 transformer tablet which has a detachable keyboard dock.  The tablet has a neat feature that although the detachable tablet part has only a 128Gb SSD, when you attach the keyboard dock, you get additional 500Gb of magnetic hard drive.  I want to install Microsoft Office 2010 so that some Office applications install on the tablet drive and some (such as Access, Visio, Project etc) - that would usually require keyboard work - to install on the dock drive.  There doesn't seem to be a mechanism to change the installation folder for the software.  Can it be done?  TIA, Paolo

I've bought an ASUS TX300CA Windows 8 transformer tablet which has a detachable keyboard dock.  The tablet is a Core i7 machine and has serious power - so I want to use it to do sporadic and ad-hoc software development on it.  The tablet has a neat feature that although the detachable tablet part has only a 128Gb SSD, when you attach the keyboard dock, you get an additonal 500Gb of magnetic hard drive.  What I want to be able to do is to install applications so that they will install either completely on the tablet drive or completely on the dock drive.  For example, I'd like to put most of Microsoft Office on the tablet, but put say Microsoft Visual Studio on the dock drive.  Can this be done?  What's best practice for this?  TIA,  Paolo


Is there anyway I can transfer my iTunes giftcard from my old Apple ID account to my new Apple ID account?

How can I transfer my $0.49 on my apple ID to my family members $0.54 on her apple ID?


I have 3 servers working as a proxy load balance. Someone has gained access to them and is somehow creating an index.html in my webroot containing advertisement and an iframe on my main index.php file.  I'm not sure how they are doing this because even if I delete the index.html file across all of the server I can return half a day later to see that it has been done again.  I noticed that there was a web shell script on the server and deleted it. I also changed sshd_config so that only one user is able to login and all other accounts can't. Somehow they are still accessing the servers and making these changes. History doesn't show anything.  I need to get this resolved ASAP.  Can anyone make any suggestions?  Thanks!

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I'm fairy new to Java so I don't even know if I'm doing this correctly but I have created a GUI with a text field, a password field and button. I have an event listener on the button. When it's pressed, the listener will check the name and password fields but it is currently not working as intended.  Event code:  public class event implements ActionListener {     @Override     public void actionPerformed(ActionEvent arg) {         String name = textfield.getText();         char[] temp_pass = password.getPassword();         String pass = new String(temp_pass);          if (name == "Spedwards" && pass == "test") {             result.setText("Welcome Liam");         } else {             result.setText("Unknown User");         }     } }   The way I understand this, is it gets the text from the text field and the password field then checks to see if it equals Spedwards and test respectively, then sets the text for the label I have on the GUI. Currently however, it only sets the text as Unknown User regardless of putting in the correct information or not.  Why does it do this and how can I correctly get the values I need?


In Sorry, can I move a pawn that is right outside my start, then pick a move backward 4 spaces card to right outside my safety zone?

can a player move backwards into their safety zone in the game of Sorry?


I found a small amount of Albanian lekë from summer's visit there. Is there any place in Ireland / UK where I can change those back into EUR, GBP or Dollars??

I've just returned from several unusual countries in Asia, and annoyingly despite being told I'd have no problem, I'm unable to find anyone in London to change back to pounds.  I've tried Travelex in Heathrow, a currency exchange place, and the post office.  The currencies include cash from: Mongolia, Kyrgyzstan, Kazakhstan and Uzbekistan.  Most of the responses when shown the money is to the tone of "What the hell currency is this?" which doesn't fill me with confidence.  Any suggestions welcomed for places that may change this. Otherwise I may need to go back next year ;)


Looking at the MWE below, the fontsize of the last exponent got enlarged after applying \overbrace. How to get its size back to the original as if the overbrace weren't there? Thank you!  \documentclass{article}  \begin{document}  \[     e^{-t/\tau} + e^{-\overbrace{t/\tau}^{\theta}} \]  \end{document}

Using pdflatex, the command  $e^{a\overbrace{+b+c}}$   results in a bigger size font of the part +b+c under the brace. If I do:  $e^{a\overbrace{\scriptstyle +b+c}}$   the size of +b+c is fixed but the size of the brace is still wrong: the brace has the same size than before but, since the interior font is now smaller, white spaces appear.  Can we fix this?  NOTE: This question can be considered a duplicated of . However, the solutions in that question do not tackle the brace size problem. I don't have enough repuation to add this as a comment there and I don't think it is a good idea to add an answer that is rather a question.  NOTE2: Using mathtools does not change the problem.


I bought a second hand iphone 5s, I erase all content and settings, then i want to create my apple id, to download apps and all, i completed the procedure to create an apple id but at last the device showing me that "this device is no longer eligible for creating a free icloud account" how can i solve this problem?

On the settings under iCloud, if I try and log in on the ID I created this morning, it says that the maximum number of ID's have been activated on this device. When I try and create a new account underneath, it says that this device is not eligible for one.  How can I resolve this?


Assuming Christmas day falls on the 25th of December every year, and using the Gregorian calendar, is it equally likely to fall on any day of the week? (With no prior knowledge about last year's Christmas day, or the year before, or the year before that...)   It would appear from a linked question, and a helpful answer that this is not true for 400 years (since it is not divisible by seven). But it is true for 2800 years (since it is divisible by seven). Is there a flaw in this thought process, or does this question inherently depend on the time period you consider?

I am wondering if there is a strict argument about the probabilities of Christmas (Dec. 25) on Monday, Tuesday, ..., Sunday. My experiments give:  Sunday 0.145 Monday  0.14 Tuesday 0.145 Wednesday 0.1425 Thursday  0.1425 Saturday 0.14 Friday 0.145   It looks that they are not equal. :)  My question is: 1) How to obtain the probabilities without restricting the counts over certain range of years? 2) why Sunday is more probable than Wednesday, which is more probable than Monday, if it is true?


We have a worldwide nonprofit organization which receives a modest amount of traffic (or at least I figure it's modest but I have little to compare against -- enter SF)   How do I determine what scale of service I need from a hosting/VM provider?    What hard metrics work?   Response time?  CPU utilization?  Requests being handled per hour?  What is reasonable for me to expect a service to handle at different cost levels?  Should there be limits to my expectations on uptime for a less expensive service?  Do I need to do a rough calculation of my expected bandwidth and match it with t Should I inquire into the kind of internet connectivity is backing my service?   What are reasonable expectations at each cost level for a hosting provider? At what cost level can I get these expectations written as part of an SLA?

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?


Installation Any Software On Ubuntu I want to install any software usinh sudo and apt from terminal. If I know only the software name from their official site, then is it possible to perform this action?

Uninstalling using the method:  dpkg --list sudo apt-get remove “package-name” sudo apt-get purge “package-name” sudo apt-get autoremove   is a beautiful way, but the problem is in searching for the package which I really need to uninstall inside all of this long dpkg --list , and this is not the fatigue, you will get enough fatigue when looking for the true name of the true package which you want to remove.  -are there any way much easier than this? -are there any software like Iobit uninstaller which is on Windows? mean: software for uninstalling programs on Ubuntu? -are there any way to get the true name of the package which we want to remove?


Lyircs of Free by Natalia Kills:     I'm free      I just spent all my money       but I rocked that like it don't cost a thing   Shouldn't it be "I've just spent all my money"? As far as I remember, our English told us to use Present Prefect in such case because of the just.

To me, using Present Perfect form means the event can occur again. So, saying      someone has died   may not be grammatically correct.  Also, I noticed (it might be just coincidence):     passed away   is used more often than     has passed away   Is using Present Perfect correct here?


What's the difference semantically and technically between doing struct user* bob and struct user *bob?  According to  it's called thing* bob or thing** bob, which makes sense because it is of type struct* (or pointer to struct)  On the other hand we can also do thing *bob or thing **bob  Take the example program:  struct user { int age; int *p_age2; };  int main() { struct user bob; struct user* p_bob = &bob;   I am not sure if it's purely a matter of coding style or if there is actually a slight difference somewhere. I'd be interested to hear why one or the other could make more sense. Another important thing to note is that struct tags and struct variables can have no type prior to them sometimes so maybe user* would make more sense then.

I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition.  How about these examples:   int* test; int *test; int * test; int* test,test2; int *test,test2; int * test,test2;   Now, to my understanding, the first three cases are all doing the same: Test is not an int, but a pointer to one.  The second set of examples is a bit more tricky. In case 4, both test and test2 will be pointers to an int, whereas in case 5, only test is a pointer, whereas test2 is a "real" int. What about case 6? Same as case 5?


I have Ubuntu 14.04.1 LTS installed on my computer and a friend of mine has Kubuntu 14.04 Trusty Tahr installed on his machine, which has no connection to the internet.  I want to share with him some packages I've installed on my Ubuntu (such as texlive-full, for example), basically I'll copy and paste /var/cache/apt/packages to his machine (I have a really slow connection to the internet).  It that possible ? Could anything go wrong ?

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


I want to know the rationale behind and the intuition of why they defined the tensor products. I started to read Keith Conrad's handouts. On page 4, paragraph 2 of  he says that the direct sum and direct product of two arbitrary modules are the same sets, but the direct sum is a module and the direct product doesn't have a module structure. Why direct product doesn't have a module structure ?? Besides, on the same paragraph he said that linear functions are generalized additions and bilinear functions are generalized multiplications. how come???

I'm  about tensor products of modules and I don't understand the following paragraph on page 2:     Even though elements of $M \times N$ and $M \oplus N$ are written in the same way, as pairs $(m, n)$, bilinear functions $M \times N \rightarrow P$ should not be confused with linear functions $M \oplus N \rightarrow P $. For example, addition as a function $ R \oplus R \rightarrow R $ is linear, but as a function $R \times R \rightarrow R$ it is not bilinear. Multiplication as a function $R \times R \rightarrow R$ is bilinear, but as a function $R \oplus R \rightarrow R$ it is not linear. Linear functions are generalized additions and bilinear functions are generalized multiplications.   My questions are:   Why the distinction between $\times$ and $\oplus$? Aren't they the same for finite sums (products)? I don't understand how addition can be linear but not bilinear. Surely, if $(a,b) \mapsto a + b$ then it doesn't matter in which argument it is linear. (Thinking of e.g. $\mathbb{Z} \times \mathbb{Z} \rightarrow \mathbb{Z}$) And if $(a,b) \mapsto ab$ then how can it be linear in both arguments (bilinear) but not be in one (linear). It's difficult to write this sentence as it makes no sense to me whatsoever.   Many thanks for your help!


Is there any mathematical contraction of the following factorial series function?  $$ F(n) = 1.1! + 2.2! + 3.3! + ...... + n.n! $$  I tried it by inspecting that $$ x.x! = x^2.(x-1)!$$  I need derivation of the series.

I discovered that the summation $\displaystyle\sum_{k=1}^n k\cdot k!$ equals $(n+1)!-1$.  But I want a proof. Could anyone give me one please? Don't worry if it uses very advanced math, I can just check it out on the internet. :)


How should i solve expressions in $f$?  $$ f(f(x))=e^x $$  or:  $$ f(f(x+1)+1)=x $$  Series, expansions, discretizations, CAS, whatever?  My normal approach is useless here...

I was thinking, inspired by mathlinks, precisely from , if there exists a continuous real function $f:\mathbb R\to\mathbb R$ such that $$f(f(x))=e^x.$$ However I have not still been able to come up with an answer. I would like to share this problem with you.   I'm not aware of its level, though i wouldn't classify it as homework, so I'm not giving it the homework tag. If anybody feels that this problem is in reality easy or looks like an homework, please feel free to add that tag.    EDIT for those interested in the complex case, I've found this on MathOverflow. It's the first answer. Wow!


I was interested if I can use a different flavor of gravatar instead of identicon.  When you click on the change picture text on your profile picture it has the Identicon and Upload options. I clicked Identicon (which already had the green tickmark) and my avatar changed (which obviusly sould not have happened as I have not changed any options).  For a reference you can see my old avatar here:    And my new one on Stackoverflow:     I have no recollection of changing my email address at any point during the lifetime of my account. (It was registered using Google-authentication). I have no Gravatar account registered.   Edit: My profile email (md5-ed) address would give the old avatar:

I had an (extremely minor) identity crisis when I clicked on my username and saw a different identicon than I'd had previously. :)  According to , your identicon is based on a hash of your last known IP address.  Since a user's profile picture part of their identity, I would prefer if my profile picture only changed through deliberate action on my part.  Since the user's IP hash is already saved (the identicon has to be displayed to people even during the unthinkable periods when we're not actively browsing), I propose preserving the first one assigned to a user, and not updating it even if the user's IP address changes.  Are there any upsides to the current behavior that I haven't thought of?


Suppose that $A$ is an $n\times n$ matrix with zero as an eigenvalue. Show that $A$ is not invertible.   Hint: Assume that $A$ is invertible and compute $A^-1*Av$ where v is an eigenvector of A corresponding to the zero eigenvalue.  Can you also explain what zero as an eigenvalue is telling me/ adding to te quesiton.  Please help!

I can't find the missing link between singularity and zero eigenvalues as is stated in the following proposition:  A matrix $A$ is singular if and only if $0$ is an eigenvalue.  Could anyone shed some light?


I'm relatively new to Python, so my code is very simple. I have a project to write code which approximates integrals using the rectangle rule, followed by the trapezium rule:      a = float(input('Lower limit ---> '))  while True:     b = float(input('Upper limit ---> '))      if b > a:         break     elif a == b:         print('Integral = 0.')     else:         print('Invalid input.')  N = float(input('Number of integral divisions ---> '))  h = float((b - a) / N)  print('For the integral in the range {} to {} with {} divisions, the step size is {}.'.format(a,b,N,h))   def f(x):     return(np.exp(-x) * sin(x))  summation = (f(a) + f(b))  for points in range(a, N - 1):     summation = summation + f(a + (points * h))  I = h * summation  print(I)   Near the end, I try to use a for loop from the initial limit to minus 1 the number of step sizes. I've defined this as a float but it I keep getting the error      TypeError: 'float' object cannot be interpreted as an integer.   Any ideas how to fix this?

Is there a way to step between 0 and 1 by 0.1?   I thought I could do it like the following, but it failed:  for i in range(0, 1, 0.1):     print i   Instead, it says that the step argument cannot be zero, which I did not expect.


A task given to us is about proving that the interval $X=[0,1]$ and the square $Y=[0,1] × [0,1]$ are equipotent.   Part 1 asks to find an injective function $f : X \rightarrow Y$  Part 2 asks to find an injective function $g : Y \rightarrow X$  I can't seem to find the answer to these two and I imagine they are more obvious than what it seems. I know that the Cantor-Bernstein-Schröder theorem has to be used eventually. Any help would be greatly appreciated.

Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality  using the SB theorem? Also how does one find a bijection on $f:(0, \infty) \to (0,1)$ such that they have the same cardiniality?


I made marks and solved the camera. In the constraints menu, I selected the camera solver and set floor. However, the camera angle is not harmony.  What is the problem?

I have been playing around with camera tracking and I'm happy enough with the tracking and alignment of the markers with the footage when viewed through the camera.    The problem is, when I am not looking through the camera I can see that the grid isn't aligned to the camera.    How do you correctly align the grid to this tracked camera? I have set a floor and two points for scale, also clicked setup tracking scene, but this just added cube and plane which were on the grid.