View playground.rs
use std::fmt;
struct Rect {
width: f32,
height: f32,
}
impl fmt::Display for Rect {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Rect[width: {}; height: {}]",
View curl.txt
curl --request POST \
--url 'https://yourshop.myshopify.com/admin/recurring_application_charges.json' \
--header 'content-type: application/json' \
--header 'x-shopify-access-token: yourtoken' \
--data '{
"recurring_application_charge": {
"name": "Super Duper Plan",
"price": 0,
"capped_amount" : 10,
"terms": "test",
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Beyonce Tribute</title>
</head>
<body bgcolor="pink">
<p> <center><h1>Beyonce!</h1></p>
<p><img src="https://amp.thisisinsider.com/images/597b789e232dfa3e008b467a-960-720.jpg" atl="beyonce" width="500"></img></center></p>
View math.java
public final class Math {
private Math() {}
public static int add(int firstNumber, int secondNumber) {
return firstNumber + secondNumber;
}
public static int multiply(int multiplicand, int multiplier) {
return multiplicand * multiplier;
}
View untrusted-lvl17-solution.js
/***************
* pointers.js *
***************
*
* You! How are you still alive?
*
* Well, no matter. Good luck getting through this
* maze of rooms - you'll never see me or the Algorithm again!
*/
View playground.rs
#![crate_type="lib"]
use std::marker::PhantomData;
trait Foo {
type Type: Qux<Self>;
}
struct Bar<T>(PhantomData<T>);
View paginate.php
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
View playground.rs
#![allow(unused)]
fn main() {
let a = [1, 2, 3];
let ref mut iter = a.into_iter();
let sum: i32 = iter.take(2)
.fold(0, |acc, &i| acc + i );
assert_eq!(sum, 3);
View gist:a1b093f45a57038821029015e5f9c7ab

Test

def store_episode(self, episode_batch):
    """episode_batch: array(batch_size x (T or T+1) x dim_key)
    """
    batch_sizes = [len(episode_batch[key]) for key in episode_batch.keys()]
    assert np.all(np.array(batch_sizes) == batch_sizes[0])
    batch_size = batch_sizes[0]
View salesperson.cpp
#include <iostream>
#include <string>
using namespace std;
int main() {
double fixCom=0.0;
double perCom=0.0;
double purCost=0.0;
double minToCost=0.0;
double maxToCost=0.0;