text:
import {
  describe,
  beforeEach,
  it,
  expect,
  iit,
  ddescribe,
  el,
  stringifyElement
} from 'angular2/test_lib';
import {MapWrapper} from 'angular2/src/facade/collection';

import {ViewSplitter} from 'angular2/src/render/dom/compiler/view_splitter';
import {CompilePipeline} from 'angular2/src/render/dom/compiler/compile_pipeline';
import {ProtoViewDto, ViewType} from 'angular2/src/render/api';
import {DOM} from 'angular2/src/dom/dom_adapter';

import {Lexer, Parser} from 'angular2/change_detection';

export function main() {
  describe('ViewSplitter', () => {

    function createPipeline() {
      return new CompilePipeline([new ViewSplitter(new Parser(new Lexer()))]);
    }

    describe('<template> elements', () => {

      it('should move the content into a new <template> element and mark that as viewRoot', () => {
        var rootElement = DOM.createTemplate('<template if="true">a</template>');
        var results = createPipeline().process(rootElement);

        expect(stringifyElement(results[1].element))
            .toEqual('<template class="ng-binding" if="true"></template>');
        expect(results[1].isViewRoot).toBe(false);
        expect(stringifyElement(results[2].element)).toEqual('<template>a</template>');
        expect(results[2].isViewRoot).toBe(true);
      });

      it('should mark the new <template> element as viewRoot', () => {
        var rootElement = DOM.createTemplate('<template if="true">a</template>');
        var results = createPipeline().process(rootElement);
        expect(results[2].isViewRoot).toBe(true);
      });

      it('should not wrap the root element', () => {
        var rootElement = DOM.createTemplate('');
        var results = createPipeline().process(rootElement);
        expect(results.length).toBe(1);
        expect(stringifyElement(rootElement)).toEqual('<template></template>');
      });

      it('should copy over the elementDescription', () => {
        var rootElement = DOM.createTemplate('<template if="true">a</template>');
        var results = createPipeline().process(rootElement);
        expect(results[2].elementDescription).toBe(results[1].elementDescription);
      });

      it('should clean out the inheritedElementBinder', () => {
        var rootElement = DOM.createTemplate('<template if="true">a</template>');
        var results = createPipeline().process(rootElement);
        expect(results[2].inheritedElementBinder).toBe(null);
      });

      it('should create a nestedProtoView', () => {
        var rootElement = DOM.createTemplate('<template if="true">a</template>');
        var results = createPipeline().process(rootElement);
        expect(results[2].inheritedProtoView).not.toBe(null);
        expect(results[2].inheritedProtoView)
            .toBe(results[1].inheritedElementBinder.nestedProtoView);
        expect(results[2].inheritedProtoView.type).toBe(ViewType.EMBEDDED);
        expect(stringifyElement(results[2].inheritedProtoView.rootElement))
            .toEqual('<template>a</template>');
      });

    });

    describe('elements with template attribute', () => {

      it('should replace the element with an empty <template> element', () => {
        var rootElement = DOM.createTemplate('');
        var originalChild = DOM.firstChild(DOM.content(rootElement));
        var results = createPipeline().process(rootElement);
        expect(results[0].element).toBe(rootElement);
        expect(stringifyElement(results[0].element))
            .toEqual('<template><template class="ng-binding"></template></template>');
        expect(stringifyElement(results[2].element))
            .toEqual('<template></template>');
        expect(DOM.firstChild(DOM.content(results[2].element))).toBe(originalChild);
      });

      it('should work with top-level template node', () => {
        var rootElement = DOM.createTemplate('
x
');
        var originalChild = DOM.content(rootElement).childNodes[0];
        var results = createPipeline().process(rootElement);

        expect(results[0].element).toBe(rootElement);
        expect(results[0].isViewRoot).toBe(true);
        expect(results[2].isViewRoot).toBe(true);
        expect(stringifyElement(results[0].element))
            .toEqual('<template><template class="ng-binding"></template></template>');
        expect(DOM.firstChild(DOM.content(results[2].element))).toBe(originalChild);
      });

      it('should mark the element as viewRoot', () => {
        var rootElement = DOM.createTemplate('

');
        var results = createPipeline().process(rootElement);
        expect(results[2].isViewRoot).toBe(true);
      });

      it('should add property bindings from the template attribute', () => {
        var rootElement = DOM.createTemplate('

');
        var results = createPipeline().process(rootElement);
        expect(results[1].inheritedElementBinder.propertyBindings.get('someProp').source)
            .toEqual('expr');
        expect(results[1].attrs().get('some-prop')).toEqual('expr');
      });

      it('should add variable mappings from the template attribute to the nestedProtoView', () => {
        var rootElement = DOM.createTemplate('

');
        var results = createPipeline().process(rootElement);
        expect(results[2].inheritedProtoView.variableBindings)
            .toEqual(MapWrapper.createFromStringMap({'mapName': 'varName'}));
      });

      it('should add entries without value as attributes to the element', () => {
        var rootElement = DOM.createTemplate('

');
        var results = createPipeline().process(rootElement);
        expect(results[1].attrs().get('varname')).toEqual('');
        expect(results[1].inheritedElementBinder.propertyBindings).toEqual(new Map());
        expect(results[1].inheritedElementBinder.variableBindings).toEqual(new Map());
      });

      it('should iterate properly after a template dom modification', () => {
        var rootElement = DOM.createTemplate('

<after></after>');
        var results = createPipeline().process(rootElement);
        // 1 root + 2 initial + 2 generated template elements
        expect(results.length).toEqual(5);
      });

      it('should copy over the elementDescription', () => {
        var rootElement = DOM.createTemplate('');
        var results = createPipeline().process(rootElement);
        expect(results[2].elementDescription).toBe(results[1].elementDescription);
      });

      it('should clean out the inheritedElementBinder', () => {
        var rootElement = DOM.createTemplate('');
        var results = createPipeline().process(rootElement);
        expect(results[2].inheritedElementBinder).toBe(null);
      });

      it('should create a nestedProtoView', () => {
        var rootElement = DOM.createTemplate('');
        var results = createPipeline().process(rootElement);
        expect(results[2].inheritedProtoView).not.toBe(null);
        expect(results[2].inheritedProtoView)
            .toBe(results[1].inheritedElementBinder.nestedProtoView);
        expect(stringifyElement(results[2].inheritedProtoView.rootElement))
            .toEqual('<template></template>');
      });

    });

    describe('elements with *directive_name attribute', () => {

      it('should replace the element with an empty <template> element', () => {
        var rootElement = DOM.createTemplate('');
        var originalChild = DOM.firstChild(DOM.content(rootElement));
        var results = createPipeline().process(rootElement);
        expect(results[0].element).toBe(rootElement);
        expect(stringifyElement(results[0].element))
            .toEqual('<template><template class="ng-binding" ng-if=""></template></template>');
        expect(stringifyElement(results[2].element))
            .toEqual('<template></template>');
        expect(DOM.firstChild(DOM.content(results[2].element))).toBe(originalChild);
      });

      it('should mark the element as viewRoot', () => {
        var rootElement = DOM.createTemplate('

');
        var results = createPipeline().process(rootElement);
        expect(results[2].isViewRoot).toBe(true);
      });

      it('should work with top-level template node', () => {
        var rootElement = DOM.createTemplate('
x
');
        var originalChild = DOM.content(rootElement).childNodes[0];
        var results = createPipeline().process(rootElement);

        expect(results[0].element).toBe(rootElement);
        expect(results[0].isViewRoot).toBe(true);
        expect(results[2].isViewRoot).toBe(true);
        expect(stringifyElement(results[0].element))
            .toEqual('<template><template class="ng-binding" foo=""></template></template>');
        expect(DOM.firstChild(DOM.content(results[2].element))).toBe(originalChild);
      });

      it('should add property bindings from the template attribute', () => {
        var rootElement = DOM.createTemplate('

');
        var results = createPipeline().process(rootElement);
        expect(results[1].inheritedElementBinder.propertyBindings.get('prop').source)
            .toEqual('expr');
        expect(results[1].attrs().get('prop')).toEqual('expr');
      });

      it('should add variable mappings from the template attribute to the nestedProtoView', () => {
        var rootElement = DOM.createTemplate('

');
        var results = createPipeline().process(rootElement);
        expect(results[2].inheritedProtoView.variableBindings)
            .toEqual(MapWrapper.createFromStringMap({'mapName': 'varName'}));
      });

      it('should add entries without value as attribute to the element', () => {
        var rootElement = DOM.createTemplate('

');
        var results = createPipeline().process(rootElement);
        expect(results[1].attrs().get('varname')).toEqual('');
        expect(results[1].inheritedElementBinder.propertyBindings).toEqual(new Map());
        expect(results[1].inheritedElementBinder.variableBindings).toEqual(new Map());
      });

      it('should iterate properly after a template dom modification', () => {
        var rootElement = DOM.createTemplate('

<after></after>');
        var results = createPipeline().process(rootElement);
        // 1 root + 2 initial + 2 generated template elements
        expect(results.length).toEqual(5);
      });

      it('should copy over the elementDescription', () => {
        var rootElement = DOM.createTemplate('');
        var results = createPipeline().process(rootElement);
        expect(results[2].elementDescription).toBe(results[1].elementDescription);
      });

      it('should clean out the inheritedElementBinder', () => {
        var rootElement = DOM.createTemplate('');
        var results = createPipeline().process(rootElement);
        expect(results[2].inheritedElementBinder).toBe(null);
      });

      it('should create a nestedProtoView', () => {
        var rootElement = DOM.createTemplate('');
        var results = createPipeline().process(rootElement);
        expect(results[2].inheritedProtoView).not.toBe(null);
        expect(results[2].inheritedProtoView)
            .toBe(results[1].inheritedElementBinder.nestedProtoView);
        expect(stringifyElement(results[2].inheritedProtoView.rootElement))
            .toEqual('<template></template>');
      });

    });

  });
}


text:
<?php

namespace BrainpopUser\Repository;

use Application\Service\RepositoryWatcher;

use BrainpopUser\Repository\AccountRepository;
use BrainpopUser\Repository\GroupRepository;
use BrainpopUser\Repository\UserRepository;

trait RepositoryGetterTrait
{

    /** @var AccountRepository */
    protected $accountRepository;

    /** @var GroupRepository */
    protected $groupRepository;

    /** @var UserRepository */
    protected $userRepository;

    /**
     * Get the Account repository
     * @return AccountRepository
     */
    public function getAccountRepository()
    {
        if (!$this->accountRepository) {
            $this->accountRepository = RepositoryWatcher::get(RepositoryWatcher::ACCOUNT_REPOSITORY);
        }
        return $this->accountRepository;
    }

    /**
     * Get the Group repository
     * @return GroupRepository
     */
    public function getGroupRepository()
    {
        if (!$this->groupRepository) {
            $this->groupRepository = RepositoryWatcher::get(RepositoryWatcher::GROUP_REPOSITORY);
        }
        return $this->groupRepository;
    }

    /**
     * Get the User repository
     * @return UserRepository
     */
    public function getUserRepository()
    {
        if (!$this->userRepository) {
            $this->userRepository = RepositoryWatcher::get(RepositoryWatcher::USER_REPOSITORY);
        }
        return $this->userRepository;
    }

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Efrei\Readyo\PalladiumBundle\Command;

use Varspool\WebsocketBundle\VarspoolWebsocketBundle;

use \InvalidArgumentException;

use Wrench\Server;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class PalladiumServerCommand extends ContainerAwareCommand
{
    protected $levels = array(
        "DEBUG" => 0,
        "INFO" => 1,
        "WARNING" => 2,
        "ERROR" => 3
    );

    private $default_level = "INFO";

    /**
     * @see Symfony\Component\Console\Command.Command::configure()
     */
    protected function configure()
    {
        $this
            ->setName('palladium:server')
            ->setDescription('Serveur & Backbone du Bus Palladium')
            ->addArgument(
                'level',
                InputArgument::OPTIONAL,
                '',
                $this->default_level
            )
        ;
    }

    /**
     * @see Symfony\Component\Console\Command.Command::execute()
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $levels = $this->levels;
        $level_limit = strtoupper($input->getArgument('level'));

        if(!array_key_exists($level_limit, $levels)) {
            $level_limit = $this->default_level;
            $output->writeln("Bad level. Default level used : ".$level_limit);
        }

        $manager = $this->getContainer()->get('varspool_websocket.server_manager');

        $manager->setLogger(function ($message, $level) use ($output, $levels, $level_limit) {
            $level = strtoupper($level);
            if($levels[$level] >= $levels[$level_limit])
                $output->writeln("[".$level."]\t[".date("d/m/Y H:i:s")."]\t".$message);
        });

        $server = $manager->getServer("default");
    	$server->run();
    }
}


text:
@class HyperlinkTextView;
class ManagePasswordsBubbleModel;

// Manages the view that confirms that the generated password was saved.
@interface ManagePasswordsBubbleConfirmationViewController
    : ManagePasswordsBubbleContentViewController<NSTextViewDelegate> {
 @private
  ManagePasswordsBubbleModel* model_;  // weak
  base::scoped_nsobject<HyperlinkTextView> confirmationText_;
  base::scoped_nsobject<NSButton> okButton_;
}
- (id)initWithModel:(ManagePasswordsBubbleModel*)model
           delegate:(id<ManagePasswordsBubbleContentViewDelegate>)delegate;
@end

@interface ManagePasswordsBubbleConfirmationViewController (Testing)
@property(readonly) HyperlinkTextView* confirmationText;
@property(readonly) NSButton* okButton;
@end

#endif  // CHROME_BROWSER_UI_COCOA_PASSWORDS_CONFIRMATION_PASSWORD_SAVED_VIEW_CONTROLLER_H_


text:
<?php namespace Codesleeve\AssetPipeline\Filters;

use Assetic\Asset\AssetInterface;
use Assetic\Filter\FilterInterface;
use Assetic\Filter\BaseCssFilter;

class FilterHelper extends BaseCssFilter
{
    public function filterLoad(AssetInterface $asset)
    {
        // do nothing when this is loaded...
    }

    public function filterDump(AssetInterface $asset)
    {
        // do nothing when this is dumped...
    }

    public function getRelativePath($basePath, $absolutePath)
    {
        if (!is_array($basePath))
        {
            list($changed, $newPath) = $this->_getRelativePath($basePath, $absolutePath);
            return $newPath;
        }

        foreach ($basePath as $path)
        {
            list($changed, $newPath) = $this->_getRelativePath($path, $absolutePath);

            if ($changed) return $newPath;
        }

        return reset($basePath);
    }

    public function fileExists($filename)
    {
        $queryless = strtok($filename, '?');

        return (file_exists($filename) && is_file($filename)) || (file_exists($queryless) && is_file($queryless));
    }

    private function _getRelativePath($basePath, $absolutePath)
    {
        $pos = strpos($absolutePath, $basePath);

        if ($pos !== false)
        {
            $start = strlen($basePath) + $pos;
            $end = strlen($absolutePath) - $start;
            $path = substr($absolutePath, $start, $end);
            return array(true, $path);
        }

        return array(false, $absolutePath);
    }
}


text:
#ifndef JUCE_TEXTDIFF_H_INCLUDED
#define JUCE_TEXTDIFF_H_INCLUDED

/**
    Calculates and applies a sequence of changes to convert one text string into
    another.

    Once created, the TextDiff object contains an array of change objects, where
    each change can be either an insertion or a deletion. When applied in order
    to the original string, these changes will convert it to the target string.
*/
class JUCE_API TextDiff
{
public:
    /** Creates a set of diffs for converting the original string into the target. */
    TextDiff (const String& original,
              const String& target);

    /** Applies this sequence of changes to the original string, producing the
        target string that was specified when generating them.

        Obviously it only makes sense to call this function with the string that
        was originally passed to the constructor. Any other input will produce an
        undefined result.
    */
    String appliedTo (String text) const;

    /** Describes a change, which can be either an insertion or deletion. */
    struct Change
    {
        String insertedText; /**< If this change is a deletion, this string will be empty; otherwise,
                                  it'll be the text that should be inserted at the index specified by start. */
        int start;    /**< Specifies the character index in a string at which text should be inserted or deleted. */
        int length;   /**< If this change is a deletion, this specifies the number of characters to delete. For an
                           insertion, this is the length of the new text being inserted. */

        /** Returns true if this change is a deletion, or false for an insertion. */
        bool isDeletion() const noexcept;

        /** Returns the result of applying this change to a string. */
        String appliedTo (const String& original) const noexcept;
    };

    /** The list of changes required to perform the transformation.
        Applying each of these, in order, to the original string will produce the target.
    */
    Array<Change> changes;
};

#endif   // JUCE_TEXTDIFF_H_INCLUDED


text:
package org.wso2.carbon.apimgt.rest.api.store.dto;

import java.util.ArrayList;
import java.util.List;

import io.swagger.annotations.*;
import com.fasterxml.jackson.annotation.*;

import javax.validation.constraints.NotNull;

@ApiModel(description = "")
public class ApplicationKeyGenerateRequestDTO  {

  public enum KeyTypeEnum {
     PRODUCTION,  SANDBOX,
  };
  @NotNull
  private KeyTypeEnum keyType = null;

  @NotNull
  private String validityTime = null;

  private List<String> supportedGrantTypes = new ArrayList<String>();

  private String callbackUrl = null;

  @NotNull
  private List<String> accessAllowDomains = new ArrayList<String>();

  private List<String> scopes = new ArrayList<String>();

  private String clientId = null;

  private String clientSecret = null;

  private String lastUpdatedTime = null;

  private String createdTime = null;

  /**
  * gets and sets the lastUpdatedTime for ApplicationKeyGenerateRequestDTO
  **/
  @JsonIgnore
  public String getLastUpdatedTime(){
    return lastUpdatedTime;
  }
  public void setLastUpdatedTime(String lastUpdatedTime){
    this.lastUpdatedTime=lastUpdatedTime;
  }

  /**
  * gets and sets the createdTime for a ApplicationKeyGenerateRequestDTO
  **/

  @JsonIgnore
  public String getCreatedTime(){
    return createdTime;
  }
  public void setCreatedTime(String createdTime){
    this.createdTime=createdTime;
  }

  /**
   **/
  @ApiModelProperty(required = true, value = "")
  @JsonProperty("keyType")
  public KeyTypeEnum getKeyType() {
    return keyType;
  }
  public void setKeyType(KeyTypeEnum keyType) {
    this.keyType = keyType;
  }

  /**
   **/
  @ApiModelProperty(required = true, value = "")
  @JsonProperty("validityTime")
  public String getValidityTime() {
    return validityTime;
  }
  public void setValidityTime(String validityTime) {
    this.validityTime = validityTime;
  }

  /**
   * The grant types that are supported by the application
   **/
  @ApiModelProperty(value = "The grant types that are supported by the application")
  @JsonProperty("supportedGrantTypes")
  public List<String> getSupportedGrantTypes() {
    return supportedGrantTypes;
  }
  public void setSupportedGrantTypes(List<String> supportedGrantTypes) {
    this.supportedGrantTypes = supportedGrantTypes;
  }

  /**
   * Callback URL
   **/
  @ApiModelProperty(value = "Callback URL")
  @JsonProperty("callbackUrl")
  public String getCallbackUrl() {
    return callbackUrl;
  }
  public void setCallbackUrl(String callbackUrl) {
    this.callbackUrl = callbackUrl;
  }

  /**
   * Allowed domains for the access token
   **/
  @ApiModelProperty(required = true, value = "Allowed domains for the access token")
  @JsonProperty("accessAllowDomains")
  public List<String> getAccessAllowDomains() {
    return accessAllowDomains;
  }
  public void setAccessAllowDomains(List<String> accessAllowDomains) {
    this.accessAllowDomains = accessAllowDomains;
  }

  /**
   * Allowed scopes for the access token
   **/
  @ApiModelProperty(value = "Allowed scopes for the access token")
  @JsonProperty("scopes")
  public List<String> getScopes() {
    return scopes;
  }
  public void setScopes(List<String> scopes) {
    this.scopes = scopes;
  }

  /**
   * Client ID for generating access token.
   **/
  @ApiModelProperty(value = "Client ID for generating access token.")
  @JsonProperty("clientId")
  public String getClientId() {
    return clientId;
  }
  public void setClientId(String clientId) {
    this.clientId = clientId;
  }

  /**
   * Client secret for generating access token. This is given together with the client Id.
   **/
  @ApiModelProperty(value = "Client secret for generating access token. This is given together with the client Id.")
  @JsonProperty("clientSecret")
  public String getClientSecret() {
    return clientSecret;
  }
  public void setClientSecret(String clientSecret) {
    this.clientSecret = clientSecret;
  }

  @Override
  public String toString()  {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApplicationKeyGenerateRequestDTO {\n");

    sb.append("  keyType: ").append(keyType).append("\n");
    sb.append("  validityTime: ").append(validityTime).append("\n");
    sb.append("  supportedGrantTypes: ").append(supportedGrantTypes).append("\n");
    sb.append("  callbackUrl: ").append(callbackUrl).append("\n");
    sb.append("  accessAllowDomains: ").append(accessAllowDomains).append("\n");
    sb.append("  scopes: ").append(scopes).append("\n");
    sb.append("  clientId: ").append(clientId).append("\n");
    sb.append("  clientSecret: ").append(clientSecret).append("\n");
    sb.append("}\n");
    return sb.toString();
  }
}


text:
from __future__ import unicode_literals

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

class Migration(migrations.Migration):
    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Observer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lat', models.DecimalField(decimal_places=6, max_digits=9, verbose_name='latitude')),
                ('lon', models.DecimalField(decimal_places=6, max_digits=9, verbose_name='longitude')),
                (
                    'user',
                    models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Satellite',
            fields=[
                ('norad_id',
                 models.IntegerField(primary_key=True, serialize=False, verbose_name='NORAD catalog number')),
                ('name', models.CharField(max_length=100)),
                ('tle', models.CharField(max_length=164, verbose_name='two-line element')),
            ],
        ),
        migrations.CreateModel(
            name='SatelliteAudio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attribution', models.CharField(blank=True, max_length=100)),
                ('audio', models.FileField(upload_to=b'')),
                ('satellite', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='satsound.Satellite')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                           to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SatelliteTrajectory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rise_time', models.DateTimeField(verbose_name='rise time')),
                ('rise_azimuth', models.DecimalField(decimal_places=6, max_digits=9, verbose_name='rise azimuth')),
                ('maxalt_time', models.DateTimeField(verbose_name='maximum altitude time')),
                ('maxalt_altitude',
                 models.DecimalField(decimal_places=6, max_digits=9, verbose_name='maximum altitude')),
                ('set_time', models.DateTimeField(verbose_name='set time')),
                ('set_azimuth', models.DecimalField(decimal_places=6, max_digits=9, verbose_name='set azimuth')),
                ('satellite', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='satsound.Satellite')),
            ],
        ),
    ]


text:
#ifndef __itkTransformFileWriter_h
#define __itkTransformFileWriter_h

#include "itkTransformIOBase.h"
#include <iostream>
#include <fstream>

namespace itk
{
/** \class TransformFileWriter
 *
 * \brief TODO
 * \ingroup ITK-Transform
 *
 * \wiki
 * \wikiexample{IO/TransformFileWriter,Write a transform to a file}
 * \endwiki
 */
class ITK_EXPORT TransformFileWriter:public LightProcessObject
{
public:

  /** SmartPointer typedef support */
  typedef TransformFileWriter  Self;
  typedef LightProcessObject   Superclass;
  typedef SmartPointer< Self > Pointer;

  typedef TransformBase                           TransformType;
  typedef TransformIOBase::ConstTransformPointer  ConstTransformPointer;
  typedef TransformIOBase::ConstTransformListType ConstTransformListType;

  /** Method for creation through the object factory */
  itkNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(TransformFileWriter, LightProcessObject);

  /** Set the filename  */
  itkSetStringMacro(FileName);

  /** Get the filename */
  itkGetStringMacro(FileName);

  /** Set/Get the write mode (append/overwrite) for the Filter */
  void SetAppendOff();

  void SetAppendOn();

  void SetAppendMode(bool mode);

  bool GetAppendMode();

  /** Set/Get the input transform to write */
  void SetInput(const TransformType *transform);

  const TransformType * GetInput();

  /** Add a transform to be written */
  void AddTransform(const TransformType *transform);

  /** Set/Get the precision of the writing */
  itkSetMacro(Precision, unsigned int);
  itkGetConstMacro(Precision, unsigned int);

  /** Write out the transform */
  void Update();

protected:
  TransformFileWriter(const Self &); //purposely not implemented
  void operator=(const Self &);      //purposely not implemented
  void PrintSelf(std::ostream & os, Indent indent) const;

  TransformFileWriter();
  virtual ~TransformFileWriter();
private:
  void OpenStream(std::ofstream & out, bool binary);

  std::string            m_FileName;
  ConstTransformListType m_TransformList;
  unsigned int           m_Precision;
  bool                   m_AppendMode;
};
} // namespace itk

#endif // __itkTransformFileWriter_h


text:
/**
 * @module main
 */

/**
 * node-exceptions
 *
 * (c) Harminder Virk <virk@adonisjs.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
*/

import { BaseException } from './BaseException'

export class LogicalException extends BaseException {}
export class DomainException extends BaseException {}
export class InvalidArgumentException extends BaseException {}
export class RangeException extends BaseException {}
export class RuntimeException extends BaseException {}
export class HttpException extends BaseException {}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class asj.data.IntList</title>
<meta name="date" content="2021-01-31">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
asj.data.IntList

Packages that use IntList

Package
Description

asj.data

Uses of IntList in asj.data

Methods in asj.data that return IntList

Modifier and Type
Method and Description

IntList
IntList.copy()

static IntList
IntList.fromRange(int stop)

static IntList
IntList.fromRange(int start,
         int stop)

IntList
IntList.getSubset(int start)

IntList
IntList.getSubset(int start,
         int num)

Methods in asj.data with parameters of type IntList

Modifier and Type
Method and Description

void
IntList.append(IntList list)

void
IntList.insert(int index,
      IntList list)

Constructors in asj.data with parameters of type IntList

Constructor and Description

JSONArray(IntList list)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
"""
    Talon.One API

    Use the Talon.One API to integrate with your application and to manage applications and campaigns:  - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns.  ## Determining the base URL of the endpoints  The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}`   # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""

import pprint
import re  # noqa: F401

import six

from talon_one.configuration import Configuration

class ApplicationCustomerEntity(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'profile_id': 'int'
    }

    attribute_map = {
        'profile_id': 'profileId'
    }

    def __init__(self, profile_id=None, local_vars_configuration=None):  # noqa: E501
        """ApplicationCustomerEntity - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._profile_id = None
        self.discriminator = None

        if profile_id is not None:
            self.profile_id = profile_id

    @property
    def profile_id(self):
        """Gets the profile_id of this ApplicationCustomerEntity.  # noqa: E501

        The globally unique Talon.One ID of the customer that created this entity.  # noqa: E501

        :return: The profile_id of this ApplicationCustomerEntity.  # noqa: E501
        :rtype: int
        """
        return self._profile_id

    @profile_id.setter
    def profile_id(self, profile_id):
        """Sets the profile_id of this ApplicationCustomerEntity.

        The globally unique Talon.One ID of the customer that created this entity.  # noqa: E501

        :param profile_id: The profile_id of this ApplicationCustomerEntity.  # noqa: E501
        :type: int
        """

        self._profile_id = profile_id

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ApplicationCustomerEntity):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, ApplicationCustomerEntity):
            return True

        return self.to_dict() != other.to_dict()


text:
require "spec_helper"

describe Contact::Email do
  # pending "add some examples to (or delete) #{__FILE__}"
end


text:
<?php

namespace Yajra\Acl\Tests;

use Illuminate\Contracts\Console\Kernel;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Foundation\Testing\RefreshDatabaseState;
use Illuminate\Support\Str;
use Monolog\Handler\TestHandler;
use Orchestra\Testbench\TestCase as BaseTestCase;
use Yajra\Acl\GateRegistrar;
use Yajra\Acl\Models\Permission;
use Yajra\Acl\Models\Role;
use Yajra\Acl\Tests\Models\User;

abstract class TestCase extends BaseTestCase
{
    /** @var User */
    protected $admin;

    /** @var User */
    protected $user;

    protected function setUp(): void
    {
        parent::setUp();

        $this->runDatabaseMigrations();
        $this->seedDatabase();
        $this->registerGates();
    }

    protected function runDatabaseMigrations()
    {
        /** @var \Illuminate\Database\Schema\Builder $schemaBuilder */
        $schemaBuilder = $this->app['db']->connection()->getSchemaBuilder();
        $schemaBuilder->create('users', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('email');
            $table->timestamps();
        });

        $this->artisan('migrate');

        $this->app[Kernel::class]->setArtisan(null);

        $this->beforeApplicationDestroyed(function () {
            $this->artisan('migrate:rollback');

            RefreshDatabaseState::$migrated = false;
        });
    }

    protected function seedDatabase()
    {
        Permission::createResource('article', true);
        $adminRole = $this->createRole('admin');
        $permissions = Permission::query()->pluck('id')->toArray();
        $adminRole->syncPermissions($permissions);

        $registeredRole = $this->createRole('registered');

        $this->admin = tap($this->createUser('admin'), function (User $user) use ($adminRole) {
            $user->attachRole($adminRole);
        })->fresh('roles');

        $this->user = tap($this->createUser('user'), function (User $user) use ($registeredRole) {
            $user->attachRole($registeredRole);
        })->fresh('roles');
    }

    /**
     * @param  string  $role
     * @return Role
     */
    protected function createRole(string $role): Role
    {
        return Role::create([
            'name' => Str::title($role),
            'slug' => Str::slug($role),
            'system' => true,
            'description' => "$role role.",
        ]);
    }

    /**
     * @param  string|null  $user
     * @return User
     */
    protected function createUser(string $user = null): User
    {
        $user = $user ?: Str::random(10);

        return User::create([
            'name' => Str::title($user),
            'email' => $user.'@example.com',
        ]);
    }

    protected function registerGates(): void
    {
        resolve(GateRegistrar::class)->register();
    }

    /**
     * @param  string  $permission
     * @param  bool  $system
     * @return Permission
     */
    protected function createPermission(string $permission, bool $system = true): Permission
    {
        return Permission::create([
            'resource' => 'Tests',
            'name' => $permission,
            'slug' => Str::slug($permission),
            'system' => $system,
        ]);
    }

    /**
     * Resolve application HTTP Kernel implementation.
     *
     * @param  \Illuminate\Foundation\Application  $app
     * @return void
     */
    protected function resolveApplicationHttpKernel($app)
    {
        $app->singleton('Illuminate\Contracts\Http\Kernel', 'Yajra\Acl\Tests\Http\Kernel');
    }

    /**
     * Set up the environment.
     *
     * @param  \Illuminate\Foundation\Application  $app
     */
    protected function getEnvironmentSetUp($app)
    {
        $app['config']->set('app.debug', true);
        $app['config']->set('cache.default', 'array');
        $app['config']->set('session.driver', 'file');
        $app['config']->set('session.expire_on_close', false);

        $app['config']->set('database.default', 'sqlite');
        $app['config']->set('database.connections.sqlite', [
            'driver' => 'sqlite',
            'database' => ':memory:',
            'prefix' => '',
        ]);

        $app['config']->set('view.paths', [__DIR__.'/resources/views']);
        $app['config']->set('auth.providers.users.model', User::class);
        $app['log']->getLogger()->pushHandler(new TestHandler());
    }

    protected function getPackageProviders($app): array
    {
        return [
            \Yajra\Acl\AclServiceProvider::class,
        ];
    }

    protected function getPackageAliases($app): array
    {
        return [];
    }
}


text:
SYNONYM

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

#### Published in
null

#### Original name
Boletinus castanellus Peck, 1900

### Remarks
null