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
function flattenDependencies(dependencies) { | |
let nodeSet = {}; | |
Object.keys(dependencies).forEach(node => nodeSet[node] = true); | |
Object.values(dependencies).forEach(parents => parents.forEach(node => nodeSet[node] = true)); | |
const nodes = Object.keys(nodeSet); | |
// Nodes that the key node depends on, that haven't been resolved yet. | |
let unresolvedParentsForNode = {}; | |
// Nodes that have no dependencies. | |
let roots = []; |
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
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("jp.go.mhlw.covid19radar"); | |
if (launchIntent != null) { | |
startActivity(launchIntent); | |
} |
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
// XOR list coding quiz solution | |
class Memory { | |
constructor() { | |
this.memory = {}; | |
this.pointerAccumulator = 100; | |
} | |
alloc() { | |
const pointer = this.pointerAccumulator++; | |
const obj = { |
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
# To enable SURF/SIFT in the Java binding for OpenCV from homebrew: | |
# (1) (If you already have opencv installed) | |
# brew uninstall opencv | |
# (2) brew edit opencv | |
# (3) Copy contents of this this file below everything else in the file | |
# (4) brew install --build-from-source opencv | |
__END__ | |
diff --git a/modules/features2d/misc/java/src/cpp/features2d_manual.hpp b/modules/features2d/misc/java/src/cpp/features2d_manual.hpp | |
index 6d72bd9..ad2f49d 100644 |
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
package com.ken.phidgets.challenge; | |
import com.ken.phidgets.PhidgetsUtil; | |
import com.phidgets.InterfaceKitPhidget; | |
public class Blink { | |
public static void main(String[] args) throws Exception{ | |
InterfaceKitPhidget ik=PhidgetsUtil.getAnyInterfaceKit(); | |
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.awt.Desktop; | |
import java.io.*; | |
import java.net.URL; | |
/** | |
* Ported from: http://techbeyond.wordpress.com/2012/02/04/nokia-3d-webgl-map-experiments/ | |
* Originally: https://gist.github.com/1651767 | |
* @author ken | |
* 13.02.08 @kenkawakenkenke | |
* |