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 { useEffect, useRef } from 'react' | |
import * as Three from 'three' | |
// https://raw.githubusercontent.com/josephg/noisejs/master/perlin.js | |
const { noise } = require('../perlin') | |
const Page = () => { | |
const divRef = useRef<HTMLDivElement>() |
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
package main | |
import ( | |
"fmt" | |
"strconv" | |
"strings" | |
) | |
func main() { | |
str := "845674" |
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 ms from 'ms' | |
import { DMChannel, Message, NewsChannel, TextChannel } from 'discord.js' | |
import { REACTIONS } from './reactions'; | |
type Channel = TextChannel | DMChannel | NewsChannel | |
type QuestionType = 'confirm' | 'text'; | |
export type Question = { | |
name: string; | |
message: String; |
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
# Usage: commit <message> [-a|--add] [-p|--push] | |
# Example: commit "my first commit" -a -p | |
# GIT Equivalent: | |
# - git add -A . | |
# - git commit -a -m "NEXT-<*>: my first commit" | |
# - git push | |
function commit { | |
if [ -z $1 ]; then | |
echo "No commit message"; |
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 generateRandomString = (length: number): string => | |
`1${"0".repeat(length)}`.replace(/[01]/g, () => (0 | (Math.random() * 16)).toString(16)) |
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
package com.federicovitale.bookmytrack.util; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Optional; | |
import java.util.function.Function; | |
public class Grouper<Z, T> { |
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
[ | |
"src/components/layoutComponents/errorStyle.scss", | |
"public/stylesheets/main/modules/registration.scss", | |
"src/pages/MovieTheaters/style.scss", | |
"src/pages/Pairing/style.scss", | |
"src/components/recovery/recovery.scss", | |
"src/components/ui/page/style.scss", | |
"src/components/MovieTheaters/AllTheatersHead/style.scss", | |
"src/components/MovieTheaters/AllTheaterList/style.scss", | |
"src/components/ui/ThreeAreaPanel/style.scss", |
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
package main | |
import "github.com/sirupsen/logrus" | |
func main() { | |
Init() | |
ProcessNodes() | |
DFS(nodes[0]) | |
} |
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
from statistics import median | |
d={} | |
flag=True | |
def load_from_file(filename): | |
try: | |
# Load data from file | |
f=open(filename, "r") |
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:firebase_auth/firebase_auth.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:google_sign_in/google_sign_in.dart'; | |
class SignInUtility { | |
static final FirebaseAuth _auth = FirebaseAuth.instance; | |
static final GoogleSignIn googleSignIn = GoogleSignIn(); | |
static Future<FirebaseUser> signInWithGoogle() async { | |
final GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn(); |