Skip to content

Instantly share code, notes, and snippets.

Bob Lutz rjlutz

Block or report user

Report or block rjlutz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rjlutz / info.text
Last active Oct 10, 2019
View info.text
code is now here:
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
rjlutz / strings.xml
Created Sep 25, 2019
Building zybooks BandDatabase example in Android Studio with Master/Detail Pattern
View strings.xml
<string name="app_name">The Band Database</string>
<string-array name="bands">
<item>The Beatles</item>
<string-array name="descriptions">
rjlutz / HexagonalRing.pde
Created May 30, 2019
HexagonalRing Class for Shapes_Practice_Coding_Challenge
View HexagonalRing.pde
public class HexagonalRing extends Shape {
float sInner;
float sOuter;
HexagonalRing(float a, float b, float c, float d) {
// super(); // this happens, silently, even if omitted
x = a;
y = b;
sInner = c;
rjlutz /
Created Feb 25, 2019
Class to Perform Creation of Die Set
package edu.ggc.lutz.dungeonmasterdiceroller;
// adapted from:
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class DiceNotation {
rjlutz / generate-images.script
Last active Jan 19, 2019
Automate JMol to created multiple 2d images through looping
View generate-images.script
# script to systematically create many images of molecular structures
# R Lutz 19 Jan 2019
set antialiasImages FALSE # the following is recommended to avoid ragged
# edges around the image, per JMol docs
# ====================================================================
var rot_max = 2.0 # in degrees
var output_width = 600 # shouldn't be > 600, according to automl guidance
rjlutz / storage.dart
Last active Nov 13, 2018
helpful artifacts for the flutter student picker app
View storage.dart
// thanks -
import 'dart:async';
import 'dart:io';
import 'package:path_provider/path_provider.dart';
import 'student.dart';
class Storage {
Future<String> get _localPath async {
final directory = await getApplicationDocumentsDirectory();
rjlutz / Basic steps
Last active Oct 8, 2018
Including a SettingsActivity in your Android Studio Project
View Basic steps
1 - Use existing Android Studio project or create a new project. If new, start with a Basic Activity so that the Settings pulldown is available under the Options menu.
2 - It might be good to test deploy to make sure everyting is working ok.
3 - Create a new SettingsActivity. File -> New -> Activity -> SettingsActivity
4 - Link the new Activity to the Options menu. Navigate to app -> java -> <<your package>> -> and add the following to onOptionsItemSelected():
public boolean onOptionsItemSelected(MenuItem item) {
package package <<YOUR PACKAGE HERE>>;
import java.util.HashMap;
public class Categories extends HashMap<String, String> {
public Categories() {
put("Opinion", "opinion");
put("World", "world");
rjlutz / main.dart
Created Jun 10, 2018
template for porting to dart
View main.dart
// refer to the Java code here:
// complete the dart implementation below to have the same functionality
class Palindrome {
// TODO implement check
static check(String s) {
return true;
You can’t perform that action at this time.