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
//NOTE: This is only a DICTIONARY with MOST character to keycode bindings... it is NOT a working cs file | |
//ITS USEFUL: when you are reading in your control scheme from a file | |
//NOTE: some characters SHOULD map to multiple keycodes (but this is impossible) | |
//since this is a dictionary, only 1 character is bound to 1 keycode | |
//EX: * from the keyboard will be read the same as * from the keypad... because they produce the same character in a text file | |
Dictionary<char, KeyCode> chartoKeycode = new Dictionary<char, KeyCode>() | |
{ | |
//-------------------------LOGICAL mappings------------------------- |
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
static float euclideanDistance(float[] pointA, float[] pointB) | |
{ | |
if (pointA.Length == pointB.Length) | |
{ | |
float sum = 0; | |
for (int dim = 0; dim < pointA.Length; dim++) | |
sum += Mathf.Pow((pointA[dim] - pointB[dim]), 2); | |
return Mathf.Sqrt(sum); //distance is always positive | |
} | |
else |
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
<html> | |
<header><title>Setup File</title></header> | |
<body> | |
Hello world | |
</body> | |
</html> |
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 'package:flutter/material.dart'; | |
import 'dart:async'; | |
void main() => runApp(new BackButtonOverrideDemoWidget()); | |
class BackButtonOverrideDemoWidget extends StatefulWidget{ | |
@override | |
_BackButtonOverrideDemoWidgetState createState() => new _BackButtonOverrideDemoWidgetState(); | |
} |
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 'package:flutter/material.dart'; | |
import 'dart:async'; | |
//Desired Behavior on FIRST build (It should not take 3) | |
//CASE 1 (parent uses child size) : eye.width = vane.width * 10 | |
//CASE 2 (child uses parent size) : pupil.width = iris.width / 2 | |
//CASE 3: (child uses sibling size) : iris.width = vane.width * 5 | |
//Desired Sizes (can be read from Render Tree in Flutter Inspector) [in original config of 4 letters] | |
//vane = 30 |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
/* | |
OUTPUT (one of many) NOTE: how far behind the Loose Timer is, is not predictable either | |
I/flutter (11433): Timer Restarted | |
I/flutter (11433): Timers Started | |
I/flutter (11433): Loose Timer Will Take 588 solid runs of 0:00:00.017000 and an extra run of 0:00:00.004000 |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:meta/meta.dart'; | |
/// Note: | |
/// [*] some functions are async simply because that schedules them after something else that should happen first for everything to work properly | |
/// [*] you really should not use "ensureVisible" or "ensureErrorVisible" or "KeyboardListener" unless that field is already wrapped in "EnsureVisibleWhenFocused" | |
/// you will get very unusual behavior |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
void main() => runApp( | |
MaterialApp(home: new MyApp()) | |
); | |
class MyApp extends StatefulWidget { |
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
String getPasswordValidationError(bool forPassword) { | |
String initialPasswordString = focusNodeToValue[passwordFocusNode].value; | |
String confirmPasswordString = focusNodeToValue[confirmPasswordFocusNode].value; | |
///-----make sure this particular password is valid | |
if (forPassword) { | |
if (initialPasswordString.isNotEmpty == false) | |
return "Password Required"; | |
else if (initialPasswordString.length < 6) | |
return "The Password Requires 6 Characters Or More"; |
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
//other stuff to maybe map out | |
//https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/ | |
//https://www.bluetooth.com/specifications/assigned-numbers/16-bit-uuids-for-members/ | |
//https://www.bluetooth.com/specifications/assigned-numbers/16-bit-uuids-for-sdos/ | |
//https://www.bluetooth.com/specifications/assigned-numbers/service-discovery/ | |
//https://www.bluetooth.com/specifications/assigned-numbers/health-device-profile/ | |
//https://www.bluetooth.com/specifications/assigned-numbers/units/ | |
//Gatt Service Hierarchy | |
//Device |
OlderNewer