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 { createContext, useContext, useState } from 'react' | |
interface IContextSession { | |
name: string | |
token: string | |
} | |
interface IContextProps { | |
session?: IContextSession | |
login: () => Promise<void> | |
logout: () => Promise<void> |
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 InAppReview from 'react-native-in-app-review' | |
if (InAppReview.isAvailable()) { | |
InAppReview.RequestInAppReview() | |
} |
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 React, { useState } from 'react' | |
import { StyleSheet, TouchableOpacity, View, Text, Alert } from 'react-native' | |
import RNFS from 'react-native-fs' | |
const perc2color = (perc: number) => { | |
var r, g, b = 0 | |
if (perc < 50) { | |
r = 255 | |
g = Math.round(5.1 * perc) | |
} |
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 perc2color = (perc: number) => { | |
var r, g, b = 0; | |
if (perc < 50) { | |
r = 255; | |
g = Math.round(5.1 * perc); | |
} | |
else { | |
g = 255; | |
r = Math.round(510 - 5.10 * perc); | |
} |
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
Links: | |
https://github.com/MicrosoftDocs/windows-itpro-docs/blob/public/windows/configuration/kiosk-xml.md | |
https://learn.microsoft.com/en-us/windows/configuration/lock-down-windows-10-to-specific-apps |
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
var excelDate = 44811; | |
var unixTimestamp = (excelDate - 25569) * 86400000 //as per the post above, convert Excel date to unix timestamp, assuming Mac/Windows Excel 2011 onwards | |
var date = moment(unixTimestamp); //Pass in unix timestamp instead of Excel date | |
var dateWithNewFormat = date.format('DD.MM.YYYY HH:mm'); | |
console.log(dateWithNewFormat); //07-Eyl-2022 |
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 React, { useState } from "react"; | |
import { View, Button } from "react-native"; | |
import { Audio } from "expo-av"; | |
const App = () => { | |
const [recording, setRecording] = useState<Audio.Recording>(); | |
const startRecording = async () => { | |
try { | |
console.log("Requesting permissions.."); |
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 App = (): JSX.Element => { | |
return ( | |
<FlatList | |
key={Math.floor(Dimensions.get("window").width / 400)} | |
numColumns={Math.floor(Dimensions.get("window").width / 400)} | |
data={data} | |
keyExtractor={(item: T, index: number) => index.toString()} | |
renderItem={({ item }) => <ListItem item={item} />} /> | |
); | |
} |
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 {useState} from 'react'; | |
const App = () => { | |
const initialState = [ | |
{id: 1, country: 'Austria'}, | |
{id: 2, country: 'Belgium'}, | |
{id: 3, country: 'Canada'}, | |
]; | |
const [data, setData] = useState(initialState); |
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
THE_KEY_TO_HAPPINESS=https://www.abc4.com/wp-content/uploads/sites/4/2021/01/EsTX9C7XYAwVW7g.jpeg?w=719 |
NewerOlder