This file contains hidden or 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 { | |
@apply bg-white rounded-lg w-full max-w-lg px-6 border border-gray-300 py-3 mt-2; | |
&::placeholder { | |
@apply text-gray-dark; | |
} | |
&:focus { | |
@apply border-opacity-0 outline-none shadow-outline-blue; | |
} |
This file contains hidden or 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 | |
namespace Kadevland\Eloquent\Uuid\Traits; | |
use Kadevland\Eloquent\Uuid\Contracts\UuidGeneratorString; | |
use Kadevland\Eloquent\Uuid\Generators\RamseyUuid4; | |
trait HasUuidString | |
{ |
This file contains hidden or 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
$page = Http::get('https://www.w3schools.com/cssref/css_colors.asp')->body(); | |
$html = new Symfony\Component\DomCrawler\Crawler($page); | |
$names = []; | |
foreach($html->filter('#colornamestable .colornamespan') as $element) { | |
$names[] = strtolower($element->firstChild->firstChild->wholeText); | |
} | |
$values = []; |
This file contains hidden or 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 math | |
def find_roots(a, b, c): | |
if a == 0: | |
return print('Erreur: a est égal à 0.') | |
delta = b ** 2 - 4 * a * c | |
print() |
This file contains hidden or 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 re | |
PRECEDENCES = {'+': 2, '-': 2, '*': 3, '/': 3, '^': 4} | |
def has_greater_precedence(operator, comparison): | |
return PRECEDENCES[operator] > PRECEDENCES[comparison] | |
def peek(stack): |
This file contains hidden or 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
Blade::directive('alpine', function (string $variables) { | |
return <<<PHP | |
<?php | |
\$data = array_combine( | |
array_map( | |
fn (\$variable) => str_replace('$', '', \$variable), | |
explode(',', '$variables') | |
), | |
[$variables] | |
); |
This file contains hidden or 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
$punctuationSigns = ['!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_', '`', '{', '|', '}', '~'] |
This file contains hidden or 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
[ | |
1 => 'one', | |
2 => 'two', | |
3 => 'three', | |
4 => 'four', | |
5 => 'five', | |
6 => 'six', | |
7 => 'seven', | |
8 => 'eight', | |
9 => 'nine', |
This file contains hidden or 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
{ | |
"name": "me/crawler", | |
"autoload": { | |
"psr-4": { | |
"Me\\Crawler\\": "src/" | |
} | |
}, | |
"authors": [ | |
{ | |
"name": "Félix Dorn", |
This file contains hidden or 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
<!doctype html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> | |
<head> | |
<title> | |
</title> | |
<!--[if !mso]><!--> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!--<![endif]--> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |