I am working on an application written solely in Java which will often be using very large amount of data (at most 500 GB). The program will be saving data not currently in use in a database.   However, I want to keep as much data as possible within the application since a lot of it is reused often. In order to not get any out-of-memory errors I want to be able to check how much memory the application as a whole is using at any one moment, so that I can store it when the application approaches a predefined limit.  Something like this;  long memoryUsage = SomeClass.getCurrentMemoryUsage();
I need to check CPU and memory usage for the server in java, anyone know how it could be done?
I have a directory that contains the following:  x.pdf y.zip z.mp3 a.pdf   I want to delete all files apart from x.pdf and a.pdf. How do I do this from the terminal? There are no subdirectories so no need for any recursion. Using MAX in SQL Expression of ArcMap ModelBuilder I am planning on spending 90 days in Schengen zone countries.  I will be taking a cruise between Lisbon and Barcelona.  Do the days at sea count against the 90 days allowed for staying in the Schengen zone? Rounding a number to the nearest 5 or 10 or X Given numbers like 499, 73433, 2348 what VBA can I use to round to the nearest 5 or 10? or an arbitrary number?  By 5:   499 -&gt;  500 2348 -&gt; 2350 7343 -&gt; 7345   By 10:   499 -&gt;  500 2348 -&gt; 2350 7343 -&gt; 7340   etc. Solve $\frac{d}{dx}f(x)=f(x-1)$ I am trying to find a function such that   $\dfrac{d}{dx}f(x)=f(x-1)$   Is there such function other than $0$ ? Unemployed person applying for UK visa Sum of points and rank according to points Applications losing focus for a few seconds in Windows 7 Recently all of my applications keep losing focus every minute (or so) for a few seconds (then the window gets the focus back). It is very annoying, since I'm typing most of the time and get interrupted by this behavior. Things worked fine until a week ago and I have no idea what is causing this error, but I noticed the mouse moves to a certain point on one of my screens when this happens.  I would appreciate any advice: it starts to drive me crazy... Can someone confirm that its not possible to change the height of a dropdown that is shown when you click on a select box.   The size attribute of the select makes it look like a list, the height attribute in the CSS doesnt do much good either. I encountered a problem today to prove that $(X_n)$ with $X_n = \cos(n!)$ does not have a limit (when $n$ approaches infinity). I have no idea how to do it formally. Could someone help? The simpler the proof (by that I mean less complex theorems are used) the better. Thanks which vectors are perpendicular to each other? which vectors are perpendicular to each other?  $\vec a = (1, -2, 3)$, $\vec b = (5, 4, 1)$, $\vec c = (1, 0, -5)$  Do i just take the dot product of 2 of them. If the dot product they are at $90^\circ$? But how do i know if there perpendicular? Fly and Two Trains Riddle "Whether" Vs. "If" Could someone please help me with these sentences? I need to know  Which one doesn’t sound natural? Which one is formal and which one is not?   A - I don’t know whether this word fits in the sentence. B - I don’t know if this word fits in the sentence.   C - I don’t know whether or not this word fits in the sentence. D - I don’t know if or not this word fits in the sentence.   E - I don’t know whether this word fits in the sentence or not. F - I don’t know if this word fits in the sentence or not.  For me only D doesn't work and sounds not idiomatic. Meanwhile for me all of these sentences can be used in both written and spoken languages. Do you confirm me? Consider a string under tension, for example, a string on a guitar. When a guitar string is plucked, it vibrates at a certain frequency. When the tension on the string is increased by twisting the tuning peg at the end of the neck, the frequency of the string increases. According to , increasing the tension on a string also increases the speed of the wave moving through it. According to  the speed of a wave is higher in a more dense medium.  Does this mean that increasing the tension also increases the density?  This does not seem very logical to me, since density is the "compactness" of a substance, or how close together the individual molecules are. By twisting the tuning peg on a guitar, you rotate the cylinder that the string is fixed to, wrapping it around more tightly. This pulls more of the string around that cylinder, similarly to when you reel in a fishing rod. Since more of the string's molecules are now wrapped around the peg, there should be fewer molecules over the same distance between the bridge and the nut (the two ends of the vibrating portion of the string), therefore bringing the density down. I have:  \documentclass[a4paper,11pt]{report}   with no special customisation.  In one page, at the end of a section, I have a big figure with two paragraphs of text below it, and these two paragraphs are not enough to fill up the rest of the page.  When I use the \documentclass as above I get some extra white space at the end of the page, which is fine: the vertical spacing from the figure caption and between the two paragraphs is standard and correct.  But if I switch to:  \documentclass[a4paper,11pt,twoside]{report}   I get extra blank space between the figure caption and the 1st paragraph and also between the 1st and 2nd paragraph.  I want to use twoside to set the headings with fancyhdr. How can I get rid of these ugly white spaces? Schengen visa refusal on threat to public policy, security, health I applied for German Schengen visa as a medical escort to my relative in a different country from  where I reside, but my visa application was refused and the refusal letter  was written in German as the following:        Ein oder mehrere Mitgliedstaaten sind der Auffassung, dass Sie eine Gefahr für die öffentliche Ordnung, die innere Sicherheit, die   öffentliche Gesundheit gemäß Artikel 2 Absatz 19 der Verordnung (EG)   Nr 562/2006 (Schengener Grenzkodex) oder die internationalen   Beziehungen eines oder mehrerer Mitgliedstaaten darstellen.      I was in Germany for nearly a year with my relative during his treatment; I extended my stay there 3 times; and I returned back home two months ago in order to renew my passport. I applied again using the same documents that I used for my extension in Germany.    First, can anyone tell me what the refusal means? Next, is there any possibility that there is a mistake in the assessment?    Note: In English this reason is...     One or more member state(s) consider you to be a threat to public   policy, internal security, public health as defined in Article 2(19)   of Regulation (EC) No 562/2006 (Schengen Borders Code) or the   international relations of one or more of the member states). C++ GCC 4.3.2 error on vector of char-array crossfade between 2 videos using ffmpeg What use are Steam Trading Cards? Is it purely a 'gotta-have-them-all' mindset, or do they actually serve some purpose?  I notice that you are able to sell them on a community market. For a test I listed one, and someone bought it for 50p. Not exactly a huge amount, but I don't understand why someone would spend real money on them.  Am I missing something?   Are they redeemable for games or money off vouchers or something 'tangible' that I'm missing? Why isn't Derivative equal to NeumannValue?