Skip to content

Instantly share code, notes, and snippets.

View gustavderdrache's full-sized avatar
🤔
...

gustavderdrache

🤔
...
View GitHub Profile
WHERE
email_schedule_subscription.id IS NULL
AND email_schedule.deleted_at IS NULL
AND field_user.deleted_at IS NULL
AND (
( field_user.timezone_identifier = 'US/Eastern'
AND email_schedule_log.created_at > '2011-07-28 00:00:00'
)
OR ( field_user.timezone_identifier = 'US/Central'
AND email_schedule_log.created_at > '2011-07-27 11:00:00'
function trim() {
local i
if test $# -gt 0; then
i="-i "
fi
sed $i-e 's/\s\+$//' "$@"
}
$ brew doctor
Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libc-client.a
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Prelude hiding ((!!), length)
import Data.Text (Text ())
import qualified Data.Text.IO as TextIO
import Data.Text.Encoding (encodeUtf8)
import Data.ByteString (ByteString (), index, length, pack, unpack)
  • Mac OS X 10.7.4
  • PHP 5.3.8 (system-supplied)
<?php
if (is_array($value) ? in_array(strval($key), $value) : (strval($key) == strval($value))) {
/* stuff */
}
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<body>
<h1>descriptive chart title</h1>
<svg id="chart1"></svg>
<!--
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
body {
width: 960px;
margin: auto;
}
<!DOCTYPE html>
<html>
<head>
<title>svg clipping is totally ballin'</title>
</head>
<body>
<svg version="1.1" width="500" height="400">
<defs>
<clipPath id="cup">
<!-- This is as close as I could get to drawing a cup object -->

Highlighting Line Segments

This graph is structured as follows:

  • There is a single SVG <path> element at the root containing the basic line graph.
  • Above that, the highlighted lines are SVG <line> elements representing important segments.
  • Above that are the symbols (SVG <path> elements generated by d3.js' d3.svg.symbol generator) for the data points.

I have a number of objections to this approach: