This variation of a donut chart demonstrates how to update values with an animated transition. Clicking on the radio buttons changes the displayed metric.
Next: Missing Data
Previous: Static Update
This variation of a donut chart demonstrates how to update values with an animated transition. Clicking on the radio buttons changes the displayed metric.
Next: Missing Data
Previous: Static Update
function showLoginPopup(){ | |
mMain.showPopup('popup_login'); | |
} | |
function login(){ | |
mMain.login(); | |
} | |
function getInput(which){ | |
var selector, | |
input; | |
switch(which){ |
This bookmarklet will add a key shortcut to lauch the speech on duolinguo.com
This way you can keep your hand on the keyboard without having to lick on the speaker button to hear the pronunciation
By default it set ctrl
as the keyboard but you're free to set the key you want (see install procedure)
Bookmarklets are tiny programs stored inside bookmarks. Similar to add-ons, extensions, and user scripts, they add new tools to your web browser. Bookmarklets are shared on web pages as web links. You don't actually "install" a bookmarklet. You simply add it to your bookmarks. It just sits there patiently until you want to use it.
function json2csv(data, header) { | |
if(header) { | |
data.unshift(header); | |
} | |
return data.map(function(e) { | |
for(var i=0; i<e.length; i++) { | |
if(~e[i].indexOf(',')) { | |
e[i] = '"' + e[i] + '"'; | |
} | |
} |
#Export a google music playlist
Export to a text list and use anpother tool (like http://www.playlist-converter.net/#/) to import it to another app (like deezer, spotify.. )
Currently export to a simple list format, because that's enough to be supported by http://www.playlist-converter.net/#/.
This script will generate from your playlist page a text like this
function extractSpotify (data) { | |
var tracks = data.tracks; | |
var extract = tracks.map( track => ({ | |
artist: track.artists[0].name, | |
title : track.name, | |
})); | |
return extract; | |
} | |
function formatSpotify (extracted) { | |
var out = extracted |
export const getWeekNumbersForYear = year => { | |
const date = dayjs(`${year}-01-01`) | |
const numberOfWeek = date.isoWeeksInYear() | |
const arrayOfWeekWithFirstDay = [] | |
for (let week = 1; week <= numberOfWeek; week += 1) { | |
const day = dayjs().year(year).isoWeek(week).day(1) | |
arrayOfWeekWithFirstDay.push({ |