Given you have the following classes:
interface GenericInterface<T> {
default List<T> returnGenericList() {
return List.of();
}
}
// Note: T isn't the same as in GenericInterface
<?php | |
use Amp\Emitter; | |
use Amp\Iterator; | |
use Amp\Promise; | |
class CsvReader implements Iterator { | |
/** @var EventEmitter */ | |
private $eventEmitter; | |
Given you have the following classes:
interface GenericInterface<T> {
default List<T> returnGenericList() {
return List.of();
}
}
// Note: T isn't the same as in GenericInterface
public class PlatformContextProvider implements ContextDataProvider { | |
private static final Map<String, String> CONTEXT = new ConcurrentHashMap<>(); | |
static { | |
CONTEXT.put("service.version", ...); | |
CONTEXT.put("service.environment", ...); | |
} | |
@Override |
import * as crypto from 'crypto'; | |
import * as fs from 'fs'; | |
import * as path from 'path'; | |
/** | |
* Interface for Webpack's hashFunction | |
*/ | |
export interface IHashFunction { | |
update: (data: string | Buffer, encoding: string) => IHashFunction; | |
digest: (encoding: string) => string | Buffer; |
<?php | |
$confirmedEmails = yield $db->select() | |
->stream() | |
->filter(fn (User $user) => $user->isEmailConfirmed()) | |
->map(fn (User $user) => $user->getEmail()) | |
->toArray(); | |
$pagedConfirmedUsers = yield $db->select() | |
->stream() |
<?php | |
use Amp\Loop\Internal\TimerQueue; | |
use Amp\Loop\Watcher; | |
require __DIR__ . '/vendor/autoload.php'; | |
$input = \file_get_contents('/home/kelunik/Downloads/tq-A805-3.log'); | |
$timerQueue = new TimerQueue; |
<template> | |
<VueForm action="/api/test.json"> | |
<FormLabel label="First name"> | |
<FormInput name="firstName"/> | |
</FormLabel> | |
<FormLabel label="Last name"> | |
<FormInput name="lastName"> | |
</FormLabel> | |
gdb --batch --command=gdb.bt -return-child-result --args ./a.out |
<?php | |
namespace Kelunik\LightD; | |
use Amp\Deferred; | |
use Amp\Delayed; | |
use Amp\Dns\DnsException; | |
use Amp\Dns\Record; | |
use Amp\Loop; | |
use Amp\Promise; |
#!/bin/bash | |
set -e | |
set -x | |
if [ $1 == "master" ] | |
then | |
wget https://github.com/php/php-src/archive/master.zip -O master.zip | |
rm -rf php-src-master | |
unzip -q master.zip |