I'm programming stuff on Python with Pycharm, and sometimes run regressions using Stata.   Sometimes, I need these applications to use as much as memory as they can get to speed up computations/  Sometimes, through nobody's fault but my own, these applications explode in memory. Perhaps a case I didn't think about, some inefficiency in algorythms, there are multiple ways this can happen.  I would like to guarantee these applications as much memory as possible, but prevent them from taking "core applications" memory. That is, I don't want my general Ubuntu GUI (great if this works for Elementary OS, too) to be slowed down because it has to be loaded into memory again.  Is there a way to ensure that a certain set of applications always precede in memory, if they are running? I mostly care about core applications and GUI, but it would be great if I could add custom applications such as Kupfer to the list.
I use my computer for scientific programming. It has a healthy 8GB of RAM and 12GB of swap space. Often, as my problems have gotten larger, I exceed all of the available RAM. Rather than crashing (which would be preferred), it seems Ubuntu starts loading everything into swap, including Unity and any open terminals. If I don't catch a run-away program in time, there is nothing I can do but wait - it takes 4-5 minutes to switch to a command prompt eg. Ctrl-Alt-F2 where I can kill the offending process.  Since my own stupidity is out of scope of this forum, how can I prevent Ubuntu from crashing via thrashing when I use up all of the available memory from a single offending program?  At-home experiment*!  Open a terminal, launch python and if you have numpy installed try this:  &gt;&gt;&gt; import numpy &gt;&gt;&gt; [numpy.zeros((10**4, 10**4)) for _ in xrange(50)]   * Warning: may have adverse effects, monitor the process via iotop or top to kill it in time. If not, I'll see you after your reboot.
Digging in deeper to Javascript Remoting and I'm a bit confused.  The  starts off by showing how to set up everything and uses code like the following:  function getRemoteAccount() {     var accountName = document.getElementById('acctSearch').value;      // This remoting call will use the page's timeout value     Visualforce.remoting.Manager.invokeAction(         '{!$RemoteAction.AccountRemoter.getAccount}',         accountName,          handleResult     ); }   However, I've also seen examples where Visualforce.remoting.Manager.invokeAction is never called.  They end up looking something like the following:  function getText() {   var text = "";   JSRemotingBasicsController.doGetText(     function(result, event) {       // do something here     }   ); }   I'm wondering what is the point to using Visualforce.remoting.Manager.invokeAction when you can just reference the RemoteAction directly like the second example?  Is there something I'm missing?  Is there a time where the second example doesn't work? Fetch the row which has the Max value for a column Add new alias to Gmail without SMTP (forwarding-only address) I used to be able to go to Accounts and Import → Add another email address you own and add an email account that's only a forwarding address. That is, it's not a mailbox and I don't have SMTP access to it.  Gmail would send me a confirmation email to that address, I'd confirm it's mine, and done. Now it only gives me the option to add SMTP credentials.  Did they stop supporting the previous method? Is there any other way I can get that option back? Is the word "management" singular or plural? Possible Duplicate:          Which one of the following is correct?     Management gets its ideas from its employees.   Management gets their ideas from their employees. Objective: To separate text column from figures column in every page I don't know if this has been asked before. But so far nothing has come up with my search.  In some books, the figures are placed at the outer side of the page like in the picture below.    Is this achievable in TeX/LaTeX? That is how does one set up the page so that all text will appear in a 'text column' and the figures appear in a 'figures column' in every page? Simple georeferenced 3D data format for building models Recursively list files with file names, folder names and permission Why could the dwarves only enter Erebor with the secret passage? Please bear with me as I've never read any of the LOTR books or the Hobbit, only seen the movies so far...  But when the sunlight fades and the dwarves think they've lost their only chance to enter Erebor using the secret passage and the key, they turn around to head home. Why is it that the dwarves would be unable to enter Erebor the way they did years ago, using regular doors to get inside? I'm assuming that's how they entered Erebor years ago? Doubly stochastic matrix proof A transition matrix $P$ is said to be doubly stochastic if the sum   over each column equals one, that is $\sum_i P_{ij}=1\space\forall i$.   If such a chain is irreducible and aperiodic and consists of $M+1$   states $0,1,\dots,M$ show that the limiting probabilities are given by   $$\pi_j=\frac{1}{1+M},j=0,1,\dots,M$$   I have no idea how to prove it but   If a chain is irreducible then all states communicate i.e $$P_{ij}&gt;0\space \text{and}\space P_{ji}&gt;0\space\forall i,j$$ If $d$ denotes the period of any state, if a chain is irreducible aperiodic, then $d(i)=1\forall i$   If $P_{(M+1)\times (M+1)}$ matrix and $\pi$ is the stationary distribution  $$\pi_j=\sum_iP_{ij}\pi_i\space j=0,1,\dots,M+1$$  but how I can get this expression? Why would Mystique's DNA allow for Sentinels that can duplicate mutant powers? Repeated error  I have been repeatedly encountering the following error when my laptop freezes. It may occur multiple times during the day, and should take several minutes to recover.  Source Windows  Summary Hardware error  Date ‎11/‎1/‎2018 10:11 AM  Status Not reported  Description A problem with your hardware caused Windows to stop working correctly.  Problem signature Problem Event Name: LiveKernelEvent Code:   144 Parameter 1:    3003 Parameter 2:    ffffad8c0b1a75c8 Parameter 3:    40010002 Parameter 4:    0 OS version: 10_0_17134 Service Pack:   0_0 Product:    256_1 OS Version: 10.0.17134.2.0.0.256.48 Locale ID:  1033   More details  Per my best reflection, the hardware error occurs when I am using the laptop on its docking station. Here is what I observe:   While using the laptop as normal, the "freeze" will occur and I can hardly operate the laptop: mouse cursor won't move continuously and Alt+Tab won't be able to switch across two windows. Shortly after (usually several minutes), things will go back to normal. Upon inspecting through the Performance tab in Task Manager, there had been no spike in anything, be it CPU, Memory or Disk. When I open the View reliability history tool, I will find another entry of Windows Hardware Error   Machine specification:   Thinkpad T480, i7-8650U (newly replaced module thanks to the manufacture)   With the same pair of docking stations, an older unit of T480 has had exactly the same problem.  Docking station: . Same issue has occurred on two identical docks with  slightly different monitors and accessories. OS specification: OS build 17134.376. Most recent collection of "reliability report":    Possible solutions   First, I would like to learn what exactly went wrong, hardware-wise: the manufacturer's support team did not bother too much with the precise error messages, and have ordered me to reinstall the Windows OS up to 5 times in total. [This is what they called "debugging".]   Please advise if you can decipher the recurrent "Hardware error".   Secondly, I will try to push the manufacturer to replace the docking stations, and see if the same "freezing problem' persists. I need to set the default home page for the entire domain via GPO. Where is the IE Home Page Policy located? My employer didn't send me W-2 for December 2015. In fact, he told me that I wasn't on payroll for the two months(Dec/Jan) I worked for them so I am not sure whether he will be able to generate W-2 for me or not. I am wondering should I call IRS and inform them about the same, and probably they will call the employer? Or should I report my December 2015 earnings as Miscellaneous and report to IRS while filing taxes? Or what other options do I have? I am a non resident alien on F-1 Visa. My employer also has not paid me full salary as promised, which I am discussing with him.  Also, I got paid by check in January month for my December payment, so I am wondering does this apply for 2015 tax filing as I got paid in January 2016? The question is to show that for any $x,y \in\Re^n$  $||x+y||\cdot||x-y||\le||x||^2+||y||^2$  with equality if and only if $\langle x,y \rangle= 0.$  I have that $||x+y||^2=||x||^2+2 \langle x,y \rangle+||y||^2$ , which helps me prove equality but I'm lost on how to show this and show that the inequality part. PHP script not executing on Apache server The question of  made me wonder as to whether wizards, any of them, do practice religion. Whether there be magic-person only religions or shared muggle faiths, I do not recall any wizards (born in the wizard world anyway) saying that they did practice a religion.  Many of them do celebrate Christmas, but as was commented on the above linked question, there are many non-christian muggles that also observe Christmas. So I am not sure that can be an accurate identifier. Answering this question may link into identifying . Is Let us = Let's? Many times I heard these words interchangeably. I want to know if "Let's" and "Let us" are used for the same meaning.  I think (for me):   "Let us" is word used for requesting. Like Let us do something means requesting to allow us do something. "Let's" is words used for proposing. Like Let's play means proposing people to play. I have an equation contained inside \[...\], which automatically makes a \sum with sub- and superscripts turn big--so that the summation sign looks awkward inside parenthesis.  Any idea how to make the parenthesis completely enclose the whole summation?  \documentclass{article} \begin{document} We have: \[ \sum_{i=1}^n i = (\sum_{i=1}^{n-1} i) + n = \frac{(n-1)(n)}{2} + n = \frac{n(n+1)}{2} \] \end{document} The Android OS monitors the power consumption of running apps and hardware (display). As you may guess, this is a useful feature as it allows to track down energy greedy apps.  Is there an application that would do such monitoring on Mac OS?  It should calculate the percentages of the charge that an application/process/hardware has used.  I use plenty of little software that runs in the background permanently. It would be nice to know if such little helpers drain the battery significantly. How much money did Charlie Harper have? This is quite tricky to figure out, and I am not looking for a specific number, but for a approximation.  As you know, Charlie (nearly) always had a lot of money to spend, but a few hints suggest that he actually did not have money at all (talking about absolute, not cash flow)   he went bancrupt after a few months without income he told Alan that there is no money, and everything just a house of cards he worries about Bertha giving away a few clothes he has three mortgages on his house when he died, there was no inheritage to Alan or anyone, and they had to sell the house ...   However, considering the lifestyle and spendings, Charlie must have had a substantial amount available.   driving the latest foreign expensive cars owning a malibu beachhouse paying the property tax for said house discussing retirement at 45 spending endless money on booze, betting and women ...   So all things considered, did he have money, or was he just a scam?