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
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064},{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}]}' |
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
{"lastUpload":"2021-01-19T11:44:16.374Z","extensionVersion":"v3.4.3"} |
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
/* | |
Some background: | |
- Most sorting algorithms like mergesort, quick sort, selection sort, run in O(n log n) time | |
- Counting sort says it can do better with O(n) time but with a caveat of using more space (O(n) space) | |
- Counting sort requires 2 ingredients: | |
1. The unsorted array | |
2. The higest possible value in the array. So like the range | |
*/ | |
const unsortedScores = [2, 5, 10, 1, 3, 7, 9]; | |
const HIGHEST_POSSIBLE_SCORE = 10; |
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, { PureComponent } from 'react'; | |
import { View, Text, Animated, TouchableWithoutFeedback } from 'react-native'; | |
import AddButton from './AddButton'; | |
import MinusButton from './MinusButton'; | |
import Counter from './Counter'; | |
export default class CompleteComponent extends PureComponent { | |
state = { | |
animationValue: new Animated.Value(0), | |
counterAnimation: new Animated.Value(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
import React, { PureComponent } from 'react'; | |
import { View, Animated } from 'react-native'; | |
import AddButton from './AddButton'; | |
import MinusButton from './MinusButton'; | |
import Counter from './Counter'; | |
export default class CompleteComponent extends PureComponent { | |
state = { | |
counter: 1 | |
}; |
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, { PureComponent } from 'react'; | |
import { View, Text, NetInfo, Dimensions, StyleSheet } from 'react-native'; | |
const { width } = Dimensions.get('window'); | |
function MiniOfflineSign() { | |
return ( | |
<View style={styles.offlineContainer}> | |
<Text style={styles.offlineText}>No Internet Connection</Text> | |
</View> |
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
//This method of solving the fibonacci sequence assumes that since the first three values never change, just state it | |
// and start index 3 | |
// Fibonacci sequence example: [0, 1, 1, 2, 3, 5, 8, 13, 21, 34] | |
// Under *Dynamic Programming*: https://www.ics.uci.edu/~eppstein/161/960109.html | |
// 1st iteration | |
func fibonacci(until: Int) { | |
var f = [0, 1, 1] | |
for i in 3...until { | |
f.append(f[i-2] + f[i-1]) |
NewerOlder