I had a task to capture peoples faces for AI biometric recognition for authentication purposes. The “hard” part supposed to be the face recognition (silly me). There are a bunch of libraries to do that for me, but the video html tag went out of control. The tricky part was to make sure that the video is filling up the screen on desktop, but also on mobile. When setting width and height to the video tag via js - the video looks weirdly out of place.
There is a website I made for some friends - https://www.getmanstudio.com which lives on a digitalocean droplet. The droplet had multiple uses for me in the past, but lately this website was the only thing living there, and I did not really want to pay the $6/mo for it, so the logical thing for me to do was to move the website. It was also quite old, so a little remake wouldn’t hurt.
I have to share this. After long search for a great cross-platform email app I tried Thunderbird: works great, not so great outlook support. BlueMail: meh. I finally found the best app, which works great and suits perfectly my needs: Mailspring. Happy emailing!
I try to indroduce tests even to my side projects, just because tests fundamentally save time and make you think more about the project architecture. So of course while using the famous flutter_bloc library for my projects I wanted a nice way to test it. I was very pleasantly surprised when I discovered that the library provides a very nice and elegant way to test the bloc via bloc_test. First of all, add it to your dev dependencies:
If you are looking for some docs on how to localize your flutter app, the official one is the way to go https://docs.flutter.dev/development/accessibility-and-localization/internationalization. Here I am only noting the steps, so I can recall that for my next app localization attempt with a Flutter app. So the steps are as follows: Add your flutter localization library in pubspec.yaml: dependencies: flutter: sdk: flutter flutter_localizations: # Add this line sdk: flutter # Add this line intl: ^0.
Sometimes I play around with my sound devices, just because I have quite a few connected to my laptop. Sometimes it means I forget to switch them back to where they need to be. This particularly works for my webcam audio, which is selected automatically when I change my output to hdmi audio. To locate the desired audio device call cat /proc/asound/modules. My output looked like this: 0 snd_hda_intel 1 snd_hda_intel 2 snd_usb_audio Since I only have one usb audio device installed, and it is my webcam, I want to block snd_usb_audio.
This one contains a bunch of no-code backends. Very useful! https://draftbit.com/blog/11-best-no-code-and-low-code-backends-for-2021
Another little one today, I specifically tried to build the vlc-android app myself to fix a song title issue I have. However, it wasn’t building with the error Gradle sync failed: Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl in /home/ariedov/Projects/vlc-android/gradle/wrapper/gradle-wrapper.properties to gradle-7.0.2-all.zip (5 s 953 ms) but there is no gradle/* or gradlew included in the repository. That’s not how I usually have my repositories, so I did not have an immediate solution to that problem.
Another short Dart tip today, and another one that occurred while testing some dart code, but most useful for me when parsing JSON. Lists For List<dynamic> I got from a JSON Map, when trying to save them as List<String> the errors like: type 'List<dynamic>' is not a subtype of type 'List<String>' The fix is as simple as using something like that: List<String> correctList = <dynamic>.cast<String>(); Maps And for JSON maps that I needed to be parsed as Map<String, String>:
Reading a file in Dart is very straigthforward, so for this article not to be 4 lines long I have to write something down. I, personally, needed this for having a json in Unit tests. final file = File("path/to/file"); final fileContents = await file.readAsString(); Nice reading files in Dart to you =)