Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
import * as SecureStore from 'expo-secure-store'; | |
import { chunk } from 'lodash'; | |
const chunkString = (str: string, size: number) => | |
chunk(str.split(''), size).map(s => s.join('')); | |
/** | |
* Secure Storage with support for storing strings larger than 2048 characters | |
*/ | |
const ExpoSecureStoreAdapter = { |
""" | |
inference_openai.py - text generation with OpenAI API | |
See https://platform.openai.com/docs/quickstart for more details. | |
Usage: | |
python inference_openai.py --prompt "The quick brown fox jumps over the lazy dog." --model "gpt-3.5-turbo" --temperature 0.5 --max_tokens 256 --n 1 --stop "." | |
Detailed usage: | |
python inference_openai.py --help |
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
// source: | |
// https://stackoverflow.com/questions/24750186/i-cant-get-properties-of-a-class-using-swift-by-class-copypropertylist | |
import Foundation | |
extension NSObject { | |
func dictionaryRepresentation() -> [String: Any] { |
import React, { useEffect, useRef, useState } from 'react'; | |
import { StyleSheet } from 'react-native'; | |
import AsyncStorage from '@react-native-async-storage/async-storage'; | |
import { SafeAreaView } from 'react-native-safe-area-context'; | |
import WebView, { WebViewMessageEvent } from 'react-native-webview'; | |
import { StatusBar } from 'expo-status-bar'; | |
enum MessageTypes { |
#!/usr/bin/env bash -e | |
## | |
## Automatic version from package.json file | |
## | |
## Call this script from your XCode Scheme: | |
## - Copy / paste this script in a .sh file | |
## - Open your app scheme in XCode (shortcut: Cmd + <) | |
## - go to Build > Pre-actions | |
## - Add a run Script ('+' button in scheme window > "New Run Script Action" |
On May 1, 2018, GitHub changed the suggested IP addresses to put on the A records for domains that use GitHub Pages. The new ones now support HTTPS for custom domains, but the old ones did not. Here are the old ones for historical purposes:
Here are the new ones:
None of the string methods modify this
โ they always return fresh strings.
charAt(pos: number): string
ES1
Returns the character at index pos
, as a string (JavaScript does not have a datatype for characters). str[i]
is equivalent to str.charAt(i)
and more concise (caveat: may not work on old engines).