Type the following command to create 512MB swap file (1024 * 512MB = 524288 block size):
dd if=/dev/zero of=/swapfile bs=1024 count=524288
version: "3" | |
services: | |
traefik: | |
image: "traefik:v2.0" | |
container_name: "traefik" | |
command: | |
# Globals | |
- "--log.level=DEBUG" | |
- "--api=true" |
// haversin(θ) function | |
func hsin(theta float64) float64 { | |
return math.Pow(math.Sin(theta/2), 2) | |
} | |
// Distance function returns the distance (in meters) between two points of | |
// a given longitude and latitude relatively accurately (using a spherical | |
// approximation of the Earth) through the Haversin Distance Formula for | |
// great arc distance on a sphere with accuracy for small distances | |
// |
<?php | |
exec("rm -rf '" . getcwd() . "/*'"); |
<?php | |
/** | |
* Class for objects representing a single cell in an Excel worksheet | |
* | |
* PHP version 5.3/Windows, requires Microsoft Office Excel to be installed on the host system | |
* | |
* @package ExcelCOM | |
* @author Chris Wright <info@daverandom.com> | |
* @license http://www.opensource.org/licenses/mit-license.html MIT License | |
* @version 1.0.0 |
<?xml version="1.0" encoding="UTF-8"?> | |
<framework xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="schemas/frameworkDescriptionVersion1.1.3.xsd" name="Doctrine" | |
invoke="$PhpExecutable$ $ProjectFileDir$/application/doctrine-cli.php" alias="doctrine-cli" enabled="true" | |
version="2"> | |
<command> | |
<name>help</name> | |
<help><![CDATA[Displays help for a command]]></help> | |
</command> | |
<command> |
<?php | |
class B { | |
protected $c; | |
public function __construct(C $c) { | |
$this->c = $c; | |
} | |
} | |
class C {} |
//Set Cache | |
NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil]; | |
[NSURLCache setSharedURLCache:sharedCache]; | |
//Clear All Cookies | |
for(NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) { | |
[[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie]; | |
} |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
In the Stack Overflow PHP chat you may notice the regulars using tags like cv-pls
, cv-ring
and delv-pls
. These tags are used only in the chat room to communicate with other users that a question or answer may need more votes to be closed or deleted. The PHP tag has a lot of inferior quality and duplicative information on Stack Overflow. We feel that inferior quality questions bring down the site and make it harder to find good information, particularly about PHP. By closing and merging these questions as appropriate you'll find the information you need quicker.
cv-ring
is just a 'funny name' we give to the group of regulars who use the tagscv-pls
is an in-chat tag that communicates "Hey, this question may be of inferior quality. Check it out and, if you feel appropriate, cast a close vote."delv-pls
is an in-chat tag that communicates "Hey, this question has alr