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
<?php | |
// Get Authorization token from https://api.esv.org/docs/ and paste it below, also include referer URL | |
public function getESVText($query = ''){ | |
$url = 'https://api.esv.org/v3/passage/text/?'; | |
$data = array( | |
'q'=> $query, | |
'include-headings' => 'false', | |
'include-footnotes' => 'false', |
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
func Rvoltages() -> AnyView?{ | |
var userinputs = [ | |
[UserInput().inputRVoltI, "Lead I"], | |
[UserInput().inputRVoltII, "Lead II"] | |
] | |
var inputs: some View{ | |
Section(header: Text("R Voltages")){ | |
ForEach(userinputs, id: \.self){userinput in | |
HStack{ |
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
class UserInput: ObservableObject { | |
@Published var foo: String = "" | |
@Published var bar: String = "" | |
} | |
struct ContentView: View { | |
@ObservedObject var input = UserInput() | |
let userinputs = ['foo', 'bar'] | |
var body: some View { | |
for userinput in userinputs{ |
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 CalcAxis: Int?{ | |
func calculate() throws -> Int?{ | |
var AxisValues = [Double]() | |
if inputLead1pos.double != nil{ | |
AxisValues.append(Double(inputLead1pos) ?? 0) | |
} | |
if inputLead1neg.double != nil{ | |
AxisValues.append(Double(inputLead1neg) ?? 0) | |
} | |
if inputLeadAVFpos.double != nil{ |
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 CalcAxis: Int{ | |
var AxisValues = [Double]() | |
if inputLead1pos.double != nil{ | |
AxisValues.append(Double(inputLead1pos) ?? 0) | |
} | |
if inputLead1neg.double != nil{ | |
AxisValues.append(Double(inputLead1neg) ?? 0) | |
} | |
if inputLeadAVFpos.double != nil{ | |
AxisValues.append(Double(inputLead1pos) ?? 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
let xPRIntervals: [Int: [Int: [Double]?]] = [ | |
1:[ | |
60: nil, | |
80: nil, | |
100: [0.1, 0.12] | |
], | |
6:[ | |
60: nil, | |
140: [0.11, 0.14], | |
160: [0.1, 0.13] |
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
let xPRIntervals: [Int: [Int: [Double]?]] = [ | |
1:[ | |
60: nil, | |
80: nil, | |
100: [0.1, 0.12] | |
], | |
6:[ | |
60: nil, | |
140: [0.11, 0.14], | |
160: [0.1, 0.13] |
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
func monthsOld(DOBStr: String) throws -> Int{ | |
enum monthsOldError: Error{ | |
case futureDate | |
} | |
let formatter = DateFormatter() | |
formatter.dateFormat = "yyyy/MM/dd" | |
let DOB = formatter.date(from: DOBStr) | |
let timesince: Double = DOB!.timeIntervalSinceNow | |
if timesince > 0.0{ | |
throw monthsOldError.futureDate |
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
#include <FastLED.h> | |
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(4, 5); // RX, TX | |
#define REDPIN 10 | |
#define GREENPIN 11 | |
#define BLUEPIN 9 | |
#define BUTTONPIN 12 | |
const byte numChars = 14; |
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
#include <FastLED.h> | |
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(4, 5); // RX, TX | |
#define REDPIN 10 | |
#define GREENPIN 11 | |
#define BLUEPIN 9 | |
#define BUTTONPIN 12 | |
const byte numChars = 14; |
NewerOlder