Deriving a new Array from an existing Array:
['■','●','▲'].slice(1, 3) ⟼ ['●','▲']
['■','●','■'].filter(x => x==='■') ⟼ ['■','■']
['▲','●'].map(x => x+x) ⟼ ['▲▲','●●']
['▲','●'].flatMap(x => [x,x]) ⟼ ['▲','▲','●','●']
<?php | |
/* | |
A simple PHP class to perform basic operations against Amazon S3 and compatible | |
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules. | |
Copyright 2022 Marco Arment. Released under the MIT license: | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
<?php | |
namespace App\Http\Livewire; | |
use Livewire\Component; | |
use App\Models\User; | |
class CreateComment extends Component | |
{ | |
public $mentionables; |
{ | |
supervisor { | |
php-fpm | |
} | |
} | |
:8080 | |
php_fastcgi 127.0.0.1:9000 | |
root * . |
<?php | |
/** | |
* Return the coefficient of two items based on Jaccard index | |
* http://en.wikipedia.org/wiki/Jaccard_index | |
* | |
* Example: | |
* | |
* $tags1 = "code, php, jaccard, test, items"; | |
* $tags2 = "test, code"; |