master 45737f1f3386 cached
230 files
4.6 MB
1.2M tokens
71 symbols
1 requests
Download .txt
Showing preview only (4,870K chars total). Download the full file or copy to clipboard to get everything.
Repository: rstudio/ShinyDeveloperConference
Branch: master
Commit: 45737f1f3386
Files: 230
Total size: 4.6 MB

Directory structure:
gitextract_st6u2qq0/

├── Debugging/
│   ├── .gitignore
│   ├── README.md
│   ├── shiny-breakpoints/
│   │   ├── server.R
│   │   └── ui.R
│   ├── shiny-debug-doc.Rmd
│   ├── shiny-debugging.Rmd
│   ├── shiny-debugging.html
│   ├── shiny-debugging_files/
│   │   └── ioslides-13.5.1/
│   │       ├── fonts/
│   │       │   └── fonts.css
│   │       ├── js/
│   │       │   ├── hammer.js
│   │       │   ├── modernizr.custom.45394.js
│   │       │   ├── order.js
│   │       │   ├── prettify/
│   │       │   │   ├── lang-r.js
│   │       │   │   ├── lang-tex.js
│   │       │   │   ├── lang-yaml.js
│   │       │   │   ├── prettify.css
│   │       │   │   └── prettify.js
│   │       │   ├── slide-controller.js
│   │       │   └── slide-deck.js
│   │       └── theme/
│   │           └── css/
│   │               ├── default.css
│   │               └── phone.css
│   └── shiny-slides.css
├── Gadgets/
│   ├── .gitignore
│   ├── brush.R
│   ├── brush2.R
│   └── password.R
├── Modules/
│   ├── Demo/
│   │   ├── app.R
│   │   └── modularized/
│   │       ├── app.R
│   │       └── gapModule.R
│   ├── Exercise-1/
│   │   ├── app.R
│   │   ├── solution/
│   │   │   ├── app.R
│   │   │   └── gapModule.R
│   │   └── solution*/
│   │       └── app.R
│   ├── Exercise-2/
│   │   ├── app.R
│   │   ├── gapModule.R
│   │   ├── solution/
│   │   │   ├── app.R
│   │   │   └── gapModule.R
│   │   └── solution*/
│   │       └── app.R
│   ├── Exercise-3/
│   │   ├── app.R
│   │   ├── solution/
│   │   │   ├── app.R
│   │   │   ├── storms.csv
│   │   │   └── uploadModule.R
│   │   ├── solution*/
│   │   │   └── app.R
│   │   ├── storms.csv
│   │   └── uploadModule.R
│   ├── Exercise-4/
│   │   ├── app.R
│   │   ├── downloadModule.R
│   │   ├── solution/
│   │   │   ├── app.R
│   │   │   ├── downloadModule.R
│   │   │   ├── storms.csv
│   │   │   └── uploadModule.R
│   │   ├── solution*/
│   │   │   └── app.R
│   │   ├── storms.csv
│   │   └── uploadModule.R
│   ├── solution-1.Rmd
│   ├── solution-2.Rmd
│   ├── solution-3.Rmd
│   ├── solution-4.Rmd
│   ├── warm-up-1.Rmd
│   ├── warm-up-1.html
│   ├── warm-up-2.Rmd
│   ├── warm-up-2.html
│   └── warm-ups.R
├── Profiling/
│   ├── profiling-examples.Rmd
│   └── profiling-examples.html
├── README.md
├── Reactivity/
│   ├── .gitignore
│   ├── Exercise_00.R
│   ├── Exercise_01.R
│   ├── Exercise_02.R
│   ├── Exercise_03.R
│   ├── Exercise_04.R
│   ├── Exercise_05.R
│   ├── Exercise_07.R
│   ├── Solution_00.R
│   ├── Solution_01.R
│   ├── Solution_02.R
│   ├── Solution_03.R
│   ├── Solution_04.R
│   ├── Solution_05a.R
│   ├── Solution_05b.R
│   ├── Solution_07a.R
│   ├── Solution_07b.R
│   ├── Unsolution_00.R
│   ├── Unsolution_01.R
│   ├── Unsolution_01b.R
│   ├── Unsolution_02.R
│   ├── slides.Rmd
│   ├── slides.css
│   └── slides.html
└── UI/
    ├── Understanding-UI.Rmd
    ├── index-demo/
    │   ├── server.R
    │   └── www/
    │       └── index.html
    ├── scorecard-app/
    │   ├── .gitignore
    │   ├── README.md
    │   ├── flickr_api.R
    │   ├── scorecard-app.Rproj
    │   ├── server.R
    │   ├── ui.R
    │   └── www/
    │       ├── assets/
    │       │   ├── _scss/
    │       │   │   ├── all.scss
    │       │   │   ├── components/
    │       │   │   │   ├── _accordions.scss
    │       │   │   │   ├── _alerts.scss
    │       │   │   │   ├── _disclaimer.scss
    │       │   │   │   ├── _footer.scss
    │       │   │   │   ├── _forms.scss
    │       │   │   │   ├── _search.scss
    │       │   │   │   ├── _sidenav.scss
    │       │   │   │   └── _skipnav.scss
    │       │   │   ├── core/
    │       │   │   │   ├── _base.scss
    │       │   │   │   ├── _defaults.scss
    │       │   │   │   ├── _grid-settings.scss
    │       │   │   │   ├── _grid.scss
    │       │   │   │   ├── _utilities.scss
    │       │   │   │   └── _variables.scss
    │       │   │   ├── elements/
    │       │   │   │   ├── _buttons.scss
    │       │   │   │   ├── _figure.scss
    │       │   │   │   ├── _inputs.scss
    │       │   │   │   ├── _labels.scss
    │       │   │   │   ├── _list.scss
    │       │   │   │   ├── _table.scss
    │       │   │   │   └── _typography.scss
    │       │   │   └── lib/
    │       │   │       ├── _normalize.scss
    │       │   │       ├── bourbon/
    │       │   │       │   ├── _bourbon-deprecated-upcoming.scss
    │       │   │       │   ├── _bourbon.scss
    │       │   │       │   ├── addons/
    │       │   │       │   │   ├── _border-color.scss
    │       │   │       │   │   ├── _border-radius.scss
    │       │   │       │   │   ├── _border-style.scss
    │       │   │       │   │   ├── _border-width.scss
    │       │   │       │   │   ├── _buttons.scss
    │       │   │       │   │   ├── _clearfix.scss
    │       │   │       │   │   ├── _ellipsis.scss
    │       │   │       │   │   ├── _font-stacks.scss
    │       │   │       │   │   ├── _hide-text.scss
    │       │   │       │   │   ├── _margin.scss
    │       │   │       │   │   ├── _padding.scss
    │       │   │       │   │   ├── _position.scss
    │       │   │       │   │   ├── _prefixer.scss
    │       │   │       │   │   ├── _retina-image.scss
    │       │   │       │   │   ├── _size.scss
    │       │   │       │   │   ├── _text-inputs.scss
    │       │   │       │   │   ├── _timing-functions.scss
    │       │   │       │   │   ├── _triangle.scss
    │       │   │       │   │   └── _word-wrap.scss
    │       │   │       │   ├── css3/
    │       │   │       │   │   ├── _animation.scss
    │       │   │       │   │   ├── _appearance.scss
    │       │   │       │   │   ├── _backface-visibility.scss
    │       │   │       │   │   ├── _background-image.scss
    │       │   │       │   │   ├── _background.scss
    │       │   │       │   │   ├── _border-image.scss
    │       │   │       │   │   ├── _calc.scss
    │       │   │       │   │   ├── _columns.scss
    │       │   │       │   │   ├── _filter.scss
    │       │   │       │   │   ├── _flex-box.scss
    │       │   │       │   │   ├── _font-face.scss
    │       │   │       │   │   ├── _font-feature-settings.scss
    │       │   │       │   │   ├── _hidpi-media-query.scss
    │       │   │       │   │   ├── _hyphens.scss
    │       │   │       │   │   ├── _image-rendering.scss
    │       │   │       │   │   ├── _keyframes.scss
    │       │   │       │   │   ├── _linear-gradient.scss
    │       │   │       │   │   ├── _perspective.scss
    │       │   │       │   │   ├── _placeholder.scss
    │       │   │       │   │   ├── _radial-gradient.scss
    │       │   │       │   │   ├── _selection.scss
    │       │   │       │   │   ├── _text-decoration.scss
    │       │   │       │   │   ├── _transform.scss
    │       │   │       │   │   ├── _transition.scss
    │       │   │       │   │   └── _user-select.scss
    │       │   │       │   ├── functions/
    │       │   │       │   │   ├── _assign-inputs.scss
    │       │   │       │   │   ├── _contains-falsy.scss
    │       │   │       │   │   ├── _contains.scss
    │       │   │       │   │   ├── _is-length.scss
    │       │   │       │   │   ├── _is-light.scss
    │       │   │       │   │   ├── _is-number.scss
    │       │   │       │   │   ├── _is-size.scss
    │       │   │       │   │   ├── _modular-scale.scss
    │       │   │       │   │   ├── _px-to-em.scss
    │       │   │       │   │   ├── _px-to-rem.scss
    │       │   │       │   │   ├── _shade.scss
    │       │   │       │   │   ├── _strip-units.scss
    │       │   │       │   │   ├── _tint.scss
    │       │   │       │   │   ├── _transition-property-name.scss
    │       │   │       │   │   └── _unpack.scss
    │       │   │       │   ├── helpers/
    │       │   │       │   │   ├── _convert-units.scss
    │       │   │       │   │   ├── _directional-values.scss
    │       │   │       │   │   ├── _font-source-declaration.scss
    │       │   │       │   │   ├── _gradient-positions-parser.scss
    │       │   │       │   │   ├── _linear-angle-parser.scss
    │       │   │       │   │   ├── _linear-gradient-parser.scss
    │       │   │       │   │   ├── _linear-positions-parser.scss
    │       │   │       │   │   ├── _linear-side-corner-parser.scss
    │       │   │       │   │   ├── _radial-arg-parser.scss
    │       │   │       │   │   ├── _radial-gradient-parser.scss
    │       │   │       │   │   ├── _radial-positions-parser.scss
    │       │   │       │   │   ├── _render-gradients.scss
    │       │   │       │   │   ├── _shape-size-stripper.scss
    │       │   │       │   │   └── _str-to-num.scss
    │       │   │       │   └── settings/
    │       │   │       │       ├── _asset-pipeline.scss
    │       │   │       │       ├── _prefixer.scss
    │       │   │       │       └── _px-to-em.scss
    │       │   │       └── neat/
    │       │   │           ├── _neat-helpers.scss
    │       │   │           ├── _neat.scss
    │       │   │           ├── functions/
    │       │   │           │   ├── _new-breakpoint.scss
    │       │   │           │   └── _private.scss
    │       │   │           ├── grid/
    │       │   │           │   ├── _box-sizing.scss
    │       │   │           │   ├── _direction-context.scss
    │       │   │           │   ├── _display-context.scss
    │       │   │           │   ├── _fill-parent.scss
    │       │   │           │   ├── _media.scss
    │       │   │           │   ├── _omega.scss
    │       │   │           │   ├── _outer-container.scss
    │       │   │           │   ├── _pad.scss
    │       │   │           │   ├── _private.scss
    │       │   │           │   ├── _row.scss
    │       │   │           │   ├── _shift.scss
    │       │   │           │   ├── _span-columns.scss
    │       │   │           │   ├── _to-deprecate.scss
    │       │   │           │   └── _visual-grid.scss
    │       │   │           └── settings/
    │       │   │               ├── _disable-warnings.scss
    │       │   │               ├── _grid.scss
    │       │   │               └── _visual-grid.scss
    │       │   ├── css/
    │       │   │   ├── google-fonts.css
    │       │   │   ├── main.css
    │       │   │   └── main.scss
    │       │   └── js/
    │       │       ├── components.js
    │       │       └── vendor/
    │       │           ├── html5shiv.js
    │       │           ├── respond.js
    │       │           └── selectivizr-min.js
    │       └── index.html
    └── templates-demo/
        ├── app.R
        └── template.html

================================================
FILE CONTENTS
================================================

================================================
FILE: Debugging/.gitignore
================================================
.Rproj.user
.Rhistory
.RData


================================================
FILE: Debugging/README.md
================================================
# Shiny Debugging Talk

This repo contains an article, slide deck, and sample code for the Shiny Debugging talk given at the [2016 Shiny Developer Conference](http://blog.rstudio.org/2015/10/29/shiny-developer-conference-stanford-university-january-2016/).


================================================
FILE: Debugging/shiny-breakpoints/server.R
================================================
#
# This is the server logic of a Shiny web application. You can run the 
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
# 
#    http://shiny.rstudio.com/
#

library(shiny)

# Define server logic required to draw a histogram
shinyServer(function(input, output) {
   
  output$distPlot <- renderPlot({
    
    # generate bins based on input$bins from ui.R
    x    <- faithful[, 2] 
    bins <- seq(min(x), max(x), length.out = input$bins + 1)
    cat("drawing histogram with", input$bins, "bins\n")
    
    # draw the histogram with the specified number of bins
    hist(x, breaks = bins, col = 'darkgray', border = 'white')
  })
  
})


================================================
FILE: Debugging/shiny-breakpoints/ui.R
================================================
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
# 
#    http://shiny.rstudio.com/
#

library(shiny)

# Define UI for application that draws a histogram
shinyUI(fluidPage(
  
  # Application title
  titlePanel("Old Faithful Geyser Data"),
  
  # Sidebar with a slider input for number of bins 
  sidebarLayout(
    sidebarPanel(
       sliderInput("bins",
                   "Number of bins:",
                   min = 1,
                   max = 50,
                   value = 30)
    ),
    
    # Show a plot of the generated distribution
    mainPanel(
       plotOutput("distPlot")
    )
  )
))


================================================
FILE: Debugging/shiny-debug-doc.Rmd
================================================
---
title: "Debugging Shiny Applications"
output: 
  html_document: 
    highlight: textmate
    toc: yes
    toc_float: 
      collapsed: no
    theme: cosmo
---

## Introduction

Debugging Shiny applications can be challenging. Because Shiny is reactive, code execution isn't as linear as you might be used to, and your application code runs behind a web server and the Shiny framework itself, which can make it harder to access. 

The goal of this article is to arm you with tools and techniques for debugging in Shiny specifically. If you're interested in tools for debugging R more generally, we recommend reading [Debugging with RStudio](https://support.rstudio.com/hc/en-us/articles/205612627-Debugging-with-RStudio) instead. The [Debugging and Exceptions](http://adv-r.had.co.nz/Exceptions-Debugging.html) chapter in Hadley Wickham's excellent book [Advanced R](http://adv-r.had.co.nz/) is also extremely helpful if you're new to debugging in R. 

We'll cover three main approaches:

1. **Debugging**

    Pausing execution of your program, at a place you choose, to inspect its state as each following statement is executed. Best used when you suspect where a problem lies or need to verify the state around a particular section of code.

2. **Tracing**
  
    Collecting information as your program runs, without pausing it, for later analysis. Best used when you're diagnosing systemic issues (for instance, reactivity), when you can't debug, or when frequent interruption is inappropriate.

2. **Error handling**

    Finding the source of errors (both on the client and server side) and ascertaining their cause. 

## Debugging

### Breakpoints

If you know, or suspect you know, where in the code the problem lies, the most straightforward debugging technique is setting a breakpoint. In RStudio, you can do this just by clicking to the left of the line number.

![Breakpoint](images/breakpoint.png)

When you run your Shiny app, R will stop execution at the breakpoint, and you can begin stepping through your code.

![Breakpoint](images/breakpoint-hit.png)

While stepping, you can examine the contents of the environment and the callstack to see how execution reached your code, and what values it's working with.

Currently, setting breakpoints inside Shiny applications is only possible in the RStudio IDE because no other R front end implements the Shiny debugging interface; the traditional R breakpoint utilities such as [`setBreakpoint`](https://stat.ethz.ch/R-manual/R-devel/library/utils/html/findLineNum.html) don't work with Shiny.

#### Breakpoint Limitations

Unfortunately, breakpoints aren't helpful in all situations. For technical reasons[^1], breakpoints can *only* be used inside the `shinyServer` function. You can't use them in code in other .R files. And breakpoints can tell you something about why code is executing, but they can't always tell you why something *isn't* executing. 

### browser() statements

The `browser()` statement is another useful debugging tool. It acts like a breakpoint--when evaluated, it halts execution and enters the debugger. You can add it anywhere an R expression is valid. 

![browser()](images/browser.png)

Unlike breakpoints, `browser()` works everywhere, so it's suitable for use in any code invoked by your Shiny app. You can also invoke `browser()` conditionally to create conditional breakpoints; for instance:

```{r eval=FALSE}
if (input$bins > 50)
  browser()
```

The downside of `browser()` is that you need to re-run your Shiny application to apply it, and you need to remember to take it out afterwards. 

## Tracing 

In many cases it's difficult to diagnose a problem by halting execution, and instead you need to observe the system as it runs. This is particularly true of Shiny applications since the system doesn't run once through linearly as an R script does! We'll look at a number of ways to peek into the system while it's running.

### Showcase Mode

If you've ever visited the [Shiny Gallery](http://shiny.rstudio.com/gallery/), you've probably seen Showcase Mode. In Showcase Mode, your code is shown alongside your application, and your application's server code flashes yellow when it executes. Here, for example, you can see the plot output chunk re-executing when the inputs change.

![Showcase Mode](images/kmeans-showcase.gif)

Showcase Mode is useful for visualizing which parts of your code are executing as a user interacts with your application.  It is not enabled by default for privacy reasons (most people don't want it to be easy for others to see their app's code!), but it's easy to turn on. Just invoke runApp directly with `display.mode="showcase"`: 

    > shiny::runApp(display.mode="showcase")

If you want showcase mode to be on by default (for an extended debugging session, or if you want to use showcase mode in conjunction with the IDE Run App button), add a file named `DESCRIPTION` to your app's folder, with these contents:

    Title: My App
    Author: Alice Smith
    DisplayMode: Showcase
    Type: Shiny
    
### The Reactive Log

Another way to trace the execution of reactives at runtime is to use the Shiny reactive log. In addition to telling you which reactives are executing, the reactive log will help you visualize the dependencies between reactive objects, and give you very detailed information about what's happening under the hood as Shiny evaluates your application.

Start a new R session and run the command:

    > options(shiny.reactlog=TRUE) 
  
Then, launch your Shiny app. In the Shiny app, press *Ctrl+F3* to launch the reactive log visualization. It'll look something like this:

![Shiny reactive log](images/reactlog.png)

The reactive log has many features and controls and we won't belabor them here; for more information, type `?shiny::showReactLog` at the R console, or read the [`showReactLog` online documentation](http://shiny.rstudio.com/reference/shiny/latest/showReactLog.html).

### "printf" tracing

In some situations the best tracing technique is the oldest: a statement that emits text to the console when it's reached. These are more work to use, but offer the unique advantage of allowing you to emit the values of variables without interrupting execution. 

You can do this by using the `cat` command in your Shiny application to print to standard error (`stderr()`). For instance, from the sample Shiny application:

```{r eval = FALSE}
# generate bins based on input$bins from ui.R
x    <- faithful[, 2] 
bins <- seq(min(x), max(x), length.out = input$bins + 1)
cat(file=stderr(), "drawing histogram with", input$bins, "bins\n")
```
    
After adding your `cat` statement, run your Shiny application and watch the R console. You'll see a line emitted each time the code runs. 

    Listening on http://127.0.0.1:5757
    drawing histogram with 30 bins
    drawing histogram with 35 bins
    
A note about `stderr()`: in most cases `cat("my output")` (i.e. printing to standard out) will work correctly, but in others (e.g. inside a `renderPrint`, which uses [`capture.output`](https://stat.ethz.ch/R-manual/R-devel/library/utils/html/capture.output.html) to redirect output), it won't, so we recommend always sending trace output to `stderr()`. 

#### Tracing on Shinyapps.io

`cat()` is also one of the few tracing techniques which works well even on a remote system. If your application is deployed on RStudio's [ShinyApps.io service](https://www.shinyapps.io/), then you can see the output the `cat()` traces in your deployed app, in real time. Here's how:

1. Add `cat(file=stderr(), ...)` tracing statements to your application.
2. Deploy your application, using the RStudio IDE or the `rsconnect::deployApp()` function. 
3. From the application's directory, run `rsconnect::showLogs(streaming = TRUE)`
4. Navigate to the application (on ShinyApps.io) in your browser, and watch the R console for output.

You'll see something like the  following:

    2016-01-29T01:26:12.291216+00:00 shinyapps[77594]: 
    2016-01-29T01:26:12.291218+00:00 shinyapps[77594]: Starting R with process ID: '26'
    2016-01-29T01:26:14.162374+00:00 shinyapps[77594]: drawing histogram with 30 bins
    2016-01-29T01:26:14.495249+00:00 shinyapps[77594]: drawing histogram with 35 bins

If your application gets a lot of usage, you may wish to guard the `cat()` output so that only your own sessions emit it, as it will be otherwise difficult to distinguish output from your own sessions with output from other sessions. 

#### Tracing on Shiny Server 

The `cat(file=stderr(), ...)` mechanism also works in Shiny Server. The trace output will be placed in a log under:

    /var/log/shiny-server/*.log
    
There's one log for each R process; you can `tail -f` the `log` file for any process to see output in real time. Because logs are deleted when the R process ends, you'll only be able to see logs while your application is open (so don't close your browser!). 

You can read more about Shiny Server's logging files/directories for individual Shiny apps in the [Logging and Analytics](https://rstudio.github.io/shiny-server/latest/#logging-and-analytics) section of the [Shiny Server Professional Administrator's Guide](https://rstudio.github.io/shiny-server/latest/).

#### cat() Caveats

One thing to keep in mind while using `cat()` to trace values at runtime is that Shiny doesn't give it special treatment--if your `cat()` expression references reactive values, a dependency will be created. This may cause your application to behave differently with the `cat()` statement than without it, which is obviously undesirable.

Make certain that any reactives referenced by the `cat()` statement are already referenced elsewhere in the observer or reactive in which it resides. 

### Client/Server Tracing

Shiny's architecture consists of a client (the browser) and a server (an R process). The two are connected by a [websocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) that receives state changes from the client, such as new values for input controls, and distributes state changes from the server, such as new output values. 

In some cases (for instance, if you're writing your own custom bindings) it's helpful to see exactly what's going across the wire. You can watch the JSON emitted to and received from the websocket by turning on tracing:

    > options(shiny.trace = TRUE)

Once tracing is on, you'll se a lot of output in the console while your app is running. Here's a sample:

    SEND {"config":{"workerId":"","sessionId":"04531d50d12554bd981b24b9d3983cc4"}}
    RECV {"method":"init","data":{"bins":30,".clientdata_output_distPlot_width":610,".clientdata_output_distPlot_height":400,".clientdata_output_distPlot_hidden":false,".clientdata_pixelratio":1,".clientdata_url_protocol":"http:",".clientdata_url_hostname":"127.0.0.1",".clientdata_url_port":"5569",".clientdata_url_pathname":"/",".clientdata_url_search":"",".clientdata_url_hash_initial":"",".clientdata_singletons":"",".clientdata_allowDataUriScheme":true}}

The log is from the perspective of the client, so:

`SEND` indicates data sent from the browser to the R session.

`RECV` indicates data sent from the R session to the browser.

Another way to dig into the data available to the R session is to look at the `session$clientData` object. You can read more in this article on the Shiny developer center:

[Learn about your user with session$clientData](http://shiny.rstudio.com/articles/client-data.html)

### What about trace()?

If you're a seasoned R programmer, you may have used the [`trace()`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/trace.html) function to add tracing without modifying your script. Unfortunately, it's not possible to use this utility (or any that depend on it, such as `setBreakpoint`) with Shiny. `trace()` works by rewriting the body of the function to be traced, so the function must already exist when you run it. Shiny generates functions at runtime that aren't easily addressable.

## Errors

Some code defects will result in a runtime error. While no one likes to see errors, they can be an invaluable tool for helping you verify code preconditions at runtime. Often, throwing an error immediately when the system's state becomes invalid (known as the [fail-fast property](https://en.wikipedia.org/wiki/Fail-fast)) will save you debugging time, as an observed problem may be miles downstream from its source. 

Whether you're throwing your own errors or handling errors thrown elsewhere (for instance, by packages your Shiny application uses), here are some essentials for your toolkit.

### R errors

Most of the errors you'll be dealing with will be raised by R; here we'll describe strategies for dealing with these errors.

#### R error tracebacks

In earlier versions of Shiny, it could be difficult to locate errors; they the error itself would be printed at the console, but it was always necessary to do some work to see where the error originated.

Thankfully the latest version of Shiny (0.13.0 at time of writing) includes a feature which automatically dumps not only the error but a stack trace indicating where the error occurred to the console. 

Try, for example, introducing an error into the sample Shiny app.

```{r eval=FALSE}
bins <- seq(min(x), max(x), length.out = input$bins + 1)
if (input$bins > 40)
  stop("too many bins")
```

Now, run the app and drag the slider to the right to enter the error condition. The console will show you a stack trace:

    Warning: Error in renderPlot: too many bins
    Stack trace (innermost first):
        76: renderPlot [server.R#20]
        68: output$distPlot
         1: shiny::runApp
         
What are those numbers before the function names (`76`, `68`, and `1`)? They're the indices into the call stack, which in this case contains nearly 80 calls. Most of those calls, though, are Shiny internals, which are hidden to make the stack trace easier to read. In the vast majority of cases, these internals won't be relevant to your error.

If you do need to see the entire call stack, you can set:

```{r eval = FALSE}
options(shiny.fullstacktrace = TRUE)
```
    
As you might imagine, this prints a very verbose stack strace!

    Warning: Error in renderPlot: too many bins
    Stack trace (innermost first):
        79: h
        78: .handleSimpleError
        77: stop
        76: renderPlot [server.R#20]
        75: ..stacktraceon..
        74: func
        73: withVisible
        72: func
        71: <Anonymous>
        70: do.call
        69: ..stacktraceoff..
        68: output$distPlot
        67: ..stacktraceon..
        66: orig
        65: func
        64: withCallingHandlers
        63: captureStackTraces
        62: withCallingHandlers
        61: shinyCallingHandlers
        60: doTryCatch
        59: tryCatchOne
        58: tryCatchList
        57: doTryCatch
        56: tryCatchOne
        55: tryCatchList
        54: tryCatch
        53: observerFunc
        52: doTryCatch
        51: tryCatchOne
        50: tryCatchList
        49: tryCatch
        48: contextFunc
        47: env$runWith
        46: withReactiveDomain
        45: ctx$run
        44: run
        43: withCallingHandlers
        42: captureStackTraces
        41: withCallingHandlers
        40: shinyCallingHandlers
        39: doTryCatch
        38: tryCatchOne
        37: tryCatchList
        36: tryCatch
        35: flushCallback
        34: FUN
        33: lapply
        32: ctx$executeFlushCallbacks
        31: .getReactiveEnvironment()$flush
        30: flushReact
        29: withReactiveDomain
        28: messageHandler
        27: withCallingHandlers
        26: captureStackTraces
        25: withCallingHandlers
        24: withLogErrors
        23: handler
        22: doTryCatch
        21: tryCatchOne
        20: tryCatchList
        19: tryCatch
        18: try
        17: <Anonymous>
        16: eval
        15: evalq
        14: doTryCatch
        13: tryCatchOne
        12: tryCatchList
        11: doTryCatch
        10: tryCatchOne
         9: tryCatchList
         8: tryCatch
         7: run
         6: service
         5: serviceApp
         4: withCallingHandlers
         3: captureStackTraces
         2: ..stacktraceoff..
         1: runApp
     
The `..stacktraceon..` and `..stacktraceoff..` calls indicate where Shiny would ordinarily have collapsed the stack.

#### Pausing on errors

Sometimes, knowing *where* an error occurred gives you enough information to fix it. At other times, though, you'll need additional context: What were the arguments to functions in the callstack? What were the values of local variables at the time the error occured? And so on.

You can cause Shiny to enter the debugger when an error occurs by using the following statement:

```{r eval = FALSE}
options(shiny.error = browser)
```
    
When an error occurs, Shiny will run the function you name (here it's our old frind `browser()`) and wait for it to return before handling the error. This gives you an opportunity to inspect the state of the system at the exact moment the error arose.

![Shiny error](images/shiny-error.png)

Now you can see, for example, the value of `bins` and `x` at the time the error occurred. There are some subtleties associated with error debugging, however:

##### Selecting a stack frame

Sometimes, the debugger won't put you in the frame you expect. If this happens, use the Traceback pane in RStudio and click on the frame you're interested in to see the code and values in that frame.

Note, however, that clicking on a frame won't actually change the environment in which expressions entered at the R console are evaluated. If you want to actually browse the environment of a stack frame interactively, use `recover()` to select a frame. 

##### Continuing after an error

The `shiny.error` function is invoked when an error occurs, but once the error has occurred, it's too late to suppress it! You're debugging, but there's no next expression to step to; after you're finished inspecting the error, continue in the debugger (type `c` or press Continue in RStudio) to let Shiny handle the error as it normally would.

### JavaScript errors

Occasionally, a runtime problem will be caused by an error occurring in JavaScript. This is most common when working with custom bindings and third-party JavaScript components.

Most web browsers contain a JavaScript console that can be used to view logs and unhandled exceptions. We'll focus here on Chrome since it's widely used on all three major desktop platforms, but the other major browsers are structured very similarly. 

To reach the JavaScript console in Chrome, do one of the following:

1. Click on the "hamburger menu" in the upper right corner of the browser
2. Navigate to *More Tools -> Developer Tools.*

Or, right click on the Shiny app and choose Inspect.

Once you have the developer tools open, click the Console tab. Here you'll see any unhandled JavaScript exceptions; for instance, here's an error raised when trying to load a Shiny app that's no longer running:

![console error](images/console.png)

Leaving the development tools open is also a good idea when looking for JavaScript issues; in most browsers, merely having the developer tools open is enough to cause the browser enter the debugger automatically when an unhandled exception occurs.

#### First-chance exceptions

The JavaScript console doesn't tell you about *all* the JavaScript exceptions that were thrown, only those that were never caught. Sometimes, however, an exception that's swallowed by an exception handler contains crucial information. 

A little-known feature in most JavaScript debuggers will allow you to see exceptions when they're *thrown* (regardless of whether they're caught later). These are sometimes called "first chance" exceptions. You can break on them in Chrome by clicking the stop button labeled with pause (representing break on exception) and then checking the box "Pause on Caught Exceptions".

![pause on exceptions](images/pauseoncaught.png)

If the thrown/caught terminology is confusing to you, remember that the debugger typically pauses on *uncaught* (or unhandled) exceptions; you're asking it to pause on *caught* (handled) exceptions too.

There are great reference materials online available for most browser debugging tools (here's [one for Chrome](https://developer.chrome.com/devtools/docs/javascript-debugging)).

#### RStudio Desktop 

On Windows and Linux, there's a JavaScript console and debugger built into RStudio (many components of RStudio, including the window that displays Shiny applications, is built on an embedded copy of [QtWebKit](https://doc.qt.io/qt-5/qtwebkit-index.html]). You can't access it through a menu, but you can by right-clicking on your Shiny application and choosing *Inspect*.
 
On OS X, RStudio uses your system's version of Safari to show Shiny applications. By default, Safari's JavaScript debugging tools are turned off inside RStudio, but you can turn them on using this command in Terminal: 

    defaults write org.rstudio.RStudio WebKitDeveloperExtras -bool true
    
Restart RStudio, start your Shiny app, right-click on it, and you'll see a new *Inspect Element* option. Click it to launch the Safari JavaScript debugger.

![inspect element](images/inspectelement.png)
 
## Asking for Help

Some bugs won't yield to even the most determined attempts at analysis, and you'll need to enlist the help of a second set of eyes. Fortunately there are several active forums where you can ask questions. Two we recommend are ['shiny' at StackOverflow](http://stackoverflow.com/questions/tagged/shiny) and [the shiny-discuss Google group](https://groups.google.com/forum/#!forum/shiny-discuss).

When asking for help, try to eliminate all the parts of your application that aren't related to the problem, so that anyone volunteering to help can understand the issue quickly. You'll often find that the process of isolating the problem and formulating a description leads you to the answer before you can post the question!

The article [How to get help](http://shiny.rstudio.com/articles/help.html) on the Shiny Developer Center describes in detail what you'll want to include when asking for help.

[^1]: Breakpoints work by modifying a function body at runtime to include a `browser()` statement. The functions in Shiny applications are ephemeral--they are created on demand when the app starts, and exist only why it's running. 


================================================
FILE: Debugging/shiny-debugging.Rmd
================================================
---
author: "Jonathan McPherson"
title: Debugging with Shiny
output: 
  ioslides_presentation:
    css: shiny-slides.css
    logo: images/shiny-logo.png
    self_contained: no
    incremental: true
---

# Overview

## Goals 

### You will learn:

- Tools for finding bugs & diagnosing errors in Shiny applications
- Little-known ways to look under the covers 
- How to debug problems in deployed apps
- Cheat code for IDE JavaScript debug tools

## Outline

### We'll cover three main areas:

- Debugging
- Tracing 
- Errors

# Debugging

"Finding your bug is a process of confirming the many things that you believe are true — until you find one which is not true."

-- Norm Matloff 

Author of *The Art of R Programming* and *The Art of Debugging*

## Breakpoints

![breakpoints](images/breakpoint.png)

*Breakpoint (armed)*

## Breakpoints

![breakpoints](images/breakpoint-hit.png)

*Stepping after execution*

## Breakpoints {.build}

### Pros

- Doesn't change code
- Can inspect local values/stack
- Can step through following code

### Cons

- Only works inside `shinyServer`
- Can't tell you why something isn't happening
- Interrupts program flow; not conditional

## browser()

![browser](images/browser.png)

## Conditional breakpoint

```{r eval=FALSE}
if (input$bins > 50)
  browser()
```

## browser() {.build}

### Pros

- Similar advantages to breakpoints
- Valid anywhere an R expression is valid
- Can be made conditional

### Cons
 
- Changes your code!
- Interrupts program flow
- Can't tell you why something isn't happening

# Tracing

<div class="notes">
In many cases it's difficult to diagnose a problem by halting execution, and instead you need to observe the system as it runs. This is particularly true of Shiny applications since the system doesn't run once through linearly as an R script does! We'll look at a number of ways to peek into the system while it's running.
</div>

## Showcase Mode {.build}

```{r eval=FALSE}
runApp(..., display.mode="showcase")
```

![showcase mode](images/kmeans-showcase.gif)

## Showcase Mode {.build}

### Pros

- Very easy to use
- Helps find unnecessary or unexpected execution

### Cons

- Doesn't scale well to larger apps
- Won't show you *why* a reactive or observer executed

## Reactive Log {.build}

```{r eval=FALSE}
options(shiny.reactlog=TRUE)
runApp(...)
showReactLog()
```

![reactive log](images/reactlog.png)

## Reactive Log {.build}

### Pros

- *Can* show you why something isn't happening!
- No more thorough way of visualizing reactivity

### Cons

- Lots of data to sift through
- Not real-time

## "printf" tracing {.build}

```{r eval = FALSE}
# generate bins based on input$bins from ui.R
x    <- faithful[, 2] 
bins <- seq(min(x), max(x), length.out = input$bins + 1)
cat(file=stderr(), "drawing histogram with", input$bins, "bins\n")
```

    Listening on http://127.0.0.1:5757
    drawing histogram with 30 bins
    drawing histogram with 35 bins
    
## "printf" tracing {.build}

### Pros

- Actual values at runtime, w/o modifying flow
- Only method that works after deployment

### Cons

- Limited to textual representation of values
- Modifies code 
- Watch out for reactive side effects!

## Tracing on Shinyapps.io {.build}

```{r eval = FALSE}
rsconnect::deployApp( ... )
rsconnect::showLogs(streaming = TRUE)
```

    2016-01-29T01:26:12 shinyapps[77594]: 
    2016-01-29T01:26:12 shinyapps[77594]: Starting R with process ID: '26'
    2016-01-29T01:26:14 shinyapps[77594]: drawing histogram with 30 bins
    2016-01-29T01:26:14 shinyapps[77594]: drawing histogram with 35 bins
    
## Tracing in Shiny Server

    tail -f /var/log/shiny-server/myapp-20160131-104403-8492.log

Only while R session is alive!

## Client/server tracing {.build}

```{r eval = FALSE}
options(shiny.trace = TRUE)
```

    SEND {"config":{"workerId":"","sessionId":"04531d50d12554bd981b24b9d3983cc4"}}
    RECV {"method":"init","data":{"bins":30,".clientdata_output_distPlot_width":610,
          ".clientdata_output_distPlot_height":400,".clientdata_output_distPlot_hidden":false,
          ".clientdata_pixelratio":1,".clientdata_url_protocol":"http:",
          ".clientdata_url_hostname":"127.0.0.1",".clientdata_url_port":"5569",
          ".clientdata_url_pathname":"/",".clientdata_url_search":"",
          ".clientdata_url_hash_initial":"",".clientdata_singletons":"",
          ".clientdata_allowDataUriScheme":true}}

# Error Handling

## Tracebacks {.build}

```{r eval=FALSE}
bins <- seq(min(x), max(x), length.out = input$bins + 1)
if (input$bins > 40)
  stop("too many bins")
```

    Warning: Error in renderPlot: too many bins
    Stack trace (innermost first):
        76: renderPlot [server.R#20]
        68: output$distPlot
         1: shiny::runApp
         
         
## Full tracebacks {.build}

```{r eval=FALSE}
options(shiny.fullstacktrace = TRUE)
```

    Warning: Error in renderPlot: too many bins
    Stack trace (innermost first):
        79: h
        78: .handleSimpleError
        77: stop
        76: renderPlot [server.R#20]
        75: ..stacktraceon..
        74: func
        ...
        
## Pausing on errors {.build}

```{r eval = FALSE}
options(shiny.error = browser)
```

![Shiny error](images/shiny-error.png)

## JavaScript errors: Browser {.build}

Right-click, inspect element, Console.

![Dev tools](images/chrome-devtools.png)

## JavaScript exceptions: first-chance

![pause on exceptions](images/pauseoncaught.png)

## JavaScript dev mode on OS X {.build}

    defaults write org.rstudio.RStudio WebKitDeveloperExtras -bool true
    
![inspect element](images/inspectelement.png)

# Wrapup

Any questions?


================================================
FILE: Debugging/shiny-debugging.html
================================================
<!DOCTYPE html>
<html>
<head>
  <title>Debugging with Shiny</title>

  <meta charset="utf-8">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <meta name="generator" content="pandoc" />




  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="apple-mobile-web-app-capable" content="yes">

  <link rel="stylesheet" media="all" href="shiny-debugging_files/ioslides-13.5.1/fonts/fonts.css">

  <link rel="stylesheet" media="all" href="shiny-debugging_files/ioslides-13.5.1/theme/css/default.css">
  <link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="shiny-debugging_files/ioslides-13.5.1/theme/css/phone.css">

  <base target="_blank">

  <script type="text/javascript">
    var SLIDE_CONFIG = {
      // Slide settings
      settings: {
                title: 'Debugging with Shiny',
                        useBuilds: true,
        usePrettify: true,
        enableSlideAreas: true,
        enableTouch: true,
                favIcon: 'shiny-debugging_files/logo.png',
              },

      // Author information
      presenters: [
            {
        name:  'Jonathan McPherson' ,
        company: '',
        gplus: '',
        twitter: '',
        www: '',
        github: ''
      },
            ]
    };
  </script>

  <style type="text/css">

    b, strong {
      font-weight: bold;
    }

    em {
      font-style: italic;
    }

    slides > slide {
      -webkit-transition: all 0.4s ease-in-out;
      -moz-transition: all 0.4s ease-in-out;
      -o-transition: all 0.4s ease-in-out;
      transition: all 0.4s ease-in-out;
    }

    .auto-fadein {
      -webkit-transition: opacity 0.6s ease-in;
      -webkit-transition-delay: 0.4s;
      -moz-transition: opacity 0.6s ease-in 0.4s;
      -o-transition: opacity 0.6s ease-in 0.4s;
      transition: opacity 0.6s ease-in 0.4s;
      opacity: 0;
    }

    slides > slide:not(.nobackground):before {
      font-size: 12pt;
      content: "";
      position: absolute;
      bottom: 20px;
      left: 60px;
      background: url(shiny-debugging_files/logo.png) no-repeat 0 50%;
      -webkit-background-size: 30px 30px;
      -moz-background-size: 30px 30px;
      -o-background-size: 30px 30px;
      background-size: 30px 30px;
      padding-left: 40px;
      height: 30px;
      line-height: 1.9;
    }
  </style>

  <link rel="stylesheet" href="shiny-slides.css" type="text/css" />


</head>

<body style="opacity: 0">

<slides>

  <slide class="title-slide segue nobackground">
        <aside class="gdbar"><img src="shiny-debugging_files/logo.png"></aside>
        <!-- The content of this hgroup is replaced programmatically through the slide_config.json. -->
    <hgroup class="auto-fadein">
      <h1 data-config-title><!-- populated from slide_config.json --></h1>
      <h2 data-config-subtitle><!-- populated from slide_config.json --></h2>
      <p data-config-presenter><!-- populated from slide_config.json --></p>
          </hgroup>
  </slide>

<slide class='segue dark nobackground'><hgroup class = 'auto-fadein'><h2>Overview</h2></hgroup><article  id="overview">

</article></slide><slide class=''><hgroup><h2>Goals</h2></hgroup><article  id="goals">

<h3>You will learn:</h3>

<ul class = 'build'>
<li>Tools for finding bugs &amp; diagnosing errors in Shiny applications</li>
<li>Little-known ways to look under the covers</li>
<li>How to debug problems in deployed apps</li>
<li>Cheat code for IDE JavaScript debug tools</li>
</ul>

</article></slide><slide class=''><hgroup><h2>Outline</h2></hgroup><article  id="outline">

<h3>We&#39;ll cover three main areas:</h3>

<ul class = 'build'>
<li>Debugging</li>
<li>Tracing</li>
<li>Errors</li>
</ul>

</article></slide><slide class='segue dark nobackground'><hgroup class = 'auto-fadein'><h2>Debugging</h2></hgroup><article  id="debugging">

<p>&quot;Finding your bug is a process of confirming the many things that you believe are true — until you find one which is not true.&quot;</p>

<p>&#8211; Norm Matloff</p>

<p>Author of <em>The Art of R Programming</em> and <em>The Art of Debugging</em></p>

</article></slide><slide class=''><hgroup><h2>Breakpoints</h2></hgroup><article  id="breakpoints">

<img src='images/breakpoint.png' title=''/>

<p><em>Breakpoint (armed)</em></p>

</article></slide><slide class=''><hgroup><h2>Breakpoints</h2></hgroup><article  id="breakpoints-1">

<img src='images/breakpoint-hit.png' title=''/>

<p><em>Stepping after execution</em></p>

</article></slide><slide class=''><hgroup><h2>Breakpoints</h2></hgroup><article  id="breakpoints-2" class="build">

<h3>Pros</h3>

<ul class = 'build'>
<li>Doesn&#39;t change code</li>
<li>Can inspect local values/stack</li>
<li>Can step through following code</li>
</ul>

<h3>Cons</h3>

<ul class = 'build'>
<li>Only works inside <code>shinyServer</code></li>
<li>Can&#39;t tell you why something isn&#39;t happening</li>
<li>Interrupts program flow; not conditional</li>
</ul>

</article></slide><slide class=''><hgroup><h2>browser()</h2></hgroup><article  id="browser">

<img src='images/browser.png' title=''/>

</article></slide><slide class=''><hgroup><h2>Conditional breakpoint</h2></hgroup><article  id="conditional-breakpoint">

<pre class = 'prettyprint lang-r'>if (input$bins &gt; 50)
  browser()</pre>

</article></slide><slide class=''><hgroup><h2>browser()</h2></hgroup><article  id="browser-1" class="build">

<h3>Pros</h3>

<ul class = 'build'>
<li>Similar advantages to breakpoints</li>
<li>Valid anywhere an R expression is valid</li>
<li>Can be made conditional</li>
</ul>

<h3>Cons</h3>

<ul class = 'build'>
<li>Changes your code!</li>
<li>Interrupts program flow</li>
<li>Can&#39;t tell you why something isn&#39;t happening</li>
</ul>

</article></slide><slide class='segue dark nobackground'><hgroup class = 'auto-fadein'><h2>Tracing</h2></hgroup><article  id="tracing">

<aside class='note'><section><p>In many cases it&#39;s difficult to diagnose a problem by halting execution, and instead you need to observe the system as it runs. This is particularly true of Shiny applications since the system doesn&#39;t run once through linearly as an R script does! We&#39;ll look at a number of ways to peek into the system while it&#39;s running.</p></section></aside>

</article></slide><slide class=''><hgroup><h2>Showcase Mode</h2></hgroup><article  id="showcase-mode" class="build">

<pre class = 'prettyprint lang-r'>runApp(..., display.mode=&quot;showcase&quot;)</pre>

<img src='images/kmeans-showcase.gif' title=''/>

</article></slide><slide class=''><hgroup><h2>Showcase Mode</h2></hgroup><article  id="showcase-mode-1" class="build">

<h3>Pros</h3>

<ul class = 'build'>
<li>Very easy to use</li>
<li>Helps find unnecessary or unexpected execution</li>
</ul>

<h3>Cons</h3>

<ul class = 'build'>
<li>Doesn&#39;t scale well to larger apps</li>
<li>Won&#39;t show you <em>why</em> a reactive or observer executed</li>
</ul>

</article></slide><slide class=''><hgroup><h2>Reactive Log</h2></hgroup><article  id="reactive-log" class="build">

<pre class = 'prettyprint lang-r'>options(shiny.reactlog=TRUE)
runApp(...)
showReactLog()</pre>

<img src='images/reactlog.png' title=''/>

</article></slide><slide class=''><hgroup><h2>Reactive Log</h2></hgroup><article  id="reactive-log-1" class="build">

<h3>Pros</h3>

<ul class = 'build'>
<li><em>Can</em> show you why something isn&#39;t happening!</li>
<li>No more thorough way of visualizing reactivity</li>
</ul>

<h3>Cons</h3>

<ul class = 'build'>
<li>Lots of data to sift through</li>
<li>Not real-time</li>
</ul>

</article></slide><slide class=''><hgroup><h2>&quot;printf&quot; tracing</h2></hgroup><article  id="printf-tracing" class="build">

<pre class = 'prettyprint lang-r'># generate bins based on input$bins from ui.R
x    &lt;- faithful[, 2] 
bins &lt;- seq(min(x), max(x), length.out = input$bins + 1)
cat(file=stderr(), &quot;drawing histogram with&quot;, input$bins, &quot;bins\n&quot;)</pre>

<pre >Listening on http://127.0.0.1:5757
drawing histogram with 30 bins
drawing histogram with 35 bins</pre>

</article></slide><slide class=''><hgroup><h2>&quot;printf&quot; tracing</h2></hgroup><article  id="printf-tracing-1" class="build">

<h3>Pros</h3>

<ul class = 'build'>
<li>Actual values at runtime, w/o modifying flow</li>
<li>Only method that works after deployment</li>
</ul>

<h3>Cons</h3>

<ul class = 'build'>
<li>Limited to textual representation of values</li>
<li>Modifies code</li>
<li>Watch out for reactive side effects!</li>
</ul>

</article></slide><slide class=''><hgroup><h2>Tracing on Shinyapps.io</h2></hgroup><article  id="tracing-on-shinyapps.io" class="build">

<pre class = 'prettyprint lang-r'>rsconnect::deployApp( ... )
rsconnect::showLogs(streaming = TRUE)</pre>

<pre >2016-01-29T01:26:12 shinyapps[77594]: 
2016-01-29T01:26:12 shinyapps[77594]: Starting R with process ID: &#39;26&#39;
2016-01-29T01:26:14 shinyapps[77594]: drawing histogram with 30 bins
2016-01-29T01:26:14 shinyapps[77594]: drawing histogram with 35 bins</pre>

</article></slide><slide class=''><hgroup><h2>Tracing in Shiny Server</h2></hgroup><article  id="tracing-in-shiny-server">

<pre >tail -f /var/log/shiny-server/myapp-20160131-104403-8492.log</pre>

<p>Only while R session is alive!</p>

</article></slide><slide class=''><hgroup><h2>Client/server tracing</h2></hgroup><article  id="clientserver-tracing" class="build">

<pre class = 'prettyprint lang-r'>options(shiny.trace = TRUE)</pre>

<pre >SEND {&quot;config&quot;:{&quot;workerId&quot;:&quot;&quot;,&quot;sessionId&quot;:&quot;04531d50d12554bd981b24b9d3983cc4&quot;}}
RECV {&quot;method&quot;:&quot;init&quot;,&quot;data&quot;:{&quot;bins&quot;:30,&quot;.clientdata_output_distPlot_width&quot;:610,
      &quot;.clientdata_output_distPlot_height&quot;:400,&quot;.clientdata_output_distPlot_hidden&quot;:false,
      &quot;.clientdata_pixelratio&quot;:1,&quot;.clientdata_url_protocol&quot;:&quot;http:&quot;,
      &quot;.clientdata_url_hostname&quot;:&quot;127.0.0.1&quot;,&quot;.clientdata_url_port&quot;:&quot;5569&quot;,
      &quot;.clientdata_url_pathname&quot;:&quot;/&quot;,&quot;.clientdata_url_search&quot;:&quot;&quot;,
      &quot;.clientdata_url_hash_initial&quot;:&quot;&quot;,&quot;.clientdata_singletons&quot;:&quot;&quot;,
      &quot;.clientdata_allowDataUriScheme&quot;:true}}</pre>

</article></slide><slide class='segue dark nobackground'><hgroup class = 'auto-fadein'><h2>Error Handling</h2></hgroup><article  id="error-handling">

</article></slide><slide class=''><hgroup><h2>Tracebacks</h2></hgroup><article  id="tracebacks" class="build">

<pre class = 'prettyprint lang-r'>bins &lt;- seq(min(x), max(x), length.out = input$bins + 1)
if (input$bins &gt; 40)
  stop(&quot;too many bins&quot;)</pre>

<pre >Warning: Error in renderPlot: too many bins
Stack trace (innermost first):
    76: renderPlot [server.R#20]
    68: output$distPlot
     1: shiny::runApp
     
     </pre>

</article></slide><slide class=''><hgroup><h2>Full tracebacks</h2></hgroup><article  id="full-tracebacks" class="build">

<pre class = 'prettyprint lang-r'>options(shiny.fullstacktrace = TRUE)</pre>

<pre >Warning: Error in renderPlot: too many bins
Stack trace (innermost first):
    79: h
    78: .handleSimpleError
    77: stop
    76: renderPlot [server.R#20]
    75: ..stacktraceon..
    74: func
    ...
    </pre>

</article></slide><slide class=''><hgroup><h2>Pausing on errors</h2></hgroup><article  id="pausing-on-errors" class="build">

<pre class = 'prettyprint lang-r'>options(shiny.error = browser)</pre>

<img src='images/shiny-error.png' title=''/>

</article></slide><slide class=''><hgroup><h2>JavaScript errors: Browser</h2></hgroup><article  id="javascript-errors-browser" class="build">

<p>Right-click, inspect element, Console.</p>

<img src='images/chrome-devtools.png' title=''/>

</article></slide><slide class=''><hgroup><h2>JavaScript exceptions: first-chance</h2></hgroup><article  id="javascript-exceptions-first-chance">

<img src='images/pauseoncaught.png' title=''/>

</article></slide><slide class=''><hgroup><h2>JavaScript dev mode on OS X</h2></hgroup><article  id="javascript-dev-mode-on-os-x" class="build">

<pre >defaults write org.rstudio.RStudio WebKitDeveloperExtras -bool true</pre>

<img src='images/inspectelement.png' title=''/>

</article></slide><slide class='segue dark nobackground'><hgroup class = 'auto-fadein'><h2>Wrapup</h2></hgroup><article  id="wrapup">

<p>Any questions?</p></article></slide>


  <slide class="backdrop"></slide>

</slides>

<script src="shiny-debugging_files/ioslides-13.5.1/js/modernizr.custom.45394.js"></script>
<script src="shiny-debugging_files/ioslides-13.5.1/js/prettify/prettify.js"></script>
<script src="shiny-debugging_files/ioslides-13.5.1/js/prettify/lang-r.js"></script>
<script src="shiny-debugging_files/ioslides-13.5.1/js/prettify/lang-yaml.js"></script>
<script src="shiny-debugging_files/ioslides-13.5.1/js/hammer.js"></script>
<script src="shiny-debugging_files/ioslides-13.5.1/js/slide-controller.js"></script>
<script src="shiny-debugging_files/ioslides-13.5.1/js/slide-deck.js"></script>

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

<!-- map slide visiblity events into shiny -->
<script>
  (function() {
    if (window.jQuery) {
       window.jQuery(document).on('slideleave', function(e) {
         window.jQuery(e.target).trigger('hidden');
      });
       window.jQuery(document).on('slideenter', function(e) {
         window.jQuery(e.target).trigger('shown');
      });
    }
  })();
</script>

</body>
</html>


================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/fonts.css
================================================
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url(OpenSans.ttf) format('truetype');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  src: url(OpenSansSemibold.ttf) format('truetype');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400;
  src: url(OpenSansItalic.ttf) format('truetype');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 600;
  src: url(OpenSansSemiboldItalic.ttf) format('truetype');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  src: url(SourceCodePro.ttf) format('truetype');
}


================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/hammer.js
================================================
/*
 * Hammer.JS
 * version 0.4
 * author: Eight Media
 * https://github.com/EightMedia/hammer.js
 */
function Hammer(element, options, undefined)
{
    var self = this;

    var defaults = {
        // prevent the default event or not... might be buggy when false
        prevent_default    : false,
        css_hacks          : true,

        drag               : true,
        drag_vertical      : true,
        drag_horizontal    : true,
        // minimum distance before the drag event starts
        drag_min_distance  : 20, // pixels

        // pinch zoom and rotation
        transform          : true,
        scale_treshold     : 0.1,
        rotation_treshold  : 15, // degrees

        tap                : true,
        tap_double         : true,
        tap_max_interval   : 300,
        tap_double_distance: 20,

        hold               : true,
        hold_timeout       : 500
    };
    options = mergeObject(defaults, options);

    // some css hacks
    (function() {
        if(!options.css_hacks) {
            return false;
        }

        var vendors = ['webkit','moz','ms','o',''];
        var css_props = {
            "userSelect": "none",
            "touchCallout": "none",
            "userDrag": "none",
            "tapHighlightColor": "rgba(0,0,0,0)"
        };

        var prop = '';
        for(var i = 0; i < vendors.length; i++) {
            for(var p in css_props) {
                prop = p;
                if(vendors[i]) {
                    prop = vendors[i] + prop.substring(0, 1).toUpperCase() + prop.substring(1);
                }
                element.style[ prop ] = css_props[p];
            }
        }
    })();

    // holds the distance that has been moved
    var _distance = 0;

    // holds the exact angle that has been moved
    var _angle = 0;

    // holds the diraction that has been moved
    var _direction = 0;

    // holds position movement for sliding
    var _pos = { };

    // how many fingers are on the screen
    var _fingers = 0;

    var _first = false;

    var _gesture = null;
    var _prev_gesture = null;

    var _touch_start_time = null;
    var _prev_tap_pos = {x: 0, y: 0};
    var _prev_tap_end_time = null;

    var _hold_timer = null;

    var _offset = {};

    // keep track of the mouse status
    var _mousedown = false;

    var _event_start;
    var _event_move;
    var _event_end;


    /**
     * angle to direction define
     * @param  float    angle
     * @return string   direction
     */
    this.getDirectionFromAngle = function( angle )
    {
        var directions = {
            down: angle >= 45 && angle < 135, //90
            left: angle >= 135 || angle <= -135, //180
            up: angle < -45 && angle > -135, //270
            right: angle >= -45 && angle <= 45 //0
        };

        var direction, key;
        for(key in directions){
            if(directions[key]){
                direction = key;
                break;
            }
        }
        return direction;
    };


    /**
     * count the number of fingers in the event
     * when no fingers are detected, one finger is returned (mouse pointer)
     * @param  event
     * @return int  fingers
     */
    function countFingers( event )
    {
        // there is a bug on android (until v4?) that touches is always 1,
        // so no multitouch is supported, e.g. no, zoom and rotation...
        return event.touches ? event.touches.length : 1;
    }


    /**
     * get the x and y positions from the event object
     * @param  event
     * @return array  [{ x: int, y: int }]
     */
    function getXYfromEvent( event )
    {
        event = event || window.event;

        // no touches, use the event pageX and pageY
        if(!event.touches) {
            var doc = document,
                body = doc.body;

            return [{
                x: event.pageX || event.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && doc.clientLeft || 0 ),
                y: event.pageY || event.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && doc.clientTop || 0 )
            }];
        }
        // multitouch, return array with positions
        else {
            var pos = [], src;
            for(var t=0, len=event.touches.length; t<len; t++) {
                src = event.touches[t];
                pos.push({ x: src.pageX, y: src.pageY });
            }
            return pos;
        }
    }


    /**
     * calculate the angle between two points
     * @param object pos1 { x: int, y: int }
     * @param object pos2 { x: int, y: int }
     */
    function getAngle( pos1, pos2 )
    {
        return Math.atan2(pos2.y - pos1.y, pos2.x - pos1.x) * 180 / Math.PI;
    }

    /**
     * trigger an event/callback by name with params
     * @param string name
     * @param array  params
     */
    function triggerEvent( eventName, params )
    {
        // return touches object
        params.touches = getXYfromEvent(params.originalEvent);
        params.type = eventName;

        // trigger callback
        if(isFunction(self["on"+ eventName])) {
            self["on"+ eventName].call(self, params);
        }
    }


    /**
     * cancel event
     * @param   object  event
     * @return  void
     */

    function cancelEvent(event){
        event = event || window.event;
        if(event.preventDefault){
            event.preventDefault();
        }else{
            event.returnValue = false;
            event.cancelBubble = true;
        }
    }


    /**
     * reset the internal vars to the start values
     */
    function reset()
    {
        _pos = {};
        _first = false;
        _fingers = 0;
        _distance = 0;
        _angle = 0;
        _gesture = null;
    }


    var gestures = {
        // hold gesture
        // fired on touchstart
        hold : function(event)
        {
            // only when one finger is on the screen
            if(options.hold) {
                _gesture = 'hold';
                clearTimeout(_hold_timer);

                _hold_timer = setTimeout(function() {
                    if(_gesture == 'hold') {
                        triggerEvent("hold", {
                            originalEvent   : event,
                            position        : _pos.start
                        });
                    }
                }, options.hold_timeout);
            }
        },


        // drag gesture
        // fired on mousemove
        drag : function(event)
        {
            // get the distance we moved
            var _distance_x = _pos.move[0].x - _pos.start[0].x;
            var _distance_y = _pos.move[0].y - _pos.start[0].y;
            _distance = Math.sqrt(_distance_x * _distance_x + _distance_y * _distance_y);

            // drag
            // minimal movement required
            if(options.drag && (_distance > options.drag_min_distance) || _gesture == 'drag') {
                // calculate the angle
                _angle = getAngle(_pos.start[0], _pos.move[0]);
                _direction = self.getDirectionFromAngle(_angle);

                // check the movement and stop if we go in the wrong direction
                var is_vertical = (_direction == 'up' || _direction == 'down');
                if(((is_vertical && !options.drag_vertical) || (!is_vertical && !options.drag_horizontal))
                    && (_distance > options.drag_min_distance)) {
                    return;
                }

                _gesture = 'drag';

                var position = { x: _pos.move[0].x - _offset.left,
                    y: _pos.move[0].y - _offset.top };

                var event_obj = {
                    originalEvent   : event,
                    position        : position,
                    direction       : _direction,
                    distance        : _distance,
                    distanceX       : _distance_x,
                    distanceY       : _distance_y,
                    angle           : _angle
                };

                // on the first time trigger the start event
                if(_first) {
                    triggerEvent("dragstart", event_obj);

                    _first = false;
                }

                // normal slide event
                triggerEvent("drag", event_obj);

                cancelEvent(event);
            }
        },


        // transform gesture
        // fired on touchmove
        transform : function(event)
        {
            if(options.transform) {
                var scale = event.scale || 1;
                var rotation = event.rotation || 0;

                if(countFingers(event) != 2) {
                    return false;
                }

                if(_gesture != 'drag' &&
                    (_gesture == 'transform' || Math.abs(1-scale) > options.scale_treshold
                        || Math.abs(rotation) > options.rotation_treshold)) {
                    _gesture = 'transform';

                    _pos.center = {  x: ((_pos.move[0].x + _pos.move[1].x) / 2) - _offset.left,
                        y: ((_pos.move[0].y + _pos.move[1].y) / 2) - _offset.top };

                    var event_obj = {
                        originalEvent   : event,
                        position        : _pos.center,
                        scale           : scale,
                        rotation        : rotation
                    };

                    // on the first time trigger the start event
                    if(_first) {
                        triggerEvent("transformstart", event_obj);
                        _first = false;
                    }

                    triggerEvent("transform", event_obj);

                    cancelEvent(event);

                    return true;
                }
            }

            return false;
        },


        // tap and double tap gesture
        // fired on touchend
        tap : function(event)
        {
            // compare the kind of gesture by time
            var now = new Date().getTime();
            var touch_time = now - _touch_start_time;

            // dont fire when hold is fired
            if(options.hold && !(options.hold && options.hold_timeout > touch_time)) {
                return;
            }

            // when previous event was tap and the tap was max_interval ms ago
            var is_double_tap = (function(){
                if (_prev_tap_pos && options.tap_double && _prev_gesture == 'tap' && (_touch_start_time - _prev_tap_end_time) < options.tap_max_interval) {
                    var x_distance = Math.abs(_prev_tap_pos[0].x - _pos.start[0].x);
                    var y_distance = Math.abs(_prev_tap_pos[0].y - _pos.start[0].y);
                    return (_prev_tap_pos && _pos.start && Math.max(x_distance, y_distance) < options.tap_double_distance);

                }
                return false;
            })();

            if(is_double_tap) {
                _gesture = 'double_tap';
                _prev_tap_end_time = null;

                triggerEvent("doubletap", {
                    originalEvent   : event,
                    position        : _pos.start
                });
                cancelEvent(event);
            }

            // single tap is single touch
            else {
                _gesture = 'tap';
                _prev_tap_end_time = now;
                _prev_tap_pos = _pos.start;

                if(options.tap) {
                    triggerEvent("tap", {
                        originalEvent   : event,
                        position        : _pos.start
                    });
                    cancelEvent(event);
                }
            }

        }

    };


    function handleEvents(event)
    {
        switch(event.type)
        {
            case 'mousedown':
            case 'touchstart':
                _pos.start = getXYfromEvent(event);
                _touch_start_time = new Date().getTime();
                _fingers = countFingers(event);
                _first = true;
                _event_start = event;

                // borrowed from jquery offset https://github.com/jquery/jquery/blob/master/src/offset.js
                var box = element.getBoundingClientRect();
                var clientTop  = element.clientTop  || document.body.clientTop  || 0;
                var clientLeft = element.clientLeft || document.body.clientLeft || 0;
                var scrollTop  = window.pageYOffset || element.scrollTop  || document.body.scrollTop;
                var scrollLeft = window.pageXOffset || element.scrollLeft || document.body.scrollLeft;

                _offset = {
                    top: box.top + scrollTop - clientTop,
                    left: box.left + scrollLeft - clientLeft
                };

                _mousedown = true;

                // hold gesture
                gestures.hold(event);

                if(options.prevent_default) {
                    cancelEvent(event);
                }
                break;

            case 'mousemove':
            case 'touchmove':
                if(!_mousedown) {
                    return false;
                }
                _event_move = event;
                _pos.move = getXYfromEvent(event);

                if(!gestures.transform(event)) {
                    gestures.drag(event);
                }
                break;

            case 'mouseup':
            case 'mouseout':
            case 'touchcancel':
            case 'touchend':
                if(!_mousedown || (_gesture != 'transform' && event.touches && event.touches.length > 0)) {
                    return false;
                }

                _mousedown = false;
                _event_end = event;

                // drag gesture
                // dragstart is triggered, so dragend is possible
                if(_gesture == 'drag') {
                    triggerEvent("dragend", {
                        originalEvent   : event,
                        direction       : _direction,
                        distance        : _distance,
                        angle           : _angle
                    });
                }

                // transform
                // transformstart is triggered, so transformed is possible
                else if(_gesture == 'transform') {
                    triggerEvent("transformend", {
                        originalEvent   : event,
                        position        : _pos.center,
                        scale           : event.scale,
                        rotation        : event.rotation
                    });
                }
                else {
                    gestures.tap(_event_start);
                }

                _prev_gesture = _gesture;

                // reset vars
                reset();
                break;
        }
    }


    // bind events for touch devices
    // except for windows phone 7.5, it doesnt support touch events..!
    if('ontouchstart' in window) {
        element.addEventListener("touchstart", handleEvents, false);
        element.addEventListener("touchmove", handleEvents, false);
        element.addEventListener("touchend", handleEvents, false);
        element.addEventListener("touchcancel", handleEvents, false);
    }
    // for non-touch
    else {

        if(element.addEventListener){ // prevent old IE errors
            element.addEventListener("mouseout", function(event) {
                if(!isInsideHammer(element, event.relatedTarget)) {
                    handleEvents(event);
                }
            }, false);
            element.addEventListener("mouseup", handleEvents, false);
            element.addEventListener("mousedown", handleEvents, false);
            element.addEventListener("mousemove", handleEvents, false);

            // events for older IE
        }else if(document.attachEvent){
            element.attachEvent("onmouseout", function(event) {
                if(!isInsideHammer(element, event.relatedTarget)) {
                    handleEvents(event);
                }
            }, false);
            element.attachEvent("onmouseup", handleEvents);
            element.attachEvent("onmousedown", handleEvents);
            element.attachEvent("onmousemove", handleEvents);
        }
    }


    /**
     * find if element is (inside) given parent element
     * @param   object  element
     * @param   object  parent
     * @return  bool    inside
     */
    function isInsideHammer(parent, child) {
        // get related target for IE
        if(!child && window.event && window.event.toElement){
            child = window.event.toElement;
        }

        if(parent === child){
            return true;
        }

        // loop over parentNodes of child until we find hammer element
        if(child){
            var node = child.parentNode;
            while(node !== null){
                if(node === parent){
                    return true;
                };
                node = node.parentNode;
            }
        }
        return false;
    }


    /**
     * merge 2 objects into a new object
     * @param   object  obj1
     * @param   object  obj2
     * @return  object  merged object
     */
    function mergeObject(obj1, obj2) {
        var output = {};

        if(!obj2) {
            return obj1;
        }

        for (var prop in obj1) {
            if (prop in obj2) {
                output[prop] = obj2[prop];
            } else {
                output[prop] = obj1[prop];
            }
        }
        return output;
    }

    function isFunction( obj ){
        return Object.prototype.toString.call( obj ) == "[object Function]";
    }
}

================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/modernizr.custom.45394.js
================================================
/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
 * Build: http://www.modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexbox_legacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-mq-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
 */
;window.Modernizr=function(a,b,c){function C(a){i.cssText=a}function D(a,b){return C(m.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a)if(i[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}return!1}function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+o.join(d+" ")+d).split(" ");return E(b,"string")||E(b,"undefined")?G(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),H(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)t[c[d]]=c[d]in j;return t.list&&(t.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,g,h,i=a.length;d<i;d++)j.setAttribute("type",g=a[d]),e=j.type!=="text",e&&(j.value=k,j.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(g)&&j.style.WebkitAppearance!==c?(f.appendChild(j),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(j,null).WebkitAppearance!=="textfield"&&j.offsetHeight!==0,f.removeChild(j)):/^(search|tel)$/.test(g)||(/^(url|email)$/.test(g)?e=j.checkValidity&&j.checkValidity()===!1:/^color$/.test(g)?(f.appendChild(j),f.offsetWidth,e=j.value!=k,f.removeChild(j)):e=j.value!=k)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.5.3",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j=b.createElement("input"),k=":)",l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v=u.slice,w,x=function(a,c,d,e){var h,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:g+(d+1),k.appendChild(j);return h=["&#173;","<style>",a,"</style>"].join(""),k.id=g,(l?k:m).innerHTML+=h,m.appendChild(k),l||(m.style.background="",f.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},y=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return x("@media "+b+" { #"+g+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},z=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=E(e[d],"function"),E(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),A={}.hasOwnProperty,B;!E(A,"undefined")&&!E(A.call,"undefined")?B=function(a,b){return A.call(a,b)}:B=function(a,b){return b in a&&E(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e});var J=function(c,d){var f=c.join(""),g=d.length;x(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch||(j.touch&&j.touch.offsetTop)===9,e.csstransforms3d=(j.csstransforms3d&&j.csstransforms3d.offsetLeft)===9&&j.csstransforms3d.offsetHeight===3,e.generatedcontent=(j.generatedcontent&&j.generatedcontent.offsetHeight)>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",m.join("touch-enabled),("),g,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",m.join("transform-3d),("),g,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join(""),['#generatedcontent:after{content:"',k,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){return I("flexOrder")},r["flexbox-legacy"]=function(){return I("boxDirection")},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!E(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){try{var d=b.createElement("canvas"),e;e=!(!a.WebGLRenderingContext||!d.getContext("experimental-webgl")&&!d.getContext("webgl")),d=c}catch(f){e=!1}return e},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){return!!a.openDatabase},r.indexedDB=function(){return!!I("indexedDB",a)},r.hashchange=function(){return z("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},r.websockets=function(){for(var b=-1,c=o.length;++b<c;)if(a[o[b]+"WebSocket"])return!0;return"WebSocket"in a},r.rgba=function(){return C("background-color:rgba(150,255,150,.5)"),F(i.backgroundColor,"rgba")},r.hsla=function(){return C("background-color:hsla(120,40%,100%,.5)"),F(i.backgroundColor,"rgba")||F(i.backgroundColor,"hsla")},r.multiplebgs=function(){return C("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(i.background)},r.backgroundsize=function(){return I("backgroundSize")},r.borderimage=function(){return I("borderImage")},r.borderradius=function(){return I("borderRadius")},r.boxshadow=function(){return I("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){return D("opacity:.55"),/^0.55$/.test(i.opacity)},r.cssanimations=function(){return I("animationName")},r.csscolumns=function(){return I("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return C((a+"-webkit- ".split(" ").join(b+a)+m.join(c+a)).slice(0,-a.length)),F(i.backgroundImage,"gradient")},r.cssreflections=function(){return I("boxReflect")},r.csstransforms=function(){return!!I("transform")},r.csstransforms3d=function(){var a=!!I("perspective");return a&&"webkitPerspective"in f.style&&(a=e.csstransforms3d),a},r.csstransitions=function(){return I("transition")},r.fontface=function(){return e.fontface},r.generatedcontent=function(){return e.generatedcontent},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},r.localstorage=function(){try{return localStorage.setItem(g,g),localStorage.removeItem(g),!0}catch(a){return!1}},r.sessionstorage=function(){try{return sessionStorage.setItem(g,g),sessionStorage.removeItem(g),!0}catch(a){return!1}},r.webworkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(l.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(l.call(b.createElementNS(q.svg,"clipPath")))};for(var L in r)B(r,L)&&(w=L.toLowerCase(),e[w]=r[L](),u.push((e[w]?"":"no-")+w));return e.input||K(),C(""),h=j=null,e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.mq=y,e.hasEvent=z,e.testProp=function(a){return G([a])},e.testAllProps=I,e.testStyles=x,e.prefixed=function(a,b,c){return b?I(a,b,c):I(a,"pfx")},e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};

================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/order.js
================================================
/*
 RequireJS order 1.0.5 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
*/
(function(){function k(a){var b=a.currentTarget||a.srcElement,c;if(a.type==="load"||l.test(b.readyState)){a=b.getAttribute("data-requiremodule");j[a]=!0;for(a=0;c=g[a];a++)if(j[c.name])c.req([c.name],c.onLoad);else break;a>0&&g.splice(0,a);setTimeout(function(){b.parentNode.removeChild(b)},15)}}function m(a){var b,c;a.setAttribute("data-orderloaded","loaded");for(a=0;c=h[a];a++)if((b=i[c])&&b.getAttribute("data-orderloaded")==="loaded")delete i[c],require.addScriptToDom(b);else break;a>0&&h.splice(0,
a)}var f=typeof document!=="undefined"&&typeof window!=="undefined"&&document.createElement("script"),n=f&&(f.async||window.opera&&Object.prototype.toString.call(window.opera)==="[object Opera]"||"MozAppearance"in document.documentElement.style),o=f&&f.readyState==="uninitialized",l=/^(complete|loaded)$/,g=[],j={},i={},h=[],f=null;define({version:"1.0.5",load:function(a,b,c,e){var d;b.nameToUrl?(d=b.nameToUrl(a,null),require.s.skipAsync[d]=!0,n||e.isBuild?b([a],c):o?(e=require.s.contexts._,!e.urlFetched[d]&&
!e.loaded[a]&&(e.urlFetched[d]=!0,require.resourcesReady(!1),e.scriptCount+=1,d=require.attach(d,e,a,null,null,m),i[a]=d,h.push(a)),b([a],c)):b.specified(a)?b([a],c):(g.push({name:a,req:b,onLoad:c}),require.attach(d,null,a,k,"script/cache"))):b([a],c)}})})();


================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/lang-r.js
================================================
// Copyright (C) 2012 Jeffrey B. Arnold
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.


/**
 * @fileoverview
 * Registers a language handler for S, S-plus, and R source code.
 *
 *
 * To use, include prettify.js and this file in your HTML page.
 * Then put your code in an HTML tag like
 *      <pre class="prettyprint lang-r"> code </pre>
 *
 * Language definition from
 * http://cran.r-project.org/doc/manuals/R-lang.html.
 * Many of the regexes are shared  with the pygments SLexer,
 * http://pygments.org/.
 *
 * Original: https://raw.github.com/jrnold/prettify-lang-r-bugs/master/lang-r.js
 *
 * @author jeffrey.arnold@gmail.com
 */
PR['registerLangHandler'](
    PR['createSimpleLexer'](
        [
            [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
	    [PR['PR_STRING'],      /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"'],
	    [PR['PR_STRING'],      /^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/, null, "'"]
        ],
        [
            [PR['PR_COMMENT'],     /^#.*/],
	    [PR['PR_KEYWORD'],     /^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],
	    // hex numbes
	    [PR['PR_LITERAL'], /^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],
	    // Decimal numbers
            [PR['PR_LITERAL'], /^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],
	    // builtin symbols
	    [PR['PR_LITERAL'], /^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/],
	    // assignment, operators, and parens, etc.
	    [PR['PR_PUNCTUATION'], /^(?:<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],
	    // valid variable names
	    [PR['PR_PLAIN'], /^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],
	    // string backtick
	    [PR['PR_STRING'], /^`.+`/]
        ]),
    ['r', 's', 'R', 'S', 'Splus']);


================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/lang-tex.js
================================================
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);


================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/lang-yaml.js
================================================
var a=null;
PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);


================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/prettify.css
================================================
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}

================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/prettify.js
================================================
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();


================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/slide-controller.js
================================================
(function(window) {

var ORIGIN_ = location.protocol + '//' + location.host;

// check for local storage
var haveLocalStorage = (function() {
  var mod = 'mod';
  try {
    localStorage.setItem(mod, mod);
    localStorage.removeItem(mod);
    return true;
  } catch(e) {
    return false;
  }
}());

function SlideController() {
  this.popup = null;
  this.isPopup = window.opener;

  if (this.setupDone()) {
    window.addEventListener('message', this.onMessage_.bind(this), false);

    // Close popups if we reload the main window.
    window.addEventListener('beforeunload', function(e) {
      if (this.popup) {
        this.popup.close();
      }
    }.bind(this), false);
  }
}

SlideController.PRESENTER_MODE_PARAM = 'presentme';

SlideController.prototype.setupDone = function() {
  var params = location.search.substring(1).split('&').map(function(el) {
    return el.split('=');
  });

  var presentMe = null;
  for (var i = 0, param; param = params[i]; ++i) {
    if (param[0].toLowerCase() == SlideController.PRESENTER_MODE_PARAM) {
      presentMe = param[1] == 'true';
      break;
    }
  }

  if (presentMe !== null) {
    if (haveLocalStorage)
      localStorage.ENABLE_PRESENTOR_MODE = presentMe;
    // TODO: use window.history.pushState to update URL instead of the redirect.
    if (window.history.replaceState) {
      window.history.replaceState({}, '', location.pathname);
    } else {
      location.replace(location.pathname);
      return false;
    }
  }

  var enablePresenterMode = haveLocalStorage && localStorage.getItem('ENABLE_PRESENTOR_MODE');
  if (enablePresenterMode && JSON.parse(enablePresenterMode)) {
    // Only open popup from main deck. Don't want recursive popup opening!
    if (!this.isPopup) {
      var opts = 'menubar=no,location=yes,resizable=yes,scrollbars=no,status=no';
      this.popup = window.open(location.href, 'mywindow', opts);

      // Loading in the popup? Trigger the hotkey for turning presenter mode on.
      this.popup.addEventListener('load', function(e) {
        var evt = this.popup.document.createEvent('Event');
        evt.initEvent('keydown', true, true);
        evt.keyCode = 'P'.charCodeAt(0);
        this.popup.document.dispatchEvent(evt);
        // this.popup.document.body.classList.add('with-notes');
        // document.body.classList.add('popup');
      }.bind(this), false);
    }
  }

  return true;
}

SlideController.prototype.onMessage_ = function(e) {
  var data = e.data;

  // Restrict messages to being from this origin. Allow local developmet
  // from file:// though.
  // TODO: It would be dope if FF implemented location.origin!
  if (e.origin != ORIGIN_ && ORIGIN_.indexOf('file://') != 0) {
    // Ignore messages from unrecognized origins
    return;
  }

  // if (e.source.location.hostname != 'localhost') {
  //   alert('Someone tried to postMessage from an unknown origin');
  //   return;
  // }

  if ('keyCode' in data) {
    var evt = document.createEvent('Event');
    evt.initEvent('keydown', true, true);
    evt.keyCode = data.keyCode;
    document.dispatchEvent(evt);
  }
};

SlideController.prototype.sendMsg = function(msg) {
  // // Send message to popup window.
  // if (this.popup) {
  //   this.popup.postMessage(msg, ORIGIN_);
  // }

  // Send message to main window.
  if (this.isPopup) {
    // TODO: It would be dope if FF implemented location.origin.
    window.opener.postMessage(msg, '*');
  }
};

window.SlideController = SlideController;

})(window);



================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/slide-deck.js
================================================
/**
 * @authors Luke Mahe
 * @authors Eric Bidelman
 * @fileoverview TODO
 */
document.cancelFullScreen = document.webkitCancelFullScreen ||
                            document.mozCancelFullScreen;

/**
 * @constructor
 */
function SlideDeck(el) {
  this.curSlide_ = 0;
  this.prevSlide_ = 0;
  this.config_ = null;
  this.container = el || document.querySelector('slides');
  this.slides = [];
  this.controller = null;

  this.getCurrentSlideFromHash_();

  // Call this explicitly. Modernizr.load won't be done until after DOM load.
  this.onDomLoaded_.bind(this)();
}

/**
 * @const
 * @private
 */
SlideDeck.prototype.SLIDE_CLASSES_ = [
  'far-past', 'past', 'current', 'next', 'far-next'];

/**
 * @const
 * @private
 */
SlideDeck.prototype.CSS_DIR_ = 'theme/css/';

/**
 * @private
 */
SlideDeck.prototype.getCurrentSlideFromHash_ = function() {
  var slideNo = parseInt(document.location.hash.substr(1));

  if (slideNo) {
    this.curSlide_ = slideNo - 1;
  } else {
    this.curSlide_ = 0;
  }
};

/**
 * @param {number} slideNo
 */
SlideDeck.prototype.loadSlide = function(slideNo) {
  if (slideNo) {
    this.curSlide_ = slideNo - 1;
    this.updateSlides_();
  }
};

/**
 * @private
 */
SlideDeck.prototype.onDomLoaded_ = function(e) {
  document.body.classList.add('loaded'); // Add loaded class for templates to use.

  this.slides = this.container.querySelectorAll('slide:not([hidden]):not(.hidden):not(.backdrop)');

  // If we're on a smartphone, apply special sauce.
  if (Modernizr.mq('only screen and (max-device-width: 480px)')) {
    // var style = document.createElement('link');
    // style.rel = 'stylesheet';
    // style.type = 'text/css';
    // style.href = this.CSS_DIR_ + 'phone.css';
    // document.querySelector('head').appendChild(style);

    // No need for widescreen layout on a phone.
    this.container.classList.remove('layout-widescreen');
  }

  this.loadConfig_(SLIDE_CONFIG);
  this.addEventListeners_();
  this.updateSlides_();

  // Add slide numbers and total slide count metadata to each slide.
  var that = this;
  for (var i = 0, slide; slide = this.slides[i]; ++i) {
    slide.dataset.slideNum = i + 1;
    slide.dataset.totalSlides = this.slides.length;

    slide.addEventListener('click', function(e) {
      if (document.body.classList.contains('overview')) {
        that.loadSlide(this.dataset.slideNum);
        e.preventDefault();
        window.setTimeout(function() {
          that.toggleOverview();
        }, 500);
      }
    }, false);
  }

  // Note: this needs to come after addEventListeners_(), which adds a
  // 'keydown' listener that this controller relies on.

  // Modernizr.touch isn't a sufficient check for devices that support both
  // touch and mouse. Create the controller in all cases.
  // // Also, no need to set this up if we're on mobile.
  // if (!Modernizr.touch) {
    this.controller = new SlideController(this);
    if (this.controller.isPopup) {
      document.body.classList.add('popup');
    }
  //}
};

/**
 * @private
 */
SlideDeck.prototype.addEventListeners_ = function() {
  document.addEventListener('keydown', this.onBodyKeyDown_.bind(this), true);
  window.addEventListener('popstate', this.onPopState_.bind(this), false);

  // var transEndEventNames = {
  //   'WebkitTransition': 'webkitTransitionEnd',
  //   'MozTransition': 'transitionend',
  //   'OTransition': 'oTransitionEnd',
  //   'msTransition': 'MSTransitionEnd',
  //   'transition': 'transitionend'
  // };
  // 
  // // Find the correct transitionEnd vendor prefix.
  // window.transEndEventName = transEndEventNames[
  //     Modernizr.prefixed('transition')];
  // 
  // // When slides are done transitioning, kickoff loading iframes.
  // // Note: we're only looking at a single transition (on the slide). This
  // // doesn't include autobuilds the slides may have. Also, if the slide
  // // transitions on multiple properties (e.g. not just 'all'), this doesn't
  // // handle that case.
  // this.container.addEventListener(transEndEventName, function(e) {
  //     this.enableSlideFrames_(this.curSlide_);
  // }.bind(this), false);

  // document.addEventListener('slideenter', function(e) {
  //   var slide = e.target;
  //   window.setTimeout(function() {
  //     this.enableSlideFrames_(e.slideNumber);
  //     this.enableSlideFrames_(e.slideNumber + 1);
  //   }.bind(this), 300);
  // }.bind(this), false);
};

/**
 * @private
 * @param {Event} e The pop event.
 */
SlideDeck.prototype.onPopState_ = function(e) {
  if (e.state != null) {
    this.curSlide_ = e.state;
    this.updateSlides_(true);
  }
};

/**
 * @param {Event} e
 */
SlideDeck.prototype.onBodyKeyDown_ = function(e) {

  // Don't handle keys if an input or text area is active. Do special handling
  // for selectize because it keeps focus within an offscreen textbox even
  // when just the select control is showing -- for selectize we refrain from
  // handling keys only when the text input is active or when the up or down
  // arrow key is pressed (which is used to open the list from the keyboard)
  var parentNode = e.target.parentNode || e.target; // handle no parent
  if (parentNode.classList && parentNode.classList.contains('selectize-input')) {
    if (parentNode.classList.contains('input-active') ||  // text input is active
       (e.keyCode == 38) || (e.keyCode == 40))            // up or down arrow
      return;
  } else if (/^(input|textarea)$/i.test(e.target.nodeName) ||
      e.target.isContentEditable) {
    return;
  }

  // Forward keydowns to the main slides if we're the popup.
  if (this.controller && this.controller.isPopup) {
    this.controller.sendMsg({keyCode: e.keyCode});
  }

  switch (e.keyCode) {
    case 13: // Enter
      if (document.body.classList.contains('overview')) {
        this.toggleOverview();
      }
      break;

    case 39: // right arrow
    case 32: // space
    case 34: // PgDn
      this.nextSlide();
      e.preventDefault();
      break;

    case 37: // left arrow
    case 8: // Backspace
    case 33: // PgUp
      this.prevSlide();
      e.preventDefault();
      break;

    case 40: // down arrow
      this.nextSlide();
      e.preventDefault();
      break;

    case 38: // up arrow
      this.prevSlide();
      e.preventDefault();
      break;

    case 72: // H: Toggle code highlighting
      document.body.classList.toggle('highlight-code');
      break;

    case 79: // O: Toggle overview
      this.toggleOverview();
      break;

    case 80: // P
      if (this.controller && this.controller.isPopup) {
        document.body.classList.toggle('with-notes');
      } else if (this.controller && !this.controller.popup) {
        document.body.classList.toggle('with-notes');
      }
      break;

    case 82: // R
      // TODO: implement refresh on main slides when popup is refreshed.
      break;

    case 27: // ESC: Hide notes and highlighting
      document.body.classList.remove('with-notes');
      document.body.classList.remove('highlight-code');

      if (document.body.classList.contains('overview')) {
        this.toggleOverview();
      }
      break;

    case 70: // F: Toggle fullscreen
       // Only respect 'f' on body. Don't want to capture keys from an <input>.
       // Also, ignore browser's fullscreen shortcut (cmd+shift+f) so we don't
       // get trapped in fullscreen!
      if (document.cancelFullScreen !== undefined && e.target == document.body && !(e.shiftKey && e.metaKey)) {
        if (document.mozFullScreen !== undefined && !document.mozFullScreen) {
          document.body.mozRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
        } else if (document.webkitIsFullScreen !== undefined && !document.webkitIsFullScreen) {
          document.body.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
        } else {
          document.cancelFullScreen();
        }
      }
      break;

    case 87: // W: Toggle widescreen
      // Only respect 'w' on body. Don't want to capture keys from an <input>.
      if (e.target == document.body && !(e.shiftKey && e.metaKey)) {
        this.container.classList.toggle('layout-widescreen');
      }
      break;
  }
};

/**
 *
 */
SlideDeck.prototype.focusOverview_ = function() {
  var overview = document.body.classList.contains('overview');

  for (var i = 0, slide; slide = this.slides[i]; i++) {
    slide.style[Modernizr.prefixed('transform')] = overview ?
        'translateZ(-2500px) translate(' + (( i - this.curSlide_ ) * 105) +
                                       '%, 0%)' : '';
  }
};

/**
 */
SlideDeck.prototype.toggleOverview = function() {
  document.body.classList.toggle('overview');

  this.focusOverview_();
};

/**
 * @private
 */
SlideDeck.prototype.loadConfig_ = function(config) {
  if (!config) {
    return;
  }

  this.config_ = config;

  var settings = this.config_.settings;

  this.loadTheme_(settings.theme || []);

  if (settings.favIcon) {
    this.addFavIcon_(settings.favIcon);
  }

  // Prettyprint. Default to on.
  if (!!!('usePrettify' in settings) || settings.usePrettify) {
    prettyPrint();
  }

  if (settings.analytics) {
    this.loadAnalytics_();
  }

  if (settings.fonts) {
    this.addFonts_(settings.fonts);
  }

  // Builds. Default to on.
  if (!!!('useBuilds' in settings) || settings.useBuilds) {
    this.makeBuildLists_();
  }

  if (settings.title) {
    document.title = settings.title.replace(/<br\/?>/, ' ');
    if (settings.eventInfo && settings.eventInfo.title) {
      document.title +=  ' - ' + settings.eventInfo.title;
    }
    document.querySelector('[data-config-title]').innerHTML = settings.title;
  }

  if (settings.subtitle) {
    document.querySelector('[data-config-subtitle]').innerHTML = settings.subtitle;
  }

  if (this.config_.presenters) {
    var presenters = this.config_.presenters;
    var dataConfigContact = document.querySelector('[data-config-contact]');

    var html = [];
    if (presenters.length == 1) {
      var p = presenters[0];

      var presenterTitle = [p.name];
      if (p.company) {
        presenterTitle.push(p.company);
      }
      html = presenterTitle.join(' - ') + '<br>';

      var gplus = p.gplus ? '<span>g+</span><a href="' + p.gplus +
          '">' + p.gplus.replace(/https?:\/\//, '') + '</a>' : '';

      var twitter = p.twitter ? '<span>twitter</span>' +
          '<a href="http://twitter.com/' + p.twitter + '">' +
          p.twitter + '</a>' : '';

      var www = p.www ? '<span>www</span><a href="' + p.www +
                        '">' + p.www.replace(/https?:\/\//, '') + '</a>' : '';

      var github = p.github ? '<span>github</span><a href="' + p.github +
          '">' + p.github.replace(/https?:\/\//, '') + '</a>' : '';

      var html2 = [gplus, twitter, www, github].join('<br>');

      if (dataConfigContact) {
        dataConfigContact.innerHTML = html2;
      }
    } else {
      for (var i = 0, p; p = presenters[i]; ++i) {
        html.push(p.name + ' - ' + p.company);
      }
      html = html.join('<br>');
      if (dataConfigContact) {
        dataConfigContact.innerHTML = html;
      }
    }

    var dataConfigPresenter = document.querySelector('[data-config-presenter]');
    if (dataConfigPresenter) {
      dataConfigPresenter.innerHTML = html;
      if (settings.eventInfo) {
        var date = settings.eventInfo.date;
        var dateInfo = date ? ' - <time>' + date + '</time>' : '';
        dataConfigPresenter.innerHTML += settings.eventInfo.title + dateInfo;
      }
    }
  }

  /* Left/Right tap areas. Default to including. */
  if (!!!('enableSlideAreas' in settings) || settings.enableSlideAreas) {
    var el = document.createElement('div');
    el.classList.add('slide-area');
    el.id = 'prev-slide-area';
    el.addEventListener('click', this.prevSlide.bind(this), false);
    this.container.appendChild(el);

    var el = document.createElement('div');
    el.classList.add('slide-area');
    el.id = 'next-slide-area';
    el.addEventListener('click', this.nextSlide.bind(this), false);
    this.container.appendChild(el);
  }

  if (Modernizr.touch && (!!!('enableTouch' in settings) ||
      settings.enableTouch)) {
    var self = this;

    // Note: this prevents mobile zoom in/out but prevents iOS from doing
    // it's crazy scroll over effect and disaligning the slides.
    window.addEventListener('touchstart', function(e) {
      e.preventDefault();
    }, false);

    var hammer = new Hammer(this.container);
    hammer.ondragend = function(e) {
      if (e.direction == 'right' || e.direction == 'down') {
        self.prevSlide();
      } else if (e.direction == 'left' || e.direction == 'up') {
        self.nextSlide();
      }
    };
  }
};

/**
 * @private
 * @param {Array.<string>} fonts
 */
SlideDeck.prototype.addFonts_ = function(fonts) {
  var el = document.createElement('link');
  el.rel = 'stylesheet';
  el.href = ('https:' == document.location.protocol ? 'https' : 'http') +
      '://fonts.googleapis.com/css?family=' + fonts.join('|') + '&v2';
  document.querySelector('head').appendChild(el);
};

/**
 * @private
 */
SlideDeck.prototype.buildNextItem_ = function() {
  var slide = this.slides[this.curSlide_];
  var toBuild = slide.querySelector('.to-build');
  var built = slide.querySelector('.build-current');

  if (built) {
    built.classList.remove('build-current');
    if (built.classList.contains('fade')) {
      built.classList.add('build-fade');
    }
  }

  if (!toBuild) {
    var items = slide.querySelectorAll('.build-fade');
    for (var j = 0, item; item = items[j]; j++) {
      item.classList.remove('build-fade');
    }
    return false;
  }

  toBuild.classList.remove('to-build');
  toBuild.classList.add('build-current');

  return true;
};

/**
 * @param {boolean=} opt_dontPush
 */
SlideDeck.prototype.prevSlide = function(opt_dontPush) {
  if (this.curSlide_ > 0) {
    var bodyClassList = document.body.classList;
    bodyClassList.remove('highlight-code');

    // Toggle off speaker notes if they're showing when we move backwards on the
    // main slides. If we're the speaker notes popup, leave them up.
    if (this.controller && !this.controller.isPopup) {
      bodyClassList.remove('with-notes');
    } else if (!this.controller) {
      bodyClassList.remove('with-notes');
    }

    this.prevSlide_ = this.curSlide_--;

    this.updateSlides_(opt_dontPush);
  }
};

/**
 * @param {boolean=} opt_dontPush
 */
SlideDeck.prototype.nextSlide = function(opt_dontPush) {
  if (!document.body.classList.contains('overview') && this.buildNextItem_()) {
    return;
  }

  if (this.curSlide_ < this.slides.length - 1) {
    var bodyClassList = document.body.classList;
    bodyClassList.remove('highlight-code');

    // Toggle off speaker notes if they're showing when we advanced on the main
    // slides. If we're the speaker notes popup, leave them up.
    if (this.controller && !this.controller.isPopup) {
      bodyClassList.remove('with-notes');
    } else if (!this.controller) {
      bodyClassList.remove('with-notes');
    }

    this.prevSlide_ = this.curSlide_++;

    this.updateSlides_(opt_dontPush);
  }
};

/* Slide events */

/**
 * Triggered when a slide enter/leave event should be dispatched.
 *
 * @param {string} type The type of event to trigger
 *     (e.g. 'slideenter', 'slideleave').
 * @param {number} slideNo The index of the slide that is being left.
 */
SlideDeck.prototype.triggerSlideEvent = function(type, slideNo) {
  var el = this.getSlideEl_(slideNo);
  if (!el) {
    return;
  }

  // Call onslideenter/onslideleave if the attribute is defined on this slide.
  var func = el.getAttribute(type);
  if (func) {
    new Function(func).call(el); // TODO: Don't use new Function() :(
  }

  // Dispatch event to listeners setup using addEventListener.
  var evt = document.createEvent('Event');
  evt.initEvent(type, true, true);
  evt.slideNumber = slideNo + 1; // Make it readable
  evt.slide = el;

  el.dispatchEvent(evt);
};

/**
 * @private
 */
SlideDeck.prototype.updateSlides_ = function(opt_dontPush) {
  var dontPush = opt_dontPush || false;

  var curSlide = this.curSlide_;
  for (var i = 0; i < this.slides.length; ++i) {
    switch (i) {
      case curSlide - 2:
        this.updateSlideClass_(i, 'far-past');
        break;
      case curSlide - 1:
        this.updateSlideClass_(i, 'past');
        break;
      case curSlide:
        this.updateSlideClass_(i, 'current');
        break;
      case curSlide + 1:
        this.updateSlideClass_(i, 'next');
        break;
      case curSlide + 2:
        this.updateSlideClass_(i, 'far-next');
        break;
      default:
        this.updateSlideClass_(i);
        break;
    }
  };

  this.triggerSlideEvent('slideleave', this.prevSlide_);
  this.triggerSlideEvent('slideenter', curSlide);

// window.setTimeout(this.disableSlideFrames_.bind(this, curSlide - 2), 301);
// 
// this.enableSlideFrames_(curSlide - 1); // Previous slide.
// this.enableSlideFrames_(curSlide + 1); // Current slide.
// this.enableSlideFrames_(curSlide + 2); // Next slide.

   // Enable current slide's iframes (needed for page loat at current slide).
   this.enableSlideFrames_(curSlide + 1);

   // No way to tell when all slide transitions + auto builds are done.
   // Give ourselves a good buffer to preload the next slide's iframes.
   window.setTimeout(this.enableSlideFrames_.bind(this, curSlide + 2), 1000);

  this.updateHash_(dontPush);

  if (document.body.classList.contains('overview')) {
    this.focusOverview_();
    return;
  }

};

/**
 * @private
 * @param {number} slideNo
 */
SlideDeck.prototype.enableSlideFrames_ = function(slideNo) {
  var el = this.slides[slideNo - 1];
  if (!el) {
    return;
  }

  var frames = el.querySelectorAll('iframe');
  for (var i = 0, frame; frame = frames[i]; i++) {
    this.enableFrame_(frame);
  }
};

/**
 * @private
 * @param {number} slideNo
 */
SlideDeck.prototype.enableFrame_ = function(frame) {
  var src = frame.dataset.src;
  if (src && frame.src != src) {
    frame.src = src;
  }
};

/**
 * @private
 * @param {number} slideNo
 */
SlideDeck.prototype.disableSlideFrames_ = function(slideNo) {
  var el = this.slides[slideNo - 1];
  if (!el) {
    return;
  }

  var frames = el.querySelectorAll('iframe');
  for (var i = 0, frame; frame = frames[i]; i++) {
    this.disableFrame_(frame);
  }
};

/**
 * @private
 * @param {Node} frame
 */
SlideDeck.prototype.disableFrame_ = function(frame) {
  frame.src = 'about:blank';
};

/**
 * @private
 * @param {number} slideNo
 */
SlideDeck.prototype.getSlideEl_ = function(no) {
  if ((no < 0) || (no >= this.slides.length)) {
    return null;
  } else {
    return this.slides[no];
  }
};

/**
 * @private
 * @param {number} slideNo
 * @param {string} className
 */
SlideDeck.prototype.updateSlideClass_ = function(slideNo, className) {
  var el = this.getSlideEl_(slideNo);

  if (!el) {
    return;
  }

  if (className) {
    el.classList.add(className);
  }

  for (var i = 0, slideClass; slideClass = this.SLIDE_CLASSES_[i]; ++i) {
    if (className != slideClass) {
      el.classList.remove(slideClass);
    }
  }
};

/**
 * @private
 */
SlideDeck.prototype.makeBuildLists_ = function () {
  for (var i = this.curSlide_, slide; slide = this.slides[i]; ++i) {
    var items = slide.querySelectorAll('.build > *');
    for (var j = 0, item; item = items[j]; ++j) {
      if (item.classList) {
        item.classList.add('to-build');
        if (item.parentNode.classList.contains('fade')) {
          item.classList.add('fade');
        }
      }
    }
  }
};

/**
 * @private
 * @param {boolean} dontPush
 */
SlideDeck.prototype.updateHash_ = function(dontPush) {
  if (!dontPush) {
    var slideNo = this.curSlide_ + 1;
    // Add everything except the hash.
    var loc = location.protocol+'//'+location.host+location.pathname+(location.search?location.search:"");
    var hash = '#' + slideNo;
    if (window.history.pushState && (location.protocol !== "file:")) {
      window.history.pushState(this.curSlide_, 'Slide ' + slideNo, loc + hash);
    } else {
      window.location.replace(loc + hash);
    }

    // Record GA hit on this slide.
    window['_gaq'] && window['_gaq'].push(['_trackPageview',
                                          document.location.href]);
  }
};


/**
 * @private
 * @param {string} favIcon
 */
SlideDeck.prototype.addFavIcon_ = function(favIcon) {
  var el = document.createElement('link');
  el.rel = 'icon';
  el.type = 'image/png';
  el.href = favIcon;
  document.querySelector('head').appendChild(el);
};

/**
 * @private
 * @param {string} theme
 */
SlideDeck.prototype.loadTheme_ = function(theme) {
  var styles = [];
  if (theme.constructor.name === 'String') {
    styles.push(theme);
  } else {
    styles = theme;
  }

  for (var i = 0, style; themeUrl = styles[i]; i++) {
    var style = document.createElement('link');
    style.rel = 'stylesheet';
    style.type = 'text/css';
    if (themeUrl.indexOf('http') == -1) {
      style.href = this.CSS_DIR_ + themeUrl + '.css';
    } else {
      style.href = themeUrl;
    }
    document.querySelector('head').appendChild(style);
  }
};

/**
 * @private
 */
SlideDeck.prototype.loadAnalytics_ = function() {
  var _gaq = window['_gaq'] || [];
  _gaq.push(['_setAccount', this.config_.settings.analytics]);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
};


// Polyfill missing APIs (if we need to), then create the slide deck.
// iOS < 5 needs classList, dataset, and window.matchMedia. Modernizr contains
// the last one.
(function() {
  Modernizr.load({
    test: !!document.body.classList && !!document.body.dataset,
    nope: ['js/polyfills/classList.min.js', 'js/polyfills/dataset.min.js'],
    complete: function() {
      window.slidedeck = new SlideDeck();
    }
  });
})();


================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/theme/css/default.css
================================================
@charset "UTF-8";
/* line 17, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 100%;
  vertical-align: baseline;
}

/* line 22, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html {
  line-height: 1.2;
}

/* line 24, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
ul {
  list-style: none;
}

/* line 26, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* line 28, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
caption, th, td {
  font-weight: normal;
  vertical-align: middle;
}

/* line 30, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q, blockquote {
  quotes: none;
}
/* line 103, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q:before, q:after, blockquote:before, blockquote:after {
  content: "";
  content: none;
}

/* line 32, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
a img {
  border: none;
}

/* line 116, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
  display: block;
}

/**
 * Base SlideDeck Styles
 */
/* line 52, ../scss/_base.scss */
html {
  height: 100%;
  overflow: hidden;
}

/* line 57, ../scss/_base.scss */
body {
  margin: 0;
  padding: 0;
  opacity: 0;
  height: 100%;
  min-height: 740px;
  width: 100%;
  overflow: hidden;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-font-smoothing: antialiased;
  -ms-font-smoothing: antialiased;
  -o-font-smoothing: antialiased;
  -webkit-transition: opacity 250ms ease-in;
  -webkit-transition-delay: 100ms;
  -moz-transition: opacity 250ms ease-in 100ms;
  -o-transition: opacity 250ms ease-in 100ms;
  transition: opacity 250ms ease-in 100ms;
}
/* line 73, ../scss/_base.scss */
body.loaded {
  opacity: 1 !important;
}

/* line 78, ../scss/_base.scss */
input, button {
  vertical-align: middle;
}

/* line 82, ../scss/_base.scss */
slides > slide[hidden] {
  display: none !important;
}

/* line 86, ../scss/_base.scss */
slides {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-perspective: 1000;
  -moz-perspective: 1000;
  -ms-perspective: 1000;
  -o-perspective: 1000;
  perspective: 1000;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transition: opacity 250ms ease-in;
  -webkit-transition-delay: 100ms;
  -moz-transition: opacity 250ms ease-in 100ms;
  -o-transition: opacity 250ms ease-in 100ms;
  transition: opacity 250ms ease-in 100ms;
}

/* line 98, ../scss/_base.scss */
slides > slide {
  display: block;
  position: absolute;
  overflow: hidden;
  left: 50%;
  top: 50%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/* Slide styles */
/*article.fill iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  border: 0;
  margin: 0;

  @include border-radius(10px);

  z-index: -1;
}

slide.fill {
  background-repeat: no-repeat;
  @include background-size(cover);
}

slide.fill img {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 100%;
  min-height: 100%;

  z-index: -1;
}
*/
/**
 * Theme Styles
 */
/* line 22, ../scss/default.scss */
::selection {
  color: white;
  background-color: #ffd14d;
  text-shadow: none;
}

/* line 28, ../scss/default.scss */
::-webkit-scrollbar {
  height: 16px;
  overflow: visible;
  width: 16px;
}

/* line 33, ../scss/default.scss */
::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  background-clip: padding-box;
  border: solid transparent;
  min-height: 28px;
  padding: 100px 0 0;
  -webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.07);
  -moz-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.07);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.07);
  border-width: 1px 1px 1px 6px;
}

/* line 42, ../scss/default.scss */
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

/* line 45, ../scss/default.scss */
::-webkit-scrollbar-button {
  height: 0;
  width: 0;
}

/* line 49, ../scss/default.scss */
::-webkit-scrollbar-track {
  background-clip: padding-box;
  border: solid transparent;
  border-width: 0 0 0 4px;
}

/* line 54, ../scss/default.scss */
::-webkit-scrollbar-corner {
  background: transparent;
}

/* line 58, ../scss/default.scss */
body {
  background: black;
}

/* line 62, ../scss/default.scss */
slides > slide {
  display: none;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 26px;
  color: #797979;
  width: 900px;
  height: 700px;
  margin-left: -450px;
  margin-top: -350px;
  padding: 40px 60px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  -webkit-transition: all 0.6s ease-in-out;
  -moz-transition: all 0.6s ease-in-out;
  -o-transition: all 0.6s ease-in-out;
  transition: all 0.6s ease-in-out;
}
/* line 83, ../scss/default.scss */
slides > slide.far-past {
  display: none;
}
/* line 90, ../scss/default.scss */
slides > slide.past {
  display: block;
  opacity: 0;
}
/* line 97, ../scss/default.scss */
slides > slide.current {
  display: block;
  opacity: 1;
}
/* line 103, ../scss/default.scss */
slides > slide.current .auto-fadein {
  opacity: 1;
}
/* line 107, ../scss/default.scss */
slides > slide.current .gdbar {
  -webkit-background-size: 100% 100%;
  -moz-background-size: 100% 100%;
  -o-background-size: 100% 100%;
  background-size: 100% 100%;
}
/* line 112, ../scss/default.scss */
slides > slide.next {
  display: block;
  opacity: 0;
  pointer-events: none;
}
/* line 120, ../scss/default.scss */
slides > slide.far-next {
  display: none;
}
/* line 127, ../scss/default.scss */
slides > slide.dark {
  background: #515151 !important;
}

/* line 147, ../scss/default.scss */
slides > slide:not(.nobackground):after {
  font-size: 12pt;
  content: attr(data-slide-num) "/" attr(data-total-slides);
  position: absolute;
  bottom: 20px;
  right: 60px;
  line-height: 1.9;
}
/* line 158, ../scss/default.scss */
slides > slide.title-slide:after {
  content: '';
  position: absolute;
  bottom: 40px;
  right: 40px;
  width: 100%;
  height: 60px;
}
/* line 170, ../scss/default.scss */
slides > slide.backdrop {
  z-index: -10;
  display: block !important;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(85%, #ffffff), color-stop(100%, #e6e6e6));
  background: -webkit-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
  background: -moz-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
  background: -o-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
  background: linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
  background-color: white;
}
/* line 175, ../scss/default.scss */
slides > slide.backdrop:after, slides > slide.backdrop:before {
  display: none;
}
/* line 180, ../scss/default.scss */
slides > slide > hgroup + article {
  margin-top: 45px;
}
/* line 184, ../scss/default.scss */
slides > slide > hgroup + article.flexbox.vcenter, slides > slide > hgroup + article.flexbox.vleft, slides > slide > hgroup + article.flexbox.vright {
  height: 80%;
}
/* line 189, ../scss/default.scss */
slides > slide > hgroup + article p {
  margin-bottom: 1em;
}
/* line 194, ../scss/default.scss */
slides > slide > article:only-child {
  height: 100%;
}
/* line 197, ../scss/default.scss */
slides > slide > article:only-child > iframe {
  height: 95%;
}

/* line 203, ../scss/default.scss */
slides.layout-faux-widescreen > slide {
  padding: 40px 160px;
}

/* line 212, ../scss/default.scss */
slides.layout-widescreen > slide,
slides.layout-faux-widescreen > slide {
  margin-left: -550px;
  width: 1100px;
}
/* line 217, ../scss/default.scss */
slides.layout-widescreen > slide.far-past,
slides.layout-faux-widescreen > slide.far-past {
  display: block;
  display: none;
  -webkit-transform: translate(-2260px);
  -moz-transform: translate(-2260px);
  -ms-transform: translate(-2260px);
  -o-transform: translate(-2260px);
  transform: translate(-2260px);
  -webkit-transform: translate3d(-2260px, 0, 0);
  -moz-transform: translate3d(-2260px, 0, 0);
  -ms-transform: translate3d(-2260px, 0, 0);
  -o-transform: translate3d(-2260px, 0, 0);
  transform: translate3d(-2260px, 0, 0);
}
/* line 224, ../scss/default.scss */
slides.layout-widescreen > slide.past,
slides.layout-faux-widescreen > slide.past {
  display: block;
  opacity: 0;
}
/* line 231, ../scss/default.scss */
slides.layout-widescreen > slide.current,
slides.layout-faux-widescreen > slide.current {
  display: block;
  opacity: 1;
}
/* line 238, ../scss/default.scss */
slides.layout-widescreen > slide.next,
slides.layout-faux-widescreen > slide.next {
  display: block;
  opacity: 0;
  pointer-events: none;
}
/* line 246, ../scss/default.scss */
slides.layout-widescreen > slide.far-next,
slides.layout-faux-widescreen > slide.far-next {
  display: block;
  display: none;
  -webkit-transform: translate(2260px);
  -moz-transform: translate(2260px);
  -ms-transform: translate(2260px);
  -o-transform: translate(2260px);
  transform: translate(2260px);
  -webkit-transform: translate3d(2260px, 0, 0);
  -moz-transform: translate3d(2260px, 0, 0);
  -ms-transform: translate3d(2260px, 0, 0);
  -o-transform: translate3d(2260px, 0, 0);
  transform: translate3d(2260px, 0, 0);
}
/* line 253, ../scss/default.scss */
slides.layout-widescreen #prev-slide-area,
slides.layout-faux-widescreen #prev-slide-area {
  margin-left: -650px;
}
/* line 257, ../scss/default.scss */
slides.layout-widescreen #next-slide-area,
slides.layout-faux-widescreen #next-slide-area {
  margin-left: 550px;
}

/* line 262, ../scss/default.scss */
b {
  font-weight: 600;
}

/* line 266, ../scss/default.scss */
a {
  color: #2a7cdf;
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 124, 223, 0.5);
}
/* line 271, ../scss/default.scss */
a:hover {
  color: black !important;
}

/* line 276, ../scss/default.scss */
h1, h2, h3 {
  font-weight: 600;
}

/* line 280, ../scss/default.scss */
h2 {
  font-size: 45px;
  line-height: 65px;
  letter-spacing: -2px;
  color: #515151;
}

/* line 287, ../scss/default.scss */
h3 {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 2;
  font-weight: inherit;
  color: #797979;
}

/* line 295, ../scss/default.scss */
ol, ul {
  margin-left: 1.2em;
  margin-bottom: 1em;
  position: relative;
}

ol {
  margin-left: 1.4em;
}

/* line 300, ../scss/default.scss */
ol li,
ul li {
  margin-bottom: 0.5em;
}
/* line 303, ../scss/default.scss */
ul li ul {
  margin-left: 2em;
  margin-bottom: 0;
}
/* line 307, ../scss/default.scss */
ul li ul li:before {
  content: '-';
  font-weight: 600;
}
/* line 314, ../scss/default.scss */
ul > li:before {
  content: '\00B7';
  margin-left: -1em;
  position: absolute;
  font-weight: 600;
}
/* line 321, ../scss/default.scss */
ul ul,
ol ul {
  margin-top: .5em;
}

ol ul,
ol ol {
  margin-top: .5em;
}

/* line 328, ../scss/default.scss */
.highlight-code slide.current pre > * {
  opacity: 0.25;
  -webkit-transition: opacity 0.5s ease-in;
  -moz-transition: opacity 0.5s ease-in;
  -o-transition: opacity 0.5s ease-in;
  transition: opacity 0.5s ease-in;
}
/* line 332, ../scss/default.scss */
.highlight-code slide.current b {
  opacity: 1;
}

/* line 337, ../scss/default.scss */
pre {
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 20px;
  line-height: 28px;
  padding: 10px 0 10px 60px;
  letter-spacing: -1px;
  margin-bottom: 20px;
  width: 106%;
  left: -60px;
  position: relative;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  /*overflow: hidden;*/
}

.prettyprint {
  background-color: #e6e6e6;
}

/* line 351, ../scss/default.scss */
pre[data-lang]:after {
  content: attr(data-lang);
  background-color: darkgrey;
  right: 0;
  top: 0;
  position: absolute;
  font-size: 16pt;
  color: white;
  padding: 2px 25px;
  text-transform: uppercase;
}

/* line 364, ../scss/default.scss */
pre[data-lang="go"] {
  color: #333;
}

/* line 368, ../scss/default.scss */
code {
  font-size: 95%;
  font-family: 'Source Code Pro', 'Courier New', monospace;
  color: black;
}

/* line 374, ../scss/default.scss */
iframe {
  width: 100%;
  height: 510px;
  background: white;
  border: 1px solid #e6e6e6;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/* line 382, ../scss/default.scss */
dt {
  font-weight: bold;
}

/* line 386, ../scss/default.scss */
button {
  display: inline-block;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(40%, #f9f9f9), color-stop(70%, #e3e3e3));
  background: -webkit-linear-gradient(#f9f9f9 40%, #e3e3e3 70%);
  background: -moz-linear-gradient(#f9f9f9 40%, #e3e3e3 70%);
  background: -o-linear-gradient(#f9f9f9 40%, #e3e3e3 70%);
  background: linear-gradient(#f9f9f9 40%, #e3e3e3 70%);
  border: 1px solid darkgrey;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  -ms-border-radius: 3px;
  -o-border-radius: 3px;
  border-radius: 3px;
  padding: 5px 8px;
  outline: none;
  white-space: nowrap;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  cursor: pointer;
  text-shadow: 1px 1px white;
  font-size: 10pt;
}

/* line 400, ../scss/default.scss */
button:not(:disabled):hover {
  border-color: #515151;
}

/* line 404, ../scss/default.scss */
button:not(:disabled):active {
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(40%, #e3e3e3), color-stop(70%, #f9f9f9));
  background: -webkit-linear-gradient(#e3e3e3 40%, #f9f9f9 70%);
  background: -moz-linear-gradient(#e3e3e3 40%, #f9f9f9 70%);
  background: -o-linear-gradient(#e3e3e3 40%, #f9f9f9 70%);
  background: linear-gradient(#e3e3e3 40%, #f9f9f9 70%);
}

/* line 408, ../scss/default.scss */
:disabled {
  color: darkgrey;
}

/* line 412, ../scss/default.scss */
.blue {
  color: #4387fd;
}

/* line 415, ../scss/default.scss */
.blue2 {
  color: #3c8ef3;
}

/* line 418, ../scss/default.scss */
.blue3 {
  color: #2a7cdf;
}

/* line 421, ../scss/default.scss */
.yellow {
  color: #ffd14d;
}

/* line 424, ../scss/default.scss */
.yellow2 {
  color: #f9cc46;
}

/* line 427, ../scss/default.scss */
.yellow3 {
  color: #f6c000;
}

/* line 430, ../scss/default.scss */
.green {
  color: #0da861;
}

/* line 433, ../scss/default.scss */
.green2 {
  color: #00a86d;
}

/* line 436, ../scss/default.scss */
.green3 {
  color: #009f5d;
}

/* line 439, ../scss/default.scss */
.red {
  color: #f44a3f;
}

/* line 442, ../scss/default.scss */
.red2 {
  color: #e0543e;
}

/* line 445, ../scss/default.scss */
.red3 {
  color: #d94d3a;
}

/* line 448, ../scss/default.scss */
.gray {
  color: #e6e6e6;
}

/* line 451, ../scss/default.scss */
.gray2 {
  color: darkgrey;
}

/* line 454, ../scss/default.scss */
.gray3 {
  color: #797979;
}

/* line 457, ../scss/default.scss */
.gray4 {
  color: #515151;
}

/* line 461, ../scss/default.scss */
.white {
  color: white !important;
}

/* line 464, ../scss/default.scss */
.black {
  color: black !important;
}

/* line 468, ../scss/default.scss */
.columns-2 {
  -webkit-column-count: 2;
  -moz-column-count: 2;
  -ms-column-count: 2;
  -o-column-count: 2;
  column-count: 2;
}

/* workaround for Safari 8 render bug with lists in columns */
.columns-2 ul, .columns-2 ol {
  -webkit-transform: translate3d(0, 0, 0);
}

/* line 472, ../scss/default.scss */
table.rmdtable {
  width: 100%;
  border-collapse: -moz-initial;
  border-collapse: initial;
  border-spacing: 2px;
  border-bottom: 1px solid #797979;
}
/* line 479, ../scss/default.scss */
table.rmdtable tr > td:first-child, table th {
  font-weight: 600;
  color: #515151;
}
/* line 484, ../scss/default.scss */
table.rmdtable tr:nth-child(odd) {
  background-color: #e6e6e6;
}
/* line 488, ../scss/default.scss */
table.rmdtable th {
  color: white;
  font-size: 18px;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(40%, #4387fd), color-stop(80%, #2a7cdf)) no-repeat;
  background: -webkit-linear-gradient(top, #4387fd 40%, #2a7cdf 80%) no-repeat;
  background: -moz-linear-gradient(top, #4387fd 40%, #2a7cdf 80%) no-repeat;
  background: -o-linear-gradient(top, #4387fd 40%, #2a7cdf 80%) no-repeat;
  background: linear-gradient(top, #4387fd 40%, #2a7cdf 80%) no-repeat;
}
/* line 494, ../scss/default.scss */
table.rmdtable td, table th {
  font-size: 18px;
  padding: 1em 0.5em;
}
/* line 499, ../scss/default.scss */
table.rmdtable td.highlight {
  color: #515151;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(40%, #ffd14d), color-stop(80%, #f6c000)) no-repeat;
  background: -webkit-linear-gradient(top, #ffd14d 40%, #f6c000 80%) no-repeat;
  background: -moz-linear-gradient(top, #ffd14d 40%, #f6c000 80%) no-repeat;
  background: -o-linear-gradient(top, #ffd14d 40%, #f6c000 80%) no-repeat;
  background: linear-gradient(top, #ffd14d 40%, #f6c000 80%) no-repeat;
}
/* line 504, ../scss/default.scss */
table.rmdtable.rows {
  border-bottom: none;
  border-right: 1px solid #797979;
}

/* line 510, ../scss/default.scss */
q {
  font-size: 45px;
  line-height: 72px;
}
/* line 514, ../scss/default.scss */
q:before {
  content: '\201C';
  position: absolute;
  margin-left: -0.5em;
}
/* line 519, ../scss/default.scss */
q:after {
  content: '\201D';
  position: absolute;
  margin-left: 0.1em;
}

/* line 526, ../scss/default.scss */
slide.fill {
  background-repeat: no-repeat;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

/* Size variants */
/* line 535, ../scss/default.scss */
article.smaller p, article.smaller ul, article.smaller ol {
  font-size: 20px;
  line-height: 24px;
  letter-spacing: 0;
}
/* line 541, ../scss/default.scss */
article.smaller table td, article.smaller table th {
  font-size: 14px;
}
/* line 545, ../scss/default.scss */
article.smaller pre {
  font-size: 15px;
  line-height: 20px;
  letter-spacing: 0;
}
/* line 550, ../scss/default.scss */
article.smaller q {
  font-size: 40px;
  line-height: 48px;
}
/* line 554, ../scss/default.scss */
article.smaller q:before, article.smaller q:after {
  font-size: 60px;
}

/* Builds */
/* line 563, ../scss/default.scss */
.build > * {
  -webkit-transition: opacity 0.5s ease-in-out;
  -webkit-transition-delay: 0.2s;
  -moz-transition: opacity 0.5s ease-in-out 0.2s;
  -o-transition: opacity 0.5s ease-in-out 0.2s;
  transition: opacity 0.5s ease-in-out 0.2s;
}
/* line 567, ../scss/default.scss */
.build .to-build {
  opacity: 0;
}
/* line 571, ../scss/default.scss */
.build .build-fade {
  opacity: 0.3;
}
/* line 574, ../scss/default.scss */
.build .build-fade:hover {
  opacity: 1.0;
}

/* line 581, ../scss/default.scss */
.popup .next .build .to-build {
  opacity: 1;
}
/* line 585, ../scss/default.scss */
.popup .next .build .build-fade {
  opacity: 1;
}

/* Pretty print */
/* line 593, ../scss/default.scss */
.prettyprint .str,
.prettyprint .atv {
  /* a markup attribute value */
  color: #009f5d;
}

/* line 597, ../scss/default.scss */
.prettyprint .kwd,
.prettyprint .tag {
  /* a markup tag name */
  color: #0066cc;
}

/* line 600, ../scss/default.scss */
.prettyprint .com {
  /* a comment */
  color: #797979;
  font-style: italic;
}

/* line 604, ../scss/default.scss */
.prettyprint .lit {
  /* a literal value */
  color: #7f0000;
}

/* line 609, ../scss/default.scss */
.prettyprint .pun,
.prettyprint .opn,
.prettyprint .clo {
  color: #515151;
}

/* line 615, ../scss/default.scss */
.prettyprint .typ,
.prettyprint .atn,
.prettyprint .dec,
.prettyprint .var {
  /* a declaration; a variable name */
  color: #d94d3a;
}

/* line 618, ../scss/default.scss */
.prettyprint .pln {
  color: #515151;
}

/* line 622, ../scss/default.scss */
.note {
  position: absolute;
  z-index: 100;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  padding: 1em;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  display: -webkit-box !important;
  display: -moz-box !important;
  display: -ms-box !important;
  display: -o-box !important;
  display: box !important;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -ms-box-orient: vertical;
  box-orient: vertical;
  -webkit-box-align: center;
  -moz-box-align: center;
  -ms-box-align: center;
  box-align: center;
  -webkit-box-pack: center;
  -moz-box-pack: center;
  -ms-box-pack: center;
  box-pack: center;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transform: translateY(350px);
  -moz-transform: translateY(350px);
  -ms-transform: translateY(350px);
  -o-transform: translateY(350px);
  transform: translateY(350px);
  -webkit-transition: all 0.4s ease-in-out;
  -moz-transition: all 0.4s ease-in-out;
  -o-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
}
/* line 640, ../scss/default.scss */
.note > section {
  background: #fff;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  -webkit-box-shadow: 0 0 10px #797979;
  -moz-box-shadow: 0 0 10px #797979;
  box-shadow: 0 0 10px #797979;
  width: 60%;
  padding: 2em;
}

/* line 657, ../scss/default.scss */
.with-notes.popup slides.layout-widescreen slide.next,
.with-notes.popup slides.layout-faux-widescreen slide.next {
  -webkit-transform: translate3d(690px, 80px, 0) scale(0.35);
  -moz-transform: translate3d(690px, 80px, 0) scale(0.35);
  -ms-transform: translate3d(690px, 80px, 0) scale(0.35);
  -o-transform: translate3d(690px, 80px, 0) scale(0.35);
  transform: translate3d(690px, 80px, 0) scale(0.35);
}
/* line 660, ../scss/default.scss */
.with-notes.popup slides.layout-widescreen slide .note,
.with-notes.popup slides.layout-faux-widescreen slide .note {
  -webkit-transform: translate3d(300px, 800px, 0) scale(1.5);
  -moz-transform: translate3d(300px, 800px, 0) scale(1.5);
  -ms-transform: translate3d(300px, 800px, 0) scale(1.5);
  -o-transform: translate3d(300px, 800px, 0) scale(1.5);
  transform: translate3d(300px, 800px, 0) scale(1.5);
}
/* line 666, ../scss/default.scss */
.with-notes.popup slide {
  overflow: visible;
  background: white;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  pointer-events: none;
  -webkit-transform-origin: 0 0;
  -moz-transform-origin: 0 0;
  -ms-transform-origin: 0 0;
  -o-transform-origin: 0 0;
  transform-origin: 0 0;
}
/* line 673, ../scss/default.scss */
.with-notes.popup slide:not(.backdrop) {
  -webkit-transform: scale(0.6) translate3d(0.5em, 0.5em, 0);
  -moz-transform: scale(0.6) translate3d(0.5em, 0.5em, 0);
  -ms-transform: scale(0.6) translate3d(0.5em, 0.5em, 0);
  -o-transform: scale(0.6) translate3d(0.5em, 0.5em, 0);
  transform: scale(0.6) translate3d(0.5em, 0.5em, 0);
  -webkit-box-shadow: 0 0 10px #797979;
  -moz-box-shadow: 0 0 10px #797979;
  box-shadow: 0 0 10px #797979;
}
/* line 678, ../scss/default.scss */
.with-notes.popup slide.backdrop {
  background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 600, color-stop(0%, #b1dfff), color-stop(100%, #4387fd));
  background-image: -webkit-radial-gradient(50% 50%, #b1dfff 0%, #4387fd 600px);
  background-image: -moz-radial-gradient(50% 50%, #b1dfff 0%, #4387fd 600px);
  background-image: -o-radial-gradient(50% 50%, #b1dfff 0%, #4387fd 600px);
  background-image: radial-gradient(50% 50%, #b1dfff 0%, #4387fd 600px);
}
/* line 684, ../scss/default.scss */
.with-notes.popup slide.next {
  -webkit-transform: translate3d(570px, 80px, 0) scale(0.35);
  -moz-transform: translate3d(570px, 80px, 0) scale(0.35);
  -ms-transform: translate3d(570px, 80px, 0) scale(0.35);
  -o-transform: translate3d(570px, 80px, 0) scale(0.35);
  transform: translate3d(570px, 80px, 0) scale(0.35);
  opacity: 1 !important;
}
/* line 688, ../scss/default.scss */
.with-notes.popup slide.next .note {
  display: none !important;
}
/* line 694, ../scss/default.scss */
.with-notes.popup .note {
  width: 109%;
  height: 260px;
  background: #e6e6e6;
  padding: 0;
  -webkit-box-shadow: 0 0 10px #797979;
  -moz-box-shadow: 0 0 10px #797979;
  box-shadow: 0 0 10px #797979;
  -webkit-transform: translate3d(250px, 800px, 0) scale(1.5);
  -moz-transform: translate3d(250px, 800px, 0) scale(1.5);
  -ms-transform: translate3d(250px, 800px, 0) scale(1.5);
  -o-transform: translate3d(250px, 800px, 0) scale(1.5);
  transform: translate3d(250px, 800px, 0) scale(1.5);
  -webkit-transition: opacity 400ms ease-in-out;
  -moz-transition: opacity 400ms ease-in-out;
  -o-transition: opacity 400ms ease-in-out;
  transition: opacity 400ms ease-in-out;
}
/* line 705, ../scss/default.scss */
.with-notes.popup .note > section {
  background: #fff;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  height: 100%;
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  overflow: auto;
  padding: 1em;
}
/* line 718, ../scss/default.scss */
.with-notes .note {
  opacity: 1;
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -ms-transform: translateY(0);
  -o-transform: translateY(0);
  transform: translateY(0);
  pointer-events: auto;
}

/* line 725, ../scss/default.scss */
.source {
  font-size: 14px;
  color: darkgrey;
  position: absolute;
  bottom: 70px;
  left: 60px;
}

/* line 733, ../scss/default.scss */
.centered {
  text-align: center;
}

/* line 737, ../scss/default.scss */
.reflect {
  -webkit-box-reflect: below 3px -webkit-linear-gradient(rgba(255, 255, 255, 0) 85%, white 150%);
  -moz-box-reflect: below 3px -moz-linear-gradient(rgba(255, 255, 255, 0) 85%, white 150%);
  -o-box-reflect: below 3px -o-linear-gradient(rgba(255, 255, 255, 0) 85%, white 150%);
  -ms-box-reflect: below 3px -ms-linear-gradient(rgba(255, 255, 255, 0) 85%, white 150%);
  box-reflect: below 3px linear-gradient(rgba(255, 255, 255, 0) 85%, #ffffff 150%);
}

/* line 745, ../scss/default.scss */
.flexbox {
  display: -webkit-box !important;
  display: -moz-box !important;
  display: -ms-box !important;
  display: -o-box !important;
  display: box !important;
}

/* line 749, ../scss/default.scss */
.flexbox.vcenter {
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -ms-box-orient: vertical;
  box-orient: vertical;
  -webkit-box-align: center;
  -moz-box-align: center;
  -ms-box-align: center;
  box-align: center;
  -webkit-box-pack: center;
  -moz-box-pack: center;
  -ms-box-pack: center;
  box-pack: center;
  height: 100%;
  width: 100%;
}

/* line 755, ../scss/default.scss */
.flexbox.vleft {
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -ms-box-orient: vertical;
  box-orient: vertical;
  -webkit-box-align: left;
  -moz-box-align: left;
  -ms-box-align: left;
  box-align: left;
  -webkit-box-pack: center;
  -moz-box-pack: center;
  -ms-box-pack: center;
  box-pack: center;
  height: 100%;
  width: 100%;
}

/* line 761, ../scss/default.scss */
.flexbox.vright {
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -ms-box-orient: vertical;
  box-orient: vertical;
  -webkit-box-align: end;
  -moz-box-align: end;
  -ms-box-align: end;
  box-align: end;
  -webkit-box-pack: center;
  -moz-box-pack: center;
  -ms-box-pack: center;
  box-pack: center;
  height: 100%;
  width: 100%;
}

/* line 767, ../scss/default.scss */
.auto-fadein {
  -webkit-transition: opacity 0.6s ease-in;
  -webkit-transition-delay: 0.6s;
  -moz-transition: opacity 0.6s ease-in 0.6s;
  -o-transition: opacity 0.6s ease-in 0.6s;
  transition: opacity 0.6s ease-in 0.6s;
  opacity: 0;
}

/* Clickable/tappable areas */
/* line 773, ../scss/default.scss */
.slide-area {
  z-index: 1000;
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 700px;
  left: 50%;
  top: 50%;
  cursor: pointer;
  margin-top: -350px;
}

/* line 790, ../scss/default.scss */
#prev-slide-area {
  margin-left: -550px;
}

/* line 795, ../scss/default.scss */
#next-slide-area {
  margin-left: 450px;
}

/* ===== SLIDE CONTENT ===== */
/* line 803, ../scss/default.scss */
.logoslide img {
  width: 383px;
  height: 92px;
}

/* line 809, ../scss/default.scss */
.segue {
  padding: 60px 120px;
}
/* line 812, ../scss/default.scss */
.segue h2 {
  color: #e6e6e6;
  font-size: 60px;
}
/* line 816, ../scss/default.scss */
.segue h3 {
  color: #e6e6e6;
  line-height: 2.8;
}
/* line 820, ../scss/default.scss */
.segue hgroup {
  position: absolute;
  bottom: 225px;
}

/* line 826, ../scss/default.scss */
.thank-you-slide {
  background: #4387fd !important;
  color: white;
}
/* line 830, ../scss/default.scss */
.thank-you-slide h2 {
  font-size: 60px;
  color: inherit;
}
/* line 835, ../scss/default.scss */
.thank-you-slide article > p {
  margin-top: 2em;
  font-size: 20pt;
}
/* line 840, ../scss/default.scss */
.thank-you-slide > p {
  position: absolute;
  bottom: 80px;
  font-size: 24pt;
  line-height: 1.3;
}

/* line 848, ../scss/default.scss */
aside.gdbar {
  height: 97px;
  width: 215px;
  position: absolute;
  left: -1px;
  top: 125px;
  -webkit-border-radius: 0 10px 10px 0;
  -moz-border-radius: 0 10px 10px 0;
  -ms-border-radius: 0 10px 10px 0;
  -o-border-radius: 0 10px 10px 0;
  border-radius: 0 10px 10px 0;
  background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #e6e6e6), color-stop(100%, #e6e6e6)) no-repeat;
  background: -webkit-linear-gradient(left, #e6e6e6, #e6e6e6) no-repeat;
  background: -moz-linear-gradient(left, #e6e6e6, #e6e6e6) no-repeat;
  background: -o-linear-gradient(left, #e6e6e6, #e6e6e6) no-repeat;
  background: linear-gradient(left, #e6e6e6, #e6e6e6) no-repeat;
  -webkit-background-size: 0% 100%;
  -moz-background-size: 0% 100%;
  -o-background-size: 0% 100%;
  background-size: 0% 100%;
  -webkit-transition: all 0.5s ease-out;
  -webkit-transition-delay: 0.5s;
  -moz-transition: all 0.5s ease-out 0.5s;
  -o-transition: all 0.5s ease-out 0.5s;
  transition: all 0.5s ease-out 0.5s;
  /* Better to transition only on background-size, but not sure how to do that with the mixin. */
}
/* line 859, ../scss/default.scss */
aside.gdbar.right {
  right: 0;
  left: -moz-initial;
  left: initial;
  top: 254px;
  /* 96 is height of gray icon bar */
  -webkit-transform: rotateZ(180deg);
  -moz-transform: rotateZ(180deg);
  -ms-transform: rotateZ(180deg);
  -o-transform: rotateZ(180deg);
  transform: rotateZ(180deg);
}
/* line 866, ../scss/default.scss */
aside.gdbar.right img {
  -webkit-transform: rotateZ(180deg);
  -moz-transform: rotateZ(180deg);
  -ms-transform: rotateZ(180deg);
  -o-transform: rotateZ(180deg);
  transform: rotateZ(180deg);
}
/* line 871, ../scss/default.scss */
aside.gdbar.bottom {
  top: -moz-initial;
  top: initial;
  bottom: 60px;
}
/* line 877, ../scss/default.scss */
aside.gdbar img {
  width: 85px;
  height: 85px;
  position: absolute;
  right: 0;
  margin: 8px 15px;
}

/* line 888, ../scss/default.scss */
.title-slide hgroup {
  bottom: 100px;
}
/* line 891, ../scss/default.scss */
.title-slide hgroup h1 {
  font-size: 65px;
  line-height: 1.4;
  letter-spacing: -3px;
  color: #515151;
}
/* line 898, ../scss/default.scss */
.title-slide hgroup h2 {
  font-size: 34px;
  color: darkgrey;
  font-weight: inherit;
}
/* line 904, ../scss/default.scss */
.title-slide hgroup p {
  font-size: 20px;
  color: #797979;
  line-height: 1.3;
  margin-top: 2em;
}

/* line 913, ../scss/default.scss */
.quote {
  color: #e6e6e6;
}
/* line 916, ../scss/default.scss */
.quote .author {
  font-size: 24px;
  position: absolute;
  bottom: 80px;
  line-height: 1.4;
}

/* line 925, ../scss/default.scss */
[data-config-contact] a {
  color: white;
  border-bottom: none;
}
/* line 929, ../scss/default.scss */
[data-config-contact] span {
  width: 115px;
  display: inline-block;
}

/* line 938, ../scss/default.scss */
.overview.popup .note {
  display: none !important;
}
/* line 944, ../scss/default.scss */
.overview slides slide {
  display: block;
  cursor: pointer;
  opacity: 0.5;
  pointer-events: auto !important;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(85%, #ffffff), color-stop(100%, #e6e6e6));
  background: -webkit-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
  background: -moz-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
  background: -o-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
  background: linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
  background-color: white;
}
/* line 945, ../scss/default.scss */
.overview slides slide.backdrop {
  display: none !important;
}
/* line 960, ../scss/default.scss */
.overview slides slide.far-past, .overview slides slide.past, .overview slides slide.next, .overview slides slide.far-next, .overview slides slide.far-past {
  opacity: 0.5;
  display: block;
}
/* line 965, ../scss/default.scss */
.overview slides slide.current {
  opacity: 1;
}
/* line 971, ../scss/default.scss */
.overview .slide-area {
  display: none;
}

@media print {
  /* line 978, ../scss/default.scss */
  slides slide {
    display: block !important;
    position: relative;
    background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(85%, #ffffff), color-stop(100%, #e6e6e6));
    background: -webkit-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
    background: -moz-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
    background: -o-linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
    background: linear-gradient(#ffffff, #ffffff 85%, #e6e6e6);
    background-color: white;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    transform: none !important;
    width: 100%;
    height: 100%;
    page-break-after: always;
    top: auto !important;
    left: auto !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    opacity: 1 !important;
    color: #555;
  }
  /* line 998, ../scss/default.scss */
  slides slide.far-past, slides slide.past, slides slide.next, slides slide.far-next, slides slide.far-past, slides slide.current {
    opacity: 1 !important;
    display: block !important;
  }
  /* line 1004, ../scss/default.scss */
  slides slide .build > * {
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    transition: none;
  }
  /* line 1009, ../scss/default.scss */
  slides slide .build .to-build,
  slides slide .build .build-fade {
    opacity: 1;
  }
  /* line 1014, ../scss/default.scss */
  slides slide .auto-fadein {
    opacity: 1 !important;
  }
  /* line 1018, ../scss/default.scss */
  slides slide.backdrop {
    display: none !important;
  }
  /* line 1022, ../scss/default.scss */
  slides slide table.rows {
    border-right: 0;
  }
  /* line 1027, ../scss/default.scss */
  slides slide[hidden] {
    display: none !important;
  }

  /* line 1032, ../scss/default.scss */
  .slide-area {
    display: none;
  }

  /* line 1036, ../scss/default.scss */
  .reflect {
    -webkit-box-reflect: none;
    -moz-box-reflect: none;
    -o-box-reflect: none;
    -ms-box-reflect: none;
    box-reflect: none;
  }

  /* line 1044, ../scss/default.scss */
  pre, code {
    font-family: monospace !important;
  }
}

/* Additions for Shiny compatibility */
label {
  display: block;
  margin-bottom: 4px;
}
label, input {
  font-size: 16px;
  color: #333;
}
input {
  width: 220px;
}
.jslider {
  margin-top: 8px;
}

/* Additions for DT package */

.dataTables_info, .dataTables_paginate {
  font-size: 14px;
}



================================================
FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/theme/css/phone.css
================================================
slides>slide{-webkit-transition:none !important;-webkit-transition:none !important;-moz-transition:none !important;-o-transition:none !important;transition:none !important}


================================================
FILE: Debugging/shiny-slides.css
================================================
/* latin-ext */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Code Pro'), local('SourceCodePro-Regular'), url(fonts/mrl8jkM18OlOQN8JLgasD4a1YDtoarzwSXxTHggEXMw.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Code Pro'), local('SourceCodePro-Regular'), url(fonts/mrl8jkM18OlOQN8JLgasD5bPFduIYtoLzwST68uhz_Y.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

/* latin-ext */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 300;
  src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(fonts/toadOcfmlt9b38dHJxOBGDOFnJNygIkrHciC8BWzbCz3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 300;
  src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(fonts/toadOcfmlt9b38dHJxOBGCP2LEk6lMzYsRqr3dHFImA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

/* latin-ext */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(fonts/ODelI1aHBYDBqgeIAH2zlIa1YDtoarzwSXxTHggEXMw.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(fonts/ODelI1aHBYDBqgeIAH2zlJbPFduIYtoLzwST68uhz_Y.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

/* latin-ext */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 600;
  src: local('Source Sans Pro Semibold'), local('SourceSansPro-Semibold'), url(fonts/toadOcfmlt9b38dHJxOBGKyGJhAh-RE0BxGcd_izyev3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 600;
  src: local('Source Sans Pro Semibold'), local('SourceSansPro-Semibold'), url(fonts/toadOcfmlt9b38dHJxOBGMzFoXZ-Kj537nB_-9jJhlA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

/* latin-ext */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 700;
  src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(fonts/toadOcfmlt9b38dHJxOBGO4s1Ux4PuImWPk5fSr6HPL3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 700;
  src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(fonts/toadOcfmlt9b38dHJxOBGJkF8H8ye47wsfpWywda8og.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

slides > slide.dark {
  background-image: url(images/texturebg.png) !important;
}

slide img {
  max-width: 768px;
  max-height: 350px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

body slides > slide {
  font-family: Source Sans Pro;
}

slides > slide.backdrop {
  background-image: url(images/texturebg.png);
  background-position: 0 100%;
  background-repeat: repeat-x;
}

slides > slide:not(.nobackground):after {
  color: #ffffff;
}

aside.gdbar {
  background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #3e8ac7), color-stop(100%, #3e8ac7)) no-repeat;
  background: linear-gradient(left, #3e8ac7, #3e8ac7) no-repeat;
}

slides > slide:not(.nobackground):before {
  background-size: 50px 50px;
  padding-left: 50px;
  height: 50px;
  bottom: 5px;
}

slides > slide > hgroup + article p {
  font-family: Source Sans Pro;
  font-weight: 300;
  color: #ffffff;
}

.title-slide hgroup p {
  font-family: Source Sans Pro;
  font-weight: 300;
}

div.notes {
  color: #000000;
}

================================================
FILE: Gadgets/.gitignore
================================================
.Rproj.user
.Rhistory
.RData


================================================
FILE: Gadgets/brush.R
================================================
library(shiny)
library(miniUI)
library(ggplot2)

ggbrush <- function(data, xvar, yvar) {
  ui <- miniPage(
    gadgetTitleBar("Drag to select points"),
    miniContentPanel(
      # The brush="brush" argument means we can listen for
      # brush events on the plot using input$brush.
      plotOutput("plot", height = "100%", brush = "brush")
    )
  )

  server <- function(input, output, session) {
    # Render the plot
    output$plot <- renderPlot({
      # Plot the data with x/y vars indicated by the caller.
      ggplot(data, aes_(xvar, yvar)) + geom_point()
    })

    # Handle the Done button being pressed.
    observeEvent(input$done, {
      # Return the brushed points. See ?shiny::brushedPoints.
      stopApp(brushedPoints(data, input$brush))
    })
  }

  runGadget(ui, server)
}
x <- ggbrush(mpg, ~displ, ~cty)


================================================
FILE: Gadgets/brush2.R
================================================
library(shiny)
library(miniUI)
library(ggplot2)

pick_points <- function(data, x, y, name = deparse(substitute(data))) {
  ui <- miniPage(
    gadgetTitleBar(paste("Select points in", name)),
    miniContentPanel(padding = 0,
      plotOutput("plot1", height = "100%", brush = "brush")
    ),
    miniButtonBlock(
      actionButton("add", "", icon = icon("thumbs-up")),
      actionButton("sub", "", icon = icon("thumbs-down")),
      actionButton("none", "" , icon = icon("ban")),
      actionButton("all", "", icon = icon("refresh"))
    )
  )

  server <- function(input, output) {
    # For storing selected points
    vals <- reactiveValues(keep = rep(TRUE, nrow(data)))

    output$plot1 <- renderPlot({
      # Plot the kept and excluded points as two separate data sets
      keep    <- data[ vals$keep, , drop = FALSE]
      exclude <- data[!vals$keep, , drop = FALSE]

      ggplot(keep, aes_(x, y)) +
        geom_point(data = exclude, color = "grey80") +
        geom_point()
    })

    # Update selected points
    selected <- reactive({
      brushedPoints(data, input$brush, allRows = TRUE)$selected_
    })
    observeEvent(input$add,  vals$keep <- vals$keep | selected())
    observeEvent(input$sub,  vals$keep <- vals$keep & !selected())
    observeEvent(input$all,  vals$keep <- rep(TRUE, nrow(data)))
    observeEvent(input$none, vals$keep <- rep(FALSE, nrow(data)))

    observeEvent(input$done, {
      stopApp(vals$keep)
    })
    observeEvent(input$cancel, {
      stopApp(NULL)
    })

  }

  runGadget(ui, server)
}
pick_points(mtcars, ~wt, ~mpg)
# pick_points(ggplot2::mpg, aes(displ, hwy))


================================================
FILE: Gadgets/password.R
================================================
get_password <- function() {
  ui <- miniPage(
    gadgetTitleBar("Please enter your password"),
    miniContentPanel(
      passwordInput("password", "")
    )
  )

  server <- function(input, output) {
    observeEvent(input$done, {
      stopApp(input$password)
    })
    observeEvent(input$cancel, {
      stopApp(stop("No password.", call. = FALSE))
    })
  }

  runGadget(ui, server)
}
get_password()


================================================
FILE: Modules/Demo/app.R
================================================
# Exercise 2 - solution

library(shiny)
library(gapminder)
library(dplyr)

# Note: This code creates data sets to use in each tab.
# It removes Kuwait since Kuwait distorts the gdp scale
all_data <- filter(gapminder, country != "Kuwait")
africa_data <- filter(gapminder, continent == "Africa")
americas_data <- filter(gapminder, continent == "Americas")
asia_data <- filter(gapminder, continent == "Asia", country != "Kuwait")
europe_data <- filter(gapminder, continent == "Europe")
oceania_data <- filter(gapminder, continent == "Oceania")

ui <- fluidPage(
  titlePanel("Gapminder"),
  tabsetPanel(id = "continent", 
    tabPanel("All", 
      plotOutput("all_plot"),
      sliderInput("all_year", "Select Year", value = 1952, min = 1952, 
        max = 2007, step = 5, animate = animationOptions(interval = 500))
    ),
    tabPanel("Africa", 
      plotOutput("africa_plot"),
      sliderInput("africa_year", "Select Year", value = 1952, min = 1952, 
        max = 2007, step = 5, animate = animationOptions(interval = 500))
    ),
    tabPanel("Americas", 
      plotOutput("americas_plot"),
      sliderInput("americas_year", "Select Year", value = 1952, min = 1952, 
        max = 2007, step = 5, animate = animationOptions(interval = 500))
    ),
    tabPanel("Asia", 
      plotOutput("asia_plot"),
      sliderInput("asia_year", "Select Year", value = 1952, min = 1952, 
        max = 2007, step = 5, animate = animationOptions(interval = 500))
    ),
    tabPanel("Europe", 
      plotOutput("europe_plot"),
      sliderInput("europe_year", "Select Year", value = 1952, min = 1952, 
        max = 2007, step = 5, animate = animationOptions(interval = 500))
    ),
    tabPanel("Oceania", 
      plotOutput("oceania_plot"),
      sliderInput("oceania_year", "Select Year", value = 1952, min = 1952, 
        max = 2007, step = 5, animate = animationOptions(interval = 500))
    )
  )
)

server <- function(input, output) {
  
  # collect one year of data
  ydata_all <- reactive({
    filter(all_data, year == input$all_year)
  })
  
  ydata_africa <- reactive({
    filter(africa_data, year == input$africa_year)
  })

  ydata_americas <- reactive({
    filter(americas_data, year == input$americas_year)
  })

  ydata_asia <- reactive({
    filter(asia_data, year == input$asia_year)
  })  

  ydata_europe <- reactive({
    filter(europe_data, year == input$europe_year)
  })
  
  ydata_oceania <- reactive({
    filter(oceania_data, year == input$oceania_year)
  })
  
  # compute plot ranges
  xrange_all <- range(all_data$gdpPercap)
  yrange_all <- range(all_data$lifeExp)
  
  xrange_africa <- range(africa_data$gdpPercap)
  yrange_africa <- range(africa_data$lifeExp)
  
  xrange_americas <- range(americas_data$gdpPercap)
  yrange_americas <- range(americas_data$lifeExp)
  
  xrange_asia <- range(asia_data$gdpPercap)
  yrange_asia <- range(asia_data$lifeExp)
  
  xrange_europe <- range(europe_data$gdpPercap)
  yrange_europe <- range(europe_data$lifeExp)
  
  xrange_oceania <- range(oceania_data$gdpPercap)
  yrange_oceania <- range(oceania_data$lifeExp)
  
  # render plots
  output$all_plot <- renderPlot({
    
    # draw background plot with legend
    plot(all_data$gdpPercap, all_data$lifeExp, type = "n", 
      xlab = "GDP per capita", ylab = "Life Expectancy", 
      panel.first = {
        grid()
        text(mean(xrange_all), mean(yrange_all), input$all_year, 
          col = "grey90", cex = 5)
      }
    )
    
    legend("bottomright", legend = levels(all_data$continent), 
      cex = 1.3, inset = 0.01, text.width = diff(xrange_all)/5,
      fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", "#984EA399", "#FF7F0099")
    )
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata_all()$continent]
    
    # add bubbles
    symbols(ydata_all()$gdpPercap, ydata_all()$lifeExp, 
      circles = sqrt(ydata_all()$pop), bg = cols, inches = 0.5, fg = "white", 
      add = TRUE)
  })
  
  output$africa_plot <- renderPlot({
    
    # draw background plot with legend
    plot(africa_data$gdpPercap, africa_data$lifeExp, type = "n", 
      xlab = "GDP per capita", ylab = "Life Expectancy", 
      panel.first = {
        grid()
        text(mean(xrange_africa), mean(yrange_africa), input$africa_year, 
          col = "grey90", cex = 5)
      }
    )
    
    legend("bottomright", legend = levels(africa_data$continent), 
      cex = 1.3, inset = 0.01, text.width = diff(xrange_africa)/5,
      fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", "#984EA399", "#FF7F0099")
    )
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata_africa()$continent]
    
    # add bubbles
    symbols(ydata_africa()$gdpPercap, ydata_africa()$lifeExp, 
      circles = sqrt(ydata_africa()$pop), bg = cols, inches = 0.5, fg = "white", 
      add = TRUE)
  })
  
  output$americas_plot <- renderPlot({
    
    # draw background plot with legend
    plot(americas_data$gdpPercap, americas_data$lifeExp, type = "n", 
      xlab = "GDP per capita", ylab = "Life Expectancy", 
      panel.first = {
        grid()
        text(mean(xrange_americas), mean(yrange_americas), input$americas_year, 
          col = "grey90", cex = 5)
      }
    )
    
    legend("bottomright", legend = levels(americas_data$continent), 
      cex = 1.3, inset = 0.01, text.width = diff(xrange_americas)/5,
      fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", "#984EA399", "#FF7F0099")
    )
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata_americas()$continent]
    
    # add bubbles
    symbols(ydata_americas()$gdpPercap, ydata_americas()$lifeExp, 
      circles = sqrt(ydata_americas()$pop), bg = cols, inches = 0.5, fg = "white", 
      add = TRUE)
  })

  output$asia_plot <- renderPlot({
    
    # draw background plot with legend
    plot(asia_data$gdpPercap, asia_data$lifeExp, type = "n", 
      xlab = "GDP per capita", ylab = "Life Expectancy", 
      panel.first = {
        grid()
        text(mean(xrange_asia), mean(yrange_asia), input$asia_year, 
          col = "grey90", cex = 5)
      }
    )
    
    legend("bottomright", legend = levels(asia_data$continent), 
      cex = 1.3, inset = 0.01, text.width = diff(xrange_asia)/5,
      fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", "#984EA399", "#FF7F0099")
    )
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata_asia()$continent]
    
    # add bubbles
    symbols(ydata_asia()$gdpPercap, ydata_asia()$lifeExp, 
      circles = sqrt(ydata_asia()$pop), bg = cols, inches = 0.5, fg = "white", 
      add = TRUE)
  })

  output$europe_plot <- renderPlot({
    stop("Error: Don't look at Europe")
    # draw background plot with legend
    plot(europe_data$gdpPercap, europe_data$lifeExp, type = "n", 
      xlab = "GDP per capita", ylab = "Life Expectancy", 
      panel.first = {
        grid()
        text(mean(xrange_europe), mean(yrange_europe), input$europe_year, 
          col = "grey90", cex = 5)
      }
    )
    
    legend("bottomright", legend = levels(europe_data$continent), 
      cex = 1.3, inset = 0.01, text.width = diff(xrange_europe)/5,
      fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", "#984EA399", "#FF7F0099")
    )
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata_europe()$continent]
    
    # add bubbles
    symbols(ydata_europe()$gdpPercap, ydata_europe()$lifeExp, 
      circles = sqrt(ydata_europe()$pop), bg = cols, inches = 0.5, fg = "white", 
      add = TRUE)
  })
  
  output$oceania_plot <- renderPlot({
    
    # draw background plot with legend
    plot(oceania_data$gdpPercap, oceania_data$lifeExp, type = "n", 
      xlab = "GDP per capita", ylab = "Life Expectancy", 
      panel.first = {
        grid()
        text(mean(xrange_oceania), mean(yrange_oceania), input$oceania_year, 
          col = "grey90", cex = 5)
      }
    )
    
    legend("bottomright", legend = levels(oceania_data$continent), 
      cex = 1.3, inset = 0.01, text.width = diff(xrange_oceania)/5,
      fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", "#984EA399", "#FF7F0099")
    )
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata_oceania()$continent]
    
    # add bubbles
    symbols(ydata_oceania()$gdpPercap, ydata_oceania()$lifeExp, 
      circles = sqrt(ydata_oceania()$pop), bg = cols, inches = 0.5, fg = "white", 
      add = TRUE)
  })
}

# Run the application 
shinyApp(ui = ui, server = server)





================================================
FILE: Modules/Demo/modularized/app.R
================================================
# Exercise 2 - sol

library(shiny)
library(gapminder)
library(dplyr)
source("gapModule.R")

# Note: This code creates data sets to use in each tab.
# It removes Kuwait since Kuwait distorts the gdp scale
all_data <- filter(gapminder, country != "Kuwait")
africa_data <- filter(gapminder, continent == "Africa")
americas_data <- filter(gapminder, continent == "Americas")
asia_data <- filter(gapminder, continent == "Asia", country != "Kuwait")
europe_data <- filter(gapminder, continent == "Europe")
oceania_data <- filter(gapminder, continent == "Oceania")

ui <- fluidPage(
  titlePanel("Gapminder"),
  tabsetPanel(id = "continent", 
    tabPanel("All", gapModuleUI("all")),
    tabPanel("Africa", gapModuleUI("africa")),
    tabPanel("Americas", gapModuleUI("americas")),
    tabPanel("Asia", gapModuleUI("asia")),
    tabPanel("Europe", gapModuleUI("europe")),
    tabPanel("Oceania", gapModuleUI("oceania"))
  )
)

server <- function(input, output) {
  callModule(gapModule, "all", all_data)
  callModule(gapModule, "africa", africa_data)
  callModule(gapModule, "americas", americas_data)
  callModule(gapModule, "asia", asia_data)
  callModule(gapModule, "europe", europe_data)
  callModule(gapModule, "oceania", oceania_data)    
}

# Run the application 
shinyApp(ui = ui, server = server)



================================================
FILE: Modules/Demo/modularized/gapModule.R
================================================
# Exercise 2 - solution

gapModuleUI <- function(id) {
  ns <- NS(id)
  
  tagList(
    plotOutput(ns("plot")),
    sliderInput(ns("year"), "Select Year", value = 1952, 
                min = 1952, max = 2007, step = 5,  
                animate = animationOptions(interval = 500))
  )
}

gapModule <- function(input, output, session, data) {
  
  # collect one year of data
  ydata <- reactive({
    filter(data, year == input$year)
  })
  
  xrange <- range(data$gdpPercap)
  yrange <- range(data$lifeExp)
  
  output$plot <- renderPlot({
    
    # draw background plot with legend
    plot(data$gdpPercap, data$lifeExp, type = "n", 
         xlab = "GDP per capita", ylab = "Life Expectancy", 
         panel.first = {
           grid()
           text(mean(xrange), mean(yrange), input$year, 
                col = "grey90", cex = 5)
         })
    
    legend("bottomright", legend = levels(data$continent), 
           cex = 1.3, inset = 0.01, text.width = diff(xrange)/5,
           fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 
                    "#984EA399", "#FF7F0099"))
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata()$continent]
    
    # add bubbles
    symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop),
            bg = cols, inches = 0.5, fg = "white", add = TRUE)
  })
}

================================================
FILE: Modules/Exercise-1/app.R
================================================
# Exercise 1

library(shiny)
library(gapminder)
library(dplyr)

ui <- fluidPage(
  tags$style(type="text/css", "plot.recalculating { opacity: 1.0; }"),
  plotOutput("plot"),
  sliderInput("year", "Select Year", value = 1952, 
              min = 1952, max = 2007, step = 5,  
              animate = animationOptions(interval = 500))
)

server <- shinyServer(function(input, output) {
  
  # collect one year of data
  ydata <- reactive({
    filter(gapminder, year == input$year)
  })
  
  xrange <- range(gapminder$gdpPercap)
  yrange <- range(gapminder$lifeExp)
  
  output$plot <- renderPlot({
    
    # draw background plot with legend
    plot(gapminder$gdpPercap, gapminder$lifeExp, type = "n", 
         xlab = "GDP per capita", ylab = "Life Expectancy", 
         panel.first = {
           grid()
           text(mean(xrange), mean(yrange), input$year, 
                col = "grey90", cex = 5)
         })
    
    legend("bottomright", legend = levels(gapminder$continent), 
           cex = 1.3, inset = 0.01, text.width = diff(xrange)/5,
           fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 
                    "#984EA399", "#FF7F0099"))
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata()$continent]
    
    # add bubbles
    symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop),
            bg = cols, inches = 0.5, fg = "white", add = TRUE)
  })
})

shinyApp(ui = ui, server = server)



================================================
FILE: Modules/Exercise-1/solution/app.R
================================================
# Exercise 1 - solution

library(shiny)
library(gapminder)
library(dplyr)
source("gapModule.R")

ui <- fluidPage(
  gapModuleUI("all")
)

server <- function(input, output) {
  callModule(gapModule, "all")
}

# Run the application 
shinyApp(ui = ui, server = server)


================================================
FILE: Modules/Exercise-1/solution/gapModule.R
================================================
# Exercise 1 - solution

gapModuleUI <- function(id) {
  ns <- NS(id)
  
  tagList(
    plotOutput(ns("plot")),
    sliderInput(ns("year"), "Select Year", value = 1952, 
                min = 1952, max = 2007, step = 5,  
                animate = animationOptions(interval = 500))
  )
}

gapModule <- function(input, output, session) {
  
  # collect one year of data
  ydata <- reactive({
    filter(gapminder, year == input$year)
  })
  
  xrange <- range(gapminder$gdpPercap)
  yrange <- range(gapminder$lifeExp)
  
  output$plot <- renderPlot({
    
    # draw background plot with legend
    plot(gapminder$gdpPercap, gapminder$lifeExp, type = "n", 
         xlab = "GDP per capita", ylab = "Life Expectancy", 
         panel.first = {
           grid()
           text(mean(xrange), mean(yrange), input$year, 
                col = "grey90", cex = 5)
         })
    
    legend("bottomright", legend = levels(gapminder$continent), 
           cex = 1.3, inset = 0.01, text.width = diff(xrange)/5,
           fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 
                    "#984EA399", "#FF7F0099"))
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata()$continent]
    
    # add bubbles
    symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop),
            bg = cols, inches = 0.5, fg = "white", add = TRUE)
  })
}

================================================
FILE: Modules/Exercise-1/solution*/app.R
================================================
# Exercise 1 - solution

library(shiny)
library(gapminder)
library(dplyr)

gapModuleUI <- function(id) {
  ns <- NS(id)
  
  tagList(
    plotOutput(ns("plot")),
    sliderInput(ns("year"), "Select Year", value = 1952, 
                min = 1952, max = 2007, step = 5,  
                animate = animationOptions(interval = 500))
  )
}

gapModule <- function(input, output, session) {
  
  # collect one year of data
  ydata <- reactive({
    filter(gapminder, year == input$year)
  })
  
  xrange <- range(gapminder$gdpPercap)
  yrange <- range(gapminder$lifeExp)
  
  output$plot <- renderPlot({
    
    # draw background plot with legend
    plot(gapminder$gdpPercap, gapminder$lifeExp, type = "n", 
         xlab = "GDP per capita", ylab = "Life Expectancy", 
         panel.first = {
           grid()
           text(mean(xrange), mean(yrange), input$year, 
                col = "grey90", cex = 5)
         })
    
    legend("bottomright", legend = levels(gapminder$continent), 
           cex = 1.3, inset = 0.01, text.width = diff(xrange)/5,
           fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 
                    "#984EA399", "#FF7F0099"))
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata()$continent]
    
    # add bubbles
    symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop),
            bg = cols, inches = 0.5, fg = "white", add = TRUE)
  })
}


ui <- fluidPage(
  gapModuleUI("all")
)

server <- function(input, output) {
  callModule(gapModule, "all")
}

# Run the application 
shinyApp(ui = ui, server = server)


================================================
FILE: Modules/Exercise-2/app.R
================================================
# Exercise 2
#
# 1. Open the gapModule.R file. Arrange for gapModule() to take a 
#    data set in its arguments
#
# 2. Use the new module to complete the app below. 
#    You will need to replace the comments in the code.

library(shiny)
library(gapminder)
library(dplyr)
source("gapModule.R")

# Note: This code creates data sets to use in each tab.
# It removes Kuwait since Kuwait distorts the gdp scale
all_data <- filter(gapminder, country != "Kuwait")
africa_data <- filter(gapminder, continent == "Africa")
americas_data <- filter(gapminder, continent == "Americas")
asia_data <- filter(gapminder, continent == "Asia", country != "Kuwait")
europe_data <- filter(gapminder, continent == "Europe")
oceania_data <- filter(gapminder, continent == "Oceania")

ui <- fluidPage(
  titlePanel("Gapminder"),
  tabsetPanel(id = "continent", 
    tabPanel("All", # A module that displays all countries),
    tabPanel("Africa", # A module that displays only African countries),
    tabPanel("Americas", # A module that displays only American countries),
    tabPanel("Asia", # A module that displays only Asian countries),
    tabPanel("Europe", # A module that displays only European countries),
    tabPanel("Oceania", # A module that displays only Oceanic countries)
  )
)

server <- function(input, output) {
  
  # Load the server logic for a module that displays all countries. 
  # What should you pass to the new data argument?
  
  # Load the server logic for a module that displays African countries.
  # What should you pass to the new data argument?
  
  # Load the server logic for a module that displays American countries.
  # What should you pass to the new data argument?
  
  # Load the server logic for a module that displays Asian countries.
  # What should you pass to the new data argument?
  
  # Load the server logic for a module that displays European countries.
  # What should you pass to the new data argument?
  
  # Load the server logic for a module that displays Oceanic countries.
  # What should you pass to the new data argument?
  
}

# Run the application 
shinyApp(ui = ui, server = server)



================================================
FILE: Modules/Exercise-2/gapModule.R
================================================
# Exercise 2
#
# Adapt gapModule() to: 
# 1. take a data set as one of its arguments
# 2. to use the data set instead of the gapminder data set

gapModuleUI <- function(id) {
  ns <- NS(id)
  
  tagList(
    plotOutput(ns("plot")),
    sliderInput(ns("year"), "Select Year", value = 1952, 
                min = 1952, max = 2007, step = 5,  
                animate = animationOptions(interval = 500))
  )
}

gapModule <- function(input, output, session) {
  
  # collect one year of data
  ydata <- reactive({
    filter(gapminder, year == input$year)
  })
  
  xrange <- range(gapminder$gdpPercap)
  yrange <- range(gapminder$lifeExp)
  
  output$plot <- renderPlot({
    
    # draw background plot with legend
    plot(gapminder$gdpPercap, gapminder$lifeExp, type = "n", 
         xlab = "GDP per capita", ylab = "Life Expectancy", 
         panel.first = {
           grid()
           text(mean(xrange), mean(yrange), input$year, 
                col = "grey90", cex = 5)
         })
    
    legend("bottomright", legend = levels(gapminder$continent), 
           cex = 1.3, inset = 0.01, text.width = diff(xrange)/5,
           fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 
                    "#984EA399", "#FF7F0099"))
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata()$continent]
    
    # add bubbles
    symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop),
            bg = cols, inches = 0.5, fg = "white", add = TRUE)
  })
}

================================================
FILE: Modules/Exercise-2/solution/app.R
================================================
# Exercise 2 - solution

library(shiny)
library(gapminder)
library(dplyr)
source("gapModule.R")

# Note: This code creates data sets to use in each tab.
# It removes Kuwait since Kuwait distorts the gdp scale
all_data <- filter(gapminder, country != "Kuwait")
africa_data <- filter(gapminder, continent == "Africa")
americas_data <- filter(gapminder, continent == "Americas")
asia_data <- filter(gapminder, continent == "Asia", country != "Kuwait")
europe_data <- filter(gapminder, continent == "Europe")
oceania_data <- filter(gapminder, continent == "Oceania")

ui <- fluidPage(
  titlePanel("Gapminder"),
  tabsetPanel(id = "continent", 
    tabPanel("All", gapModuleUI("all")),
    tabPanel("Africa", gapModuleUI("africa")),
    tabPanel("Americas", gapModuleUI("americas")),
    tabPanel("Asia", gapModuleUI("asia")),
    tabPanel("Europe", gapModuleUI("europe")),
    tabPanel("Oceania", gapModuleUI("oceania"))
  )
)

server <- function(input, output) {
  callModule(gapModule, "all", all_data)
  callModule(gapModule, "africa", africa_data)
  callModule(gapModule, "americas", americas_data)
  callModule(gapModule, "asia", asia_data)
  callModule(gapModule, "europe", europe_data)
  callModule(gapModule, "oceania", oceania_data)    
}

# Run the application 
shinyApp(ui = ui, server = server)



================================================
FILE: Modules/Exercise-2/solution/gapModule.R
================================================
# Exercise 2 - solution

gapModuleUI <- function(id) {
  ns <- NS(id)
  
  tagList(
    plotOutput(ns("plot")),
    sliderInput(ns("year"), "Select Year", value = 1952, 
                min = 1952, max = 2007, step = 5,  
                animate = animationOptions(interval = 500))
  )
}

gapModule <- function(input, output, session, data) {
  
  # collect one year of data
  ydata <- reactive({
    filter(data, year == input$year)
  })
  
  xrange <- range(data$gdpPercap)
  yrange <- range(data$lifeExp)
  
  output$plot <- renderPlot({
    
    # draw background plot with legend
    plot(data$gdpPercap, data$lifeExp, type = "n", 
         xlab = "GDP per capita", ylab = "Life Expectancy", 
         panel.first = {
           grid()
           text(mean(xrange), mean(yrange), input$year, 
                col = "grey90", cex = 5)
         })
    
    legend("bottomright", legend = levels(data$continent), 
           cex = 1.3, inset = 0.01, text.width = diff(xrange)/5,
           fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 
                    "#984EA399", "#FF7F0099"))
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata()$continent]
    
    # add bubbles
    symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop),
            bg = cols, inches = 0.5, fg = "white", add = TRUE)
  })
}

================================================
FILE: Modules/Exercise-2/solution*/app.R
================================================
# Exercise 2 - solution

library(shiny)
library(gapminder)
library(dplyr)

gapModuleUI <- function(id) {
  ns <- NS(id)
  
  tagList(
    plotOutput(ns("plot")),
    sliderInput(ns("year"), "Select Year", value = 1952, 
                min = 1952, max = 2007, step = 5,  
                animate = animationOptions(interval = 500))
  )
}

gapModule <- function(input, output, session, data) {
  
  # collect one year of data
  ydata <- reactive({
    filter(data, year == input$year)
  })
  
  xrange <- range(data$gdpPercap)
  yrange <- range(data$lifeExp)
  
  output$plot <- renderPlot({
    
    # draw background plot with legend
    plot(data$gdpPercap, data$lifeExp, type = "n", 
         xlab = "GDP per capita", ylab = "Life Expectancy", 
         panel.first = {
           grid()
           text(mean(xrange), mean(yrange), input$year, 
                col = "grey90", cex = 5)
         })
    
    legend("bottomright", legend = levels(data$continent), 
           cex = 1.3, inset = 0.01, text.width = diff(xrange)/5,
           fill = c("#E41A1C99", "#377EB899", "#4DAF4A99", 
                    "#984EA399", "#FF7F0099"))
    
    # Determine bubble colors
    cols <- c("Africa" = "#E41A1C99",
              "Americas" = "#377EB899",
              "Asia" = "#4DAF4A99",
              "Europe" = "#984EA399",
              "Oceania" = "#FF7F0099")[ydata()$continent]
    
    # add bubbles
    symbols(ydata()$gdpPercap, ydata()$lifeExp, circles = sqrt(ydata()$pop),
            bg = cols, inches = 0.5, fg = "white", add = TRUE)
  })
}




# Note: This code creates data sets to use in each tab.
# It removes Kuwait since Kuwait distorts the gdp scale
all_data <- filter(gapminder, country != "Kuwait")
africa_data <- filter(gapminder, continent == "Africa")
americas_data <- filter(gapminder, continent == "Americas")
asia_data <- filter(gapminder, continent == "Asia", country != "Kuwait")
europe_data <- filter(gapminder, continent == "Europe")
oceania_data <- filter(gapminder, continent == "Oceania")

ui <- fluidPage(
  titlePanel("Gapminder"),
  tabsetPanel(id = "continent", 
    tabPanel("All", gapModuleUI("all")),
    tabPanel("Africa", gapModuleUI("africa")),
    tabPanel("Americas", gapModuleUI("americas")),
    tabPanel("Asia", gapModuleUI("asia")),
    tabPanel("Europe", gapModuleUI("europe")),
    tabPanel("Oceania", gapModuleUI("oceania"))
  )
)

server <- function(input, output) {
  callModule(gapModule, "all", all_data)
  callModule(gapModule, "africa", africa_data)
  callModule(gapModule, "americas", americas_data)
  callModule(gapModule, "asia", asia_data)
  callModule(gapModule, "europe", europe_data)
  callModule(gapModule, "oceania", oceania_data)    
}

# Run the application 
shinyApp(ui = ui, server = server)



================================================
FILE: Modules/Exercise-3/app.R
================================================
# Exercise 3
#
# 1. Open uploadModule.R. Finish updloadModuleInput() and uploadModule() 
# so that each returns an object in the correct format to use below.
#
# 2. Finish the app below so that 
#    a. The uploadModule input objects appear in the sidebar, and
#    b. The uploaded data appears in output$dataTable

library(shiny)
source("uploadModule.R")

ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(
      # Hint: Place input objects here, but how?
    ),
    mainPanel(
      dataTableOutput("table")
    )
  )
)

server <- function(input, output, session) {
  
  # Hint: Make datafile here, but how?

  output$table <- renderDataTable({
    datafile()
  })
}

shinyApp(ui, server)

================================================
FILE: Modules/Exercise-3/solution/app.R
================================================
# Exercise 3 - solution

library(shiny)
source("uploadModule.R")

ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(
      uploadModuleInput("datafile")
    ),
    mainPanel(
      dataTableOutput("table")
    )
  )
)

server <- function(input, output, session) {
  
  datafile <- callModule(uploadModule, "datafile")

  output$table <- renderDataTable({
    datafile()
  })
}

shinyApp(ui, server)

================================================
FILE: Modules/Exercise-3/solution/storms.csv
================================================
"name","year","month","day","hour","lat","long","pressure","wind","type","seasday"
"Allison",1995,6,3,0,17.4,-84.3,1005,30,"Tropical Depression",3
"Allison",1995,6,3,6,18.3,-84.9,1004,30,"Tropical Depression",3
"Allison",1995,6,3,12,19.3,-85.7,1003,35,"Tropical Storm",3
"Allison",1995,6,3,18,20.6,-85.8,1001,40,"Tropical Storm",3
"Allison",1995,6,4,0,22,-86,997,50,"Tropical Storm",4
"Allison",1995,6,4,6,23.3,-86.3,995,60,"Tropical Storm",4
"Allison",1995,6,4,12,24.7,-86.2,987,65,"Hurricane",4
"Allison",1995,6,4,18,26.2,-86.2,988,65,"Hurricane",4
"Allison",1995,6,5,0,27.6,-86.1,988,65,"Hurricane",5
"Allison",1995,6,5,6,28.5,-85.6,990,60,"Tropical Storm",5
"Allison",1995,6,5,12,29.6,-84.7,990,60,"Tropical Storm",5
"Allison",1995,6,5,18,30.7,-83.8,993,45,"Tropical Storm",5
"Allison",1995,6,6,0,31.8,-82.8,993,30,"Tropical Depression",6
"Allison",1995,6,6,6,32.7,-81.5,994,35,"Extratropical",6
"Allison",1995,6,6,12,33.6,-80,995,35,"E
Download .txt
gitextract_st6u2qq0/

├── Debugging/
│   ├── .gitignore
│   ├── README.md
│   ├── shiny-breakpoints/
│   │   ├── server.R
│   │   └── ui.R
│   ├── shiny-debug-doc.Rmd
│   ├── shiny-debugging.Rmd
│   ├── shiny-debugging.html
│   ├── shiny-debugging_files/
│   │   └── ioslides-13.5.1/
│   │       ├── fonts/
│   │       │   └── fonts.css
│   │       ├── js/
│   │       │   ├── hammer.js
│   │       │   ├── modernizr.custom.45394.js
│   │       │   ├── order.js
│   │       │   ├── prettify/
│   │       │   │   ├── lang-r.js
│   │       │   │   ├── lang-tex.js
│   │       │   │   ├── lang-yaml.js
│   │       │   │   ├── prettify.css
│   │       │   │   └── prettify.js
│   │       │   ├── slide-controller.js
│   │       │   └── slide-deck.js
│   │       └── theme/
│   │           └── css/
│   │               ├── default.css
│   │               └── phone.css
│   └── shiny-slides.css
├── Gadgets/
│   ├── .gitignore
│   ├── brush.R
│   ├── brush2.R
│   └── password.R
├── Modules/
│   ├── Demo/
│   │   ├── app.R
│   │   └── modularized/
│   │       ├── app.R
│   │       └── gapModule.R
│   ├── Exercise-1/
│   │   ├── app.R
│   │   ├── solution/
│   │   │   ├── app.R
│   │   │   └── gapModule.R
│   │   └── solution*/
│   │       └── app.R
│   ├── Exercise-2/
│   │   ├── app.R
│   │   ├── gapModule.R
│   │   ├── solution/
│   │   │   ├── app.R
│   │   │   └── gapModule.R
│   │   └── solution*/
│   │       └── app.R
│   ├── Exercise-3/
│   │   ├── app.R
│   │   ├── solution/
│   │   │   ├── app.R
│   │   │   ├── storms.csv
│   │   │   └── uploadModule.R
│   │   ├── solution*/
│   │   │   └── app.R
│   │   ├── storms.csv
│   │   └── uploadModule.R
│   ├── Exercise-4/
│   │   ├── app.R
│   │   ├── downloadModule.R
│   │   ├── solution/
│   │   │   ├── app.R
│   │   │   ├── downloadModule.R
│   │   │   ├── storms.csv
│   │   │   └── uploadModule.R
│   │   ├── solution*/
│   │   │   └── app.R
│   │   ├── storms.csv
│   │   └── uploadModule.R
│   ├── solution-1.Rmd
│   ├── solution-2.Rmd
│   ├── solution-3.Rmd
│   ├── solution-4.Rmd
│   ├── warm-up-1.Rmd
│   ├── warm-up-1.html
│   ├── warm-up-2.Rmd
│   ├── warm-up-2.html
│   └── warm-ups.R
├── Profiling/
│   ├── profiling-examples.Rmd
│   └── profiling-examples.html
├── README.md
├── Reactivity/
│   ├── .gitignore
│   ├── Exercise_00.R
│   ├── Exercise_01.R
│   ├── Exercise_02.R
│   ├── Exercise_03.R
│   ├── Exercise_04.R
│   ├── Exercise_05.R
│   ├── Exercise_07.R
│   ├── Solution_00.R
│   ├── Solution_01.R
│   ├── Solution_02.R
│   ├── Solution_03.R
│   ├── Solution_04.R
│   ├── Solution_05a.R
│   ├── Solution_05b.R
│   ├── Solution_07a.R
│   ├── Solution_07b.R
│   ├── Unsolution_00.R
│   ├── Unsolution_01.R
│   ├── Unsolution_01b.R
│   ├── Unsolution_02.R
│   ├── slides.Rmd
│   ├── slides.css
│   └── slides.html
└── UI/
    ├── Understanding-UI.Rmd
    ├── index-demo/
    │   ├── server.R
    │   └── www/
    │       └── index.html
    ├── scorecard-app/
    │   ├── .gitignore
    │   ├── README.md
    │   ├── flickr_api.R
    │   ├── scorecard-app.Rproj
    │   ├── server.R
    │   ├── ui.R
    │   └── www/
    │       ├── assets/
    │       │   ├── _scss/
    │       │   │   ├── all.scss
    │       │   │   ├── components/
    │       │   │   │   ├── _accordions.scss
    │       │   │   │   ├── _alerts.scss
    │       │   │   │   ├── _disclaimer.scss
    │       │   │   │   ├── _footer.scss
    │       │   │   │   ├── _forms.scss
    │       │   │   │   ├── _search.scss
    │       │   │   │   ├── _sidenav.scss
    │       │   │   │   └── _skipnav.scss
    │       │   │   ├── core/
    │       │   │   │   ├── _base.scss
    │       │   │   │   ├── _defaults.scss
    │       │   │   │   ├── _grid-settings.scss
    │       │   │   │   ├── _grid.scss
    │       │   │   │   ├── _utilities.scss
    │       │   │   │   └── _variables.scss
    │       │   │   ├── elements/
    │       │   │   │   ├── _buttons.scss
    │       │   │   │   ├── _figure.scss
    │       │   │   │   ├── _inputs.scss
    │       │   │   │   ├── _labels.scss
    │       │   │   │   ├── _list.scss
    │       │   │   │   ├── _table.scss
    │       │   │   │   └── _typography.scss
    │       │   │   └── lib/
    │       │   │       ├── _normalize.scss
    │       │   │       ├── bourbon/
    │       │   │       │   ├── _bourbon-deprecated-upcoming.scss
    │       │   │       │   ├── _bourbon.scss
    │       │   │       │   ├── addons/
    │       │   │       │   │   ├── _border-color.scss
    │       │   │       │   │   ├── _border-radius.scss
    │       │   │       │   │   ├── _border-style.scss
    │       │   │       │   │   ├── _border-width.scss
    │       │   │       │   │   ├── _buttons.scss
    │       │   │       │   │   ├── _clearfix.scss
    │       │   │       │   │   ├── _ellipsis.scss
    │       │   │       │   │   ├── _font-stacks.scss
    │       │   │       │   │   ├── _hide-text.scss
    │       │   │       │   │   ├── _margin.scss
    │       │   │       │   │   ├── _padding.scss
    │       │   │       │   │   ├── _position.scss
    │       │   │       │   │   ├── _prefixer.scss
    │       │   │       │   │   ├── _retina-image.scss
    │       │   │       │   │   ├── _size.scss
    │       │   │       │   │   ├── _text-inputs.scss
    │       │   │       │   │   ├── _timing-functions.scss
    │       │   │       │   │   ├── _triangle.scss
    │       │   │       │   │   └── _word-wrap.scss
    │       │   │       │   ├── css3/
    │       │   │       │   │   ├── _animation.scss
    │       │   │       │   │   ├── _appearance.scss
    │       │   │       │   │   ├── _backface-visibility.scss
    │       │   │       │   │   ├── _background-image.scss
    │       │   │       │   │   ├── _background.scss
    │       │   │       │   │   ├── _border-image.scss
    │       │   │       │   │   ├── _calc.scss
    │       │   │       │   │   ├── _columns.scss
    │       │   │       │   │   ├── _filter.scss
    │       │   │       │   │   ├── _flex-box.scss
    │       │   │       │   │   ├── _font-face.scss
    │       │   │       │   │   ├── _font-feature-settings.scss
    │       │   │       │   │   ├── _hidpi-media-query.scss
    │       │   │       │   │   ├── _hyphens.scss
    │       │   │       │   │   ├── _image-rendering.scss
    │       │   │       │   │   ├── _keyframes.scss
    │       │   │       │   │   ├── _linear-gradient.scss
    │       │   │       │   │   ├── _perspective.scss
    │       │   │       │   │   ├── _placeholder.scss
    │       │   │       │   │   ├── _radial-gradient.scss
    │       │   │       │   │   ├── _selection.scss
    │       │   │       │   │   ├── _text-decoration.scss
    │       │   │       │   │   ├── _transform.scss
    │       │   │       │   │   ├── _transition.scss
    │       │   │       │   │   └── _user-select.scss
    │       │   │       │   ├── functions/
    │       │   │       │   │   ├── _assign-inputs.scss
    │       │   │       │   │   ├── _contains-falsy.scss
    │       │   │       │   │   ├── _contains.scss
    │       │   │       │   │   ├── _is-length.scss
    │       │   │       │   │   ├── _is-light.scss
    │       │   │       │   │   ├── _is-number.scss
    │       │   │       │   │   ├── _is-size.scss
    │       │   │       │   │   ├── _modular-scale.scss
    │       │   │       │   │   ├── _px-to-em.scss
    │       │   │       │   │   ├── _px-to-rem.scss
    │       │   │       │   │   ├── _shade.scss
    │       │   │       │   │   ├── _strip-units.scss
    │       │   │       │   │   ├── _tint.scss
    │       │   │       │   │   ├── _transition-property-name.scss
    │       │   │       │   │   └── _unpack.scss
    │       │   │       │   ├── helpers/
    │       │   │       │   │   ├── _convert-units.scss
    │       │   │       │   │   ├── _directional-values.scss
    │       │   │       │   │   ├── _font-source-declaration.scss
    │       │   │       │   │   ├── _gradient-positions-parser.scss
    │       │   │       │   │   ├── _linear-angle-parser.scss
    │       │   │       │   │   ├── _linear-gradient-parser.scss
    │       │   │       │   │   ├── _linear-positions-parser.scss
    │       │   │       │   │   ├── _linear-side-corner-parser.scss
    │       │   │       │   │   ├── _radial-arg-parser.scss
    │       │   │       │   │   ├── _radial-gradient-parser.scss
    │       │   │       │   │   ├── _radial-positions-parser.scss
    │       │   │       │   │   ├── _render-gradients.scss
    │       │   │       │   │   ├── _shape-size-stripper.scss
    │       │   │       │   │   └── _str-to-num.scss
    │       │   │       │   └── settings/
    │       │   │       │       ├── _asset-pipeline.scss
    │       │   │       │       ├── _prefixer.scss
    │       │   │       │       └── _px-to-em.scss
    │       │   │       └── neat/
    │       │   │           ├── _neat-helpers.scss
    │       │   │           ├── _neat.scss
    │       │   │           ├── functions/
    │       │   │           │   ├── _new-breakpoint.scss
    │       │   │           │   └── _private.scss
    │       │   │           ├── grid/
    │       │   │           │   ├── _box-sizing.scss
    │       │   │           │   ├── _direction-context.scss
    │       │   │           │   ├── _display-context.scss
    │       │   │           │   ├── _fill-parent.scss
    │       │   │           │   ├── _media.scss
    │       │   │           │   ├── _omega.scss
    │       │   │           │   ├── _outer-container.scss
    │       │   │           │   ├── _pad.scss
    │       │   │           │   ├── _private.scss
    │       │   │           │   ├── _row.scss
    │       │   │           │   ├── _shift.scss
    │       │   │           │   ├── _span-columns.scss
    │       │   │           │   ├── _to-deprecate.scss
    │       │   │           │   └── _visual-grid.scss
    │       │   │           └── settings/
    │       │   │               ├── _disable-warnings.scss
    │       │   │               ├── _grid.scss
    │       │   │               └── _visual-grid.scss
    │       │   ├── css/
    │       │   │   ├── google-fonts.css
    │       │   │   ├── main.css
    │       │   │   └── main.scss
    │       │   └── js/
    │       │       ├── components.js
    │       │       └── vendor/
    │       │           ├── html5shiv.js
    │       │           ├── respond.js
    │       │           └── selectivizr-min.js
    │       └── index.html
    └── templates-demo/
        ├── app.R
        └── template.html
Download .txt
SYMBOL INDEX (71 symbols across 10 files)

FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/hammer.js
  function Hammer (line 7) | function Hammer(element, options, undefined)

FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/modernizr.custom.45394.js
  function C (line 4) | function C(a){i.cssText=a}
  function D (line 4) | function D(a,b){return C(m.join(a+";")+(b||""))}
  function E (line 4) | function E(a,b){return typeof a===b}
  function F (line 4) | function F(a,b){return!!~(""+a).indexOf(b)}
  function G (line 4) | function G(a,b){for(var d in a)if(i[a[d]]!==c)return b=="pfx"?a[d]:!0;re...
  function H (line 4) | function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a...
  function I (line 4) | function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+o...
  function K (line 4) | function K(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)t[c[d]]=...
  function d (line 4) | function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;...
  function d (line 4) | function d(a){return o.call(a)=="[object Function]"}
  function e (line 4) | function e(a){return typeof a=="string"}
  function f (line 4) | function f(){}
  function g (line 4) | function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}
  function h (line 4) | function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCs...
  function i (line 4) | function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1...
  function j (line 4) | function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++...
  function k (line 4) | function k(){var a=B;return a.loader={load:j,i:0},a}
  function b (line 4) | function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:...
  function g (line 4) | function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop()...
  function i (line 4) | function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[]....

FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/order.js
  function k (line 6) | function k(a){var b=a.currentTarget||a.srcElement,c;if(a.type==="load"||...
  function m (line 6) | function m(a){var b,c;a.setAttribute("data-orderloaded","loaded");for(a=...

FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/prettify.js
  function L (line 2) | function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var...
  function M (line 6) | function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.classN...
  function B (line 7) | function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}
  function x (line 7) | function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(...
  function u (line 9) | function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''...
  function D (line 12) | function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.clas...
  function k (line 15) | function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(...
  function C (line 15) | function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-m...
  function E (line 15) | function E(a){var m=
  function m (line 25) | function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Inf...

FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/slide-controller.js
  function SlideController (line 17) | function SlideController() {

FILE: Debugging/shiny-debugging_files/ioslides-13.5.1/js/slide-deck.js
  function SlideDeck (line 12) | function SlideDeck(el) {

FILE: UI/scorecard-app/www/assets/js/components.js
  function getStyle (line 129) | function getStyle( el, prop ) {
  function sumStyles (line 132) | function sumStyles( el, props ) {
  function Accordion (line 209) | function Accordion($el) {
  function accordion (line 256) | function accordion($el) {
  function togglePassword (line 260) | function togglePassword($el) {
  function toggleSSN (line 273) | function toggleSSN($el) {
  function toggleMultiPassword (line 286) | function toggleMultiPassword($el) {
  function toggleFieldMask (line 299) | function toggleFieldMask($field, showing) {
  function validator (line 305) | function validator($el) {

FILE: UI/scorecard-app/www/assets/js/vendor/html5shiv.js
  function addStyleSheet (line 67) | function addStyleSheet(ownerDocument, cssText) {
  function getElements (line 80) | function getElements() {
  function getExpandoData (line 91) | function getExpandoData(ownerDocument) {
  function createElement (line 109) | function createElement(nodeName, ownerDocument, data){
  function createDocumentFragment (line 145) | function createDocumentFragment(ownerDocument, data){
  function shivMethods (line 169) | function shivMethods(ownerDocument, data) {
  function shivDocument (line 207) | function shivDocument(ownerDocument) {

FILE: UI/scorecard-app/www/assets/js/vendor/respond.js
  function callMedia (line 331) | function callMedia(){

FILE: UI/scorecard-app/www/assets/js/vendor/selectivizr-min.js
  function W (line 7) | function W(ab){return ab.replace(V,Z).replace(G,function(ad,ai,ah){var a...
  function U (line 7) | function U(ab){return(!v||v.test(ab))?{className:H(ab),applyClass:true}:...
  function A (line 7) | function A(ag){var af=true;var ae=H(ag.slice(1));var ad=ag.substring(0,5...
  function R (line 7) | function R(){var ae,ab,ac,aj;for(var am=0;am<z.length;am++){ab=z[am].sel...
  function P (line 7) | function P(ac,ab){return new RegExp("(^|\\s)"+ab.className+"(\\s|$)").te...
  function H (line 7) | function H(ab){return L+"-"+((x==6&&d)?C++:ab.replace(aa,function(ac){re...
  function a (line 7) | function a(ab){return ab.replace(c,Z)}
  function l (line 7) | function l(ab){return a(ab).replace(s,o)}
  function i (line 7) | function i(ab){return l(ab.replace(e,Z).replace(O,Z))}
  function I (line 7) | function I(af,ae,ab){var ad=af.className;var ac=g(ad,ae,ab);if(ac!=ad){a...
  function g (line 7) | function g(ae,ad,ab){var ac=RegExp("(^|\\s)"+ad+"(\\s|$)");var af=ac.tes...
  function n (line 7) | function n(ad,ab,ac){ad.attachEvent("on"+ab,ac)}
  function t (line 7) | function t(){if(M.XMLHttpRequest){return new XMLHttpRequest}try{return n...
  function k (line 7) | function k(ab){Y.open("GET",ab,false);Y.send();return(Y.status==200)?Y.r...
  function J (line 7) | function J(ad,ac,af){function ae(ah){return ah.substring(0,ah.indexOf("/...
  function Q (line 7) | function Q(ab){if(ab){return k(ab).replace(b,u).replace(q,function(af,ag...
  function h (line 7) | function h(){var ab,ac;for(var ad=0;ad<m.styleSheets.length;ad++){ac=m.s...
  function S (line 7) | function S(){R();if(X.length>0){setInterval(function(){for(var ad=0,ab=X...
  function T (line 22) | function T(af,ac){var ab=false,ae=true,ah=function(ai){if(ai.type=="read...
Condensed preview — 230 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,925K chars).
[
  {
    "path": "Debugging/.gitignore",
    "chars": 29,
    "preview": ".Rproj.user\n.Rhistory\n.RData\n"
  },
  {
    "path": "Debugging/README.md",
    "chars": 257,
    "preview": "# Shiny Debugging Talk\n\nThis repo contains an article, slide deck, and sample code for the Shiny Debugging talk given at"
  },
  {
    "path": "Debugging/shiny-breakpoints/server.R",
    "chars": 697,
    "preview": "#\n# This is the server logic of a Shiny web application. You can run the \n# application by clicking 'Run App' above.\n#\n#"
  },
  {
    "path": "Debugging/shiny-breakpoints/ui.R",
    "chars": 743,
    "preview": "#\n# This is the user-interface definition of a Shiny web application. You can\n# run the application by clicking 'Run App"
  },
  {
    "path": "Debugging/shiny-debug-doc.Rmd",
    "chars": 22497,
    "preview": "---\ntitle: \"Debugging Shiny Applications\"\noutput: \n  html_document: \n    highlight: textmate\n    toc: yes\n    toc_float:"
  },
  {
    "path": "Debugging/shiny-debugging.Rmd",
    "chars": 5640,
    "preview": "---\nauthor: \"Jonathan McPherson\"\ntitle: Debugging with Shiny\noutput: \n  ioslides_presentation:\n    css: shiny-slides.css"
  },
  {
    "path": "Debugging/shiny-debugging.html",
    "chars": 13967,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <title>Debugging with Shiny</title>\n\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"Conten"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/fonts/fonts.css",
    "chars": 689,
    "preview": "@font-face {\n  font-family: 'Open Sans';\n  font-style: normal;\n  font-weight: 400;\n  src: url(OpenSans.ttf) format('true"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/hammer.js",
    "chars": 17787,
    "preview": "/*\n * Hammer.JS\n * version 0.4\n * author: Eight Media\n * https://github.com/EightMedia/hammer.js\n */\nfunction Hammer(ele"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/modernizr.custom.45394.js",
    "chars": 13245,
    "preview": "/* Modernizr 2.5.3 (Custom Build) | MIT & BSD\n * Build: http://www.modernizr.com/download/#-fontface-backgroundsize-bord"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/order.js",
    "chars": 1472,
    "preview": "/*\n RequireJS order 1.0.5 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.\n Available via the MIT or ne"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/lang-r.js",
    "chars": 2391,
    "preview": "// Copyright (C) 2012 Jeffrey B. Arnold\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/lang-tex.js",
    "chars": 284,
    "preview": "PR.registerLangHandler(PR.createSimpleLexer([[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \\xa0\"],[\"com\",/^%[^\\n\\r]*/,null,\"%\"]]"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/lang-yaml.js",
    "chars": 412,
    "preview": "var a=null;\nPR.registerLangHandler(PR.createSimpleLexer([[\"pun\",/^[:>?|]+/,a,\":|>?\"],[\"dec\",/^%(?:YAML|TAG)[^\\n\\r#]+/,a,"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/prettify.css",
    "chars": 675,
    "preview": ".pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/prettify/prettify.js",
    "chars": 13632,
    "preview": "var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;\n(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/slide-controller.js",
    "chars": 3487,
    "preview": "(function(window) {\n\nvar ORIGIN_ = location.protocol + '//' + location.host;\n\n// check for local storage\nvar haveLocalSt"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/js/slide-deck.js",
    "chars": 22086,
    "preview": "/**\n * @authors Luke Mahe\n * @authors Eric Bidelman\n * @fileoverview TODO\n */\ndocument.cancelFullScreen = document.webki"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/theme/css/default.css",
    "chars": 37520,
    "preview": "@charset \"UTF-8\";\n/* line 17, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets"
  },
  {
    "path": "Debugging/shiny-debugging_files/ioslides-13.5.1/theme/css/phone.css",
    "chars": 173,
    "preview": "slides>slide{-webkit-transition:none !important;-webkit-transition:none !important;-moz-transition:none !important;-o-tr"
  },
  {
    "path": "Debugging/shiny-slides.css",
    "chars": 4790,
    "preview": "/* latin-ext */\n@font-face {\n  font-family: 'Source Code Pro';\n  font-style: normal;\n  font-weight: 400;\n  src: local('S"
  },
  {
    "path": "Gadgets/.gitignore",
    "chars": 29,
    "preview": ".Rproj.user\n.Rhistory\n.RData\n"
  },
  {
    "path": "Gadgets/brush.R",
    "chars": 832,
    "preview": "library(shiny)\nlibrary(miniUI)\nlibrary(ggplot2)\n\nggbrush <- function(data, xvar, yvar) {\n  ui <- miniPage(\n    gadgetTit"
  },
  {
    "path": "Gadgets/brush2.R",
    "chars": 1621,
    "preview": "library(shiny)\nlibrary(miniUI)\nlibrary(ggplot2)\n\npick_points <- function(data, x, y, name = deparse(substitute(data))) {"
  },
  {
    "path": "Gadgets/password.R",
    "chars": 409,
    "preview": "get_password <- function() {\n  ui <- miniPage(\n    gadgetTitleBar(\"Please enter your password\"),\n    miniContentPanel(\n "
  },
  {
    "path": "Modules/Demo/app.R",
    "chars": 9388,
    "preview": "# Exercise 2 - solution\n\nlibrary(shiny)\nlibrary(gapminder)\nlibrary(dplyr)\n\n# Note: This code creates data sets to use in"
  },
  {
    "path": "Modules/Demo/modularized/app.R",
    "chars": 1300,
    "preview": "# Exercise 2 - sol\n\nlibrary(shiny)\nlibrary(gapminder)\nlibrary(dplyr)\nsource(\"gapModule.R\")\n\n# Note: This code creates da"
  },
  {
    "path": "Modules/Demo/modularized/gapModule.R",
    "chars": 1502,
    "preview": "# Exercise 2 - solution\n\ngapModuleUI <- function(id) {\n  ns <- NS(id)\n  \n  tagList(\n    plotOutput(ns(\"plot\")),\n    slid"
  },
  {
    "path": "Modules/Exercise-1/app.R",
    "chars": 1613,
    "preview": "# Exercise 1\n\nlibrary(shiny)\nlibrary(gapminder)\nlibrary(dplyr)\n\nui <- fluidPage(\n  tags$style(type=\"text/css\", \"plot.rec"
  },
  {
    "path": "Modules/Exercise-1/solution/app.R",
    "chars": 266,
    "preview": "# Exercise 1 - solution\n\nlibrary(shiny)\nlibrary(gapminder)\nlibrary(dplyr)\nsource(\"gapModule.R\")\n\nui <- fluidPage(\n  gapM"
  },
  {
    "path": "Modules/Exercise-1/solution/gapModule.R",
    "chars": 1526,
    "preview": "# Exercise 1 - solution\n\ngapModuleUI <- function(id) {\n  ns <- NS(id)\n  \n  tagList(\n    plotOutput(ns(\"plot\")),\n    slid"
  },
  {
    "path": "Modules/Exercise-1/solution*/app.R",
    "chars": 1748,
    "preview": "# Exercise 1 - solution\n\nlibrary(shiny)\nlibrary(gapminder)\nlibrary(dplyr)\n\ngapModuleUI <- function(id) {\n  ns <- NS(id)\n"
  },
  {
    "path": "Modules/Exercise-2/app.R",
    "chars": 2127,
    "preview": "# Exercise 2\n#\n# 1. Open the gapModule.R file. Arrange for gapModule() to take a \n#    data set in its arguments\n#\n# 2. "
  },
  {
    "path": "Modules/Exercise-2/gapModule.R",
    "chars": 1646,
    "preview": "# Exercise 2\n#\n# Adapt gapModule() to: \n# 1. take a data set as one of its arguments\n# 2. to use the data set instead of"
  },
  {
    "path": "Modules/Exercise-2/solution/app.R",
    "chars": 1305,
    "preview": "# Exercise 2 - solution\n\nlibrary(shiny)\nlibrary(gapminder)\nlibrary(dplyr)\nsource(\"gapModule.R\")\n\n# Note: This code creat"
  },
  {
    "path": "Modules/Exercise-2/solution/gapModule.R",
    "chars": 1502,
    "preview": "# Exercise 2 - solution\n\ngapModuleUI <- function(id) {\n  ns <- NS(id)\n  \n  tagList(\n    plotOutput(ns(\"plot\")),\n    slid"
  },
  {
    "path": "Modules/Exercise-2/solution*/app.R",
    "chars": 2765,
    "preview": "# Exercise 2 - solution\n\nlibrary(shiny)\nlibrary(gapminder)\nlibrary(dplyr)\n\ngapModuleUI <- function(id) {\n  ns <- NS(id)\n"
  },
  {
    "path": "Modules/Exercise-3/app.R",
    "chars": 691,
    "preview": "# Exercise 3\n#\n# 1. Open uploadModule.R. Finish updloadModuleInput() and uploadModule() \n# so that each returns an objec"
  },
  {
    "path": "Modules/Exercise-3/solution/app.R",
    "chars": 399,
    "preview": "# Exercise 3 - solution\n\nlibrary(shiny)\nsource(\"uploadModule.R\")\n\nui <- fluidPage(\n  sidebarLayout(\n    sidebarPanel(\n  "
  },
  {
    "path": "Modules/Exercise-3/solution/storms.csv",
    "chars": 161148,
    "preview": "\"name\",\"year\",\"month\",\"day\",\"hour\",\"lat\",\"long\",\"pressure\",\"wind\",\"type\",\"seasday\"\n\"Allison\",1995,6,3,0,17.4,-84.3,1005,"
  },
  {
    "path": "Modules/Exercise-3/solution/uploadModule.R",
    "chars": 687,
    "preview": "# Exercise 3 - solution\n\nuploadModuleInput <- function(id) {\n  ns <- NS(id)\n\n  tagList(\n    fileInput(ns(\"file\"), \"Selec"
  },
  {
    "path": "Modules/Exercise-3/solution*/app.R",
    "chars": 1022,
    "preview": "# Exercise 3 - Solution\n\nuploadModuleInput <- function(id) {\n  ns <- NS(id)\n\n  tagList(\n    fileInput(ns(\"file\"), \"Selec"
  },
  {
    "path": "Modules/Exercise-3/storms.csv",
    "chars": 161148,
    "preview": "\"name\",\"year\",\"month\",\"day\",\"hour\",\"lat\",\"long\",\"pressure\",\"wind\",\"type\",\"seasday\"\n\"Allison\",1995,6,3,0,17.4,-84.3,1005,"
  },
  {
    "path": "Modules/Exercise-3/uploadModule.R",
    "chars": 874,
    "preview": "# Exercise 3\n#\n# 1. Arrange for uploadModuleInput() to return its output objects \n#    in the correct format for a modul"
  },
  {
    "path": "Modules/Exercise-4/app.R",
    "chars": 754,
    "preview": "# Exercise 4 \n#\n# 1. Open downloadModule.R and finish the downloadModule() function\n#\n# 2. Finish the call to callModule"
  },
  {
    "path": "Modules/Exercise-4/downloadModule.R",
    "chars": 876,
    "preview": "# Exercise 4\n#\n# 1. Add two arguments to downloadModule() to collect \n#    the values of datafile and input$row.names\n# "
  },
  {
    "path": "Modules/Exercise-4/solution/app.R",
    "chars": 619,
    "preview": "# Exercise 4 - solution\n\nlibrary(shiny)\nsource(\"uploadModule.R\")\nsource(\"downloadModule.R\")\n\nui <- fluidPage(\n  sidebarL"
  },
  {
    "path": "Modules/Exercise-4/solution/downloadModule.R",
    "chars": 499,
    "preview": "# Exercise 4 - solution\n\ndownloadModuleInput <- function(id) {\n  ns <- NS(id)\n\n  tagList(\n    textInput(ns(\"filename\"), "
  },
  {
    "path": "Modules/Exercise-4/solution/storms.csv",
    "chars": 161148,
    "preview": "\"name\",\"year\",\"month\",\"day\",\"hour\",\"lat\",\"long\",\"pressure\",\"wind\",\"type\",\"seasday\"\n\"Allison\",1995,6,3,0,17.4,-84.3,1005,"
  },
  {
    "path": "Modules/Exercise-4/solution/uploadModule.R",
    "chars": 687,
    "preview": "# Exercise 4 - solution\n\nuploadModuleInput <- function(id) {\n  ns <- NS(id)\n\n  tagList(\n    fileInput(ns(\"file\"), \"Selec"
  },
  {
    "path": "Modules/Exercise-4/solution*/app.R",
    "chars": 1707,
    "preview": "# Exercise 4 - solution\n\nlibrary(shiny)\n\nuploadModuleInput <- function(id) {\n  ns <- NS(id)\n\n  tagList(\n    fileInput(ns"
  },
  {
    "path": "Modules/Exercise-4/storms.csv",
    "chars": 161148,
    "preview": "\"name\",\"year\",\"month\",\"day\",\"hour\",\"lat\",\"long\",\"pressure\",\"wind\",\"type\",\"seasday\"\n\"Allison\",1995,6,3,0,17.4,-84.3,1005,"
  },
  {
    "path": "Modules/Exercise-4/uploadModule.R",
    "chars": 727,
    "preview": "# Exercise 4\n# \n# You do not need to do anything with this file\n\nuploadModuleInput <- function(id) {\n  ns <- NS(id)\n\n  t"
  },
  {
    "path": "Modules/solution-1.Rmd",
    "chars": 1950,
    "preview": "---\ntitle: Solution 1\nsubtitle: gapMinder module\nruntime: shiny\noutput: \n  html_document:\n    theme: cosmo\n    toc_float"
  },
  {
    "path": "Modules/solution-2.Rmd",
    "chars": 2988,
    "preview": "---\ntitle: Solution 2\nsubtitle: gapMinder app\nruntime: shiny\noutput: \n  html_document:\n    theme: cosmo\n    toc_float: T"
  },
  {
    "path": "Modules/solution-3.Rmd",
    "chars": 1229,
    "preview": "---\ntitle: Solution 3\nsubtitle: Data upload app\nruntime: shiny\noutput: \n  html_document:\n    theme: cosmo\n---\n\n```{r set"
  },
  {
    "path": "Modules/solution-4.Rmd",
    "chars": 1927,
    "preview": "---\ntitle: Solution 4\nsubtitle: Data upload and download app\nruntime: shiny\noutput: \n  html_document:\n    theme: cosmo\n-"
  },
  {
    "path": "Modules/warm-up-1.Rmd",
    "chars": 3705,
    "preview": "---\ntitle: Warm Up 1\nsubtitle: Functions in Shiny Apps\noutput: \n  html_document:\n    theme: cosmo\n---\n\n```{r setup, incl"
  },
  {
    "path": "Modules/warm-up-1.html",
    "chars": 863269,
    "preview": "<!DOCTYPE html>\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\n<head>\n\n<meta charset=\"utf-8\">\n<meta http-equiv=\"Content-T"
  },
  {
    "path": "Modules/warm-up-2.Rmd",
    "chars": 7547,
    "preview": "---\ntitle: Warm Up 2\nsubtitle: Communicating between functions\noutput: \n  html_document:\n    theme: cosmo\n---\n\n```{r set"
  },
  {
    "path": "Modules/warm-up-2.html",
    "chars": 868233,
    "preview": "<!DOCTYPE html>\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\n<head>\n\n<meta charset=\"utf-8\">\n<meta http-equiv=\"Content-T"
  },
  {
    "path": "Modules/warm-ups.R",
    "chars": 1577,
    "preview": "# 1\nslider <- function() {\n  sliderInput(\"slider\", \"Slide Me\", 0, 100, 1)\n}\n\nui <- fluidPage(\n  slider(),\n  textOutput(\""
  },
  {
    "path": "Profiling/profiling-examples.Rmd",
    "chars": 296,
    "preview": "---\ntitle: \"Profiling Shiny apps\"\noutput: html_document\n---\n\n```{r setup, include=FALSE}\nknitr::opts_chunk$set(echo = TR"
  },
  {
    "path": "Profiling/profiling-examples.html",
    "chars": 1336328,
    "preview": "<!DOCTYPE html>\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\n<head>\n\n<meta charset=\"utf-8\">\n<meta http-equiv=\"Content-T"
  },
  {
    "path": "README.md",
    "chars": 122,
    "preview": "# ShinyDeveloperConference\nMaterials collected from the First Shiny Developer Conference Palo Alto, CA January 30-31 201"
  },
  {
    "path": "Reactivity/.gitignore",
    "chars": 29,
    "preview": ".Rproj.user\n.Rhistory\n.RData\n"
  },
  {
    "path": "Reactivity/Exercise_00.R",
    "chars": 381,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Exercise_01.R",
    "chars": 605,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Exercise_02.R",
    "chars": 1352,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  sidebarLayout(\n    sidebarPanel(\n      selectInput(\"xcol\", \"X variable\", names(iris))"
  },
  {
    "path": "Reactivity/Exercise_03.R",
    "chars": 642,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Exercise_04.R",
    "chars": 541,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app 4\"),\n  sidebarLayout(\n    sidebarPanel(\n      actionButton(\"rnorm\", \""
  },
  {
    "path": "Reactivity/Exercise_05.R",
    "chars": 1502,
    "preview": "library(shiny)\n\nui <- fillPage(\n  plotOutput(\"plot\", click = \"click\", height = \"100%\")\n)\n\n# Assignment: This app doesn't"
  },
  {
    "path": "Reactivity/Exercise_07.R",
    "chars": 749,
    "preview": "library(shiny)\n\ndedupe <- function(r) {\n  # Assignment: Implement this function. The parameter is\n  # a reactive express"
  },
  {
    "path": "Reactivity/Solution_00.R",
    "chars": 337,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Solution_01.R",
    "chars": 450,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Solution_02.R",
    "chars": 1222,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  sidebarLayout(\n    sidebarPanel(\n      selectInput(\"xcol\", \"X variable\", names(iris))"
  },
  {
    "path": "Reactivity/Solution_03.R",
    "chars": 640,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Solution_04.R",
    "chars": 522,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app 4\"),\n  sidebarLayout(\n    sidebarPanel(\n      actionButton(\"rnorm\", \""
  },
  {
    "path": "Reactivity/Solution_05a.R",
    "chars": 799,
    "preview": "library(shiny)\n\nui <- fillPage(\n  plotOutput(\"plot\", click = \"click\", height = \"100%\")\n)\n\nserver <- function(input, outp"
  },
  {
    "path": "Reactivity/Solution_05b.R",
    "chars": 734,
    "preview": "library(shiny)\n\nui <- fillPage(\n  plotOutput(\"plot\", click = \"click\", height = \"100%\")\n)\n\nserver <- function(input, outp"
  },
  {
    "path": "Reactivity/Solution_07a.R",
    "chars": 851,
    "preview": "library(shiny)\n\n# Simple version. Works, unless the `r` reactive can error.\ndedupe <- function(r) {\n  rv <- reactiveValu"
  },
  {
    "path": "Reactivity/Solution_07b.R",
    "chars": 685,
    "preview": "library(shiny)\n\n# Simple version. Works, unless the `r` reactive can error.\ndedupe <- function(r) {\n  rv <- reactiveValu"
  },
  {
    "path": "Reactivity/Unsolution_00.R",
    "chars": 378,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Unsolution_01.R",
    "chars": 500,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Unsolution_01b.R",
    "chars": 529,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  h1(\"Example app\"),\n  sidebarLayout(\n    sidebarPanel(\n      numericInput(\"nrows\", \"Nu"
  },
  {
    "path": "Reactivity/Unsolution_02.R",
    "chars": 1372,
    "preview": "library(shiny)\n\nui <- fluidPage(\n  sidebarLayout(\n    sidebarPanel(\n      selectInput(\"xcol\", \"X variable\", names(iris))"
  },
  {
    "path": "Reactivity/slides.Rmd",
    "chars": 22705,
    "preview": "---\ntitle: \"Principles of Reactivity\"\nauthor: \"Joe Cheng [&lt;joe@rstudio.com&gt;](mailto:joe@rstudio.com)\"\ndate: \"\\\\#Sh"
  },
  {
    "path": "Reactivity/slides.css",
    "chars": 294,
    "preview": ".reveal .sourceCode.r .kw, .sourceCode.r .er {\n  color:inherit;\n  font-weight: normal;\n}\n.reveal .sourceCode.r .co {\n  f"
  },
  {
    "path": "Reactivity/slides.html",
    "chars": 542770,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"generator\" content=\"pandoc\">\n  <meta name=\"author\" "
  },
  {
    "path": "UI/Understanding-UI.Rmd",
    "chars": 8347,
    "preview": "---\ntitle: Understanding UI\nsubtitle: How to use Shiny Modules\nruntime: shiny\noutput: \n  html_document:\n    theme: cosmo"
  },
  {
    "path": "UI/index-demo/server.R",
    "chars": 1176,
    "preview": "library(shiny)\n\n# Define server logic for random distribution application\nshinyServer(function(input, output) {\n\n  # Rea"
  },
  {
    "path": "UI/index-demo/www/index.html",
    "chars": 887,
    "preview": "<html>\n\n<head>\n  <script src=\"shared/jquery.js\" type=\"text/javascript\"></script>\n  <script src=\"shared/shiny.js\" type=\"t"
  },
  {
    "path": "UI/scorecard-app/.gitignore",
    "chars": 36,
    "preview": "CollegeScorecard.sqlite\n.Rproj.user\n"
  },
  {
    "path": "UI/scorecard-app/README.md",
    "chars": 1242,
    "preview": "# Shiny demo app: College Scorecard\n\nThis app is an example of Shiny's [HTML templates](http://shiny.rstudio.com/article"
  },
  {
    "path": "UI/scorecard-app/flickr_api.R",
    "chars": 1147,
    "preview": "library(httr)\n\n# Please don't copy my API key. Get your own here, it's fast and free:\n# https://www.flickr.com/services/"
  },
  {
    "path": "UI/scorecard-app/scorecard-app.Rproj",
    "chars": 205,
    "preview": "Version: 1.0\n\nRestoreWorkspace: Default\nSaveWorkspace: Default\nAlwaysSaveHistory: Default\n\nEnableCodeIndexing: Yes\nUseSp"
  },
  {
    "path": "UI/scorecard-app/server.R",
    "chars": 9291,
    "preview": "library(dplyr)\nlibrary(RSQLite)\nlibrary(leaflet)\nlibrary(ggplot2)\nlibrary(showtext)\nlibrary(Cairo)\nlibrary(RCurl) # need"
  },
  {
    "path": "UI/scorecard-app/ui.R",
    "chars": 69,
    "preview": "library(leaflet)\n\nfunction(req) {\n  htmlTemplate(\"www/index.html\")\n}\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/all.scss",
    "chars": 818,
    "preview": "// Vendor -------------- //\n\n@import 'lib/bourbon/bourbon';\n@import 'lib/neat/neat';\n@import 'lib/normalize';\n\n\n// Core "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/components/_accordions.scss",
    "chars": 1716,
    "preview": "// Variables\n\n$accordion-border: 3px solid $color-gray-lightest;\n\n// Accordion Styles\n\n.usa-accordion,\n.usa-accordion-bo"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/components/_alerts.scss",
    "chars": 1528,
    "preview": ".usa-alert {\n  @include media($medium-screen) {\n    background-size: 5.2rem;\n  }\n  background-color: $color-gray-lightes"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/components/_disclaimer.scss",
    "chars": 491,
    "preview": ".usa-disclaimer {\n  @include media($small-screen) {\n    font-size: $h5-font-size;\n  }\n  background-color: $color-gray-li"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/components/_footer.scss",
    "chars": 4627,
    "preview": ".usa-footer {\n  .usa-unstyled-list {\n    display: block;\n  }\n\n  .usa-footer-primary-link {\n    @include media($medium-sc"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/components/_forms.scss",
    "chars": 2577,
    "preview": "$usa-form-width: 32rem;\n\nform {\n  @include media($medium-screen) {\n    max-width: $usa-form-width;\n  }\n\n  a {\n    border"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/components/_search.scss",
    "chars": 1933,
    "preview": "$usa-btn-small-width:   4.5rem;\n$usa-btn-medium-width:  8.5rem;\n$usa-btn-big-width:     11.6rem;\n\n@mixin search-icon {\n "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/components/_sidenav.scss",
    "chars": 1168,
    "preview": ".usa-sidenav-list {\n  @include unstyled-list();\n\n  li {\n    border-top: 1px solid $color-gray;\n    font-size: $h4-font-s"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/components/_skipnav.scss",
    "chars": 418,
    "preview": ".skipnav {\n  @include transition(all .2s ease-in-out);\n  background: transparent;\n  color: $color-base;\n  left: 0;\n  pad"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/core/_base.scss",
    "chars": 343,
    "preview": "/* apply a natural box layout model to all elements, but allowing components to change */\n\nhtml {\n  box-sizing: border-b"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/core/_defaults.scss",
    "chars": 3860,
    "preview": "// Starter Kit Defaults\n// Do not modify.\n// These variables can be modified in _variables.scss\n\n// Typography\n$em-base:"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/core/_grid-settings.scss",
    "chars": 318,
    "preview": "// Add custom grid settings here (i.e. gutters, columns, etc)\n\n// Mobile First Breakpoints\n$small-screen:  481px;\n$mediu"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/core/_grid.scss",
    "chars": 2151,
    "preview": ".usa-grid,\n.usa-grid-full {\n  @include outer-container();\n  max-width: $site-max-width;\n\n  @include media($medium) {\n   "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/core/_utilities.scss",
    "chars": 1492,
    "preview": "// Mobile-first media query helper\n@mixin media($bp) {\n  @media screen and (min-width: #{$bp}) {\n    @content;\n  }\n}\n\n//"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/core/_variables.scss",
    "chars": 3146,
    "preview": "// Typography\n$em-base:             10px;\n$base-font-size:      rem(17px);\n$small-font-size:     rem(14px);\n$lead-font-s"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/elements/_buttons.scss",
    "chars": 3534,
    "preview": "// Buttons variables\n\n$button-stroke: inset 0 0 0 2px;\n\n// Buttons\n\n.usa-button,\n.usa-button-primary,\n.usa-button:visite"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/elements/_figure.scss",
    "chars": 368,
    "preview": "img {\n  max-width: 100%;\n}\n\n// TODO: Add documentation instructions for using this class on image links\n.media_link {\n  "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/elements/_inputs.scss",
    "chars": 6117,
    "preview": "// Block form elements\ninput,\ninput[type=\"text\"],\ninput[type=\"email\"],\ninput[type=\"password\"],\ninput[type=\"url\"],\ninput["
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/elements/_labels.scss",
    "chars": 621,
    "preview": ".usa-label {\n  background-color: $color-primary;\n  border-radius: $border-radius;\n  color: $color-white;\n  font-size: $h"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/elements/_list.scss",
    "chars": 976,
    "preview": "ul, ol {\n  margin: {\n    top: 2em;\n    bottom: 2em;\n  }\n\n  li {\n    line-height: $base-line-height;\n    margin: {\n      "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/elements/_table.scss",
    "chars": 458,
    "preview": "table {\n  border-spacing: 0;\n  margin: 2em 0;\n  min-width: 100%;\n\n  thead {\n    tr {\n      background-color: $color-gray"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/elements/_typography.scss",
    "chars": 2637,
    "preview": "html {\n  font-family: $font-sans;\n  font-size: $em-base;\n}\n\nbody {\n  font-size: $base-font-size;\n}\n\np {\n  line-height: $"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/_normalize.scss",
    "chars": 7797,
    "preview": "/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Pre"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/_bourbon-deprecated-upcoming.scss",
    "chars": 14536,
    "preview": "// The following features have been deprecated and will be removed in the next MAJOR version release\n\n@mixin inline-bloc"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/_bourbon.scss",
    "chars": 2516,
    "preview": "// Bourbon 4.2.3\n// http://bourbon.io\n// Copyright 2011-2015 thoughtbot, inc.\n// MIT License\n\n@import \"settings/prefixer"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_border-color.scss",
    "chars": 649,
    "preview": "@charset \"UTF-8\";\n\n/// Provides a quick method for targeting `border-color` on specific sides of a box. Use a `null` val"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_border-radius.scss",
    "chars": 1071,
    "preview": "@charset \"UTF-8\";\n\n/// Provides a quick method for targeting `border-radius` on both corners on the side of a box.\n///\n/"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_border-style.scss",
    "chars": 600,
    "preview": "@charset \"UTF-8\";\n\n/// Provides a quick method for targeting `border-style` on specific sides of a box. Use a `null` val"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_border-width.scss",
    "chars": 592,
    "preview": "@charset \"UTF-8\";\n\n/// Provides a quick method for targeting `border-width` on specific sides of a box. Use a `null` val"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_buttons.scss",
    "chars": 1715,
    "preview": "@charset \"UTF-8\";\n\n/// Generates variables for all buttons. Please note that you must use interpolation on the variable:"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_clearfix.scss",
    "chars": 456,
    "preview": "@charset \"UTF-8\";\n\n/// Provides an easy way to include a clearfix for containing floats.\n///\n/// @link http://cssmojo.co"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_ellipsis.scss",
    "chars": 669,
    "preview": "@charset \"UTF-8\";\n\n/// Truncates text and adds an ellipsis to represent overflow.\n///\n/// @param {Number} $width [100%]\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_font-stacks.scss",
    "chars": 586,
    "preview": "@charset \"UTF-8\";\n\n/// Georgia font stack.\n///\n/// @type List\n\n$georgia: \"Georgia\", \"Cambria\", \"Times New Roman\", \"Times"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_hide-text.scss",
    "chars": 740,
    "preview": "/// Hides the text in an element, commonly used to show an image. Some elements will need block-level styles applied.\n//"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_margin.scss",
    "chars": 590,
    "preview": "@charset \"UTF-8\";\n\n/// Provides a quick method for targeting `margin` on specific sides of a box. Use a `null` value to "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_padding.scss",
    "chars": 594,
    "preview": "@charset \"UTF-8\";\n\n/// Provides a quick method for targeting `padding` on specific sides of a box. Use a `null` value to"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_position.scss",
    "chars": 1128,
    "preview": "@charset \"UTF-8\";\n\n/// Provides a quick method for setting an element’s position. Use a `null` value to “skip” a side.\n/"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_prefixer.scss",
    "chars": 1664,
    "preview": "@charset \"UTF-8\";\n\n/// A mixin for generating vendor prefixes on non-standardized properties.\n///\n/// @param {String} $p"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_retina-image.scss",
    "chars": 835,
    "preview": "@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pi"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_size.scss",
    "chars": 1108,
    "preview": "@charset \"UTF-8\";\n\n/// Sets the `width` and `height` of the element.\n///\n/// @param {List} $size\n///   A list of at most"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_text-inputs.scss",
    "chars": 3442,
    "preview": "@charset \"UTF-8\";\n\n/// Generates variables for all text-based inputs. Please note that you must use interpolation on the"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_timing-functions.scss",
    "chars": 1777,
    "preview": "@charset \"UTF-8\";\n\n/// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/e"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_triangle.scss",
    "chars": 2537,
    "preview": "@mixin triangle($size, $color, $direction) {\n  $width: nth($size, 1);\n  $height: nth($size, length($size));\n  $foregroun"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/addons/_word-wrap.scss",
    "chars": 597,
    "preview": "@charset \"UTF-8\";\n\n/// Provides an easy way to change the `word-wrap` property.\n///\n/// @param {String} $wrap [break-wor"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_animation.scss",
    "chars": 1500,
    "preview": "// http://www.w3.org/TR/css3-animations/#the-animation-name-property-\n// Each of these mixins support comma separated li"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_appearance.scss",
    "chars": 93,
    "preview": "@mixin appearance($value) {\n  @include prefixer(appearance, $value, webkit moz ms o spec);\n}\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_backface-visibility.scss",
    "chars": 112,
    "preview": "@mixin backface-visibility($visibility) {\n  @include prefixer(backface-visibility, $visibility, webkit spec);\n}\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_background-image.scss",
    "chars": 1332,
    "preview": "//************************************************************************//\n// Background-image property for adding mul"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_background.scss",
    "chars": 1778,
    "preview": "//************************************************************************//\n// Background property for adding multiple "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_border-image.scss",
    "chars": 1827,
    "preview": "@mixin border-image($borders...) {\n  $webkit-borders: ();\n  $spec-borders: ();\n\n  @each $border in $borders {\n    $webki"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_calc.scss",
    "chars": 109,
    "preview": "@mixin calc($property, $value) {\n  #{$property}: -webkit-calc(#{$value});\n  #{$property}: calc(#{$value});\n}\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_columns.scss",
    "chars": 1257,
    "preview": "@mixin columns($arg: auto) {\n  // <column-count> || <column-width>\n  @include prefixer(columns, $arg, webkit moz spec);\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_filter.scss",
    "chars": 138,
    "preview": "@mixin filter($function: none) {\n  // <filter-function> [<filter-function]* | none\n  @include prefixer(filter, $function"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_flex-box.scss",
    "chars": 7544,
    "preview": "// CSS3 Flexible Box Model and property defaults\n\n// Custom shorthand notation for flexbox\n@mixin box($orient: inline-ax"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_font-face.scss",
    "chars": 471,
    "preview": "@mixin font-face(\n  $font-family,\n  $file-path,\n  $weight: normal,\n  $style: normal,\n  $asset-pipeline: $asset-pipeline,"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_font-feature-settings.scss",
    "chars": 172,
    "preview": "@mixin font-feature-settings($settings...) {\n  @if length($settings) == 0 { $settings: none; }\n  @include prefixer(font-"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_hidpi-media-query.scss",
    "chars": 463,
    "preview": "// HiDPI mixin. Default value set to 1.3 to target Google Nexus 7 (http://bjango.com/articles/min-device-pixel-ratio/)\n@"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_hyphens.scss",
    "chars": 129,
    "preview": "@mixin hyphens($hyphenation: none) {\n  // none | manual | auto\n  @include prefixer(hyphens, $hyphenation, webkit moz ms "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_image-rendering.scss",
    "chars": 331,
    "preview": "@mixin image-rendering ($mode:auto) {\n\n  @if ($mode == crisp-edges) {\n    -ms-interpolation-mode: nearest-neighbor; // I"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_keyframes.scss",
    "chars": 1159,
    "preview": "// Adds keyframes blocks for supported prefixes, removing redundant prefixes in the block's content\n@mixin keyframes($na"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_linear-gradient.scss",
    "chars": 1308,
    "preview": "@mixin linear-gradient($pos, $g1, $g2: null,\n                       $g3: null, $g4: null,\n                       $g5: nu"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_perspective.scss",
    "chars": 231,
    "preview": "@mixin perspective($depth: none) {\n  // none | <length>\n  @include prefixer(perspective, $depth, webkit moz spec);\n}\n\n@m"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_placeholder.scss",
    "chars": 187,
    "preview": "@mixin placeholder {\n  $placeholders: \":-webkit-input\" \":-moz\" \"-moz\" \"-ms-input\";\n  @each $placeholder in $placeholders"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_radial-gradient.scss",
    "chars": 1407,
    "preview": "// Requires Sass 3.1+\n@mixin radial-gradient($g1, $g2,\n                       $g3: null, $g4: null,\n                    "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_selection.scss",
    "chars": 848,
    "preview": "@charset \"UTF-8\";\r\n\r\n/// Outputs the spec and prefixed versions of the `::selection` pseudo-element.\r\n///\r\n/// @param {B"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_text-decoration.scss",
    "chars": 616,
    "preview": "@mixin text-decoration($value) {\n// <text-decoration-line> || <text-decoration-style> || <text-decoration-color>\n  @incl"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_transform.scss",
    "chars": 501,
    "preview": "@mixin transform($property: none) {\n  // none | <transform-function>\n  @include prefixer(transform, $property, webkit mo"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_transition.scss",
    "chars": 2202,
    "preview": "// Shorthand mixin. Supports multiple parentheses-deliminated values for each variable.\n// Example: @include transition "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/css3/_user-select.scss",
    "chars": 99,
    "preview": "@mixin user-select($value: none) {\n  @include prefixer(user-select, $value, webkit moz ms spec);\n}\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_assign-inputs.scss",
    "chars": 243,
    "preview": "@function assign-inputs($inputs, $pseudo: null) {\n  $list: ();\n\n  @each $input in $inputs {\n    $input: unquote($input);"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_contains-falsy.scss",
    "chars": 305,
    "preview": "@charset \"UTF-8\";\n\n/// Checks if a list does not contains a value.\n///\n/// @access private\n///\n/// @param {List} $list\n/"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_contains.scss",
    "chars": 483,
    "preview": "@charset \"UTF-8\";\n\n/// Checks if a list contains a value(s).\n///\n/// @access private\n///\n/// @param {List} $list\n///   T"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_is-length.scss",
    "chars": 314,
    "preview": "@charset \"UTF-8\";\n\n/// Checks for a valid CSS length.\n///\n/// @param {String} $value\n\n@function is-length($value) {\n  @r"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_is-light.scss",
    "chars": 568,
    "preview": "@charset \"UTF-8\";\n\n/// Programatically determines whether a color is light or dark.\n///\n/// @link http://robots.thoughtb"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_is-number.scss",
    "chars": 240,
    "preview": "@charset \"UTF-8\";\n\n/// Checks for a valid number.\n///\n/// @param {Number} $value\n///\n/// @require {function} contains\n\n@"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_is-size.scss",
    "chars": 294,
    "preview": "@charset \"UTF-8\";\n\n/// Checks for a valid CSS size.\n///\n/// @param {String} $value\n///\n/// @require {function} contains\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_modular-scale.scss",
    "chars": 1605,
    "preview": "// Scaling Variables\n$golden:           1.618;\n$minor-second:     1.067;\n$major-second:     1.125;\n$minor-third:      1."
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_px-to-em.scss",
    "chars": 366,
    "preview": "// Convert pixels to ems\n// eg. for a relational value of 12px write em(12) when the parent is 16px\n// if the parent is "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_px-to-rem.scss",
    "chars": 336,
    "preview": "// Convert pixels to rems\n// eg. for a relational value of 12px write rem(12)\n// Assumes $em-base is the font-size of <h"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_shade.scss",
    "chars": 465,
    "preview": "@charset \"UTF-8\";\n\n/// Mixes a color with black.\n///\n/// @param {Color} $color\n///\n/// @param {Number (Percentage)} $per"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_strip-units.scss",
    "chars": 330,
    "preview": "@charset \"UTF-8\";\n\n/// Strips the unit from a number.\n///\n/// @param {Number (With Unit)} $value\n///\n/// @example scss -"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_tint.scss",
    "chars": 463,
    "preview": "@charset \"UTF-8\";\n\n/// Mixes a color with white.\n///\n/// @param {Color} $color\n///\n/// @param {Number (Percentage)} $per"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_transition-property-name.scss",
    "chars": 712,
    "preview": "// Return vendor-prefixed property names if appropriate\n// Example: transition-property-names((transform, color, backgro"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/functions/_unpack.scss",
    "chars": 729,
    "preview": "@charset \"UTF-8\";\n\n/// Converts shorthand to the 4-value syntax.\n///\n/// @param {List} $shorthand\n///\n/// @example scss "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_convert-units.scss",
    "chars": 812,
    "preview": "//************************************************************************//\n// Helper function for str-to-num fn.\n// So"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_directional-values.scss",
    "chars": 2699,
    "preview": "@charset \"UTF-8\";\n\n/// Directional-property mixins are shorthands for writing properties like the following\n///\n/// @ign"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_font-source-declaration.scss",
    "chars": 1047,
    "preview": "// Used for creating the source string for fonts using @font-face\n// Reference: http://goo.gl/Ru1bKP\n\n@function font-url"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_gradient-positions-parser.scss",
    "chars": 480,
    "preview": "@function _gradient-positions-parser($gradient-type, $gradient-positions) {\n  @if $gradient-positions\n  and ($gradient-t"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_linear-angle-parser.scss",
    "chars": 757,
    "preview": "// Private function for linear-gradient-parser\n@function _linear-angle-parser($image, $first-val, $prefix, $suffix) {\n  "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_linear-gradient-parser.scss",
    "chars": 1089,
    "preview": "@function _linear-gradient-parser($image) {\n  $image: unquote($image);\n  $gradients: ();\n  $start: str-index($image, \"(\""
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_linear-positions-parser.scss",
    "chars": 1993,
    "preview": "@function _linear-positions-parser($pos) {\n  $type: type-of(nth($pos, 1));\n  $spec: null;\n  $degree: null;\n  $side: null"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_linear-side-corner-parser.scss",
    "chars": 916,
    "preview": "// Private function for linear-gradient-parser\n@function _linear-side-corner-parser($image, $first-val, $prefix, $suffix"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_radial-arg-parser.scss",
    "chars": 1828,
    "preview": "@function _radial-arg-parser($g1, $g2, $pos, $shape-size) {\n  @each $value in $g1, $g2 {\n    $first-val: nth($value, 1);"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_radial-gradient-parser.scss",
    "chars": 1282,
    "preview": "@function _radial-gradient-parser($image) {\n  $image: unquote($image);\n  $gradients: ();\n  $start: str-index($image, \"(\""
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_radial-positions-parser.scss",
    "chars": 485,
    "preview": "@function _radial-positions-parser($gradient-pos) {\n  $shape-size: nth($gradient-pos, 1);\n  $pos:        nth($gradient-p"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_render-gradients.scss",
    "chars": 845,
    "preview": "// User for linear and radial gradients within background-image or border-image properties\n\n@function _render-gradients("
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_shape-size-stripper.scss",
    "chars": 274,
    "preview": "@function _shape-size-stripper($shape-size) {\n  $shape-size-spec: null;\n  @each $value in $shape-size {\n    @if ($value "
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/helpers/_str-to-num.scss",
    "chars": 1245,
    "preview": "//************************************************************************//\n// Helper function for linear/radial-gradie"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/settings/_asset-pipeline.scss",
    "chars": 179,
    "preview": "@charset \"UTF-8\";\n\n/// A global setting to enable or disable the `$asset-pipeline` variable for all functions that accep"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/settings/_prefixer.scss",
    "chars": 268,
    "preview": "@charset \"UTF-8\";\n\n/// Global variables to enable or disable vendor prefixes\n\n$prefix-for-webkit:    true !default;\n$pre"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/bourbon/settings/_px-to-em.scss",
    "chars": 25,
    "preview": "$em-base: 16px !default;\n"
  },
  {
    "path": "UI/scorecard-app/www/assets/_scss/lib/neat/_neat-helpers.scss",
    "chars": 185,
    "preview": "// Functions\n@import \"functions/private\";\n@import \"functions/new-breakpoint\";\n\n// Settings\n@import \"settings/grid\";\n@imp"
  }
]

// ... and 30 more files (download for full content)

About this extraction

This page contains the full source code of the rstudio/ShinyDeveloperConference GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 230 files (4.6 MB), approximately 1.2M tokens, and a symbol index with 71 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!