Exception in thread "main" java.lang.NullPointerException IN SELENIUM
What is a NullPointerException, and how do I fix it?
This was working perfectly on 17.10 but after upgrading to 18.04 yesterday, when the lid is closed the screen turns off but doesn't suspend properly.  I travel around a lot and immediately noticed the heat (and battery draining) when taking it out of the travel case.  I've tried uncommenting these lines in /etc/systemd/logind.conf  HandleLidSwitch=suspend HandleLidSwitchDocked=suspend   and restarted but didn't make any difference. Converse of Schur's Lemma in finite dimensional vector spaces I am trying to prove (or disprove) the converse of Schur's Lemma in finite dimensional vector spaces. I am not sure if it holds in this case, but I have tried to apply the idea that proves it in representation theory (see for example Theorem 4.3  that uses Maschke's theorem or in questions  and ).  The converse of Schur's Lemma in finite dimensional vector spaces is:     Let $V$ be a finite dimensional vector space over the complex numbers. Let $S$ be a set of endomorphisms of $V$ and assume that every endomorphism $A$ of $V$ such that $$AB=BA\text{ for all }B\in S$$ is of the form $\lambda I, \ \lambda\in\mathbb{C}$. Then $V$ is a simple $S$-space.   (*an endomorphism of $V$ is a linear operator from $V$ to $V$  *$V$ is a simple $S$-space if the only $S$-invariant subspaces of $V$ are $V$ itself and the zero subspace)  What I've tried so far:  Assume to the contrary that $V$ is not a simple $S-$space. Then, there exists a subspace $W$ of $V$ such that $W\not =\{0\}$, $W\not= V$ and $W$ is $S$-invariant. Let $W'=V\setminus W$. Then, since $V$ is finite, we can easily prove that $V=W\oplus W'$ (this is my attempt to translate Maschke's theorem in vector spaces). Consequently, for every $v\in V$, there exists unique $w\in W$ and $w'\in W'$, such that $v=w+w'$. Define the projection $P:V\rightarrow V$ by $Pv=w$ for every $v\in V$.   What is left to prove is that $PB=BP$ for all $B\in S$. Then $P$ is clearly not a scalar and thus we have the contradiction we are looking for.  There is a difficulty in showing that $PB=BP$ for all $B\in S$, because $W'$ might be $S$-invariant or not. More precisely:   Let $v\in V=W\oplus W'$ and $v\not =0_V$.  If $v\in W$ then $Bv\in W$ because $W$ is $S$-invariant, therefore: $PBv=Bv$ and $BPv=Bv$.  If $v\in W'$ then $Pv=0$, hence $BPv=B\cdot 0=0$, and  (i) if $Bv\in W'$ then $PBv=0$.  (ii) if $Bv\in W$ then $PBv=Bv$ and this is where the problem occurs.  Any hints, ideas or counterexamples would be very helpful. $(a,b) \mathbin\# (c,d)=(a+c,b+d)$ and $(a,b) \mathbin\&(c,d)=(ac-bd(r^2+s^2), ad+bc+2rbd)$. Multiplicative inverse? Let $r\in \mathbb{R}$ and let $0\neq s \in \mathbb{R}$. Define operations $\#$ and $\&amp;$ on $\mathbb{R}$ x $\mathbb{R}$ by $(a,b) \mathbin\#(c,d)=(a+c,b+d)$ and $(a,b) \mathbin\&amp;(c,d)=(ac-bd(r^2+s^2), ad+bc+2rbd)$ as addition and multiplication, respectively. Do these operations form a field?  I have shown that every axiom of the field is satisfied except for the "existence of multiplicative inverses" axiom. This is where I need help. We either need to show that this axiom fails and so we don't have a field or that the axiom $aa^{-1}=1$ is satisfied for every $a\neq 0 \in \mathbb{R}$  The multiplicative identity in this problem is $(1,0)$.  Any solutions or hints are greatly appreciated. Prove a function is constant under certain conditions Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be smooth and such that for every $x$    $$\int_{-\infty}^{\infty}\frac{|f(x)-f(y)|}{|x-y|^2}dy &lt; \infty$$   Prove that $f$ is constant. I've recently embarked on my PhD studies (cancer, structural biology) and have yet to publish. Currently, there are some 200 papers in my name and several thousand under my surname. Because of this, I am considering switching my surname to an old, rare, surname in my family, which is only used by one active researcher.  My question is this: are there any reasonable alternatives that does not include legally changing my name? I personally don't mind changing it, but the old surname happens to be "noble", and may come off as quite pretentious. I would be able to change to another, less pretentious, surname, but in terms of rareness, no alternative comes close.   In short, what are my alternatives? I am trying to buy a laptop, and I have seen in many place that they show GDDR3 and sometimes  DDR3. What is the difference between them?  afaik DDR3 is a type of RAM used for system memory, while GDDR3 is a type of RAM used for graphics cards. So does "G" only stand for Graphics or does it have another particular meaning? ArrayList vs List I saw this reply from Jon on :     If you want a single collection to   contain multiple unrelated types of   values, however, you will have to use   List&lt;object&gt;   I'm not comparing ArrayList vs List&lt;&gt;, but ArrayList vs List&lt;object&gt;, as both will be exposing elements of type object. What would be the benefit of using either one in this case?  EDIT: It's no concern for type safety here, since both class is exposing object as its item. One still needs to cast from object to the desired type. I'm more interested in anything other than type safety.  EDIT: Thanks Marc Gravell and Sean for the answer. Sorry, I can only pick 1 as answer, so I'll up vote both. An integer is a $n$'th power if that holds true for all moduli. I have not been able to solve this problem. Any insights would be appreciated!   Let $x, n > 1$ be integers. Suppose that for each $k > 1$ there exists an integer $a_{k}$ such that $x − a_k^n$ is divisible by $k$. Prove that $x = A^{n}$ for some integer $A$. Modelling the number of apples an orchard yields with diminishing returns per tree This is   in the University of Washington's precal book.  Sylvia has an apple orchard. One season, her 100 trees yielded 140 apples per tree. She wants to increase her production by adding more trees to the orchard. However, she knows that for every 10 additional trees she plants, she will lose 4 apples per tree (i.e., the yield per tree will decrease by 4 apples). How many trees should she have in the orchard to maximize her production of apples?  Instructing a precal class, I walked through my approach to answering this in class (without preparing) and ended up doing something strange that may have confused the students. How would you clearly explain a way to get the function for the number of apples that we are trying to maximize? More generally, how would approach answering this question? It'd be nice to collect a some different approaches to demonstrate to my students that there is not a single rigid correct way to solve a problem. A "fast" way for  computing $ \prod \limits_{i=1}^{45}(1+\tan i^\circ) $? Which  is the fastest paper-pencil approach to compute the product $$ \prod  \limits_{i=1}^{45}(1+\tan i^\circ) $$ How to repair Ubuntu installation after interrupted dist-upgrade without losing any custom settings? How can I make schematic of this board? Is it possible to add a user and restrict him to run special programs? For example after this user logs in, he can only open Firefox to use Internet and no other programs can be run by this user. For example in a terminal, commands will not be accessible when you delete some environment variables like $HOME. But is it possible to avoid running programs in a graphical shell, like Gnome? If yes, how? Extend tourist visa stay in USA due to coronavirus and waive I-539 fee My mom has come to US on a tourist visa and her I-94 expires on the first week of May.   Due to the coronavirus, travel restrictions have been imposed in our home country (India). Also we want to avoid the risk of traveling in flights at this time.  Is there an easy way to to extend her stay in the US by one or two months?  I am aware that we should fill out an  to extend our stay. But in-order to submit the online application it requires a fee of $370.    Is filing I-539 the easiest way to extend her stay at this time? If so, is it possible to waive the fee due to the coronavirus situation?  After filing I-539 should she wait for an approval to continue her stay? Or is the receipt good enough?   Can you please help me with these? Thanks!  [Edit 1]:  With the current situation of the virus, traveling anywhere sounds like a very risky operation, especially for elders.   That is the main reason behind this question. If the US government will allow visitors to overstay until Covid-19 settles down! Why do games run slow on CPU Maybe my question sounds naive because I'm not a game developer but I dont see objective reasons for this. An average cpu is in times more powerful than an average gpu like a few graphics cards in one. The most repeated reasons in internet:  the GPU isn't as busy as the CPU  If the gpu renders the screen how it can not be busy The modern cpus are powerful enough. They are not busy most of time. For example my cpu's usage is 3%.  many GPU's are designed to process graphics commands in parallel, CPU single threads them  What bothers the games to run a few parallel processes even on one cpu core? In my opinion its not correct to tell that the gpu is better if games never use 100% of the cpu's capacity. To be specific they dont use even 50%.  To clarify my question based on responses in the comments:  Did you mean to ask &quot;Why do games render more slowly on the CPU?&quot;  Yes I mean why the cpu cant do the whole work for games when it is underloaded and especially if it does the largest part of work in any case.  You can not compare GPUs and CPUs directly, because they do different things.  What bothers them to do the same things?  The CPU isn't as well suited to performing rendering calculations  I dont understand what &quot;suited&quot; means. And why the cpu is not suitable for primitive tasks aka paint roller.  adding additional parallel processes doesn't improve performance  Then why do you produce multicore graphics cards and multicore central processing units? Just give various parts of one task to a few processes if one process is slow and 100% of the capacity is not used. What bothers to emulate the gpu? Its also unclear for me why when you play without a separate graphics module the games see only one cpu core when you play with the gpu they see and use all the cpu cores. May be some magic. Changing parameter values according to other parameter choice in Processing script using QGIS 3? I couldn't find anything about this problem.  Suppose to have the first parameters in a Processing script defined as an Enum:     self.addParameter(         QgsProcessingParameterEnum(             self.CHOICE,             self.tr('Choose the parameter'),             ['param1', 'param2']         ) )   While the second one as a number:  self.addParameter(     QgsProcessingParameterNumber(         name=self.VALUE,         description=self.tr('My value'),         type=QgsProcessingParameterNumber.Double,         defaultValue=40,         optional=False,         minValue=0,         maxValue=100     ) )   Is it possible to change the minValue, maxValue, description, ecc.. of the second parameter depending on the first or second choice of the first parameter already in the GUI?  e.g. if the user choose param1 then the second parameter should become:  self.addParameter(     QgsProcessingParameterNumber(         name=self.VALUE,         description=self.tr('My value'),         type=QgsProcessingParameterNumber.Double,         defaultValue=40,         optional=False,         minValue=0,         maxValue=100     ) )   while if he choose param2 it should became:  self.addParameter(     QgsProcessingParameterNumber(         name=self.VALUE,         description=self.tr('My AWESOME value'),         type=QgsProcessingParameterNumber.Double,         defaultValue=0,         optional=False,         minValue=50,         maxValue=500     ) ) Whenever I try to Get then Install any app from the App Store, I get this message:     We could not complete your purchase.  cancelled   I did some searching online, but barely found any useful hits. What is this about?! How does the size of insert affects the rate of Homologous Recombination in yeast? When performing genetic knockouts in yeast using homologous recombination to replace a target gene sequence via a vector DNA, does the region between the flanking regions in the vector have to be the same length as the site of recombination in the host cell's gene? I'm talking about the movie  Spoilers ahead.  Walter (Daniel Radcliffe) gave the task or blackmailed the Four Horsemen to steal a chip from a lab which can access any digital device. So they did steal the chip. And when they rescue Dylan Rhodes (Mark Ruffalo) from drowning in the water, Jack Wilder said that the chip is fake.     Jack: Wait something is not right.      Atlas: What's wrong?      Jack: It's fake.   Then they assumed that Walter did not know that the chip is fake. So they came with a plan to bluff. They pretended that they had the real chip. After they got caught by Walter, they gave the fake chip to Walter. Walter checked the chip and declared it as real. The Four Horsemen were surprised.     Walter: I'm sorry to interrupt. But I have to say congratulations and   thank you. It's real.      Lula: What? It's real!!!!!      Atlas: What? Is it real?      Jake: What is he talking about?   What happened? I didn't get it. What did I miss? Was the chip real? Was Walter pretending it to be real? If so, then why? If not, who switched the real chip with the fake one? Who had the real chip before? Reoccurring Bent Axles, any reasons or upgrades? Earlier this month I had a issue with a broken axle.  It was the original that was sold with the bike and lasted around 5,000 miles.  I went to my LBS and bought a new axle (unbranded, labeled, etc, paid $13, came with cones, spacers, and hardware).  I did the install myself and had everything adjusted nicely.  The next time I rode it was on my commute to work, but I didn't get 4 miles into it when I found that I bent the axle.    I took the wheel to the shop but they wouldn't do anything about it since I didn't have them do the work.  However, I figured this was a fluke and asked them for a new axle and to true the wheel.  Once again I did the install of the axle and only got 15 miles out of it this time before bending it.  Before I got home I felt the wheel get stiff, but it stayed true.  The question is what will be a cause of bending 2 axles in 20 miles?    I think the guy at the shop said it was a cro-moly axle (while talking to another person today at the shop, these may not be), and he couldn't believe that I bent it.  If so, where would such an axle fall in the quality hierarchy?  Or is my hub toast?  While the wheel was being repaired, I swapped to a new original wheel for about 2 weeks.  I have not had any issues with it, but I wanted to keep it as new as possible.   Reading other questions I saw a comment that said not to use a hub where the bearing was catching.  I did have one in this wheel but I figured since it is a cheap wheel I would just burn it up and move on to a better one.  Besides, it has lasted 5k miles without issue to this point.  The bike in question is a 2008 Schwinn High Timber with Joytech freewheel hubs.  I do use a trailer with this bike using a Burley axle hitch.  While I had the hitch installed on both axles I bent, I did not have either trailer hooked up to them.  Something I would like to note is that when I removed the first bent axle (axle #2) that the cones on it had a wavy bearing track.  I didn't think too much of it, and I put them on axle #3.  Only having a few miles on them shouldn't have made a difference?