A list of tutorials on how to upload & get direct mp3 link on some websites.
With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.
autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master
and add the last line:
#
# Automounter master map
#
+auto_master # Use directory service
A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.
By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?
/** | |
* Please review the class below and suggest improvements. How would | |
* you refactor this class if it would be in a real-life project? | |
* There are many problems here, both high-level design mistakes, | |
* and low-level implementation bugs. We're interested to see high-level | |
* problems first, since they are most critical. The more mistakes | |
* you can spot, the better programmer you are. | |
*/ | |
/** |
package com.github.example; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.net.Uri; | |
import android.text.TextUtils; | |
import android.util.Log; | |
import androidx.annotation.Nullable; | |
import androidx.core.content.FileProvider; |
@OptIn(ExperimentalAnimationApi::class) | |
@Composable | |
fun Heart(modifier: Modifier, horizontalPadding: Int, bottomMargin: Int) { | |
val width = LocalConfiguration.current.screenWidthDp | |
val height = LocalConfiguration.current.screenHeightDp - bottomMargin | |
val yRandom = Random.nextInt(0, height / 2) | |
val xRandom = Random.nextInt(horizontalPadding, (width - horizontalPadding)) | |
val state = remember { |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
Leaderboard Using Redis | |
http://labs.strava.com/blog/koms-powered-by-redis/ | |
Strava KOMS, Powered by Redis | |
---------------- | |
http://aimeeault.com/2014/06/22/making-the-most-of-redis-and-sorted-sets/ | |
For example, what if I only want to see a leaderboard of members who are between the ages of 18 and 49? The Sorted Set contains no information on how old each member is. And I don’t want to maintain a separate Redis Sorted Set for just these users, because that’s kind of redundant, right? You probably don’t want to fetch every single one of the potentially hundreds of thousands of records and filter individually… that’s not very efficient! There’s a couple of ways you could approach this with Redis. One is by way of Lua scripting with use of EVAL (which runs Lua) and ZSCAN (which can be used for matching keys and values by rules, similar to regular expressions). |
def permute(sequence, index=0): | |
length = len(sequence) | |
if index > length: | |
raise StopIteration | |
if index == length: | |
yield sequence | |
else: | |
for i in range(index, length): |
def perm(xs) : | |
if xs == [] : | |
yield [] | |
for x in xs : | |
ys = [y for y in xs if not y==x] | |
for p in perm(ys) : | |
yield ([x] + p) |