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
// File: @openzeppelin/contracts/GSN/Context.sol | |
pragma solidity ^0.5.0; | |
/* | |
* @dev Provides information about the current execution context, including the | |
* sender of the transaction and its data. While these are generally available | |
* via msg.sender and msg.data, they should not be accessed in such a direct | |
* manner, since when dealing with GSN meta-transactions the account sending and |
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
package main | |
import "fmt" | |
type Foo struct { | |
Foo, Bar int | |
} | |
func PrintSlice(v []Foo) { | |
fmt.Printf("[]Foo: [0] %p, [1] %p\n", &v[0], &v[1]) |
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
"B" + ["a", "a"].join("aaa" - 1) | |
"BaNaNa" |
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
private Vector3 DoBezierFor4Points(float t, Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3) | |
{ | |
Vector3 returnVector = Vector3.zero; | |
float oneMinusT = (1f - t); | |
returnVector += p0 * oneMinusT * oneMinusT * oneMinusT; | |
returnVector += p1 * t * 3f * oneMinusT * oneMinusT; | |
returnVector += p2 * 3f * t * t * oneMinusT; | |
returnVector += p3 * t * t * t; |
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
title | genre | year | |
---|---|---|---|
Drop Dead Gorgeous (1999) | Comedy | 1990 | |
X-Men: Days of Future Past (2014) | Action | 2010 | |
Waking Ned Devine (a.k.a. Waking Ned) (1998) | Comedy | 1990 | |
Birdcage, The (1996) | Comedy | 1990 | |
Inside Out (2015) | Adventure | 2010 | |
Contender, The (2000) | Drama | 2000 | |
Mortal Kombat (1995) | Action | 1990 | |
Wallace & Gromit in The Curse of the Were-Rabbit (2005) | Adventure | 2000 | |
Panic Room (2002) | Thriller | 2000 |
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
from datetime import datetime | |
tests = [ | |
# (Type, Test) | |
(int, int), | |
(float, float), | |
(datetime, lambda value: datetime.strptime(value, "%Y/%m/%d")) | |
] | |
def getType(value): |