java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
What is a NullPointerException, and how do I fix it?
My Visual Studio (2008) Editor has stopped to underline Errors (this nifty wavy red lines). I can't really tell when, but it can be related to the installation of .Net Framework 3.5 SP 1 or the MVC Beta (which I guess is unlikely). Furthermore have I installed and uninstalled both CodeRush and Resharper for evaluation purposes (decided not to keep either one of them).  Does anyone know the problem and how to restore this functionality again? Why should the substitution be injective when integrating by substitution? I made a silly mistake in evaluating some integral by using a non-injective $u$-substitution.  But why should $u$-substitutions be injective in the first place?  I reasoned in the following way: the formula $$ \int_{\phi(a)}^{\phi(b)}g(x)\ dx = \int_a^b g(\phi(t))\phi^\prime(t)\ dt $$ holds for a general $C^1$ function $\phi$, even if it is not injective.  When you calculate an integral of the form $\int_a^b f(\phi(t))\ dt$, to use the formula above from right to left, you should find a function $f$ such that $$ f(\phi(t)) = g(\phi(t))\phi^\prime(t), $$ which do not exist if $\phi$ is not injective, i.e., $\phi(t) = 0$ for some $t$. This is why substitutions should be injective.  Is my reasoning correct?  If so, I believe that if $\phi^\prime(t) = 0 \Rightarrow f(\phi(t)) = 0$, a function $g$ that satisfies the formula above may exist and $\phi$ should not necessarily be injective.  Is this right?  I am often confused about the fact $\phi$ should be injective.  Is there an intuitive way to interpret this fact, so that I always remember to take a $\phi$ that is injective?  I would be grateful if you could help me understand this matter. A locally constant sheaf on a locally connected space is a covering space; Proof? Query is slow in SQL Server 2014, fast in SQL Server 2012 During the migration of one of our databases from SQL Server 2012 (SP1, CU2) to SQL Server 2014 (SP1), we have experienced some strange issues.  One of the queries that completes within seconds on SQL Server 2012 seem to be hanging on SQL Server 2014.  SELECT  DISTINCT      src.[Id] FROM     [stg].[BaseVolumes] src JOIN          [tmp].[Dates] d ON src.[CalWeek_Nmbr] = d.[CalYrWkDense_Nmbr] WHERE        EXISTS (SELECT  *             FROM                     (SELECT     ctry.[ISOCode]                  AS  [Mkt_Code]                             , so.[Code]                     AS  [SlsOrg_Code_AK]                             , so.[DistributionChannelCode]  AS  [DistChnl_Code_AK]                             , prd.[SupplierCode]                AS  [SKU_Code_AK]                             , cl6.[Code]                        AS  [CstHierLvl06_Code_AK]                             , lp.[BaseDateID]                   AS  [Dte_EK]                  FROM   [PM_APP].[edw].[BaseVolumeDayCurrent]   lp                  JOIN   [PM_APP].[dbo].[Country]                ctry    ON  lp.[CountryID] = ctry.[ID]                  JOIN   [PM_APP].[dbo].[SalesOrganisation]      so      ON  lp.[SalesOrganisationID] = so.[ID]                  JOIN   [PM_APP].[dbo].[Product]                prd     ON  lp.[ProductID] = prd.[ID]                     JOIN   [PM_APP].[dbo].[CustomerLevel6]         cl6     ON  lp.[CustomerID] = cl6.[ID]                  WHERE                        lp.[ModifiedByApp] = 1) lkp             WHERE                    src.[Mkt_Code]                  =   lkp.[Mkt_Code]                 AND src.[SlsOrg_Code_AK]        =   lkp.[SlsOrg_Code_AK]                 AND src.[DistChnl_Code_AK]      =   lkp.[DistChnl_Code_AK]                 AND src.[SKU_Code_AK]           =   lkp.[SKU_Code_AK]                 AND src.[CstHierLvl06_Code_AK]  =   lkp.[CstHierLvl06_Code_AK]                 AND d.[Dte_EK]                  =   lkp.[Dte_EK]         )   Row count:   BaseVolumes:            23108  Dates:                  18628  BaseVolumeDayCurrent:   108115503  Country:                249 SalesOrganisation:      29 Product:                18446 CustomerLevel6:         295   Wait stats showing high CXPacket, but there is one hanging task with SOS_SCHEDULER_YIELD, (print from sys.sysprocesses)   spid | blocked | waittime | lastwaittype          | cpu     | physical_io   76   | 0       | 9886044  | CXPACKET              | 13902   | 31192  76   | 0       | 0        | SOS_SCHEDULER_YIELD   | 9829719 | 83077  76   | 0       | 11248    | CXPACKET              | 11110   | 0 . . .   Attached are the execution plans from SQL Server 2012 and SQL Server 2014.       Any help much appreciated. How to use multiple HDRIs My question is, how would I make the visible HDRI/Enviroment Map be image 1 and then have reflections as Image 2? If someone can post a node setup, or a .py file that would be great &lt;3 I was thinking maybe using the Is Camera Ray node but I'm not confident it would work, and have no idea where to start. Proof of A ⊆ C and B ⊆ C ⇔ A ∪ B ⊆ C I know that this is valid because by thinking about it, you can see it's true, but I'm just not sure how I would go about actually proving it mathematically. I've kind of tried proof by contradiction, since that's what I use most of the time, but it doesn't seem to work.    In my mind, A ∪ B ⊆ C kind of just implies that A ⊆ C and B ⊆ C. Evaluating $\int_{-\infty}^{\infty}\frac{1}{(x^2+b^2)^2}dx$ I'm attempting to do this in a procedure:  DECLARE @a bit = 1; BEGIN     SELECT * INTO #aTemp FROM OPENROWSET( ... );      IF @a = 0     BEGIN         SELECT ... INTO #bTemp FROM #aTemp;     END     ELSE     BEGIN         SELECT ... INTO #bTemp FROM #aTemp;     END END   I get the error:  Msg 2714, Level 16, State 1, Line 10 There is already an object named '#bTemp' in the database.   Why is this happening and is there a work around?  Update  I've attempted to add a DROP statement as suggested , but it still does not work:  DECLARE @a bit = 1; BEGIN     SELECT * INTO #aTemp FROM OPENROWSET( ... );      IF @a = 0     BEGIN         IF OBJECT_ID('[tempdb]..#bTemp') IS NOT NULL         BEGIN             DROP TABLE #bTemp;         END          SELECT ... INTO #bTemp FROM #aTemp;     END     ELSE     BEGIN         IF OBJECT_ID('[tempdb]..#bTemp') IS NOT NULL         BEGIN             DROP TABLE #bTemp;         END          SELECT ... INTO #bTemp FROM #aTemp;     END END Skype app in my Ubuntu system work perfectly. But today when I run the app, I see this:    How Can I fix this? I wonder whether it is possible to draw the three following quadric surfaces (cone, hyperboloids)  x^2+y^2-z^2=0  x^2+y^2-z^2=1  x^2+y^2-z^2=-1  (and the axis)   using pgfplots 3d or TikZ as it is done in the following image "done" vs "have done" If $A$ and $B$ are nonempty sets, prove that $A \times B = B \times A$ if and only if $A = B$.   Proving the first direction of this is easy. That is, if $A = B$ then it is obvious that $A^2 = A^2$. I am wondering how to prove the other direction now. Maybe proving it by contradiction will be easier than directly. Chaining the Imperius curse What would happen if a wizard w successfully casts the Imperius curse on a equally powerful wizard a and then order him to cast the same curse back on w?  Follow-up questions.  It is established that casting the curse can be done .  What would happen in the case of a chain of casts that would hit back the original wizard? w-&gt;a-&gt;b-&gt;c-&gt;w  The original wizard could rather command the last wizard c, in the chain, to curse his first target instead. w-&gt;a-&gt;b-&gt;c-&gt;a wich would create a loop of a-&gt;b-&gt;c-&gt;a...  In what kind of limbo would wizards a, b and c exist in?  ( for the sake of simplicity, we can assume that every curse target is not very good at resisting the curse ) I have this below code where i am trying to first search an account name and on hit button it displays the result set.  On the button click i am also loading an child component which is displaying the id of the record.  I need the child component should get displayed once i click on the record.  How can i achieve this -   Parent Component -   &lt;aura:component controller="SimpleAccountController"&gt;     &lt;aura:attribute name="account" type="account[]"/&gt;     &lt;ui:outputText aura:id="outName" value="" class="text"/&gt;     &lt;ui:inputText aura:id="name" label="Enter Name:" placeholder="Your Name" /&gt;     &lt;ui:button aura:id="button" buttonTitle="Click to see what you put into the field" class="button" label="Click me" press="{!c.getInput}"/&gt;     &lt;aura:iteration var="acc" items="{!v.account}"&gt;             &lt;a onclick="{!c.accountselected}" data-recId="{!acc.Id}"&gt;         &lt;p&gt;{!acc.Name} : {!acc.Type} : {!acc.Industry} : {!acc.Rating}&lt;/p&gt;             &lt;/a&gt;         &lt;c:HelloWorkdChildCmp selectedaccount="{!acc.Id}" /&gt;     &lt;/aura:iteration&gt; &lt;/aura:component&gt;   COntroller -   ({     getInput : function(cmp, evt) {         var myName = cmp.find("name").get("v.value");         var myText = cmp.find("outName");         var greet = "Hi, " + myName;         myText.set("v.value", greet);         var action = cmp.get("c.seaAcc");         action.setParams({ "s" : myName });         action.setCallback(this, function(response) {             var state = response.getState();             if (state === "SUCCESS") {                 cmp.set("v.account", response.getReturnValue());                 //alert("From server: " + response.getReturnValue());             }         });         $A.enqueueAction(action);     },      accountselected : function(cmp, evt) {        console.log(evt.currentTarget.getAttribute("data-recId")) ;     }  })   Child component -   &lt;aura:component &gt;     &lt;aura:attribute name="selectedaccount" type="String"/&gt;     &lt;div&gt;Id: {!v.selectedaccount}&lt;/div&gt; &lt;/aura:component&gt; What my thought was that the bijection was a piecewise function:  $f(x) = 1/n+1$ if $x = 1/n$ for some $n \in \Bbb N$ and $x=1/n$ if $x \neq1/n$ for some $n \in \Bbb N$.  However, the textbook says this is incorrect. I don't actually see why. Was it a matter of brackets or the open variable $(0,1]$, which is what I tend to think. Terminal : needs full path to execute a command Let's suppose i have an application in /Applications/MacPorts/KDE4/myapp.app/Contents/MacOS/myapp.  When i use cd to reach the directory 'MacOS' and then issue the command myapp it says command not found.  But when i issue the command with the full path like /Applications/MacPorts/KDE4/myapp.app/Contents/MacOS/myapp it works.  I had the same problem with mysql inside xampp.  Why is that? Disclaimer: I'm pretty novice at sysadmin stuff.  I'm trying to set up port forwarding in an AWS EC2 instance, this has to be done in the command-line because I don't want to go in and edit anything, it has to be automatic (it's part of a build process).   sudo echo "net.ipv4.ip_forward = 1" &gt;&gt; /etc/sysctl.conf      Permission denied   The weird thing is I've been (successfully) using sudo for pretty much every command that required su privileges. If I do sudo su before the command (trying it out by hand in an ssh session), then it works.  Reasons behind this? Possible solutions that don't involve sudo su or manual edits? I have been playing with the settings for the text object recently, and every time I add a new text object, I need to change the font to my favorite one. (Eurostile LT ExtendedTwo) Is there any way to change the default font so I do not need to change it every time I add a new text object?   Example: I would like to make some changes to the core toolbar module across all my sites, and I don't want to modify the actual core's css.  It looks like I should be able to override the core css found in modules/toolbar/toolbar.css by simply copying this file into my sites directory at /sites/modules/toolbar/toolbar.css.  I tried doing this, cleared the Drupal cache, but nothing happened.  What am I missing? How can I switch back to Nvidia card from Intel with Nvidia-prime So I updated to Ubuntu 14.04 and found that the primusrun command no longer works, so ditched bumblebee in favour of nvidia-prime. This lets you switch video card from nvidia-settings rather than running through the command line (I prefer the old method, but want the primus performance).  The problem is that after switching to Intel from nvidia-settings, I can no longer open it up again to switch back to the nvidia card. When I open nvidia-settings I get a segmentation fault (according to the terminal).  Is there any way to open nvidia-settings switch back? I would like the ability to be able to switch between the two since having the nvidia card on all the time kills my battery and heats up the laptop a lot.