Author: Jay Taylor
Date: 2019-07-08
Purpose: Created as a C++ reference for SO: How do I create a URL shortener?.
Author: Jay Taylor
Date: 2019-07-08
Purpose: Created as a C++ reference for SO: How do I create a URL shortener?.
#!/usr/bin/env ruby | |
def pi_estimation(r=5) | |
inside =0.0 | |
outside = 0.0 | |
total = 0.0 | |
rnd = Random.new | |
for i in 1 ... 10000 | |
x = rnd.rand(-1*inside..inside) |
This is a simple way of importing MySQL database in Docker.
In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.
Put the exported sql file in the shared folder.
Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash
.
Login to MySQL via mysql -u USERNAME -p
.
<!-- All In One SEO Pack 2017 v2.0 by langages-programmation.blogspot.com Start --> | |
<b:if cond='data:blog.pageType == "index"'> | |
<title><data:blog.pageTitle/></title> | |
<b:else/> | |
<title><data:blog.pageName/> - <data:blog.title/></title> | |
</b:if> | |
<b:if cond='data:blog.metaDescription != ""'> | |
<meta expr:content='data:blog.metaDescription' name='description'/> | |
</b:if> | |
<b:if cond='data:blog.pageType == "archive"'> |
<!-- All In One SEO Pack for Blogspot By: http://besuccessblogger.com Starts Here --> | |
<b:if cond='data:blog.pageType == "index"'> | |
<title><data:blog.pageTitle/></title> | |
<b:else/> | |
<title><data:blog.pageName/> - <data:blog.title/></title> | |
</b:if> | |
<b:if cond='data:blog.metaDescription != ""'> | |
<meta expr:content='data:blog.metaDescription' name='description'/> | |
</b:if> | |
<b:if cond='data:blog.pageType == "archive"'> |
<form method="post"> | |
{% csrf_token %} | |
{{ form }} | |
<button type="submit">Save changes</button> | |
</form> |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
<!-- This is the HTML element that, when clicked, will cause the popup to appear. --> | |
<button id="open-popup">Subscribe to our mailing list</button> |