- version 3.6
Check those constraints:
$this->anything()
<?php | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
<?php | |
namespace Acme\DemoBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\Security\Core\Role\SwitchUserRole; |
import os | |
import sys | |
import subprocess | |
import re | |
import optparse | |
import boto | |
dynamodb_conn = boto.connect_dynamodb(aws_access_key_id='MY_ACCESS_KEY_ID', aws_secret_access_key='MY_SECRET_ACCESS_KEY') | |
table_name = 'mytable' | |
dynamodb_table = dynamodb_conn.get_table(table_name) |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" |
<?php | |
function array_to_tree(array $array, $parent_id = 0) | |
{ | |
$array = array_combine(array_column($array, 'id'), array_values($array)); | |
foreach ($array as $k => &$v) { | |
if (isset($array[$v['parent_id']])) { | |
$array[$v['parent_id']]['children'][$k] = &$v; | |
} |
<?hh | |
async function stream_check(resource $stream, string $mode, int $usec): Awaitable<void> | |
{ | |
$r = $w = $e = null; | |
do { | |
if ($mode == "r") { | |
$r = Vector{$stream}; | |
} |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
import sys | |
import boto3 | |
import time | |
from datetime import datetime | |
profile_name = 'yasuhiro.asaka' | |
region_name = 'REGION_NAME' | |
# logs | |
log_group_name = 'GROUP_NAME' | |
log_stream_name_prefix = 'PREFIX' |
{ | |
"mappings": { | |
"logs": { | |
"properties": { | |
"eventVersion": { | |
"type": "string" | |
}, | |
"userIdentity": { | |
"properties": { | |
"type": { |