###Clustered Force Layout using D3 v4
Modified from Mike Bostock's original.
Looks more like the version with custom gravity.
Compare with Shan Carter's v4 adaptation.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Font Test</title> | |
<link rel="stylesheet" href="adobe-blank.css"> | |
<style> | |
@font-face { | |
font-family: 'zcoolwenyiti'; |
{ | |
"time": { | |
"__type": "Date", | |
"iso": "%TIME" | |
}, | |
"latlng": { | |
"__type": "GeoPoint", | |
"latitude": %LAT, | |
"longitude": %LON | |
}, |
import HandlerProxy from 'zrender/src/dom/HandlerProxy'; | |
// You can also use the `addEventListener` to implement the `docHandlerProxy.on` below | |
// There's no much difference. | |
const param = target => ({target}); | |
export default function GestureMouse (handler) { | |
let checkingTarget = null, | |
panningTarget = null; | |
const docHandlerProxy = new HandlerProxy(document); |
license: gpl-3.0 | |
height: 960 |
###Clustered Force Layout using D3 v4
Modified from Mike Bostock's original.
Looks more like the version with custom gravity.
Compare with Shan Carter's v4 adaptation.
#!/usr/bin/env python | |
import os | |
# Return CPU temperature as a character string | |
def getCPUtemperature(): | |
res = os.popen('vcgencmd measure_temp').readline() | |
return(res.replace("temp=","")) | |
# Return RAM information (unit=kb) in a list | |
# Index 0: total RAM |
function jsonStringify (obj) { | |
var cache = [] | |
function filter (key, value) { | |
if (typeof value === 'object' && value != null) { | |
if (cache.includes(value)) { | |
return // may circular | |
} | |
cache.push(value) | |
} | |
return value |
from datetime import timedelta | |
from flask import make_response, request, current_app | |
from functools import update_wrapper | |
# replaced 'basestring' width 'str' for python3 | |
def crossdomain(origin=None, methods=None, headers=None, | |
max_age=21600, attach_to_all=True, | |
automatic_options=True): | |
if methods is not None: |
// parseSearch('?gws_rd=ssl') | |
// {gws_rd: "ssl"} | |
function parseSearch (str) { | |
str = str.split('?').pop() | |
var search = {} | |
str && str.replace( | |
/([^?=&]+)(=([^&]*))?/g, | |
function ($0, $1, $2, $3) { | |
search[ $1 ] = $3 |
var system = require('system'), | |
fs = require('fs'), | |
process = require("child_process"); | |
var children = {}; | |
var port = system.args[1]; | |
var isParent = system.args[2]; | |
console.log('[process] port:', port); |