I know getting a user's registration date should be pretty basic using php, but I was wondering if this was possible directly through mySQL.  I use apache's phpmyadmin and when creating a new column I noticed the type DATE and the default value CURRENT_TIMESTAMP, so I was wondering if it would be possible to add a type of column that automatically set the current date when a new line is created (so when a new user is registered) ?  If this possible and is there any constraints to this ? How can I do this ?  Thanks !
How do you set a default value for a MySQL Datetime column?  In SQL Server it's getdate(). What is the equivalant for MySQL? I'm using MySQL 5.x if that is a factor.
What is a *.pkinfo file?   Google Search results talk about Package Info files and how they contain map documents and layers, so I don't see how this is different from a .mpk file.    I also have not found anything about how to create a *.pkinfo file. I use Thunderbird to backup my web-based email account: I open Thunderbird and copy the mail messages from the Inbox to a local folder.   Is there a way to do this automatically every day, so that I don't have to open Thunderbird all the time?  EDIT:  is very useful for GMail accounts. For non-GMail account, the getmail method should probably be used. Why is gradient the direction of steepest ascent? How do I restore the Unity 7 Ctrl-Alt-Numpad combination behaviour on Gnome 3? By default, instead of doing something useful, the Ctrl-Alt-Numpad key combination in Gnome 3 shoves a window in the specified direction across the entire workspace. These shortcuts do not show in the Gnome 3 keyboard settings panel; they're just there, and they're in the way.  How can I get this behavior back in Ubuntu 17.10? Using a Single system() Call to Execute Multiple Commands in C In an information security lab I'm working on, I've been tasked with executing multiple commands with a single call to "system()" (written in C, running on Fedora).  What is the syntax that will allow me to execute more than command through system()?  (The idea being you could execute arbitrary commands through a program running on a remote computer, if the program interacts with the OS through the system() call.)  I.e.:  char command[] = "????? \r\n";  system(command); With Bash's source it is possible to execute a script without an execution bit set. This is documented and expected behaviour, but isn't this against the use of an execution bit?  I know, that source doesn't create a subshell. How to password protect grub menu entry? Is there a way I can password protect grub menu entry- e.g. if I dual boot with Windows 7 can I set it so that a password is needed to boot into Win 7?   Secondly I would also like to protect grub menu entries being changed if possible.  thanks Maximum Likelihood Estimator for $\theta$ when $X_1,\dots, X_n \sim U(-\theta,\theta)$ Exercise :     Calculate a Maximum Likelihood Estimator for the model $X_1,\dots, X_n \; \sim U(-\theta,\theta)$.   Solution :  The distribution function $f(x)$ for the given Uniform model is :  $$f(x) = \begin{cases} 1/2\theta, \; \; -\theta \leq x \leq \theta \\ 0 \quad \; \; , \quad\text{elsewhere} \end{cases}$$  Thus, we can calculate the likelihood function as :  $$L(\theta)=\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n\mathbb I_{[-\theta,\theta]}(x_i)= \bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[0,\theta]}(|x_i|) $$  $$=$$  $$\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[-\infty,\theta]}(|x_i|)\prod_{i=1}^n \mathbb I_{[0, +\infty]}(|x_i|)$$  $$=$$  $$\boxed{\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[-\infty,\theta]}(\max|x_i|)}$$  Question : How does one derive the final expression in the box from the previous one ? I can't seem to comprehend how this is equal to the step before.  Other than that, to find the maximum likelihood estimator you need a $\theta$ sufficiently small but also $\max |x_i| \leq \theta$ which means that the MLE is : $\hat{\theta} = \max |x_i|$. "In the case of medical diagnostics, there is a cost associated with each medical procedure that provides additional information (blood test, x-ray, etc.)."   Should that end with "etc.).", "etc)." or "etc.)"? Hot questions no longer work on iPad (ok on iPhone) When to use an interface instead of an abstract class and vice versa? How do I tell what version and edition of Windows is on the filesystem? Pipelined Sed does not work on found filename inside Bash command substitution when invoked from Find "-exec" It looks like 'find', 'bash' and 'sed' in some cases does not work as one expects.  The following example should first create file 'sample.txt', then find the file and finally process it by '-exec' command. The executed command prints found filename, test specimens, and modified filename. The 'sed' command itself is used to replace 'txt' to 'TXT'.  touch sample.txt find ./ -maxdepth 1 -name "*.txt" -exec echo {} $(echo Specimen_before.txt {} Specimen_after.txt |sed -e "s/txt/TXT/g") \;   The expected output is:     ./sample.txt Specimen_before.TXT ./sample.TXT Specimen_after.TXT   Instead it produces:     ./sample.txt Specimen_before.TXT ./sample.txt Specimen_after.TXT   (the example has been tested also with old-school command substitution through backquotes '`' with the same result)  What am I doing wrong? Prove that $f'(0)$ exists and $f'(0) = b/(a - 1)$ Problem:   If $f(x)$ is continous at $x=0$, and $\lim\limits_{x\to 0} \dfrac{f(ax)-f(x)}{x}=b$, $a, b$ are constants and $|a|&gt;1$, prove that $f'(0)$ exists and $f'(0)=\dfrac{b}{a-1}$.   This approach is definitely wrong:    \begin{align} b&amp;=\lim_{x\to 0} \frac{f(ax)-f(x)}{x}\\ &amp;=\lim_{x\to 0} \frac{f(ax)-f(0)-(f(x)-f(0))}{x}\\ &amp;=af'(0)-f'(0)\\ &amp;=(a-1)f'(0) \end{align}  I will show you a case why this approach is wrong:     \[f(x)= \begin{cases} 1,&amp;x\neq0\\ 0,&amp;x=0 \end{cases}\]   $\lim_{x\to0}\dfrac{f(3x)-f(x)}{x}=\lim_{x\to0} \dfrac{1-1}{x}=0$   but $\lim_{x\to0}\dfrac{f(3x)}{x}=\infty$,$\lim_{x\to0}\dfrac{f(x)}{x}=\infty$   Does anyone know how to prove it? Thanks in advance! Decrease available inventory item on Cognito Form, removing it when zero I want to limit inventory quantities on a sales form, so that it can start at say 100 and count backwards as applicants submit orders and then shut down that particular option when it reaches 0.    Is this possible with Cognito? Order a MySQL table by two columns How do I sort a MySQL table by two columns? What I want are articles sorted by highest ratings first, then most recent date.  As an example, this would be a sample output (left # is the rating, then the article title, then the article date)  +================+=============================+==============+ | article_rating | article                     | article_time | +================+=============================+==============+ | 50             | This article rocks          | Feb 4, 2009  | +----------------+-----------------------------+--------------+ | 35             | This article is pretty good | Feb 1, 2009  | +----------------+-----------------------------+--------------+ | 5              | This Article isn't so hot   | Jan 25, 2009 | +================+=============================+==============+  The relevant SQL I'm using is: ORDER BY article_rating, article_time DESC  I can sort by one or the other, but not both. Evaluating $\int_0^{\large\frac{\pi}{4}} \log\left( \cos x\right) \, \mathrm{d}x $ I noticed that my American friends tend to use the past perfect form when they use the verb mention in its past form, almost despite of the context of the sentence. I hear them say  "you had mentioned" a lot more often even in situations where the use of simple past would have been perfectly fine. Have you noticed it too and is it one of those unwritten rules, or is there a more formal explanation to it?  It seems like there was more verbs like that, but I am having a hard time remembering it now. If I do, I will edit the post and likely change the title to accommodate other verbs. QR Codes generation from MySQL rows We know for a metallic conductor   Current $\frac{I}{enA} = v$ where $v$ is drift velocity , $e$ is the charge of an electron, $n$ is no of electrons per unit volume and $A$ is area of cross section.  Ok my questions that I am struggling with:   Does it depend on length of wire? (let's say if the current is the same and area is also the same but one wire is longer and one wire is shorter then is the drift velocity for both wires the same?) Does it depend on the cross sectional area of the wire? (Yes, according to the relation, if the area is greater, drift velocity is lower, correct?)   I have digged university physics still I couldn't get my answer :( .