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
| // Mobile: React Native | |
| import React, {useState, useEffect} from 'react'; | |
| import { View } from 'react-native'; | |
| import {Button} from 'react-native-paper'; | |
| import { WebView } from 'react-native-webview'; | |
| const App = () => { | |
| const [show, setShow] = useState({isOpen: false, url: null}); |
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 React from 'react'; | |
| import {SafeAreaView, StatusBar} from 'react-native'; | |
| import {WebView} from 'react-native-webview'; | |
| const App = () => { | |
| return ( | |
| <> | |
| <StatusBar barStyle="dark-content" /> | |
| <SafeAreaView style={{flex: 1}}> | |
| <WebView source={{uri: 'https://medium.com/'}} /> |
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
| export const signInUserWithAuthProvider = async ( | |
| authProvider: AuthProvider | |
| ) => { | |
| firebase.auth().tenantId = authProvider.tenantId; | |
| const provider = new firebase.auth.SAMLAuthProvider(authProvider.provider); | |
| firebase.auth().signInWithRedirect(provider); | |
| const authResult = await firebase.auth().getRedirectResult(); | |
| return authResult; |
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 signInUser = () => { | |
| return firebase.auth().signInWithEmailAndPassword(email, password); | |
| } |
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
| { "tenantId": "some-random-tenant", "provider": "third.party" } |
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
| export const getAuthProvider = async (email: string) => { | |
| const response = await fetch(`${backendUrl}/auth-provider?email=${email}`, { | |
| method: "GET", | |
| headers: { | |
| "Content-type": "application/json" | |
| }, | |
| credentials: "include" | |
| }); | |
| return response.json(); |
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
| /////////////////////////////////////////////////////////////////// | |
| /** | |
| * currentPages is an array of objects which holds each active page | |
| * on the browser. | |
| * | |
| * page: { | |
| * id: <string>, | |
| * url: <string>, | |
| * author: <string>, |
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
| // Edited this from VS code | |
| var firebaseConfig = {}; | |
| // Initialize Firebase | |
| firebase.initializeApp(firebaseConfig); | |
| const db = firebase.firestore(); | |
| // Read | |
| db.collection("cafes") |
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 java.util.Scanner; | |
| public class Practice { | |
| public static void main(String args[]) { | |
| Scanner scr = new Scanner(System.in); | |
| System.out.println("please enter two numbers"); | |
| int a = scr.nextInt(); | |
| int b = scr.nextInt(); |
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
| ProductForm.propTypes = { | |
| product: PropTypes.exact({ | |
| description: PropTypes.string.isRequired, | |
| descriptionHtml: PropTypes.string.isRequired, | |
| handle: PropTypes.string.isRequired, | |
| id: PropTypes.string.isRequired, | |
| options: PropTypes.arrayOf( | |
| PropTypes.exact({ | |
| id: PropTypes.string.isRequired, | |
| name: PropTypes.string.isRequired, |