text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.blogspot.javaadventure.end2endtesting</groupId>
        <artifactId>end2end-parent</artifactId>
        <version>1.1-SNAPSHOT</version>
    </parent>

    <artifactId>jsf-utils</artifactId>
    <name>OpenEJB support for JSF injection</name>

    <dependencies>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <scope>provided</scope>
            <version>1.2_13</version>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <scope>provided</scope>
            <version>1.2_13</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>javaee-api</artifactId>
            <scope>provided</scope>
            <version>5.0-2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>openejb-core</artifactId>
            <version>3.1.2</version>
            <scope>provided</scope>
            <exclusions>
                <!-- this version of activemq is not available from central -->
                <exclusion>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activemq-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activemq-ra</artifactId>
                </exclusion>
                <!-- junit should not be an openejb exposed dependency -->
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>


text:
(function () {
    'use strict';

    angular
        .module('kalendr.freetime.services')
        .factory('FreeTimes', FreeTimes);

    FreeTimes.$inject = ['$http'];

    /**
     * @namespace FreeTime
     * @returns {Factory}
     */
    function FreeTimes($http) {
        var FreeTimes = {
            create: create
        };

        return FreeTimes;

        /**
         * @name create
         * @desc Create a new FreeTime request
         * @param {string} event_type The type of event to search freetime for (one-time or recurring)
         * @param {*} start_date
         * @param {*} end_date
         * @param {number} duration_hrs Minimum hour duration of freetime
         * @param {number} duration_min Minimum minute duration of freetime
         * @param {*} start_time Search start time
         * @param {*} end_time Search end time
         * @param {Object[]} which_days Which days to search
         * @param {Object[]} users_following Which users to search amongst
         * @returns {Promise}
         * @memberOf kalendr.puds.services.Puds
         */
        function create(event_type, start_date, end_date, duration_hrs, duration_min, start_time, end_time,
                        which_days, users_following) {
            console.log('made it here');
            console.log(event_type + " event type");
            console.log(start_date + " start date");
            console.log(end_date + " end date");
            console.log(duration_hrs + " hours");
            console.log(duration_min + " minutes");
            console.log(start_time + " start time");
            console.log(end_time + " end time");
            which_days.forEach(function (entry) {
                console.log(entry + " day");
            });
            users_following.forEach(function (entry) {
                console.log(entry + " following");
            });
            return $http.post('/api/v1/freetime/', {
                event_type: event_type,
                start_date: start_date,
                end_date: end_date,
                duration_hrs: duration_hrs,
                duration_min: duration_min,
                start_time: start_time,
                end_time: end_time,
                which_days: which_days,
                users_following: users_following
            });
        }
    }
})();

redpajama_set_name: RedPajamaGithub


text:
/**
 * Test case for apemanUpg.
 * Runs with mocha.
 */

const injectmock = require('injectmock')
const co = require('co')
const assert = require('assert')
const apemanUpg = require('../lib/apeman_upg.js')

describe('apeman upg', () => {
  before((done) => {
    done()
  })

  after((done) => {
    injectmock.restoreAll()
    done()
  })

  it('Run command.', () => co(function * () {
    injectmock(apemanUpg, 'npm', (args) => Promise.resolve(true))
    yield apemanUpg({})
  }))
})

/* global describe, before, after, it */


text:
package org.oscm.subscriptionservice.dao;

import java.util.List;

import javax.interceptor.Interceptors;
import javax.persistence.Query;

import org.oscm.converter.ParameterizedTypes;
import org.oscm.dataservice.local.DataService;
import org.oscm.domobjects.Subscription;
import org.oscm.interceptor.ExceptionMapper;
import org.oscm.internal.types.enumtypes.SubscriptionStatus;
import org.oscm.internal.vo.VOInstanceInfo;

@Interceptors({ ExceptionMapper.class })
public class SubscriptionHistoryDao {

    private final DataService dataManager;

    public SubscriptionHistoryDao(DataService ds) {
        this.dataManager = ds;
    }

    public List<String> getAccessInfos(Subscription subscription,
            VOInstanceInfo instance) {
        Query query = dataManager
                .createNamedQuery("SubscriptionHistory.getAccessInfos");
        query.setParameter("subscriptionId", subscription.getSubscriptionId());
        query.setParameter("productInstanceId", instance.getInstanceId());
        query.setParameter("status", SubscriptionStatus.ACTIVE);
        List<String> accessInfo = ParameterizedTypes.list(
                query.getResultList(), String.class);
        return accessInfo;
    }

}


text:
//
//  FGNavigationItem.m
//  train-helper
//
//  Created by 易元 白 on 15/3/13.
//  Copyright (c) 2015年 eldereal. All rights reserved.
//

#import <objc/runtime.h>
#import "FGNavigationBar.h"
#import "FGTypes.h"
#import "UIView+FGStylable.h"
#import "FGReuseItemPool.h"

typedef NS_ENUM(NSUInteger, FGNavigationBarMode)
{
    FGNavigationBarModeNone,
    FGNavigationBarModeLeft,
    FGNavigationBarModeRight,
    FGNavigationBarModeTitle
};

@interface FGNavigationBar : NSObject <FGContext>

@property (nonatomic, assign) FGNavigationBarMode mode;

@property (nonatomic, readonly) UINavigationItem * navigationItem;

@property (nonatomic, weak, readonly) UINavigationController * navigationController;

- (BOOL) beginNavigationBar;

@end

@interface FGNavigationBarStyleBlockHolder : NSObject

+ (FGNavigationBarStyleBlockHolder *) holderWithBlock: (void(^)(UIBarButtonItem *)) block;

@property (copy) void(^ block)(UIBarButtonItem *);

-(void)notify: (UIBarButtonItem *) view;

@end

@interface UIBarButtonItem (FGNavigationBar)<FGWithReuseId>

@property (nonatomic, strong) FGNotifyCustomViewResultHolder * notifyHolder;

@property (nonatomic, strong) FGNavigationBarStyleBlockHolder *applyStyleHolder;

@end

@interface UINavigationItem (FGNavigationBar)

@property (nonatomic, strong) FGReuseItemPool *leftPool;

@property (nonatomic, strong) FGReuseItemPool *rightPool;

@end

static void * NavigationBarVisibleMethodKey = &NavigationBarVisibleMethodKey;
static void * SetTitleMethodKey = &SetTitleMethodKey;
static void * SetTitleViewMethodKey = &SetTitleViewMethodKey;
static void * LeftItemsMethodKey = &LeftItemsMethodKey;
static void * RightItemsMethodKey = &RightItemsMethodKey;
static void * EndMethodKey = &EndMethodKey;

static NSString * TitleDataKey = @"FGNavigationBarTitleDataKey";
static NSString * ShowBackButtonDataKey = @"FGNavigationBarShowBackButtonDataKey";
static NSString * VisibleDataKey = @"FGNavigationBarVisibleDataKey";
static NSObject *beacon = nil;

@implementation FastGui(FGNavigationBar)

+ (void)navigationBarVisible:(BOOL)visible
{
    if (beacon == nil) {
        beacon = [[NSObject alloc] init];
    }
    if ([self customData:NavigationBarVisibleMethodKey data:@{VisibleDataKey: [NSNumber numberWithBool: visible]}] != beacon) {
        //no one handles this message
        [self beginNavigationBar];
        [self navigationBarVisible: visible];
        [self endNavigationBar];
    }
}

+ (void) beginNavigationBar
{
    FGNavigationBar *bar = [[FGNavigationBar alloc] init];
    [self pushContext: bar];
    if (beacon == nil) {
        beacon = [[NSObject alloc] init];
    }
    if(![bar beginNavigationBar]){
        printf("navigation bar should used directly under some view controller, (not in other Begin-End pairs). Otherwise its contents will be ignored");
    }
}

+ (void) navigationBarLeftItems
{
    [self navigationBarLeftItemsWithBackButton: NO];
}

+ (void) navigationBarLeftItemsWithBackButton: (BOOL) showBackButton
{
    [self customData:LeftItemsMethodKey data: @{ShowBackButtonDataKey: [NSNumber numberWithBool: showBackButton]}];
}

/**
 * set navigation item's title of current page
 */
+ (void) navigationTitle: (NSString *) title
{
    if (beacon == nil) {
        beacon = [[NSObject alloc] init];
    }
    if ([self customData:SetTitleMethodKey data:@{TitleDataKey: title}] != beacon) {
        //no one handles this message
        [self beginNavigationBar];
        [self navigationTitle: title];
        [self endNavigationBar];
    }
}

+ (void) navigationTitleWithNextView
{
    [self customData:SetTitleViewMethodKey data:nil];
}

+ (void) navigationBarRightItems
{
    [self customData:RightItemsMethodKey data:nil];
}

+ (void) endNavigationBar
{
    [self customData:EndMethodKey data:nil];
}

@end

@implementation FGNavigationBar

@synthesize parentContext;

- (void) reloadGui
{
    [parentContext reloadGui];
}

- (void) styleSheet
{
    [parentContext styleSheet];
}

- (void) customViewControllerWithReuseId:(NSString *)reuseId initBlock:(FGInitCustomViewControllerBlock)initBlock
{
    [parentContext customViewControllerWithReuseId:reuseId initBlock:initBlock];
}

- (void)dismissViewController
{
    [parentContext dismissViewController];
}

- (BOOL) beginNavigationBar
{
    id<FGContext> ctx = self.parentContext;
    while (ctx!=nil) {
        if([ctx isKindOfClass:[UIViewController class]]){
            _navigationItem = ((UIViewController*)ctx).navigationItem;
            _navigationController = ((UIViewController*)ctx).navigationController;
            break;
        }
        ctx = ctx.parentContext;
    }
    if (self.navigationItem == nil) {
        return NO;
    }
    self.mode = FGNavigationBarModeNone;
    if (self.navigationItem.leftPool == nil) {
        self.navigationItem.leftPool = [[FGReuseItemPool alloc] init];
    }
    if(self.navigationItem.rightPool == nil){
        self.navigationItem.rightPool = [[FGReuseItemPool alloc] init];
    }
    [self.navigationItem.leftPool prepareUpdateItems];
    [self.navigationItem.rightPool prepareUpdateItems];
    return YES;
}

- (id) customViewWithReuseId:(NSString *)reuseId initBlock:(FGInitCustomViewBlock)initBlock resultBlock:(FGGetCustomViewResultBlock)resultBlock applyStyleBlock:(FGStyleBlock)applyStyleBlock
{
    if (self.navigationItem == nil) {
        return nil;
    }
    if (self.mode == FGNavigationBarModeTitle) {
        self.mode = FGNavigationBarModeNone;
        UIView *titleView = self.navigationItem.titleView;
        if (titleView == nil || ![titleView.reuseId isEqualToString: reuseId]) {
            titleView = nil;
        }
        UIView * newTitleView = initBlock(titleView);
        if (newTitleView != titleView) {
            self.navigationItem.titleView = newTitleView;
            newTitleView.reuseId = reuseId;
            [newTitleView sizeStyleSetFrame];
            [newTitleView positionStyleDisabledWithTip: @"views in navigation bar don't support position styles"];
        }
        applyStyleBlock(newTitleView);
        if (resultBlock == nil) {
            return nil;
        }else{
            return resultBlock(newTitleView);
        }
    }else{
        return [self customBarButtonItemWithReuseId:reuseId initBlock:^(UIBarButtonItem * item) {
            UIView *innerView;
            if (item == nil) {
                innerView = initBlock(nil);
                [innerView sizeStyleSetFrame];
                [innerView positionStyleDisabledWithTip: @"views in navigation bar don't support position styles"];
                item = [[UIBarButtonItem alloc] initWithCustomView: innerView];
            }else{
                innerView = item.customView;
                UIView *newInnerView = initBlock(innerView);
                if (newInnerView != innerView) {
                    item = [[UIBarButtonItem alloc] initWithCustomView: newInnerView];
                    [newInnerView sizeStyleSetFrame];
                    [newInnerView positionStyleDisabledWithTip: @"views in navigation bar don't support position styles"];
                }
            }
            return item;
        } resultBlock:^id(UIBarButtonItem * item) {
            if (resultBlock == nil) {
                return nil;
            }else{
                return resultBlock(item.customView);
            }
        } applyStyleBlock:^(UIBarButtonItem * item) {
            applyStyleBlock(item.customView);
        }];
    }
}

- (id) customBarButtonItemWithReuseId: (NSString *)reuseId initBlock: (UIBarButtonItem *(^)(UIBarButtonItem *)) initBlock resultBlock: (id(^)(UIBarButtonItem *)) resultBlock applyStyleBlock:(void(^)(UIBarButtonItem *))applyStyleBlock
{
    if (self.navigationItem == nil) {
        return nil;
    }
    FGReuseItemPool *pool;
    if (self.mode == FGNavigationBarModeLeft) {
        pool = self.navigationItem.leftPool;
    }else if(self.mode == FGNavigationBarModeRight){
        pool = self.navigationItem.rightPool;
    }else{
        printf("You must put views in left/right/title of a navigation item. Otherwise this view will be ignored\n");
        return nil;
    }

    BOOL isNew;
    UIBarButtonItem *item = (UIBarButtonItem *)[pool updateItem:reuseId initBlock:initBlock outputIsNewView:&isNew];

    item.applyStyleHolder = [FGNavigationBarStyleBlockHolder holderWithBlock:applyStyleBlock];
    if (resultBlock == nil) {
        return nil;
    }else{
        return resultBlock(item);
    }
}

- (id)customData:(void *)key data:(NSDictionary *)data
{
    if (self.navigationItem == nil) {
        return nil;
    }
    if(key == SetTitleMethodKey){
        [self navigationTitle: data[TitleDataKey]];
        return beacon;
    }else if(key == NavigationBarVisibleMethodKey){
        [self navigationBarVisible:[(NSNumber *) data[VisibleDataKey] boolValue]];
        return beacon;
    }else if(key == SetTitleViewMethodKey){
        [self navigationTitleView];
    }else if(key == LeftItemsMethodKey){
        [self navigationBarLeftItemsWithBackButton:[(NSNumber *)data[ShowBackButtonDataKey] boolValue]];
    }else if(key == RightItemsMethodKey){
        [self navigationBarRightItems];
    }else if(key == EndMethodKey){
        [self endNavigationBar];
    }else{
        return [parentContext customData:key data:data];
    }

    return nil;
}

- (void) navigationBarLeftItemsWithBackButton: (BOOL) showBackButton
{
    if (self.navigationItem == nil) {
        return;
    }
    self.navigationItem.leftItemsSupplementBackButton = showBackButton;
    self.navigationItem.hidesBackButton = !showBackButton;
    self.mode = FGNavigationBarModeLeft;
}

- (void) navigationBarVisible: (BOOL) visible
{
    if (self.navigationController == nil) {
        return;
    }
    [self.navigationController setNavigationBarHidden:!visible];
}

- (void) navigationTitle: (NSString *) title
{
    if (self.navigationItem == nil) {
        return;
    }
    self.navigationItem.title = title;
}

- (void) navigationTitleView
{
    self.mode = FGNavigationBarModeTitle;
}

- (void) navigationBarRightItems
{
    self.mode = FGNavigationBarModeRight;
}

- (void) endNavigationBar
{
    if (self.navigationItem != nil) {
        [self.navigationItem.leftPool finishUpdateItems:nil needRemove:nil];
        NSArray *leftItems = [NSArray arrayWithArray: self.navigationItem.leftPool.items];
        self.navigationItem.leftBarButtonItems = leftItems;
        for (UIBarButtonItem *item in leftItems) {
            [item.applyStyleHolder notify: item];
            item.applyStyleHolder = nil;
        }

        [self.navigationItem.rightPool finishUpdateItems:nil needRemove:nil];
        NSArray *rightItems = [NSArray arrayWithArray: self.navigationItem.rightPool.items];
        self.navigationItem.rightBarButtonItems = rightItems;
        for (UIBarButtonItem *item in rightItems) {
            [item.applyStyleHolder notify: item];
            item.applyStyleHolder = nil;
        }
    }
    [FastGui popContext];
}

@end

static void * ReuseIdPropertyKey = &ReuseIdPropertyKey;
static void * NotifyHolderPropertyKey = &NotifyHolderPropertyKey;
static void * StyleBlockHolderPropertyKey = &StyleBlockHolderPropertyKey;

@implementation UIBarButtonItem(FGNavigationBar)

- (void)setReuseId:(NSString *)reuseId
{
    objc_setAssociatedObject(self, ReuseIdPropertyKey, reuseId, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (NSString *)reuseId
{
    return objc_getAssociatedObject(self, ReuseIdPropertyKey);
}

- (FGNotifyCustomViewResultHolder *)notifyHolder
{
    return objc_getAssociatedObject(self, NotifyHolderPropertyKey);
}

-(void)setNotifyHolder:(FGNotifyCustomViewResultHolder *)notifyHolder
{
    objc_setAssociatedObject(self, NotifyHolderPropertyKey, notifyHolder, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (void)setApplyStyleHolder:(FGNavigationBarStyleBlockHolder *)applyStyleHolder
{
    objc_setAssociatedObject(self, StyleBlockHolderPropertyKey, applyStyleHolder, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (FGNavigationBarStyleBlockHolder *)applyStyleHolder
{
    return objc_getAssociatedObject(self, StyleBlockHolderPropertyKey);
}

@end

static void * LeftPoolPropertyKey = &LeftPoolPropertyKey;
static void * RightPoolPropertyKey = &RightPoolPropertyKey;

@implementation UINavigationItem (FGNavigationBar)

- (void)setLeftPool:(FGReuseItemPool *)leftPool
{
    objc_setAssociatedObject(self, LeftPoolPropertyKey, leftPool, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (FGReuseItemPool *)leftPool
{
    return objc_getAssociatedObject(self, LeftPoolPropertyKey);
}

- (void)setRightPool:(FGReuseItemPool *)rightPool
{
    objc_setAssociatedObject(self, RightPoolPropertyKey, rightPool, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (FGReuseItemPool *)rightPool
{
    return objc_getAssociatedObject(self, RightPoolPropertyKey);
}

@end

@implementation FGNavigationBarStyleBlockHolder

+ (FGNavigationBarStyleBlockHolder *) holderWithBlock:(void (^)(UIBarButtonItem *))block
{
    FGNavigationBarStyleBlockHolder *holder = [[FGNavigationBarStyleBlockHolder alloc] init];
    holder.block = block;
    return holder;
}

-(void)notify:(UIBarButtonItem *)item
{
    if (self.block != nil) {
        self.block(item);
    }
}

@end


text:
/**
 * Clasp command method bodies.
 */
import fs from 'fs-extra';

import {enableAppsScriptAPI} from '../apiutils.js';
import {authorize, defaultScopes, getLoggedInEmail, scopeWebAppDeploy} from '../auth.js';
import {FS_OPTIONS} from '../constants.js';
import {readManifest} from '../manifest.js';
import {ERROR, LOG} from '../messages.js';
import {hasOauthClientSettings, safeIsOnline} from '../utils.js';
import type {ClaspCredentials} from '../utils.js';

const {readJsonSync} = fs;

interface CommandOption {
  readonly localhost?: boolean;
  readonly creds?: string;
  readonly status?: boolean;
}

/**
 * Logs the user in. Saves the client credentials to an either local or global rc file.
 * @param {object} options The login options.
 * @param {boolean?} options.localhost If true, authorizes without a HTTP server.
 * @param {string?} options.creds The location of credentials file.
 * @param {boolean?} options.status If true, prints who is logged in instead of doing login.
 */
export default async (options: CommandOption): Promise<void> => {
  if (options.status) {
    if (hasOauthClientSettings()) {
      const email = (await safeIsOnline()) ? await getLoggedInEmail() : undefined;
      console.log(email ? LOG.LOGGED_IN_AS(email) : LOG.LOGGED_IN_UNKNOWN);
    } else {
      console.log(LOG.NOT_LOGGED_IN);
    }

    return;
  }

  // Local vs global checks
  const isLocalLogin = Boolean(options.creds);
  if (isLocalLogin && hasOauthClientSettings(true)) {
    console.error(ERROR.LOGGED_IN_LOCAL);
  }

  if (!isLocalLogin && hasOauthClientSettings(false)) {
    console.error(ERROR.LOGGED_IN_GLOBAL);
  }

  console.log(LOG.LOGIN(isLocalLogin));
  // Localhost check
  const useLocalhost = Boolean(options.localhost);

  // Using own credentials.
  if (options.creds) {
    // First read the manifest to detect any additional scopes in "oauthScopes" fields.
    // In the script.google.com UI, these are found under File > Project Properties > Scopes
    const {oauthScopes = []} = await readManifest();
    const scopes = [...new Set<string>([...oauthScopes, scopeWebAppDeploy])];
    console.log('');
    console.log('Authorizing with the following scopes:');
    for (const scope of scopes) {
      console.log(scope);
    }

    console.log(`\nNOTE: The full list of scopes your project may need can be found at script.google.com under:
File > Project Properties > Scopes\n`);

    // Read credentials file.
    const creds = readJsonSync(options.creds, FS_OPTIONS) as Readonly<ClaspCredentials>;
    await authorize({creds, scopes, useLocalhost});
    await enableAppsScriptAPI();

    return;
  }

  // Not using own credentials
  // Use the default scopes needed for clasp.
  await authorize({scopes: defaultScopes, useLocalhost});
};


text:
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\title{David Pierson Bradway, Ph.D.}
\author{}
\date{}

\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
  pdftitle={David Pierson Bradway, Ph.D.},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip}
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
 {% don't indent paragraphs
  \setlength{\parindent}{0pt}
  % turn on hanging indent if param 1 is 1
  \ifodd #1
  \let\oldpar\par
  \def\par{\hangindent=\cslhangindent\oldpar}
  \fi
  % set entry spacing
  \setlength{\parskip}{#2\cslentryspacingunit}
 }%
 {}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
\usepackage[vmargin=1in,hmargin=1in]{geometry}

\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi

\begin{document}
\maketitle

\href{mailto:david.bradway@duke.edu}{\nolinkurl{david.bradway@duke.edu}}\\
Research Scientist, Biomedical Engineering\\
Duke University, Durham, NC 27708 USA

\hypertarget{objective}{%
\subsection{Objective}\label{objective}}

\begin{itemize}
\tightlist
\item
  Use technical and administrative skills to facilitate projects
  advancing state of the art imaging techniques
\item
  Utilize knowledge of data science, visualization, imaging, and
  research operations at Duke
\item
  Further refine skills in project and program management, science and
  engineering, and research and development
\end{itemize}

\hypertarget{work-experience}{%
\subsection{Work Experience}\label{work-experience}}

\begin{itemize}
\item
  \textbf{Duke University} (Durham, NC, USA)

  Research Scientist, Laboratory of Gregg Trahey, 2014 - present

  \begin{itemize}
  \tightlist
  \item
    Clincal research coordination for studies on ultrsound imaging in
    the engineering lab, as well as hospital fetal and liver clinics
  \item
    Collaborate with industry and academic partners and Duke graduate
    students on NIH grants
  \item
    Developing technical tools, managing data and documentation for the
    lab group
  \end{itemize}
\item
  \textbf{Technical University of Denmark (DTU)} (Kongens Lyngby,
  Denmark)

  Postdoctoral Researcher, Laborartory of Jørgen Jensen, 2013 - 2014

  \begin{itemize}
  \tightlist
  \item
    Wrote OpenCL code to process 3-D vector flow imaging data on an AMD
    GPU
  \item
    Presented a conference presentation, a poster, and proceedings (SPIE
    2014 \& 2015)
  \item
    Contributed as co-author to another peer-reviewed journal article
  \item
    Examined feasibility of transthoracic cardiac vector flow imaging on
    a phased-array probe
  \end{itemize}
\item
  \textbf{Duke University} (Durham, NC, USA)

  Graduate Research and Teaching Assistant, 2005 - 2013

  \begin{itemize}
  \tightlist
  \item
    PhD project using ultrasound to noninvasively measure the heart's
    mechanical properties
  \item
    Organized and conducted clinical studies at Duke University Medical
    Center
  \item
    Presented results in conferences and proceedings and via
    peer-reviewed journal articles
  \item
    Graduate-level medical imaging coursework and labs covering CT, MR,
    OCT and nuclear imaging
  \end{itemize}
\item
  \textbf{Siemens Healthcare} (Issaquah, WA, USA)

  Graduate Student Research Intern, 2008

  \begin{itemize}
  \tightlist
  \item
    Worked within a research and development team in a large corporation
  \item
    Added multiple focal zone ARFI excitation to research mode of Acuson
    S2000 ultrasound scanner
  \item
    Learned
    \href{http://www-03.ibm.com/software/products/en/clearcase}{version
    control} and \href{http://www.visualstudio.com/}{MS Visual Studio
    IDE} tools
  \end{itemize}
\end{itemize}

\hypertarget{education}{%
\subsection{Education}\label{education}}

\begin{itemize}
\item
  \textbf{Duke University} (Durham, NC, USA)

  \href{http://bme.duke.edu/grad}{Ph.D.~in Biomedical Engineering}, May
  2013.
\item
  \textbf{The Ohio State University (OSU)} (Columbus, OH, USA)

  \href{http://ece.osu.edu/futurestudents/undergrad}{B.S. in Electrical
  and Computer Engineering}, June 2005.
\end{itemize}

\hypertarget{teaching}{%
\subsection{Teaching}\label{teaching}}

\begin{itemize}
\tightlist
\item
  Co-Instructor, Instructor, Adv. Top. Lab for Grads in BME - Intro. to
  Electronics Biomedical Engineering 790L (2018, 2019)
\item
  Instructor, Ultrasound module of Medical Physics 731 (2015, 2016)
\item
  Guest lecturer, Biomedical Engineering 590 (2016)
\item
  Co-Instructor,~International Summer School on Advanced Ultrasound
  Imaging, Technical University of Denmark (2015)
\end{itemize}

\hypertarget{grants-and-contracts}{%
\subsection{Grants and Contracts}\label{grants-and-contracts}}

\begin{itemize}
\tightlist
\item
  \href{https://dibs.duke.edu/research/awards/schedule-application}{2019
  Research Germinator Award, Duke Institute for Brain Sciences (DIBS)}
  Ravikanth Velagapudi, PhD, Anesthesiology, School of Medicine; and
  William Huffman and David Bradway, PhD, Biomedical Engineering, Pratt
  School of Engineering. Targeting Autophagy with Non-Invasive Vagal
  Nerve Stimulation to Treat Delirium Superimposed on Dementia.
\end{itemize}

\hypertarget{invention-disclosures-and-patents}{%
\subsection{Invention Disclosures and
Patents}\label{invention-disclosures-and-patents}}

\begin{itemize}
\tightlist
\item
  Duke IDF \#a3348ed7: ``Split Aperture ARFI / SWEI''
\item
  Duke IDF \#540: ``Visual Feedback for Improved Triggered Acquisitions
  for Ultrasound Imaging''
\item
  Trahey, G., Long, W., Hollender, P., Bradway, D., Kakkad, V. and
  Bottenus, N., Duke University, 2021. Methods, systems and computer
  program products for triggering ultrasound data acquisition. U.S.
  Patent 10,969,487.
\end{itemize}

\hypertarget{honors-and-activities}{%
\subsection{Honors and Activities}\label{honors-and-activities}}

\begin{itemize}
\tightlist
\item
  \href{http://www.whitaker.org/grants/fellows-scholars}{Whitaker
  International Program Scholar} (2013)
\item
  \href{http://www.nsfgrfp.org/}{National Science Foundation Graduate
  Research Fellow} (2005-2008)
\item
  \href{https://goldwater.scholarsapply.org/}{Goldwater Research
  Scholar} (2004-2005)
\item
  \href{http://www.montanadeluz.org/}{Organized engineering design and
  build trip to Honduran orphanage} (2004)
\item
  \href{http://ecos.osu.edu/}{Founded engineering community service
  group at Ohio State} (2003)
\end{itemize}

\hypertarget{professional-activities}{%
\subsection{Professional Activities}\label{professional-activities}}

\begin{itemize}
\tightlist
\item
  Early Career Professional Development in Medical Imaging Workshop,
  SPIE Medical Imaging (2015)
\item
  Associate Editor, Ultrasonic Imaging journal (2016-)
\item
  Reviewer for the journals Ultrasound in Medicine and Biology,
  Ultrasonic Imaging, and IEEE Transactions on Medical Imaging, Journal
  of Medical Imaging
\item
  Duke Machine Learning Summer School (2019)
\item
  Hands-On Deep Learning for Processing of Biosignals Short Course.
  ASSIST Center, North Carolina State University (2021)
\end{itemize}

\hypertarget{skills}{%
\subsection{Skills}\label{skills}}

\begin{itemize}
\tightlist
\item
  Advanced signal and imaging processing programming: Matlab and Python
\item
  Tools and languages: \href{http://git-scm.com/}{Git}, C/C++,
  OpenCL/CUDA, Docker, Linux
\item
  Problem solving, signal and image analysis, data science, scientific
  computing, and experimental design
\item
  Strong written and verbal communication, data visualization
\item
  Successfully written fellowships, scholarships, proposals
\item
  Personal hardware and software projects in embedded systems:
  \href{http://www.arduino.cc/}{Arduino},
  \href{http://www.raspberrypi.org/}{Raspberry Pi}
\end{itemize}

\hypertarget{journal-articles}{%
\subsubsection{Journal Articles}\label{journal-articles}}

{[}1--13{]}

\hypertarget{book-chapters}{%
\subsubsection{Book Chapters}\label{book-chapters}}

{[}14,15{]}

\hypertarget{abstracts-and-proceedings}{%
\subsubsection{Abstracts and
Proceedings}\label{abstracts-and-proceedings}}

{[}16--47{]}

\hypertarget{publications}{%
\subsection*{Publications}\label{publications}}
\addcontentsline{toc}{subsection}{Publications}

\hypertarget{refs}{}
\begin{CSLReferences}{0}{0}
\leavevmode\vadjust pre{\hypertarget{ref-Fahey2008a}{}}%
\CSLLeftMargin{1. }
\CSLRightInline{Fahey BJ, Nelson RC, Bradway DP, Hsu SJ, Dumont DM, et
al. (2008) {In vivo visualization of abdominal malignancies with
acoustic radiation force elastography}. Physics in medicine and biology
53: 279--93.
doi:\href{https://doi.org/10.1088/0031-9155/53/1/020}{10.1088/0031-9155/53/1/020}}

\leavevmode\vadjust pre{\hypertarget{ref-Fahey2008c}{}}%
\CSLLeftMargin{2. }
\CSLRightInline{Fahey BJ, Nelson RC, Hsu SJ, Bradway DP, Dumont DM, et
al. (2008) {In vivo guidance and assessment of liver radio-frequency
ablation with acoustic radiation force elastography}. Ultrasound in
medicine \& biology 34: 1590--603.
doi:\href{https://doi.org/10.1016/j.ultrasmedbio.2008.03.006}{10.1016/j.ultrasmedbio.2008.03.006}}

\leavevmode\vadjust pre{\hypertarget{ref-Nightingale2008}{}}%
\CSLLeftMargin{3. }
\CSLRightInline{Nightingale K, Palmeri M, Zhai L, Frinkley K, Wang M, et
al. (KR) {Impulsive acoustic radiation force: imaging approaches and
clinical applications}. The Journal of the Acoustical Society of America
123: 3792.
doi:\href{https://doi.org/10.1121/1.2935460}{10.1121/1.2935460}}

\leavevmode\vadjust pre{\hypertarget{ref-Nightingale2009}{}}%
\CSLLeftMargin{4. }
\CSLRightInline{Nightingale K, Palmeri M, Dahl J, Bradway D, Hsu S, et
al. (2009) Elasticity imaging with acoustic radiation force: Methods and
clinical applications. Japanese journal of medical ultrasonics 36: 116.}

\leavevmode\vadjust pre{\hypertarget{ref-Wolf2011}{}}%
\CSLLeftMargin{5. }
\CSLRightInline{Wolf PD, Eyerly SA, Bradway DP, Dumont DM, Bahnson TD,
et al. (2011) {Near real time evaluation of cardiac radiofrequency
ablation lesions with intracardiac echocardiography based acoustic
radiation force impulse imaging}. The Journal of the Acoustical Society
of America 129: 2438.
doi:\href{https://doi.org/10.1121/1.3587978}{10.1121/1.3587978}}

\leavevmode\vadjust pre{\hypertarget{ref-Eyerly2012}{}}%
\CSLLeftMargin{6. }
\CSLRightInline{Eyerly SA, Bahnson TD, Koontz JI, Bradway DP, Dumont DM,
et al. (2012) {Intracardiac acoustic radiation force impulse imaging: A
novel imaging method for intraprocedural evaluation of radiofrequency
ablation lesions}. Heart rhythm: the official journal of the Heart
Rhythm Society 9: 1855--1862.
doi:\href{https://doi.org/10.1016/j.hrthm.2012.07.003}{10.1016/j.hrthm.2012.07.003}}

\leavevmode\vadjust pre{\hypertarget{ref-Hollender2013}{}}%
\CSLLeftMargin{7. }
\CSLRightInline{Hollender P, Bradway D, Wolf P, Goswami R, Trahey G
(2013) Intracardiac acoustic radiation force impulse (ARFI) and shear
wave imaging in pigs with focal infarctions. IEEE transactions on
ultrasonics, ferroelectrics, and frequency control 60: 1669--1682.
doi:\href{https://doi.org/10.1109/TUFFC.2013.2749}{10.1109/TUFFC.2013.2749}}

\leavevmode\vadjust pre{\hypertarget{ref-Patel2014}{}}%
\CSLLeftMargin{8. }
\CSLRightInline{Patel V, Dahl JJ, Bradway DP, Doherty JR, Lee SY, et al.
(2014) {Acoustic Radiation Force Impulse Imaging (ARFI) on an IVUS
Circular Array}. Ultrasonic Imaging 36: 98--111.
doi:\href{https://doi.org/10.1177/0161734613511595}{10.1177/0161734613511595}}

\leavevmode\vadjust pre{\hypertarget{ref-Eyerly2014}{}}%
\CSLLeftMargin{9. }
\CSLRightInline{Eyerly SA, Bahnson TD, Koontz JI, Bradway DP, Dumont DM,
et al. (2014) {Contrast in Intracardiac Acoustic Radiation Force Impulse
Images of Radiofrequency Ablation Lesions}. Ultrasonic Imaging 36:
133--148.
doi:\href{https://doi.org/10.1177/0161734613519602}{10.1177/0161734613519602}}

\leavevmode\vadjust pre{\hypertarget{ref-jensen2016}{}}%
\CSLLeftMargin{10. }
\CSLRightInline{Jensen JA, Rasmussen MF, Pihl MJ, Holbek S, Villagómez
HCA, et al. (2016) Safety assessment of advanced imaging sequences i:
measurements. IEEE transactions on ultrasonics, ferroelectrics, and
frequency control 63: 110--119.
doi:\href{https://doi.org/10.1109/TUFFC.2015.2502987}{10.1109/TUFFC.2015.2502987}}

\leavevmode\vadjust pre{\hypertarget{ref-bottenus2016}{}}%
\CSLLeftMargin{11. }
\CSLRightInline{Bottenus N, Long W, Zhang H, Jakovljevic M, Bradway D,
et al. (2016) Feasibility of swept synthetic aperture ultrasound
imaging.
doi:\href{https://doi.org/10.1109/TMI.2016.2524992}{10.1109/TMI.2016.2524992}}

\leavevmode\vadjust pre{\hypertarget{ref-Long2017umb}{}}%
\CSLLeftMargin{12. }
\CSLRightInline{Long W, Hyun D, Roy Choudhury K, Bradway D, McNally P,
et al. (2018) {Clinical utility of fetal short-lag spatial coherence
imaging}. Ultrasound in Medicine and Biology 44: 794--806.
doi:\href{https://doi.org/10.1016/j.ultrasmedbio.2017.12.006}{10.1016/j.ultrasmedbio.2017.12.006}}

\leavevmode\vadjust pre{\hypertarget{ref-Flint2020}{}}%
\CSLLeftMargin{13. }
\CSLRightInline{Flint K, Bottenus N, Bradway D, McNally P, Ellestad S,
et al. (2021) {An Automated ALARA Method for Ultrasound: An Obstetric
Ultrasound Feasibility Study}. Journal of Ultrasound in Medicine 40:
1863--1877. Available:
\url{https://onlinelibrary.wiley.com/doi/abs/10.1002/jum.15570}.}

\leavevmode\vadjust pre{\hypertarget{ref-dobbins2019medical}{}}%
\CSLLeftMargin{14. }
\CSLRightInline{Dobbins JT, Frush DP, Kigongo CJ, MacFall JR, Reiman RE,
et al. (2019) Medical imaging safety in global health radiology.
Radiology in global health. Springer. pp. 85--105.}

\leavevmode\vadjust pre{\hypertarget{ref-eyerly2018acoustic}{}}%
\CSLLeftMargin{15. }
\CSLRightInline{Eyerly-Webb SA, Vejdani-Jahromi M, Kakkad V, Hollender
P, Bradway D, et al. (2018) Acoustic radiation force-based ultrasound
elastography for cardiac imaging applications. Ultrasound elastography
for biomedical applications and medicine. John Wiley \& Sons. pp.
504--519.}

\leavevmode\vadjust pre{\hypertarget{ref-Hsu2007c}{}}%
\CSLLeftMargin{16. }
\CSLRightInline{Hsu SJ, Bradway DP, Fahey BJ, Trahey GE (2007)
{Transthoracic Acoustic Radiation Force Impulse Imaging of the Cardiac
Cycle}. Ultrasonic measurement and imaging of tissue elasticity.}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2007}{}}%
\CSLLeftMargin{17. }
\CSLRightInline{Bradway DP, Hsu SJ, Fahey BJ, Dahl JJ, Nichols TC, et
al. (2007) {6B-6 Transthoracic Cardiac Acoustic Radiation Force Impulse
Imaging: A Feasibility Study}. IEEE. pp. 448--451.
doi:\href{https://doi.org/10.1109/ULTSYM.2007.121}{10.1109/ULTSYM.2007.121}}

\leavevmode\vadjust pre{\hypertarget{ref-Fahey2007b}{}}%
\CSLLeftMargin{18. }
\CSLRightInline{Fahey BJ, Nelson RC, Hsu SJ, Bradway DP, Dumont DM, et
al. (2007) {6B-4 In Vivo Acoustic Radiation Force Impulse Imaging of
Abdominal Lesions}. 2007 IEEE ultrasonics symposium proceedings. IEEE.
pp. 440--443.
doi:\href{https://doi.org/10.1109/ULTSYM.2007.119}{10.1109/ULTSYM.2007.119}}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2009}{}}%
\CSLLeftMargin{19. }
\CSLRightInline{Bradway DP, Fahey BJ, Nelson RC, Trahey GE (2009) {ARFI
imaging of abdominal ablation and liver lesion biopsy}. International
symposium on ultrasonic imaging and tissue characterization, 2009.
Available: \url{http://uitc-symposium.org/2009_abstracts.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Husarik2009}{}}%
\CSLLeftMargin{20. }
\CSLRightInline{Husarik DB, Nelson RC, Bradway DP, Fahey BJ, Nightingale
KR, et al. (2009) {First Clinical Experience with Sonographic
Elastography of the Liver Using Acoustic Radiation Force Impulse (ARFI)
Imaging}. RSNA. Available: \url{http://rsna2009.rsna.org/search}.}

\leavevmode\vadjust pre{\hypertarget{ref-Nelson2009}{}}%
\CSLLeftMargin{21. }
\CSLRightInline{Nelson RC, Bradway DP, Fahey BJ, Trahey GE (2009)
{Future Application of Ultrasound: Acoustic Radiation Force Impulse
(ARFI) Imaging}. AIUM. Available:
\url{http://www.aium.org/loginRequired/membersOnly/proceedings/2009.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2009b}{}}%
\CSLLeftMargin{22. }
\CSLRightInline{Bradway DP, Fahey BJ, Nelson RC, Trahey GE (2009)
{Recent Clinical Results of Acoustic Radiation Force Impulse Imaging of
Abdominal Ablation}. International tissue elasticity conference.
Available:
\url{http://www.elasticityconference.org/prior_conf/2009/PDF/2009Proceedings.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Hsu2010}{}}%
\CSLLeftMargin{23. }
\CSLRightInline{Hsu SJ, Bradway DP, Bouchard RR, Hollender PJ, Wolf PD,
et al. (2010) {Parametric pressure-volume analysis and acoustic
radiation force impulse imaging of left ventricular function}. 2010 IEEE
international ultrasonics symposium. IEEE. pp. 698--701.
doi:\href{https://doi.org/10.1109/ULTSYM.2010.5935661}{10.1109/ULTSYM.2010.5935661}}

\leavevmode\vadjust pre{\hypertarget{ref-Hollender2010}{}}%
\CSLLeftMargin{24. }
\CSLRightInline{Hollender PJ, Bouchard RR, Hsu SJ, Bradway DP, Wolf PD,
et al. (2010) {Intracardiac measurements of elasticity using Acoustic
Radiation Force Impulse (ARFI) methods: Temporal and spatial stability
of shear wave velocimetry}. 2010 IEEE international ultrasonics
symposium. IEEE. pp. 698--701.
doi:\href{https://doi.org/10.1109/ULTSYM.2010.5935946}{10.1109/ULTSYM.2010.5935946}}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2010}{}}%
\CSLLeftMargin{25. }
\CSLRightInline{Bradway DP, Hsu SJ, Wolf PD, Trahey GE (2010) {Acoustic
Radiation Force Impulse Imaging of Acute Myocardial Ischemia and
Infarct}. International symposium on ultrasonic imaging and tissue
characterization. Available:
\url{http://uitc-symposium.org/2010_abstracts.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2010b}{}}%
\CSLLeftMargin{26. }
\CSLRightInline{Bradway DP, Hsu SJ, Wolf PD, Trahey GE (2010)
{Transthoracic Acoustic Radiation Force Impulse Imaging of Cardiac
Function}. International tissue elasticity conference. Available:
\url{http://www.elasticityconference.org/prior_conf/2010/PDF/2010Proceedings.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2011}{}}%
\CSLLeftMargin{27. }
\CSLRightInline{Bradway DP, Rosenzweig SR, Doherty JR, Hyun D, Trahey GE
(2011) {Recent Results and Advances in Transthoracic Cardiac Acoustic
Radiation Force Impulse Imaging}. International symposium on ultrasonic
imaging and tissue characterization. Available:
\url{http://www.elasticityconference.org/prior_conf/2011/PDF/2011ITECProceedings.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Byram2011}{}}%
\CSLLeftMargin{28. }
\CSLRightInline{Byram BC, Gianantonio DM, Bradway DP, Hyun D,
Jakovljevic M, et al. (2011) {Direct in vivo Myocardial Infarct
Visualization Using 3D Ultrasound and Passive Strain Contrast}.
International tissue elasticity conference. Available:
\url{http://www.elasticityconference.org/prior_conf/2011/PDF/2011ITECProceedings.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Byram2011b}{}}%
\CSLLeftMargin{29. }
\CSLRightInline{Byram BC, Bradway DP, Jakovljevic M, Gianantonio D, Hyun
D, et al. (2011) {Direct In Vivo Myocardial Infarct Visualization Using
3D Ultrasound and Passive Strain Contrast}. IEEE ultrasonics symp.
doi:\href{https://doi.org/10.1109/ULTSYM.2011.0007}{10.1109/ULTSYM.2011.0007}}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2012}{}}%
\CSLLeftMargin{30. }
\CSLRightInline{Bradway DP, Hollender PJ, Goswami R, Wolf PD, Trahey GE
(2012) Feasibility and safety of transthoracic cardiac acoustic
radiation force impulse imaging methods. 2012 IEEE international
ultrasonics symposium. IEEE. pp. 2027--2030.
doi:\href{https://doi.org/10.1109/ULTSYM.2012.0507}{10.1109/ULTSYM.2012.0507}}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2012b}{}}%
\CSLLeftMargin{31. }
\CSLRightInline{Bradway DP, Hollender PJ, Goswami R, Wolf PD, Trahey GE
(2012) {Transthoracic Cardiac Acoustic Radiation Force Impulse Imaging:
in vivo Feasibility, Methods, and Initial Results}. International
symposium on ultrasonic imaging and tissue characterization, 2012.
Available: \url{http://uitc-symposium.org/2012_abstracts.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Hollender2012}{}}%
\CSLLeftMargin{32. }
\CSLRightInline{Hollender PJ, Bradway DP, Goswami R, Wolf PD, Trahey GE
(2012) {Acoustic radiation force techniques for imaging cardiac infarct
in vivo: methods and initial results}. International symposium on
ultrasonic imaging and tissue characterization. Available:
\url{http://uitc-symposium.org/2012_abstracts.pdf}.}

\leavevmode\vadjust pre{\hypertarget{ref-Eyerly2012b}{}}%
\CSLLeftMargin{33. }
\CSLRightInline{Eyerly SA, Bahnson T, Koontz J, Bradway DP, Dumont DM,
et al. (2012) {Confirmation of Cardiac Radiofrequency Ablation Treatment
Using Intra-Procedure Acoustic Radiation Force Impulse Imaging}. IEEE
ultrasonics symposium.
doi:\href{https://doi.org/10.1109/ULTSYM.2012.0509}{10.1109/ULTSYM.2012.0509}}

\leavevmode\vadjust pre{\hypertarget{ref-Hollender2012b}{}}%
\CSLLeftMargin{34. }
\CSLRightInline{Hollender PJ, Bradway DP, Wolf PD, Goswami R, Trahey GE
(2012) {Intracardiac ARF-driven Shear Wave Velocimetry to Estimate
Regional Myocardial Stiffness and Contractility in Pigs with Focal
Infarctions}. IEEE ultrasonics symposium.
doi:\href{https://doi.org/10.1109/ULTSYM.2012.0508}{10.1109/ULTSYM.2012.0508}}

\leavevmode\vadjust pre{\hypertarget{ref-Goswami2013}{}}%
\CSLLeftMargin{35. }
\CSLRightInline{Goswami R, Bradway D, Kisslo J, Trahey G (2013) {Novel
Application of Acoustic Radiation Force Impulse Imaging in Transthoracic
Echocardiography}. Journal of the american college of cardiology.
American College of Cardiology Foundation, Vol. 61. p. E1090.
doi:\href{https://doi.org/10.1016/S0735-1097(13)61090-6}{10.1016/S0735-1097(13)61090-6}}

\leavevmode\vadjust pre{\hypertarget{ref-Patel2013}{}}%
\CSLLeftMargin{36. }
\CSLRightInline{Patel V, Dahl JJ, Bradway DP, Doherty JR, Smith SW
(2013) {Acoustic radiation force impulse imaging on an IVUS circular
array}. 2013 IEEE international ultrasonics symposium (IUS). IEEE. pp.
773--776.
doi:\href{https://doi.org/10.1109/ULTSYM.2013.0199}{10.1109/ULTSYM.2013.0199}}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2014}{}}%
\CSLLeftMargin{37. }
\CSLRightInline{Bradway DP, Pihl MJ, Krebs andreas, Tomov BG, Kjær CS,
et al. (2014) {Real-time GPU implementation of transverse oscillation
vector velocity flow imaging}. SPIE medical imaging.Vol. 9040. pp.
90401Y-90401Y-6.
doi:\href{https://doi.org/10.1117/12.2043582}{10.1117/12.2043582}}

\leavevmode\vadjust pre{\hypertarget{ref-Bradway2015}{}}%
\CSLLeftMargin{38. }
\CSLRightInline{Bradway DP, Hansen KL, Nielsen MB, Jensen JA (2015)
{Transverse oscillation vector flow imaging for transthoracic
echocardiography}. SPIE medical imaging. pp. 941902-941902-7.
doi:\href{https://doi.org/10.1117/12.2081145}{10.1117/12.2081145}}

\leavevmode\vadjust pre{\hypertarget{ref-Bottenus2015}{}}%
\CSLLeftMargin{39. }
\CSLRightInline{Bottenus N, Long W, Bradway D, Trahey G (2015) Phantom
and in vivo demonstration of swept synthetic aperture imaging. 2015 IEEE
international ultrasonics symposium (IUS). pp. 1--4.
doi:\href{https://doi.org/10.1109/ULTSYM.2015.0075}{10.1109/ULTSYM.2015.0075}}

\leavevmode\vadjust pre{\hypertarget{ref-Kakkad2015}{}}%
\CSLLeftMargin{40. }
\CSLRightInline{Kakkad V, Kuo L, Bradway D, Trahey G, Sivak J, et al.
(2015) In vivo transthoracic measurements of acoustic radiation force
induced displacements in the heart over the cardiac cycle. 2015 IEEE
international ultrasonics symposium (IUS). pp. 1--5.
doi:\href{https://doi.org/10.1109/ULTSYM.2015.0155}{10.1109/ULTSYM.2015.0155}}

\leavevmode\vadjust pre{\hypertarget{ref-Kakkad2017}{}}%
\CSLLeftMargin{41. }
\CSLRightInline{Kakkad V, Ferlauto H, Bradway D, Heyde B, Kisslo J, et
al. (2017) {Clinical feasibility of a noninvasive method to interrogate
myocardial function via strain and acoustic radiation force-derived
stiffness}. IEEE international ultrasonics symposium, IUS.
doi:\href{https://doi.org/10.1109/ULTSYM.2017.8092067}{10.1109/ULTSYM.2017.8092067}}

\leavevmode\vadjust pre{\hypertarget{ref-Hollender2017}{}}%
\CSLLeftMargin{42. }
\CSLRightInline{Hollender P, Bottenus N, Bradway D, Trahey G (2017)
{Single track location comb-push ultrasound shear elastography
(STL-CUSE)}. IEEE international ultrasonics symposium, IUS.
doi:\href{https://doi.org/10.1109/ULTSYM.2017.8092809}{10.1109/ULTSYM.2017.8092809}}

\leavevmode\vadjust pre{\hypertarget{ref-Long2017IUS}{}}%
\CSLLeftMargin{43. }
\CSLRightInline{Long W, Hyun D, Choudhury K, Bradway D, McNally P, et
al. (2017) Translation of fetal short-lag spatial coherence (SLSC)
imaging into clinical practice: A pilot study. 2017 IEEE international
ultrasonics symposium (IUS). pp. 1--1.
doi:\href{https://doi.org/10.1109/ULTSYM.2017.8091968}{10.1109/ULTSYM.2017.8091968}}

\leavevmode\vadjust pre{\hypertarget{ref-Flint2018}{}}%
\CSLLeftMargin{44. }
\CSLRightInline{Flint K, Bottenus N, Long W, Bradway D, McNally P, et
al. (2018) Implementation and clinical evaluation of a fetal ALARA
ultrasound system. 2018 IEEE international ultrasonics symposium (IUS).
pp. 1--4.
doi:\href{https://doi.org/10.1109/ULTSYM.2018.8579734}{10.1109/ULTSYM.2018.8579734}}

\leavevmode\vadjust pre{\hypertarget{ref-Bernard2018}{}}%
\CSLLeftMargin{45. }
\CSLRightInline{Bernard O, Bradway D, Hansen HHG, Kruizinga P, Nair A,
et al. (2018) {The Ultrasound File Format (UFF) - First Draft}. 2018
IEEE international ultrasonics symposium. IEEE.}

\leavevmode\vadjust pre{\hypertarget{ref-Hollender2019}{}}%
\CSLLeftMargin{46. }
\CSLRightInline{Hollender P, Noor S, Bradway D, Trahey G (2019)
{Force-Map Normalization for ARFI Imaging}. 2019 IEEE international
ultrasonics symposium. IEEE. pp. 411--414.}

\leavevmode\vadjust pre{\hypertarget{ref-Huber2021}{}}%
\CSLLeftMargin{47. }
\CSLRightInline{Huber M, Flint K, Barre E, Bradway D, McNally P, et al.
(2021) Mechanisms affecting ALARA MI selected in adaptive ultrasound
imaging. 2021 IEEE international ultrasonics symposium (IUS). pp. 1--4.
doi:\href{https://doi.org/10.1109/IUS52206.2021.9593860}{10.1109/IUS52206.2021.9593860}}

\end{CSLReferences}

\end{document}


text:
using System.Collections.Generic;

namespace ConsultaLinq.Models
{
    public class Cidade
    {
        public int CidadeID { get; set; }
        public string Nome { get; set; }
        public string UF { get; set; }
        public string CEP { get; set; }
        public virtual ICollection<Cliente> Cliente { get; set; }
        public Cidade()
        {
            Cliente = new List<Cliente>();
        }
    }
}


text:
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Web.Http;
using System.Web.Http.Routing;
using WestBlueGolfLeagueWeb.Controllers.Filters;

namespace WestBlueGolfLeagueWeb
{
    public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {
            // Web API configuration and services
            config.Filters.Add(new WestBlueApiExceptionFilterAttribute());

            // Web API routes
            config.MapHttpAttributeRoutes();

            config.Routes.MapHttpRoute(name: "DataByYear", routeTemplate: "api/v1/data/{year}", defaults: new { controller = "DataByYear", action = "GetDataForYear" });

            config.Routes.MapHttpRoute(name: "AvailableYears", routeTemplate: "api/v1/availableYears", defaults: new { controller = "DataByYear", action = "GetAvailableYears" });

            config.Routes.MapHttpRoute(name: "AvailableLeaderBoards", routeTemplate: "api/v1/leaderboards", defaults: new { controller = "LeaderBoardApi", action = "GetAvailableLeaderBoards" });

            config.Routes.MapHttpRoute(name: "GetLeaderBoardByKey", routeTemplate: "api/v1/leaderboards/{key}", defaults: new { controller = "LeaderBoardApi", action = "GetLeaderBoard" });

            config.Routes.MapHttpRoute(name: "GetPlayerProfile", routeTemplate: "api/v1/players/{id}", defaults: new { controller = "PlayerApi", action = "GetProfileData" });

            config.Routes.MapHttpRoute(name: "GetPlayers", routeTemplate: "api/v1/players/", defaults: new { controller = "PlayerApi", action = "GetPlayersList" });

            config.Routes.MapHttpRoute(name: "GetTeamProfile", routeTemplate: "api/v1/teams/{id}", defaults: new { controller = "TeamApi", action = "GetProfileData" });
            config.Routes.MapHttpRoute(name: "GetTeamList", routeTemplate: "api/v1/teams/", defaults: new { controller = "TeamApi", action = "GetTeams" });

            config.Routes.MapHttpRoute(name: "GetUserNameAvailability", routeTemplate: "api/user/name/{username}", defaults: new { controller = "User", action = "UserNameAvailable" });

            config.Routes.MapHttpRoute(name: "AdminInfo", routeTemplate: "api/adminInfo", defaults: new { controller = "AdminInfo", action = "AdminInfo" });

            config.Routes.MapHttpRoute(name: "ScoreEntryMatchup", routeTemplate: "api/scoreEntry/matchup/{weekId}/{matchupId}", defaults: new { controller = "ScoreEntry", action = "GetMatchup" }, constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Get) });
            config.Routes.MapHttpRoute(name: "SaveMatchup", routeTemplate: "api/scoreEntry/matchup/{weekId}/{matchupId}", defaults: new { controller = "ScoreEntry", action = "PutMatchup", }, constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Put) });

            config.Routes.MapHttpRoute(name: "YearWizardInfo", routeTemplate: "api/yearManagement/yearWizardInfo", defaults: new { controller = "YearManagement", action = "YearWizardInfo" });
            config.Routes.MapHttpRoute(name: "SaveYear", routeTemplate: "api/yearManagement/saveYear", defaults: new { controller = "YearManagement", action = "SaveYear" });
            config.Routes.MapHttpRoute(name: "DeleteYear", routeTemplate: "api/yearManagement/deleteYear", defaults: new { controller = "YearManagement", action = "DeleteYear" });

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

            var jsonFormatter = config.Formatters.OfType<JsonMediaTypeFormatter>().First();
            jsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
        }
    }
}


text:
module Chordpro
  class Transform < Parslet::Transform
    rule(directive: {name: simple(:name), value: simple(:value)}) do
      directive_name = Directive.find(name) || Directive::Name.new(name.to_s)
      Chordpro::Directive.new(directive_name, value.to_s)
    end
    rule(directive: {name: simple(:name)}) do
      Chordpro::Directive.new(name.to_s)
    end

    rule(linebreak: simple(:x)) { Chordpro::Linebreak.new }
    rule(chord: simple(:name)) { Chordpro::Chord.new(name.to_s) }
    rule(lyric: simple(:text)) { Chordpro::Lyric.new(text.to_s) }
    rule(line: subtree(:parts)) { Chordpro::Line.new(parts) }
    rule(song: subtree(:elements)) { Chordpro::Song.new(elements) }
  end
end


text:
import { MakeKeysRequired } from "./types";
import { wallet } from "./models/wallet";
import { user } from "./models/user";
import { address } from "./models/address";
import { base } from "./base";
import MangoPay = require("./index");

export namespace Models {
    import EntityBase = MangoPay.models.EntityBase;
    import ModelMethods = MangoPay.models.ModelMethods;
    import DependsObject = base.DependsObject;

    class Model<T extends {} = any> implements ModelMethods<T> {
        initialize(): void;

        getData<K extends keyof T>(attribute: K): T[K];

        setData<K extends keyof T>(attribute: K, value: T[K]): this;

        setData(attribute: Partial<T>): this;

        setData(attribute: any, value?: any): this;

        getReadOnlyProperties(): Array<keyof T>;

        getDependsObjects(): DependsObject[];

        parse(): void;

        constructor(data: T);
    }

    class Address extends EntityBase<address.AddressData> {
        constructor(data: Partial<address.AddressData>);
    }

    class BankAccountDetails {
        constructor(data: any);
    }

    class Wallet extends EntityBase<wallet.WalletData> {
        constructor(data: wallet.CreateWallet | wallet.UpdateWallet);
    }

    class UserLegal extends EntityBase<user.UserLegalData> {
        PersonType: "LEGAL";

        constructor(
            data: MakeKeysRequired<Partial<user.UserLegalData>,
                user.RequiredUserLegalData>
        );

        /**
         * Sets the person type for the model
         * @param personType
         */
        setPersonType(type: user.PersonType): void;
    }

    class UserNatural extends EntityBase<user.UserNaturalData> {
        PersonType: "NATURAL";

        constructor(
            data: MakeKeysRequired<Partial<user.UserNaturalData>,
                user.RequiredUserNaturalData>
        );

        /**
         * Sets the person type for the model
         * @param personType
         */
        setPersonType(type: user.PersonType): void;
    }
}


text:
@class SCNPhysicsBody, SCNPhysicsWorld;

@interface SCNPhysicsCharacter : SCNPhysicsBehavior
{
    struct {
        SCNPhysicsBody *characterBody;
        struct SCNVector3 direction;
        double velocity;
        double jumpSpeed;
    } _definition;
    struct btCharacterControllerInterface *_characterController;
    struct btPairCachingGhostObject *_ghostObject;
    struct btOverlapFilterCallback *_filterCallback;
    struct btCapsuleShape *_capsuleShape;
    SCNPhysicsWorld *_world;
}

- (id).cxx_construct;
- (void)_handleCreateIfNeeded:(BOOL)arg1;
- (void)_willRemoveFromPhysicsWorld:(id)arg1;
- (void)_addToPhysicsWorld:(id)arg1;
- (void)_update;
@property(nonatomic) double jumpSpeed;
@property(nonatomic) double velocity;
- (void)jump;
- (BOOL)canJump;
- (void)setWalkingDirection:(struct SCNVector3)arg1;
- (void)dealloc;
- (id)initWithCharacter:(id)arg1;

@end


text:
"""
Copyright (C) 2015, MuChu Hsu
Contributed by Muchu Hsu (muchu1983@gmail.com)
This file is part of BSD license

<https://opensource.org/licenses/BSD-3-Clause>
"""
import os
import sys
import time
import datetime
import dateparser
import math
import re
import logging
from cameo.utility import Utility
from cameo.externaldb import ExternalDbForJsonImporter
#from cameo.localdb import LocalDbForJsonImporter #測試用本地端 db

class ImporterForWEBACKERS:

    #建構子
    def __init__(self):
        self.utility = Utility()
        self.db = ExternalDbForJsonImporter().mongodb
        #self.db = LocalDbForJsonImporter().mongodb #測試用本地端 db
        self.dicSubCommandHandler = {"import":[self.importJsonData]}
        self.dicCategoryMapping = None
        self.lstStrCategory = [
            "acg", "art", "charity", "design", "music", "publication",
            "sport", "surprise", "technology", "video"
        ]

    #取得 importer 使用資訊
    def getUseageMessage(self):
        return ("- WEBACKERS -\n"
                "useage:\n"
                "import - import json to database \n")

    #執行 importer
    def runImporter(self, lstSubcommand=None):
        strSubcommand = lstSubcommand[0]
        strArg1 = None
        if len(lstSubcommand) == 2:
            strArg1 = lstSubcommand[1]
        for handler in self.dicSubCommandHandler[strSubcommand]:
            handler(strArg1)

    def importJsonData(self, uselessArg1=None):
        #讀取 分類對應表
        self.loadCategoryMapping()
        #逐一分類匯入
        for strCategory in self.lstStrCategory:
            self.importProjectJson(strCategory)
            self.importPersonJson(strCategory)

    def importProjectJson(self, strCategory):
        logging.info("[Import %s]"%strCategory)
        dicTotalProject = self.utility.readObjectFromJsonFile(strJsonFilePath=self.getParsedProjectFilePath(strCategory))
        dicTotalUpdate = self.utility.readObjectFromJsonFile(strJsonFilePath=self.getParsedUpdateFilePath(strCategory))
        dicTotalReward = self.utility.readObjectFromJsonFile(strJsonFilePath=self.getParsedRewardFilePath(strCategory))
        dicTotalQnA = self.utility.readObjectFromJsonFile(strJsonFilePath=self.getParsedQandAFilePath(strCategory))
        collectionProj = self.db.ModelFundProject
        for strUrl, dicProject in dicTotalProject.items():
            logging.info("[Import project]: %s"%strUrl)
            dicCategory = self.dicCategoryMapping[dicProject["strCategory"]]
            bIsNew = collectionProj.count({"strUrl": strUrl}) == 0
            #project: 固定資訊只有在db上沒有時才會匯入,status為變動資訊,每次匯入時會確認是否為新的,若是新的則會匯入
            if(bIsNew):
                dtEndDate = datetime.datetime.strptime(dicProject["strEndDate"], "%Y-%m-%d")
                dtStartDate = dtEndDate - datetime.timedelta(days=60) # -2months
                dicProject["strStartDate"] = dtStartDate.strftime("%Y/%m/%d")
                dicProject["strEndDate"] = self.getCorrectFormatDateTime(dicProject["strEndDate"])
                #print("==============")
                #print(dicProject["strStartDate"])
                #print(dicProject["strEndDate"])
                dicProject.setdefault("lstIntCategoryId", [dicCategory["intCategoryId"]]);
                dicProject.setdefault("lstStrCategory", [dicCategory["strCategory"]]);
                dicProject.setdefault("lstIntSubCategoryId", [dicCategory["intSubCategoryId"]]);
                dicProject.setdefault("lstStrSubCategory", [dicCategory["strSubCategory"]]);
                dicProject.setdefault("lstDicComment", [])
                dicProject.setdefault("lstDicQna", [])
                dicProject.setdefault("lstDicReward", [])
                dicProject.setdefault("lstDicUpdate", [])
                dicProject.setdefault("lstDicStatus", [])
                collectionProj.insert_one(dicProject).inserted_id
            else:
                collectionProj.update({"strUrl": strUrl}, {"$set":{"fFundProgress":dicProject.get("fFundProgress", .0)}}, upsert=True)
                collectionProj.update({"strUrl": strUrl}, {"$set":{"intRaisedMoney":dicProject.get("intRaisedMoney", 0)}}, upsert=True)
                collectionProj.update({"strUrl": strUrl}, {"$set":{"strCrawlTime":self.getCorrectFormatDateTime(dicProject["strCrawlTime"])}}, upsert=True)
            dicStatus = {}
            dicStatus.setdefault("intStatus", dicProject.pop("intStatus", 0))
            dicStatus.setdefault("intRemainDays", dicProject.pop("intRemainDays", 0))
            dicStatus.setdefault("fFundProgress", dicProject.pop("fFundProgress", .0))
            dicStatus.setdefault("intRaisedMoney", dicProject.pop("intRaisedMoney", 0))
            dicStatus.setdefault("intUpdate", dicProject.pop("intUpdate", 0))
            dicStatus.setdefault("intBacker", dicProject.pop("intBacker", 0))
            dicStatus.setdefault("intComment", dicProject.pop("intComment", 0))
            dicStatus.setdefault("intFbLike", dicProject.pop("intFbLike", 0))
            dicStatus.setdefault("strDate", self.getCorrectFormatDateTime(dicProject["strCrawlTime"]))
            collectionProj.update({"strUrl": strUrl}, {"$addToSet":{"lstDicStatus":dicStatus}}, upsert = True)
            collectionProj.update({"strUrl": strUrl}, {"$set": {"strCrawlTime": self.getCorrectFormatDateTime(dicProject["strCrawlTime"])}})
            #lstStrTag
            lstStrTag = self.makeTagFieldOnModelFundProject(
                strCategory=dicProject["strCategory"],
                strSubCategory=dicProject["strSubCategory"],
                lstStrCategory=[dicCategory["strCategory"]],
                lstStrSubCategory=[dicCategory["strSubCategory"]]
            )
            collectionProj.update_one(
                {"strUrl": strUrl},
                {
                    "$set":{
                        "lstStrTag":lstStrTag
                    }
                },
                upsert=True
            )
            #Backer: 如果有新的backer會加入db
            collectionProj.update({"strUrl": strUrl},  {"$addToSet":{"lstStrBacker": {"$each":dicProject["lstStrBacker"]}}})
            #QandA: 使用新的array蓋掉原來array
            lstDicQna = dicTotalQnA[strUrl]
            collectionProj.update({"strUrl": strUrl},  {"$set":{"lstDicQna": lstDicQna}})
            #Reward: 使用新的array蓋掉原來array
            lstDicReward = dicTotalReward[strUrl]
            for dicReward in lstDicReward:
                if(dicReward["strRewardDeliveryDate"] != None and len(dicReward["strRewardDeliveryDate"]) > 0):
                    dicReward["strRewardDeliveryDate"] = self.getCorrectFormatDateTime(dicReward["strRewardDeliveryDate"])
            collectionProj.update({"strUrl": strUrl},  {"$set":{"lstDicReward": lstDicReward}})
            #Update: 使用新的array蓋掉原來array
            lstDicUpdate = dicTotalUpdate[strUrl]
            for dicUpdate in lstDicUpdate:
                if(dicUpdate["strUpdateDate"] != None and len(dicUpdate["strUpdateDate"]) > 0):
                    dicUpdate["strUpdateDate"] = self.getCorrectFormatDateTime(dicUpdate["strUpdateDate"])
            collectionProj.update({"strUrl": strUrl},  {"$set":{"lstDicUpdate": lstDicUpdate}})

    def makeTagFieldOnModelFundProject(self, strCategory=None, strSubCategory=None, lstStrCategory=[], lstStrSubCategory=[]):
        lstStrTag = []
        lstStrTag.append(strCategory)
        lstStrTag.append(strSubCategory)
        lstStrTag = lstStrTag + lstStrCategory
        lstStrTag = lstStrTag + lstStrSubCategory
        lstStrTag = list(set(lstStrTag))
        return lstStrTag

    def importPersonJson(self, strCategory):
        dicTotalPerson = self.utility.readObjectFromJsonFile(strJsonFilePath=self.getParsedProfileFilePath(strCategory))
        collectionPerson = self.db.ModelRewardPerson
        for strUrl, dicPerson in dicTotalPerson.items():
            logging.info("[Import person]: %s"%strUrl)
            dicPerson.setdefault("strSource", "WEBACKERS")
            #collectionPerson.update({"strUrl": strUrl},  dicPerson, upsert = True)
            bIsNew = collectionPerson.count({"strUrl": dicPerson["strUrl"]}) == 0
            if(bIsNew):
                collectionPerson.insert_one(dicPerson)
            else:
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"lstStrCreatedProjectUrl": dicPerson["lstStrCreatedProjectUrl"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"lstStrBackedProjectUrl": dicPerson["lstStrBackedProjectUrl"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"intSuccessProject": dicPerson["intSuccessProject"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"intLiveProject": dicPerson["intLiveProject"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"intFailedProject": dicPerson["intFailedProject"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"intCreatedCount": dicPerson["intCreatedCount"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"intBackedCount": dicPerson["intBackedCount"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"intFbFriend": dicPerson["intFbFriend"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"isCreator": dicPerson["isCreator"]}})
                collectionPerson.update({"strUrl": strUrl},  {"$set":{"isBacker": dicPerson["isBacker"]}})

    def strParsedResultPath(self):
        return u"cameo_res/parsed_result/WEBACKERS"

    def getParsedProjectFilePath(self, strCategory):
        return self.strParsedResultPath() + "/" + strCategory + "/projects/project.json"

    def getParsedUpdateFilePath(self, strCategory):
        return self.strParsedResultPath() + "/" + strCategory + "/projects/update.json"

    def getParsedQandAFilePath(self, strCategory):
        return self.strParsedResultPath() + "/" + strCategory + "/projects/qanda.json"

    def getParsedRewardFilePath(self, strCategory):
        return self.strParsedResultPath() + "/" + strCategory + "/projects/reward.json"

    def getParsedProfileFilePath(self, strCategory):
        return self.strParsedResultPath() + "/" + strCategory + "/profiles/profile.json"

    def getCorrectFormatDateTime(self, strDate):
        return datetime.datetime.strptime(strDate, "%Y-%m-%d").strftime("%Y/%m/%d")

    def loadCategoryMapping(self):
        strCategoryMappingFilePath = u"cameo_res/categoryMappingForWEBACKERS.json"
        self.dicCategoryMapping = self.utility.readObjectFromJsonFile(strJsonFilePath=strCategoryMappingFilePath)


text:
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>cacore</groupId>
  <artifactId>castor</artifactId>
  <version>1.0.2</version>
  <versioning>
    <versions>
      <version>1.0.2</version>
    </versions>
    <lastUpdated>20160113222815</lastUpdated>
  </versioning>
</metadata>


text:
'use strict';

var winston = require('winston');
require('winston-archivefile');

var options = {
	filename: "archfile.log",
	archivedir: "archive"
};

var trans = new winston.transports.ArchiveFile(options);
var logger = new winston.Logger({
	transports: [trans]
});

logger.log('info', 'first test');
// This is a dirty hack to trick it into thinking the date has changed
trans._currentLogDate = '20150321';

logger.info('debug test');
logger.info('should go to new file');


text:
package com.google.android.odml.image;

import android.media.Image;
import android.os.Build.VERSION_CODES;
import androidx.annotation.RequiresApi;

/**
 * Utility for extracting {@link android.media.Image} from {@link MlImage}.
 *
 *
Currently it only supports {@link MlImage} with {@link MlImage#STORAGE_TYPE_MEDIA_IMAGE},
 * otherwise {@link IllegalArgumentException} will be thrown.
 */
@RequiresApi(VERSION_CODES.KITKAT)
public class MediaImageExtractor {

  private MediaImageExtractor() {}

  /**
   * Extracts a {@link android.media.Image} from an {@link MlImage}. Currently it only works for
   * {@link MlImage} that built from {@link MediaMlImageBuilder}.
   *
   *
Notice: Properties of the {@code image} like rotation will not take effects.
   *
   * @param image the image to extract {@link android.media.Image} from.
   * @return {@link android.media.Image} that stored in {@link MlImage}.
   * @throws IllegalArgumentException if the extraction failed.
   */
  public static Image extract(MlImage image) {
    ImageContainer container;
    if ((container = image.getContainer(MlImage.STORAGE_TYPE_MEDIA_IMAGE)) != null) {
      return ((MediaImageContainer) container).getImage();
    }
    throw new IllegalArgumentException(
        "Extract Media Image from an MlImage created by objects other than Media Image"
            + " is not supported");
  }
}


text:
<?php
//Yii::import('ext.elFinderTinyMce.*');

class SiteController extends Controller
{

	public function actions()
	{
		return array(
			// captcha action renders the CAPTCHA image displayed on the contact page
			'captcha'=>array(
				'class'=>'CCaptchaAction',
				'backColor'=>0xFFFFFF,
			),
			// page action renders "static" pages stored under 'protected/views/site/pages'
			// They can be accessed via: index.php?r=site/page&view=FileName
			'page'=>array(
				'class'=>'CViewAction',
			),
            'connector' => array(
                'class' => 'ext.elFinder.ElFinderConnectorAction',
                'settings' => array(
                    'root' => Yii::getPathOfAlias('webroot') . '/uploads/',
                    'URL' => Yii::app()->request->baseUrl . '/uploads/',
                    'rootAlias' => 'Home',
                    'mimeDetect' => 'none'
                )
            ),
		);
	}

	public function actionIndex()
	{
		if(Yii::app()->user->isGuest)
            $this->render('login',array('model'=>new LoginForm));
        else
            if(Yii::app()->user->role=='admin')
                $this->render('admin');
            else
                $this->render('user');
	}

    public function actionMonitor()
    {
        $this->clear=true;
        $this->render('monitor');
    }

	public function actionError()
	{
		if($error=Yii::app()->errorHandler->error)
		{
			if(Yii::app()->request->isAjaxRequest)
				echo $error['message'];
			else
				$this->render('error', $error);
		}
	}

	public function actionLogin()
	{
		$model=new LoginForm;

		// if it is ajax validation request
		if(isset($_POST['ajax']) && $_POST['ajax']==='login-form')
		{
			echo CActiveForm::validate($model);
			Yii::app()->end();
		}

		// collect user input data
		if(isset($_POST['LoginForm']))
		{
			$model->attributes=$_POST['LoginForm'];
			// validate user input and redirect to the previous page if valid
			if($model->validate() && $model->login())
                $this->redirect(Yii::app()->user->returnUrl);
		}
		// display the login form
		$this->render('login',array('model'=>$model));
	}

	public function actionLogout()
	{
		$id = Yii::app()->user->id;
        Yii::app()->user->logout();
        $user = User::model()->findByPk($id);
        $user->deactive();
		$this->redirect(Yii::app()->homeUrl);
	}
}


text:
import logging

from django.conf import settings
from django.utils.translation import LANGUAGE_SESSION_KEY

from hkm.basket.basket import Basket

LOG = logging.getLogger(__name__)

class LanguageMiddleware(object):
    def process_request(self, request):
        if not LANGUAGE_SESSION_KEY in request.session:
            if request.user.is_authenticated():
                language = request.user.profile.language
                request.session[LANGUAGE_SESSION_KEY] = language
            else:
                request.session[LANGUAGE_SESSION_KEY] = settings.LANGUAGE_CODE
            return None

class BasketMiddleware(object):
    def process_request(self, request):
        request.basket = Basket(request)

    def process_response(self, request, response):
        if hasattr(request, "basket") and request.basket.dirty:
            request.basket.save()
        return response


text:
module.exports = function(allow,deny){
	if(allow && deny){
		var err = new Error('You cannot use both allow and deny for ip addresses');
		throw err;
	}

	var condition = allow?function(req,res){
		return !req.is_resolved && !~allow.indexOf(req.ip);
	}:function(req,res){
		return !req.is_resolved && ~deny.indexOf(req.ip);
	};

	return {
		condition:condition,
		middleware:function(req,res,push){
  			req.abandon();
		}
	};
};


text:
Feathers-UI-Builder
===================

This project to develop Graphical UI Builder tool for Feathers like Design View for FlashBuilder4.6


text:
namespace koheron {

/// Session
///
/// Receive and parse the client request for execution.
///
/// By calling the appropriate socket interface, it offers
/// an abstract communication layer to the drivers. Thus
/// shielding them from the underlying communication protocol.
template<int socket_type>
class Session : public SessionAbstract
{
  public:
    Session(int comm_fd, SessionID id_, SysLog& syslog_, DriverManager& drv_manager_);

    int run();

    SessionID get_id() const {return id;}

    // Receive - Send

    // TODO Move in Session<TCP> specialization
    int64_t rcv_n_bytes(char *buffer, int64_t n_bytes);

    template<typename... Tp> std::tuple<int, Tp...> deserialize(Command& cmd, std::false_type);
    template<typename... Tp> std::tuple<int, Tp...> deserialize(Command& cmd, std::true_type);

    // The command is passed in argument since for the WebSocket the vector data
    // are stored into it. This implies that the whole vector is already stored on
    // the stack which might not be a good thing.
    //
    // TCP sockets won't use it as it reads directly the TCP buffer.
    template<typename Tp>
    int recv(Tp& container, Command& cmd);

    template<typename T, size_t N>
    int recv(std::array<T, N>& arr, Command&);

    template<typename T>
    int recv(std::vector<T>& vec, Command&);

    template<uint16_t class_id, uint16_t func_id, typename... Args>
    int send(Args&&... args) {
        dynamic_serializer.build_command<class_id, func_id>(send_buffer, std::forward<Args>(args)...);
        const auto bytes_send = write(send_buffer.data(), send_buffer.size());

        if (bytes_send == 0) {
            status = CLOSED;
        }

        return bytes_send;
    }

  private:
    int comm_fd;  ///< Socket file descriptor
    SessionID id;
    SysLog& syslog;
    DriverManager& driver_manager;

    struct EmptyBuffer {};
    std::conditional_t<socket_type == TCP || socket_type == UNIX,
                       Buffer<KOHERON_RECV_DATA_BUFF_LEN>, EmptyBuffer> recv_data_buff;

    struct EmptyWebsock {
        EmptyWebsock(SysLog&) {}
    };

    std::conditional_t<socket_type == WEBSOCK, WebSocket, EmptyWebsock> websock;

    std::vector<unsigned char> send_buffer;
    DynamicSerializer<1024> dynamic_serializer;

    enum {CLOSED, OPENED};
    int status;

  private:
    int init_socket();
    int exit_socket();

    int init_session() {
        return init_socket();
    }

    void exit_session() {
        if (exit_socket() < 0) {
            syslog.print<WARNING>("An error occured during session exit\n");
        }
    }

    int read_command(Command& cmd);

    int64_t get_pack_length() {
        Buffer<sizeof(uint64_t)> buff;
        const auto err = rcv_n_bytes(buff.data(), sizeof(uint32_t));

        if (err < 0) {
            syslog.print<ERROR>("Cannot read pack length\n");
            return -1;
        }

        return std::get<0>(buff.deserialize<uint32_t>());
    }

    template<class T> int write(const T *data, unsigned int len);

friend class SessionManager;
};

template<int socket_type>
Session<socket_type>::Session(int comm_fd_, SessionID id_, SysLog& syslog_, DriverManager& drv_manager_)
: SessionAbstract(socket_type)
, comm_fd(comm_fd_)
, id(id_)
, syslog(syslog_)
, driver_manager(drv_manager_)
, websock(syslog)
, send_buffer(0)
, status(OPENED)
{}

template<int socket_type>
int Session<socket_type>::run()
{
    if (init_session() < 0) {
        return -1;
    }

    while (!exit_signal) {
        Command cmd;
        const int nb_bytes_rcvd = read_command(cmd);

        if (exit_signal) {
            break;
        }

        if (nb_bytes_rcvd <= 0) {
            // We don't call exit_session() here because the socket is already closed.
            return nb_bytes_rcvd;
        }

        if (driver_manager.execute(cmd) < 0) {
            syslog.print<ERROR>("Failed to execute command [driver = %i, operation = %i]\n", cmd.driver, cmd.operation);
        }

        if (status == CLOSED) {
            break;
        }
    }

    exit_session();
    return 0;
}

// -----------------------------------------------
// TCP
// -----------------------------------------------

template<>
int64_t Session<TCP>::rcv_n_bytes(char *buffer, int64_t n_bytes);

template<>
template<typename T, size_t N>
inline int Session<TCP>::recv(std::array<T, N>& arr, Command&)
{
    return rcv_n_bytes(reinterpret_cast<char*>(arr.data()), size_of<T, N>);
}

template<>
template<typename T>
inline int Session<TCP>::recv(std::vector<T>& vec, Command&)
{
    const auto length = get_pack_length() / sizeof(T);

    if (length < 0) {
        return -1;
    }

    vec.resize(length);
    const auto err = rcv_n_bytes(reinterpret_cast<char *>(vec.data()), length * sizeof(T));

    if (err >= 0) {
        syslog.print<DEBUG>("TCPSocket: Received a vector of %lu bytes\n", length);
    }

    return err;
}

template<>
template<>
inline int Session<TCP>::recv(std::string& str, Command&)
{
    const auto length = get_pack_length();

    if (length < 0) {
        return -1;
    }

    str.resize(length);
    const auto err = rcv_n_bytes(str.data(), length);

    if (err >= 0) {
       syslog.print<DEBUG>("TCPSocket: Received a string of %lu bytes\n", length);
    }

    return err;
}

template<>
template<typename... Tp>
inline std::tuple<int, Tp...> Session<TCP>::deserialize(Command&, std::false_type)
{
    return std::make_tuple(0);
}

template<>
template<typename... Tp>
inline std::tuple<int, Tp...> Session<TCP>::deserialize(Command&, std::true_type)
{
    constexpr auto pack_len = required_buffer_size<Tp...>();
    Buffer<pack_len> buff;
    const int err = rcv_n_bytes(buff.data(), pack_len);
    return std::tuple_cat(std::make_tuple(err), buff.template deserialize<Tp...>());
}

template<>
template<class T>
inline int Session<TCP>::write(const T *data, unsigned int len)
{
    const auto bytes_send = sizeof(T) * len;
    const int n_bytes_send = ::write(comm_fd, static_cast<const unsigned char*>(data), bytes_send);

    if (n_bytes_send == 0) {
       syslog.print<ERROR>("TCPSocket::write: Connection closed by client\n");
       return 0;
    }

    if (n_bytes_send < 0) {
       syslog.print<ERROR>("TCPSocket::write: Can't write to client\n");
       return -1;
    }

    if (n_bytes_send != static_cast<int>(bytes_send)) {
        syslog.print<ERROR>("TCPSocket::write: Some bytes have not been sent\n");
        return -1;
    }

    syslog.print<DEBUG>("[S] [%u bytes]\n", bytes_send);
    return static_cast<int>(bytes_send);
}

// -----------------------------------------------
// Unix socket
// -----------------------------------------------

// Unix socket has the same interface than TCP socket
template<>
class Session<UNIX> : public Session<TCP>
{
  public:
    Session<UNIX>(int comm_fd_, SessionID id_, SysLog& syslog_, DriverManager& drv_manager_)
    : Session<TCP>(comm_fd_, id_, syslog_, drv_manager_) {}
};

// -----------------------------------------------
// WebSocket
// -----------------------------------------------

template<>
template<typename T, size_t N>
inline int Session<WEBSOCK>::recv(std::array<T, N>& arr, Command& cmd)
{
    arr = cmd.payload.extract_array<T, N>();
    return 0;
}

template<>
template<typename T>
inline int Session<WEBSOCK>::recv(std::vector<T>& vec, Command& cmd)
{
    const auto length = std::get<0>(cmd.payload.deserialize<uint32_t>());

    if (length > CMD_PAYLOAD_BUFFER_LEN) {
        syslog.print<ERROR>("WebSocket: Payload size overflow during buffer reception\n");
        return -1;
    }

    cmd.payload.to_vector(vec, length / sizeof(T));
    return 0;
}

template<>
template<>
inline int Session<WEBSOCK>::recv(std::string& str, Command& cmd)
{
    const auto length = std::get<0>(cmd.payload.deserialize<uint32_t>());

    if (length > CMD_PAYLOAD_BUFFER_LEN) {
        syslog.print<ERROR>("WebSocket::rcv_vector: Payload size overflow\n");
        return -1;
    }

    cmd.payload.to_string(str, length);
    return 0;
}

template<>
template<typename... Tp>
inline std::tuple<int, Tp...> Session<WEBSOCK>::deserialize(Command& cmd, std::false_type)
{
    return std::make_tuple(0);
}

template<>
template<typename... Tp>
inline std::tuple<int, Tp...> Session<WEBSOCK>::deserialize(Command& cmd, std::true_type)
{
    return std::tuple_cat(std::make_tuple(0), cmd.payload.deserialize<Tp...>());
}

template<>
template<class T>
inline int Session<WEBSOCK>::write(const T *data, unsigned int len)
{
    return websock.send(data, len);
}

// -----------------------------------------------
// Select session type
// -----------------------------------------------

// For the template in the middle, see:
// http://stackoverflow.com/questions/1682844/templates-template-function-not-playing-well-with-classs-template-member-funct/1682885#1682885

template<typename... Tp>
inline std::tuple<int, Tp...> SessionAbstract::deserialize(Command& cmd)
{
    switch (this->type) {
        case TCP:
            return static_cast<Session<TCP>*>(this)->template deserialize<Tp...>(cmd, std::integral_constant<bool, 0 < sizeof...(Tp)>());
        case UNIX:
            return static_cast<Session<UNIX>*>(this)->template deserialize<Tp...>(cmd, std::integral_constant<bool, 0 < sizeof...(Tp)>());
        case WEBSOCK:
            return static_cast<Session<WEBSOCK>*>(this)->template deserialize<Tp...>(cmd, std::integral_constant<bool, 0 < sizeof...(Tp)>());
        default:
            return std::tuple_cat(std::make_tuple(-1), std::tuple<Tp...>());
    }
}

template<typename Tp>
inline int SessionAbstract::recv(Tp& container, Command& cmd)
{
    switch (this->type) {
        case TCP:
            return static_cast<Session<TCP>*>(this)->recv(container, cmd);
        case UNIX:
            return static_cast<Session<UNIX>*>(this)->recv(container, cmd);
        case WEBSOCK:
            return static_cast<Session<WEBSOCK>*>(this)->recv(container, cmd);
        default:
            return -1;
    }
}

template<uint16_t class_id, uint16_t func_id, typename... Args>
inline int SessionAbstract::send(Args&&... args)
{
    switch (this->type) {
        case TCP:
            return static_cast<Session<TCP>*>(this)->template send<class_id, func_id>(std::forward<Args>(args)...);
        case UNIX:
            return static_cast<Session<UNIX>*>(this)->template send<class_id, func_id>(std::forward<Args>(args)...);
        case WEBSOCK:
            return static_cast<Session<WEBSOCK>*>(this)->template send<class_id, func_id>(std::forward<Args>(args)...);
        default:
            return -1;
    }
}

// Cast abstract session unique_ptr
template<int socket_type>
Session<socket_type>*
cast_to_session(const std::unique_ptr<SessionAbstract>& sess_abstract)
{
    return static_cast<Session<socket_type>*>(sess_abstract.get());
}

} // namespace koheron

#endif // __KOHERON_SESSION_HPP__


text:
package com.novbank.store.domain.base.resource;

import com.novbank.store.helper.SpringApplicationContextHolder;
import com.novbank.store.service.resource.ResourceService;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

/**
 * Created by CaoKe on 2015/4/19.
 */
@DependsOn("springApplicationContextHolder")
@Aspect
@Configuration
public class ResourceEntityAspect {
    @DeclareParents( value="(@ResourceEntity *)", defaultImpl = ResourceBacking.class)
    public static ResourceBacked resourceBacking;

    @Autowired
    protected ResourceService resources;

    @Pointcut("execution(* com.novbank.store.domain.base.resource.ResourceBacked+.get*()) && this(entity) && !execution(* com.novbank.store.domain.base.resource.ResourceBacked.get*())")
    public void entityFieldGet(ResourceBacked entity){ }

    @Pointcut("execution(* com.novbank.store.domain.base.resource.ResourceBacked+.set*(..)) && this(entity) && args(newVal) && !execution(* com.novbank.store.domain.base.resource.ResourceBacked.set*(..))")
    public void entityFieldSet(ResourceBacked entity, Object newVal){ }

    @Pointcut("execution(com.novbank.store.domain.base.resource.ResourceBacked+.new(..)) && !execution(com.novbank.store.domain.base.resource.ResourceBacked+.new(com.novbank.store.domain.graph.Resource)) && this(entity)")
    public void arbitraryUserConstructorOfResourceObject(ResourceBacked entity){}

    /*@After("arbitraryUserConstructorOfResourceObject(entity)")
    public void afterArbitraryUserConstructorOfResourceObject(ResourceBacked entity){
        if(entity.resource()==null){

        }
    }*/

    @Around("entityFieldGet(entity)")
    public Object aroundEntityFieldGet(ProceedingJoinPoint pjp,ResourceBacked entity) throws Throwable{
        System.out.println("Get "+pjp.getSignature().getName());
        return pjp.proceed();
    }

    @Around("entityFieldSet(entity,newVal)")
    public Object aroundEntityFieldSet(ProceedingJoinPoint pjp, ResourceBacked entity, Object newVal) throws Throwable{
        System.out.println("Set "+pjp.getSignature().getName());

        return //pjp.proceed(new Object[]{newVal});
                pjp.proceed();
    }

    public static ResourceEntityAspect aspectOf() {
        return SpringApplicationContextHolder.getApplicationContext().getBean(ResourceEntityAspect.class);
    }
}


text:
<meta charset="utf-8">
{% if page.title %}
    <title>{{ page.title }} - Kotlin Programming Language</title>
{% else %}
    <title>Kotlin Programming Language</title>
{% endif %}
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="Shortcut Icon" href="{{ site.baseurl }}/assets/images/favicon.ico" type="image/x-icon"/>
<link rel="apple-touch-icon" href="{{ site.baseurl }}/assets/images/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="72x72" href="{{ site.baseurl }}/assets/images/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="{{ site.baseurl }}/assets/images/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="144x144" href="{{ site.baseurl }}/assets/images/apple-touch-icon-144x144.png" />
<link rel="stylesheet" href="{{ site.baseurl }}/css/styles.css">

<!-- Social Media tag Starts -->
<!-- Place this data between the <head> tags of your website -->
<!-- Open Graph data -->
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://kotlinlang.org{{ page.url }}" />
<meta property="og:image" content="https://kotlinlang.org/assets/images/open-graph/kotlin_250x250.png" />
{% if page.description %}
<meta property="og:description" content="{{ page.description }}">
{% else %}
<meta property="og:description" content="Kotlin is a statically typed programming language for the JVM, Android and the browser, 100% interoperable with Java">
{% endif %}
<meta property="og:site_name" content="Kotlin" />

<!-- Twitter Card data -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@kotlin">
<meta name="twitter:title" content="{{ page.title }}">
{% if page.description %}
<meta name="twitter:description" content="{{ page.description }}">
{% else %}
<meta name="twitter:description" content="Kotlin is a statically typed programming language for the JVM, Android and the browser, 100% interoperable with Java">
{% endif %}
<meta name="twitter:image:src" content="https://kotlinlang.org/assets/images/twitter-card/kotlin_800x320.png ">
<!-- Social Media tag Ends -->


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=../../../libc/constant.IP_PMTUDISC_INTERFACE.html">

Redirecting to ../../../libc/constant.IP_PMTUDISC_INTERFACE.html...


text:
package scala.actors.db

import scala.actors.behavior.Logging

/**
 * @author Jonas Bonér
 */
class CombinatorParser extends Logging {
}


text:
'''
Copyright (C) 2022, WAFW00F Developers.
See the LICENSE file for copying permission.
'''

NAME = 'LimeLight CDN (LimeLight)'

def is_waf(self):
    schemes = [
        self.matchCookie(r'^limelight'),
        self.matchCookie(r'^l[mg]_sessid=')
    ]
    if any(i for i in schemes):
        return True
    return False