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 processing.core.PApplet; | |
import com.google.common.collect.EvictingQueue; | |
public class Sketch extends PApplet{ | |
private final EvictingQueue<Integer> fpsValues = EvictingQueue.create(100); | |
private int lastFpsOutputSec = -1; | |
public void draw(){ | |
fpsValues.add((int) frameRate); | |
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
/** | |
* Way 1 | |
*/ | |
fun treeUriPath(contentResolver: ContentResolver, treeUri: Uri): DocumentsContract.Path? = | |
DocumentsContract.findDocumentPath( | |
contentResolver, | |
DocumentsContract.buildChildDocumentsUriUsingTree( | |
treeUri, | |
DocumentsContract.getTreeDocumentId(treeUri) | |
) |
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
# $$$$$$$$$$ Pre-Installation $$$$$$$$$$$$$$$ | |
# Ensure presence of cuda-compatible GPU | |
lspci | grep -i nvidia # should output something like '01:00.0 3D controller: <YOUR_NVIDIA_GPU_KIND> (rev a1)' | |
# Ensure gcc being installed | |
gcc --version | |
# Optional: install the nvidia cuda toolkit | |
sudo apt-get update |