text:
import {Component, NgModule} from '@angular/core';
import {waitForAsync, inject, TestBed} from '@angular/core/testing';
import {ComponentPortal, PortalModule} from '@angular/cdk/portal';
import {Platform} from '@angular/cdk/platform';
import {ViewportRuler} from '@angular/cdk/scrolling';
import {Overlay, OverlayContainer, OverlayModule, OverlayRef, OverlayConfig} from '../index';

describe('BlockScrollStrategy', () => {
  let platform: Platform;
  let viewport: ViewportRuler;
  let documentElement: HTMLElement;
  let overlayRef: OverlayRef;
  let componentPortal: ComponentPortal<FocacciaMsg>;
  let forceScrollElement: HTMLElement;

  beforeEach(waitForAsync(() => {
    documentElement = document.documentElement!;

    // Ensure a clean state for every test.
    documentElement.classList.remove('cdk-global-scrollblock');

    TestBed.configureTestingModule({
      imports: [OverlayModule, PortalModule, OverlayTestModule]
    }).compileComponents();
  }));

  beforeEach(inject([Overlay, ViewportRuler, Platform],
    (overlay: Overlay, viewportRuler: ViewportRuler, _platform: Platform) => {
    let overlayConfig = new OverlayConfig({scrollStrategy: overlay.scrollStrategies.block()});

    overlayRef = overlay.create(overlayConfig);
    componentPortal = new ComponentPortal(FocacciaMsg);

    viewport = viewportRuler;
    forceScrollElement = document.createElement('div');
    document.body.appendChild(forceScrollElement);
    forceScrollElement.style.width = '100px';
    forceScrollElement.style.height = '3000px';
    forceScrollElement.style.background = 'rebeccapurple';
    platform = _platform;
  }));

  afterEach(inject([OverlayContainer], (container: OverlayContainer) => {
    overlayRef.dispose();
    forceScrollElement.remove();
    window.scroll(0, 0);
    container.getContainerElement().remove();
  }));

  it('should toggle scroll blocking along the y axis', skipIOS(() => {
    window.scroll(0, 100);
    expect(viewport.getViewportScrollPosition().top)
      .withContext('Expected viewport to be scrollable initially.').toBe(100);

    overlayRef.attach(componentPortal);
    expect(documentElement.style.top)
      .withContext('Expected  element to be offset by the previous scroll amount.')
      .toBe('-100px');

    window.scroll(0, 300);
    expect(viewport.getViewportScrollPosition().top)
      .withContext('Expected the viewport not to scroll.').toBe(100);

    overlayRef.detach();
    expect(viewport.getViewportScrollPosition().top)
      .withContext('Expected old scroll position to have bee restored after disabling.').toBe(100);

    window.scroll(0, 300);
    expect(viewport.getViewportScrollPosition().top)
      .withContext('Expected user to be able to scroll after disabling.').toBe(300);
  }));

  it('should toggle scroll blocking along the x axis', skipIOS(() => {
    forceScrollElement.style.height = '100px';
    forceScrollElement.style.width = '3000px';

    window.scroll(100, 0);
    expect(viewport.getViewportScrollPosition().left)
      .withContext('Expected viewport to be scrollable initially.').toBe(100);

    overlayRef.attach(componentPortal);
    expect(documentElement.style.left)
      .withContext('Expected  element to be offset by the previous scroll amount.')
      .toBe('-100px');

    window.scroll(300, 0);
    expect(viewport.getViewportScrollPosition().left)
      .withContext('Expected the viewport not to scroll.').toBe(100);

    overlayRef.detach();
    expect(viewport.getViewportScrollPosition().left)
      .withContext('Expected old scroll position to have bee restored after disabling.').toBe(100);

    window.scroll(300, 0);
    expect(viewport.getViewportScrollPosition().left)
      .withContext('Expected user to be able to scroll after disabling.').toBe(300);
  }));

  it('should toggle the `cdk-global-scrollblock` class', skipIOS(() => {
    expect(documentElement.classList).not.toContain('cdk-global-scrollblock');

    overlayRef.attach(componentPortal);
    expect(documentElement.classList).toContain('cdk-global-scrollblock');

    overlayRef.detach();
    expect(documentElement.classList).not.toContain('cdk-global-scrollblock');
  }));

  it('should restore any previously-set inline styles', skipIOS(() => {
    const root = documentElement;

    root.style.top = '13px';
    root.style.left = '37px';

    overlayRef.attach(componentPortal);

    expect(root.style.top).not.toBe('13px');
    expect(root.style.left).not.toBe('37px');

    overlayRef.detach();

    expect(root.style.top).toBe('13px');
    expect(root.style.left).toBe('37px');

    root.style.top = '';
    root.style.left = '';
  }));

  it(`should't do anything if the page isn't scrollable`, skipIOS(() => {
    forceScrollElement.style.display = 'none';
    overlayRef.attach(componentPortal);
    expect(documentElement.classList).not.toContain('cdk-global-scrollblock');
  }));

  it('should keep the content width', () => {
    forceScrollElement.style.width = '100px';

    const previousContentWidth = documentElement.getBoundingClientRect().width;

    overlayRef.attach(componentPortal);

    expect(documentElement.getBoundingClientRect().width).toBe(previousContentWidth);
  });

  it('should not clobber user-defined scroll-behavior', skipIOS(() => {
    const root = documentElement;
    const body = document.body;
    const rootStyle = root.style as CSSStyleDeclaration & {scrollBehavior: string};
    const bodyStyle = body.style as CSSStyleDeclaration & {scrollBehavior: string};

    rootStyle.scrollBehavior = bodyStyle.scrollBehavior = 'smooth';

    // Get the value via the style declaration in order to
    // handle browsers that don't support the property yet.
    const initialRootValue = rootStyle.scrollBehavior;
    const initialBodyValue = rootStyle.scrollBehavior;

    overlayRef.attach(componentPortal);
    overlayRef.detach();

    expect(rootStyle.scrollBehavior).toBe(initialRootValue);
    expect(bodyStyle.scrollBehavior).toBe(initialBodyValue);

    // Avoid bleeding styles into other tests.
    rootStyle.scrollBehavior = bodyStyle.scrollBehavior = '';
  }));

  /**
   * Skips the specified test, if it is being executed on iOS. This is necessary, because
   * programmatic scrolling inside the Karma iframe doesn't work on iOS, which renders these
   * tests unusable. For example, something as basic as the following won't work:
   * ```
   * window.scroll(0, 100);
   * expect(viewport.getViewportScrollPosition().top).toBe(100);
   * ```
   * @param spec Test to be executed or skipped.
   */
  function skipIOS(spec: Function) {
    return () => {
      if (!platform.IOS) {
        spec();
      }
    };
  }

});

/** Simple component that we can attach to the overlay. */
@Component({template: '
Focaccia
'})
class FocacciaMsg { }

/** Test module to hold the component. */
@NgModule({
  imports: [OverlayModule, PortalModule],
  declarations: [FocacciaMsg],
  entryComponents: [FocacciaMsg],
})
class OverlayTestModule { }


text:
<page-layout [ready]="data$ | async">
  <ng-container *ngIf="data">
    <page-content
      [mode]="userFilter || directionsFilter ? 'filters' : 'emptyFilters' "
      [heading]="resolveHeading()" [mobileHeading]="resolveHeading(true)"
      [headingActions]="headingActions$ | async">

          <ng-container *ngIf="userFilter">

                <user-link [user]="data.user"></user-link>

          </ng-container>
          <ng-container *ngIf="directionsFilter">

              <radio-group-field formControlName="direction"
                [label]="i18n.reference.direction.direction">
                <field-option [value]="ReferenceDirectionEnum.GIVEN"
                  [text]="i18n.reference.direction.given"></field-option>
                <field-option [value]="ReferenceDirectionEnum.RECEIVED"
                  [text]="i18n.reference.direction.received"></field-option>
              </radio-group-field>

          </ng-container>

    </page-content>

    <page-content *ngIf="(layout.gtsm$ | async) && (stats$ | async)"
      mode="table">

          {{ i18n.reference.value }}
          {{ i18n.reference.allTime }}

          {{ i18n.reference.last30Days }}

              <rating-stats class="w-100 pr-3" [level]="entry.level"
                [textLeft]="entry.text">
              </rating-stats>

              <ng-container
                *ngTemplateOutlet="columnData; context: {count: allTime?.counts[entry.level], total: allTime?.total }">
              </ng-container>

              <ng-container
                *ngTemplateOutlet="columnData; context: {count: last30Days?.counts[entry.level], total: last30Days?.total }">
              </ng-container>

            {{ i18n.reference.total }}
             {{
              allTime?.total }}

              {{ last30Days?.total }}

              {{ i18n.reference.percentagePositive }}

              {{ ((allTime?.totalPositive / allTime?.total) || 0 | percent) }}

              {{ ((last30Days?.totalPositive / last30Days?.total) || 0 |
              percent) }}

    </page-content>

    <results-layout resultType="list" [results]="results$ | async"
      (update)="update($event)" [rendering$]="rendering$" [toLink]="toLink">

      <mobile-result *mobileResult="let row"
        [avatarImage]="row.relatedUser.image" [avatarIcon]="SvgIcon.Person">

              {{ row.relatedUser.display }}

              {{ row.date | dateTime }}

              <rating-stats [level]="row.level"></rating-stats>

      </mobile-result>

          {{ i18n.general.date }}
          {{ i18n.general.name }}
          {{ i18n.reference.level.level }}
          {{ i18n.general.description }}

          <ng-container *ngFor=" let row of (results$ | async)?.results">

              {{ row.date | dateTime }}
              {{ row.relatedUser.display }}

                <rating-stats [level]="row.level"></rating-stats>

                {{ row.comments }}

                <button *ngIf="data.manage" type="button"
                  [tooltip]="i18n.general.remove" class="btn btn-icon"
                  (click)="remove(row)">
                  <icon [icon]="SvgIcon.Trash"></icon>
                </button>

          </ng-container>

    </results-layout>
  </ng-container>
</page-layout>

<ng-template #columnData let-count="count" let-total="total">

 0" class="bar"
      [ngStyle]="{'width': (count / total) * 190 + 'px'}">

     0}">{{ count }}

</ng-template>

redpajama_set_name: RedPajamaGithub


text:
A composer package for dockerizing your Magento 1.9.x

The composer package **wambo/dockerize-magento1** adds Docker and Docker Compose files to your Magento 1 project so you can run your Magento 1 shop without having to install Apache/Nginx, MySQL or PHP on your system.

## Installation

Make sure you have the right [deploy strategy](https://github.com/Cotya/magento-composer-installer/blob/master/doc/Deploy.md) for your project. Because docker will not work if your docker-compose.yml is just a symlink:

- If you use the "copy" strategy, you don't have to change anything.
- If you use the default "symlink" strategy you must create an exception for `wambo/dockerize-magento1` in your composer.json:

    ```json
    {
    	"extra":{
    		"magento-deploystrategy": "symlink",
            "magento-deploystrategy-overwrite": {
                "wambo/dockerize-magento1": "copy"
            }
    	}
    }
    ```

Add `wambo/dockerize-magento1` to your Magento 1 project:

```bash
composer require wambo/dockerize-magento1
```

Choose a database name and the passwords for the root user and shop user in the `.env` file:

```
DATABASE_ROOT_PASSWORD=rootUserPassword68J49AC2224U3n9
DATABASE_USER=magento
DATABASE_PASSWORD=magentoUserPassword7pJ344229w6V6d6
DATABASE_NAME=magento1dockerized
```

Build and start the docker containers:

```bash
docker-compose up -d
```

## Software Requirements

For Linux users you must have a recent version of [docker](https://github.com/docker/docker/releases) and [docker-compose](https://github.com/docker/compose/releases) installed.

If you are a Mac or Windows user, use Docker for Mac or Docker for Windows:

- [Docker for Mac](https://www.docker.com/docker-mac)
- [Docker for Windows](https://www.docker.com/docker-windows)

## Licensing

dockerize-magento1 is licensed under the Apache License, Version 2.0.
See [LICENSE](LICENSE) for the full license text.

## Related projects

- [github.com/andreaskoch/dockerized-magento](https://github.com/andreaskoch/dockerized-magento) is very similar to this package but its focus is more on being a self-contained Magento shop environment whereas **wambo/dockerize-magento1**'s emphasis is more on adding docker to an existing project
- [github.com/arvatoSCM/dockerize-magento2](https://github.com/arvatoSCM/dockerize-magento2) is the Magento 2 equivalent to **wambo/dockerize-magento1**


text:
// Copyright 2022 The Oppia Authors. All Rights Reserved.
//
// 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 Module for the view learner group page.
 */

import { NgModule } from '@angular/core';
import { SharedComponentsModule } from 'components/shared-component.module';
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
import { CommonModule } from '@angular/common';
import { Error404PageModule } from 'pages/error-pages/error-404/error-404-page.module';
import { SmartRouterModule } from 'hybrid-router-module-provider';
import { ViewLearnerGroupPageRootComponent } from './view-learner-group-page-root.component';
import { ViewLearnerGroupPageRoutingModule } from './view-learner-group-page-routing.module';
import { ViewLearnerGroupPageComponent } from './view-learner-group-page.component';
import { LearnerGroupOverviewComponent } from '../edit-group/learner-group-overview.component';
import { LearnerGroupViewAssignedSyllabusComponent } from './learner-group-view-assigned-syllabus.component';
import { LearnerGroupLearnerSpecificProgressComponent } from '../edit-group/learner-group-learner-specific-progress.component';
import { LearnerGroupPreferencesModalComponent } from '../templates/learner-group-preferences-modal.component';
import { ExitLearnerGroupModalComponent } from '../templates/exit-learner-group-modal.component';

@NgModule({
  imports: [
    CommonModule,
    NgbPopoverModule,
    SharedComponentsModule,
    // TODO(#13443): Remove smart router module provider once all pages are
    // migrated to angular router.
    SmartRouterModule,
    ViewLearnerGroupPageRoutingModule,
    Error404PageModule
  ],
  declarations: [
    ViewLearnerGroupPageComponent,
    ViewLearnerGroupPageRootComponent,
    LearnerGroupOverviewComponent,
    LearnerGroupViewAssignedSyllabusComponent,
    LearnerGroupLearnerSpecificProgressComponent,
    ExitLearnerGroupModalComponent,
    LearnerGroupPreferencesModalComponent
  ],
  entryComponents: [
    ViewLearnerGroupPageComponent,
    ViewLearnerGroupPageRootComponent,
    LearnerGroupOverviewComponent,
    LearnerGroupViewAssignedSyllabusComponent,
    LearnerGroupLearnerSpecificProgressComponent,
    ExitLearnerGroupModalComponent,
    LearnerGroupPreferencesModalComponent
  ]
})
export class ViewLearnerGroupPageModule {}


text:
You are logged in

Name:  {{auth.name()}}

Email:  {{auth.email()}}


text:
package org.eclipse.jbpm;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import bpsim.BpsimPackage;
import com.google.gwt.core.client.GWT;
import com.google.gwt.xml.client.Document;
import com.google.gwt.xml.client.Node;
import com.google.gwt.xml.client.XMLParser;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.di.BpmnDiPackage;
import org.eclipse.dd.dc.DcPackage;
import org.eclipse.dd.di.DiPackage;
import org.eclipse.emf.common.util.Reflect;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
import org.eclipse.emf.ecore.xmi.resource.xml.XMLSave;
import org.eclipse.emf.ecore.xmi.util.ElementHandler;
import org.jboss.drools.DroolsPackage;
import org.omg.spec.bpmn.non.normative.color.impl.ColorPackageImpl;

public class Bpmn2Resource extends XMLResourceImpl {

    static final String URI_BPMN2 = "http://www.omg.org/spec/BPMN/20100524/MODEL";
    static final String URI_DI = "http://www.omg.org/spec/DD/20100524/DI";
    static final String URI_DC = "http://www.omg.org/spec/DD/20100524/DC";
    static final String URI_BPMN_DI = "http://www.omg.org/spec/BPMN/20100524/DI";
    static final String URI_DROOLS = "http://www.jboss.org/drools";
    static final String URI_BPSIM = "http://www.bpsim.org/schemas/1.0";
    private final QNameURIHandler uriHandler;

    static {
        initPackageRegistry(EPackage.Registry.INSTANCE,
                            DroolsPackage.eINSTANCE,
                            BpsimPackage.eINSTANCE,
                            BpmnDiPackage.eINSTANCE,
                            DiPackage.eINSTANCE,
                            DcPackage.eINSTANCE,
                            Bpmn2Package.eINSTANCE);
        initGwtReflectTypes();
    }

    protected Bpmn2Resource(URI uri) {
        super(uri);
        this.uriHandler = new QNameURIHandler(new BpmnXmlHelper(this));
    }

    public void load(Node node) throws IOException {
        super.load(node, createLoadOptions());
    }

    public void load(String contents) throws IOException {
        XMLParser parser = createParser();
        Document doc = parser.parse(contents);
        load(doc);
    }

    public String toBPMN2() throws IOException {
        String raw = "";
        try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
            this.save(outputStream, createSaveOptions());
            raw = outputStream.toString("UTF-8");
        }
        return raw;
    }

    @Override
    protected XMLSave createXMLSave() {
        return new JBPMXMLSave(createXMLHelper()) {
            @Override
            protected boolean shouldSaveFeature(EObject o, EStructuralFeature f) {
                if (Bpmn2Package.eINSTANCE.getDocumentation_Text().equals(f)) {
                    return false;
                }
                if (Bpmn2Package.eINSTANCE.getFormalExpression_Body().equals(f)) {
                    return false;
                }
                return super.shouldSaveFeature(o,
                                               f);
            }
        };
    }

    XMLParser createParser() {
        return GWT.create(XMLParser.class);
    }

    Map<Object, Object> createSaveOptions() {
        final Map<Object, Object> options = createDefaultOptions();
        options.put(XMLResource.OPTION_DECLARE_XML, true);
        options.put(XMLResource.OPTION_ELEMENT_HANDLER, new ElementHandler(true));
        options.put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, new ArrayList<>());
        return options;
    }

    Map<Object, Object> createLoadOptions() {
        Map<Object, Object> options = createDefaultOptions();
        options.put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, new HashMap<>());
        options.put(XMLResource.OPTION_DOM_USE_NAMESPACES_IN_SCOPE, true);
        return options;
    }

    static void initGwtReflectTypes() {
        Reflect.register(Object.class, new Reflect.Helper() {
            @Override
            public boolean isInstance(Object instance) {
                return true;
            }

            @Override
            public Object newArrayInstance(int size) {
                return new Object[size];
            }
        });
    }

    static void initPackageRegistry(EPackage.Registry packageRegistry,
                                    DroolsPackage drools,
                                    BpsimPackage bpsim,
                                    BpmnDiPackage bpmnDiPackage,
                                    DiPackage diPackage,
                                    DcPackage dcPackage,
                                    Bpmn2Package bpmn2Package) {
        packageRegistry.put(URI_BPMN2, bpmn2Package);
        packageRegistry.put(URI_DI, diPackage);
        packageRegistry.put(URI_DC, dcPackage);
        packageRegistry.put(URI_BPMN_DI, bpmnDiPackage);
        packageRegistry.put(URI_DROOLS, drools);
        packageRegistry.put(URI_BPSIM, bpsim);
        ColorPackageImpl.init();
    }

    private Map<Object, Object> createDefaultOptions() {
        final Map<Object, Object> options = new HashMap<Object, Object>();
        options.put(XMLResource.OPTION_ENCODING, "UTF-8");
        options.put(XMLResource.OPTION_EXTENDED_META_DATA, new XmlExtendedMetadata());
        options.put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, true);
        options.put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, true);
        options.put(XMLResource.OPTION_DISABLE_NOTIFY, true);
        options.put(XMLResource.OPTION_PROCESS_DANGLING_HREF, XMLResource.OPTION_PROCESS_DANGLING_HREF_RECORD);
        //*important* to resolve property proxy (BasicEObjectImpl.eResolveProxy)
        options.put(XMLResource.OPTION_URI_HANDLER, uriHandler);
        return options;
    }
}


text:
require 'simplecov'
SimpleCov.start
require 'snitch'
require 'vcr'
require 'webmock/rspec'

Dir[File.join(".", "spec/support/**/*.rb")].each { |f| require f }

WebMock.disable_net_connect!(allow_localhost: true, allow: 'codeclimate.com')

VCR.configure do |c|
  c.cassette_library_dir = 'spec/cassettes'
  c.hook_into :webmock
  c.configure_rspec_metadata!
  c.preserve_exact_body_bytes { true }
end

RSpec.configure do |config|
  config.backtrace_exclusion_patterns = [
    /\/lib\d*\/ruby\//,
    /bin\//,
    /gems/,
    /spec\/spec_helper\.rb/,
    /lib\/rspec\/(core|expectations|matchers|mocks)/
  ]

  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end
end


text:
<?xml version='1.0' encoding='utf-8'?>
<Jobs>
  <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="98828b53-f953-4ffe-9171-04ec74691950">
    <WebsiteUrl />
    <UserAgent />
    <UserNotes />
    <LastFileSize>15462400</LastFileSize>
    <LastFileDate>2015-09-22T13:05:43-06:00</LastFileDate>
    <IgnoreFileInformation>false</IgnoreFileInformation>
    <DownloadBeta>Default</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator />
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables>
      <item>
        <key>
          <string>nopush</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>--nopush</TextualContent>
            <Name>nopush</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>version</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>/projects/tortoisesvn/files/([\d\.]+)</Regex>
            <Url>https://sourceforge.net/projects/tortoisesvn/files/</Url>
            <Name>version</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>url</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <Url />
            <TextualContent>{getMirror}/{getMirrorPath}</TextualContent>
            <Name>url</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>url64</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>{urlArray}</TextualContent>
            <Name>url64</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>getUrl</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>="?([^ "'<>\*]+\.msi)(?=/download\s*title="[\w\d\s\.-]+32)</Regex>
            <Url>http://tortoisesvn.net/downloads.html</Url>
            <Name>getUrl</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>getUrl64</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>="?([^ "'<>\*]+\.msi)(?=/download\s*title="[\w\d\s\.-]+64)</Regex>
            <Url>http://tortoisesvn.net/downloads.html</Url>
            <Name>getUrl64</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>checksum64file</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <Url>{version}</Url>
            <TextualContent>{getUrl64}</TextualContent>
            <Name>checksum64file</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>urlArray</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>@('{getUrl}', '{getUrl64}')</TextualContent>
            <Name>urlArray</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>getMirrorUrl</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>http[^ "'<>\*]+\.pdf/download</Regex>
            <Url>https://sourceforge.net/projects/tortoisesvn/files/{version}/Documentation/</Url>
            <Name>getMirrorUrl</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>getMirror</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>RegularExpression</VariableType>
            <Regex>(?<=ResponseUri: )([^ "'<>\*]+tortoisesvn)/</Regex>
            <Url>{getMirrorUrl}</Url>
            <Name>getMirror</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>getMirrorPath</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <Url />
            <TextualContent>{getUrl:regex:{version}.*$}</TextualContent>
            <Name>getMirrorPath</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>cscript</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>2</TextualContent>
            <Name>cscript</Name>
          </UrlVariable>
        </value>
      </item>
    </Variables>
    <ExecuteCommand />
    <ExecutePreCommand />
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <Category />
    <SourceType>FixedUrl</SourceType>
    <PreviousLocation>F:\exe\TortoiseSVN-1.9.2.26806-win32-svn-1.9.2.msi</PreviousLocation>
    <DeletePreviousFile>false</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2015-09-29T14:23:27.299688-06:00</LastUpdated>
    <TargetPath>{workdir}\</TargetPath>
    <FixedDownloadUrl>{url}</FixedDownloadUrl>
    <Name>tortoisesvn</Name>
  </ApplicationJob>
</Jobs>


text:
CFDeployer
================

## Installing

```
$ gem install cf_deployer
```

## Basic Help

```shell
Commands:
  cf_deploy config [ENVIRONMENT]                     # Show parsed config
  cf_deploy deploy [ENVIRONMENT] [COMPONENT]         # Deploy the specified components
  cf_deploy destroy [ENVIRONMENT] [COMPONENT]        # Destroy the specified environment/component
  cf_deploy help [COMMAND]                           # Describe available commands or one specific command
  cf_deploy json [ENVIRONMENT] [COMPONENT]           # Show parsed CloudFormation JSON for the target component
  cf_deploy kill_inactive [ENVIRONMENT] [COMPONENT]  # Destroy the inactive stack for a given component/environment
  cf_deploy status [ENVIRONMENT] [COMPONENT]         # Show the status of the specified Cloud Formation components specified in your yml
  cf_deploy switch [ENVIRONMENT] [COMPONENT]         # Switch active and inactive stacks

Options:
  -f, [--config-file=CONFIG-FILE]  # cf_deployer config file
                                   # Default: config/cf_deployer.yml
  -l, [--log-level=LOG-LEVEL]      # logging level
                                   # Default: info
                                   # Possible values: info, debug, aws-debug
  -d, [--dry-run]                  # Say what we would do but don't actually make changes to anything
  -s, [--settings=key:value]       # key:value pair to overwrite setting in config
  -i, [--inputs=key:value]         # key:value pair to overwrite in template inputs
  -r, [--region=REGION]            # Amazon region
                                   # Default: us-east-1
```


text:
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.templates.subsystems.DriveTrain;

/**
 * The RobotMap is a mapping from the ports sensors and actuators are wired into
 * to a variable name. This provides flexibility changing wiring, makes checking
 * the wiring easier and significantly reduces the number of magic numbers
 * floating around.
 */
public class RobotMap {
    // For example to map the left and right motors, you could define the
    // following variables to use with your drivetrain subsystem.
    // public static final int leftMotor = 1;
    // public static final int rightMotor = 2;

    // If you are using multiple modules, make sure to define both the port
    // number and the module. For example you with a rangefinder:
    // public static final int rangefinderPort = 1;
    // public static final int rangefinderModule = 1;

    public static final int testEncoderA = 1;
    public static final int testEncoderB = 2;
    //NOT CORRECT!!!!!
    public static final int pitchEncoder = 3;
    //NOT CORRECT!!!!!
    public static final int triggerEncoderA = 4;
    public static final int triggerEncoderB = 5;
    //NOT CORRECT!!!!!
    public static final int loadEncoder1 = 6;
    public static final int loadEncoder2 = 7;
    //NOT CORRECT!!!!!
    public static final int shootEncoderA = 8;
    public static final int shootEncoderB = 9;

    public static final int gyro = 2;
    //NOT CORRECT!!!!!
    public static final int pitchMot = 5;
    //NOT CORRECT!!!!!
    public static final int triggerMot = 6;
    //NOT CORRECT!!!!!
    public static final int loadMot1 = 7;
    public static final int loadMot2 = 8;
    //NOT CORRECT!!!!!
    public static final int shootMot = 9;

    //NOT CORRECT!!!!!
    public static final int topSensor = 1;
    public static final int bottomSensor = 2;
    public static final int triggerSensor = 3;

}


text:
  Rocquemont est
       un village
       situé dans le département de Seine-Maritime en Haute-Normandie. Elle comptait 754 habitants en 2008.

Si vous pensez venir habiter à Rocquemont, vous pourrez facilement trouver une maison à vendre.

À proximité de Rocquemont sont situées les villes de
Bosc-Bérenger localisée à 4 km, 184 habitants,
Montérolier à 5 km, 515 habitants,
Saint-Martin-Osmonville à 4 km, 1 061 habitants,
La Rue-Saint-Pierre à 5 km, 573 habitants,
Yquebeuf située à 2 km, 240 habitants,
Estouteville-Écalles située à 2 km, 487 habitants,
 entre autres. De plus, Rocquemont est située à seulement 22 km de Rouen.

À Rocquemont, la valeur moyenne à l'achat d'un appartement se situe à zero € du m² en vente. Le prix moyen d'une maison à l'achat se situe à 2 269 € du m². À la location la valorisation moyenne se situe à 7,41 € du m² par mois.

Le nombre d'habitations, à Rocquemont, se décomposait en 2011 en trois appartements et 287 maisons soit
 un marché plutôt équilibré.


text:
category: "sermon"
layout: sermon
series: ""
title: "The Lord's Prayer."
date: "2015-08-02 10:30:00"
audio: "http://media.coggesparish.com/2015-08-02 Simon Kirby.mp3"
speaker: "Simon Kirby"
speaker_info: ""
duration: "15"
youtube_videos: ["NVupXyc5a8M"]
vimeo_videos: [""]
slides: [""]
files: [""]
bible_passages: ["Matthew 6:9-13"]
bible_links: ["Matthew 6:9-13&version=NIVUK"]
bible_videos: [""]
bible_videos_links: [""]
---

Apologies for the poor sound recording at the beginning of Simon's talk. There is also a gap in the middle of Simon's talk of about two minutes. Both are because of a problem with the recording tape.


text:
title: Coworking Session - Unit Testing/Pair Programming
text: Work on your projects together, with a focus on learning to unit test your code. Beginners welcome!
location: MP408
link: https://github.com/UofTCoders/Events/issues/103
date: 2017-06-14
startTime: '18:10'
endTime: '19:30'
---


text:
import process from 'node:process';
import {fileURLToPath} from 'node:url';
import binBuild from 'bin-build';
import bin from './index.js';

bin.run(['-version']).then(() => {
	console.log('mozjpeg pre-build test passed successfully');
}).catch(async error => {
	console.warn(error.message);
	console.warn('mozjpeg pre-build test failed');
	console.info('compiling from source');

	try {
		const config = [];
		const source = fileURLToPath(new URL('../vendor/source/mozjpeg.tar.gz', import.meta.url));

		if (process.platform === 'darwin') {
			config.push('-DCMAKE_PREFIX_PATH=$(brew --prefix libpng)');
		}

		await binBuild.file(source, [
			`cmake -G"Unix Makefiles" ${config.join(' ')} .`,
			'make',
			`mv ./cjpeg ${bin.dest()}`,
		]);

		console.log('mozjpeg built successfully');
	} catch (error) {
		console.error(error.stack);

		// eslint-disable-next-line unicorn/no-process-exit
		process.exit(1);
	}
});


text:
package edu.mayo.mprc.swift.configuration.client.model;

import java.util.ArrayList;

/**
 * A model of an application configuration.
 *

 *
application consists of multiple daemons - different physical JVMs

 *
daemon runs several modules (each module provides some functionality)

 *
module consists of a runner (information about how to run tasks) and a service (does the actual work, runs within the runner)

 *
service is configured using a bunch of properties

 *

 * This model roughly corresponds to {@link edu.mayo.mprc.config.ApplicationConfig}. The main difference is that
 * the config has
service -> runner -> worker
 hierarchy, while the {@link @ApplicationModel} uses
 *
module -> service + runner
, where the latter service is a mix of both {@link edu.mayo.mprc.config.ServiceConfig} and {@link edu.mayo.mprc.config.ResourceConfig} for the worker.
 *

 * To map from {@link edu.mayo.mprc.config.ApplicationConfig} to {@link ApplicationModel} use {@link edu.mayo.mprc.swift.configuration.server.ConfigurationData}.
 *

 */
public final class ApplicationModel extends ResourceModel {
	private static final long serialVersionUID = -581997481411688812L;
	private AvailableModules availableModules;

	public ApplicationModel() {
		super("Application", "application");
	}

	public AvailableModules getAvailableModules() {
		return availableModules;
	}

	public void setAvailableModules(final AvailableModules availableModules) {
		this.availableModules = availableModules;
	}

	public void addDaemon(final DaemonModel daemonModel) {
		addChild(daemonModel);
	}

	public void removeDaemon(final DaemonModel daemonModel) {
		removeChild(daemonModel);
	}

	public ArrayList<DaemonModel> getDaemons() {
		return (ArrayList<DaemonModel>) (ArrayList) getChildren();
	}

	/**
	 * Returns a service/resource of given id (go through all daemons, look at all their children)
	 */
	public ResourceModel getResourceModelForId(final String id) {
		for (final ResourceModel daemonModel : getChildren()) {
			for (final ResourceModel resourceModel : daemonModel.getChildren()) {
				if (resourceModel.getId().equals(id)) {
					return resourceModel;
				}
			}
		}
		return null;
	}

	/**
	 * Returns a service/resource of given type (go through all daemons, look at all their children)
	 */
	public ArrayList<ResourceModel> getResourceModelsForType(final String type) {
		final ArrayList<ResourceModel> resources = new ArrayList<ResourceModel>();
		for (final ResourceModel daemonModel : getChildren()) {
			for (final ResourceModel resourceModel : daemonModel.getChildren()) {
				if (resourceModel.getType().equals(type)) {
					resources.add(resourceModel);
				}
			}
		}
		return resources;
	}
}


text:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<GateDocument>
<!-- The document's features-->

<GateDocumentFeatures>
<Feature>
  <Name className="java.lang.String">gate.SourceURL</Name>
  <Value className="java.lang.String">file:/home/diana/German/data/marked/testa_ne_document5.sgm</Value>
</Feature>
<Feature>
  <Name className="java.lang.String">MimeType</Name>
  <Value className="java.lang.String">text/sgml</Value>
</Feature>
</GateDocumentFeatures>
<!-- The document content area with serialized nodes -->

<TextWithNodes><Node id="0"/>
 -DOCSTART- Tarot und Bauchtanz im Frauen-Seminar <Node id="51"/>FRIEDBERG<Node id="60"/> . Zu einem Wochenendseminar über Tarot und Bauchtanz lädt der <Node id="123"/>Frauenzentrumsverein Friedberg<Node id="153"/> für Samstag , 29. August , und Sonntag , 30. August , ein . Die Veranstaltung dauert jeweils von 11 bis 17 Uhr . Anmeldungen nimmt das <Node id="289"/>Frauenzentrum<Node id="302"/> unter Tel . 0 60 31 / 25 11 entgegen .<Node id="341"/></TextWithNodes>
<!-- The default annotation set -->

<AnnotationSet>
</AnnotationSet>
<!-- Named annotation set -->

<AnnotationSet Name="Key" >
<Annotation Type="ORG" StartNode="123" EndNode="153">
</Annotation>
<Annotation Type="LOC" StartNode="289" EndNode="302">
</Annotation>
<Annotation Type="LOC" StartNode="51" EndNode="60">
</Annotation>
</AnnotationSet>
<!-- Named annotation set -->

<AnnotationSet Name="Original markups" >
<Annotation Type="ORG" StartNode="123" EndNode="153">
</Annotation>
<Annotation Type="LOC" StartNode="51" EndNode="60">
</Annotation>
<Annotation Type="LOC" StartNode="289" EndNode="302">
</Annotation>
<Annotation Type="root" StartNode="0" EndNode="341">
</Annotation>
</AnnotationSet>
</GateDocument>


text:
<!-- Change the string after key= in the script below to the key that you have obtained in the google maps -->
<?php
$gmap_api_key = $this->db->get_where('settings', array('code' => 'SITE_GMAP_API_KEY'))->row()->string_value;
;
?>
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php if (isset($gmap_api_key)) echo $gmap_api_key; ?>" type="text/javascript"> </script>


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE427_Uncontrolled_Search_Path_Element__char_console_68b.c
Label Definition File: CWE427_Uncontrolled_Search_Path_Element.label.xml
Template File: sources-sink-68b.tmpl.c
*/
/*
 * @description
 * CWE: 427 Uncontrolled Search Path Element
 * BadSource: console Read input from the console
 * GoodSource: Use a hardcoded path
 * Sink:
 *    BadSink : Set the environment variable
 * Flow Variant: 68 Data flow: data passed as a global variable from one function to another in different source files
 *
 * */

#include "std_testcase.h"

#include <wchar.h>
#ifdef _WIN32
#define NEW_PATH "%SystemRoot%\\system32"
#define PUTENV _putenv
#else
#define NEW_PATH "/bin"
#define PUTENV putenv
#endif

extern char * CWE427_Uncontrolled_Search_Path_Element__char_console_68_badData;
extern char * CWE427_Uncontrolled_Search_Path_Element__char_console_68_goodG2BData;

/* all the sinks are the same, we just want to know where the hit originated if a tool flags one */

#ifndef OMITBAD

void CWE427_Uncontrolled_Search_Path_Element__char_console_68b_badSink()
{
    char * data = CWE427_Uncontrolled_Search_Path_Element__char_console_68_badData;
    /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
    PUTENV(data);
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodG2B uses the GoodSource with the BadSink */
void CWE427_Uncontrolled_Search_Path_Element__char_console_68b_goodG2BSink()
{
    char * data = CWE427_Uncontrolled_Search_Path_Element__char_console_68_goodG2BData;
    /* POTENTIAL FLAW: Set a new environment variable with a path that is possibly insecure */
    PUTENV(data);
}

#endif /* OMITGOOD */


text:
int    max_n(int a, int b);
int    min_n(int a, int b);
float  max_f(float a, float b);
float  min_f(float a, float b);
int    clamp_i(int x, int min, int max);
float  clamp_f(float x, float min, float max);
int    unirandom_i(int beg, int end);
float  unirandom_f(float beg, float end);
bool   unirandom_b();
bool   eps_eql(float a, float b);

#endif


text:
<!DOCTYPE html>

		<meta charset="UTF-8">
		<title>幽灵按钮👻</title>
		<link rel="stylesheet" href="css/button.css" />

					MISSION

					PLAY

					TOUCH


text:
package net.bootsfaces.component.kebab;

import java.io.IOException;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.FacesRenderer;

import net.bootsfaces.render.CoreRenderer;

/** This class generates the HTML code of . */
@FacesRenderer(componentFamily = "net.bootsfaces.component", rendererType = "net.bootsfaces.component.kebab.Kebab")
public class KebabRenderer extends CoreRenderer {

	/**
	 * This methods generates the HTML code of the current b:kebab.
	 * encodeBegin generates the start of the component. After the, the JSF framework calls encodeChildren()
	 * to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel component
	 * the content of the panel is generated by encodeChildren(). After that, encodeEnd() is called
	 * to generate the rest of the HTML code.
	 * @param context the FacesContext.
	 * @param component the current b:kebab.
	 * @throws IOException thrown if something goes wrong when writing the HTML code.
	 */
	/*
	 *

        <button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebab" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">

        </button>

Action

Another action

Something else here

Separated link

	 */
	@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
	    if (!component.isRendered()) {
	        return;
	    }
		Kebab kebab = (Kebab) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = kebab.getClientId();

		// Kebabs are a restyled version of a dropdown and support the same feature set.
		// They look like a very tight burger menu.

		//

		rw.startElement("div", kebab);
		rw.writeAttribute("id", kebab.getId(), "id");
	    String s="dropdown dropdown-kebab dropdown-kebab-bf dropdown-kebab-pf";
	    if(kebab.getStyleClass()!=null){
	    	s=s.concat(" ").concat(kebab.getStyleClass());
	    }
	    rw.writeAttribute("class", s, "class");

	    if(kebab.getStyle()!=null){
	    	rw.writeAttribute("style", kebab.getStyle(), "style");
	    }

	    //Button
	    //<button id="dropdownKebab" class="btn btn-link dropdown-toggle" type="button" data-toggle="dropdown"
	    //aria-haspopup="true" aria-expanded="true">
	    rw.startElement("button", kebab);
	    rw.writeAttribute("id", kebab.getId()+"_btn", "id");
	    rw.writeAttribute("class", "btn btn-link dropdown-toggle", "class");
	    rw.writeAttribute("type", "button", "type");
	    rw.writeAttribute("data-toggle", "dropdown", "data-toggle");
	    //ARIA Attributes
	    rw.writeAttribute("aria-haspopup", "true", "aria-haspopup");
	    rw.writeAttribute("aria-expanded", "true", "aria-expanded");

	    //
	    rw.startElement("span", kebab);
	    rw.writeAttribute("class", "fa fa-ellipsis-v", "class");
	    rw.endElement("span");
	    rw.endElement("button");

	    //

	    rw.startElement("ul", kebab);
	    rw.writeAttribute("class", "dropdown-menu ", "class");
	    rw.writeAttribute("aria-labelledby", kebab.getId()+"_btn", "aria-labelledby");

		//rw.writeText("Dummy content of b:kebab", null);

	}

	/**
	 * This methods generates the HTML code of the current b:kebab.
	 * encodeBegin generates the start of the component. After the, the JSF framework calls encodeChildren()
	 * to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel component
	 * the content of the panel is generated by encodeChildren(). After that, encodeEnd() is called
	 * to generate the rest of the HTML code.
	 * @param context the FacesContext.
	 * @param component the current b:kebab.
	 * @throws IOException thrown if something goes wrong when writing the HTML code.
	 */
	@Override
	public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
		if (!component.isRendered()) {
			return;
		}
		Kebab kebab = (Kebab) component;
		ResponseWriter rw = context.getResponseWriter();
		rw.endElement("ul");
		rw.endElement("div");

	}

}


text:
<?php

/**
 * @file
 * Contains \Drupal\filter\FilterFormatEditFormController.
 */

namespace Drupal\filter;

use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

/**
 * Provides a form controller for adding a filter format.
 */
class FilterFormatEditFormController extends FilterFormatFormControllerBase {

  /**
   * {@inheritdoc}
   */
  public function form(array $form, array &$form_state) {
    if (!$this->entity->status()) {
      throw new NotFoundHttpException();
    }

    drupal_set_title($this->entity->label());
    $form = parent::form($form, $form_state);
    $form['roles']['#default_value'] = array_keys(filter_get_roles_by_format($this->entity));
    return $form;
  }

  /**
   * {@inheritdoc}
   */
  public function submit(array $form, array &$form_state) {
    parent::submit($form, $form_state);
    drupal_set_message(t('The text format %format has been updated.', array('%format' => $this->entity->label())));
    return $this->entity;
  }

}


text:
var http = require('http');
var url = require('url');

function start(route){
	function onRequest(request,response){
		var pathName = url.parse(request.url).pathname;
		console.log("Request for " + pathName + " received.");

		route(pathName);
		response.writeHead(200,{"Content-Type":"text/plain"});
		response.write("this is a server-----garyhu");
		response.end();
	}

	http.createServer(onRequest).listen(8888);
	console.log("Server has started.");
}

exports.start = start;


text:
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

            </button>
            PtPHP Framework


text:
package com.codepath.apps.restclienttemplate;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.codepath.apps.restclienttemplate.models.Tweet;
import com.loopj.android.http.JsonHttpResponseHandler;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import cz.msebera.android.httpclient.Header;

public class ReplyActivity extends AppCompatActivity {

    EditText tvReply;
    TwitterClient client;
    private final int REQUEST_CODE = 20;
    Tweet tweetReply;

    String tweet;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_reply);
        client = TwitterApp.getRestClient();
        tvReply = (EditText) findViewById(R.id.tvReply);
        tweet = tvReply.getText().toString();

        tweetReply = getIntent().getParcelableExtra("tweet");

        mTextView = (TextView) findViewById(R.id.tvCounter);
        tvReply.addTextChangedListener(tvCounter);
        tvReply.setText("@" + tweetReply.user.screenName + " ");
    }

    private TextView mTextView;

    private final TextWatcher tvCounter = new TextWatcher() {
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        }

        public void onTextChanged(CharSequence s, int start, int before, int count) {
            //This sets a textview to the current length
            mTextView.setText(String.valueOf(140-s.length()));
        }

        public void afterTextChanged(Editable s) {
        }
    };

    public void onSubmit(View v) {

        tweet = tvReply.getText().toString();

        // closes the activity and returns to first screen
        client.replyTweet(tweet, tweetReply, new JsonHttpResponseHandler() {
            @Override
            public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
                Log.d("TwitterClient", response.toString());

                try {
                    Tweet tweet = Tweet.fromJSON(response);
                    Intent i = new Intent(ReplyActivity.this, TimelineActivity.class);
                    i.putExtra("tweet", tweet); // pass arbitrary data to launched activity
                    startActivityForResult(i, REQUEST_CODE);
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }

            @Override
            public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
                Log.d("TwitterClient", responseString);
                throwable.printStackTrace();
            }

            @Override
            public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {
                Log.d("TwitterClient", errorResponse.toString());
                throwable.printStackTrace();
            }

            @Override
            public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {
                Log.d("TwitterClient", errorResponse.toString());
                throwable.printStackTrace();
            }
        });

        Intent data = new Intent();
        // Pass relevant data back as a result
        data.putExtra("name", tvReply.getText().toString());
        data.putExtra("code", 200); // ints work too
        // Activity finished ok, return the data
        setResult(RESULT_OK, data);

        this.finish();
    }

}


text:
<?php

class RakutenRws_ApiResponse_AppRakutenResponseTest extends PHPUnit_Framework_TestCase
{
    public function test() {
        $data = array(
            'data' => 'the data'
        );

        $httpResponse = new RakutenRws_HttpResponse(
            'http://example.com',
            array(),
            200,
            array(),
            json_encode($data)
        );
        $response = new RakutenRws_ApiResponse_AppRakutenResponse('operation', $httpResponse);

        $response->setIterator(array('foo', 'bar'));

        $this->assertEquals('operation', $response->getOperation());
        $this->assertTrue($response->isOk());
        $this->assertEquals($httpResponse, $response->getHttpResponse());
        $this->assertEquals(200, $response->getCode());
        $this->assertEquals('', $response->getMessage());
        $this->assertEquals($data, $response->getData());
        $this->assertTrue(isset($response['data']));
        $this->assertFalse(isset($response['Foo']));
        $this->assertEquals(array('foo', 'bar'), iterator_to_array($response));

    }

    public function testError() {
        $httpResponse = new RakutenRws_HttpResponse(
            'http://example.com',
            array(),
            404,
            array(),
            json_encode(array(
                'error' => 'not_found',
                'error_description' => 'not found'
            ))
        );
        $response = new RakutenRws_ApiResponse_AppRakutenResponse('operation', $httpResponse);

        $this->assertFalse($response->isOk());
        $this->assertEquals(404, $response->getCode());
        $this->assertEquals('not_found: not found', $response->getMessage());
    }

    /**
     *
     * @expectedException RakutenRws_Exception
     */
    public function testBrokenData() {
        $httpResponse = new RakutenRws_HttpResponse(
            'http://example.com',
            array(),
            404,
            array(),
            ''
        );
        $response = new RakutenRws_ApiResponse_AppRakutenResponse('operation', $httpResponse);
    }
}


text:
"""
    KubeVirt API

    This is KubeVirt API an add-on for Kubernetes.

    OpenAPI spec version: 1.0.0
    Contact: kubevirt-dev@googlegroups.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import os
import sys
import unittest

import kubevirt
from kubevirt.rest import ApiException
from kubevirt.models.v1_rtc_timer import V1RTCTimer

class TestV1RTCTimer(unittest.TestCase):
    """ V1RTCTimer unit test stubs """

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testV1RTCTimer(self):
        """
        Test V1RTCTimer
        """
        # FIXME: construct object with mandatory attributes with example values
        #model = kubevirt.models.v1_rtc_timer.V1RTCTimer()
        pass

if __name__ == '__main__':
    unittest.main()


text:
<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="/style/style.css">


text:
package org.ensembl.healthcheck.testcase.generic;

import org.ensembl.healthcheck.DatabaseRegistry;
import org.ensembl.healthcheck.DatabaseRegistryEntry;
import org.ensembl.healthcheck.ReportManager;
import org.ensembl.healthcheck.Team;
import org.ensembl.healthcheck.testcase.SingleDatabaseTestCase;
import org.ensembl.healthcheck.util.DBUtils;

/**
 * Check that the meta entries related to the taxonomy are in sync with the
 * NCBI database
 **/

public class MetaTaxonomy extends SingleDatabaseTestCase {

	final protected String taxonomyDbName = "ncbi_taxonomy";

	public MetaTaxonomy() {
		setDescription("Check that the meta entries related to the taxonomy are in sync with the NCBI database");
		setTeamResponsible(Team.RELEASE_COORDINATOR);
	}

	public boolean run(DatabaseRegistryEntry coreDbre) {

		// Find the NCBI database
		DatabaseRegistryEntry ncbiDbre = findTaxonomyDatabase(coreDbre, DBUtils.getMainDatabaseRegistry());

		if (ncbiDbre != null) {
			boolean result = true;
			for (int species_id : coreDbre.getSpeciesIds()) {
				// Extract the taxon_id of this genome
				String sql_taxon_id = "SELECT meta_value FROM meta WHERE meta_key = \"species.taxonomy_id\" AND species_id = " + species_id;
				String taxon_id = DBUtils.getRowColumnValue(coreDbre.getConnection(), sql_taxon_id);
				// Check the meta keys
				result &= checkScientificName(ncbiDbre, coreDbre, species_id, taxon_id);
				result &= checkFirstClassificationName(ncbiDbre, coreDbre, species_id, taxon_id);
				result &= checkRestOfClassification(ncbiDbre, coreDbre, species_id, taxon_id);
			}
			return result;
		} else {
			return false;
		}
	}

	/**
	 * Scan the DatabaseRegistry and find the entry of the NCBI Taxonomy
	 * database.
	 * For some reason, the type of the taxonomy database is "unknown", so
	 * we can't compare {@code entry.getType()} to {@code
	 * DatabaseType.NCBI_TAXONOMY}
	 */
	protected DatabaseRegistryEntry findTaxonomyDatabase(final DatabaseRegistryEntry coreDbre, final DatabaseRegistry dbr) {
		for (DatabaseRegistryEntry entry : dbr.getAllEntries()) {
			if (entry.getName().equals(taxonomyDbName)) {
				return entry;
			}
		}
		ReportManager.problem(this, coreDbre.getConnection(), "No ncbi_taxonomy database found");
		return null;
	}

	/**
	 * Helper method that compares a name coming from the core database to
	 * the expected name from the NCBI taxonomy database.
	 * This method is used in all the comparisons of this module and
	 * provides a consistent way of reporting the errors
	 */
	protected boolean compareNames(final DatabaseRegistryEntry coreDbre, final String name_description, int species_id, String taxon_id, final String name_core_db, final String name_taxonomy_db) {
		/* Check scientific name in compara and core meta */
		if (name_core_db.equals(name_taxonomy_db)) {
			ReportManager.info(this, coreDbre.getConnection(), name_description + " of species_id=" + species_id + " is the same as expected (" + name_core_db + ") based on the taxonomy id (" + taxon_id + ")");
			return true;
		} else {
			ReportManager.problem(this, coreDbre.getConnection(), name_description + " of species_id=" + species_id + " (" + name_core_db + ") differs from what is expected (" + name_taxonomy_db + ") based on the taxonomy id (" + taxon_id + ")");
			return false;
		}
	}

	/**
	 * Check that the scientific_name meta key is the same as expected
	 * based on the taxon_id
	 */
	public boolean checkScientificName(final DatabaseRegistryEntry ncbiDbre, final DatabaseRegistryEntry coreDbre, int species_id, String taxon_id) {

		String sql_core_db = "SELECT meta_value FROM meta WHERE meta_key = \"species.scientific_name\" AND species_id = " + species_id;
		String name_core_db = DBUtils.getRowColumnValue(coreDbre.getConnection(), sql_core_db);

		String sql_taxonomy_db = "SELECT name FROM ncbi_taxa_name WHERE name_class = \"scientific name\" AND taxon_id = " + taxon_id;
		String name_taxonomy_db = DBUtils.getRowColumnValue(ncbiDbre.getConnection(), sql_taxonomy_db);

		return compareNames(coreDbre, "Scientific name", species_id, taxon_id, name_core_db, name_taxonomy_db);
	}

	/**
	 * Check that the first element of the classification array is the
	 * same as the scientific name
	 */
	public boolean checkFirstClassificationName(final DatabaseRegistryEntry ncbiDbre, final DatabaseRegistryEntry coreDbre, int species_id, String taxon_id) {
		String sql_core_db = "SELECT meta_value FROM meta WHERE meta_key = \"species.classification\" AND species_id = " + species_id + " ORDER BY meta_id LIMIT 1";
		String name_core_db = DBUtils.getRowColumnValue(coreDbre.getConnection(), sql_core_db);

		String sql_taxonomy_db = "SELECT name FROM ncbi_taxa_name WHERE name_class = \"scientific name\" AND taxon_id = " + taxon_id;
		String name_taxonomy_db = DBUtils.getRowColumnValue(ncbiDbre.getConnection(), sql_taxonomy_db);

		return compareNames(coreDbre, "First classification name", species_id, taxon_id, name_core_db, name_taxonomy_db);
	}

	/**
	 * Check that the classification array (except the first element) are
	 * the same as traversing the NCBI taxonomy upwards from the genome's
	 * parent node
	 */
	public boolean checkRestOfClassification(final DatabaseRegistryEntry ncbiDbre, final DatabaseRegistryEntry coreDbre, int species_id, String taxon_id) {
		/* This check is quite complex as the taxonomy is stored in very different ways in taxonomy
		   and core DBs. In the former, the tree structure is stored in the ncbi_taxa_node table
		   while the names are in the ncbi_taxa_name table. In the core DB, the taxonomy is
		   stored in the meta table as values of the key "species.classification" and they
		   should be sorted by meta_id. In the core DB, only the abbreviated lineage is
		   described which means that we have to ignore ncbi_taxa_node with the
		   genbank_hidden_flag set. */
		String values1[] = DBUtils.getRowValues(ncbiDbre.getConnection(), "SELECT rank, parent_id, genbank_hidden_flag FROM ncbi_taxa_node WHERE taxon_id = " + taxon_id);

		if (values1.length == 0) {
			// if no rows are fetched, this taxon is missing from the taxonomy DB
			ReportManager.problem(this, ncbiDbre.getConnection(), "No entry for " + taxon_id);
			return false;

		} else {

			// Extract the clasification from the NCBI database
			String ncbiClassification = "";
			String this_taxon_id = values1[1];
			while (!this_taxon_id.equals("0")) {
				values1 = DBUtils.getRowValues(ncbiDbre.getConnection(), "SELECT rank, parent_id, genbank_hidden_flag FROM ncbi_taxa_node WHERE taxon_id = " + this_taxon_id);
				if ( // values1[2].equals("0") &&       // we used to filter out entries with genbank_hidden_flag, we don't anymore
						!values1[1].equals("1") && !values1[1].equals("0") &&
						!values1[0].equals("subgenus") && !values1[0].equals("genus") && !values1[0].equals("species subgroup") && !values1[0].equals("species group")
				   ) {
					String taxonName = DBUtils.getRowColumnValue(ncbiDbre.getConnection(), "SELECT name FROM ncbi_taxa_name WHERE name_class = \"scientific name\" AND taxon_id = " + this_taxon_id);
					ncbiClassification += " " + taxonName;
				}
				this_taxon_id = values1[1];
			}

			// And from the core database
			String core_classification = "";
			String[] classification_values = DBUtils.getColumnValues(coreDbre.getConnection(), "SELECT meta_value FROM meta WHERE meta_key = \"species.classification\" AND species_id = " + species_id + " ORDER BY meta_id");
			/* Skip first value as it is part of the species name and not the lineage */
			for (int a = 1; a < classification_values.length; a++) {
				core_classification += " " + classification_values[a];
			}

			// NOTE: both strins have a leading space
			return compareNames(coreDbre, "Classification", species_id, taxon_id, core_classification, ncbiClassification);
		}
	}
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Danthonia glandulosa Schrad.

### Remarks
null


text:
import unittest

from kfp.deprecated import components as comp
from kfp.deprecated.components.structures import ComponentReference, ComponentSpec, GraphImplementation, GraphInputReference, GraphSpec, InputSpec, OutputSpec, TaskOutputArgument, TaskSpec

from kfp.deprecated.components._yaml_utils import load_yaml

class GraphComponentTestCase(unittest.TestCase):

    def test_handle_constructing_graph_component(self):
        task1 = TaskSpec(
            component_ref=ComponentReference(name='comp 1'),
            arguments={'in1 1': 11})
        task2 = TaskSpec(
            component_ref=ComponentReference(name='comp 2'),
            arguments={
                'in2 1':
                    21,
                'in2 2':
                    TaskOutputArgument.construct(
                        task_id='task 1', output_name='out1 1')
            })
        task3 = TaskSpec(
            component_ref=ComponentReference(name='comp 3'),
            arguments={
                'in3 1':
                    TaskOutputArgument.construct(
                        task_id='task 2', output_name='out2 1'),
                'in3 2':
                    GraphInputReference(input_name='graph in 1').as_argument()
            })

        graph_component1 = ComponentSpec(
            inputs=[
                InputSpec(name='graph in 1'),
                InputSpec(name='graph in 2'),
            ],
            outputs=[
                OutputSpec(name='graph out 1'),
                OutputSpec(name='graph out 2'),
            ],
            implementation=GraphImplementation(
                graph=GraphSpec(
                    tasks={
                        'task 1': task1,
                        'task 2': task2,
                        'task 3': task3,
                    },
                    output_values={
                        'graph out 1':
                            TaskOutputArgument.construct(
                                task_id='task 3', output_name='out3 1'),
                        'graph out 2':
                            TaskOutputArgument.construct(
                                task_id='task 1', output_name='out1 2'),
                    })))

    def test_handle_parsing_graph_component(self):
        component_text = '''\
inputs:
- {name: graph in 1}
- {name: graph in 2}
outputs:
- {name: graph out 1}
- {name: graph out 2}
implementation:
  graph:
    tasks:
      task 1:
        componentRef: {name: Comp 1}
        arguments:
            in1 1: 11
      task 2:
        componentRef: {name: Comp 2}
        arguments:
            in2 1: 21
            in2 2: {taskOutput: {taskId: task 1, outputName: out1 1}}
      task 3:
        componentRef: {name: Comp 3}
        arguments:
            in3 1: {taskOutput: {taskId: task 2, outputName: out2 1}}
            in3 2: {graphInput: {inputName: graph in 1}}
    outputValues:
      graph out 1: {taskOutput: {taskId: task 3, outputName: out3 1}}
      graph out 2: {taskOutput: {taskId: task 1, outputName: out1 2}}
'''
        struct = load_yaml(component_text)
        ComponentSpec.from_dict(struct)

    def test_fail_on_cyclic_references(self):
        component_text = '''\
implementation:
  graph:
    tasks:
      task 1:
        componentRef: {name: Comp 1}
        arguments:
            in1 1: {taskOutput: {taskId: task 2, outputName: out2 1}}
      task 2:
        componentRef: {name: Comp 2}
        arguments:
            in2 1: {taskOutput: {taskId: task 1, outputName: out1 1}}
'''
        struct = load_yaml(component_text)
        with self.assertRaises(TypeError):
            ComponentSpec.from_dict(struct)

    def test_handle_parsing_predicates(self):
        component_text = '''\
implementation:
  graph:
    tasks:
      task 1:
        componentRef: {name: Comp 1}
      task 2:
        componentRef: {name: Comp 2}
        arguments:
            in2 1: 21
            in2 2: {taskOutput: {taskId: task 1, outputName: out1 1}}
        isEnabled:
            not:
                and:
                    op1:
                        '>':
                            op1: {taskOutput: {taskId: task 1, outputName: out1 1}}
                            op2: 0
                    op2:
                        '==':
                            op1: {taskOutput: {taskId: task 1, outputName: out1 2}}
                            op2: 'head'
'''
        struct = load_yaml(component_text)
        ComponentSpec.from_dict(struct)

    def test_handle_parsing_task_execution_options_caching_strategy(self):
        component_text = '''\
implementation:
  graph:
    tasks:
      task 1:
        componentRef: {name: Comp 1}
        executionOptions:
          cachingStrategy:
            maxCacheStaleness: P30D
'''
        struct = load_yaml(component_text)
        component_spec = ComponentSpec.from_dict(struct)
        self.assertEqual(
            component_spec.implementation.graph.tasks['task 1']
            .execution_options.caching_strategy.max_cache_staleness, 'P30D')

    def test_load_graph_component(self):
        component_text = '''\
inputs:
- {name: graph in 1}
- {name: graph in 2}
outputs:
- {name: graph out 1}
- {name: graph out 2}
- {name: graph out 3}
- {name: graph out 4}
implementation:
  graph:
    tasks:
      task 1:
        componentRef:
          spec:
            name: Component 1
            inputs:
            - {name: in1_1}
            outputs:
            - {name: out1_1}
            - {name: out1_2}
            implementation:
              container:
                image: busybox
                command: [sh, -c, 'echo "$0" > $1; echo "$0" > $2', {inputValue: in1_1}, {outputPath: out1_1}, {outputPath: out1_2}]
        arguments:
            in1_1: '11'
      task 2:
        componentRef:
          spec:
            name: Component 2
            inputs:
            - {name: in2_1}
            - {name: in2_2}
            outputs:
            - {name: out2_1}
            implementation:
              container:
                image: busybox
                command: [sh, -c, 'cat "$0" "$1" > $2', {inputValue: in2_1}, {inputValue: in2_2}, {outputPath: out2_1}]
        arguments:
            in2_1: '21'
            in2_2: {taskOutput: {taskId: task 1, outputName: out1_1}}
      task 3:
        componentRef:
          spec:
            name: Component 3
            inputs:
            - {name: in3_1}
            - {name: in3_2}
            outputs:
            - {name: out3_1}
            implementation:
              container:
                image: busybox
                command: [sh, -c, 'cat "$0" "$1" > $2', {inputValue: in3_1}, {inputValue: in3_2}, {outputPath: out3_1}]
        arguments:
            in3_1: {taskOutput: {taskId: task 2, outputName: out2_1}}
            in3_2: {graphInput: {inputName: graph in 1}}
    outputValues:
      graph out 1: {taskOutput: {taskId: task 3, outputName: out3_1}}
      graph out 2: {taskOutput: {taskId: task 1, outputName: out1_2}}
      graph out 3: {graphInput: {inputName: graph in 2}}
      graph out 4: '42'
'''
        op = comp.load_component_from_text(component_text)
        task = op('graph 1', 'graph 2')
        self.assertEqual(len(task.outputs), 4)

    def test_load_nested_graph_components(self):
        component_text = '''\
inputs:
- {name: graph in 1}
- {name: graph in 2}
outputs:
- {name: graph out 1}
- {name: graph out 2}
- {name: graph out 3}
- {name: graph out 4}
implementation:
  graph:
    tasks:
      task 1:
        componentRef:
          spec:
            name: Component 1
            inputs:
            - {name: in1_1}
            outputs:
            - {name: out1_1}
            - {name: out1_2}
            implementation:
              container:
                image: busybox
                command: [sh, -c, 'echo "$0" > $1; echo "$0" > $2', {inputValue: in1_1}, {outputPath: out1_1}, {outputPath: out1_2}]
        arguments:
            in1_1: '11'
      task 2:
        componentRef:
          spec:
            name: Component 2
            inputs:
            - {name: in2_1}
            - {name: in2_2}
            outputs:
            - {name: out2_1}
            implementation:
              container:
                image: busybox
                command: [sh, -c, 'cat "$0" "$1" > $2', {inputValue: in2_1}, {inputValue: in2_2}, {outputPath: out2_1}]
        arguments:
            in2_1: '21'
            in2_2: {taskOutput: {taskId: task 1, outputName: out1_1}}
      task 3:
        componentRef:
          spec:
            inputs:
            - {name: in3_1}
            - {name: in3_2}
            outputs:
            - {name: out3_1}
            implementation:
              graph:
                tasks:
                  graph subtask:
                    componentRef:
                      spec:
                        name: Component 3
                        inputs:
                        - {name: in3_1}
                        - {name: in3_2}
                        outputs:
                        - {name: out3_1}
                        implementation:
                          container:
                            image: busybox
                            command: [sh, -c, 'cat "$0" "$1" > $2', {inputValue: in3_1}, {inputValue: in3_2}, {outputPath: out3_1}]
                    arguments:
                      in3_1: {graphInput: {inputName: in3_1}}
                      in3_2: {graphInput: {inputName: in3_1}}
                outputValues:
                  out3_1: {taskOutput: {taskId: graph subtask, outputName: out3_1}}
        arguments:
          in3_1: {taskOutput: {taskId: task 2, outputName: out2_1}}
          in3_2: {graphInput: {inputName: graph in 1}}
    outputValues:
      graph out 1: {taskOutput: {taskId: task 3, outputName: out3_1}}
      graph out 2: {taskOutput: {taskId: task 1, outputName: out1_2}}
      graph out 3: {graphInput: {inputName: graph in 2}}
      graph out 4: '42'
'''
        op = comp.load_component_from_text(component_text)
        old_value = comp._components._always_expand_graph_components = True
        try:
            task = op('graph 1', 'graph 2')
        finally:
            comp._components._always_expand_graph_components = old_value
        self.assertIn(
            'out3_1', str(task.outputs['graph out 1'])
        )  # Checks that the outputs coming from tasks in nested subgraphs are properly resolved.
        self.assertIn('out1_2', str(task.outputs['graph out 2']))
        self.assertEqual(task.outputs['graph out 3'], 'graph 2')
        self.assertEqual(task.outputs['graph out 4'], '42')

#TODO: Test task name conversion to Argo-compatible names

if __name__ == '__main__':
    unittest.main()


text:
title: Curriculum Vitae
layout: article
---

##Education##

####City University of New York, Graduate Center####
- Ph.D., Music Theory, 2013
- Honors: Chancellor's Fellow (2007–2012)

####University of Cincinnati, College–Conservatory of Music####
- M.M., Music Theory, 2007
- Honors: Graduate Teaching Fellow (2004–2007)

####Furman University####
- B.M., Magna Cum Laude (Double Major: Saxophone Performance and Music Theory), 2004
- Honors: Theodore Presser Scholar; Phi Beta Kappa

##Dissertation and Thesis##

####[Twelve-tone Cartography: Space, Chains, and Intimations of 'Tonal' Form in Anton Webern's Twelve-tone Music](http://pqdtopen.proquest.com/pqdtopen/doc/1467748705.html?FMT=AI)####

- Award: Nominated for the Barry S. Brook Dissertation Award from the City University of New York
- Advised by: Joseph N. Straus (Primary Advisor); Philip Lambert; Shaugn O'Donnell; Julian Hook, Indiana University

####Integrating Analytical Elements Through Transpositional Combination in Two Works by George Crumb####

- Award: Nominated for the Midwestern Association of Graduate Schools Distinguished Thesis Award
- Advised by: C. Catherine Losada (Primary Advisor); David Carson Berry; Steven J. Cahn

##Teaching experience##

####[University at Buffalo](http://www.music.buffalo.edu/)####
- Assistant Professor, August 2014–present
- Teach courses and conduct research in post-tonal music theory and analysis, Schenkerian theory and analysis, and popular music. Advise theses and dissertations.

####[Furman University](http://www2.furman.edu/academics/music/Pages/default.aspx)####
- Visiting Assistant Professor, 2010–14
- Courses taught:  Freshman and Sophomore Music Theory and Aural Skills, Form and Analysis, Counterpoint, Seminar: Analyzing Pop-Rock Music, Independent Study Advising

####Brooklyn College####
- Graduate Teaching Fellow, 2008–10
- Courses taught: Freshman and Sophomore Music Theory and Aural Skills, Graduate Seminar: Schenkerian Analysis I, Schenkerian Analysis for Undergraduate Students, Graduate Seminar: Post-Tonal Theory and Analysis

####University of Cincinnati####
- Graduate Teaching Assistant, 2004–7
- Courses Taught: Freshman Music Theory and Aural Skills, Honors Music Theory and Aural Skills, Undergraduate Post-tonal Music Theory, Graduate Theory Review

##Select presentations##
- "Chrysalis Gestures in Kaija Saariaho's *Sept Papillons*." Prsentation to the Post-1945 interest group at the *Society for Music Theory,* Milwaukee, Wisconsin, 2014.
- "A Flipped, Category-Based Approach to Teaching Classical Form." Annual meeting of *FlipCamp Music Theory*, Newark, Delaware, 2014.
- "How is Webern's Music Combinatorial?" Annual meeting of the *Society for Music Theory*, Charlotte, NC, 2013; annual meeting of the *Music Theory Society of New York State*, Stony Brook, NY 2013.
- "Tonal Maps, Syntax, and Some Applications in Webern's Twelve-Tone Music," invited lecture at the University of Cincinnati, College-Conservatory of Music, Cincinnati, OH, 2013.
- "A Spatial Representation of Webern's 'Synthesis' and an Analysis of 'Blitz und Donner,' from the Cantata I." Annual meeting of *Music Theory Midwest*, Ann Arbor, MI, 2012.
- "Webern's Chains." Presentation to the Graduate Student Workshop Program at the annual meeting of the *Society for Music Theory*, Minneapolis, MN, 2011.
- "Improvisation and Innovation: Beethoven's Sketches for the First Movement of Op. 31, no. 1." Annual meeting of the *Music Theory Society of the Mid-Atlantic*, Washington, D.C., 2011.
- "Who Said That? Dialogue and Repetition in Three Soldier Songs from Mahler's Des Knaben Wunderhorn." Annual meeting of the *Music Theory Society of New York State*, New York, New York, 2010.
- "Getting RICH: Chain Transformations and Row Areas in Webern's Op. 22, ii." Annual meeting of the *Society for Music Theory*, Montréal, 2009 and the *Music Theory Society of New York State*, Hempstead, NY, 2009.
- "Transpositional Combination and the Analysis of Form in George Crumb's Lux Aeterna." Annual meeting of *Music Theory Southeast*, Athens, GA, 2007; annual meeting of *Music Theory Midwest*, Lawrence, KS, 2007; annual meeting of the *West Coast Conference for Music Theory and Analysis*, Salt Lake City, 2007.
	- Recipient of Music Theory Southeast's "Best Student Essay" Award
- "Transpositional Combination and Collectional Interaction in George Crumb's Vox Balaenae" Annual meeting of the *Florida State University Music Theory Society Forum*, Tallahassee, FL, 2006; annual meeting of Music Theory Midwest, Muncie, IN, 2006.
- "Music as Metaphor: John Harbison's 'The Flight into Egypt'. " *National Conference for Undergraduate Research*, Salt Lake City, 2004.
	- Recipient of Best Student Paper award from the Gamma Beta chapter of Pi Kappa Lambda, 2004
- "Validating a Rhythmic Analysis of Béla Bartók's Fourth String Quartet." *National Conference for Undergraduate Research*, 2003.

##Publications##
- [*Open Music Theory: an open-source, interactive, online "text"book*.](http://www.openmusictheory.com) Co-authored with Kris Shaffer and Bryn Hughes, ed. Robin Wharton (Hybrid Pedagogy Publishing, 2014).
- ["Using Criterion-Referenced Assessment to Encourage Active Analytical Listening,"](http://www.flipcamp.org/engagingstudents2/essays/moseley.html) in Engaging Students: Essays in Music Pedagogy, vol. 2, 2014.
- "Transpositional Combination and the Analysis of Form in George Crumb's Lux Aeterna," in Musical Currents from the Left Coast, ed. Jack Boss and Bruce Quaglia (Cambridge: Cambridge Scholars Press, 2008): 174–191.
- "Theme, "Key," and "False Recapitulation" in Webern's Quartet, Op. 22, II." In preparation.
- "The 'little wings,' 'they bear within themselves' the 'whole' ... form": Cyclic Composition and Musical Images of Nature in Webern's Cantata I, Op. 29." In preparation.

##Workshops##
- Writing about Hearing and Making Aggregate-Based Music, PLP Workshop at the annual meeting of the Society for Music Theory, 2014, Instructor: Andrew Mead
- Hearing Schemas/Schema Hearings, Workshop at the annual meeting of Music Theory Midwest, 2012, Instructors: Robert Gjerdingen and Vasili Byros
- Exploring Musical Spaces, Graduate Student Workshop Program at the annual meeting of the Society for Music Theory, 2011, Instructor: Julian Hook

##Academic and Professional service##
- Webmaster, Society for Music Theory, 2014–present
- Associate Webmaster, Society for Music Theory, 2013–2014
- Networking Committee, Society for Music Theory, 2013–present
- Editorial Board, Engaging Students: Essays in Music Pedagogy, 2013-2014
- Programming Committee, FlipCamp — an unconference on the inverted classroom, 2013
- Theory and Composition Recruiting and Scholarship Interviews, Furman University, 2010–present
- Speaker's Committee, City University of New York, Graduate Center 2008–2010
- Assistant Webmaster, City University of New York, Graduate Center, Department of Music, 2008–2010
- Graduate Student Association, University of Cincinnati, Conservatory of Music, 2006–2007
- Programming Committee, CCM Music Theory and Musicology Society, 2006–2007


text:
// Author: jmaessen@google.com (Jan Maessen)

// Unit tests for endian-dependent operations used in image rewriting.

#include "net/instaweb/rewriter/public/image_data_lookup.h"
#include "net/instaweb/util/public/gtest.h"

namespace net_instaweb {
namespace {

TEST(ImageEndianTest, CharToIntTest) {
  EXPECT_EQ(0xff, CharToInt(-1));
  // Worried about C++ implicit conversions to/from int for arg passing:
  EXPECT_EQ(0x05, CharToInt(static_cast<char>(0xffffff05)));
  EXPECT_EQ(0x83, CharToInt(static_cast<char>(0xffffff83)));
  EXPECT_EQ(0x33, CharToInt(0x33));
  // Now test deserialization from buffer full of negative values
  const char buf[] = { 0xf1, 0xf2, 0xf3, 0xf4, 0 };
  EXPECT_EQ(0xf1f2, JpegIntAtPosition(buf, 0));
  EXPECT_EQ(0xf2f3, JpegIntAtPosition(buf, 1));
  EXPECT_EQ(0xf2f1, GifIntAtPosition(buf, 0));
  EXPECT_EQ(0xf4f3, GifIntAtPosition(buf, 2));
  EXPECT_EQ(static_cast<int>(0xf1f2f3f4), PngIntAtPosition(buf, 0));
}

}  // namespace
}  // namespace net_instaweb


text:
module ActiveExample
  class Base
  end
end


text:
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.ui.favicon;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;

import androidx.annotation.Nullable;
import androidx.core.graphics.drawable.RoundedBitmapDrawable;

import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.components.browser_ui.widget.RoundedIconGenerator;
import org.chromium.ui.base.ViewUtils;

/**
 * Utilities to deal with favicons.
 */
public class FaviconUtils {
    /**
     * Creates a {@link RoundedIconGenerator} to generate circular {@link Bitmap}s of favicons.
     * @param resources The {@link Resources} for accessing color and dimen resources.
     * @return A {@link RoundedIconGenerator} that uses the default circle icon style. Intended
     *         for monograms, e.g. a circle with character(s) in the center.
     */
    public static RoundedIconGenerator createCircularIconGenerator(Resources resources) {
        int displayedIconSize = resources.getDimensionPixelSize(R.dimen.circular_monogram_size);
        int cornerRadius = displayedIconSize / 2;
        int textSize = resources.getDimensionPixelSize(R.dimen.circular_monogram_text_size);
        return new RoundedIconGenerator(displayedIconSize, displayedIconSize, cornerRadius,
                getIconColor(resources), textSize);
    }

    /**
     * Creates a {@link RoundedIconGenerator} to generate rounded rectangular {@link Bitmap}s of
     * favicons.
     * @param resources The {@link Resources} for accessing color and dimen resources.
     * @return A {@link RoundedIconGenerator} that uses the default rounded rectangle icon
     *         style. Intended for monograms, e.g. a rounded rectangle with character(s) in the
     *         center.
     */
    public static RoundedIconGenerator createRoundedRectangleIconGenerator(Resources resources) {
        int displayedIconSize = resources.getDimensionPixelSize(R.dimen.default_favicon_size);
        int cornerRadius = resources.getDimensionPixelSize(R.dimen.default_favicon_corner_radius);
        int textSize = resources.getDimensionPixelSize(R.dimen.default_favicon_icon_text_size);
        return new RoundedIconGenerator(displayedIconSize, displayedIconSize, cornerRadius,
                getIconColor(resources), textSize);
    }

    /**
     * Creates a {@link RoundedBitmapDrawable} using the provided {@link Bitmap} and a default
     * favicon corner radius.
     * @param resources The {@link Resources}.
     * @param icon The {@link Bitmap} to round.
     * @return A {@link RoundedBitmapDrawable} for the provided {@link Bitmap}.
     */
    public static RoundedBitmapDrawable createRoundedBitmapDrawable(
            Resources resources, Bitmap icon) {
        return ViewUtils.createRoundedBitmapDrawable(resources, icon,
                resources.getDimensionPixelSize(R.dimen.default_favicon_corner_radius));
    }

    /**
     * Creates a {@link Drawable} with the provided icon with
     * nearest-neighbor scaling through {@link Bitmap#createScaledBitmap(Bitmap, int, int,
     * boolean)}, or a fallback monogram.
     * @param icon {@link Bitmap} with the icon to display. If null, a fallback monogram will be
     *         generated.
     * @param url Url to generate a monogram. Used only if {@code icon} is null.
     * @param fallbackColor Color to generate a monogram. Used only if {@code icon} is null.
     * @param iconGenerator RoundedIconGenerator to generate a monogram. Used only if {@code
     *         icon} is null. Side effect: {@link RoundedIconGenerator#setBackgroundColor(int)}
     *         will be called.
     * @param resources {@link Resources} to create a {@link BitmapDrawable}.
     * @param iconSize Width and height of the returned icon in px.
     * @return A {@link Drawable} to be displayed as the favicon.
     */
    public static Drawable getIconDrawableWithoutFilter(@Nullable Bitmap icon, String url,
            int fallbackColor, RoundedIconGenerator iconGenerator, Resources resources,
            int iconSize) {
        if (icon == null) {
            iconGenerator.setBackgroundColor(fallbackColor);
            icon = iconGenerator.generateIconForUrl(url);
            return new BitmapDrawable(resources, icon);
        }
        return createRoundedBitmapDrawable(
                resources, Bitmap.createScaledBitmap(icon, iconSize, iconSize, false));
    }

    /**
     * Creates a {@link Drawable} with the provided icon, or a fallback monogram, with bilinear
     * scaling through {@link Bitmap#createScaledBitmap(Bitmap, int, int, boolean)}, or a fallback
     * default favicon.
     * @param icon {@link Bitmap} with the icon to display. If null, a fallback monogram will be
     *         generated.
     * @param url Url to generate a monogram. Used only if {@code icon} is null.
     * @param iconGenerator RoundedIconGenerator to generate a monogram. Used only if {@code
     *         icon} is null.
     * @param defaultFaviconHelper Helper to generate default favicons.
     * @param resources {@link Resources} to create a {@link BitmapDrawable}.
     * @param iconSize Width and height of the returned icon.
     * @return A {@link Drawable} to be displayed as the favicon.
     */
    public static Drawable getIconDrawableWithFilter(@Nullable Bitmap icon, @Nullable String url,
            RoundedIconGenerator iconGenerator,
            FaviconHelper.DefaultFaviconHelper defaultFaviconHelper, Resources resources,
            int iconSize) {
        if (url == null) {
            return defaultFaviconHelper.getDefaultFaviconDrawable(resources, url, true);
        }
        if (icon == null) {
            icon = iconGenerator.generateIconForUrl(url);
            return new BitmapDrawable(
                    resources, Bitmap.createScaledBitmap(icon, iconSize, iconSize, true));
        }
        return createRoundedBitmapDrawable(
                resources, Bitmap.createScaledBitmap(icon, iconSize, iconSize, true));
    }

    private static int getIconColor(Resources resources) {
        return ApiCompatibilityUtils.getColor(resources, R.color.default_favicon_background_color);
    }
}


text:
#pragma once
#include <aws/elastic-inference/ElasticInference_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace ElasticInference
{
namespace Model
{

  /**
   *
 A throughput entry for an Elastic Inference Accelerator type.

See
   * Also:
   AWS
   * API Reference

   */
  class AWS_ELASTICINFERENCE_API KeyValuePair
  {
  public:
    KeyValuePair();
    KeyValuePair(Aws::Utils::Json::JsonView jsonValue);
    KeyValuePair& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
 The throughput value of the Elastic Inference Accelerator type. It can
     * assume the following values: TFLOPS16bit: the throughput expressed in 16bit
     * TeraFLOPS. TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.

     */
    inline const Aws::String& GetKey() const{ return m_key; }

    /**
     *
 The throughput value of the Elastic Inference Accelerator type. It can
     * assume the following values: TFLOPS16bit: the throughput expressed in 16bit
     * TeraFLOPS. TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.

     */
    inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }

    /**
     *
 The throughput value of the Elastic Inference Accelerator type. It can
     * assume the following values: TFLOPS16bit: the throughput expressed in 16bit
     * TeraFLOPS. TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.

     */
    inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }

    /**
     *
 The throughput value of the Elastic Inference Accelerator type. It can
     * assume the following values: TFLOPS16bit: the throughput expressed in 16bit
     * TeraFLOPS. TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.

     */
    inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }

    /**
     *
 The throughput value of the Elastic Inference Accelerator type. It can
     * assume the following values: TFLOPS16bit: the throughput expressed in 16bit
     * TeraFLOPS. TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.

     */
    inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }

    /**
     *
 The throughput value of the Elastic Inference Accelerator type. It can
     * assume the following values: TFLOPS16bit: the throughput expressed in 16bit
     * TeraFLOPS. TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.

     */
    inline KeyValuePair& WithKey(const Aws::String& value) { SetKey(value); return *this;}

    /**
     *
 The throughput value of the Elastic Inference Accelerator type. It can
     * assume the following values: TFLOPS16bit: the throughput expressed in 16bit
     * TeraFLOPS. TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.

     */
    inline KeyValuePair& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}

    /**
     *
 The throughput value of the Elastic Inference Accelerator type. It can
     * assume the following values: TFLOPS16bit: the throughput expressed in 16bit
     * TeraFLOPS. TFLOPS32bit: the throughput expressed in 32bit TeraFLOPS.

     */
    inline KeyValuePair& WithKey(const char* value) { SetKey(value); return *this;}

    /**
     *
 The throughput value of the Elastic Inference Accelerator type.

     */
    inline int GetValue() const{ return m_value; }

    /**
     *
 The throughput value of the Elastic Inference Accelerator type.

     */
    inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }

    /**
     *
 The throughput value of the Elastic Inference Accelerator type.

     */
    inline void SetValue(int value) { m_valueHasBeenSet = true; m_value = value; }

    /**
     *
 The throughput value of the Elastic Inference Accelerator type.

     */
    inline KeyValuePair& WithValue(int value) { SetValue(value); return *this;}

  private:

    Aws::String m_key;
    bool m_keyHasBeenSet;

    int m_value;
    bool m_valueHasBeenSet;
  };

} // namespace Model
} // namespace ElasticInference
} // namespace Aws


text:
<?php
/**
 * The main template file
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Seattle
 */

get_header(); ?>

		<?php if (have_posts()):
    if (is_home() && !is_front_page()): ?>

<?php single_post_title(); ?>

			<?php endif;
    /* Start the Loop */
    echo '
';
    while (have_posts()):
      the_post();
      //get_template_part('template-parts/content', get_post_format());
      _seattle_grid_item(get_the_ID(), $is_fixed_width = true);
    endwhile;
    echo '
';
    _seattle_pagination();
  else:
    get_template_part('template-parts/content', 'none');
  endif; ?>

<?php get_footer();