Example of how to use zoom.extent and zoom.translateExtent to limit panning/zooming in d3 v4. The initial state of the visualisation are centered on coordinates [500, 1500] using zoom.transform. The limits for panning/zooming are set to [0, 5000].
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
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/hmac" | |
| "crypto/sha1" | |
| "encoding/base32" | |
| "time" | |
| "fmt" | |
| ) |
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 React, { useState, useEffect, createContext, useContext, ReactNode } from 'react' | |
| import Amplify, { Auth, Hub } from 'aws-amplify' | |
| import { CognitoUser } from '@aws-amplify/auth' | |
| import { CognitoUserSession } from 'amazon-cognito-identity-js' | |
| import { HubCallback } from '@aws-amplify/core/lib/Hub' | |
| import IUser from '../../types/IUser' | |
| interface IAuthContext { | |
| user: IUser | null | |
| login(username: string, password: string): Promise<CognitoUser> |
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
| license: bsd-3-clause |
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 io.netty.bootstrap.Bootstrap | |
| import io.netty.channel.ChannelHandlerContext | |
| import io.netty.channel.SimpleChannelInboundHandler | |
| import io.netty.channel.nio.NioEventLoopGroup | |
| import io.netty.channel.socket.nio.NioDatagramChannel | |
| import io.netty.util.CharsetUtil | |
| import io.netty.util.concurrent.DefaultThreadFactory | |
| import kotlinx.coroutines.experimental.async | |
| import kotlinx.coroutines.experimental.newFixedThreadPoolContext |
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
| (ns example.api.google | |
| (:require [cemerick.url :as url] | |
| [cheshire.core :as json] | |
| [clj-jwt.core :as jwt] | |
| [clj-jwt.key :as key] | |
| [clj-time.core :as time] | |
| [clj-http.client :as http] | |
| [clojure.string :as str]) | |
| (:import java.io.StringReader)) |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Pipeline test</title> | |
| <meta charset="UTF-8"> | |
| <meta name="description" content="" /> | |
| <meta name="keywords" content="" /> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.19/topojson.min.js"></script> | |
| <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" /> |
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
| def socket = new Socket('localhost', 5000) | |
| socket.withStreams { input, output -> | |
| println input.newReader().readLine() | |
| output << 'Imma socket' | |
| } |
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
| server { | |
| listen 80; | |
| listen 443 default_server ssl; | |
| ssl on; | |
| ssl_certificate /etc/ssl/certs/myssl.crt; | |
| ssl_certificate_key /etc/ssl/private/myssl.key; | |
| server_name *.example.com; | |
| root /var/www/vhosts/website; |
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
| SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120) | |
| FROM information_schema.processlist | |
| WHERE command <> 'Sleep' | |
| AND info NOT LIKE '%PROCESSLIST%' | |
| ORDER BY time DESC LIMIT 50; |
NewerOlder