from vanilla import *
from defconAppKit.windows.baseWindow import BaseWindowController
from mojo.events import addObserver, removeObserver
import math
class ShowMouseCoordinatesTextBox(TextBox):
def __init__( *args, **kwargs):
super(ShowMouseCoordinatesTextBox, self).__init__(*args, **kwargs)
addObserver("mouseMoved", "mouseMoved")
addObserver("mouseDragged", "mouseDragged")
addObserver("mouseUp", "mouseUp")
def mouseMoved(self, info):
point = info["point"]
text = u"%.0f %.0f" % (point.x, point.y)
self.set(text)
def mouseDragged(self, info):
point = info["point"]
positionSymbol = unichr(8982)
deltaPoint = info["delta"]
angle = math.degrees(math.atan2(deltaPoint.y, deltaPoint.x))
distance = math.hypot(deltaPoint.x, deltaPoint.y)
text = u"The point is (%s, %s)." % (point.x, point.y)
self.set(text)
def mouseUp(self, info):
point = info["point"]
text = u"%.0f %.0f" % (point.x, point.y)
self.set(text)
def _breakCycles(self):
super(ShowMouseCoordinatesTextBox, self)._breakCycles()
removeObserver(self, "mouseMoved")
removeObserver(self, "mouseDragged")
removeObserver(self, "mouseUp")
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<link rel="shortcut icon" href="/images/favicon.ico" />
<link rel="stylesheet" href="/css/site.css" type="text/css" charset="UTF-8" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
<h1>Input: Fonts for Code</h1>
<p>Like many programmers, David Jonathan Ross had used monospaced fonts for his code. That was before he questioned the convention and answered with a fresh approach for data and programming aesthetics. Input finds inspiration in early computer consoles but looks towards a typographically rich future, where coding environments overcome technical limitations and allow for full control over one’s display; FB 2014</p>
<h2>Story</h2>
<p>Input is inspired by fonts for early consoles and screens, but casts off the technical limitations that constrained them. Inspired by Matthew Carter’s process for drawing Verdana, I began by constructing a bitmap font, and then drew the outlines of Input’s letterforms on top of the 11-pixel grid.
<p>Then drew outlines of Input’s letterforms on top of the 11-pixel grid.
SMALL CRAFT ADVISORY IN EFFECT UNTIL 9 AM PDT SATURDAY...
SHORT-PERIOD AND STEEP HAZARDOUS SEAS BETWEEN 10 AND 12 FEET WILL DEVELOP SATURDAY AFTERNOON
GALE WARNING IN EFFECT FROM 3 PM SATURDAY TO 3 AM PDT MONDAY...
WINDS WILL INCREASE TO 10 TO 20 KNOTS WITH
FREQUENT GUSTS TO 25 KNOTS TONIGHT AND CONTINUE THROUGH SATURDAY
MORNING, THEN SHIFT TO NORTHWEST AND INCREASE
THORUGH SATURDAY AFTERNOON. NORTHWEST WINDS 15 TO 25 KNOTS WITH
FREQUENT GUSTS BETWEEN 35 AND 40 KNOTS WILL DEVELOP LATE
SATURDAY AFTERNOON AND CONTINUE INTO SUNDAY EVENING. THE WINDS
WILL BEGIN TO DIMINISH LATE SUNDAY NIGHT.
* SEAS...SHORT-PERIOD AND STEEP HAZARDOUS SEAS BETWEEN 10 AND 12
FEET WILL DEVELOP SATURDAY AFTERNOON...THEN BUILD TO BETWEEN 15
AND 20 FEET SATURDAY NIGHT INTO SUNDAY.
PRECAUTIONARY/PREPAREDNESS ACTIONS...
A GALE WARNING MEANS WINDS OF 34 TO 47 KNOTS ARE IMMINENT OR
OCCURING. OPERATING A VESSEL IN GALE CONDITIONS REQUIRES
EXPERIENCE AND PROPERLY EQUIPPED VESSELS. IT IS HIGHLY
RECOMMENDED THAT MARINERS WITHOUT THE PROPER EXPERIENCE SEEK SAFE
HARBOR PRIOR TO THE ONSET OF GALE CONDITIONS.
A SMALL CRAFT ADVISORY MEANS THAT WIND SPEEDS OF 21 TO 33 KNOTS
ARE EXPECTED TO PRODUCE HAZARDOUS WAVE CONDITIONS TO SMALL CRAFT.
INEXPERIENCED MARINERS...ESPECIALLY THOSE OPERATING SMALLER
VESSELS SHOULD AVOID NAVIGATING IN THESE CONDITIONS.
Int. NASA control center communications room.
There are several long desks with the newest, high-tech
computers placed on them. Focus on one technician...
The TECHNICIAN types at the computer, a tired
look on his face. Suddenly, a flashing white light
illuminates his face, accompanied by a beeping sound.
TECHNICIAN:
Mr. Brown, I need you to take a look at this.
After a moment, NASA Director MARCUS BROWN (mid-
40’s) walks up to the Technician. Brown looks like the
kind of guy who worked extremely hard to get to where
he is today and he doesn’t plan to quit anytime soon.
module ActionView
class FixtureResolver < PathResolver
attr_reader :hash
def initialize(hash = {}, pattern=nil)
super(pattern)
@hash = hash
end
private
def query(path, exts, formats)
query = ""
EXTENSIONS.each_key do |ext|
query << '(' << exts[ext].map {|e| e && Regexp.escape(".#{e}") }.join('|') << '|)'
end
query = /^(#{Regexp.escape(path)})#{query}$/
templates = []
@hash.each do |_path, array|
source, updated_at = array
next unless _path =~ query
handler, format, variant = extract_handler_and_format_and_variant(_path, formats)
templates << Template.new(source, _path, handler,
:virtual_path => path.virtual,
:format => format,
:variant => variant,
:updated_at => updated_at
)
end
templates.sort_by {|t| -t.identifier.match(/^#{query}$/).captures.reject(&:blank?).size }
end
end
\usepackage{listings}
\usepackage{color}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\lstset{
backgroundcolor=\color{white},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
commentstyle=\color{mygreen},
deletekeywords={...},
escapeinside={\%*}{*)},
extendedchars=true,
frame=single,
keepspaces=true,
keywordstyle=\color{blue},
language=Octave,
morekeywords={*,...},
numbers=left,
numbersep=5pt,
numberstyle=\tiny\color{mygray},
rulecolor=\color{black},
showspaces=false,
showstringspaces=false,
showtabs=false,
stepnumber=2,
stringstyle=\color{mymauve},
tabsize=2,
title=\lstname
class noordzij_cube : public std::basic_ostream<char>
{
public:
textify() : std::basic_ostream<char>(new scribe_buf()) { }
void open(std::string host, unsigned short port, std::string category, int timeout)
{
scribe_buf * buf = (scribe_buf*)rdbuf();
buf->open(host, port, category, timeout);
}
};