boolean'ing a mesh doesn't give proper results without high enough resolution (without some kind of threshold value addition).
This file contains hidden or 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 aioble | |
import bluetooth | |
import asyncio | |
import time | |
# Custom UUID for our service | |
SERVICE_UUID = bluetooth.UUID("A5A5A5A5-FFFF-9999-1111-5A5A5A5A5A5A") | |
CHAR_UUID = bluetooth.UUID("00000000-1111-2222-3333-444444444444") | |
This file contains hidden or 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
http.host contains "yvzf52t2f2564oynzry4lmowga0migin.lambda-url.us-west-2.on.aws" || dns.qry.name contains "yvzf52t2f2564oynzry4lmowga0migin.lambda-url.us-west-2.on.aws" |
This file contains hidden or 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:intl/intl.dart'; | |
void main() { | |
String _generateDatetime() { | |
return DateTime.now() | |
.toUtc() | |
.toString() | |
.replaceAll(RegExp(r'\.\d*Z$'), 'Z') | |
.replaceAll(RegExp(r'[:-]|\.\d{3}'), '') | |
.split(' ') |
This file contains hidden or 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
// Untested code! | |
fn generate_all_paths( | |
dialogue: &mut Dialogue, | |
progress: &mut Progress, | |
) -> Vec<GraphWalk> { | |
let mut all_paths = Vec::new(); | |
let dialogue_events = match dialogue.continue_() { | |
Ok(events) => events, |
This file contains hidden or 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
uint16_t i = 0, j = 0; | |
uint32_t tmp = 0; | |
uint32_t sum = 0; | |
for (i = 0; i < size - 1; i++) | |
{ | |
for (j = 0; j < size - 1; j++) // does not use i therefore probably touching the same data in every loop | |
{ | |
if (dat[j] > dat[j + 1]) | |
{ |
This file contains hidden or 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:math' as math; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_hooks/flutter_hooks.dart'; | |
import 'package:tuple/tuple.dart'; | |
@immutable | |
class UndoRedoHandler { | |
const UndoRedoHandler({ | |
required this.resetState, |
This file contains hidden or 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
/// Maps an error string to typical `developer` readable error messages. | |
/// See [getStatusCodeError]. For android only. | |
String _errorToHumanReadable(String errorMessage) { | |
final exp = RegExp(r':\s([0-9]+):'); | |
final match = exp.firstMatch(errorMessage); | |
if (match == null) { | |
return errorMessage; | |
} else { | |
final group = match.group(1); |
This file contains hidden or 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:collection/collection.dart'; | |
// Given an array of User HashMaps with keys of Id and Age, | |
// write in Dart the code to return an array of User Ids for | |
// users whose Age is an even number. Make the code as efficient and terse as possible. | |
List<int> evenAgedUserIds(List<Map<String, dynamic>> usersEntries) { | |
return usersEntries | |
// ignore: avoid_dynamic_calls | |
.where((userEntry) => userEntry['age'] % 2 == 0) | |
.map((userEntry) => userEntry['id'] as int) |
This file contains hidden or 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:cached_network_image/cached_network_image.dart'; | |
import 'package:firebase_storage/firebase_storage.dart'; | |
import 'package:firebase_storage_hooks/firebase_storage_hooks.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_cache_manager_firebase/flutter_cache_manager_firebase.dart'; | |
import 'package:flutter_hooks/flutter_hooks.dart'; |
NewerOlder