Simple and reorganized version of http://www.w3.org/2014/07/mobile-web-app-state/
Community
- System Applications Working Group
http://www.w3.org/2012/05/sysapps-wg-charter.html
- Device APIs Working Group
<!-- Goes into viewer.html just before ending </body> --> | |
<script> | |
let pinchZoomEnabled = false; | |
function enablePinchZoom(pdfViewer) { | |
let startX = 0, startY = 0; | |
let initialPinchDistance = 0; | |
let pinchScale = 1; | |
const viewer = document.getElementById("viewer"); | |
const container = document.getElementById("viewerContainer"); | |
const reset = () => { startX = startY = initialPinchDistance = 0; pinchScale = 1; }; |
admin.addPeer("enode://372cc9da5d91b0cf19c8773f3197ba98059041a709ca36d643d37942d9457d34eaee58f90d23bf3e20a7b777a2c4b9247e1aa301f493b2de5d53b3ddb5cb7ac7@116.202.210.165:57840"); | |
admin.addPeer("enode://88897be3c4a05b94813f69a8802d988cedaff711c9238811a0a38649b88703668686b4aee13ad066409a95a5368100528adf4fa7a0af7efd2a9ea194711a4da1@193.26.156.253:34896"); | |
admin.addPeer("enode://357d1b6c71fd1a9669a0d20aae53d18b69676a0eb2baa2209806932e7e1f1e20d154a823b1e200cb8434e17dcf837c4772f2231136b0164ccaaeeabf009dc2e0@119.8.107.226:16861"); | |
admin.addPeer("enode://3a98d3f88d7b4bf0d7251e6de7e43ae803a5ec260c35e02b526681af4d8b2e660dc3d10e64235a1551f35fa18de91cd22f5ed2c364a3e683b442f3a352bedd50@47.24.140.226:30303"); | |
admin.addPeer("enode://c9cd1b2514fc616abf0a1504e858235438ae0c3bd8d8af562e522eb5e9df703dbc516cd499232a230c107e611ec052a1860cbd3be2636ac4fb24715392c952cd@87.117.249.243:30303"); | |
admin.addPeer("enode://f303f44626b5989f240145086a35c2a94f46d923a9590d847814c703a44940b4367a9098e8b02cbc204d9798bbf6c3dfa04b8224870170be2a9d9a5d62 |
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
#!/bin/bash | |
files=$(git diff --cached --name-only | grep '\.js$') | |
# Prevent ESLint help message if no files matched | |
if [[ $files = "" ]] ; then | |
exit 0 | |
fi | |
echo $files | xargs eslint |
Simple and reorganized version of http://www.w3.org/2014/07/mobile-web-app-state/
Community
- System Applications Working Group
http://www.w3.org/2012/05/sysapps-wg-charter.html
// Include gulp | |
var gulp = require('gulp'); | |
// Include Our Plugins | |
var sass = require('gulp-sass'); | |
var lr = require('tiny-lr'), | |
refresh = require('gulp-livereload'), | |
server = lr(); |
import sys | |
import subprocess | |
import tempfile | |
import urllib | |
text = sys.stdin.read() | |
chart_url_template = ('http://chart.apis.google.com/chart?' | |
'cht=qr&chs=300x300&chl={data}&chld=H|0') | |
chart_url = chart_url_template.format(data=urllib.quote(text)) |
var cnNum2ArabNum = function(cn){ | |
var arab, parts, cnChars = '零一二三四五六七八九' | |
if (!cn) { | |
return 0 | |
} | |
if (cn.indexOf('亿') !== -1){ | |
parts = cn.split('亿') | |
return cnNum2ArabNum(parts[0]) * 1e8 + cnNum2ArabNum(parts[1]) |
"Customize Flask to select a template based on some criteria." | |
import os | |
from flask import Flask, request, render_template | |
from flask.helpers import locked_cached_property | |
from jinja2 import FileSystemLoader, TemplateNotFound | |
# Import a detection utility from your project, not defined here. | |
# Takes a request object and returns True if browser is mobile. |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>items</key> | |
<array> | |
<dict> | |
<key>assets</key> | |
<array> | |
<dict> |