I hereby claim:
- I am lilobase on github.
- I am lilobase (https://keybase.io/lilobase) on keybase.
- I have a public key ASDTMYQWBwf0xz5BBC2vJmW3cGsDYr00Qb0yzC4AvhxRxQo
To claim this, I am signing this object:
| namespace App\Membership\Infrastructure\Doctrine; | |
| use App\Membership\Domain\Membership; | |
| trait MembershipObjectMapper | |
| { | |
| static function fromDoctrine(MembershipDoctrineEntity $entity): Membership | |
| { | |
| $instance = new self(); |
I hereby claim:
To claim this, I am signing this object:
| const http = require('http'); | |
| const url = require('url'); | |
| const server = http.createServer(({url: path}, res) => { | |
| const {pathname, query} = url.parse(path); | |
| const date = new Date(query.split('=')[1]); | |
| const response = content => { | |
| res.writeHead(200, {'Content-Type': 'application/json'}); | |
| res.end(JSON.stringify(content)); |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| public abstract class JooqObjectReflexionMapper<R> extends JooqObjectMapper<R> { | |
| public JooqObjectReflexionMapper(ObjectMapper jackson) { | |
| super(jackson); | |
| } | |
| @Override | |
| public R map(Record record) { | |
| HashMap<String, Class<?>> types = mapFieldsToTypes(); | |
| R instance = newInstance(); |
| import com.pholser.junit.quickcheck.*; | |
| import com.pholser.junit.quickcheck.runner.*; | |
| import org.junit.runner.*; | |
| import static org.assertj.core.api.Java6Assertions.*; | |
| import static org.hamcrest.core.IsEqual.*; | |
| import static org.junit.Assume.*; | |
| @RunWith(JUnitQuickcheck.class) | |
| public class FizzBuzzPropertiesTest { |
| const boxes = [[2, 3, 4], [1, 1, 10]]; | |
| const sides = ([a, b, c], acc = []) => (acc.length == 3) ? acc : sides([b, c, a], acc.concat([a * b])); | |
| const total_box_surface = (acc, box) => (b => acc + b.reduce((a, b) => a + b) * 2 + Math.min(...b))(sides(box)); | |
| const total_surface_area = boxes => boxes.reduce(total_box_surface, 0); | |
| console.log(total_surface_area(boxes)); |
| const boxes = [[2, 3, 4], [1, 1, 10]]; | |
| const sides = ([a, b, c], acc = []) => (acc.length == 3) ? acc : sides([b, c, a], acc.concat([a * b])); | |
| const box_surface = (acc, side) => (acc + side) ; | |
| function total_surface_area(boxes) { | |
| return boxes.reduce((acc, box) => | |
| (b => acc + b.reduce(box_surface) * 2 + Math.min(...b))(sides(box)), 0); | |
| } |
| const boxes = [[2, 3, 4], [1, 1, 10]]; | |
| const apply = (f, i) => (f(i)); | |
| const sides = ([a, b, c], acc = []) => (acc.length == 3) ? acc : sides([b, c, a], acc.concat([a * b])); | |
| const box_surface = (acc, side) => (acc + side) ; | |
| function total_surface_area(boxes) { | |
| return boxes.reduce((acc, box) => | |
| apply((b) => acc + b.reduce(box_surface) * 2 + Math.min(...b), sides(box)), 0); |
| const boxes = [[2, 3, 4], [1, 1, 10]]; | |
| const sides = ([a, b, c], acc = []) => (acc.length == 3) ? acc : sides([b, c, a], acc.concat([a * b])); | |
| const box_surface = (acc, side) => (acc + side) ; | |
| function total_surface_area(boxes) { | |
| return boxes.reduce((acc, box) => { | |
| const box_sides = sides(box) | |
| return acc + box_sides.reduce(box_surface) * 2 + Math.min(...box_sides); | |
| }, 0); |