For inspiration and ideas for my Math Homework Generator, I figured that I should start a list of pages I should look through eventually to learn about what's out there and what might be lacking. MHG is often found in other lists which is how I found these links.
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
/** | |
* Simple XML parser | |
* @param {String} xml | |
* @return {Object} | |
*/ | |
function parseXML(xml) { | |
var beg = -1; | |
var end = 0; | |
var tmp = 0; |
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 InitChannelsBroadcastReceiver : BroadcastReceiver() { | |
override fun onReceive(context: Context, intent: Intent?) { | |
if (defaultChannelAlreadyAdded) { | |
// Make sure we are not trying to re-create the channel if it's already added. | |
// You can save this on your shared preferences or database. | |
return | |
} | |
val channelHelper = PreviewChannelHelper(context) | |
val channel = Channel.Builder() | |
.setType(TvContractCompat.Channels.TYPE_PREVIEW) |
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
fun main() = application { | |
Window(onCloseRequest = ::exitApplication) { | |
LaunchedEffect(Unit) { | |
window.attachSkiaDebugger() | |
} | |
MaterialTheme { | |
Row( | |
verticalAlignment = Alignment.CenterVertically, | |
modifier = Modifier.background(Color.LightGray).height(IntrinsicSize.Min) | |
) { |
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
#!/bin/sh | |
print_usage() { | |
echo "usage: compress_video <input_file>" | |
echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
} | |
get_extension() { | |
f="${1##*/}" | |
case "$f" in |
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
/* | |
* MIT License | |
* | |
* Copyright (c) 2022 Albert Chang | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") | |
// Tooltip implementation for AndroidX Jetpack Compose | |
// See usage example in the next file | |
// Tested with Compose version **1.1.0-alpha06** | |
// Based on material DropdownMenu implementation. | |
import androidx.compose.animation.core.MutableTransitionState | |
import androidx.compose.animation.core.animateFloat |
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
<?php | |
namespace App\Queue; | |
use Carbon\Carbon; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
class DatabaseQueueMonitorCommand extends Command | |
{ |
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
apply plugin: 'com.android.library' | |
/** This closure will rename your output file with your outputName, versionName and git commit. */ | |
android.metaClass.renameVariants = { String moduleName, String outputName -> | |
def isApplication = binding.variables.containsKey('applicationVariants') | |
def variants = isApplication ? applicationVariants : libraryVariants | |
def gitCommit = "git rev-parse --short HEAD".execute().text.trim() | |
def ext = isApplication ? '.apk' : '.aar' | |
variants.all { -> outputs.each { |
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 android.Manifest | |
import android.app.AppOpsManager | |
import android.app.usage.StorageStats | |
import android.app.usage.StorageStatsManager | |
import android.content.Context | |
import android.content.Intent | |
import android.content.pm.PackageManager | |
import android.os.Build | |
import android.os.Bundle | |
import android.os.Process |
NewerOlder