- /m/04rlf Music
- /m/05fw6t Children's music
- /m/02mscn Christian music
- /m/0ggq0m Classical music
- /m/01lyv Country
- /m/02lkt Electronic music
- /m/0glt670 Hip hop music
- /m/05rwpb Independent music
This file contains hidden or 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
"use strict"; | |
var fs = require("fs"); | |
var path = require("path"); | |
var dir = "./export"; | |
let count = fs.readdirSync(dir) | |
// we only want channel sub-directories | |
.filter(file => fs.statSync(path.join(dir, file)).isDirectory()) |
This file contains hidden or 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
{ | |
"conditions": [ | |
{ | |
"id": "D001", | |
"value": "barn" | |
} | |
], | |
"id": "PERSONNUMMERID", | |
"label": "Personnummer för barnet", | |
"placeholder": "ååååmmddxxxx", |
This file contains hidden or 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 get(obj, path) { | |
var parts = path.split(/\]\[|\]\.|\[|\]|\./); | |
return parts | |
.reduce(function(o, x) { | |
return (typeof o == "undefined" || o === null) ? x : o[x]; | |
}, obj); | |
} | |
// example: get(obj, "prop.foo[0][2].bar[3].zoom") |
This file contains hidden or 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
{ | |
"@attributes": { | |
"BloodBankCode": "021" | |
}, | |
"RunTime": "2015-06-03T10:48:04", | |
"StockLevel": [ | |
{ | |
"@attributes": { | |
"BloodGroup": "0+" | |
}, |
This file contains hidden or 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
// validate Swedish Personal Identity Number (personnummer) using checksum | |
// note: this is somewhat simplified because it does not take into account | |
// that the date of the number is valid (e.g. "000000-0000" does return as true) | |
function isValidSwedishPIN(pin) { | |
pin = pin | |
.replace(/\D/g, "") // strip out all but digits | |
.split("") // convert string to array | |
.reverse() // reverse order for Luhn | |
.slice(0, 10); // keep only 10 digits (i.e. 1977 becomes 77) |
This file contains hidden or 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
var INTERVAL = 5; | |
var list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; | |
list.reduce(function(result, value, index) { | |
var i = Math.floor(index/INTERVAL); | |
result[i] ? result[i] += value : result[i] = value; | |
return result; | |
}, []); | |
// Output: [15, 40, 11] |
This file contains hidden or 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 json | |
top = '.' | |
out = 'build' | |
def options(ctx): | |
ctx.load('pebble_sdk') | |
def configure(ctx): | |
ctx.load('pebble_sdk') |
This file contains hidden or 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
/* | |
Complete buildable project containing minimum sample code to reproduce bug: | |
https://dl.dropboxusercontent.com/u/20181/TextOverflowModeFill-bug.zip | |
Bug description: | |
Using a TextLayer with GTextOverflowModeFill seems to position the | |
leading 'j' out of place in wrapped words starting with 'j'. | |
Example screenshot of the 'j' out of place: |