This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
if ($argc !== 2) { | |
echo "Usage: ".$argv[0]." 127.0.0.1/8"; | |
exit; | |
} | |
list($ip, $net) = explode('/', $argv[1]); | |
if ($net > 32 || $net < 0) exit; | |
$long = ip2long($ip); | |
$size = $net; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$results = []; | |
for ($i = 0; $i < 100000; $i++) mt_rand(); | |
for ($i = 0; $i < 70000; $i++) { | |
do { | |
$items = [ | |
1 => 1, | |
2 => 2, | |
3 => 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tolle Accelerators (Vulcanisation) 33] | |
[griechische Accordions 131] | |
[tolle Oliven 161] | |
[spanische Absorbent cotton H 222] | |
[griechische Abrasive pads for kitchen 247] | |
[griechische Bananen 374] | |
[griechische Kartoffeln 377] | |
[spanische Bananen 411] | |
[tolle Accelerators (Vulcanisation) 436] | |
[tolle Accumulator boxes 459] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
border: 1px solid black; | |
} | |
input[readonly] { | |
border-right: 0; | |
width: 20px; | |
} | |
input:not([readonly]) { | |
border-left: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
padding-right: 50px; | |
border: 1px solid; | |
width: 500px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example for Stack Overflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Stackoverflow question 21541494 - Coffeescript add button on hover | |
*/ | |
.prf_cvr_edt { | |
opacity: 0; | |
transition: opacity .5s linear; | |
} | |
.prf_cover:hover + .prf_cvr_edt { | |
opacity: 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class KreisTest { | |
@Test | |
public final void testBerechneFlaeche() { | |
assertEquals(Math.PI, (new Kreis(1, 0, 0)).berechneFlaeche(), 5); | |
assertEquals(Math.PI * 4, (new Kreis(2, 0, 0)).berechneFlaeche(), 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app, async, config, e, express, filename, fs, getPackageXml, lastUpdate, logger, packageList, path, readPackages, serverVersion, tar, updateTime, updateTimeout, updateWatcher, updating, watcher, writer, xml; | |
serverVersion = '1.0.0'; | |
express = require('express'); | |
fs = require('fs'); | |
path = require('path'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// wcf imports | |
require_once(WCF_DIR.'lib/data/user/User.class.php'); | |
require_once(WCF_DIR.'lib/data/user/option/UserOptionOutput.class.php'); | |
require_once(WCF_DIR.'lib/data/user/option/UserOptionOutputContactInformation.class.php'); | |
/** | |
* UserOptionOutputDeviantart is an implementation of UserOptionOutput for the output of a user deviantart account. | |
* | |
* @author Sascha Ehrler |