Run:
npm i react-navigation-shared-element@next react-native-shared-element
npm i @react-navigation/native@^5.0.9 @react-navigation/stack@^5.1.1
import canvas from '@napi-rs/canvas' // For canvas. | |
import fs from 'fs' // For creating files for our images. | |
import cwebp from 'cwebp' // For converting our images to webp. | |
// Load in the fonts we need | |
GlobalFonts.registerFromPath('./fonts/Inter-ExtraBold.ttf', 'InterBold'); | |
GlobalFonts.registerFromPath('./fonts/Inter-Medium.ttf','InterMedium'); | |
GlobalFonts.registerFromPath('./fonts/Apple-Emoji.ttf', 'AppleEmoji'); | |
// This function accepts 6 arguments: |
***Simple and stripped down version of this post: https://www.coderrocketfuel.com/article/how-to-deploy-a-next-js-website-to-a-digital-ocean-server *** | |
1. Create a New Droplet On DigitalOcean | |
a) In the first section, select the Ubuntu operating system for your server | |
b) In the "Authentication" section, make sure the "Password" option is selected and enter a strong root password for your server. | |
2. Access Server Using Root | |
a) ssh root@server_ip_address (connect to server from terminal) | |
3. Add user (OPTIONAL) |
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
class Responder: NSObject { | |
@objc func segmentedControlValueChanged(_ sender: UISegmentedControl) { | |
UIView.animate(withDuration: 0.3) { | |
buttonBar.frame.origin.x = (segmentedControl.frame.width / CGFloat(segmentedControl.numberOfSegments)) * CGFloat(segmentedControl.selectedSegmentIndex) | |
} |
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2016 Raphaël Bussa | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
// it returns a square thumbnail. | |
func getAssetThumbnail(asset: PHAsset, size: CGFloat) -> UIImage { | |
let retinaScale = UIScreen.mainScreen().scale | |
let retinaSquare = CGSizeMake(size * retinaScale, size * retinaScale) | |
let cropSizeLength = min(asset.pixelWidth, asset.pixelHeight) | |
let square = CGRectMake(0, 0, CGFloat(cropSizeLength), CGFloat(cropSizeLength)) | |
let cropRect = CGRectApplyAffineTransform(square, CGAffineTransformMakeScale(1.0/CGFloat(asset.pixelWidth), 1.0/CGFloat(asset.pixelHeight))) | |
let manager = PHImageManager.defaultManager() |
name | url | |
---|---|---|
Abilene Christian University | http://www.acu.edu/ | |
Academy of Art College | http://www.academyart.edu/ | |
Adams State College | http://www.adams.edu/ | |
Adelphi University | http://www.adelphi.edu/ | |
Adler School of Professional Psychology | http://www.adler.edu/ | |
Adrian College | http://www.adrian.edu/ | |
Agnes Scott College | http://www.scottlan.edu/ | |
Air Force Institute of Technology | http://www.afit.af.mil/ | |
Alabama Agricultural and Mechanical University | http://www.aamu.edu/ |
apply plugin: 'com.android.application' | |
apply plugin: 'com.android.databinding' | |
apply plugin: 'kotlin-android' | |
android { | |
compileSdkVersion 23 | |
buildToolsVersion "23.0.1" | |
defaultConfig { | |
applicationId "com.example.mvptestkotlin" |