Assume I have a class like this:  public class Foo {     public Bar RequiredProperty { get; set;}      public void Baz()     {         if (this.RequiredProperty == null)         {             // Which exception should I throw?         }     } }   My solution has a class that is designed to be reused without having to pass a lot of arguments to the Bar method over and over again. So, what should I throw when Bar isn't initialized to a non-null value?  More Information I'm essentially rolling my own code parser and formatter. Call it an object lesson. One of the classes is an HtmlCodeFormatter that has the following properties (in honor of Dependency Injection):  public IFormatter Formatter { get; set; } public IParser Parsre { get; set; }   This allows me to write any number of language-specific parsers and formatters. For example, I have a CSharpParser and a JavascriptParser. I also have an HtmlCodeFormatter, and there are plans for another (of dubious utility).  The idea is that you can instantiate the HtmlFormatter using an object initializer, like this:  var formatter = new HtmlCodeFormatter()     {         Parser = new CSharpParser();         Formatter = new HtmlCodeFormatter();     }; formatter.Format("Console.WriteLine(\"Hello, world!\"));   When HtmlCodeFormatter.Format is invoked, it needs to be able to verify that both a parser and a formatter have been provided. That's no problem, really, but I'm kind of stumped about which exception to throw. I'm leaning towards InvalidOperationException, but I'm not entirely certain that's the best choice.

What exception should I throw if I encounter an illegal state - for instance, an initialization method that should only be called once being called a second time?  I don't really see any built-in exception that makes sense.  This seems like something that should be in the framework - am I not poking in the right spot?


Starting from the idea that $$\sum_{n=1}^\infty n = -\frac{1}{12}$$  It's fairly natural to ask about the series of odd numbers $$\sum_{n=1}^{\infty} (2n - 1)$$ I worked this out in two different ways, and get two different answers. By my first method $$\sum_{n=1}^{\infty} (2n - 1)  + 2\bigg( \sum_{n=1}^\infty n \bigg) = \sum_{n=1}^\infty n$$ $$\therefore ~\sum_{n=1}^{\infty} (2n - 1) = - \sum_{n=1}^\infty n = \frac{1}{12}$$ But then by the second $$\sum_{n=1}^{\infty} (2n - 1)  - \sum_{n=1}^\infty n = \sum_{n=1}^\infty n$$ $$\therefore ~\sum_{n=1}^{\infty} (2n - 1) = 2 \sum_{n=1}^\infty n = -  \frac{1}{6}$$ Is there any reason to prefer one of these answers over the other? Or is the sum over all odd numbers simply undefined? In which case, was there a way to tell that in advance?  I'm also curious if this extends to other series of a similar form $$\sum_{n=1}^{\infty} (an + b)$$ Are such series undefined whenever $b \neq 0$?

$\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer?


I am applying for a multi-entry business visa/schengen for austria and would be spending the bulk of my time in vienna. Since, I dont have any meetings over the weekends,  is it possible for me to visit other EU nations as a tourist using the same Visa

I applied for a Schengen multiple entry visa but I got only one single entry with a period of stay of 21 days.  I'm traveling first to Austria; then I booked a flight to Paris, France. Is that possible or should I take only trains or vehicles to travel since my visa is only a single entry? Can I fly to other Schengen countries with a single entry visa?  Should I travel to the country that issued the visa? I'm going backpacking through Europe and I don't know my longest destination or my actual destinations, to be clearer.


I need to use GniPlannerFTTH, but this plugin does not work without the Openpyxl python library installed. How can I install Openpyxl in QGIS?

How can I use 3rd party libraries on QGIS plugins on Windows?   I've developed a plugin that uses rasterio and numpy for a customer, but he's having problems installing rasterio and numpy.  Actually rasterio and numpy were installed in it's main system Python (C:\Python27), but I need QGIS Python to recognize it.


Is there a generalization to ?  Namely, if $k \subset K$ are fields and $\alpha, \beta \in K$ are algebraic over $k$, is it true that $k[\alpha,\beta]=k(\alpha,\beta)$?

Consider a field extension $L/K$ and $a,b \in L$ algebraic over $K$. Is it true that in this setting $K[a,b]$ is already a field?   I know that $K[a]=K(a)$ if and only if $a$ is algebraic over $K$.


If you go to  any page on stackexchange.com the old top bar is still in use. This makes me sad since I find the  to be far superior. It only seems fair that the main domain should also have the top bar designed to unify all Stack Exchange sites.


This is from Rudin's Principles of Mathematical Analysis, Example 2.21.  Let us consider the following subset of $R^2$:  (c) A nonempty finite set.  The book says it is closed and bounded but not open nor perfect.  My problem is with it being closed, I don't understand why. I know there is already a similar post for this here, but I don't quite get it.  I know that a closed set contains all its limit points. I imagined a set $S$ of discrete points on the plane. For each point, if we construct a radius, we find that the $N_r(p)$ for each p in the set will not contain any points of S. So I don't think any of them are limit points.  But then if I take a look at its complement, it is clear that the complement $S^c$ is open which means that the set is closed. So I am confused. Also, I think I remember something about the definition of a closed set being vacuously true but I'm not sure how to relate it here (I lost my notes for this).  So my questions would be:  1) Why is the set closed (without using the complement of $S$, possibly using logic to think it through)?  2) Is my reasoning using the complement of $S$ correct?  Thank you.

I came across this text in Rudin's book where it has been mentioned that a non-empty finite set is closed.   But a closed set is a set which contains all of it's limit points in the set itself but none of the elements of a non-empty finite set can possibly have a limit point because a neighborhood of a limit point has infinite points . So how come a non-empty finite set be a closed set ??


Searching the internet, I found a lot of sites and articles saying that you should not use plastic containers for hot liquids, like plastic cups for coffee. But I was not able to find an answer for whether this applies to hard plastic with the 'food safe' (wine glass and fork) icon. More specifically, I use plastic bowls like this for soups, ramen, etc. And I am wondering if this is safe. The bowl is bought in Norway, in case that makes a difference. I do not see any other symbols on it.

Is it safe to reheat food in any type of plastic container or are there only some types of plastic ware that are safe to use?


Is the following statement true or false?     Let $\{A_i,\ i\in I\}$ be a family of at most countable sets. Suppose the family is totally ordered under set inclusion, i.e. $\forall i\in I,\ j\in I$, either $A_i\subset A_j$ or conversely. Then $\bigcup_{i\in I}A_i$ is also at most countable.   I had this problem when I was trying to prove something else using Zorn's lemma. Although my original problem had a simpler solution, I am now more interested in this new question I came up with, so I won't post my original problem as it is sort of irrelevant.  The difficulty is that $I$ may not be a countable index set. Yet, I was unable to find a counterexample or a proof off the top of my head. Any ideas?

Let $C$ be a chain of countable sets, i.e. $\forall S, T \in C: S \subseteq T \lor T \subseteq S$, and that every $S \in C$ is countable. Then, is $\bigcup C := \{ t \mid \exists S \in C: t \in S\}$ countable?  The answer is no, and a counter-example is $C = \omega_1$, the first uncountable cardinal/ordinal. Is there a more elementary example that doesn't involve, say, cardinals and ordinals?


In the movie Kingdom of Heaven Bailian of Ibelin asked Saladin, "What is Jerusalem worth?". The latter answered, "nothing" and then he said "everything".  What's the meaning of that?

Towards the end of the movie , after Balin surrenders control of Jerusalem to Saladin, he asks the question, "What is Jerusalem worth?" Is there any deeper meaning to the reply? :  Balian of Ibelin: What is Jerusalem worth? Saladin: Nothing. [walks away] Saladin: Everything!


I've tested this regex:   String regex = "[e][#](.)+[$]   the regex works well to identify exponential terms, however it breaks when there are two or more consecutive exponential terms.  I test the regex with the usual code:  while(matcher.find()){ String string = matcher.group(); System.out.println("this one: "+string); }   When I type the expression:   e#x$ + 3e#x+1$   string equals to  (e#(x$+3e#x+1$))  By the way, I added the parentheses inside the while loop. They are necessary for what I am trying to accomplish.   I want the result of string to be (e(#x$))+3(e(#x+1$)  I know the problem lies in "(.)+ What I think is happening is that the regex includes the first $, what I need is for it to stop at the first $.   How can I include this logic inside the regex?  thank you

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I need to create a portable windows To Go workplace for my job and make it runs on a Mac computer, i tried WinToUSB tool and it didn't work, it keeps stucking at 0% when creating Windows to Go with a USB 3.0, so, is there any other way or tools that can create a WTG drive that can be boot and run on a mac?


A Gaussian mixture model is a weighted sum of Gaussian densities, i.e.,   $L(\theta) = \sum_{i=1}^{m} \pi_{i} f(x_i)$  where $m$ is the number of the mixture component.   Hence, Gaussian mixture models is a sum of a finite mixture Gaussian distribution with unknown parameters. I read that, in Gaussian mixture models, each univariate margins are assumed to be normal. Is that correct and why?   Any help, please?

I just would like to understand some information about the joint normality and the margins. I read that the normal joint distribution almost always implies that the univariate margins are all normal.   My question is:  1- Is this apply for Gaussian mixture models? For example, in the Gaussian mixture model, each mixture component follows a Gaussian distribution. Hence, does it imply that each margin will be a Gaussian distribution as well? "I understand that mixture components are used to describe the dependency structures, and they are the joint distribution. is that correct?  2- I read this from one answer to a question in this site . "So yes, the assumption of joint normality is a sufficient condition for all marginal distributions to be normal, irrespective of the dependence structure. Hence, the theory of Copulas does not affect this result in any way."  However, I really do not understand this: irrespective of the dependence structure. As I understand if the joint distribution in normal then the dependence structure is normal.   Could someone help me with my questions, please?


As can be seen in , bringing a maintenance helicopter to the same potential as the high voltage power line is not without some arcing.  Why doesn't that happen to birds?

I saw , where a guy did power line inspection from a helicopter, which is isolated from ground. When he held out a "magic wand," a small amount of arcing came off of the power line to the helicopter.     This got me confused, though, because I thought since he was isolated from ground, the power would not want to go anywhere.   The helicopter simply has no relationship to ground.   So, why does the Magic Wand arc to the helicopter?


$ printf "%s" a b ab$ printf "%s%s" a b ab   I have some problem understand the format specifier for printf. If I am correct it is mostly the same as those for strings in the C programming language.  Why does the format specifier %s concatenate the two following strings together?  Why does  %s not mean that there is only one string to substitute it, and ignore the remaining string?  Why are the results for two strings under %s and under %s%s the same?

I have the following printf function:  $ printf '%s %s %s\t%s\n' 100644 blob 8e1e f1.txt 100644 blob 9de7 f2.txt | git mktree   Can anyone please explain what it produces and why? I expected to have equal number of formatting options %s for each argument string but I have a lot more arguments strings here.


I would like to set a variable in a script and have it outside the script for the next command.   This is what I have:  #!/bin/bash  myExports="TEST='Value 1';export TEST;";  echo Before eval: $TEST echo '***'  eval $myExports  echo After eval: $TEST echo '***'   This is how i'm calling it:  ./env1.sh ;echo Next command:$TEST   This is the output:  Before eval: *** After eval: Value 1 *** Next command:

I'm trying to write a shell script that, when run, will set some environment variables that will stay set in the caller's shell.  setenv FOO foo   in csh/tcsh, or  export FOO=foo   in sh/bash only set it during the script's execution.  I already know that   source myscript   will run the commands of the script rather than launching a new shell, and that can result in setting the "caller's" environment.  But here's the rub:  I want this script to be callable from either bash or csh.  In other words, I want users of either shell to be able to run my script and have their shell's environment changed.  So 'source' won't work for me, since a user running csh can't source a bash script, and a user running bash can't source a csh script.  Is there any reasonable solution that doesn't involve having to write and maintain TWO versions on the script?


I know this has been asked before, but the solutions did not work for me. I have an HP OfficeJet Pro 8625, which worked fine under 18.04.  HPLIP does not install properly because of a dependency that is no longer available.  Specifically, it needs python3-pyqt4 which has been removed from the repositories.  Earlier questions suggested steps that do not work for this printer. I added hplip-gui and still no-go. I downloaded the install script from , and the install script will not complete. I did cd ~/Downloads/hplip-3.20.6, then ./configure --prefix=/usr --enable-qt5 --disable-qt-4, then make, then sudo make install. These all seemed to complete. But I still cannot use the printer.  I only run LTR's because it is such a pain to go thru this every 6 months. Even every 2 years is hard. My printer is not working. any ideas, other than reverting to 18.04 until this gets fixed?

Let's assume that one has some HP printer and/or scanner and checked its support status on the corresponding page of HPLIP site - .  So one have the following information: the device Model name, Min. HPLIP Version and Driver Plug-in need.   What should one install to make Ubuntu fully support the HP printer and/or scanner?


At the moment I'm writing this, , is quoting a 30-Year Fixed Rate with an interest rate of 2.75% if you are purchasing a home, while the same loan has a rate of 3.25% if you are refinancing. Other banks are similar, although the numbers vary slightly. Why would this be? It's the same property, the same loan amount, the same obligation and likelihood of paying it back, so why does the bank differentiate between these two kinds of loans?

Right now, most if not all major banks have mortgage refinance rates about 1% higher than the rate for a mortgage used to purchase a property. Up until a few months ago, I don't recall ever seeing any spread between advertised refinance and purchase rates, never mind such a big one. Is there historical precedent for this practice? What is stopping a lender from undercutting other banks by offering only an 0.5% spread? Is it collusion that nobody is doing so?


I'm going to build a PCA for a set of binary variables and a ordinal variable. The binary variables values are 0 & 1 ordinal variable value is in a scale of 1 to 50  Is it possible to do PCA with this data set?

I have a dataset with a large number of Yes/No responses. Can I use principal components (PCA) or any other data reduction analyses (such as factor analysis) for this type of data? Please advise how I go about doing this using SPSS.


I considered an even number $n\geq 9$, where it is divisible by some positive integer $k$.  Also, $k$ does not divide $\frac{n}{2}\ $ (negation of the hypothesis in my ).  Let $n = kq$.  Can we say that $q$ is even in this case? Can anyone help to get it theoretically?  Thanks a lot for the help.   My attempt:  Let $n = kq$.  Since $k$ does not divide $\frac{n}{2}$, we have   $n/2 = k.q_1 + r$ for $0<r\leq k-1$.  How to conclude the even or odd property of $k$ and $q$ here?

I considered an even number $n\geq 10$, where it is divisible by some positive integer $k$.  Also, $k$ divides $\frac{n}{2}$. Then $n = kq\implies k\cdot\frac{q}{2} = \frac{n}{2}$.  Can we say that $q$ is even in this case? Can anyone help to get it theoretically? Thanks a lot for the help.   PS.   From the answer given by Bill, it does not satisfy if we take $n=18,k=3,j=9.$ Kindly help. Let me rectify where I am going wrong. Please help.  $\quad\ \ \ \ \ \ \ \ \ $ If $\,\rm\ J,K\mid N\,\ $  then $\rm\,\ \color{#c00}K\ {\LARGE \mid} {\Large  \frac{N}{\color{#0a0}J}}\! \iff\color{#0a0}J\ {\LARGE \mid} {\Large \frac{N}{\color{#c00}K}}\, $ [$\rm\!\!\iff\!\!  JK\mid N\,$]  This part is not satisfied.


A few years ago I read a book and I am trying to find it again any help would be appreciated.  As I remember it was an older book where the protagonist gains consciousness on a space ship thats gained sentience (this may be where I'm wrong as I cannot remember if its sentient or just gone rogue), the crew has been cloned over many generations and have been perverted into almost monsters. The protagonist tries to fix the problem.  The book ends with the actual crew waking up and exiting the space craft which isn't in deep space but in a sea and they find evidence of what had happened.

It was written in English and likely a young adult series. I believe it was a hardcover book and possibly from an Australian author, though I could easily be wrong. I have a feeling it was a series, but I'm not sure if I'm confusing it with other books from the author (see below). I believe it has been out for at least 10 years, probably longer, because I read it in middle school.  The book begins with a school boy seemingly hallucinating seeing a futuristic, armed girl. I think she might have been on the cover of the book, but again I could easily be wrong. The boy is later pulled into the space ship she is on (the school scenes were not real, I believe).  As I remember there was no real adults on the ship, although it might have been because they had all been killed off previously. I realise this seem similar to . Later in the book, or perhaps it was a later book in the series, other children joined the crew.  At the end of the book/series, it is revealed that Earth had been ecologically devastated (possibly by industrial pollution). The cloned (I think) children were on a return trip in space, so that by the time they get back to Earth, the planet is ready for human habitation again.  I recall reading in the afterwords that the author was writing some books set in the same universe, but about early space colonisation of the solar system.  I think it was set before the above scheme to recolonise Earth was enacted. The author said we'll see "familiar names", presumably because the characters were later cloned for the recolonisation mission.   I read a couple of these "prequels" (or at least other books from the same author) but don't recall seeing such names. One of the books mentioned the Earth's oceans had turned toxic, though.


In the beginning I want to ask why matrix is messed up in beamer, then @percusse gave the instructions to make it perform right.  Now the problem left is the two arrows before c4 and c7 seems not horizontal, is there a way to fixt it?    \documentclass{standalone} %\documentclass{beamer} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} %\begin{frame}[fragile] \begin{tikzpicture}   \matrix (m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]   {       c_0 & c_1 & c_2 & c_3 \\       {} & c_4 & c_5 & c_6 \\       {} & c_7 & c_8 &     &     \\   };    \path[-stealth]       (m-1-1) edge node [above] {$a_0$} (m-1-2)       (m-1-2) edge node [above] {$a_1$} (m-1-3)       (m-1-3) edge node [above] {$a_2$} (m-1-4)       (m-2-1) edge node [above] {$a_3$} (m-2-2)       (m-2-2) edge node [above] {$a_4$} (m-2-3)       (m-2-3) edge node [above] {$a_5$} (m-2-4)       (m-3-1) edge node [above] {$a_6$} (m-3-2)       (m-3-2) edge node [above] {$a_7$} (m-3-3); \end{tikzpicture} %\end{frame} \end{document}

I am having trouble getting a basic example of a matrix of notes to show up in my beamer presentation. I am using the code copied from the pgf manual. Here is a complete working example. The error I get upon compilation is:  "Package pgfbasematrix Error: Single ampersand used with wrong catcode."  \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,petri,positioning,matrix}  \begin{document}  \begin{frame}  \begin{tikzpicture} \matrix (magic) [matrix of nodes] { 8 & 1 & 6 \\ 3 & 5 & 7 \\ 4 & 9 & 2 \\ }; \draw[thick,red,->] (magic-1-1) |- (magic-2-3); \end{tikzpicture}  \end{frame} \end{document}


I am currently trying to make a split graduated/proportional symbol map on Classical music composers by country and musical era and I am having trouble with making the symbol in QGIS. I had to make a .csv table consisting of the totals by country and by era, and I am able to join my this table to a shape file of European countries, but the desired column (totals, representing the total composers of each country from the entire span of all musical eras) from the joined table I want to show represent with the graduated symbol does not show up in the drop down bar on either program. I am able to get the split symbol using the pie graph feature on QGIS, but I still would like to be able to represent size changes of each pie graph showing the total composers from all eras.

I am currently trying to make a split graduated/proportional symbol map on Classical music composers by country and musical era and I am having trouble with making the symbol in QGIS. I had to make a .csv-table consisting of the totals by country and by era, and I am able to join my this table to a shape file of European countries, but the desired column (totals, representing the total composers of each country from the entire span of all musical eras) from the joined table I want to show represent with the graduated symbol does not show up in the drop down bar on either program. I am able to get the split symbol using the pie graph feature on QGIS, but I still would like to be able to represent size changes of each pie graph showing the total composers from all eras.


So I was wondering if you could have two named followers or if that is just with the DB recruit, one named follower and the slow time shout?  I was wondering if you could have two main followers in addition to the extra "quest" followers

I've just got my first follower, and I'm wondering if I can get a second person to follow me. Is the game limited to one or two follower(s) or does it allow for a large number of followers? It really seems handy to me to have some followers protect me when I draw attention from a larger group, or when I try to steal something where I really shouldn't...


To show the direct limit, I know some ways but I wish to write this inductive limit using a new command, \limind? In other words, when writing this new command I want to see this: limind, not in italic form.  How can I achieve this?

Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including \max, \min, and \log.  How can I define additional such commands?


I have one div of class 'outerpiccontainer' which contains another div 'pic container' inside of it. The inner div is currently empty and just has some styling applied to it, it is 80% height and width of the outer div.  Currently I am able to center the inner div by using a left margin of 10% (10+10+80 =100). However I am not happy with this solution (if I change the size ratio between divs I will lose my center). Is there a way or property to center a div within a div?  Thanks in advance! I have the html portion followed by css below.

Place photo here

  .outerpiccontainer  {     background-color:#BF1432;     width:38%;     height:400px;     padding:1%;     border-top:5px inset #DCDCDC;     border-bottom:5px inset #DCDCDC;     border-bottom-left-radius: 8%;     float:left }  .piccontainer  {     background-color:#DCDCDC;     width:80%;     height:80%;     padding:1%;     border-radius: 50%;    -moz-box-shadow: 10px 10px 5px black;    -webkit-box-shadow: 10px 10px 5px black;     box-shadow: 10px 10px 5px black;     margin-left: 10%;     float:left;  }

How can I horizontally center a
 within another
 using CSS?

Foo foo


I saw two "declined" flags I'm supposed to have cast on .    I do, however, remember being sympathetic with the OP and it would seem odd that I cast two such flags. Also shouldn't those be votes rather than flags? Also I wonder about the quick succession.  Could anybody with the access and a minute to spare satisfy my curiosity and tell me what happened here?   (Totally low priority, I am probably just not remembering what I did back then and everything's perfectly normal.)

Questions that have been deleted, which I voted to close in addition to flagging, are showing my close votes as if they were flags on MSO.  For instance         and         Answers which I've flagged as spam don't show this...  The same was   when things were broken but without the close reason.    This is now broken again, save on Stack Overflow not MSO:


Its very loud and unpleasant and I just know the settings for the terminal bell. But the terminal bell is useful and way more pleasant tune.

If I want to disable beep sounds from stuff like bash, I add this line to "/etc/inputrc":  set bell-style none   Sadly, this doesn't work for some other events like GDM start-up and shut down. I thought that adding this line to "/etc/modprobe.d/blacklist.conf" would help:  blacklist pcspkr   That makes me wonder and doubt where the sound actually comes from.


True or false? $(\mathbb{Z} \setminus \left\{0\right\}, \cdot)$ is a   group   I need to know this because it's from an old exam and it might be asked in my exam, or a task like that.  I'm not entirely sure but I would say that the statement is false. The associative property will work, there will be an identity element too. But we will fail when we are looking for inverse elements as these would require rational numbers.  (So even if we had something like $(\mathbb{Z}, \cdot)$, it wouldn't be a group still.)    I hope I did it alright?

I am teaching myself information about groups, but don't really understand how to work through this problem. Here is what I have been thinking so far (please note that I do not need to work through showing any closure): $\mathbb{Z}^*$ denotes the nonzero integers. Prove or disprove: $(\mathbb{Z}^*, \cdot)$ and/or $(\mathbb{Z}^*, \div)$ is a group.  For $(\mathbb{Z}^*, \cdot)$:  Group. Associative Law: Let $a,b,c \in \mathbb{Z}^*$. Then $(a\cdot b)\cdot c=a\cdot (b \cdot c)$, and the associative law holds. Existence of Identity: Let $a \in \mathbb{Z}^*$, then $a \cdot 1 = 1 \cdot a = a$, and the identity holds. Existence of Inverses: Let $a \in \mathbb{Z}^*$. Then the inverse of $a^{-1}=-a$, and the inverse holds. Note that this only works because we are ommitting zero.  Hopefully this looks like I am on the right track. I don't know to what extent I can explain logic vs showing it with mathematical operations, so I would appreciate guidance in this respect.  For $(\mathbb{Z}^*, \div)$: Not a group. Disprove by counterexample.  Yeah, I dunno about this one. I don't think it's true, because we will be introduction rational expressions that won't allow this to hold, but I'm not sure where I can use this information to disprove the statement.


I have a Samsung S4 and because its charger is short I charge it with a Samsung Wonder charger. I am afraid that it can damage the battery or something. Will it?

My friend and I both have droids and we often user each other's wall chargers out of convenience. I was told that it's possible that my phone might explode if it's charged with a charger that wasn't built specifically for my phone. How true is this across droids?


Now I'm reading the Young inequality. It says that if $f \in L^p(R)$, $g \in L^q(R)$, $1\leq p,q\leq \infty$, $1/p+1/q\geq 1$. Then how could we have the following inequalities:  $$\|f*g\|_q\leq \|g\|_q \|f\|_1$$  $$\|f*g\|_\infty\leq \|g\|_q \|f\|_{q^{'}},\quad (1/q+1/q^{'}=1)$$  $f*g$ means the   The two inequalities seems not obvious, the second one is similar with the holder inequality, but actually not.   Could someone give me some hints or helpful links?  Thanks a lot!

I need to show \begin{align} \|f*g\|_p \le \|f\|_p\|g\|_1 \end{align} By using the generalized Minkowski inequality instead of just Young's Theorem. I have spent a lot of time, but I keep hitting a dead end. Thanks a million in advance!


Let $X_1$ and $X_2$ are independent $N(0, \sigma^2)$ which means (mean = 0, variance = $\sigma^2$) random variables. What is the distribution of $X_1^2 + X_2^2$?  My approach is that  $X_1\sim N(0, \sigma^2)$ and $X_2\sim N(0, \sigma^2)$.   Transforming $X_1$ and $X_2$ into standard normal, $X_1/\sigma\sim N(0, 1)$ and $X_2/\sigma\sim N(0, 1)$.  Then $X_1^2/\sigma$ and $X_2^2/\sigma$ have chi-squared distribution with 1 degree of freedom.   Then I found the moment-generating function for $X_1^2$ and $X_2^2$;$$m_{X_1^2} = (1-2t)^{-1/2}$$ and $$m_{X_2^2} = (1-2t)^{-1/2}$$  So the moment generating function for $X_1^2 + X_2^2$ is $$m_{X_1^2}(t) m_{X_2^2}(t) = (1-2t)^{-2/2}$$  So $X_1^2 + X_2^2$ has a chi-squared distribution with 2 degrees of freedom. My question can I treat $X_1^2/\sigma$ + $X_2^2/\sigma$ as $X_1^2$ + $X_2^2$ like I did above?

Let $X_1$ and $X_2$ are independent $N(0, \sigma^2)$ which means (mean = 0, variance = $\sigma^2$) random variables. What is the distribution of $X_1^2 + X_2^2$?  My approach is that  $X_1\sim N(0, \sigma^2)$ and $X_2\sim N(0, \sigma^2)$  Then $X_1^2$ and $X_2^2$ have chi-squared distribution with 1 degree of freedom. (I am not sure the degree of freedom and not sure how to show it as well(please help on this))  Then I found the moment-generating function for $X_1^2$ and $X_2^2$;$$m_{X_1^2} = (1-2t)^{-1/2}$$ and $$m_{X_2^2} = (1-2t)^{-1/2}$$  So the moment generating function for $X_1^2 + X_2^2$ is $$m_{X_1^2}(t) m_{X_2^2}(t) = (1-2t)^{-2/2}$$  So $X_1^2 + X_2^2$ has a chi-squared distribution with 2 degrees of freedom. Is this correct?


I have three statistical quantiles generated via \addplot table.  I would like to shade the area between the highest and lowest quantiles (the mid one is the median). If I use \closedcycle, I shade all the area until the x axis. The quick solution would probably be the fillbetween library, but I got a compilation error (even after having updated the PGFPplots pakckage). Is there an alternative efficient solution to shade between two curves in PGFPlots?

I want to shade the area of overlap for adjacent normal curves, shown in the lower graph. I can get shading between the first two curves but not for subsequent curves. I need shading at overlapping areas indicated by the arrows. I applied the "logic" of the first fill for the subsequent curves but that does not work.   The arrows and letters in the example image are not part of the MWE.   \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{ticks=none} \pgfplotsset{compat=1.7}  \usepgfplotslibrary{fillbetween}  \pgfmathdeclarefunction{gauss}{2}{%normal distribution where #1 = mean and #2 = sd}     \pgfmathparse{exp(-((x-#1)^2)/(2*#2^2))}% }  \pgfplotsset{baseplot/.style={%     no markers,      domain=1:4.5,      samples=100,     smooth,     axis lines*=left,     height=5cm, width=12cm,     enlargelimits=upper, clip=false, axis on top,     xlabel = near ticks,     xlabel={Resource} }}  \begin{document}  \begin{tikzpicture}   \begin{axis}[baseplot]   \addplot+[name path=A]{gauss(2.7,0.4)};   \addplot+[name path=B]{gauss(3.2,0.4)};   \fill[gray!20, intersection segments ={of= B and A}]; \end{axis} \end{tikzpicture}  \vspace*{3\baselineskip}  \begin{tikzpicture}   \begin{axis}[baseplot]   \addplot+[name path=A]{gauss(1.7,0.15)};   \addplot+[name path=B]{gauss(2.2, 0.15)};   \addplot+[name path=C]{gauss(2.7, 0.15)};   \addplot+[name path=D]{gauss(3.2, 0.15)};   \addplot+[name path=E]{gauss(3.7, 0.15)};   \fill[gray!20, intersection segments ={of= B and A}];   \fill[gray!20, intersection segments ={of= C and B}];   \fill[gray!20, intersection segments ={of= D and C}];   \fill[gray!20, intersection segments ={of= E and D}]; \end{axis} \end{tikzpicture}  \end{document}


I have tried a number of the solutions listed on my stove top to no avail.  The stains are white, like water stains & I can't figure out what they could be.  Any suggestions?

I have this glass top burner for almost 5 years. It was fine until I cooked food in Aluminum Pot and Aluminum frying pan... the base of these pots leaft white marks on the glass. It looks like part of the glass now. I tried Baking Soda, Cerama Bryte, Soap but no results. How can I get rid of them pr will never will?


How do I make a mesh clickable so that when I click on it, I go to a different scene? Obviously just making a mouse sensor (left button) > Set Scene (game) isn't working. Whenever I click anywhere on the screen, it goes to the next scene. How do I make it so that when I click a specific object, the actuator goes off?

I am learning how to make interfaces in the game engine, and I have set up 2 buttons: an exit button and a play button. When one of the buttons receives a left click, it either closes Blender or goes to another screen with a monkey.  The problem is that both buttons are doing the same stuff at the same time. They're switching scenes and closing the program, and the biggest problem is that I don't have to click on the buttons at all. When testing, I can click anywhere in the Blender and it does this.  Here is  if you need it.


Find the value of  $$\cos ^2\theta+\cos^2 (\theta+1^{\circ})+\cos^2(\theta+2^{\circ})+......  +\cos^2(\theta+179^{\circ})$$  Attempt, $$\cos x=-\cos(180^\circ-x),\sin x=\cos(90^\circ-x),\cos x=\sin(90^\circ-x),\sin x=\sin(180^\circ-x)$$  $$\cos^2\theta+\cos^2(\theta+1^\circ)+\cos^2(\theta+  2^\circ)+ \dots+\cos^2(\theta+179^\circ)=\cos^2\theta+\sum_{  n=1}^{179}\cos^2(\theta+n^\circ)$$  $$\cos^2(\theta+1^\circ)=\cos^2\theta\cos^21^\circ-2\cos\theta\cos1^\circ\sin\theta\sin1^\circ+\sin^2  \theta\sin^21^\circ$$  $$\cos^2(\theta+179^\circ)=\cos^2\theta\cos^2179^ \circ-2\cos\theta\cos179^\circ\sin\theta\sin179^\circ+ \sin^2\theta           \sin^2179^\circ=\cos^2\theta\cos^2179^\circ+2\cos \theta\cos1^\circ                                               \sin\theta\sin1^\circ+\sin^2 \theta\sin^2179^\circ$$  $$\cos^2\theta+\sum_{n=1}^{179}\cos^2(\theta+n^\circ  )=\cos^2\theta+\sum_{n=1}^{179}(\cos^2\theta\cos^2  n^\circ+\sin^2\theta \sin^2n^\circ)$$  $$=\cos^2\theta+\sin^2\theta+2\sum_{n=1}^{89}(\cos^2  \theta\cos^2n^\circ+\sin^2\theta\sin^2n^\circ)$$  $$=1+2\sum_{n=1}^{89}\cos^2n^\circ=1+2\left(44+ \dfrac12 \right)=90$$

Find the value of $$\cos ^2\theta+\cos^2 (\theta+1^{\circ})+\cos^2(\theta+2^{\circ})+......+\cos^2(\theta+179^{\circ})$$  Can anyone teach me where to start with? I've no idea.


I just got access to the review queues (late answers). I tried to be thorough and opened the question in a new tab, since the answer I should review was odd and I thought maybe someone just copied an old comment or something. I wanted to see the whole context to write an informed comment to that answer since the user who committed it was new.  The question didn't have the answer I saw for review nor did it have any other comments on it from other reviewers and I thought: "Oh, thats weird." I waited some time and reloaded the tab with the question - the answer did not show up, so I clicked on "No action needed." (Obviously, the answer was not visible like in reviews I did previously, so why bother? And I did not skip it since I did a review after all.)  I got the      STOP! Look and Listen.      This was an audit, designed to see if you were paying attention. You   didn't pass. This answer was of very poor quality, and needed   significant improvements to be useful – passing over such posts hurts   the ability of others to find and answer good questions. Please try to   fix such posts by editing, downvoting, closing, or flagging as "very   low quality".      Don't worry, we've already handled this post appropriately – but   please take a minute to look it over closely, keeping in mind the   guidance above.   dialog.  I think that the answer to review is not shown under the question when having an audit is a bug. Or are there real situations where the item to review is not visible for the reviewer outside of the review tab?  Furthermore now I'm uncertain how to do reviews. Usually when I see a poor answer or question which was already downvoted 5 times and has 3 similar comments about poor quality I press "No action needed" too. I don't want to skip, since I did a review and I think a fourth poor quality comment does not add any more value.

I reviewed  in the First Posts queue.  Which said      i changed it to 'localsystem' and done. thanks much   So it obviously was a potential low quality post. But sometimes such answers can be spot on, so I checked it out, better safe than sorry. I turned out the post had been deleted. Great! So I clicked "No action needed". Then I got this:    You can imagine I felt "wrongfully accused".  I think that deleted posts should not be used for review audits, because the meaning of "No action needed" is not clear in this context.


E.g. The Voyager crafts took various assists from the planets. Sun being much more massive, wouldn't a spacecraft gain much more energy from such a flyby on the correct trajectory? If so then what fraction of $c$ could we achieve?

I have recently read an article about  used by , and was thinking on why this hasn't been used for travel between solar and other systems. I mean sligshot can be done as many times as it is necessary to get speed of lets say half the speed of light that would allow to travel to  can it not? There must be a flaw in my thinking that 3 or 4 planets can be re-used to get to necessary speed otherwise it would already have been done (drawing below). Even if planets would align differently I should always be able 'find' the planet that would allow me to jump to one that is closer to the sun, and repeat the acceleration again and again.   What maximum (theoretical) speed could be achieved using planets of solar system as sligshot and how much would this speed wary from planetary alignment and what realistic speed could be achieved?  UPDATE: To be more specific on the second part of the question Lets say craft weight's 500kg at starting speed of 30,000 km/h initially it slings around Mercury (radius 2440km), Venus (radius 6052 - 300 (atmosphere) = 5750 km), and Earth (radius 6378 - 300(atmosphere) = 6050km) until diameter of planets is to wide to not to crash craft on surface. Then it flies to the moons of Saturn - Titan (radius 5150km), Rhea (1527km), Lapetus (1470km), Dione (1123km), Tethys (1062km), Enceladus(504km), Mimas (396km) and starts slinging there until diameter is to wide too. What approximate maximum speed could it get to leave the solar system?


I am making a paintball mini game and want to add players scores together to get total team scores. How would I go about adding Player X's and Player Y's hit count together to determine their final score?

I am using the /scoreboard command. I have everything working, but I would like not only all the players indivisual scores on the sideboard, but also the two teams. I would like them to update constantly or if necissary about 1 times a second. There are two teams blue and red, and every time someone presses certain buttons, they trigger command blocks that add one point to their idivisual scores. Thanks for your help!!  dGramop


Why is $\{\emptyset\}$ not a subset of $\{\{\emptyset\}\}$?  It contains this element, but why is it not a subset?

$\{\emptyset\}$ is a set containing the empty set. Is $\{\emptyset\}$ a subset of $\{\{\emptyset\}\}$?  My hypothesis is yes by looking at the form of "the superset $\{\{\emptyset\}\}$" which contains "the subset $\{\emptyset\}$".


When reviewing the suggested edits on AU, I noticed that question is deleted but still had a pending suggested edit, then I tried to see if this post is visible for me as I'm >10K or not and surprisingly when I open the review task in "incognito mode" I can see the deleted question but when I click title of the question there it redirects me to a deleted post page. I doubt if this a bug and should not be visible to all users at least, except for >10K rep users. link to task:   timeline of the question:

on an answer deleted as rude/abusive is visible, even without logging in (and for users with less than 10k reputation). These users can't see the answer , via the , or a direct link to the .    This is a potential avenue for spammers, just like the suggested edit spam used to be, but is ; according to the :     In addition, in order to reduce the incentive for spammers to make spam edits that get rejected, suggested edit spam is hidden from logged-out users, so they can't show their clients public-facing pages with spam (so they won't get paid).   For this to work, the spammer would need two accounts, one to post the spam and a second one to suggest an edit. Even if the spam post is quickly nuked, the review link will be active forever. One could argue that logged-in users without 10k reputation shouldn't be able to see the suggested edits either; I'm partial to that.


I got few linux applications from a chip(MAGAZINE) cd I wanted to try (especially vlc and a few others), but didn't know how to install them. I saw a button named install it gives me some info but I can't install things like I used to with windows. I installed a few with software center, but my network connection is slow and it took me more than a hour to download an install a 10mb software. So please tell me how to install such software.

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


I have a follow-up to  on how objects can be held up, against gravity, without work being performed.   is what I get tripped up on:     Unlike your arm, the table does not need to spend energy to hold up the book.... All the table needs to do is apply Force, but applying force does not necessarily mean spending energy.   Should I then expect holding up a bowling ball to make my arm no more tired than holding up a book?  Or asked a different way: If I place a very heavy stone on a wooden table, and return after a month, to find that the table has deformed, does that prove that the table has "spent energy" holding up the stone, and that this energy loss is somehow reflected in a compromise of material integrity?

I read the definition of  as  $$W ~=~ \vec{F} \cdot \vec{d}$$  $$\text{ Work  =  (Force) $\cdot$ (Distance)}.$$ If a book is there on the table, no work is done as no distance is covered. If I hold up a book in my hand and my arm is stretched, if no work is being done, where is my energy going?


I'm building a 45 drives (backblaze) storage pod for use with Windows 2012 R2 Storage spaces.  Spec is 2xE5-2620 v2 cpus, 32 GB ram, 3xLSI 9201-16i cards, 9x1 TB SATA  SSDs, and 36x4TB HGST ultrastar SATA drives.  Assuming a 50/50 read/write, the raw numbers from the drives clocks in at 840,000 IOPS.  The LSI cards can handle 400k+ iops per card.  Assuming I put the drives in a 3 way mirror I'll have 48 TB of magnetic storage, using the SSD's as tiered storage.  What would be the bottleneck on such a system?  Would it be RAM or cpu or LSI card or the drives themselves?  Would we see anything close to 50% of that theoretical max in iops?

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?


If $f:[0,1]\to\mathbb R$ is continuous and $\int_0^x f(t)dt = ∫_x^1f(t)dt$ then prove that $f(x)=0$.  I suppose that $f(x)$ isn't zero, set $g(x)= \int_y^xf(t)dt$ with $y\in[0,1]$ and use Bolzano but I don't know if it's right.

Suppose $f:[0,1] \Rightarrow \mathbb{R}$ is continuous and $\int_0^x f(x)dx = \int_x^1 f(x)dx$. Prove that $f(x) = 0$ for all $x$.  So, I can intuitively see that this is true. My proof mostly makes sense, I think, but I'm not sure if it covers the case where there are negative and positive values in each segment, resulting in a mean value of 0, but still having nonzero values. Can someone tell me how to cover that, or how this does?  Suppose $f(x) \neq 0$ for all x $\in$ [0,1]. By the mean value theorem, there exist some c and d for which $f(c)(x) = f(d)(1-x) = \int_0^x f(x)dx$. Since x $\neq$ (1-x) for all x $\in$ [0,1], it follows that $f(c) = f(d) = 0$. Therefore, $f(x) = 0$ for all $x \in [0,1]$.


I noticed that (most?) articles do not include the date of publishing/writing.  For example see .  If I click for a citation on that page, I see there the year listed as "2018". But in the article itself, there is no indication when it was written.  Why is that? Or did I miss something?  PS: To clarify, I am not asking about the duration of the work, but the information when the work was done (realizing that a single point in time can not be picked). For example if there is a paper about "Method for better battery capacity", then it is a substantial information whether it was written or published in 1899, 1989 or 2018.

I've noticed that most papers do not say explicitly (or at all) how much time did the research take. This excludes certain types of studies, such as epidemiological studies that usually say that the study's cohort was followed for some-and-some months etc., but what I mean is that in most papers there is no actual indication of how much time the study\set of experiments took. I believe this type of information could be useful for readers, especially for readers that would like to perform similar experiments for their own research.  So why is this information not required from authors?  (I realize that it's sometimes hard to pinpoint the date when a person begins and finishes a research project, but it could still be useful to give an approximation in months. This way a reader could get a better estimation if such a project is reasonable for their own research, at least from time investment considerations.)


I'm in Japan now and it is simply awesome. I'm thinking of visiting a public bath. Is it separate for the two genders? Can I go in with a swim suit (after my mandatory shower, of course) or do I have to be completely nude? Not that I'm uncomfortable but in a completely alien part of the world, I'm acutely aware of offending cultural sensibilities. Also being a south-Asian woman, upper body size is fairly different.

Japan is a volcanically active country which means it has a plethora of onsen (hot springs) all around the country.  Visiting these onsen is supposed to be a popular vacation destination for the work-weary Japanese.    I've been told that, as with other things in Japan, there is a rather strict etiquette surrounding the use of the onsen.  In particular, the two things I've read about so far are   Swimming Suits are not allowed. It is very important that one bathe immediately before entering the onsen.   Are these true?  Are there any other taboos that a naive American should be aware of?


I am trying to create a script that checks for two parameters. So far this is the code I have:  #!/bin/bash   portFile=$1 file=$2  if [ -z “$portFile” ] || [ -z “$file” ] then echo “Não tem parâmetros suficientes” else   The user input should be something like this:  portscanner.sh -n 80 -h hostfile.txt portscanner.sh -f portfile.txt -h hostfile.txt   My questions is how can I make sure that the first parameter is either -f or -n and make sure that the second one is -h with the file? thank you.

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


If I look at a quantile plot comparing normal distribution and other data, and some of the points lie below or above the line, how do I know what that represents? What I am asking is - how do I know if the data set has a left or right skew?

I am working with a small dataset (21 observations) and have the following normal QQ plot in R:     Seeing that the plot does not support normality, what could I infer about the underlying distribution? It seems to me that a distribution more skewed to the right would be a better fit, is that right? Also, what other conclusions can we draw from the data?


var leftCurrent = leftArray.GetValue(i); var rightCurrent = rightArray.GetValue(i);  var mi = typeof (PropertyCompare).GetMethod("NotEqualProperties"); mi.MakeGenericMethod(leftCurrent.GetType());  var notEqualProps = mi.Invoke(null,new []{leftCurrent, rightCurrent});  if(notEqualProps != null)      result.Add(new ArraysDiffResult(i, notEqualProps as List<string>));   Why does this code throws InvalidOperationException ( Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true.) ?  NotEqualProperties is static generic method..  UPD : I've already found solution. Just forgot to assign new MethodInfo...(Epic Fail..)  But how about performance?

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


is there any command in linux ,which gives every specification of currently running linux distro,,  including shell, desktop enviroment(like GNOME or KDE) ,display manager (gdm or ligthdm or kdm )and every other minute details that system is having,  similar to when we go to buy a laptop we are a given with a complete specification list,,anything like that?

I am new to Ubuntu. In Windows, if I want to know my system properties/configuration, I can see it by going to Control Panel and clicking on the System icon. I can also get a detailed list of the hardware detected/installed by going to the Device Manager.  What are the equivalents of these features in Ubuntu, where a user can see his or her system properties and hardware configuration, like RAM, CPU/processor, hard disk capacity, etc.?    Example of Windows System Properties:


For roleplaying reasons I would like to make a NPC appear weaker than it actually is. When the players first fight it, it should seem to have a very low AC and miss many attacks. Is this possible in RAW or in RAI? Failing a saving throw on purpose seems to be RAI:  On March 10, 2016, Jeremy Crawford tweeted, "No rule lets you opt to fail a save. As DM, I might allow it, assuming you aren't incapacitated or dominated." Mike Mearls also said that he would allow it (as a DM).   Can I choose to let a punch hit me, or to attack weaker or slower than 100% of my skills would allow?

In , I asked about whether a character could willingly not use their shield or Dex bonus on certain attacks due to wanting to be hit. This raises the greater question-  Can someone decide to be hit?  The question was answered , but it is for 4e, and I am asking about 5e. This question is assuming that a hostile enemy is making an attack roll against a PC, and the PC in question wants to be hit by the attack.


Last week a six year old Vista desktop blue screened with a registry error. Rebooting, it loaded fine. I ran SeaTools on the drive (Samsung Spinpoint F1 1TB) and it said that I should replace the drive.   I bought a new drive and used CloneZilla to copy all the files over. I had to use -rescue and the option to repair bad sectors as it copied in order to get CloneZilla to copy files disk to disk. I cloned the disk because I wanted to save the time of having to reinstall windows and the many other programs that I use and then copy over files from backups. During the CloneZilla cloning, sectors were showing up as bad sectors with a lost data message.   Is there a way to get a list of bad sectors and the files present in those sectors? I don't notice anything wrong with the computer booting from the old or new hdd. I just want to be aware of any bad (potentially corrupt) files so that I can recover them from backups.   I saw this thread that mentioned WinHex but I don't know how to get a list of the bad sectors. I also tried Defraggler but it doesn't show any sectors as bad sectors only fragmented. Chkdsk fails to complete. I am struggling to find information on how to do what I thought would be a reasonable check to do.     UPDATE: I just compared the amount of used space Windows reports for the two drives. There is 584MB of difference, which is incredible. I tried using WinMerge to compare but it crashed with Windows giving a possible hard disk error.    I used Microsoft's free tool SyncToy. It found many differences between the hard drives but they all looked to be in logs, caches and temporary files. I think these differences are just because the newer hard drive has had a couple more days running Windows, anti-virus, updaters and web browsers.   I had no luck with WinHex with the limited number of bad sector addresses I wrote down from CloneZilla. WinHex says that there are 1.9 billion sectors but the numbers provided by CloneZilla for bad sectors are all in 10s of billions (45, 48 and 80 billion).

My wife's Windows 7 (64-bit) box has suddenly developed a SMART "disk is bad" status.  I'm attempting to copy everything off (no admonishments about lacking a backup regimen, please, I know already  :(  ) by creating a System Image across the network to a different machine, but it gets to a certain point and starts taking forever.  Doing a chkdsk reveals that certain files cause this by having many bad blocks (like dozens of thousands in a row, if the event log is any indication) and causing the system to do its standard try-to-recover-and-relocate-upon-access thing.  But this is taking so long, I'm afraid the disk will fail completely before I can get the damned thing copied.  However, several of the files so far have been ones that she has copies of elsewhere, so I am able to just delete them prior to retrying the backup to speed things up considerably.  So:  is there some tool or procedure that will try reading each file, and upon hitting a bad block, just tell me about it and skip to the next file?  So I can see which ones I can just dump and which I need to let it try to recover?


Before you mark this as the same thing as the others, You need to know I have done this before hundreds of times with no problem, I just reinstalled Ubuntu 18.04 2 days ago, and I was trying something with Minecraft and tried to open the optifine download, which is a jar file, and it wont do anything I tried running it in terminal and this is what I got  Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper`    I had installed Java the same as I always had no problems, but this time is different. All help is appreciated.

I tried it and the errors are:  Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper at java.desktop/java.awt.Toolkit.newAWTError(Toolkit.java:472) at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:488) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1608) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:532) at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:613) at java.desktop/javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:660) at com.cburch.logisim.gui.start.Startup.parseArgs(Startup.java:250) at com.cburch.logisim.Main.main(Main.java:32)   The error seems to be...     Caused by: java.lang.ClassNotFoundException: org.GNOME.Accessibility.AtkWrapper       at  java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)       at   java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)       at java.base/java.lang.Class.forName0(Native Method)       at java.base/java.lang.Class.forName(Class.java:374)       at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:485)       ... 14 more     OUTPUT for  apt-cache policy logicsim logisim  logisim:   Installed: 2.7.1~dfsg-1   Candidate: 2.7.1~dfsg-1   Version table:  *** 2.7.1~dfsg-1 500         500 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages         500 http://in.archive.ubuntu.com/ubuntu bionic/universe i386 Packages         100 /var/lib/dpkg/status N: Unable to locate package logicsim   OUTPUT for update-java-alternatives -l  java-1.11.0-openjdk-amd64      1101       /usr/lib/jvm/java-1.11.0-openjdk-amd64 java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64


I was recently proofreading an ESL textbook and came across a photo of a woman.  She had a surprised look on her face.  Underneath were four options that the student was to pick.  One of them was: "The woman is looking surprised." The other options were not possible choices.  I can't cite a general rule why this option is incorrect other than I have never seen or heard "look" used in this way.  I asked someone else, and they said it sounded weird but didn't violate any rules of grammar.  I feel it should be "The woman looks surprised." in the same way that we say "I know something," and not "I am knowing something."  Is the option "The woman is looking surprised." incorrect?

As a BrE. speaker, there are come constructions using verbs in their present continuous form which just sound wrong. The best example being, "I am loving Stack Exchange."  After reading around the internet, all the information I can find seems to be addressing the difference in usage and meaning between -ing and infinitives such as "he went on to sing the National Anthem" and "he went on singing..."  Is there a rule as to which verbs can or should be used in a continuous form "I am drinking tea" and those which shouldn't, "I am loving this tea so much right now*"  Thanks  *In a thick Californian accent!


Let $X$ be a geometric random variable with parameter $\theta$ find $M_X(t)$, moment generating function.   $m_X(t)=E(e^{tX})=\sum_x e^{tx} p_X(x)$  $$\sum_x e^{tx} p_X(x)= \sum_x e^{tx}(1-\theta)^x\theta$$ $$=\theta\sum_x[e^t(1-\theta)]^x$$  I need to simplify $\sum_x[e^t(1-\theta)]^x$   To do this I could use $\sum_{k=1}^{\infty} q^k = \frac{q}{1-q}.$   However, how to show that $e^t(1-\theta)<1$?  But I'm not sure how to do this.

Let $P(k,X)=p(1-p)^{k-1}$.  When deriving the moment generating function I start off as follows:  $E[e^{kt}X]=\sum\limits_{k=1}^{\infty}e^{kt}p(1-p)^{k-1}$.  How I end up rearranging this is as follows:  $\frac{p}{1-p}\sum\limits_{k=1}^{\infty}e^{kt}(1-p)^k=\frac{p}{1-p}\sum\limits_{k=1}^{\infty}(e^{t}(1-p))^k=\frac{p}{1-p}\frac{1}{1-e^t(1-p)}$  I'm obviously not arriving at the correct answer, but I want to know why this derivation is wrong.


The photograph of the black hole, at the centre of galaxy M87, is now a part of human history. We are told that the red-colour is caused by hot gas, matter & radiation around the "edge", the Event Horizon. Given the power of the gravitational forces emanating from black hole, why aren't these three things drawn into the abyss? If light is bent/ drawn into the BH, how does this red image arise? The logic, here, would be that a body, on the Event Horizon, is immune from the gravity--which sounds pretty fatuous?

We've heard it many times, nothing can escape the gravity of a black hole, even light once it's past the event horizon.  If this is true, how can a black hole emit anything?  are massive black holes that have consumed enormous amounts of matter and energy, and then blasted it back out into the universe.  How is this possible?  Time stands still in a black hole, that in itself should stop anything from moving.


I am passing a parameter     public void addStudent(String studentName)      {          if (studentName != null)      {    int[] array = new int[NUM_QUIZZES];         for (int i = 0; i < array.length; i++)      {          array[i] = MIN_GRADE;         }         quizMarks.put(formatName(studentName), array);        }         }   > new student, marks set to 0   /**    * returns the quiz marks for a given student    * @param student    * @return the array of quiz marks for this student   */ public int[] getQuizzes(String student)      {        int[] array = quizMarks.get(student);        if (student != null)      {         for (int arrays : array)     {     System.out.println(arrays);         }        }   return array;    }     I want  to get the marks displayed, but it gives me Exception in thread "main" java.lang.NullPointerException at StudentDatabase.getQuizzes(StudentDatabase.java:68) : line 68: for (int arrays : array)

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?


Here is a command that sorts files in a folder in reverse order  ls | sort -r   What does the | symbol in that command do?   What I'm really looking for here is high level (easy to understand) explanation of pipes for Linux beginners. I see other questions about pipes here on Superuser, but nothing that elicits an answer that explains in simple terms what they do and how they differ from redirection (the > or < symbol).

I dont quite understand how pipes work in bash.  I know that it takes an output from one command as the input in another command.  What an output is I can get because it's what the command prints out to the screen.  But how do I know what input a command will take?  Here is an example I thought would work:  which gem | rm   Unfortunately it didn't.  Which gem prints out /usr/bin/gem so that must be the output right?  I thought that was given to rm so it woud be rm /usr/bin/gem but I was wrong.  So my question is, how do I know what input a command takes?


I want to validate all type of url but few of my conditions are not working with the following regex:  ^((https?|ftp|smtp|http):\/\/)?(www.)?[a-z0-9]+\.[a-z]+(\/[a-zA-Z0-9#]+\/?)*\.(com|in)$   It is not working with     google.com

How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.


In a lightning component I display some text dynamically, from the field "Description" of a customized object "Article__c". So when in salesforce I fill the Description field, it appears in my component.  The problem is when, in Salesforce, I put a line break in the Description fiels, in my component I see "
"  Is there any way to fix that ?  In the developper console I saw that
 is not approved, it has to be
 but salsforce automatically create the
 tag...  here is a bit of my code:  <aura:component controller="ActuliteImageController" implements="forceCommunity:availableForAllPageTypes">  <aura:attribute name="art" type="Article__c[]"/>
 <aura:iteration var="a" items="{!v.art}">

{!a.Name} : <aura:unescapedHtml value="{!a.Description__c}"/>

 </aura:iteration>
  </aura:component>

I am currently working within a Lightning Component where I have returned the contents of a rich text field from a knowledge article to a <div> section of the page. Instead of the browser rendering the rich text contents as HTML, it is being rendered only as text, which also displays all of the HTML markup on the page.   Since I am working in a Lightning component I do not seem to have access to functions such as {!HTMLENCODE}, but I'm not sure if that is what I would be looking for anyway. I not sure if there is some way I can convert the rich text content to HTML characters either in the Apex controller or on the client side before displaying it to the page?  Thank you everyone. I look forward to any information you can provide.  I have attached a screenshot for reference.


I have looked through a lot of posts on here, but cannot find any specific answer for this question.   Now, it's been pretty fairly established that due to having his memory wiped, C-3PO would not recognize Anakin/Darth Vader. However, it seems that R2D2 either never had his memory wiped - which explains his quirky behavior - or only had certain parts reprogrammed.   Does R2-D2 know that Anakin is Vader, either from scanning him or simply because he's been told? It seems that if anyone aside from Obi Wan would know him, it would be him.

In the prequels we see that both C3PO and R2D2 are Anakin's droids and they clearly both know that he's gone over to the dark side.  I would like to know an in-universe answer for the question; Why did they not tell Luke?      that Vader is Anakin?


On the space $l_2$ we define an operator $T$ by $Tx=(x_1, {x_2\over2}, {x_3\over3}, . . . )$. Show that $T$ is bounded  I know that $||T||\leq 1$, but I don't know how to show this. Any solutions or hints are appreciated.

$T:\ell_2\to \ell_2, T(x_1,x_2,\dotsc)=(x_1,x_2/2,x_3/3,\dotsc)$ I need to know whether it is self adjoint and unitary operator given that $x_i\in\mathbb C$  I am not able to do it please tell me how to proceed.  In my earlier post one said eigenvalues of a self adjoint operator must be real, here I tried like say $\lambda$ be an eigenvalue for $T$ then $T(x)=\lambda x$ but then $(x_1,x_2/2,x_3/3,\dotsc)=\lambda(x_1,x_2,x_3,\dotsc)$, I am lost here,


As we know in order the earth to make this elliptical movement around the sun it needs two foci as we know from  the first law of Kepler. The first foci is the sun.  So my question is what is the other foci?

1.In classical mechanics, using Newton's laws, the ellipticity of orbits is derived. It is also said that the center of mass is at one of the foci.   2.Each body will orbit the center of the mass of the system.  My question is : Are the assumptions in 1 and 2 correct?   Follow up question : Assuming the distance from the centre of the mass to each body remains the same, do we have two bodies orbiting the centre of the mass of the system in an elliptical or circular orbit?   Finally : With elliptical orbits, if the heavier mass is supposed to be in one of the foci, if there is any significance to second focus, what is it? Is it a Lagrange point by any chance or does it have some other mathematical property?


I get this code:  #include<stdio.h>  #include<stdlib.h>  void main(void)  {      char *ptr = (char*)malloc(10);       if(NULL == ptr)      {          printf("\n Malloc failed \n");          return;      }      else      {          // Do some processing          free(ptr);      }       return;  }    It compiles successfully in Visual C, but do not compile in gcc, I get "error:'main' must return 'int'". So is the return type 'int' of main() function is a convention(which is for compiler to define), or a rule of C?

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


Straight forward question, really.   Why is it that some magic wears off after the caster dies, whereas other forms of magic stick around long after the casters death?  In the Half-Blood Prince, we learn that Lily Potter had once transfigured a lily into a fish for Professor Slughorn, and that when Lily died, professor Slughorn found the bowl that held the fish to be empty (i.e. the effect of the magic wore off). Additionally, towards the end of Half-Blood Prince, Dumbledore casts a full body bind on Harry, that is lifted after Snape kills Dumbledore.  However, in other places throughout the series, we see that the death of a witch/wizard does not necessarily result in the effects of the magic they have cast disappearing. For instance, the permanent sticking charms that Sirius placed on the decor in his bedroom in the House of Black (or for that matter, the ones that Sirus's mother places around the house) or the curses that Moody places on the entrance way to the House of Black to prevent Snape from entering/speaking of the house (tongue binding curse, and the dust corpse of Dumbledore). I also think Mr. Weasely references a biting teapot set that passed from a witch to a muggle in Chamber of Secrets.  So what is it that causes some magic to wear off after death? Is it the type of magic (i.e. transfiguration requires a higher concentration of magic, therefore is less likely to continue after the caster's death)?  Speculation is welcome, but cannon support will be helpful.    Please note, I did find  which addresses what would have happened to Hermione's enchantment on her parents' memory had she died, but it did not fully explain why some magic outlives its caster (in my opinion).   Additionally, as pointed out by Phantom42 in the comments, there is  which addresses that some magic lives on past the time the wizard who casts it passes, while other magic does not (giving examples of where we see each in the books), and  which asks if a spell is forever, but gets the same response that some spells are, while others are not.  What I want to know is WHY some magic lasts pasts its caster's death, while other magic does not.

Looking at the questions and answer to these two questions.  &  and neither mentions the longevity of magic. I recall several instances of magic failing to last; the money that was spread at the  and the broken  on.  If I recall correctly when Voldemort died, the curses on several people were lifted.  I don't recall if any other spells fell apart with his death.  Is there any canon evidence on the the length of time a spell will live?


Studying global vars in JS , I set out to try it and to my surprise this:    var thisVar = "global var";  function showVarLet() {   var thisVar = "local var";   console.log("%s   %s", thisVar, window.thisVar); } showVarLet();     gives me:  local var undefined   but the same in the browser console, gives me:  local var global var   So, what´s with this window object?  EDIT:  I tried to check in the console what would happen if instead of window.thisVar I referenced this.thisVar, my assumption was that I would access the local variable but I keep accessing the global one, why so?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


The work done by frictional force is negative as it opposes the relative motion?  Please explain when will the work done by friction be (i) zero (ii) positive?

Can work done by friction be positive? Please explain with an example. Is the work done by friction on a moving car positive?


I should begin by mentioning that I am very new to Ubuntu and I am in the process of getting used to it.  Every time I try to update it gives me back an error. I have put it here in my question. Please tell me what to do.   Ign http://archive.ubuntu.com trusty/main Translation-en_IE                     Ign http://archive.ubuntu.com trusty/multiverse Translation-en_IE               Ign http://archive.ubuntu.com trusty/restricted Translation-en_IE               Ign http://archive.ubuntu.com trusty/universe Translation-en_IE                 Err https://download.01.org trusty/main amd64 Packages                            server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none Err https://download.01.org trusty/main i386 Packages   server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none Ign https://download.01.org trusty/main Translation-en_IE Ign https://download.01.org trusty/main Translation-en W: Failed to fetch https://download.01.org/gfx/ubuntu/14.04/main/dists/trusty/main/binary-amd64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none  W: Failed to fetch https://download.01.org/gfx/ubuntu/14.04/main/dists/trusty/main/binary-i386/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none  E: Some index files failed to download. They have been ignored, or old ones used instead.

I'm with problems with ca-certificates. Every site that I try to access ask me for a confirmation of the certification and my update is not working 100% too  $ sudo rm -rf /etc/ssl/certs/* $ sudo update-ca-certificates Updating certificates in /etc/ssl/certs... 152 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d....done. $ sudo apt-get update [...]                                 Err private-ppa.launchpad.net precise/main amd64 Packages                 server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt    CRLfile: none Err private-ppa.launchpad.net precise/main i386 Packages   server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none Ign private-ppa.launchpad.net precise/main Translation-en_US Ign private-ppa.launchpad.net precise/main Translation-en Fetched 1,118 kB in 44s (24.9 kB/s)  E: Some index files failed to download. They have been ignored, or old ones used instead.


I take good care of my camera but a while back I started noticing that the rubber on the grip and all the other rubber parts that are made of a similar material are starting to peel off. It's starting to feel a bit strange in my hands and I would like to fix it. Is there a specific glue I should use?

The rubber grip is peeling away from my D700, just near the autofocus mode selection switch.   That whole (tiny) section of the grib is pretty much coming away.   How can I do a DIY repair?   What glues should I avoid using?   If I need to replace the grip itself (there's another that's a little bit loose) where can I get them?  I'd like the grips to look, after the repair, quite a lot like they did before there was a problem.  It's OK if they're not entirely identical, but very similar would be good.


I am downloading the 64 bit version, but the tar file is labeled amd64.tar.xz...will this work on mhy intel 64 system, or should I just use the 32bit version?

What is the difference between standard i386 download and the amd64 download of Ubuntu 11.04? I am currently running the i386 on an amd machine, would my system work better with the amd64 download instead? (my machine was running Windows 7 64bit, but I neglected to look at that prior to installing Ubuntu).


Can I use potato starch as a thickener for pie filling? From what I see it's not supposed to boil, but I cannot avoid this with pies. (I've tried it with a fruit pie and it doesn't seem to thick it much.)  If potato starch is not good for this, what approach should I take instead, provided I have no cornstarch or tapioca or any other usual substitute? (Potato starch is about the only variety of starch in local stores.)

I made a some pies a couple of days ago. The recipe called for cornstarch and it thicken the filling after it came out of the oven. The only thing is I could taste a bit of the cornstarch when I was eating the pies. I would just use less of it but I am afraid of making my pies to runny without the cornstarch.   Is there an alternative to cornstarch to thicken the pie filling or should I just use less and hope I still use enough?


What should i do ,i'm trying to add some picture but i have this error.

I am using MikTex 2.9 and TeXstudio for my TeX preparation. I would like to set the path to my figures folder, which contains all the figures, plots etc. required for my work.   I used \graphicspath to set the directory, but it gives me an error message:  \documentclass[12pt]{article}  \usepackage{graphicx}  \graphicspath{D:/LATEX/Reports@IIT/figures}  \begin{document} \includegraphics[width=4.5cm,height=4cm,angle=0]{logo.jpg}  \end{document}      Error: Package pdftex.def Error: File `logo.jpg' not found   However, when I prepend the filenames of the images with the same path in the \includegraphics command, it works just fine:  \documentclass[12pt]{article}  \usepackage{graphicx}  \begin{document}  \includegraphics[width=4.5cm,height=4cm,angle=0]{D:/LATEX/Reports@IIT/figures/logo.jpg}  \end{document}   Why is \graphicspath not setting the path?


I was hopeful someone could tell me if you can take elven accuracy twice. The wording doesn’t oppose it from happening, but I didn’t know what people thought.

Can the same character take a given feat multiple times to gain the benefits all over again?  It seems obviously stupid that you can't, but I can't find anywhere in the RAW that actually states that.  The closest I get is Elemental Adept's "You can select this feat multiple times" sentence, which implies that most feats can only be taken once.  The feat I'm eyeing very specifically is Magic Initiate, which lets you add a splash of magic from other classes to a given character.  If I've read online documents correctly, I can use my core class (sorcerer) spell slots to cast the 1st-level spell I gain access to, which means I could grab shield of faith, use Twinned Spell on that, then turn around and grab the bard's spell list to grab healing word and turn my sorcerer into a semi-support caster.


I've got some problem with LaTeX right now, well to be honest it's not really a problem and I'm not even sure that it is possible but I would like to be able to do it.  Basically, here is my LaTeX :   \begin{document}  \tableofcontents  \appendix \addcontentsline{toc}{chapter}{A ~~Included} \includepdf [pages  = -] {included.pdf}  \end{document}   Let say that Content.tex contains included.pdf. So I have links in the table of contents inside Content.tex and that's good.  But I have also a table of contents inside included.pdf but when I used \includepdf, the link inside this included.pdf->tableOfContents doesn't work anymore...  If one of you has any idea how to make theses links work again, because I looked inside the \includepdf documentation, and I didn't find what I wanted... :/   Thanks in advance for your help,  Best regards

I want to embed a screenshot of a web page into a LaTeX document as a vector graphic with clickable links.  I'm using  to render the web page as a letter-sized pdf file with working links.  Then, I'm using this command to crop the pdf file while retaining the links:  gs -sDEVICE=pdfwrite -o "screenshot_cropped.pdf" -c "[/CropBox [`gs -sDEVICE=bbox -dBATCH -dNOPAUSE "screenshot.pdf" 2>&1 | awk '/HiRes/ { print $2,$3,$4,$5 }'`] /PAGES pdfmark" -f "screenshot.pdf"   (Commands taken from ; I can't use , since it apparently removes the links)  Finally, I'm embedding the file into my LaTeX document with the following:  \includegraphics[width=6 in]{screenshot_cropped.pdf}   Unfortunately, the links no longer work in the resulting pdf file.  How can I fix this?  I'm using XeLaTeX if it matters.


I restarted my iPhone 6 running iOS 10 and the home button is broken, so I was using Assistive Touch. But at the first launch, Assistive Touch is disabled. On iOS 10, we have to "Press home button to unlock".  What can I do?

My iPhone 5s had recently been cleaned of all files and data, including iCloud so I need to activate it. It prompts me to press the home button to activate but the home button on my iPhone doesn't work. Is there a way I can activate this phone without pressing the home button?


i'm trying to make my scanner do some basic console interface, but it keeps returning NullPointerException no matter what i try. Here is the some of code:  public static void main(String[] args) {      list nlist = new list();     Scanner menu_input = null;     [..] //a couple println here...     opt = menu_input.nextInt(); //the error points to this line                  switch (opt) { ... }   why would it cause an error like this? I'm sorry if this is trivial, but this is my first real experience with Java.  Full text of the error in case it's useful:  Exception in thread "main" java.lang.NullPointerException     at lab.newJava.main(newJava.java:75)

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?


$$\sum_{i=0}^n\frac{x^n}{n!} $$ I know the sum converges for all x but how do we know it converges to the expect value $e^x$.  This sum was derived as the Taylor series of $e^x$ around $0$. How do we know works when we move from zero?  This is the easiest example i came up with, question can of course be generalized for other infinite series

Let's say I want to use Maclaurin series to get the series expansion $S(x)$ for $f(x) = e^x$ where $S(x) = c_0x^0 + c_1x^1 + c_2x^2 + c_3x^3 + ...$  $f(0) = S(0) = c_0 = e^0 = 1$ so that's fine.  $f'(0) = S'(0) = c_1 = e^0 = 1$ again, fine.  $f''(0) = S''(0) = 2c_2 = e^0 = 1$ so $c_2 = 1/2$, fine.  $f'''(0) = S'''(0) = 6c_3 = e^0 = 1$ so $c_3 = 1/6$, fine.  $f''''(0) = S''''(0) = 24c_4 = e^0 = 1$ so $c_4 = 1/24$, fine.  And so on, so we conclude that $c_k = \frac{1}{k!}$ so then:  $$S(x) = \sum_{k=0}^{\infty} \frac{x^k}{k!}$$  But now what I don't understand is what allows us to go "Furthermore, $S(x) = f(x)$ for all $x$"! In fact what makes it valid for us to plug any other number other than $x=0$ into this? I see this equation used as a straight-up equivalent to $e^x$ even though we used $x=0$ and nothing else.  So I thought I would try it with a neighborhood of $1$ instead to see what happens:  $S(x) = c_0(x-1)^0 + c_1(x-1)^1 + c_2(x-1)^2 + c_3(x-1)^3 + ...$  $f(1) = S(1) = c_0 = e^1 = e$ so that's fine.  $f'(1) = S'(1) = c_1 = e^1 = e$ again, fine.  $f''(1) = S''(1) = 2c_2 = e^1 = e$ so $c_2 = e/2$, fine.  $f'''(1) = S'''(1) = 6c_3 = e^1 = e$ so $c_3 = e/6$, fine.  $f''''(1) = S''''(1) = 24c_4 = e^1 = e$ so $c_4 = e/24$, fine.  Looks pretty similar:  $$S(x) = \sum_{k=0}^{\infty} \frac{e(x-1)^k}{k!}$$  and, in fact, for a neighborhood of $x=a$:  $$S(x) = \sum_{k=0}^{\infty} \frac{e^a(x-a)^k}{k!}$$  Now we have $e$ inside the function expansion for $e^x$ which seems a little circular?  I guess my question is this: We created the function $S$ to have the same-valued $n$th derivatives as $f(x)$ but only at $x=0$ or $x=1$, or $x=a$, etc, but the series representations look different depending on which neighborhood I pick, and in some cases the expansions seem to include the very number we're trying to describe.  How do we know which is "right" or that it is even "right" to use for all $x$? I know the usual response to this is that it's equivalent when $f(x)$ is analytic but that doesn't help me at all because it says the function is analytic when the Taylor series around $x_0$ converges to the function in a neighborhood around $x_0$ for all $x_0$ in the function's domain. But how do I know this?  Yet again feels circular... just working through these two examples makes me wonder, how do I know these series converge to the function itself? How do I know they're equivalent representations? Am I supposed to avoid the self-referencing?  I'm looking for some context behind how to make sense of these two Taylor series and how I am supposed to know that $e$ is analytic or that I can use $S(x)$ for any $x$ I want even if I only computed it for the neighborhood around $x=0$.


From  article, I want to download new version of the Linux kernel so the first commands to execute is add-apt-repository ppa:kernel-ppa/ppa but when I use it says that it cannod add PPA and that the user named '~kernel-ppa' has no PPA named 'ubuntu/ppa'. Why is that? vm@vm:~$ sudo add-apt-repository ppa:kernel-ppa/ppa Cannot add PPA: 'ppa:~kernel-ppa/ubuntu/ppa'. The user named '~kernel-ppa' has no PPA named 'ubuntu/ppa' Please choose from the following available PPAs:

I can get Ubuntu mainline kernels from  - is there a way to add it to my repository list the same as regular Launchpad PPAs?


Context:  We are running a system which has our Linux & Unix Boxes authenticate against AD and because we have numerous different versions of Unix/Linux, we have to default to /bin/sh to make sure that the logins always work no matter the Server. I am looking to setup a .profile on RHEL to check to see what shell is set to at login and if its not bash, to switch to bash. I am not having any luck google searching for a method to do this and my shell scripting is on the weaker side.   Question:  How does one check for shell and switch at login without the control of the passwd file?

I am using my school's computers and would like to use zsh instead of bash. I'd like to make it the default shell, but I cannot run a command such as $ chsh -s $(which zsh) because I don't have admin privileges.   Is there a way I can put something in my .bashrc or something that automatically calls zsh when it opens as a workaround?   To clarify, zsh is already installed.


Assuming I'm not playing as Assault and the most harmfull thing I can do is throw a grenade or hit it with K-Bullets (not a good option as I'd be seen), how do I survive to a tank?  Side note: hiding inside a building is not an option

In previous Battlfields, there were many types of rocket launchers, explosives, and even weapons you can use to take out armor(armored vehicles, tanks, heavy planes, etc.) with relative ease. In Battlefield 1, this does not seem the case. As it seems the only class that has anything capable of dealing good damage to armor is the Assault with C4 equivalent and heavy AT grenades, but even then you have to get close and it's extremely high risk.  I get armor was a new thing in WW1 and they probably didn't really figure out how to deal with it effectively, but games (at least I would expect) would try to balance things as best possible.  How can I deal with the Armor in BF1 without rockets or Armor of my own?


Thank you for coming. I want to ask  you "what is the difference 'Beer' and 'Beers'?"  I had a job creating ads for foreigner.  So, I made this sentence  →"50% discount on All Beer." However I had some questions , like "All beer or All beers?" or "Which is correct grammar?" When I research that on website, I could find a lot of opinions but some of them were divided among native speakers I am not Native English speaker. So, I want to know Which option I should use.  How do you think this "50% discount on All Beer" ? correct ? or wrong ? If you have some advice, Please tell me.

I have run into a conundrum.   When I go to get some friends cans of beer I say:     You guys want a beer?   When I am referring to going to a bar and drinking some I say:     Let's go get some beers!   When I go to a store to buy beer I say:     I am going to get beer.   How can I work this out? My friend is a native Chinese speaker and this is the sort of plural thing that trips her up. How is this explained?


We know that the electrostatic force between two charges depends on the medium between the charges and its permittivity. Why, then, doesn't the gravitational force depend on the medium?

When I look at electric or magnetic fields, each of them has a constant that defines how a field affects or is affected by a medium. For example, electric fields in vacuum have a permittivity constant $ϵ_0$ embedded in the electric field expression of a point charge: $E = q/4π ϵ_0r^2$. However, if I put this point charge in some dielectric that has a different  permittivity constant $ϵ$, the value of the electric field changes. On a similar note, magnetic fields behave very similar but have the permeability constant $μ_0$ instead.   From my understanding, I believe that this is not the case for gravitational fields since the universal gravitational constant $G$ is consider to be a fundamental constant. So I am assuming that even though gravitational fields do operate in different types of mediums, this somehow doesn’t affect the gravitational field value. My question is why is this the case, that is, why isn’t there a permittivity-type constant for gravitation?


I have a password for my Windows OS, so if my computer is stolen (hopefully) the thief will not be able to start up the operating system. But one can easily remove the hard drive and access the files as external drive.  How can I prevent this?

Let me give you some backup story first: A computer technician challenged me to give him my laptop and ask him for any piece of information that I wanted to "hide" in my hard drive. He claimed that he would be able to retrieve anything, no matter what I do to hide it.  Since I do not appreciate absolute statements like: "and there is nothing you can do about it", I started thinking about this in my head. I realized that a very secure Operating System would not cut it, since he does not need to boot from this specific hard drive in order to find things in my hard drive.  The generic question here is:  Is there a way to completely secure all data in a hard disk? (I do not need detailed explanation on how to do it, I just need you to point me to a direction; I can read more about it myself)  Specifically, I suspect that I may need:   An Operating System that is very secure and possibly encrypts all the data that it stores (no idea if such thing even exists). If the above does not exist, is there a way to manually encrypt the data in my hard drive and still be able to boot from that hard drive?   In general, I want to make the hard drive as least accessible as possible to anyone that is not me (= knows a specific password/key), so any solutions are welcome.


got two question, I am novice in the area of crypto and currently in big learning curve.  From crypto book I am going over with, I see the RSA algorithm example as follows:  it chose two rand #-s: p=47 q=71 n=pq=3337 and (p-1)(q-1) =3220 Now it chose e - encryption key as randomly for 79 but when it calculates the d the answers simply does not match:  From the book notation I understood the formula as: d = 79^(-1) mod 3220 = 1019  So I am wondering is it really 79 to the power of minus 1? 79^(-1) Then no matter what i do, I can not get 1019 as answer.   Second one, this is not directly related to cryptography but will ask here, I was trying to find a good android calculator to do a number crunching to checkout some of the crypto algorithms but so far did not find a decent one. I tried several of them from google store but all of them has some issue. Since i am doing algorithms related to crypto, looking for the one with MOD (%) and number E (exp(1)) but so far can not find one. I even found the virtual replica of good old TI 83+ and learned that one even has not have mod function (although it is possible to program the mod). So I thought may be one of you guys are using suitable calc?

When given $p = 5, q = 11, N = 55$ and $e = 17$, I'm trying to compute the RSA private key $d$.  I can calculate $\varphi(N) = 40$, but my lecturer then says to use the extended Euclidean algorithm to compute $d$. That's where I get stuck.    Here's my work so far:  First I use the Euclid algorithm to calculate:  40 = 2(17) + 6  17 = 2(6) + 5 6 = 1(5) + 1 = gcd   So I know the GCD is 1. Applying the 'extended' section of the algorithm:  6 = 40-2(17) 5 = 17-2(6) 1 = 6-1(5) 1 = 6-1(17-2(6)) 3(6) = 1 (17) 3(40 - 2(17)) - 1(17) 3(40) - 3(17)   I know the answer is $33$, but I have no idea how to get there using the extended Euclidean algorithm. I can't figure out why I'm getting $3(40) - 3(17)$ when I know the answer should contain $33$.


There's this theory that  electromagnetic waves can't make through holes that are smaller than their wavelength its supposed to be how microwaves stop microwave radiation from coming out... But that doesn't make sense. I mean it would make sense if the theory said that em waves couldn't make through holes smaller than the amplitude of the wave but I just don't get how the wavelength affects the passing of the wave through holes. So can anyone explain this to me. It would be great if you could explain it to me using funder mental electromagnetic equations or maxwells equations but Anything would be helpful... Thanx in advance

This is a follow-up to this question:   Hans Bethe wrote a paper in 1944, "Theory of Diffraction by Small Holes," Phys. Rev. 66, 163. I don't have access to the paper, but from descriptions online it sounds like he proved the following. Suppose a plane wave impinges on an absorbing sheet, and there is a hole in the sheet of diameter $d$, with $d<\lambda$. Let $P_0$ be the power incident on the hole, and $P$ the power diffracted through the hole. Then the transmission is $T=P/P_0=(d/\lambda)^4$.  As a practical application, I think this explains why microwaves don't leak strongly through the metal grille in the front of a microwave oven.  Questions:   Does the thickness of the sheet matter? From references online, it sounds like the hole is treated as a waveguide...? This seems to relate to cutoff frequencies of waveguides, etc.? It seems to me that Huygens' principle would give $T=1$ for $d\ll\lambda$, since in this limit the wavelets are in phase. Why is Huygens' principle invalid here? Is this related to question #1? Is there a simple argument for the proportionality to $(d/\lambda)^4$? Or if not, how does one prove this using the gory details of Bessel functions, etc.?


$$\lim_{x\to 0^{+}}x^{x^x-1}$$  Note:- I have solved this problem and below is the solution but I am searching for the better approach  My attempt is as follows:-  $x^x$ is indeterminate form $(0^0)$ as $x$ tends to $0^{+}$  $$\lim_{x\to 0^{+}}x^{x^x-1}=e^{\lim_{x\to 0^{+}}\left(x^x-1\right)ln(x)}\tag{1}$$  Let's assume $\lim_{x\to 0^{+}}\left(x^x-1\right)ln(x)=y$  $$y=\lim_{x\to 0^{+}}\left(e^{x\ln x}-1\right)\ln x\tag{2}$$  As $x$ tends to $0^{+}$, $x\ln x$ is the indeterminate form $(0\cdot\infty)$  So first let's see what this indeterminate form actually tends to  $$z=\lim_{x\to 0^{+}}x\ln x$$  Assume $t=\ln x$  $$z=\lim_{t\to -\infty}e^tt$$ $$z=\lim_{t\to -\infty}\dfrac{t}{e^{-t}}$$  So we are getting $\dfrac{-\infty}{\infty}$ and we can apply L's Hospital rule here  $$z=\lim_{t\to -\infty}\dfrac{1}{-e^{-t}}$$  $$z=0$$  So going back to equation $(1)$, now we can say as $x$ tends to $0^{+}$, $x\ln x$ tends to $0$  $$y=\lim_{x\to 0^{+}}\left(e^{x\ln x}-1\right)\ln x\tag{3}$$  $$y=\lim_{x\to 0^{+}}\dfrac{\left(e^{x\ln x}-1\right)}{x\ln x}\cdot x\ln^2 x$$  $$y=\lim_{x\to 0^{+}}\dfrac{\left(e^{x\ln x}-1\right)}{x\ln x}\cdot x\ln^2x$$  $$y=\lim_{x\to 0^{+}}x\ln^2x$$  $$y=\lim_{x\to 0^{+}}\dfrac{ln^2x}{\dfrac{1}{x}}$$  So we have $\dfrac{\infty}{\infty}$ form here and so we can apply L's hospital rule here  $$y=\lim_{x\to 0^{+}}\dfrac{2\ln x\cdot\dfrac{1}{x}}{\dfrac{-1}{x^2}}$$  $$y=\lim_{x\to 0^{+}}\dfrac{2\ln x}{\dfrac{-1}{x}}$$  Again applying L's hospital rule here as we have $\dfrac{\infty}{\infty}$ form  $$y=\lim_{x\to 0^{+}}\dfrac{\dfrac{2}{x}}{\dfrac{1}{x^2}}$$ $$y=\lim_{x\to 0^{+}}2x$$ $$y=0$$  Putting value of $y$ back in equation $(1)$  $$\lim_{x\to 0^{+}}x^{x^x-1}=1$$  So lots of ups and down in this problem, can it solved by any simpler means?

Could you help me with this one? Thanks. The answer should be 1, somehow. I tried everything I know, but I couldn't solve it.  $$\lim_{x\to0^+} (x^{x^x-1})$$