Note: This post is a summary of information paraphrased from an excellent blog post by Christian Sepulveda.
Create the app and download the necessary dependencies.
import React, { useRef, useState } from 'react' | |
import { View, Text, StyleSheet } from 'react-native' | |
import BottomSheet from 'reanimated-bottom-sheet' | |
import { FlatList } from 'react-native-gesture-handler' | |
import { Fragment } from 'react' | |
const data = Array(50) | |
.fill(0) | |
.map((item, index) => ({ | |
id: `item-${index}`, |
import React, {Component} from "react"; | |
import {Animated, Dimensions, Platform, Text, TouchableOpacity, View} from "react-native"; | |
import {Body, Header, List, ListItem as Item, ScrollableTab, Tab, TabHeading, Tabs, Title} from "native-base"; | |
import LinearGradient from "react-native-linear-gradient"; | |
const {width: SCREEN_WIDTH} = Dimensions.get("window"); | |
const IMAGE_HEIGHT = 250; | |
const HEADER_HEIGHT = Platform.OS === "ios" ? 64 : 50; | |
const SCROLL_HEIGHT = IMAGE_HEIGHT - HEADER_HEIGHT; | |
const THEME_COLOR = "rgba(85,186,255, 1)"; |
Create the app and download the necessary dependencies.
type FilterOperator = 'AND' | 'OR'; | |
type FiltersBy<T> = { | |
[K in keyof T]?: (value: T[K]) => boolean; | |
}; | |
/** | |
* Factory function that creates a specialized function to filter | |
* arrays, by validating all filters (AND operator), | |
* or validating just one of the filters (OR operator). | |
* @param operator Method to validate all filters: AND, OR |
# Fish shell | |
egrep "^export " ~/.bash_profile | while read e | |
set var (echo $e | sed -E "s/^export ([A-Z_]+)=(.*)\$/\1/") | |
set value (echo $e | sed -E "s/^export ([A-Z_]+)=(.*)\$/\2/") | |
# remove surrounding quotes if existing | |
set value (echo $value | sed -E "s/^\"(.*)\"\$/\1/") | |
if test $var = "PATH" |
- (NSString *)tableView:(UITableView *)tableView titleForSwipeAccessoryButtonForRowAtIndexPath:(NSIndexPath *)indexPath { | |
return @"More"; | |
} | |
- (void)tableView:(UITableView *)tableView swipeAccessoryButtonPushedForRowAtIndexPath:(NSIndexPath *)indexPath { | |
NSLog(@"I wanted to be a pretty public API, but then time ran out and they forgot me..."); | |
// Hide the More/Delete menu. | |
[self setEditing:NO animated:YES]; | |
} |
Country | Alpha-2 code | Alpha-3 code | Numeric code | Latitude (average) | Longitude (average) | |
---|---|---|---|---|---|---|
Afghanistan | AF | AFG | 4 | 33 | 65 | |
Åland Islands | AX | ALA | 248 | 60.116667 | 19.9 | |
Albania | AL | ALB | 8 | 41 | 20 | |
Algeria | DZ | DZA | 12 | 28 | 3 | |
American Samoa | AS | ASM | 16 | -14.3333 | -170 | |
Andorra | AD | AND | 20 | 42.5 | 1.6 | |
Angola | AO | AGO | 24 | -12.5 | 18.5 | |
Anguilla | AI | AIA | 660 | 18.25 | -63.1667 | |
Antarctica | AQ | ATA | 10 | -90 | 0 |
// a bit hackish way of merging two wav files, assumes raw samples. | |
#import <Foundation/Foundation.h> | |
#define RIFF_ID 0x52494646 // "RIFF" | |
#define RIFF_FMT_ID 0x666d7420 // "fmt " | |
#define RIFF_DATA_ID 0x64617461 // "data" | |
typedef struct riffChunkHeader { | |
UInt32 rsc_id; // big endian |
CGContextRef ctx = UIGraphicsGetCurrentContext(); // your drawing context | |
CGRect colorRect = CGRectMake(0, 0, 100, 100); // the rect to draw the color overlay into | |
// Set the blend mode to "Normal" | |
// This is the default blend mode setting so this line is not required, shown here for demonstration | |
CGContextSetBlendMode(ctx, kCGBlendModeNormal); | |
// Set the opacity of the drawing context (once again, not required) | |
CGContextSetAlpha(ctx, 1.0); | |
// Create the red color | |
CGColorRef redColor = CGColorCreateGenericRGB(0.908, 0.149, 0.145, 1.000); | |
// Set the fill color of the context and fill the rect |