MySQL - How to rapidly insert million of rows?
How to insert a very large number of records into a MySql database as fast as possible
Suppose $X$ and $Y$ are independent positive random variables with probability density functions $f_X$ and $f_Y$ respectively. Show that $Z=X/Y$ is absolutely continuous and find its probability density function.   $\textbf{My Thought:}$ In order to show that $Z$ is absolutely continuous, I need to show that it has a commulative distribution function. Then I can also differentiate the latter to obtain the probability density function of $Z$. I have the following calculation \begin{align*} P(X/Y\leq z)&amp;=P(X\ge zY,Y&lt;0)+P(X\le zY,Y&gt;0)\\ &amp;=\int_{-\infty}^{0}\left(\int_{yz}^{\infty}f_{X}(x)dx\right)f_{Y}(y)dy+\int_{0}^{\infty}\left(\int_{-\infty}^{yz}f_{X}(x)dx\right)f_{Y}(y)dy\\ &amp;=\int_{0}^{\infty}\left(\int_{0}^{yz}f_{X}(x)dx\right)f_{Y}(y)dy. \end{align*} Also, if $z&lt;0$, then we have that $F_Z(z)=0,$ since $X,Y$ are positive random variables. Therefore the random variable $Z$ is continuous, and we can differentiate it to obtain the probability distribution function of $Z$. We have that $f_Z(z)=0$ if $z\leq 0,$ and otherwise we have $$f_Z(z)=\int_{0}^{\infty}yf_{X}(yz)f_Y(y)dy.$$    Is my reasoning above correct?  Any feedback is much appreciated.  Thank you for your time. I would like to be able to write a Java class in one package which can access non-public methods of a class in another package without having to make it a subclass of the other class. Is this possible? Should I use #define, enum or const? In a C++ project I'm working on, I have a flag kind of value which can have four values. Those four flags can be combined. Flags describe the records in database and can be:   new record deleted record modified record existing record   Now, for each record I wish to keep this attribute, so I could use an enum:  enum { xNew, xDeleted, xModified, xExisting }   However, in other places in code, I need to select which records are to be visible to the user, so I'd like to be able to pass that as a single parameter, like:   showRecords(xNew | xDeleted);   So, it seems I have three possible appoaches:  #define X_NEW      0x01 #define X_DELETED  0x02 #define X_MODIFIED 0x04 #define X_EXISTING 0x08   or  typedef enum { xNew = 1, xDeleted, xModified = 4, xExisting = 8 } RecordType;   or   namespace RecordType {     static const uint8 xNew = 1;     static const uint8 xDeleted = 2;     static const uint8 xModified = 4;     static const uint8 xExisting = 8; }   Space requirements are important (byte vs int) but not crucial. With defines I lose type safety, and with enum I lose some space (integers) and probably have to cast when I want to do a bitwise operation. With const I think I also lose type safety since a random uint8 could get in by mistake.  Is there some other cleaner way?  If not, what would you use and why?  P.S. The rest of the code is rather clean modern C++ without #defines, and I have used namespaces and templates in few spaces, so those aren't out of question either. (p.236)  has a proof that the equation $e^z-z=0$ has infinitely many complex solutions:    I'm curious if there are any particularly elegant ways to see this, other than that given in the text. Passive with "to get" How do I compare two string variables in an 'if' statement in Bash? SF Story about human adapting to alien environment This is a story that was read on BBC radio about thirty years ago, and this is about as right as I can remember it: The human pilot of a spacecraft is doing some reconnaissance on an alien planet. He crashes but survives. For some reason, no one will know where to look for him. He sees something in the distance that looks like a building of some sort. When he gets there, it seems to be a home. Very much like a human home. There's furniture, but it's strange and uncomfortable . There's food, but it's inedible. There's a faucet but what comes out of it seems more like acid. Everything looks as though it should be right, but it's not. He leaves the house, wanders and after a few days is desperate for water. But there isn't any water anywhere. He's close to death, crawling on the ground and then something happens. There are cracks in the soil and there appears to be water bubbling up from perhaps some underground stream. The water revives him. He goes back to the house and tries the food again. It's delicious and he eats enough to gain back his strength. Then he decides to try the water again. It's pure and wonderful. He takes a shower and the last line of the story is how refreshing the water is on his skin and something about him lifting his tail. How do I revert a Git repository to a previous commit? Does commutativity imply Associativity? Does commutativity imply associativity? I'm asking this because I was trying to think of structures that are commutative but non-associative but couldn't come up with any. Are there any such examples?  NOTE: I wasn't sure how to tag this so feel free to retag it. How to deal with a Pell's equation type problem with two primes "ERROR: Extra }, or forgotten \right." in align* enviroment Why do I get a "ERROR: Extra }, or forgotten \right." in the following align* environment?  \begin{align*}     \int\left[\left(\der{E_z}{y}-\der{E_y}{z}-\mu\der{\alpha}{t}\right)\alpha&amp;+\left(\der{E_x}{z}-\der{E_x}{x}-\mu\der{\beta}{t}\right)\beta\\     &amp;+\left(\der{E_y}{x}-\der{E_x}{y}-\mu\der{\gamma}{t}\right)\gamma\left.\vphantom{\left(\der{E_y}{x}}\right]d\omega=0.     \end{align*}   thanks How would you prove that the generating function of $\binom{2n}{n}$ is $\frac{1}{\sqrt{1-4x}}$?  More precisely, prove that( for $|x|&lt;\frac{1}{4}$ ):  $$\sum^{\infty}_{n=0}x^n\binom{2n}{n}=\frac{1}{\sqrt{1-4x}}$$  Background: I was trying to solve $$S=\sum^{\infty}_{n=0}\frac{(2n+1)!}{8^n(n!)^2}=\sum^{\infty}_{n=0}\frac{(2n+1)}{8^n}\binom{2n}{n}$$ Which if we let $f(x)$ be the generating function in question, would be simply $$f(x)+2xf'(x)$$ With $x=\frac{1}{8}$. Is there a simple proof of the first identity?  states it without a proper reference ( states it without proof). Is there an easier way of calculating $S$? (which is $\sqrt{8}$, by the way) I have detached a process from my terminal, like this:  $ process &amp;   That terminal is now long closed, but process is still running, and I want to send some commands to that process's stdin. Is that possible? I am in the process of redesigning an interface with a lot of Tabular data that is previously simply used as tables that look like the 19th century. I was a bit confused whether to switch it to a Card View sort of layout and present the data in that way, or to leave it in a Tabular View itself and instead just style around it.  I would like to know what could be the better approach when it comes to User Experience and what seems more at ease to the customer as I want the product to be easier for the customer to use rather than looking complicated to them.  The users of the product would be on the financial sides of the industry so, if needed please keep that into consideration. Nginx Subdirectory returning 404 I currently have a bunch of working static files at the domain name khairulslt.me (from NameCheap). Recently, I've tried setting up a subdirectory (khairulslt.me/RGBGame) as seen in the code below; However, I keep getting 404 errors. What am i missing out?  server {    server_name khairulslt.me www.khairulslt.me;    autoindex off;   location / {     root /var/www/khairulslt.me;     index circles.html;   }   listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/khairulslt.me/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/khairulslt.me/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot  location /RGBGame {     root /var/www/khairulslt.me/RGBGame;     index colorGame.html;     try_files $uri $uri/ /var/www/RGBGame/colorGame.html?q=$uri&amp;$args;     autoindex off;   }  location /robots.txt { return 200 "User-agent: *\nDisallow: /\n";    }  }   server { if ($host = www.khairulslt.me) {     return 301 https://$host$request_uri;   } # managed by Certbot   if ($host = khairulslt.me) {     return 301 https://$host$request_uri;   } # managed by Certbot   listen 80; server_name khairulslt.me www.khairulslt.me; return 404; # managed by Certbot }   I've tried all the different settings like (alias vs root), try_files, autoindex(on, off). My main website www.khairulslt.me works fine and is serving the html/css/js files in /var/www/khairulslt.me perfectly fine. I'm just not sure why I can't replicate the settings for my other app (html/css/js files in folder /RGBGame). Could it be that I've missed out something that isn't related to the nginx config? Ralink RT3290 bluetooth adapter does not work, but wifi works perfectly. What is the cause for the validity of Newton's third law? What, specifically, causes newton's third law?  For instance, if I push on a wall, why is it that I experience a force in the opposite direction?    I seem to vaguely understand that is has something to do with electronic repulsion or molecular compression (maybe that's completely wrong, I don't know).  As a related question, what would happen if two objects that were /infinitely/ immovable (at the molecular level, it cannot be broken or compressed) collided with each-other? Analysing Bounce Rate and Time on Page When to use "cannot" versus "can't"? When is it best to write "can't" versus writing "cannot"? Are they interchangeable in every situation? Proving $ \binom n 0 ^2 + \binom n 1 ^2 + \dots + \binom n n ^2 = \binom { 2n} n $ without induction I have to prove that: $$ \binom n 0 ^2  + \binom n 1 ^2  + \dots + \binom n n ^2 = \binom { 2n} n $$  I don't want a complete solution, but only a hint.