Skip to content

Instantly share code, notes, and snippets.

@JimmyCheng
JimmyCheng / vis_timeline_with_arror_first_test.html
Last active May 18, 2023 22:49 — forked from frboyer/vis_timeline_with_arror_first_test.html
This is test to see how difficult it would be to add multiple arrows to vis.js timeline view. Can be previewed with https://gistpreview.github.io/?b5a7a48e51d0b5d62aee718e10039e16
<!DOCTYPE html>
<html>
<head>
<title>Timeline | Group example, with an arrow</title>
<style>
body,
html {
font-family: arial, sans-serif;
font-size: 11pt;
@JimmyCheng
JimmyCheng / lodashMap.js
Last active September 27, 2018 01:44
lodash map without iterator functions
//The map function in lodash is quite frequently used. e.g.:
const team = [{"name": "jimmy", "rate": 100}, {"name": "tom", "rate": 88} ];
_.map(team, t=>t.rate + 1);
//so normaly the iteration function is provided. But what if the iteration function is not there?
const team = [{"name": "jimmy", "rate": 100}, {"name": "tom", "rate": 88} ];
const b = _.map(team);
console.log(b); //give the same result.
//actually it can be useful in this case: