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 StuffContainer(val context: Context?) { | |
private val prefs = android.preference.PreferenceManager.getDefaultSharedPreferences(context) | |
/** This is stuff. */ | |
var stuff: Boolean | |
get() = prefs.getBoolean("stuffkey", false) | |
set(value) { | |
prefs.edit().putBoolean("stuffkey", value).apply() | |
} |
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 java.math.BigInteger | |
/** | |
* The extended euclidian algorithm for two numbers (BigIntegers included). Also prints a LaTeX tabular of all the steps. | |
* | |
* Looks for `ax + by = gcd(a, b)` where `a` and `b` are the input variables. | |
* [gcd] contains the gcd, [x] and [y] contain `x` and `y` as seen in the previous expression. | |
* | |
* @author Ruben Schellekens | |
* @author Thomas Schouten |
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
# author: Sten Wessel | |
# Instructions: | |
# Put this file on the same level as your LaTeX file | |
# Put your R scripts in a folder scripts/ | |
# [IntelliJ] If you want to run your R scripts, make a run configuration as with working directory the folder this file is in | |
# In your R script, make comments like "## ---- part.a ----" to define sections | |
# In this file, edit the definition of R script content (the HOMEWORK.1 list) | |
# In the preamble in your LaTeX file, add the following: | |
# |
NewerOlder