GregorianCalendar last = new GregorianCalendar(py,pm-1,pd); System.out.println(last.getTime()); GregorianCalendar present = new GregorianCalendar(py,pm-1,pd); System.out.println(present.getTime());  long diff = Math.abs(prsent.getTime() - last.getTime());   Problem facing when subtracting these two dates
I find it funny that Java (or the java.util library) does not have a built-in function to calculate difference in dates. I want to subtract one date from another to get the elapsed time between them. What is the best way to do this?   I know the simple way is to take the difference of the time in milliseconds and then convert that into days. However, I wanted to know if this works in all cases (with daylight saving, etc.).
My professor has stated the following lemma:  Let $U$ and $V$ be two vector spaces and $B$ a basis for $U$. If $f:B\rightarrow V$ is a map, then there exists a unique linear map $A: U \rightarrow V$ such that $A(x)=f(x)\ \forall\ x\in B$  How can I prove this lemma? (This is not a homework problem.) I'm looking for the title of a short story by Ursula Le Guin about a scientist (?) who is given a drug that slows the timescale of his perception enormously, so that he can perceive that an alien (?) forest is actually behaving as a sentient being, reacting to current events, but at an enormously slow (from a normal human point of view) timescale. It might be in , but I don't remember the title (and it doesn't jump out at me from the list of titles) and don't have access to that collection right now. It is not &quot;The Word for World is Forest&quot;, nor &quot;Direction of the Road&quot; (from ), nor &quot;Vaster than Empires and More Slow&quot;, the latter two of which look at similar plant perception/time-scale issues. Update: it turns out that the description was right, but I had most of the details wrong: not Le Guin, not alien, not a scientist ... "Not being good at swimming, he didn't like it." Could we omit the word "being" here? Not being good at swimming, he didn't like it.   Could we omit the word "being" here?     Not good at swimming, he didn't like it.   Which one is grammatically correct? What is an Electron? I am a n00b to physics. What physics I know comes from high school and popular science books.  At school we were taught about atoms and what make up atoms, but we weren't actually told what the particles were!  So sure an atom has electrons orbiting around a nucleus made of protons and neutrons, but what exactly is an ?  And if we don't know, how can we fire them from guns, like they do in experiments ... etc  Any clarification on this would be great. Can I use mirroring to make a copy of my Database? How does the Flash breathe while utilizing his super speed? How do the Flashes breathe utilizing their super speed? The air pressure would be extreme. Do they run in a pressurized bubble? How to reconcile the cashless human/Federation society with human traders and merchants Equality holds in triangle inequality iff both numbers are positive, both are negative or one is zero How do we show that equality holds in the triangle inequality $|a+b|=|a|+|b|$ iff both numbers are positive, both are negative or one is zero? I already showed that equality holds when one of the three conditions happens. What if client doesn't like any logo design concept? I'm in a process of creating Graphic Design contract. I've decided to provide each client with 3 logo concepts and 3 rounds of revision. Ideally, I would create 3 concepts and client will chose one, but it happend to me before that client didn't like and concept and I end up with doing 10+ more (yes, I've worked without contract).  How can I prevent this situation? Should I charge hourly for each new concept separately? How can I express my thoughts clearly in a contract (without sounding like 'if you don't like any, you'd have to pay more)? I don't want to scare client and put thoughts into their minds saying that there is a possibility that they won't like me ideas. Windows 2008 R2 Standard server - how to disable RC4 I have just used www.ssllabs.com and ran a few tests - my server is capped to a B grade because my server accepts RC4     This server accepts the RC4 cipher, which is weak. Grade capped to B.   I've researched and found that to disable RC4 I need to add 3 keys, and set their enabled dword to 0  and   I have done this for RC4 40/128, RC 56/128 and RC4 64/128  I then restarted my server. When the server was up again, I verified the Registry Changes were done, and they are - all 3 exist and all 3 have their enabled value set to 0.  I return to ssllabs, clear the cache, re-run the test and it returns the same result (capped to B due to RC4 being enabled).   At this stage, I'm not sure what this means - if SSLLabs showing incorrect results (I'm going to assume not), have I disabled RC 4.  How can I tell if I have successfully disabled RC4  Edit  I also saw the KB about this  so trying now... I've done the same registry changes but, when I try to download the 64 bit version for W2008 R2 Standard, it fails to install with error message     The update is not applicable to your computer How to insert a very large number of records into a MySql database as fast as possible Why do we say "last night" and not "yesterday night"? As from object, is there a rational reason for saying "last night" rather than  "yesterday night", though you would say "yesterday morning" and "yesterday afternoon"? How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's procedure? I performed with R an ANOVA and I got significant differences. However when checking which pairs were significantly different using the Tukey's procedure I did not get any of them. How can this be possible?  Here is the code:  fit5_snow&lt;- lm(Response ~ Stimulus, data=audio_snow) anova(fit5_snow)  &gt; anova(fit5_snow) Analysis of Variance Table  Response: Response           Df Sum Sq Mean Sq F value  Pr(&gt;F)   Stimulus   5  73.79 14.7578  2.6308 0.02929 * Residuals 84 471.20  5.6095                   --- Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1   df&lt;-df.residual(fit5_snow) MSerror&lt;-deviance(fit5_snow)/df  comparison &lt;-  HSD.test(audio_snow$Response, audio_snow$Stimulus, df, MSerror, group=FALSE)  &gt; comparison &lt;-  HSD.test(audio_snow$Response, audio_snow$Stimulus, df, MSerror, group=FALSE)  Study:  HSD Test for audio_snow$Response   Mean Square Error:  5.609524   audio_snow$Stimulus,  means                  audio_snow.Response   std.err replication snow_dry_leaves            4.933333 0.6208034          15 snow_gravel                6.866667 0.5679258          15 snow_metal                 6.333333 0.5662463          15 snow_sand                  6.733333 0.5114561          15 snow_snow                  7.333333 0.5989409          15 snow_wood                  5.066667 0.7713110          15  alpha: 0.05 ; Df Error: 84  Critical Value of Studentized Range: 4.124617   Comparison between treatments means                                Difference   pvalue sig        LCL      UCL snow_gravel - snow_dry_leaves  1.9333333 0.232848     -0.5889913 4.455658 snow_metal - snow_dry_leaves   1.4000000 0.588616     -1.1223246 3.922325 snow_sand - snow_dry_leaves    1.8000000 0.307012     -0.7223246 4.322325 snow_snow - snow_dry_leaves    2.4000000 0.071587   . -0.1223246 4.922325 snow_wood - snow_dry_leaves    0.1333333 0.999987     -2.3889913 2.655658 snow_gravel - snow_metal       0.5333333 0.989528     -1.9889913 3.055658 snow_gravel - snow_sand        0.1333333 0.999987     -2.3889913 2.655658 snow_snow - snow_gravel        0.4666667 0.994348     -2.0556579 2.988991 snow_gravel - snow_wood        1.8000000 0.307012     -0.7223246 4.322325 snow_sand - snow_metal         0.4000000 0.997266     -2.1223246 2.922325 snow_snow - snow_metal         1.0000000 0.855987     -1.5223246 3.522325 snow_metal - snow_wood         1.2666667 0.687424     -1.2556579 3.788991 snow_snow - snow_sand          0.6000000 0.982179     -1.9223246 3.122325 snow_sand - snow_wood          1.6666667 0.393171     -0.8556579 4.188991 snow_snow - snow_wood          2.2666667 0.103505     -0.2556579 4.788991 Which view is the "Current view"? I have got a SharePoint 2010 website with a WebPart-page and a few WebParts on it.  One of the WebParts displays a list/a view of a list.  The views of that list have been updated due to business needs - but the view in the WebPart on the WebPart-page is not updated.    If I edit "Modify Shared Web Part" (the one with the list / list view),  the "Selected view" is set to "&lt;Current view&gt;".  My question is now: Which view of the list is the "&lt;Current view&gt;"? Is it any view of the list at all - or has the WebPart some kind of its own view to that list? Why does sudo change the PATH? Proving by induction that $ \sum_{k=0}^n{n \choose k} = 2^n$ Prove by induction that for all $n \ge 0$:  $${n \choose 0} + {n \choose 1} + ... + {n \choose n} = 2^n.$$  In the inductive step, use Pascal’s identity, which is:  $${n+1 \choose k} = {n \choose k-1} + {n \choose k}.$$  I can only prove it using the binomial theorem, not induction. I'm currently developing a fake filesystem for a browsergame. I recently implemented ".." and "." folders so every folder has a reference to its parent. Then I checked in my terminal if "/" also has these folders.  Actually I was very surprised that it has a directory ".." which obviously is a reference to itself.  Is the reason for this consistency or is there a better explanation?  Edit: I'm basically looking for the document where this is documented. I've been messing around with Unity and broke something, how do I "start over"? Create a Symbolic link to the merged contents of 3 folders I have 3 folders with large amount of data in each which has to be maintained seperately. Can I create a sym link or shortcut.in windows which should show me the merged contents of the 3 folders. I am not looking for library conf in Win7.   Any suggestion is highly appreciated. Does this sentence seem weird?