what | how |
---|---|
Search | ([\s\r\n])array\(([\s\r\n]*[^()\s](?:[^()]*[^()\s])?[\s\r\n]*)\) |
Replace | $1[$2] |
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 declare(strict_types=1); | |
abstract class PluginName | |
{ | |
public function __construct() | |
{ | |
$this->bootstrap(); | |
} | |
private function bootstrap() |
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 declare(strict_types=1); | |
define('NO_SESSION', true); | |
define('NO_AUTH', true); | |
require "../inc/config.inc.php"; | |
function show_routine(string $type, string $name) { | |
global $db; | |
$query = "SHOW CREATE $type `$name`"; | |
$result = $db->query( $query ); | |
foreach( $result as $row ) { |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\git-clone] | |
@="Clone here" | |
[HKEY_CLASSES_ROOT\Directory\shell\git-clone\command] | |
@="Powershell -NoProfile -Command \"Set-Location -LiteralPath '%V' ; git clone $(Get-Clipboard)\"" | |
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
CREATE FUNCTION `BIN_TO_UUID`(b binary(16)) | |
RETURNS char(36) CHARSET ascii | |
BEGIN | |
DECLARE hexStr CHAR(32); | |
SET hexStr = HEX(b); | |
RETURN LOWER(CONCAT( | |
SUBSTR(hexStr, 25, 12), '-', | |
SUBSTR(hexStr, 21, 4), '-', | |
SUBSTR(hexStr, 13, 4), '-', | |
SUBSTR(hexStr, 17, 4), '-', |
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
CREATE FUNCTION `UUID_TO_BIN`(uuid char(36)) | |
RETURNS binary(16) | |
BEGIN | |
RETURN UNHEX( CONCAT( | |
SUBSTRING(uuid, 25, 12), | |
SUBSTRING(uuid, 20, 4), | |
SUBSTRING(uuid, 15, 4), | |
SUBSTRING(uuid, 10, 4), | |
SUBSTRING(uuid, 1, 8) | |
)); |
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
| method | response code | reason | | |
| - | - | - | | |
| * | 500 | internal error, the request is not processd, the response paylood might include more detail | | |
| * | 502 | request validated but upstream service were not available. Request was not fullfilled| | |
| * | 405 | request not validated or allowed | | |
| * | 403 | the request validated but was not allwowed, reason in payload | | |
| HEAD | 200 | success | | |
| POST | 201 | rsourcce created,payload contains the id and a identifying url | | |
| POST | 303 | resource is availabel unique url| |
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 | |
if( !defined( 'ROOT' ) ) { | |
define( 'ROOT', $_SERVER[ 'DOCUMENT_ROOT'] . '/' ); | |
} | |
if(!defined( 'SETTINGS_FILE' ) ) { | |
define('SETTINGS_FILE', ROOT . 'settings.ini' ); | |
} | |
if( !defined( 'SETTINGS') ) { |
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
class Notifier | |
{ | |
construct( title ) { | |
this.title = title; | |
}; | |
askNotificationPermission() { | |
function handlePermission(permission) { | |
if (!('permission' in Notification)) { | |
Notification.permission = permission; | |
} |
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
Storage of `DECIMAL(_m_,_d_)` can be calculated with this function: | |
```sql | |
DELIMITER $$ | |
CREATE FUNCTION `fn_DECIMAL_SIZE`(`M` INT, `D` INT) RETURNS int(11) | |
DETERMINISTIC | |
BEGIN | |
set @m = m; | |
set @d = d; |
NewerOlder