I hereby claim:
- I am bachloxo on github.
- I am bachloxo (https://keybase.io/bachloxo) on keybase.
- I have a public key ASAK5qLSzlZTqfsK84beXZe-mqed4A__ZgIL9eSLyNdYmgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* Resize image - preserve ratio of width and height. | |
* @param string $sourceImage path to source JPEG image | |
* @param string $targetImage path to final JPEG image file | |
* @param int $maxWidth maximum width of final image (value 0 - width is optional) | |
* @param int $maxHeight maximum height of final image (value 0 - height is optional) | |
* @param int $quality quality of final image (0-100) | |
* @return bool | |
*/ | |
function resizeImage($sourceImage, $targetImage, $maxWidth, $maxHeight, $quality = 80) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Plyr sample</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="icon" href="https://cdn.plyr.io/static/icons/favicon.ico" /> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/plyr/3.3.6/plyr.css" /> | |
</head> | |
<body> |
Ourcase:
Origin:
This will guide you through setting up a replica set in a docker environment using.
<?php | |
if (isset($_POST['Submit'])) { | |
if ($_POST['name'] != "") { | |
$_POST['name'] = filter_var($_POST['name'], FILTER_SANITIZE_STRING); | |
if ($_POST['name'] == "") { | |
$errors .= 'Please enter a valid name.<br/><br/>'; | |
} | |
} else { |
In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc
Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server
Use this link and get $10 free. Just select the $5 plan unless this a production app.
This page is designed to give you a list of concrete examples demonstrating idiomatic (Pythonic) code.
Many of the examples were taken from the following resources:
This document gives coding conventions example for the Python code. This style guide evolves over time as additional conventions are identified and past conventions are rendered obsolete by changes in the language itself.
Python docstrings can be written following several formats as the other posts showed. However the default Sphinx docstring format was not mentioned and is based on reStructuredText (reST). You can get some information about the main formats in that tuto.
Note that the reST is recommended by the PEP 287
There follows the main used formats for docstrings.
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).