This file contains 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
const f = (t) => (1 - (1 - (t * 2)) ** 5) / 2; | |
for (let t = 0; t <= 1.00001; t += 0.01) { console.log(`${t.toPrecision(2)}: ${f(t.toPrecision(6))}`); } |
This file contains 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
{ | |
"name":"Love is Love Collection", | |
"image": "https://storage.googleapis.com/opensea-prod.appspot.com/puffs/3.png", | |
"description": "Love is love hidden" | |
} |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
class Pokemon extends StatelessWidget { | |
final pokemon = Pokemon(); | |
@override | |
Widget build(context) { | |
return Scaffold( | |
appBar: AppBar(title: Text("Pokemon")), |
This file contains 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
// Pokemon Class is generated code from introspection | |
final NestedFragment = Pokemon(retFields:[id,name]); | |
final PokemonCard = Pokemon(returnFields:[maxHP,image],fragments:[NestedFragment]); | |
final q1Result = Pokemon(fragments:[PokemonCard]).query(); | |
final q2Result = Pokemon(fragments:[PokemonCard],returnFields:[weight(returnFields:minimum,maximum),height(minimum,maximum)]).query(); |
This file contains 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
/* | |
For random string s=‘zxzzzay’ and consecutive numbers as k=2 should return zzyzzxa. | |
Other example s=axxyyw & k=1 -> xyxywa | |
*/ | |
function isMaxConsecutive(result, consecutiveNumbersAllowed, currentHashmapKey) { | |
let lastK = result.slice(-consecutiveNumbersAllowed) | |
if (lastK.length === consecutiveNumbersAllowed) { | |
return lastK.split("").every(v => v === currentHashmapKey) | |
} |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
class Destination { | |
const Destination(this.index, this.title, this.icon, this.color); | |
final int index; | |
final String title; | |
final IconData icon; | |
final MaterialColor color; | |
} |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am jascodes on github. | |
* I am jascodes (https://keybase.io/jascodes) on keybase. | |
* I have a public key ASBguVhTGECbG0FTXGk_UvUrwWz_PNDm_HOS2UIY4X5yiQo | |
To claim this, I am signing this object: |
This file contains 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
import { Entity, Column, PrimaryGeneratedColumn, getRepository, CreateDateColumn, UpdateDateColumn } from 'typeorm' | |
import { Type, Field, ID, String, Mutation } from 'graphql-typescript' | |
class CreateUserArguments { | |
@Field(String) username: string | |
@Field(String) password: string | |
} | |
@Entity({ name: 'User' }) | |
@Type |