Allow but Discourage swap on Ubuntu
How do I configure swappiness?
Sampling with replacement or without replacement I'm writing a program in R that simulates bank losses on car loans.  Here is the questions I'm trying to solve:  You run a bank that has a history of identifying potential homeowners that can be trusted to make payments. In fact, historically, in a given year, only 2% of your customers default. You want to use stochastic models to get an idea of what interest rates you should charge to guarantee a profit this upcoming year.  A. Your bank gives out 1,000 loans this year. Create a sampling model and use the function sample() to simulate the number of foreclosure in a year with the information that 2% of customers default. Also suppose your bank loses $120,000 on each foreclosure. Run the simulation for one year and report your loss.  B. Note that the loss you will incur is a random variable. Use Monte Carlo simulation to estimate the distribution of this random variable. Use summaries and visualization to describe your potential losses to your board of trustees.   C. The 1,000 loans you gave out were for 180,000. The way your bank can give out loans and not lose money is by charging an interest rate. If you charge an interest rate of, say, 2% you would earn 3,600 for each loan that doesn't foreclose. At what percentage should you set the interest rate so that your expected profit totals 100,000. Hint: Create a sampling model with expected value 100 so that when multiplied by the 1,000 loans you get an expectation of 100,000. Corroborate your answer with a Monte Carlo simulation.  I'm confused about how to set up this simulation up from a high level point of view and have the following questions: 1. For part A, Should I create a pool of 1000 customers or should I create a larger pool of customers? 2. For part A, when sampling, do I sample with or without replacement? 3. For part B, I'm confused about how to set up the monte carlo simulation.  Am I varying the size of the customer pool? 4. For part C, I'm not sure how to set up a sampling model that involves the interest rate.  Any advice or guidance would be appreciated.  I'm also thinking that if I fully understood the high level concepts for parts A and B, part C might not be such a mystery. Is a bivariate function that is a polynomial function with respect to each variable necessarily a bivariate polynomial? $E[e_te_s\Delta B_t\Delta B_s]$ for $\Delta B_t$ Brownian motion increments and $e_t(\omega)$ a measurable function. I read recently that if you hold a bullet in one hand and a pistol in the other, both hands at the same height, and subsequently fired the pistol at the same time as dropping the bullet, both bullets would hit the ground at the same time (assuming the fired bullet encounters no obstacles).  Is this true, and if so can you explain the reasoning behind it with as few equations as possible? I assume it is essentially that gravity is unaffected by momentum, but it just sounds counter-intuitive. Show the post's comments on the "Suggested Edits" review interface $\hbar \rightarrow 0$ in quantum mechanics We often see a limit $\hbar \rightarrow 0$ in quantum mechanics and sometimes it's related with symmetry breaking. Can someone briefly write the story behind this limit? Which mathematical operation does the right hand rule for current come from? I am currently wondering about the famous .  Where does it come from mathematically that when you point with your thumb in the direction of the current, your curved fingers will point in the direction of the $B$-field? In other words, which mathematical operation does it come from? Probably it has to do with some vector product or Stokes theorem application, but I am not quite sure about it. Will database replication increase the size of the replicated database? First thank you for your time. We have a SQL Server database that was assigned to be replicated. the original size of the database was 5 GB for the datafile, not the log file. Now after the replication the data file is 4 times bigger around 19 GB. Any pointers to see what could happened will be appreciated. I know sql as developer and some little management but nothing about replication. The performance of the database has been damaged very bad so I am trying to see what need to be done to improve it. I do apologize for my English as well. Does a differentiable everywhere function have a continuous derivative? If a function $f$ defined on $[a,b]$ and differentiable everywhere, does it mean that its derivative $f'(x)$ is continuous everywhere on $[a,b]$?  My understanding is 'yes'. Because if there were 'a gap' in $f'(x)$, we could integrate back to $f(x)$ and show that where the gap is, there would be a sharp "angle" where $f(x)$ is not differentiable. How to add custom Modules in magento I'm trying to install texlive.  I proceeded in the recommended way, as per   After hours since initiating the download with install-tl as per instructions in . Hours after intiating the install-tl command, the installation aborted with the following error message:  Installing [2507/3271, time/total: 03:01:18/03:46:09]: rec-thy [221k] TLUtils::check_file: removing /tmp/bgLBEx3xxA/o1ankpQviV/rec-thy.tar.xz, sizes differ: TLUtils::check_file:   TL=0, arg=7428 TLPDB::_install_package: downloading did not succeed Installation failed. Rerunning the installer will try to restart the installation. Or you can restart by running the installer with:   install-tl --profile installation.profile [EXTRA-ARGS] install-tl: Writing log in current directory: /usr/local/src/install-tl-20160728/install-tl.log   I have no idea how to implement the crypic instruction  install-tl --profile installation.profile [EXTRA-ARGS]   because I can't find any information as what the EXTRA-ARGS should be, and google provided no help.    So I started again with   install-tl   hoping it would be smart enough not to start from scratch, but it wasn't, and did start from scratch, meaning another 3 hours.     This time it crashed after a few minutes, with   Installing [0051/3271, time/total: 04:08/04:30:47]: ae [84k] TLUtils::check_file: removing /tmp/ZLEUeUk8LV/ps7iOTjRWq/ae.tar.xz, sizes differ: TLUtils::check_file:   TL=43160, arg=57364 TLPDB::_install_package: downloading did not succeed Installation failed. Rerunning the installer will try to restart the installation. Or you can restart by running the installer with:   install-tl --profile installation.profile [EXTRA-ARGS] install-tl: Writing log in current directory: /usr/local/src/install-tl-20160728/install-tl.log   Why would the installation crash at different places?  Could somebody please interpret these crashes and how to prevent them?   If the installation crashes again, is there a way of picking up where I left off?   (presumably using the mysterious EXTRA-ARGS?).  If all else fails, is there another way of getting a less complete latex installation that will actually work?    Thanks very much for any advice? Leaflet Customer Marker Changes Position with Scale What happens if 2 separate abilities require you to sacrifice a creature? How was Loki not crushed by Mjolnir? In the Thor movie, Thor puts Mjolnir  on top of Loki at the end of the movie to stop him from moving.  Why did this not crush Loki?  And if it did not crush him, why could he not just roll out from under it? How do I Deserialize this XML document:  &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Cars&gt;   &lt;Car&gt;     &lt;StockNumber&gt;1020&lt;/StockNumber&gt;     &lt;Make&gt;Nissan&lt;/Make&gt;     &lt;Model&gt;Sentra&lt;/Model&gt;   &lt;/Car&gt;   &lt;Car&gt;     &lt;StockNumber&gt;1010&lt;/StockNumber&gt;     &lt;Make&gt;Toyota&lt;/Make&gt;     &lt;Model&gt;Corolla&lt;/Model&gt;   &lt;/Car&gt;   &lt;Car&gt;     &lt;StockNumber&gt;1111&lt;/StockNumber&gt;     &lt;Make&gt;Honda&lt;/Make&gt;     &lt;Model&gt;Accord&lt;/Model&gt;   &lt;/Car&gt; &lt;/Cars&gt;   I have this:  [Serializable()] public class Car {     [System.Xml.Serialization.XmlElementAttribute("StockNumber")]     public string StockNumber{ get; set; }      [System.Xml.Serialization.XmlElementAttribute("Make")]     public string Make{ get; set; }      [System.Xml.Serialization.XmlElementAttribute("Model")]     public string Model{ get; set; } }   .  [System.Xml.Serialization.XmlRootAttribute("Cars", Namespace = "", IsNullable = false)] public class Cars {     [XmlArrayItem(typeof(Car))]     public Car[] Car { get; set; }  }   .  public class CarSerializer {     public Cars Deserialize()     {         Cars[] cars = null;         string path = HttpContext.Current.ApplicationInstance.Server.MapPath("~/App_Data/") + "cars.xml";          XmlSerializer serializer = new XmlSerializer(typeof(Cars[]));          StreamReader reader = new StreamReader(path);         reader.ReadToEnd();         cars = (Cars[])serializer.Deserialize(reader);         reader.Close();          return cars;     } }   that don't seem to work :-( How to write a LaTeX package that bundles not only .sty and .cls files but also some logos in .pdf or .eps formats? I would like to make a LaTeX package with the following subdirs:   tex/latex/common (a common .tex file shared among beamer and letter) tex/latex/resources (lots of pdf and eps files with graphical resources) tex/latex/mybeamer (a custom beamer theme with 5 .sty files) tex/latex/myletter (a .cls file for a letter template)   I would like to package these files into a single LaTeX package that users could install in an easy way. I read about the .ins and .dtx files and I can see how to pack the .sty and .cls files but what about the extra graphics - the resources folder which contains several PDF and .eps files? When I login to my ubuntu system, it show me this this message, How can I see it any time? I tried to run . .bashrc but it didn't worked.   Welcome to Ubuntu 12.10 LTS (GNU/Linux 3.2.0-24-virtual x86_64)   * Documentation:  https://help.ubuntu.com/    System information as of Sat Jul 13 06:16:35 UTC 2013    System load:  0.55              Processes:           96   Usage of /:   8.1% of 68.74GB   Users logged in:     0   Memory usage: 55%               IP address for eth0: 198.xx.xxx.xxx   Swap usage:   0%                IP address for eth1: xxx.1x0.xx.xxx    =&gt; There is 1 zombie process.    Graph this data and manage this system at https://landscape.canonical.com/  223 packages can be updated. 134 updates are security updates.  Last login: Mon Jul  8 17:47:05 2013 Attribution alignment and order should be consistent with the website I can't boot into a usable system after updates. What should I do? Since some system updates, my machine can no longer boot properly. I am no Ubuntu guru. I do not have a week to spare diagnosing the issue. I just want to retrieve important data from this machine's hard drive and get a working computer again ASAP.  What should I do? On one of my machines I have a process running called "whoopsie". I'm running 12.04 server and never specifically installed anything with this name.  Google seems to imply that it has something to with error logs but I'm not finding too much information. The fact that I didn't manually install it and the 3 other servers I checked did in fact have no such running process OR executable made me a bit confused.  Does anyone know what the "whoopsie" process is?  Does anyone know what packages might have installed it? The server is quite plain, it has a LAMP stack, Samba and print servers and the Nagios NRPE plugin, nothing more installed, just standing there being a nice backup-server.  Some more info:  $ whoopsie -h Usage:   whoopsie [OPTION...]  Help Options:   -h, --help           Show help options  Application Options:   -f, --foreground     Run in the foreground   and  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND   whoopsie   913  0.0  0.4  24448  2092 ?        Ssl  May07   0:00 whoopsie   and  $ sudo cat /etc/passwd | grep whoop whoopsie:x:107:118::/nonexistent:/bin/false