boolean'ing a mesh doesn't give proper results without high enough resolution (without some kind of threshold value addition).
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
// 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 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 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 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 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 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'; |
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 App extends HookConsumerWidget { | |
const App({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context, WidgetRef ref) { | |
final router = useMemoized(() => Router()); | |
final locale = ref.watch(localeProvider); | |
return MaterialApp.router( | |
debugShowCheckedModeBanner: !_kIsTakingScreenshots && kDebugMode, |
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
extension LoadingWidgets on List<Widget> { | |
// TODO: This will likely fail the requirements of a [ListView.builder] | |
/// Adds [loadingWidgetAfter] and [loadingWidgetBefore] to the list. | |
List<Widget> addLoadingIndicators( | |
Widget? loadingWidgetAfter, |
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 admin = require('firebase-admin'); | |
const serviceAccount: { [key: string]: any } = require('../service_key.json'); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: 'https://remac-test-prep.firebaseio.com', | |
}); | |
const firestore = admin.firestore(); |
NewerOlder