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 | |
class Parenthesis extends TerminalExpression { | |
protected $precidence = 6; | |
public function operate(Stack $stack) { | |
} | |
public function getPrecidence() { | |
return $this->precidence; |
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
/* fix_fft.c - Fixed-point in-place Fast Fourier Transform */ | |
/* | |
All data are fixed-point short integers, in which -32768 | |
to +32768 represent -1.0 to +1.0 respectively. Integer | |
arithmetic is used for speed, instead of the more natural | |
floating-point. | |
For the forward FFT (time -> freq), fixed scaling is | |
performed to prevent arithmetic overflow, and to map a 0dB | |
sine/cosine wave (i.e. amplitude = 32767) to two -6dB freq |
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 | |
class Foo | |
{ | |
const TEST = 'foo'; | |
public static function getConst() | |
{ | |
return static::TEST; | |
} |
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 | |
class ReconnectingPDO | |
{ | |
protected $dsn, $username, $password, $pdo, $driver_options; | |
public function __construct($dsn, $username = "", $password = "", $driver_options = array()) | |
{ | |
$this->dsn = $dsn; | |
$this->username = $username; | |
$this->password = $password; |
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 | |
/** | |
* Session Helper Class | |
* | |
* A simple session wrapper class. | |
* | |
* Recommended for use with PHP 5.4.0 or higher. (Not required.) | |
* | |
* Usage Example: |
This file has been truncated, but you can view the full file.
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
{ | |
"0x0033": { | |
"0x002F": { | |
"Vendor Name": "Paradyne Corp.", | |
"Device Name": "ieee 1394 controller" | |
}, | |
"0x00333": { | |
"Vendor Name": "Paradyne Corp.", | |
"Device Name": "1ACPI\\GenuineIntel_-_x86_Family_6_Model_23\\_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
<?php | |
/** | |
* GitHub webhook handler template. | |
* | |
* @see https://docs.github.com/webhooks/ | |
* @author Miloslav Hůla (https://github.com/milo) | |
*/ | |
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check |
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 | |
use Swagger\Annotations as SWG; | |
/** | |
* @SWG\Swagger( | |
* basePath="/v1", | |
* host="api.local", | |
* schemes={"http"}, | |
* produces={"application/json"}, |
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
#Install dependencies | |
sudo apt-get install build-essential git libfftw3-dev cmake libusb-1.0-0-dev | |
#Fetch and build rtl-sdr, skip if already done (subdirectories will be created under the current directory). | |
git clone git://git.osmocom.org/rtl-sdr.git | |
cd rtl-sdr/ | |
mkdir build | |
cd build | |
cmake ../ -DINSTALL_UDEV_RULES=ON | |
make |
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
#!/bin/sh | |
if [ -z $1 ] | |
then | |
echo "Usage: $0 { p | l | a }. p - portrait, l - landscape, a - auto" | |
elif [[ $1 == a* ]] | |
then | |
echo "Turning on automatic rotation" | |
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:1 | |
else |
OlderNewer