text:
package org.jfree.chart.renderer.xy;

import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.geom.Rectangle2D;

import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.entity.EntityCollection;
import org.jfree.chart.entity.XYItemEntity;
import org.jfree.chart.labels.XYToolTipGenerator;
import org.jfree.chart.plot.CrosshairState;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.PlotRenderingInfo;
import org.jfree.chart.plot.XYPlot;
import org.jfree.data.Range;
import org.jfree.data.general.DatasetUtilities;
import org.jfree.data.xy.IntervalXYDataset;
import org.jfree.data.xy.TableXYDataset;
import org.jfree.data.xy.XYDataset;
import org.jfree.ui.RectangleEdge;

/**
 * A bar renderer that displays the series items stacked.
 * The dataset used together with this renderer must be a
 * {@link org.jfree.data.xy.IntervalXYDataset} and a
 * {@link org.jfree.data.xy.TableXYDataset}. For example, the
 * dataset class {@link org.jfree.data.xy.CategoryTableXYDataset}
 * implements both interfaces.
 */
public class StackedXYBarRenderer extends XYBarRenderer {

    /** For serialization. */
    private static final long serialVersionUID = -7049101055533436444L;

    /**
     * Creates a new renderer.
     */
    public StackedXYBarRenderer() {
        super();
    }

    /**
     * Creates a new renderer.
     *
     * @param margin  the percentual amount of the bars that are cut away.
     */
    public StackedXYBarRenderer(double margin) {
        super(margin);
    }

    /**
     * Initialises the renderer and returns a state object that should be
     * passed to all subsequent calls to the drawItem() method. Here there is
     * nothing to do.
     *
     * @param g2  the graphics device.
     * @param dataArea  the area inside the axes.
     * @param plot  the plot.
     * @param data  the data.
     * @param info  an optional info collection object to return data back to
     *              the caller.
     *
     * @return A state object.
     */
    public XYItemRendererState initialise(Graphics2D g2,
                                          Rectangle2D dataArea,
                                          XYPlot plot,
                                          XYDataset data,
                                          PlotRenderingInfo info) {
        return new XYBarRendererState(info);
    }

    /**
     * Returns the range of values the renderer requires to display all the
     * items from the specified dataset.
     *
     * @param dataset  the dataset (null permitted).
     *
     * @return The range (null if the dataset is null
     *         or empty).
     */
    public Range findRangeBounds(XYDataset dataset) {
        if (dataset != null) {
            return DatasetUtilities.findStackedRangeBounds(
                    (TableXYDataset) dataset);
        }
        else {
            return null;
        }
    }

    /**
     * Draws the visual representation of a single data item.
     *
     * @param g2  the graphics device.
     * @param state  the renderer state.
     * @param dataArea  the area within which the plot is being drawn.
     * @param info  collects information about the drawing.
     * @param plot  the plot (can be used to obtain standard color information
     *              etc).
     * @param domainAxis  the domain axis.
     * @param rangeAxis  the range axis.
     * @param dataset  the dataset.
     * @param series  the series index (zero-based).
     * @param item  the item index (zero-based).
     * @param crosshairState  crosshair information for the plot
     *                        (null permitted).
     * @param pass  the pass index.
     */
    public void drawItem(Graphics2D g2,
                         XYItemRendererState state,
                         Rectangle2D dataArea,
                         PlotRenderingInfo info,
                         XYPlot plot,
                         ValueAxis domainAxis,
                         ValueAxis rangeAxis,
                         XYDataset dataset,
                         int series,
                         int item,
                         CrosshairState crosshairState,
                         int pass) {

        if (!(dataset instanceof IntervalXYDataset
                && dataset instanceof TableXYDataset)) {
            String message = "dataset (type " + dataset.getClass().getName()
                + ") has wrong type:";
            boolean and = false;
            if (!IntervalXYDataset.class.isAssignableFrom(dataset.getClass())) {
                message += " it is no IntervalXYDataset";
                and = true;
            }
            if (!TableXYDataset.class.isAssignableFrom(dataset.getClass())) {
                if (and) {
                    message += " and";
                }
                message += " it is no TableXYDataset";
            }

            throw new IllegalArgumentException(message);
        }

        IntervalXYDataset intervalDataset = (IntervalXYDataset) dataset;
        double value = intervalDataset.getYValue(series, item);
        if (Double.isNaN(value)) {
            return;
        }

        double positiveBase = 0.0;
        double negativeBase = 0.0;

        for (int i = 0; i < series; i++) {
            double v = dataset.getYValue(i, item);
            if (!Double.isNaN(v)) {
                if (v > 0) {
                    positiveBase = positiveBase + v;
                }
                else {
                    negativeBase = negativeBase + v;
                }
            }
        }

        double translatedBase;
        double translatedValue;
        RectangleEdge edgeR = plot.getRangeAxisEdge();
        if (value > 0.0) {
            translatedBase = rangeAxis.valueToJava2D(positiveBase, dataArea,
                    edgeR);
            translatedValue = rangeAxis.valueToJava2D(positiveBase + value,
                    dataArea, edgeR);
        }
        else {
            translatedBase = rangeAxis.valueToJava2D(negativeBase, dataArea,
                    edgeR);
            translatedValue = rangeAxis.valueToJava2D(negativeBase + value,
                    dataArea, edgeR);
        }

        RectangleEdge edgeD = plot.getDomainAxisEdge();
        double startX = intervalDataset.getStartXValue(series, item);
        if (Double.isNaN(startX)) {
            return;
        }
        double translatedStartX = domainAxis.valueToJava2D(startX, dataArea,
                edgeD);

        double endX = intervalDataset.getEndXValue(series, item);
        if (Double.isNaN(endX)) {
            return;
        }
        double translatedEndX = domainAxis.valueToJava2D(endX, dataArea, edgeD);

        double translatedWidth = Math.max(1, Math.abs(translatedEndX
                - translatedStartX));
        double translatedHeight = Math.abs(translatedValue - translatedBase);
        if (getMargin() > 0.0) {
            double cut = translatedWidth * getMargin();
            translatedWidth = translatedWidth - cut;
            translatedStartX = translatedStartX + cut / 2;
        }

        Rectangle2D bar = null;
        PlotOrientation orientation = plot.getOrientation();
        if (orientation == PlotOrientation.HORIZONTAL) {
            bar = new Rectangle2D.Double(Math.min(translatedBase,
                    translatedValue), translatedEndX, translatedHeight,
                    translatedWidth);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            bar = new Rectangle2D.Double(translatedStartX,
                    Math.min(translatedBase, translatedValue),
                    translatedWidth, translatedHeight);
        }

        Paint itemPaint = getItemPaint(series, item);
        if (getGradientPaintTransformer()
                != null && itemPaint instanceof GradientPaint) {
            GradientPaint gp = (GradientPaint) itemPaint;
            itemPaint = getGradientPaintTransformer().transform(gp, bar);
        }
        g2.setPaint(itemPaint);
        g2.fill(bar);
        if (isDrawBarOutline()
                && Math.abs(translatedEndX - translatedStartX) > 3) {
            g2.setStroke(getItemStroke(series, item));
            g2.setPaint(getItemOutlinePaint(series, item));
            g2.draw(bar);
        }

        // add an entity for the item...
        if (info != null) {
            EntityCollection entities = info.getOwner().getEntityCollection();
            if (entities != null) {
                String tip = null;
                XYToolTipGenerator generator
                    = getToolTipGenerator(series, item);
                if (generator != null) {
                    tip = generator.generateToolTip(dataset, series, item);
                }
                String url = null;
                if (getURLGenerator() != null) {
                    url = getURLGenerator().generateURL(dataset, series, item);
                }
                XYItemEntity entity = new XYItemEntity(bar, dataset, series,
                        item, tip, url);
                entities.add(entity);
            }
        }
    }

}


text:
<?php

class Google_Service_Clouderrorreporting_ErrorGroup extends Google_Collection
{
  protected $collection_key = 'trackingIssues';
  public $groupId;
  public $name;
  public $resolutionStatus;
  protected $trackingIssuesType = 'Google_Service_Clouderrorreporting_TrackingIssue';
  protected $trackingIssuesDataType = 'array';

  public function setGroupId($groupId)
  {
    $this->groupId = $groupId;
  }
  public function getGroupId()
  {
    return $this->groupId;
  }
  public function setName($name)
  {
    $this->name = $name;
  }
  public function getName()
  {
    return $this->name;
  }
  public function setResolutionStatus($resolutionStatus)
  {
    $this->resolutionStatus = $resolutionStatus;
  }
  public function getResolutionStatus()
  {
    return $this->resolutionStatus;
  }
  /**
   * @param Google_Service_Clouderrorreporting_TrackingIssue[]
   */
  public function setTrackingIssues($trackingIssues)
  {
    $this->trackingIssues = $trackingIssues;
  }
  /**
   * @return Google_Service_Clouderrorreporting_TrackingIssue[]
   */
  public function getTrackingIssues()
  {
    return $this->trackingIssues;
  }
}

redpajama_set_name: RedPajamaGithub


text:
title: OnClientRecurrenceExceptionCreating
page_title: OnClientRecurrenceExceptionCreating | RadScheduler for ASP.NET AJAX Documentation
description: OnClientRecurrenceExceptionCreating
slug: scheduler/client-side-programming/events/onclientrecurrenceexceptioncreating
tags: onclientrecurrenceexceptioncreating
published: True
position: 30
---

# OnClientRecurrenceExceptionCreating

##

If specified, the **OnClientRecurrenceExceptionCreating** client-side event handler is called when arecurrence exception is about to be created via Web Service call. In the case of server-side binding, the event will not be raised.

Two parameters are passed to the handler:

* **sender** - the scheduler client object;

* **eventArgs** with two properties:

	* **get_appointment()** -the appointment that represents the recurrence exception that is about to be stored.

	* **set_cancel()** - set to true cancel the operation.

This event can be cancelled.


text:
<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="/resources/favicon.gif">
    <meta name="fragment" content="!">
    <title>Despre Opentrans SRL| Constructii drumuri autostrazi | Constructii civile industriale | Instalatii complexe</title>

    <meta name="description" content="OpenTrans Cluj Napoca
           Inchiriere utilaje, Amenajari exterioare, Productie livrare beton, exectutie drumuri si poduri, Amenajari exterioare, Lucrari de instaltii, Constructii civile, industriale si agricole
                    Autobetoniere,
                    Autopompe,
                    Pompe stationare,
                    Autoutilitare,
                    Utilaje dezapezire,
                    Excavatoare,
                    Buldoexcavatoare,
                    Buldozere,
                    Gredere,
                    Incarcatoare frontale,
                    Platforme ridicatoare,
                    Macarale,
                    Cilindri compactori,
                    Stivuitoare,
                    Foreze,
                    Finisoare asfalt,
                    Freze asfalt,
                    Reciclatoare asfalt,
                    Repartizoare agregate,
                    Statii de sortare,
                    Concasoare piatra,
                    Compresoare," />

    <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="node_modules/bootswatch/slate/bootstrap.min.css" />

    <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <link rel="stylesheet" href="styles/global.css" />


text:
package org.springframework.social.google.api.calendar;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.MediaType.APPLICATION_JSON;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;

import java.util.List;
import java.util.Map;

import org.junit.Test;
import org.springframework.social.google.api.AbstractGoogleApiTest;
import org.springframework.social.google.api.calendar.Event.Attendee;
import org.springframework.social.google.api.calendar.Event.Creator;
import org.springframework.social.google.api.calendar.Event.DateTimeTimezone;
import org.springframework.social.google.api.calendar.Event.ExtendedProperties;
import org.springframework.social.google.api.calendar.Event.Gadget;
import org.springframework.social.google.api.calendar.Event.Organizer;
import org.springframework.social.google.api.calendar.Event.ReminderOverride;
import org.springframework.social.google.api.calendar.Event.Reminders;
import org.springframework.social.google.api.calendar.Event.Source;

/**
 * Tests to verify that the JSON responses are correctly parsed for each of the requests.
 * @author Martin Wink
 */
public class CalendarTemplate_EventJsonTests extends AbstractGoogleApiTest {

  @Test
  public void listEvents() {

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"1415499182398000\"", eventPage.getEtag());
  }

  @Test
  public void listEvents_missing() {

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_missing"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNull(eventPage.getItems());
  }

  @Test
  public void listEvents_empty() {

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_empty"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNotNull(eventPage.getItems());
    assertEquals(0, eventPage.getItems().size());
  }

  @Test
  public void listEvents_values_1() {
// Fully populate the JSON first.

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_values_1"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNotNull(eventPage.getItems());
    assertEquals(1, eventPage.getItems().size());

    final Event event = eventPage.getItems().get(0);
    assertNotNull(event);
    assertEquals("\"etag1\"", event.getEtag());

    assertEquals("string1", event.getId());
    assertEquals(EventStatus.CONFIRMED, event.getStatus());
    assertEquals("string3", event.getHtmlLink());
    assertEquals(DateUtils.makeDate(2000, 1, 1), event.getCreated());
    assertEquals(DateUtils.makeDate(2000, 1, 1), event.getUpdated());

    assertEquals("string4", event.getSummary());
    assertEquals("string5", event.getDescription());
    assertEquals("string6", event.getLocation());
    assertEquals("string7", event.getColorId());
    assertEquals("string17", event.getRecurringEventId());
    assertEquals(Transparency.OPAQUE, event.getTransparency());
    assertEquals(Visibility.DEFAULT, event.getVisibility());
    assertEquals("string21", event.getiCalUid());
    assertEquals(1, event.getSequence().intValue());
    assertEquals("string29", event.getHangoutLink());

    assertEquals(true, event.isEndTimeUnspecified());
    assertEquals(true, event.isAttendeesOmitted());
    assertEquals(true, event.isAnyoneCanAddSelf());
    assertEquals(true, event.isGuestsCanInviteOthers());
    assertEquals(true, event.isGuestsCanModify());
    assertEquals(true, event.isGuestsCanSeeOtherGuests());
    assertEquals(true, event.isPrivateCopy());
    assertEquals(true, event.isLocked());

    {
      final Creator creator = event.getCreator();
      assertNotNull(creator);
      assertEquals("string8", creator.getId());
      assertEquals("string9", creator.getEmail());
      assertEquals("string10", creator.getDisplayName());
      assertEquals(true, creator.isSelf());
    }

    {
      final Organizer organizer = event.getOrganizer();
      assertNotNull(organizer);
      assertEquals("string11", organizer.getId());
      assertEquals("string12", organizer.getEmail());
      assertEquals("string13", organizer.getDisplayName());
      assertEquals(true, organizer.isSelf());
    }

    {
      final DateTimeTimezone dtz = event.getStart();
      assertNotNull(dtz);
      assertEquals(DateUtils.makeDate(2000, 1, 1), dtz.getDate());
      assertEquals(DateUtils.makeDate(2000, 1, 1), dtz.getDateTime());
      assertEquals(DateUtils.TEST_TIMEZONE, dtz.getTimeZone());
    }

    {
      final DateTimeTimezone dtz = event.getEnd();
      assertNotNull(dtz);
      assertEquals(DateUtils.makeDate(2000, 1, 1), dtz.getDate());
      assertEquals(DateUtils.makeDate(2000, 1, 1), dtz.getDateTime());
      assertEquals(DateUtils.TEST_TIMEZONE, dtz.getTimeZone());
    }

    {
      final List<String> recurrence = event.getRecurrence();
      assertNotNull(recurrence);
      assertEquals(1, recurrence.size());
      assertEquals("string16", recurrence.get(0));
    }

    {
      final DateTimeTimezone dtz = event.getOriginalStartTime();
      assertNotNull(dtz);
      assertEquals(DateUtils.makeDate(2000, 1, 1), dtz.getDate());
      assertEquals(DateUtils.makeDate(2000, 1, 1), dtz.getDateTime());
      assertEquals(DateUtils.TEST_TIMEZONE, dtz.getTimeZone());
    }

    {
      final List<Attendee> attendees = event.getAttendees();
      assertNotNull(attendees);
      assertEquals(1, attendees.size());

      final Attendee att = attendees.get(0);
      assertEquals("string22", att.getId());
      assertEquals("string23", att.getEmail());
      assertEquals("string24", att.getDisplayName());
      assertEquals(true, att.isOrganizer());
      assertEquals(true, att.isSelf());
      assertEquals(true, att.isResource());
      assertEquals(true, att.isOptional());
      assertEquals(AttendeeStatus.NEEDS_ACTION, att.getResponseStatus());
      assertEquals("string26", att.getComment());
      assertEquals(1, att.getAdditionalGuests().intValue());
    }

    {
      final ExtendedProperties extendedProperties = event.getExtendedProperties();
      assertNotNull(extendedProperties);
      {
        final Map<String, String> m = extendedProperties.getPrivateProperties();
        assertNotNull(m);
        assertEquals(1, m.size());
        assertEquals("string27", m.get("(key1)"));
      }
      {
        final Map<String, String> m = extendedProperties.getSharedProperties();
        assertNotNull(m);
        assertEquals(1, m.size());
        assertEquals("string28", m.get("(key2)"));
      }
    }

    {
      final Gadget gadget = event.getGadget();
      assertNotNull(gadget);
      assertEquals("string30", gadget.getType());
      assertEquals("string31", gadget.getTitle());
      assertEquals("string32", gadget.getLink());
      assertEquals("string33", gadget.getIconLink());
      assertEquals(11, gadget.getWidth().intValue());
      assertEquals(11, gadget.getHeight().intValue());
      assertEquals(DisplayMode.ICON, gadget.getDisplay());

      final Map<String, String> m = gadget.getPreferences();
      assertNotNull(m);
      assertEquals(1, m.size());
      assertEquals("string35", m.get("(key3)"));
    }

    {
      final Reminders reminders = event.getReminders();
      assertNotNull(reminders);
      assertEquals(true, reminders.isUseDefault());

      final List<ReminderOverride> overrides = reminders.getOverrides();
      assertNotNull(overrides);
      assertEquals(1, overrides.size());
      final ReminderOverride ro = overrides.get(0);
      assertNotNull(ro);
      assertEquals(NotificationMethod.EMAIL, ro.getMethod());
      assertEquals(12, ro.getMinutes().intValue());
    }

    {
      final Source source = event.getSource();
      assertNotNull(source);
      assertEquals("string37", source.getUrl());
      assertEquals("string38", source.getTitle());
    }
  }

  @Test
  public void listEvents_values_2() {
// Swap the values for the next in sequence - booleans swap, enums on to next, strings to empty, numbers to zero.

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_values_2"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNotNull(eventPage.getItems());
    assertEquals(1, eventPage.getItems().size());

    final Event event = eventPage.getItems().get(0);
    assertNotNull(event);
    assertEquals("\"etag1\"", event.getEtag());

    assertEquals("", event.getId());
    assertEquals(EventStatus.TENTATIVE, event.getStatus());
    assertEquals("", event.getHtmlLink());
    assertEquals(DateUtils.makeDate(1970, 1, 1), event.getCreated());
    assertEquals(DateUtils.makeDate(1970, 1, 1), event.getUpdated());

    assertEquals("", event.getSummary());
    assertEquals("", event.getDescription());
    assertEquals("", event.getLocation());
    assertEquals("", event.getColorId());
    assertEquals("", event.getRecurringEventId());
    assertEquals(Transparency.TRANSPARENT, event.getTransparency());
    assertEquals(Visibility.PUBLIC, event.getVisibility());
    assertEquals("", event.getiCalUid());
    assertEquals(0, event.getSequence().intValue());
    assertEquals("", event.getHangoutLink());

    assertEquals(false, event.isEndTimeUnspecified());
    assertEquals(false, event.isAttendeesOmitted());
    assertEquals(false, event.isAnyoneCanAddSelf());
    assertEquals(false, event.isGuestsCanInviteOthers());
    assertEquals(false, event.isGuestsCanModify());
    assertEquals(false, event.isGuestsCanSeeOtherGuests());
    assertEquals(false, event.isPrivateCopy());
    assertEquals(false, event.isLocked());

    {
      final Creator creator = event.getCreator();
      assertNotNull(creator);
      assertEquals("", creator.getId());
      assertEquals("", creator.getEmail());
      assertEquals("", creator.getDisplayName());
      assertEquals(false, creator.isSelf());
    }

    {
      final Organizer organizer = event.getOrganizer();
      assertNotNull(organizer);
      assertEquals("", organizer.getId());
      assertEquals("", organizer.getEmail());
      assertEquals("", organizer.getDisplayName());
      assertEquals(false, organizer.isSelf());
    }

    {
      final DateTimeTimezone dtz = event.getStart();
      assertNotNull(dtz);
      assertEquals(DateUtils.makeDate(1970, 1, 1), dtz.getDate());
      assertEquals(DateUtils.makeDate(1970, 1, 1), dtz.getDateTime());
      assertEquals(DateUtils.TEST_TIMEZONE, dtz.getTimeZone());
    }

    {
      final DateTimeTimezone dtz = event.getEnd();
      assertNotNull(dtz);
      assertEquals(DateUtils.makeDate(1970, 1, 1), dtz.getDate());
      assertEquals(DateUtils.makeDate(1970, 1, 1), dtz.getDateTime());
      assertEquals(DateUtils.TEST_TIMEZONE, dtz.getTimeZone());
    }

    {
      final List<String> recurrence = event.getRecurrence();
      assertNotNull(recurrence);
      assertEquals(1, recurrence.size());
      assertEquals("", recurrence.get(0));
    }

    {
      final DateTimeTimezone dtz = event.getOriginalStartTime();
      assertNotNull(dtz);
      assertEquals(DateUtils.makeDate(1970, 1, 1), dtz.getDate());
      assertEquals(DateUtils.makeDate(1970, 1, 1), dtz.getDateTime());
      assertEquals(DateUtils.TEST_TIMEZONE, dtz.getTimeZone());
    }

    {
      final List<Attendee> attendees = event.getAttendees();
      assertNotNull(attendees);
      assertEquals(1, attendees.size());

      final Attendee att = attendees.get(0);
      assertEquals("", att.getId());
      assertEquals("", att.getEmail());
      assertEquals("", att.getDisplayName());
      assertEquals(false, att.isOrganizer());
      assertEquals(false, att.isSelf());
      assertEquals(false, att.isResource());
      assertEquals(false, att.isOptional());
      assertEquals(AttendeeStatus.DECLINED, att.getResponseStatus());
      assertEquals("", att.getComment());
      assertEquals(0, att.getAdditionalGuests().intValue());
    }

    {
      final ExtendedProperties extendedProperties = event.getExtendedProperties();
      assertNotNull(extendedProperties);
      {
        final Map<String, String> m = extendedProperties.getPrivateProperties();
        assertNotNull(m);
        assertEquals(1, m.size());
        assertEquals("", m.get("(key1)"));
      }
      {
        final Map<String, String> m = extendedProperties.getSharedProperties();
        assertNotNull(m);
        assertEquals(1, m.size());
        assertEquals("", m.get("(key2)"));
      }
    }

    {
      final Gadget gadget = event.getGadget();
      assertNotNull(gadget);
      assertEquals("", gadget.getType());
      assertEquals("", gadget.getTitle());
      assertEquals("", gadget.getLink());
      assertEquals("", gadget.getIconLink());
      assertEquals(0, gadget.getWidth().intValue());
      assertEquals(0, gadget.getHeight().intValue());
      assertEquals(DisplayMode.CHIP, gadget.getDisplay());

      final Map<String, String> m = gadget.getPreferences();
      assertNotNull(m);
      assertEquals(1, m.size());
      assertEquals("", m.get("(key3)"));
    }

    {
      final Reminders reminders = event.getReminders();
      assertNotNull(reminders);
      assertEquals(false, reminders.isUseDefault());

      final List<ReminderOverride> overrides = reminders.getOverrides();
      assertNotNull(overrides);
      assertEquals(1, overrides.size());
      final ReminderOverride ro = overrides.get(0);
      assertNotNull(ro);
      assertEquals(NotificationMethod.SMS, ro.getMethod());
      assertEquals(0, ro.getMinutes().intValue());
    }

    {
      final Source source = event.getSource();
      assertNotNull(source);
      assertEquals("", source.getUrl());
      assertEquals("", source.getTitle());
    }
  }

  @Test
  public void listEvents_values_3() {
// Swap the values for the next in sequence - booleans swap, enums on to next, strings to empty, numbers to zero.

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_values_3"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNotNull(eventPage.getItems());
    assertEquals(1, eventPage.getItems().size());

    final Event event = eventPage.getItems().get(0);
    assertNotNull(event);
    assertEquals("\"etag1\"", event.getEtag());

    assertEquals("", event.getId());
    assertEquals(EventStatus.CANCELLED, event.getStatus());
    assertNull(event.getHtmlLink());
    assertNull(event.getCreated());
    assertNull(event.getUpdated());

    assertNull(event.getSummary());
    assertNull(event.getDescription());
    assertNull(event.getLocation());
    assertNull(event.getColorId());
    assertNull(event.getRecurringEventId());
    assertNull(event.getTransparency());
    assertEquals(Visibility.PRIVATE, event.getVisibility());
    assertNull(event.getiCalUid());
    assertNull(event.getSequence());
    assertNull(event.getHangoutLink());

    assertNull(event.isEndTimeUnspecified());
    assertNull(event.isAttendeesOmitted());
    assertNull(event.isAnyoneCanAddSelf());
    assertTrue(event.isGuestsCanInviteOthers());
    assertNull(event.isGuestsCanModify());
    assertTrue(event.isGuestsCanSeeOtherGuests());
    assertNull(event.isPrivateCopy());
    assertNull(event.isLocked());

    {
      final Creator creator = event.getCreator();
      assertNotNull(creator);
      assertNull(creator.getId());
      assertNull(creator.getEmail());
      assertNull(creator.getDisplayName());
      assertNull(creator.isSelf());
    }

    {
      final Organizer organizer = event.getOrganizer();
      assertNotNull(organizer);
      assertNull(organizer.getId());
      assertNull(organizer.getEmail());
      assertNull(organizer.getDisplayName());
      assertNull(organizer.isSelf());
    }

    {
      final DateTimeTimezone dtz = event.getStart();
      assertNotNull(dtz);
      assertNull(dtz.getDate());
      assertNull(dtz.getDateTime());
      assertNull(dtz.getTimeZone());
    }

    {
      final DateTimeTimezone dtz = event.getEnd();
      assertNotNull(dtz);
      assertNull(dtz.getDate());
      assertNull(dtz.getDateTime());
      assertNull(dtz.getTimeZone());
    }

    {
      final List<String> recurrence = event.getRecurrence();
      assertNotNull(recurrence);
      assertEquals(0, recurrence.size());
    }

    {
      final DateTimeTimezone dtz = event.getOriginalStartTime();
      assertNotNull(dtz);
      assertNull(dtz.getDate());
      assertNull(dtz.getDateTime());
      assertNull(dtz.getTimeZone());
    }

    {
      final List<Attendee> attendees = event.getAttendees();
      assertNotNull(attendees);
      assertEquals(1, attendees.size());

      final Attendee att = attendees.get(0);
      assertNull(att.getId());
      assertNull(att.getEmail());
      assertNull(att.getDisplayName());
      assertNull(att.isOrganizer());
      assertNull(att.isSelf());
      assertNull(att.isResource());
      assertNull(att.isOptional());
      assertEquals(AttendeeStatus.TENTATIVE, att.getResponseStatus());
      assertNull(att.getComment());
      assertNull(att.getAdditionalGuests());
    }

    {
      final ExtendedProperties extendedProperties = event.getExtendedProperties();
      assertNotNull(extendedProperties);
      {
        final Map<String, String> m = extendedProperties.getPrivateProperties();
        assertNotNull(m);
        assertEquals(0, m.size());
      }
      {
        final Map<String, String> m = extendedProperties.getSharedProperties();
        assertNotNull(m);
        assertEquals(0, m.size());
      }
    }

    {
      final Gadget gadget = event.getGadget();
      assertNotNull(gadget);
      assertNull(gadget.getType());
      assertNull(gadget.getTitle());
      assertNull(gadget.getLink());
      assertNull(gadget.getIconLink());
      assertNull(gadget.getWidth());
      assertNull(gadget.getHeight());
      assertNull(gadget.getDisplay());

      final Map<String, String> m = gadget.getPreferences();
      assertNotNull(m);
      assertEquals(0, m.size());
    }

    {
      final Reminders reminders = event.getReminders();
      assertNotNull(reminders);
      assertNull(reminders.isUseDefault());

      final List<ReminderOverride> overrides = reminders.getOverrides();
      assertNotNull(overrides);
      assertEquals(1, overrides.size());
      final ReminderOverride ro = overrides.get(0);
      assertNotNull(ro);
      assertEquals(NotificationMethod.POPUP, ro.getMethod());
      assertNull(ro.getMinutes());
    }

    {
      final Source source = event.getSource();
      assertNotNull(source);
      assertNull(source.getUrl());
      assertNull(source.getTitle());
    }
  }

  @Test
  public void listEvents_values_4() {
// Swap the values for the next in sequence - booleans swap, enums on to next, strings to empty, numbers to zero.

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_values_4"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNotNull(eventPage.getItems());
    assertEquals(1, eventPage.getItems().size());

    final Event event = eventPage.getItems().get(0);
    assertNotNull(event);
    assertEquals("\"etag1\"", event.getEtag());

    assertEquals("", event.getId());
    assertNull(event.getStatus());
    assertNull(event.getHtmlLink());
    assertNull(event.getCreated());
    assertNull(event.getUpdated());

    assertNull(event.getSummary());
    assertNull(event.getDescription());
    assertNull(event.getLocation());
    assertNull(event.getColorId());
    assertNull(event.getRecurringEventId());
    assertNull(event.getTransparency());
    assertEquals(Visibility.CONFIDENTIAL, event.getVisibility());
    assertNull(event.getiCalUid());
    assertNull(event.getSequence());
    assertNull(event.getHangoutLink());

    assertNull(event.isEndTimeUnspecified());
    assertNull(event.isAttendeesOmitted());
    assertNull(event.isAnyoneCanAddSelf());
    assertTrue(event.isGuestsCanInviteOthers());
    assertNull(event.isGuestsCanModify());
    assertTrue(event.isGuestsCanSeeOtherGuests());
    assertNull(event.isPrivateCopy());
    assertNull(event.isLocked());

    {
      final Creator creator = event.getCreator();
      assertNull(creator);
    }

    {
      final Organizer organizer = event.getOrganizer();
      assertNull(organizer);
    }

    {
      final DateTimeTimezone dtz = event.getStart();
      assertNotNull(dtz);
      assertNull(dtz.getDate());
      assertNull(dtz.getDateTime());
      assertNull(dtz.getTimeZone());
    }

    {
      final DateTimeTimezone dtz = event.getEnd();
      assertNotNull(dtz);
      assertNull(dtz.getDate());
      assertNull(dtz.getDateTime());
      assertNull(dtz.getTimeZone());
    }

    {
      final List<String> recurrence = event.getRecurrence();
      assertNull(recurrence);
    }

    {
      final DateTimeTimezone dtz = event.getOriginalStartTime();
      assertNotNull(dtz);
      assertNull(dtz.getDate());
      assertNull(dtz.getDateTime());
      assertNull(dtz.getTimeZone());
    }

    {
      final List<Attendee> attendees = event.getAttendees();
      assertNotNull(attendees);
      assertEquals(1, attendees.size());

      final Attendee att = attendees.get(0);
      assertNull(att.getId());
      assertNull(att.getEmail());
      assertNull(att.getDisplayName());
      assertNull(att.isOrganizer());
      assertNull(att.isSelf());
      assertNull(att.isResource());
      assertNull(att.isOptional());
      assertEquals(AttendeeStatus.ACCEPTED, att.getResponseStatus());
      assertNull(att.getComment());
      assertNull(att.getAdditionalGuests());
    }

    {
      final ExtendedProperties extendedProperties = event.getExtendedProperties();
      assertNotNull(extendedProperties);
      {
        final Map<String, String> m = extendedProperties.getPrivateProperties();
        assertNull(m);
      }
      {
        final Map<String, String> m = extendedProperties.getSharedProperties();
        assertNull(m);
      }
    }

    {
      final Gadget gadget = event.getGadget();
      assertNotNull(gadget);
      assertNull(gadget.getType());
      assertNull(gadget.getTitle());
      assertNull(gadget.getLink());
      assertNull(gadget.getIconLink());
      assertNull(gadget.getWidth());
      assertNull(gadget.getHeight());
      assertNull(gadget.getDisplay());

      final Map<String, String> m = gadget.getPreferences();
      assertNull(m);
    }

    {
      final Reminders reminders = event.getReminders();
      assertNotNull(reminders);
      assertNull(reminders.isUseDefault());

      final List<ReminderOverride> overrides = reminders.getOverrides();
      assertNotNull(overrides);
      assertEquals(1, overrides.size());
      final ReminderOverride ro = overrides.get(0);
      assertNotNull(ro);
      assertNull(ro.getMethod());
      assertNull(ro.getMinutes());
    }

    {
      final Source source = event.getSource();
      assertNull(source);
    }
  }

  @Test
  public void listEvents_values_5() {
// Swap the values for the next in sequence - booleans swap, enums on to next, strings to empty, numbers to zero.

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_values_5"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNotNull(eventPage.getItems());
    assertEquals(1, eventPage.getItems().size());

    final Event event = eventPage.getItems().get(0);
    assertNotNull(event);
    assertEquals("\"etag1\"", event.getEtag());

    assertEquals("", event.getId());
    assertNull(event.getStatus());
    assertNull(event.getHtmlLink());
    assertNull(event.getCreated());
    assertNull(event.getUpdated());

    assertNull(event.getSummary());
    assertNull(event.getDescription());
    assertNull(event.getLocation());
    assertNull(event.getColorId());
    assertNull(event.getRecurringEventId());
    assertNull(event.getTransparency());
    assertNull(event.getVisibility());
    assertNull(event.getiCalUid());
    assertNull(event.getSequence());
    assertNull(event.getHangoutLink());

    assertNull(event.isEndTimeUnspecified());
    assertNull(event.isAttendeesOmitted());
    assertNull(event.isAnyoneCanAddSelf());
    assertTrue(event.isGuestsCanInviteOthers());
    assertNull(event.isGuestsCanModify());
    assertTrue(event.isGuestsCanSeeOtherGuests());
    assertNull(event.isPrivateCopy());
    assertNull(event.isLocked());

    {
      final Creator creator = event.getCreator();
      assertNull(creator);
    }

    {
      final Organizer organizer = event.getOrganizer();
      assertNull(organizer);
    }

    {
      final DateTimeTimezone dtz = event.getStart();
      assertNull(dtz);
    }

    {
      final DateTimeTimezone dtz = event.getEnd();
      assertNull(dtz);
    }

    {
      final List<String> recurrence = event.getRecurrence();
      assertNull(recurrence);
    }

    {
      final DateTimeTimezone dtz = event.getOriginalStartTime();
      assertNull(dtz);
    }

    {
      final List<Attendee> attendees = event.getAttendees();
      assertNotNull(attendees);
      assertEquals(1, attendees.size());

      final Attendee att = attendees.get(0);
      assertNull(att.getId());
      assertNull(att.getEmail());
      assertNull(att.getDisplayName());
      assertNull(att.isOrganizer());
      assertNull(att.isSelf());
      assertNull(att.isResource());
      assertNull(att.isOptional());
      assertNull(att.getResponseStatus());
      assertNull(att.getComment());
      assertNull(att.getAdditionalGuests());
    }

    {
      final ExtendedProperties extendedProperties = event.getExtendedProperties();
      assertNull(extendedProperties);
    }

    {
      final Gadget gadget = event.getGadget();
      assertNull(gadget);
    }

    {
      final Reminders reminders = event.getReminders();
      assertNotNull(reminders);
      assertNull(reminders.isUseDefault());

      final List<ReminderOverride> overrides = reminders.getOverrides();
      assertNotNull(overrides);
      assertEquals(0, overrides.size());
    }

    {
      final Source source = event.getSource();
      assertNull(source);
    }
  }

  @Test
  public void listEvents_values_6() {
// Swap the values for the next in sequence - booleans swap, enums on to next, strings to empty, numbers to zero.

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_values_6"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNotNull(eventPage.getItems());
    assertEquals(1, eventPage.getItems().size());

    final Event event = eventPage.getItems().get(0);
    assertNotNull(event);
    assertEquals("\"etag1\"", event.getEtag());

    assertEquals("", event.getId());
    assertNull(event.getStatus());
    assertNull(event.getHtmlLink());
    assertNull(event.getCreated());
    assertNull(event.getUpdated());

    assertNull(event.getSummary());
    assertNull(event.getDescription());
    assertNull(event.getLocation());
    assertNull(event.getColorId());
    assertNull(event.getRecurringEventId());
    assertNull(event.getTransparency());
    assertNull(event.getVisibility());
    assertNull(event.getiCalUid());
    assertNull(event.getSequence());
    assertNull(event.getHangoutLink());

    assertNull(event.isEndTimeUnspecified());
    assertNull(event.isAttendeesOmitted());
    assertNull(event.isAnyoneCanAddSelf());
    assertTrue(event.isGuestsCanInviteOthers());
    assertNull(event.isGuestsCanModify());
    assertTrue(event.isGuestsCanSeeOtherGuests());
    assertNull(event.isPrivateCopy());
    assertNull(event.isLocked());

    {
      final Creator creator = event.getCreator();
      assertNull(creator);
    }

    {
      final Organizer organizer = event.getOrganizer();
      assertNull(organizer);
    }

    {
      final DateTimeTimezone dtz = event.getStart();
      assertNull(dtz);
    }

    {
      final DateTimeTimezone dtz = event.getEnd();
      assertNull(dtz);
    }

    {
      final List<String> recurrence = event.getRecurrence();
      assertNull(recurrence);
    }

    {
      final DateTimeTimezone dtz = event.getOriginalStartTime();
      assertNull(dtz);
    }

    {
      final List<Attendee> attendees = event.getAttendees();
      assertNotNull(attendees);
      assertEquals(0, attendees.size());
    }

    {
      final ExtendedProperties extendedProperties = event.getExtendedProperties();
      assertNull(extendedProperties);
    }

    {
      final Gadget gadget = event.getGadget();
      assertNull(gadget);
    }

    {
      final Reminders reminders = event.getReminders();
      assertNotNull(reminders);
      assertNull(reminders.isUseDefault());

      final List<ReminderOverride> overrides = reminders.getOverrides();
      assertNull(overrides);
    }

    {
      final Source source = event.getSource();
      assertNull(source);
    }
  }

  @Test
  public void listEvents_values_7() {
// Swap the values for the next in sequence - booleans swap, enums on to next, strings to empty, numbers to zero.

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_list_events_values_7"), APPLICATION_JSON));

    final EventPage eventPage = google.calendarOperations()
      .eventListQuery(CalendarOperations.PRIMARY_CALENDAR_ID)
      .getPage();

    assertNotNull(eventPage);
    assertNull(eventPage.getNextPageToken());
    assertEquals("\"0001\"", eventPage.getEtag());
    assertNotNull(eventPage.getItems());
    assertEquals(1, eventPage.getItems().size());

    final Event event = eventPage.getItems().get(0);
    assertNotNull(event);
    assertEquals("\"etag1\"", event.getEtag());

    assertEquals("", event.getId());
    assertNull(event.getStatus());
    assertNull(event.getHtmlLink());
    assertNull(event.getCreated());
    assertNull(event.getUpdated());

    assertNull(event.getSummary());
    assertNull(event.getDescription());
    assertNull(event.getLocation());
    assertNull(event.getColorId());
    assertNull(event.getRecurringEventId());
    assertNull(event.getTransparency());
    assertNull(event.getVisibility());
    assertNull(event.getiCalUid());
    assertNull(event.getSequence());
    assertNull(event.getHangoutLink());

    assertNull(event.isEndTimeUnspecified());
    assertNull(event.isAttendeesOmitted());
    assertNull(event.isAnyoneCanAddSelf());
    assertTrue(event.isGuestsCanInviteOthers());
    assertNull(event.isGuestsCanModify());
    assertTrue(event.isGuestsCanSeeOtherGuests());
    assertNull(event.isPrivateCopy());
    assertNull(event.isLocked());

    {
      final Creator creator = event.getCreator();
      assertNull(creator);
    }

    {
      final Organizer organizer = event.getOrganizer();
      assertNull(organizer);
    }

    {
      final DateTimeTimezone dtz = event.getStart();
      assertNull(dtz);
    }

    {
      final DateTimeTimezone dtz = event.getEnd();
      assertNull(dtz);
    }

    {
      final List<String> recurrence = event.getRecurrence();
      assertNull(recurrence);
    }

    {
      final DateTimeTimezone dtz = event.getOriginalStartTime();
      assertNull(dtz);
    }

    {
      final List<Attendee> attendees = event.getAttendees();
      assertNull(attendees);
    }

    {
      final ExtendedProperties extendedProperties = event.getExtendedProperties();
      assertNull(extendedProperties);
    }

    {
      final Gadget gadget = event.getGadget();
      assertNull(gadget);
    }

    {
      final Reminders reminders = event.getReminders();
      assertNull(reminders);
    }

    {
      final Source source = event.getSource();
      assertNull(source);
    }
  }

  @Test
  public void getEvent_primary() {

    final String id = "_60q30c1g60o30e1i60o4ac1g60rj8gpl88rj2c1h84s34h9g60s30c1g60o30c1g6oo4agph751kah9o84r46ghg64o30c1g60o30c1g60o30c1g60o32c1g60o30c1g891jeh9o88qk6cpk612k6c1k6ss3idi488o36h1i8p1k6hhp6oog";

    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events/_60q30c1g60o30e1i60o4ac1g60rj8gpl88rj2c1h84s34h9g60s30c1g60o30c1g6oo4agph751kah9o84r46ghg64o30c1g60o30c1g60o30c1g60o32c1g60o30c1g891jeh9o88qk6cpk612k6c1k6ss3idi488o36h1i8p1k6hhp6oog?access_token=ACCESS_TOKEN"))
      .andExpect(method(GET))
      .andRespond(
        withSuccess(jsonResource("mock_get_event"), APPLICATION_JSON));

    final Event event = google.calendarOperations().getEvent(CalendarOperations.PRIMARY_CALENDAR_ID, id);

    assertNotNull(event);
    assertEquals(id, event.getId());
    assertEquals("Wearable Tech Show", event.getSummary());
  }

  @Test
  public void quickAddEvent() {

    // Not testing the actual creation, but check URL.
    mockServer
      .expect(requestTo("https://www.googleapis.com/calendar/v3/calendars/primary/events/quickAdd?text=Appointment+at+Somewhere+every+June+3rd+10am-10%3A25am&sendNotifications=true&access_token=ACCESS_TOKEN"))
      .andExpect(method(POST))
      .andRespond(
        withSuccess(jsonResource("mock_added_event"), APPLICATION_JSON));

    final Event event = google.calendarOperations().quickAddEvent("primary", "Appointment at Somewhere every June 3rd 10am-10:25am", true);

    assertNotNull(event);
    assertEquals(1, event.getRecurrence().size());
    assertEquals("RRULE:FREQ=YEARLY;INTERVAL=1", event.getRecurrence().get(0));
    assertNotNull(event.getStart());
    assertNotNull(event.getStart().getDateTime());
    assertNull(event.getStart().getDate());
  }
}


text:
'use strict';

var https = require('https');

var User = require('../../../users/server/models/user.server.model');

var Bar = require('../../../users/server/models/bar.server.model');

var results = [];

var visitors = [];

const yelp = require('yelp-fusion');

var zip;

/*const searchRequest = {
  term:'bar',
  location: 'new york, ny'
};*/

module.exports = function (app) {
  // Root routing
  var core = require('../controllers/core.server.controller');

  // Define error pages
  app.route('/server-error').get(core.renderServerError);

  // Yelp search

  //app.route('/results')
  app.route('/search')
    .post(function (req, res) {
      console.log(req.body);
      yelp.accessToken(process.env.YELP_CLIENT_ID, process.env.YELP_CLIENT_SECRET).then(response => {
        const client = yelp.client(response.jsonBody.access_token);
        client.search({term:'bar', location: req.body.zip}).then(response => {
        results = response.jsonBody.businesses;
        const prettyJson = JSON.stringify(results, null, 4);

        results.forEach(function(bar, index){

          User.find( {'checkedin': bar.id}).then(response => {
            results[index].users = response;
            if (index === results.length-1) {
              res.json(results);
              console.log(results);
            }
            if (response.length > 0) {
              console.log(response);
              //console.log(response);
            } else {
                console.log('nope');
              }
            });

        });

}).catch(e => {
  console.log(e);
});
});
});

app.route('/checkin')
  .post(function (req, res) {
    //console.log(req.body.id);
    User.findById(req.user._id, function(err, user){
      //console.log(user);
      user.checkedin = req.body.id;
      user.save();
      res.json(user);
});
  });

app.route('/checkout')
    .post(function (req, res) {
      //console.log(req.body.id);
      User.findById(req.user._id, function(err, user){
        //console.log(user);
        user.checkedin = '';
        user.save();
        res.json(user);
  });
    });

  // Return a 404 for all undefined api, module or lib routes
  app.route('/:url(api|modules|lib)/*').get(core.renderNotFound);

  // Define application route
  app.route('/*').get(core.renderIndex);
};


text:
import * as FS from "fs";
import * as Path from "path";
import * as Util from "util";

import {Application} from "../application";
import {AbstractComponent, Component, Option} from "./component";
import {ParameterType} from "./options/declaration";

@Component({name:'plugin-host', internal:true})
export class PluginHost extends AbstractComponent<Application>
{
    @Option({
        name: 'plugin',
        help: 'Specify the npm plugins that should be loaded. Omit to load all installed plugins, set to \'none\' to load no plugins.',
        type: ParameterType.String,
        isArray: true
    })
    plugins:string[];

    /**
     * Load the given list of npm plugins.
     *
     * @param plugins  A list of npm modules that should be loaded as plugins. When not specified
     *   this function will invoke [[discoverNpmPlugins]] to find a list of all installed plugins.
     * @returns TRUE on success, otherwise FALSE.
     */
    load():boolean {
        var logger = this.application.logger;
        var plugins = this.plugins || this.discoverNpmPlugins();

        var i:number, c:number = plugins.length;
        for (i = 0; i < c; i++) {
            var plugin = plugins[i];
            if (typeof plugin != 'string') {
                logger.error('Unknown plugin %s', plugin);
                return false;
            } else if (plugin.toLowerCase() == 'none') {
                return true;
            }
        }

        for (i = 0; i < c; i++) {
            var plugin = plugins[i];
            try {
                var instance = require(plugin);
                if (typeof instance == 'function') {
                    instance(this);
                    logger.write('Loaded plugin %s', plugin);
                } else {
                    logger.error('The plugin %s did not return a function.', plugin);
                }
            } catch (error) {
                logger.error('The plugin %s could not be loaded.', plugin);
                logger.writeln(error.stack);
            }
        }
    }

    /**
     * Discover all installed TypeDoc plugins.
     *
     * @returns A list of all npm module names that are qualified TypeDoc plugins.
     */
    private discoverNpmPlugins():string[] {
        var result:string[] = [];
        var logger = this.application.logger;
        discover();
        return result;

        /**
         * Find all parent folders containing a `node_modules` subdirectory.
         */
        function discover() {
            var path = process.cwd(), previous:string;
            do {
                var modules = Path.join(path, 'node_modules');
                if (FS.existsSync(modules) && FS.lstatSync(modules).isDirectory()) {
                    discoverModules(modules);
                }

                previous = path;
                path = Path.resolve(Path.join(previous, '..'));
            } while (previous != path);
        }

        /**
         * Scan the given `node_modules` directory for TypeDoc plugins.
         */
        function discoverModules(basePath:string) {
            FS.readdirSync(basePath).forEach((name) => {
                var dir = Path.join(basePath, name);
                var infoFile = Path.join(dir, 'package.json');
                if (!FS.existsSync(infoFile)) {
                    return;
                }

                var info = loadPackageInfo(infoFile);
                if (isPlugin(info)) {
                    result.push(name);
                }
            });
        }

        /**
         * Load and parse the given `package.json`.
         */
        function loadPackageInfo(fileName:string):any {
            try {
                return JSON.parse(FS.readFileSync(fileName, {encoding: 'utf-8'}));
            } catch (error) {
                logger.error('Could not parse %s', fileName);
                return {};
            }
        }

        /**
         * Test whether the given package info describes a TypeDoc plugin.
         */
        function isPlugin(info:any):boolean {
            var keywords:string[] = info.keywords;
            if (!keywords || !Util.isArray(keywords)) {
                return false;
            }

            for (var i = 0, c = keywords.length; i < c; i++) {
                var keyword = keywords[i];
                if (typeof keyword == 'string' && keyword.toLowerCase() == 'typedocplugin') {
                    return true;
                }
            }

            return false;
        }
    }
}


text:
class Place < ActiveRecord::Base
  belongs_to :country

  has_many :comments, as: :commentable
  has_many :visits
end


text:
package org.rzo.yajsw.tray;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.ComponentOrientation;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.Box;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import com.jeta.forms.components.border.TitledBorderBottom;
import com.jeta.forms.components.border.TitledBorderLabel;
import com.jeta.forms.components.border.TitledBorderSide;
import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;

public class ConsoleForm extends JPanel
{
   JTextArea _output = new JTextArea();
   JTextField _input = new JTextField();
   JButton _START_BUTTON = new JButton();
   JButton _STOP_BUTTON = new JButton();
   JButton _RESTART_BUTTON = new JButton();
   JButton _EXIT_WRAPPER_BUTTON = new JButton();
   JButton _THREAD_DUMP_BUTTON = new JButton();
   JLabel _appStopTime = new JLabel();
   JLabel _state = new JLabel();
   JLabel _wStartTime = new JLabel();
   JLabel _trigger = new JLabel();
   JButton _STOP_TIMER_BUTTON = new JButton();
   JLabel _appPid = new JLabel();
   JLabel _appStartTime = new JLabel();
   JLabel _wPid = new JLabel();
   TitledBorderLabel _titledborderlabel1 = new TitledBorderLabel();
   TitledBorderSide _titledborderside1 = new TitledBorderSide();
   TitledBorderSide _titledborderside2 = new TitledBorderSide();
   TitledBorderBottom _titledborderbottom1 = new TitledBorderBottom();
   TitledBorderLabel _titledborderlabel2 = new TitledBorderLabel();
   TitledBorderSide _titledborderside3 = new TitledBorderSide();
   TitledBorderSide _titledborderside4 = new TitledBorderSide();
   TitledBorderBottom _titledborderbottom2 = new TitledBorderBottom();
   JButton _jbutton1 = new JButton();
   JLabel _timer = new JLabel();
   JLabel _condition = new JLabel();
   JLabel _wrapperType = new JLabel();
   JLabel _cpu = new JLabel();
   JLabel _memory = new JLabel();
   JLabel _handles = new JLabel();
   JLabel _threads = new JLabel();
   JLabel _count = new JLabel();
   JLabel _exitCode = new JLabel();
   JButton _THREAD_DUMP_WRAPPER_BUTTON = new JButton();
   JButton _EXIT_TRAY_ICON_BUTTON = new JButton();
   JButton _START_OUTPUT_BUTTON = new JButton();
   JButton _PAUSE_OUTPUT_BUTTON = new JButton();
   JButton _CLEAR_OUTPUT_BUTTON = new JButton();
   JButton _GC_BUTTON = new JButton();
   JButton _DUMP_HEAP_BUTTON = new JButton();
   JTextField __OUTPUT_FILTER = new JTextField();

   /**
    * Default constructor
    */
   public ConsoleForm()
   {
      initializePanel();
   }

   /**
    * Main method for panel
    */
   public static void main(String[] args)
   {
      JFrame frame = new JFrame();
      frame.setSize(600, 400);
      frame.setLocation(100, 100);
      frame.getContentPane().add(new ConsoleForm());
      frame.setVisible(true);

      frame.addWindowListener( new WindowAdapter()
      {
         public void windowClosing( WindowEvent evt )
         {
            System.exit(0);
         }
      });
   }

   /**
    * Adds fill components to empty cells in the first row and first column of the grid.
    * This ensures that the grid spacing will be the same as shown in the designer.
    * @param cols an array of column indices in the first row where fill components should be added.
    * @param rows an array of row indices in the first column where fill components should be added.
    */
   void addFillComponents( Container panel, int[] cols, int[] rows )
   {
      Dimension filler = new Dimension(10,10);

      boolean filled_cell_11 = false;
      CellConstraints cc = new CellConstraints();
      if ( cols.length > 0 && rows.length > 0 )
      {
         if ( cols[0] == 1 && rows[0] == 1 )
         {
            /** add a rigid area  */
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
            filled_cell_11 = true;
         }
      }

      for( int index = 0; index < cols.length; index++ )
      {
         if ( cols[index] == 1 && filled_cell_11 )
         {
            continue;
         }
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
      }

      for( int index = 0; index < rows.length; index++ )
      {
         if ( rows[index] == 1 && filled_cell_11 )
         {
            continue;
         }
         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
      }

   }

   /**
    * Helper method to load an image file from the CLASSPATH
    * @param imageName the package and name of the file to load relative to the CLASSPATH
    * @return an ImageIcon instance with the specified image file
    * @throws IllegalArgumentException if the image resource cannot be loaded.
    */
   public ImageIcon loadImage( String imageName )
   {
      try
      {
         ClassLoader classloader = getClass().getClassLoader();
         java.net.URL url = classloader.getResource( imageName );
         if ( url != null )
         {
            ImageIcon icon = new ImageIcon( url );
            return icon;
         }
      }
      catch( Exception e )
      {
         e.printStackTrace();
      }
      throw new IllegalArgumentException( "Unable to load image: " + imageName );
   }

   /**
    * Method for recalculating the component orientation for
    * right-to-left Locales.
    * @param orientation the component orientation to be applied
    */
   public void applyComponentOrientation( ComponentOrientation orientation )
   {
      // Not yet implemented...
      // I18NUtils.applyComponentOrientation(this, orientation);
      super.applyComponentOrientation(orientation);
   }

   public JPanel createPanel()
   {
      JPanel jpanel1 = new JPanel();
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:4DLU:NONE,FILL:4DLU:NONE,LEFT:100PX:NONE,FILL:4DLU:NONE,RIGHT:100PX:NONE,FILL:4DLU:NONE,LEFT:100PX:NONE,FILL:4DLU:NONE,LEFT:100PX:NONE,FILL:4DLU:NONE,RIGHT:100PX:NONE,FILL:4DLU:NONE,FILL:4DLU:GROW(1.0),FILL:4DLU:NONE,RIGHT:100PX:NONE,FILL:4DLU:NONE,FILL:100PX:NONE,FILL:4DLU:NONE,FILL:100PX:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:238PX:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:14DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
      CellConstraints cc = new CellConstraints();
      jpanel1.setLayout(formlayout1);

      JLabel jlabel1 = new JLabel();
      jlabel1.setBackground(new Color(204,204,204));
      jlabel1.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel1.setOpaque(true);
      jlabel1.setText("Output");
      jpanel1.add(jlabel1,new CellConstraints(4,2,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _output.setName("output");
      JScrollPane jscrollpane1 = new JScrollPane();
      jscrollpane1.setViewportView(_output);
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
      jpanel1.add(jscrollpane1,cc.xywh(4,4,17,1));

      JLabel jlabel2 = new JLabel();
      jlabel2.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel2.setText("Input (CR terminated)");
      jpanel1.add(jlabel2,cc.xy(4,6));

      JLabel jlabel3 = new JLabel();
      jlabel3.setBackground(new Color(204,204,204));
      jlabel3.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel3.setOpaque(true);
      jlabel3.setText("State ");
      jlabel3.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel3,new CellConstraints(4,9,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _input.setName("input");
      jpanel1.add(_input,cc.xywh(6,6,15,1));

      _START_BUTTON.setActionCommand("Start");
      _START_BUTTON.setName("START_BUTTON");
      _START_BUTTON.setToolTipText("Start");
      jpanel1.add(_START_BUTTON,cc.xy(4,18));

      _STOP_BUTTON.setActionCommand("Stop");
      _STOP_BUTTON.setName("STOP_BUTTON");
      _STOP_BUTTON.setToolTipText("Stop");
      jpanel1.add(_STOP_BUTTON,cc.xy(6,18));

      _RESTART_BUTTON.setActionCommand("Restart");
      _RESTART_BUTTON.setName("RESTART_BUTTON");
      _RESTART_BUTTON.setToolTipText("Restart");
      jpanel1.add(_RESTART_BUTTON,cc.xy(8,18));

      _EXIT_WRAPPER_BUTTON.setActionCommand("Exit");
      _EXIT_WRAPPER_BUTTON.setName("EXIT_WRAPPER_BUTTON");
      _EXIT_WRAPPER_BUTTON.setToolTipText("Stop Wrapper");
      jpanel1.add(_EXIT_WRAPPER_BUTTON,new CellConstraints(20,18,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));

      _THREAD_DUMP_BUTTON.setActionCommand("Thread Dump");
      _THREAD_DUMP_BUTTON.setName("THREAD_DUMP_BUTTON");
      _THREAD_DUMP_BUTTON.setToolTipText("Thread Dump");
      jpanel1.add(_THREAD_DUMP_BUTTON,new CellConstraints(10,18,1,1,CellConstraints.LEFT,CellConstraints.DEFAULT));

      _appStopTime.setName("appStopTime");
      _appStopTime.setText("-");
      jpanel1.add(_appStopTime,cc.xy(10,11));

      JLabel jlabel4 = new JLabel();
      jlabel4.setBackground(new Color(204,204,204));
      jlabel4.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel4.setOpaque(true);
      jlabel4.setText("Started");
      jpanel1.add(jlabel4,new CellConstraints(8,9,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _state.setBackground(new Color(255,255,255));
      _state.setName("state");
      _state.setText("IDLE");
      jpanel1.add(_state,cc.xy(4,11));

      JLabel jlabel5 = new JLabel();
      jlabel5.setBackground(new Color(204,204,204));
      jlabel5.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel5.setOpaque(true);
      jlabel5.setText("Stopped");
      jpanel1.add(jlabel5,new CellConstraints(10,9,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _wStartTime.setName("wStartTime");
      _wStartTime.setText("-");
      jpanel1.add(_wStartTime,cc.xy(18,11));

      _trigger.setName("trigger");
      _trigger.setText("-");
      jpanel1.add(_trigger,cc.xy(20,11));

      JLabel jlabel6 = new JLabel();
      jlabel6.setBackground(new Color(204,204,204));
      jlabel6.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel6.setOpaque(true);
      jlabel6.setText("PID");
      jpanel1.add(jlabel6,new CellConstraints(16,9,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      JLabel jlabel7 = new JLabel();
      jlabel7.setBackground(new Color(204,204,204));
      jlabel7.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel7.setOpaque(true);
      jlabel7.setText("Started");
      jpanel1.add(jlabel7,new CellConstraints(18,9,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      JLabel jlabel8 = new JLabel();
      jlabel8.setBackground(new Color(204,204,204));
      jlabel8.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel8.setOpaque(true);
      jlabel8.setText("Trigger");
      jpanel1.add(jlabel8,new CellConstraints(20,9,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _STOP_TIMER_BUTTON.setActionCommand("Stop Timer / Condition");
      _STOP_TIMER_BUTTON.setName("STOP_TIMER_BUTTON");
      _STOP_TIMER_BUTTON.setToolTipText("Stop Timer / Condition");
      jpanel1.add(_STOP_TIMER_BUTTON,new CellConstraints(18,18,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));

      _appPid.setName("appPid");
      _appPid.setText("-");
      jpanel1.add(_appPid,cc.xy(6,11));

      _appStartTime.setName("appStartTime");
      _appStartTime.setText("-");
      jpanel1.add(_appStartTime,cc.xy(8,11));

      _wPid.setName("wPid");
      _wPid.setText("-");
      jpanel1.add(_wPid,cc.xy(16,11));

      _titledborderlabel1.setText("Application");
      jpanel1.add(_titledborderlabel1,cc.xywh(3,8,10,1));

      jpanel1.add(_titledborderside1,cc.xywh(2,8,1,12));

      _titledborderside2.setOrientation(TitledBorderSide.RIGHT);
      jpanel1.add(_titledborderside2,cc.xywh(13,8,1,12));

      jpanel1.add(_titledborderbottom1,cc.xywh(3,19,10,1));

      _titledborderlabel2.setText("Wrapper");
      jpanel1.add(_titledborderlabel2,cc.xywh(15,8,6,1));

      jpanel1.add(_titledborderside3,cc.xywh(14,8,1,12));

      _titledborderside4.setOrientation(TitledBorderSide.RIGHT);
      jpanel1.add(_titledborderside4,cc.xywh(21,8,1,12));

      jpanel1.add(_titledborderbottom2,cc.xywh(15,19,6,1));

      _jbutton1.setActionCommand("Close Console");
      _jbutton1.setText("Close Console");
      _jbutton1.setToolTipText("Close Console The Console Window");
      jpanel1.add(_jbutton1,cc.xy(20,21));

      _timer.setName("timer");
      _timer.setText("-");
      jpanel1.add(_timer,cc.xy(16,15));

      _condition.setName("condition");
      _condition.setText("-");
      jpanel1.add(_condition,cc.xy(18,15));

      _wrapperType.setName("wrapperType");
      _wrapperType.setText("-");
      jpanel1.add(_wrapperType,cc.xy(20,15));

      JLabel jlabel9 = new JLabel();
      jlabel9.setBackground(new Color(204,204,204));
      jlabel9.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel9.setOpaque(true);
      jlabel9.setText("PID");
      jlabel9.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel9,new CellConstraints(6,9,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      JLabel jlabel10 = new JLabel();
      jlabel10.setBackground(new Color(204,204,204));
      jlabel10.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel10.setOpaque(true);
      jlabel10.setText("Timer");
      jlabel10.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel10,new CellConstraints(16,13,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      JLabel jlabel11 = new JLabel();
      jlabel11.setBackground(new Color(204,204,204));
      jlabel11.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel11.setOpaque(true);
      jlabel11.setText("Condition");
      jlabel11.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel11,new CellConstraints(18,13,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      JLabel jlabel12 = new JLabel();
      jlabel12.setBackground(new Color(204,204,204));
      jlabel12.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel12.setOpaque(true);
      jlabel12.setText("Type");
      jlabel12.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel12,new CellConstraints(20,13,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      JLabel jlabel13 = new JLabel();
      jlabel13.setBackground(new Color(204,204,204));
      jlabel13.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel13.setOpaque(true);
      jlabel13.setText("CPU");
      jlabel13.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel13,new CellConstraints(4,13,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _cpu.setName("cpu");
      _cpu.setText("-");
      jpanel1.add(_cpu,cc.xy(4,15));

      JLabel jlabel14 = new JLabel();
      jlabel14.setBackground(new Color(204,204,204));
      jlabel14.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel14.setOpaque(true);
      jlabel14.setText("Memory");
      jlabel14.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel14,new CellConstraints(6,13,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _memory.setName("memory");
      _memory.setText("-");
      jpanel1.add(_memory,cc.xy(6,15));

      JLabel jlabel15 = new JLabel();
      jlabel15.setBackground(new Color(204,204,204));
      jlabel15.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel15.setOpaque(true);
      jlabel15.setText("Handles");
      jlabel15.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel15,new CellConstraints(8,13,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _handles.setName("handles");
      _handles.setText("-");
      jpanel1.add(_handles,cc.xy(8,15));

      JLabel jlabel16 = new JLabel();
      jlabel16.setBackground(new Color(204,204,204));
      jlabel16.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel16.setOpaque(true);
      jlabel16.setText("Threads");
      jlabel16.setHorizontalAlignment(JLabel.LEFT);
      jpanel1.add(jlabel16,new CellConstraints(10,13,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _threads.setName("threads");
      _threads.setText("-");
      jpanel1.add(_threads,cc.xy(10,15));

      _count.setName("count");
      _count.setText("-");
      jpanel1.add(_count,cc.xy(12,15));

      JLabel jlabel17 = new JLabel();
      jlabel17.setBackground(new Color(204,204,204));
      jlabel17.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel17.setOpaque(true);
      jlabel17.setText("Restarts");
      jpanel1.add(jlabel17,new CellConstraints(12,13,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      JLabel jlabel18 = new JLabel();
      jlabel18.setBackground(new Color(204,204,204));
      jlabel18.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel18.setOpaque(true);
      jlabel18.setText("Exit Code");
      jpanel1.add(jlabel18,new CellConstraints(12,9,1,1,CellConstraints.FILL,CellConstraints.DEFAULT));

      _exitCode.setName("exitCode");
      _exitCode.setText("-");
      jpanel1.add(_exitCode,cc.xy(12,11));

      _THREAD_DUMP_WRAPPER_BUTTON.setActionCommand("Exit");
      _THREAD_DUMP_WRAPPER_BUTTON.setName("THREAD_DUMP_WRAPPER_BUTTON");
      _THREAD_DUMP_WRAPPER_BUTTON.setToolTipText("Thread Dump Wrapper");
      jpanel1.add(_THREAD_DUMP_WRAPPER_BUTTON,new CellConstraints(16,18,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));

      _EXIT_TRAY_ICON_BUTTON.setActionCommand("Exit");
      _EXIT_TRAY_ICON_BUTTON.setName("EXIT_TRAY_ICON_BUTTON");
      _EXIT_TRAY_ICON_BUTTON.setToolTipText("Exit Tray Icon");
      jpanel1.add(_EXIT_TRAY_ICON_BUTTON,new CellConstraints(18,21,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));

      _START_OUTPUT_BUTTON.setEnabled(false);
      _START_OUTPUT_BUTTON.setName("START_OUTPUT_BUTTON");
      _START_OUTPUT_BUTTON.setToolTipText("Start Console Output");
      jpanel1.add(_START_OUTPUT_BUTTON,cc.xy(6,2));

      _PAUSE_OUTPUT_BUTTON.setName("PAUSE_OUTPUT_BUTTON");
      _PAUSE_OUTPUT_BUTTON.setToolTipText("Pause Console Output");
      jpanel1.add(_PAUSE_OUTPUT_BUTTON,cc.xy(8,2));

      _CLEAR_OUTPUT_BUTTON.setName("CLEAR_OUTPUT_BUTTON");
      _CLEAR_OUTPUT_BUTTON.setToolTipText("Clear Output");
      jpanel1.add(_CLEAR_OUTPUT_BUTTON,cc.xy(10,2));

      _GC_BUTTON.setActionCommand("Thread Dump");
      _GC_BUTTON.setName("GC_BUTTON");
      _GC_BUTTON.setToolTipText("Thread Dump");
      jpanel1.add(_GC_BUTTON,cc.xy(12,18));

      _DUMP_HEAP_BUTTON.setActionCommand("Thread Dump");
      _DUMP_HEAP_BUTTON.setName("DUMP_HEAP_BUTTON");
      _DUMP_HEAP_BUTTON.setToolTipText("Thread Dump");
      jpanel1.add(_DUMP_HEAP_BUTTON,cc.xy(10,17));

      JLabel jlabel19 = new JLabel();
      jlabel19.setFont(new Font("Dialog",Font.BOLD,11));
      jlabel19.setText("Filter");
      jpanel1.add(jlabel19,cc.xy(12,2));

      __OUTPUT_FILTER.setName("_OUTPUT_FILTER");
      jpanel1.add(__OUTPUT_FILTER,cc.xywh(14,2,7,1));

      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 });
      return jpanel1;
   }

   /**
    * Initializer
    */
   protected void initializePanel()
   {
      setLayout(new BorderLayout());
      add(createPanel(), BorderLayout.CENTER);
   }

}


text:
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,maximum-scale=1">

    <title>gka-preview</title>
</head>
<body>

    <canvas id="gka" width="670" height="23"></canvas>
    <script src="./gka-data.js"></script>
    <script>
    function preloadImage(names, cb, prefix){
        window.gkaCache = window.gkaCache || [];
        var n = 0,img,imgs = {};
        names.forEach(function(name) {
            img = new Image();
            window.gkaCache.push(img);
            img.onload = (function(name, img) {
                return function() {
                    imgs[name] = img;
                    (++n === names.length) && cb && cb(imgs);
                }
            })(name, img);
            img.src = (prefix || '') + name;
        });
    }
    preloadImage(["new1.png","new2.png","new3.png"], function(imgs) {
       var canvas = document.getElementById('gka'),
            ctx = canvas.getContext('2d'),
            frames = data.frames,
            i = 0,
            o = {},
            key = Object.keys(data.animations)[0],
            list = data.animations[key],
            len = list.length;

        var cacheCanvas = document.createElement("canvas"),
            ctxCache = cacheCanvas.getContext("2d");

        cacheCanvas.width = canvas.width;
        cacheCanvas.height = canvas.height;

        setInterval(function(){
            o = list[i];
            ctxCache.clearRect(0, 0, canvas.width, canvas.height);
            o = Object.prototype.toString.call(o)=='[object Array]'? o: [o];
            for (var j = 0, t; j < o.length; j++) {
                t = data.frames[o[j]];
                ctxCache.drawImage((imgs[t.file] || imgs[data.file]), (t.x || data.x || 0), (t.y || data.y || 0), (t.width || data.width), (t.height || data.height), (t.offX || data.offX || 0), (t.offY || data.offY || 0), (t.width || data.width), (t.height || data.height));
            }

            ctx.clearRect(0, 0, canvas.width, canvas.height);

            ctx.drawImage(cacheCanvas, 0, 0, canvas.width, canvas.height);
            i = ++i === len? 0: i;
        }, 40)
    }, "img/")
    </script>
</body>
</html>


text:
import argparse
from glob import glob
from tqdm import tqdm
import json
import os
from pathlib import Path
from mirdata.validate import md5

DATASET_INDEX_PATH = "../mirdata/datasets/indexes/openmic2018_index.json"

def make_dataset_index(dataset_data_path):
    path = Path(dataset_data_path)

    # top-key level metadata
    metadata_checksum = md5(path / Path("openmic-2018-metadata.csv"))
    classmap_checksum = md5(path / Path("class-map.json"))
    label_checksum = md5(path / Path("openmic-2018-aggregated-labels.csv"))
    response_checksum = md5(path / Path("openmic-2018-individual-responses.csv"))
    train_split = path / Path("partitions") / Path("split01_train.csv")
    test_split = path / Path("partitions") / Path("split01_test.csv")
    train_checksum = md5(train_split)
    test_checksum = md5(test_split)

    index_metadata = {
        "metadata": {
            "openmic-metadata": ("openmic-2018-metadata.csv", metadata_checksum),
            "openmic-classmap": ("class-map.json", classmap_checksum),
            "openmic-labels": ("openmic-2018-aggregated-labels.csv", label_checksum),
            "openmic-responses": ("openmic-2018-individual-responses.csv", response_checksum),
            "openmic-train": (str(train_split.relative_to(path)), train_checksum),
            "openmic-test": (str(test_split.relative_to(path)), test_checksum),
        }
    }

    # top-key level tracks
    index_tracks = {}
    for audio_file in tqdm(sorted(path.rglob("*.ogg"))):

        audio_checksum = md5(audio_file)
        arelpath = audio_file.relative_to(path)
        track_id = audio_file.stem

        vggish_file = (path / Path("vggish") / arelpath.parent.stem / track_id).with_suffix(".json")
        vggish_checksum = md5(vggish_file)
        vrelpath = vggish_file.relative_to(path)

        index_tracks[track_id] = {
            "audio": (str(arelpath), audio_checksum),
            "vggish": (str(vrelpath), vggish_checksum),
        }

    # top-key level version
    dataset_index = {"version": "1.0.0"}

    # combine all in dataset index
    dataset_index.update(index_metadata)
    dataset_index.update({"tracks": index_tracks})

    with open(DATASET_INDEX_PATH, "w") as fhandle:
        json.dump(dataset_index, fhandle, indent=2)

def main(args):
    make_dataset_index(args.dataset_data_path)

if __name__ == "__main__":
    PARSER = argparse.ArgumentParser(description="Make dataset index file.")
    PARSER.add_argument(
        "dataset_data_path", type=str, help="Path to dataset data folder."
    )

    main(PARSER.parse_args())


text:
layout: home
---
# Mission

We devote to promoting local cultural heritage in the international community.

### Vision

[Members of Suzhou Heritage](https://github.com/orgs/suzhou-heritage/people) cooperate with [local government](http://www.ylj.suzhou.gov.cn/) to promote local heritage in terms of improving international tourism in Suzhou gardens and providing staff, students and parents in the [SSIS community](http://www.ssis-suzhou.net/) with convenience of deep insight into Suzhou culture.


text: var board = new Board();