This is a very easy error to fix and usually is caused when you change a Room entity configuration. For testing purposes, just increment your version number in your abstract RoomDataBase() class & add a call to “.fallbackToDestructiveMigration()” just before “.build()” on your Room.databaseBuilder() call. NOTE, THAT THIS MAY DESTROY ALL SAVED DATA AND SHOULD…(Continue Reading)
Author: jonathan
Cannot find symbol class FragmentIngredientEditBindingImpl DataBinderMapperImpl.java
This was a rather cryptic Gradle build error for a Kotlin App I was testing. Turns out, I had used the wrong object variable name of @{vm.ingredient.quantity + “”} The correct object variable was named “sourceQuantity”. Fix: Check your variable names in your XML layout files. Once I corrected the name my app build was…(Continue Reading)
Perl crypt function for more than 8 letters
I noticed while testing a new security module for my web interface that the password was working even when I added characters to the end of it. You see, I was trying to test the security module to ensure that when the wrong password was entered, the program would deny my access. I found the…(Continue Reading)
Know thy $self
I happened to notice two errors in one very small sub that I was testing out in Perl. I should note that I made these two very small errors while rewriting a custom Perl security module. Let’s take a look at the function before I spotted the errors: # excerpt from Security3.pm sub _cust_crypt {…(Continue Reading)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xb6 in position 136: invalid start byte
I got the following error when trying to read a file off a network drive for use by Pandas: UnicodeDecodeError Traceback (most recent call last) pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._convert_tokens() pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._convert_with_dtype() pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._string_convert() pandas/_libs/parsers.pyx in pandas._libs.parsers._string_box_utf8() UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xb6 in position 136: invalid start byte During handling of the above…(Continue Reading)
OSError: Unable to locate Ghostscript on paths
While reading in an EPS file, I get the error “OSError: Unable to locate Ghostscript on paths” Here’s my code that generates the error: def _readImage(self, image): actual_file = image # Try each, and open the one that actually exists: if exists(CFG.image_source + image.replace(“.gif”, “.eps”)): actual_file = image.replace(“.gif”, “.eps”) elif exists(CFG.image_source + image.replace(“.gif”, “.png”)): actual_file…(Continue Reading)
Excellent books to expand programming skills.
Kotlin and Android Development featuring Jetpack – Covers a vast array of Kotlin features, with a good focus on Jetpack. This may have been the most difficult read I’ve ever encountered, but I started it with almost no understanding of app development with Kotlin, never mind Jetpack. I highly recommend this book to anyone currently…(Continue Reading)
Firebase addOnSuccessListener() and addOnFailureListener() to a .setValue() call in Kotlin
When the record write succeeds, I want to show them a “purchase complete” fragment, and if the record is not created, I want to at least warn them with an error code.
Use Care in Kotlin when Calculating Future Dates with Epoch Times
So, I’m left for my sage advice of the moment: “Use care in Kotlin when calculating future dates with epoch times”. Make sure any amounts you add to an epoch time are of the Long data type, just in case you edit the code later and forget to change it.
Easy Perl Dispatch Tables with Security Levels
The vast majority of Perl scripts that I write are for managing information via HTML forms. The script will generate the form, and then process the results when the user hits submit. In order to keep track of what form the user is submitting data for, I’ve generally used a hidden form variable named “state”.…(Continue Reading)