11/30/2020

Room database with multiple different entities

I searched for a long time to find the answer to my question of how to create a Room Database in Android Studio with multiple entities (a.k.a. model classes). While making an app, I came across the point that "Each RoomDatabase instance is fairly expensive, and you rarely need access to multiple instances within a single process.(source)

But I finally found this:

Incrementally migrate from SQLite to Room, which has an example that describes that the entities are entered as a list.

E.g. the beginning of the Database.java:

@Database(entities = {list goes here}, version = 1)

5/17/2019

Splatter and Farfalle noodles

Careful eating Farfalle noodles with red pasta sauce and white clothes. Splatter stain city.

1/15/2019

Filling of dried-out inland seas

When global warming results in a rise in sea level, if the level gets high enough to crest areas that start refilling dried out inland seas (Death Valley, see Sahara Sea), how much of the sea volume will be offset?

6/27/2017

"Calculating the efficiency of prayer"

The song Dead Enough for Life by Icon of Coil came on my Pandora, and I heard the line "efficiency of prayer," which made me want to see if anyone had written any snarky/satirical articles about how to "calculate the efficiency of prayer." Unfortunately there were no(!) Google search results for the quoted search terms.

A rough estimate could be calculated with the following simple formula:

Percentage efficiency (or perhaps "miracle rate") = (Number of times prayed for certain thing) / (Number of times the desired outcome has occurred) * 100

My guess is that "miracle rate" for bringing back people from the dead approaches zero, but may actually be a real positive number for self-fulfilling prophesies, like a job interview going well.

Good luck!

4/07/2017

MS Outlook 2016 for Gmail

I was trying to set up MS Outlook 2016 to work with Gmail, but the default settings simply do not work.

You will first need to make changes in your Gmail settings that are described here: https://support.google.com/mail/answer/7126229.

Then when setting up your Outlook client, do it manually, and go deep into the settings to change the incoming and outgoing ports to match what are on the page linked above, turning on authentication for outgoing mail.

Next, if you have 2-Step Verification for your Google Accounts (which I recommend you do, for better security), you'll find that your gmail password will not work to connect through Outlook. You will need to add an "App password" for Outlook at this link https://security.google.com/settings/security/apppasswords.
More detailed instructions on how to set up an "App password" for Outlook can be found here: https://www.msoutlook.info/question/902.

12/26/2016

Temporary Location Sharing App Idea

With virtually everyone carrying a GPS locating device at them at all times, it would be great to have an app where, for a discrete period of time, you could share your location with specific people.

This would be great for social events like pub crawling, where your group of friends could pick up their devices and see where their comrades are if they get separated.

Baked in functions:
Chat, for quick communication
Ability to temporarily suspend revealing your location for a certain amount of time
Notification when pre-defined time period of reveal or suspended location is ending to confirm the end. There should be an option to "snooze" the effect here too. (Keep revealing location to friends for a certain period, or keep suspending your location.
To save battery, the user could select how often they want for their location to be updated (at a period interval, or whenever another user opened the app to query their location).

The temporary nature of this is key, because after you leave the pub crawl, you don't need to be sharing your location anymore. (Or if you're too wasted to confirm the end of your location sharing, you friends can come find your body passed out in that alley.)

12/14/2016

Using multiple large monitors effectively

Have multiple large monitors attached to your computer? Find yourself using the window snap feature on Windows OS, but find that it is too limited in the 2x2 options?

I found a great open source app called GridMove that I highly recommend.

GridMove allows you to build custom "grids" that have preset window dimensions, for example splitting your monitor into thirds, instead of just halves. A must-have especially for high resolution displays.

My favorite grid made by user Tyinsar is the TripleHead2Go grid, which has screen thirds and more. I modified his TH2G v2.grid to work with my two monitors.

Pastebin link to my adapted grid.

In order to use this grid, make a notepad doc, paste in the code from pastebin, and save the file into your GridMove\Grid directory with a .grid extension. The default directory is C:\Program Files (x86)\GridMove\Grids.

Edit: If you have three monitors, and your video card only supports two, I suggest using MonitorSwitcher to set up a hotkey to change your active monitors on the fly.

11/14/2016

New Gmail emails not showing up in Inbox, only showing up in "All Mail"

If you're having this problem, check to see if new emails you are receiving are getting the "Inbox" label. If they are not, go into Settings -> "Filters and Blocked Addresses" and check them carefully. You may be skipping your Inbox!

11/06/2016

Fixing garbage disposal

Our garbage disposal wouldn't start grinding when we flipped the switch. Instead all we heard was an electric hum. With a little searching found this: http://removeandreplace.com/2013/11/25/fix-humming-garbage-disposal-fast-easy-diy/

After a bit of forced rotation using an Allen wrench on the bottom of the unit, it started functioning properly again.

9/27/2016

Turn on keyboard backlight Toshiba Satellite Radius P55W

If you are trying to toggle or switch on the keyboard backlight with the Toshiba Satellite Radius P55W, try pressing Fn+Z to cycle through the settings.

7/28/2016

Abbreviation Fail

"White blood cells" has fewer syllables than "WBC," but I've heard people giving scientific lectures say "double-u bee cee." What a waste of breath and loss of clear communication.

3/25/2016

Turns out Neil Degrasse Tyson is an asshole

Turns out Neil Degrasse Tyson is an asshole https://imgur.com/gallery/34fjXT6

Scared the Carp out of Me

Perhaps you have heard of spirit animals. While many identify themselves with one, my life was instead a reimagined menagerie.

My spirit bear would bare its teeth in wide ranges of anger. My spirit horse would lead me to run on distant shores. My spirit snake would sneak me past my garrulous neighbor who could endlessly speak about her arugula.

Their visitations ranged from sensible to senile.

After every production, my spirit pigeon made me feel a mere epigon. My spirit snail has slain my social schedule. But the newest, and perhaps worst, my spirit newt imparts a wetness to my armpits.

As you may sense, this regular spirit mestee has a self-esteem of a snibbed bison. My love life had the prospects of a male mantis.

Regardless, a lovely young lass had taken a liking to me.

Aside from animal spirit exceptions, our first date went as well as could be expected, but I was so nervous for our first kiss that when she puckered her lips, it scared the carp out of me.


Artist credit

3/21/2016

Downloading Voicemail Audio from Project Fi

If you have Project Fi, you can access, share, and download your voice mail from the internet from your Google Voice account.

1. Log in to your Project Fi account.

2. Scroll all the way to the bottom of the page and click on the "Google Voice" link.

3. Find your voice mail on the list, then click the "more" button to open a list of options to save or share your voicemail. You can download the audio from a voice mail as an mp3; very convenient..

Thanks to Scott Greenstone for his (more detailed) guide.

2/24/2016

Roomster.com is a fake scam

Recently made a listing for the room we are looking to rent in our house. I was contacted by a fake identity suggesting I look at thier profile on Roomster.com. It is purportedly a site that connects owners and people looking to rent, but I assure you, it is purely a scam. Do not check it out.

How do you personally go about identifying what is legit and what is just clickbait on the web? It's too bad there are so many websites like this.

12/24/2015

2014 Super Frog Christmas Extreme

Some snapshots of last year's lab Christmas decorations, along with a poem.
Link.
Credits to Govind Shah and other members of MCBL-O for designing and decorating.

11/26/2015

Much Time Passes

Much Time Passes by Shigeki Miyake-Stoner

Bits of sand lay deep inside a heap of waste and garbage in a large land-empty. Much time passes.

Slowly, the sand amalgamates into small, clear glass crystals, which combine further into glass shards with razor-sharp edges.

Trucks start routinely coming and taking away load after load from the land-empty, carrying it away to facilities for processing. In one such truck, all the shards of glass amongst other scraps of materials, are picked up and dutifully carried away.

At the processing facility, the shards of glass are loaded onto a conveyor belt. Alongside the belt, people are at work, taking different sorts of items coming on their own conveyor belts, and placing them on the main conveyor belt to create a diverse mix of materials. Plastic bottles, metals, and cardboard combine into a disorganized mass.

At the destination of the conveyor belt, the mixture is aliquoted into bags, and the bags are loaded onto trucks to take them away. One such bag, containing the glass shards, finds its way on a truck heading into the city.

The truck arrives at one man’s house, and puts several of them into an empty, large black can. The truck leaves the filled can at the edge of the street by the man’s house.

At the street, he holds his breath and reaches into the large black can and pulls out a sealed bag from the top. He carries the bag inside and sets it into his source bin. He undoes the tie sealing the bag and attaches the edges of the bag onto the lip of the bin.

He turns the source bin on its side, and using a broom, he encourages the shards of glass from inside the bin out onto the floor.

The man waves his hand across the table, and the glass shards from the ground anneal with each other and lift up onto the table, assembling into a drinking glass in his palm.

The man slowly regurgitates water into the glass, and takes the glass to the swell, where he holds it under the tap, and turns the faucet to evacuate the water into the city lines. He puts the empty glass onto a shelf with other glasses.

A number of times he takes the glass from the shelf and rinses it in the swell, then regurgitates water into it and sends it back into the city lines. One time, instead of returning it to the shelf, he takes the glass and lays it gently into a box. He tucks the folds of the box into place, then runs his finger along the edges of the box to conjoin its tape and seal it.

The man carries the box to the Sell down the street and heads straight to the register, where he accepts money from the clerk, then he takes the box and puts it on a shelf alongside many other boxes like it. He wanders around the store and looks at other items for some time before leaving.

The clerk takes the box from the shelf, and puts it out on the curb where a courier picks it up and takes it away to a defactory.

At the defactory, the glass is unboxed and unwrapped by machines on a conveyor belt, precisely removing the tape and materials that have been the transport for the cup.

The glass cup is rotated in a furnace, and it is coaxed into a globular form with prodding metal bars. When it has become a featureless molten glob, it is returned to a large kiln which holds much more molten glass.

The molten mass of glass is cooled, and as it cools, bits of sand begin to crack off the primary mass into fine grains and becomes sand. The cooled sand is sent to a facility where trucks are loaded to take it to the beach.

The grains of sand are laid down gently on to a beach by a Filler. The machine fills a deep depression perfectly by pouring out the contents of its bucket.

The sand is slowly swept out to sea. Much time passes.

5/21/2015

Working with R for the first time; installing a package written in an older version of R

First-time R user here. I struggled with getting the R package XenoCat working, here I describe how I got it to work, and some of the pitfalls along the way. The XenoCat package, created by Laajala et al. is a tool for statistically analyzing xenograft treatment experiments. See Improved statistical modeling of tumor growth and treatment effect in preclinical animal studies with highly heterogeneous responses in vivo.

I followed instructions in the instruction PDF from the XenoCat page, and downloaded the current version of R (3.2.0) from the R project homepage. The command in the instruction document to install the packages from the R command line was unclear, and kept throwing errors. I tried unzipping the XenoCat and other packages manually into the library sub folder in the R installation folder. This is not the same as installing, apparently.

Eventually I looked in the R FAQ and found that from the R GUI there is a Packages menu that installs packages. I selected and installed the dependent lme4 package, then selected the locally downloaded XenoCat_1.0.3.zip package. When I tried to access the XenoCat library, it told me it was built before R 3.0.0, and to reinstall it.

I was able to find a previous version of R that XenoCat was tested in (2.14) on the previous releases of R page, and after installing it and repeating the installation of the lme4 and XenoCat packages through the Packages menu in the GUI, it seems to be working.

I am leaving out many other stupid attempts I tried to get this to work, so I hope this document might help some other first-time R users get started with it. I frequently run into the problem of new jargon with new software that creates a significant barrier to entry.