- A marker is represented by a
<circle …>. - Markers must have a consistent colour such that they can be automatically identified.
- A marker connects to one or more paths.
- A marker that does not connect to a path can be considered invalid.
- A marker connects to a path if the path's line intersects with the marker's circle. Connection location
- If a path goes through the centre of the circle, the connection is at the centre.
- If a path goes off-centre through the circle, the connection is at the closest approach.
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
| #!/bin/bash | |
| if [ -z "${VM_IP:-}" ]; then | |
| echo "Error: IPv4 address of the gateway VM must be provided as VM_IP env variable." | |
| exit 1 | |
| fi | |
| BOSH_KEY=/tmp/bosh_id_rsa.$RANDOM | |
| DEPLOY_KEY=/tmp/deploy_id_rsa.$RANDOM | |
| trap 'rm -f ${BOSH_KEY} ${DEPLOY_KEY}' EXIT |
In Provision, the CDN broker starts the creation of a CloudFront instance. The broker then takes advantage of Cloud Foundry regularly calling LastOperation, and performs further work during those calls. The work it does once the CloudFront instance is available is quite extended.
LastOperation is supposed to respond very quickly rather than doing substantial work. The cf.cc.job_queue job queue runs jobs that check LastOperation, and block while waiting for the response. Slow responses therefore impact the entire queue. This queue is important as it also processes asynchronous operations for the cf CLI.
New versions: 1.8.5
New versions: 3.18, 3.19
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
| extern crate futures; | |
| use std::sync::atomic::{AtomicBool, Ordering}; | |
| use std::thread; | |
| use std::sync::Arc; | |
| use std::time::{Instant, Duration}; | |
| use futures::{Async, Future}; | |
| use futures::executor::{self, Spawn}; | |
| use futures::task::Unpark; |
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
| fn query<R>(&self, | |
| query: QueryForReply<Id, Definition>, | |
| reply_rx: oneshot::Receiver<R>) | |
| -> Box<Future<Item = R, Error = bool>> | |
| where R: Send + 'static | |
| { | |
| self.query_tx | |
| .clone() | |
| .send(query) | |
| .map_err(|_| false) |
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
| from enum import Enum, unique | |
| @unique | |
| class Direction(Enum): | |
| north, east, south, west = range(1, 5) | |
| def offset(self): | |
| if self is Direction.north: | |
| return [0, -1] |
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 Prelude hiding (take) | |
| import Data.List (sort) | |
| import Test.LeanCheck | |
| import Test.LeanCheck.Utils | |
| import Test.FitSpec | |
| class Set s where | |
| empty :: s | |
| single :: Eq a => a -> s |
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
| fortysix@electryon:sirpent-rust ∴ cargo run | |
| Compiling sirpent v0.1.1 (file:///Users/fortysix/forest/sirpent-team/sirpent-rust) | |
| error[E0277]: the trait bound `futures::stream::Iter<std::iter::Map<std::iter::Filter<std::vec::IntoIter<comms::Client<std::string::String, tokio_io::codec::Framed<tokio_core::net::TcpStream, sirpent::net::MsgCodec>>>, fn(&comms::Client<std::string::String, tokio_io::codec::Framed<tokio_core::net::TcpStream, sirpent::net::MsgCodec>>) -> bool {<comms::Client<I, C>><std::string::String, tokio_io::codec::Framed<tokio_core::net::TcpStream, sirpent::net::MsgCodec>>::is_connected}>, fn(comms::Client<std::string::String, tokio_io::codec::Framed<tokio_core::net::TcpStream, sirpent::net::MsgCodec>>) -> std::result::Result<comms::Client<std::string::String, tokio_io::codec::Framed<tokio_core::net::TcpStream, sirpent::net::MsgCodec>>, _> {std::result::Result<comms::Client<std::string::String, tokio_io::codec::Framed<tokio_core::net::TcpStream, sirpent::net::MsgCodec>>, _>::Ok}>>: futures::Fut |