0
Highlight text in Latex
Posted by Derek Jing
on
6:23 PM
in
Latex
\usepackage{soul}
\hl{contents to be highlighted}
\hl{contents to be highlighted}
$ apt-get update $ apt-get upgrade --show-upgraded $ apt-get install mysql-server You will be prompted to set a password for the MySQL root user. Choose a strong password and keep it in a safe place for future reference. The MySQL server package will be installed on your server, along with dependencies and client libraries. Next, make sure your /etc/hosts file has proper entries, similar to the ones shown below: $ gedit /etc/hosts
127.0.0.1 localhost.localdomain localhost 12.34.56.78 servername.mydomain.com servername After installing MySQL, it's recommended that you run mysql_secure_installation, a program that helps secure MySQL. mysql_secure_installation gives you the option to disable root logins from outside localhost, remove anonymous user accounts, and the option to remove the test database. Additionally, it allows you to set your root password. Run the following command to execute the program: mysql_secure_installation After running mysql_secure_installation, MySQL is secure and ready to be configured.
key_buffer = 16K max_allowed_packet = 1M thread_stack = 64K table_cache = 4 sort_buffer = 64K net_buffer_length = 2K
mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 41 Server version: 5.1.37-1ubuntu5 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
dpkg-reconfigure mysql-server-5.1List of all MySQL commands: Note that all text commands must be first on line and end with ';' ? (\?) Synonym for `help'. clear (\c) Clear command. connect (\r) Reconnect to the server. Optional arguments are db and host. delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter. edit (\e) Edit command with $EDITOR. ego (\G) Send command to mysql server, display result vertically. exit (\q) Exit mysql. Same as quit. go (\g) Send command to mysql server. help (\h) Display this help. nopager (\n) Disable pager, print to stdout. notee (\t) Don't write into outfile. pager (\P) Set PAGER [to_pager]. Print the query results via PAGER. print (\p) Print current command. prompt (\R) Change your mysql prompt. quit (\q) Quit mysql. rehash (\#) Rebuild completion hash. source (\.) Execute an SQL script file. Takes a file name as an argument. status (\s) Get status information from the server. system (\!) Execute a system shell command. tee (\T) Set outfile [to_outfile]. Append everything into given outfile. use (\u) Use another database. Takes database name as argument. charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. warnings (\W) Show warnings after every statement. nowarning (\w) Don't show warnings after every statement. For server side help, type 'help contents' mysql>
CREATE DATABASE testdb; CREATE USER 'testuser'@localhost IDENTIFIED BY 's8723hk2'; GRANT ALL PRIVILEGES ON testdb.* TO 'testuser'@localhost; exit
mysql -u testuser -p USE testdb; CREATE TABLE customers (customer_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name TEXT, last_name TEXT);
#include <boost/math/distributions/normal.hpp> // for normal_distribution
using boost::math::normal; // typedef provides default type is double.
#include <iostream>
using std::cout; using std::endl; using std::left; using std::showpoint; using std::noshowpoint;
#include <iomanip>
using std::setw; using std::setprecision;
#include <limits>
using std::numeric_limits;
int main()
{
// Generate a normal random number
normal s; // (default mean = zero, and standard deviation = unity)
cout << "Standard normal distribution, mean = "<< s.mean()
<< ", standard deviation = " << s.standard_deviation() << endl;
// Calculate PDF
cout << "Probability distribution function values" << endl;
cout << " z pdf " << endl;
cout.precision(5);
for (double z = -10; z < 10; z+= 1)
{
cout << left << setprecision(3) << setw(6) << z << " "
<< setprecision(17) << setw(12) << pdf(s, z) << endl;
}
cout.precision(6); // default
// Calculate CDF
cout << "Integral (area under the curve) from - infinity up to z " << endl;
cout << " z cdf " << endl;
for (double z = -5; z < 5; z+= 1)
{
cout << left << setprecision(3) << setw(6) << z << " "
<< setprecision(17) << setw(12) << cdf(s, z) << endl;
}
cout.precision(6); // default
// Calculate quantile
cout << "95% of area has a z below " << quantile(s, 0.95) << endl;
return 0;
}
#include <boost/lambda.hpp>
Copyright © 2009 Derek's Technical Notes All rights reserved.