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 { View } from "react-native"; | |
import PDFViewer from '../components/PDFViewer'; | |
import config from '../config'; | |
const TermsOfUsePage = () => { | |
const { baseUrl, termsOfUsePdfUrl } = config; | |
return ( | |
<View> | |
<PDFViewer file={{ url: `${baseUrl}/${termsOfUsePdfUrl}` }} /> |
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 { View } from "react-native"; | |
import PDFViewer from "../components/PDFViewer"; | |
import termsOfUsePdf from "../resources/TermsOfUse.pdf"; | |
const TermsOfUsePage = () => { | |
return ( | |
<View> | |
<PDFViewer file={termsOfUsePdf} /> | |
</View> |
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 array = []; | |
for (let i = 0; i < 1000000; i++) { | |
if (i % 2 === 0) { | |
array.push({ sex: 'F', name: 'Alice' }); | |
} else { | |
array.push({ sex: 'M', name: 'Bob' }); | |
} | |
} | |
// traditional for loop |
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 NETSCAPE-Bookmark-file-1> | |
<!-- This is an automatically generated file. | |
It will be read and overwritten. | |
DO NOT EDIT! --> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
<TITLE>Bookmarks</TITLE> | |
<H1>Bookmarks</H1> | |
<DT><H3 ADD_DATE="1624006311" LAST_MODIFIED="1624006311">Web Tools</H3> | |
<DL><p> | |
<DT><A HREF="https://regex101.com/" ADD_DATE="1624006311" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABrklEQVQ4jVVSPW8TQRSc2duz75IQKxgZRZFACoIiQhQgGipS8BMoU9Eh/gDiL9AgJBA/gTYFDR0SUqCjAPNRxAIXwQYcnBjZd94divvwest5+968mTe88+g1AEkkJSF4FUJyAdqwRgY1of4rocYtAAGoGGa5d14S4ojNOFJAXjRbAASqAq5srbdWYhA/R9Pvg0lsSRppsVbJQNI5v5LYh3evHk+y0Wm2eTb99OPvi1dfi/oSgyrVxjB3/sl+90t/fLGz9vjejYPPw4PucDWJnS9lmGKlmlFCPvfO6/Do5Nd4eiaNnYqZWnKpVCJFhjcvt8+tJzsXWgA+HI7SRhRICBqK8bHlrZ3zt6+ZrXZ6/9n7P+NZI45qAeVKle8whtPcP93vPnj+rv/73/VLG1nuw6uVDaWnACCCaSOa5f7lm97e7nZnI8nmLgxBIFqS6Lx3Xmupfftx2O2P93a3s9wTi8iwzhIAQ26208HxNJt7SauJ7bSS3uCUIConqzsAJL3UO5pYS0OCnEzdt8lJMzbF4RYuFe2FFc2YqggjQ2si |
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
#!/bin/bash | |
# A menu driven shell script sample template | |
## ---------------------------------- | |
# Step #1: Define variables | |
# ---------------------------------- | |
EDITOR=vim | |
PASSWD=/etc/passwd | |
RED='\033[0;41;30m' | |
STD='\033[0;0;39m' |
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
// Before | |
const isUserTagged = (user, photo) => { | |
return photo.taggedUsers.map(user => user.id).includes(user.id) | |
} | |
const isUserBlocked = (user, photo) => { | |
return photo.user.blockedFriends.map(user => user.id).includes(user.id) | |
} |
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
// whoLikeThis.js | |
const whoLikeThis = (names) => { | |
return `${names[0]} and ${names.length - 1} others liked this`; | |
}; | |
// whoLikeThis.test.js | |
it('should return the first person name and count of the rest`, () => { |
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 cc = async (v, b, q) => { | |
const rate = await currency.fetchRate(b, q); | |
return v * rate; | |
}; |
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 totalPrice = (value, discount) => { | |
return ((value * 1.07) - discount) * 1.1; | |
} |
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 hasAccessToPhoto = (user, photo) => { | |
if (photo.privacy !== 'public') { | |
if (user.role !== 'admin') { | |
if (photo.userId !== user.id) { | |
return photo.user.friends.includes(user.id) || photo.taggedUsers.includes(user.Id); | |
} | |
} | |
} | |
return true; | |
}; |
NewerOlder