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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="label"></div> |
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
const path = require("path") | |
module.exports = { | |
mode: "development", | |
watch: true, | |
devtool: "eval-source-map", | |
entry: { | |
index: "./src/index.ts", | |
contact: "./src/contact.ts" | |
}, | |
module: { |
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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Visit https://aka.ms/tsconfig.json to read more about this file */ | |
/* Basic Options */ | |
// "incremental": true, /* Enable incremental compilation */ | |
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, | |
"module": "es2015" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, | |
"lib": [ | |
"es5","DOM" |
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
{ | |
"name": "test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"dev-server": "webpack-dev-server" | |
}, | |
"keywords": [], | |
"author": "", |
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
exports.getUsers = functions.https.onCall((data, context) => { | |
return new Promise((resolve, reject) => { | |
db.collection("users") | |
.get() | |
.then((snapshot) => { | |
if(snapshot.empty){ | |
reject({msg: "There is no users at all"}) | |
} | |
data = snapshot.docs.map(doc => doc.data()) |
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
const origData = [ | |
{ | |
uid:123123, | |
displayName: "user1", | |
email: null, | |
emailVerified: false, | |
isAnonymous: false, | |
photoURL: "http://gooooooo.com/123123jiji", | |
nestedData: { |
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
import SwiftUI | |
import Firebase | |
@main | |
struct SpeechApp: App { | |
@UIApplicationDelegateAdaptor private var appDelegate: AppDelegate | |
var body: some Scene { | |
WindowGroup { |
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
import UIKit | |
class PreferencesViewController: UIViewController { | |
@IBOutlet var usernameLabel: UILabel! | |
@IBOutlet var profilePic: UIImageView! | |
@IBOutlet var profileBox: UIView! | |
@IBOutlet var signOutButton: UIButton! | |
@IBOutlet var learningLanguageTextField: UITextField! | |
@IBOutlet var translationTextField: UITextField! |
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
// Without params and return type | |
let closureFunc = { | |
print("Printed from a closure") | |
} | |
closureFunc() // Printed from a closure | |
// With a parameter | |
let closureWithParams = { (name:String) in | |
print("My name is \(name)") | |
} |
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
let option = {} | |
if (locale) { | |
let token = await firebase.auth().currentUser?.getIdToken() | |
option = { | |
params: { yourParam: valueOfParam }, | |
headers: { | |
Authorization: `Bearer ${token}` | |
} | |
} | |
} |