text:
package com.streamsets.pipeline.stage.origin.udp;

import com.google.common.collect.Lists;
import com.streamsets.pipeline.api.BatchMaker;
import com.streamsets.pipeline.api.Record;
import com.streamsets.pipeline.api.Stage;
import com.streamsets.pipeline.api.StageException;
import com.streamsets.pipeline.config.DatagramMode;
import com.streamsets.pipeline.lib.parser.udp.ParserConfig;
import com.streamsets.pipeline.lib.util.ThreadUtil;
import com.streamsets.pipeline.sdk.SourceRunner;
import com.streamsets.pipeline.sdk.StageRunner;
import com.streamsets.testing.NetworkUtils;
import io.netty.channel.epoll.Epoll;
import org.apache.commons.io.IOUtils;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;

import static com.streamsets.pipeline.lib.parser.udp.ParserConfigKey.CHARSET;
import static org.junit.Assume.assumeTrue;

public class TestUDPSource {
  private static final String TEN_PACKETS_RESOURCE = "netflow-v5-file-1";
  private static final Logger LOG = LoggerFactory.getLogger(TestUDPSource.class);

  @Before
  public void setup() throws Exception {
  }

  public static class TUDPSource extends UDPSource {

    boolean produceCalled;

    public TUDPSource(List<String> ports, boolean enableEpoll, int numThreads, ParserConfig parserConfig, DatagramMode dataFormat, int maxBatchSize, long maxWaitTime) {
      super(ports, enableEpoll, numThreads, parserConfig, dataFormat, maxBatchSize, maxWaitTime);
    }

    @Override
    public String produce(String lastSourceOffset, int maxBatchSize, BatchMaker batchMaker) throws StageException {
      produceCalled = true;
      return super.produce(lastSourceOffset, maxBatchSize, batchMaker);
    }
  }

  /**
   * This test runs three times because UDP is delivery is not
   * guaranteed. If it fails all three times, then we actually fail.
   */
  @Test
  public void testBasic() throws Exception {
    int maxRuns = 3;
    List<AssertionError> failures = new ArrayList<>();
    for (int i = 0; i < maxRuns; i++) {
      try {
        doBasicTest(DatagramMode.NETFLOW, false, 1);
        doBasicTest(DatagramMode.SYSLOG, false, 1);
      } catch (Exception ex) {
        // we don't expect exceptions to be thrown,
        // even when udp messages are lost
        throw ex;
      } catch (AssertionError failure) {
        String msg = "Test failed on iteration: " + i;
        LOG.error(msg, failure);
        failures.add(failure);
        Assert.assertTrue("Interrupted while sleeping", ThreadUtil.sleep(10 * 1000));
      }
    }
    if (failures.size() >= maxRuns) {
      throw failures.get(0);
    }
  }

  @Test
  public void testBasicEpoll() throws Exception {
    assumeTrue(Epoll.isAvailable());
    int maxRuns = 3;
    List<AssertionError> failures = new ArrayList<>();
    for (int i = 0; i < maxRuns; i++) {
      try {
        doBasicTest(DatagramMode.NETFLOW, true, 2);
        doBasicTest(DatagramMode.SYSLOG, true, 2);
      } catch (Exception ex) {
        // we don't expect exceptions to be thrown,
        // even when udp messages are lost
        throw ex;
      } catch (AssertionError failure) {
        String msg = "Test failed on iteration: " + i;
        LOG.error(msg, failure);
        failures.add(failure);
        Assert.assertTrue("Interrupted while sleeping", ThreadUtil.sleep(10 * 1000));
      }
    }
    if (failures.size() >= maxRuns) {
      throw failures.get(0);
    }
  }

  @Test
  public void testPrivilegedPort() throws Exception {
    List<String> ports = Lists.newArrayList("514", "10000");
    ParserConfig parserConfig = new ParserConfig();
    parserConfig.put(CHARSET, "UTF-8");
    TUDPSource source = new TUDPSource(ports, false, 1, parserConfig, DatagramMode.SYSLOG, 20, 100L);
    SourceRunner runner = new SourceRunner.Builder(TUDPSource.class, source).addOutputLane("lane").build();
    List<Stage.ConfigIssue> issues = runner.runValidateConfigs();
    if (System.getProperty("user.name").equals("root")) {
      Assert.assertEquals(0, issues.size());
    } else {
      Assert.assertEquals(1, issues.size());
    }
  }

  private void doBasicTest(DatagramMode dataFormat, boolean enableEpoll, int numThreads) throws Exception {
    List<String> ports = NetworkUtils.getRandomPorts(2);
    ParserConfig parserConfig = new ParserConfig();
    parserConfig.put(CHARSET, "UTF-8");
    TUDPSource source = new TUDPSource(ports, enableEpoll, numThreads, parserConfig, dataFormat, 20, 100L);
    SourceRunner runner = new SourceRunner.Builder(TUDPSource.class, source).addOutputLane("lane").build();
    runner.runInit();
    try {
      byte[] bytes = null;
      switch (dataFormat) {
        case NETFLOW:
          InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(TEN_PACKETS_RESOURCE);
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          IOUtils.copy(is, baos);
          is.close();
          baos.close();
          bytes = baos.toByteArray();
          break;
        case SYSLOG:
          bytes = "<34>1 2003-10-11T22:14:15.003Z mymachine.example.com some syslog data".
            getBytes(StandardCharsets.UTF_8);
          break;
        default:
          Assert.fail("Unknown data format: " + dataFormat);
      }
      for (String port : ports) {
        DatagramSocket clientSocket = new DatagramSocket();
        InetAddress address = InetAddress.getLoopbackAddress();
        DatagramPacket sendPacket = new DatagramPacket(bytes, bytes.length, address, Integer.parseInt(port));
        clientSocket.send(sendPacket);
        clientSocket.close();
      }
      StageRunner.Output output = runner.runProduce(null, 6);
      Assert.assertTrue(source.produceCalled);
      List<Record> records = output.getRecords().get("lane");
      switch (dataFormat) {
        case NETFLOW:
          Assert.assertEquals(String.valueOf(records), 6, records.size());
          break;
        case SYSLOG:
          Assert.assertEquals(String.valueOf(records), ports.size(), records.size());
          break;
        default:
          Assert.fail("Unknown data format: " + dataFormat);
      }
      output = runner.runProduce(null, 14);
      Assert.assertTrue(source.produceCalled);
      records = output.getRecords().get("lane");
      switch (dataFormat) {
        case NETFLOW:
          Assert.assertEquals(String.valueOf(records), 14, records.size());
          break;
        case SYSLOG:
          Assert.assertEquals(String.valueOf(records), 0, records.size());
          break;
        default:
          Assert.fail("Unknown data format: " + dataFormat);
      }
      output = runner.runProduce(null, 1);
      Assert.assertTrue(source.produceCalled);
      records = output.getRecords().get("lane");
      Assert.assertEquals(String.valueOf(records), 0, records.size());
    } finally {
      runner.runDestroy();
    }
  }
}


text:
module Handler.DigitalOutSpec (spec) where

import TestImport

spec :: Spec
spec = withApp $ do

    describe "getDigitalOutR" $ do
        error "Spec not implemented: getDigitalOutR"

redpajama_set_name: RedPajamaGithub


text:
package com.taptrack.tcmptappy.data;

import java.util.Arrays;

public class SavedTcmpMessage {
    private Long dbId;

    private String name;
    private String address;

    private Long timestamp;
    private byte[] message;

    public SavedTcmpMessage(Long dbId, String name, String address, Long timestamp, byte[] message) {
        this.dbId = dbId;
        this.name = name;
        this.address = address;
        this.timestamp = timestamp;
        this.message = message;
    }

    public SavedTcmpMessage(String name, String address, Long timestamp, byte[] message) {
        this.name = name;
        this.address = address;
        this.timestamp = timestamp;
        this.message = message;
    }

    public Long getDbId() {
        return dbId;
    }

    public String getName() {
        return name;
    }

    public String getAddress() {
        return address;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public byte[] getMessage() {
        return message;
    }

    public boolean isFromMe() {
        return name.equals("");
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SavedTcmpMessage that = (SavedTcmpMessage) o;

        if (getDbId() != null ? !getDbId().equals(that.getDbId()) : that.getDbId() != null)
            return false;
        if (!getName().equals(that.getName())) return false;
        if (!getAddress().equals(that.getAddress())) return false;
        if (!getTimestamp().equals(that.getTimestamp())) return false;
        return Arrays.equals(getMessage(), that.getMessage());

    }

    @Override
    public int hashCode() {
        int result = getDbId() != null ? getDbId().hashCode() : 0;
        if(result > 0)
            return result;
        result = 31 * result + getName().hashCode();
        result = 31 * result + getAddress().hashCode();
        result = 31 * result + getTimestamp().hashCode();
        result = 31 * result + Arrays.hashCode(getMessage());
        return result;
    }
}


text:
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Xamarin.Forms;
using Microsoft.Azure.Mobile.Push;

namespace mobilecenterpush.ViewModels
{
	public class BaseViewModel : INotifyPropertyChanged
	{
		protected Page page;
		public BaseViewModel(Page page)
		{
			this.page = page;
		}

		public BaseViewModel()
		{

		}

		public virtual Task InitAsync()
		{
			return Task.FromResult(true);
		}

		string title = string.Empty;

		/// <summary>
		/// Gets or sets the "Title" property
		/// </summary>
		/// <value>The title.</value>
		public string Title
		{
			get { return title; }
			set { SetProperty(ref title, value); }
		}

		string subTitle = string.Empty;
		/// <summary>
		/// Gets or sets the "Subtitle" property
		/// </summary>
		public string Subtitle
		{
			get { return subTitle; }
			set { SetProperty(ref subTitle, value); }
		}

		string icon;
		/// <summary>
		/// Gets or sets the "Icon" of the viewmodel
		/// </summary>
		public string Icon
		{
			get { return icon; }
			set { SetProperty(ref icon, value); }
		}

		bool isBusy;
		/// <summary>
		/// Gets or sets if the view is busy.
		/// </summary>
		public bool IsBusy
		{
			get { return isBusy; }
			set
			{
				SetProperty(ref isBusy, value);
				SetProperty(ref isBusyRev, !isBusy, null, nameof(IsBusyRev));
			}
		}

		private bool isBusyRev;
		/// <summary>
		/// Gets or sets the reverse of  isbusy. Handy for hiding views during busy times.
		/// </summary>
		public bool IsBusyRev
		{
			get { return isBusyRev; }
			set { SetProperty(ref isBusyRev, value); }
		}

        public virtual void OnPushNotificationReceieved(PushNotificationReceivedEventArgs PushNotificationEventArgs)
        {

        }

		protected void SetProperty<T>(ref T backingStore, T value, Action onChanged = null, [CallerMemberName]string propertyName = "")
		{

			if (System.Collections.Generic.EqualityComparer<T>.Default.Equals(backingStore, value))
				return;

			backingStore = value;

			onChanged?.Invoke();

			OnPropertyChanged(propertyName);
		}

		#region INotifyPropertyChanged implementation
		public event PropertyChangedEventHandler PropertyChanged;
		#endregion

		public void OnPropertyChanged(string propertyName)
		{
			if (PropertyChanged == null)
				return;

			PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
		}

	}
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
    <title>Zero Size Canvas Test</title>


text:
package org.broadleafcommerce.openadmin.server.service.type;

import org.broadleafcommerce.common.BroadleafEnumerationType;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * An extensible enumeration for a Security Context Type.
 * @see org.broadleafcommerce.openadmin.server.security.domain.AdminSecurityContext
 *
 * @author elbertbautista
 *
 */
public class ContextType implements Serializable, BroadleafEnumerationType {

    private static final long serialVersionUID = 1L;

    private static final Map<String, ContextType> TYPES = new LinkedHashMap<String, ContextType>();

    public static final ContextType GLOBAL = new ContextType("GLOBAL", "Global");
    public static final ContextType SITE = new ContextType("SITE", "Site");
    public static final ContextType CATALOG = new ContextType("CATALOG", "Catalog");
    public static final ContextType TEMPLATE = new ContextType("TEMPLATE", "Template");

    public static ContextType getInstance(final String type) {
        return TYPES.get(type);
    }

    private String type;
    private String friendlyType;

    public ContextType() {
        //do nothing
    }

    public ContextType(final String type, final String friendlyType) {
        this.friendlyType = friendlyType;
        setType(type);
    }

    @Override
    public String getType() {
        return type;
    }

    @Override
    public String getFriendlyType() {
        return friendlyType;
    }

    private void setType(final String type) {
        this.type = type;
        if (!TYPES.containsKey(type)) {
            TYPES.put(type, this);
        }
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((type == null) ? 0 : type.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (!getClass().isAssignableFrom(obj.getClass()))
            return false;
        ContextType other = (ContextType) obj;
        if (type == null) {
            if (other.type != null)
                return false;
        } else if (!type.equals(other.type))
            return false;
        return true;
    }
}


text:
V1::GridsApi.route('grid_certificates') do |r|

  # POST /v1/grids/:name/certificates
  r.post do
    data = parse_json_body
    data[:grid] = @grid

    outcome = GridCertificates::RequestCertificate.run(data)

    if outcome.success?
      response.status = 201
      @certificate = outcome.result
      audit_event(r, @grid, @certificate, 'create', @certificate)
      render('certificates/show')
    else
      response.status = 422
      {error: outcome.errors.message}
    end
  end

  # GET /v1/grids/:name/certificates
  r.get do
    r.is do
      @certificates = @grid.certificates
      render('certificates/index')
    end
  end
end


text:
BEGIN_LEFDEF_PARSER_NAMESPACE

class defrData;

class defiIOTiming
{
 public:
  defiIOTiming(defrData* data);
  void Init();

  void Destroy();
  ~defiIOTiming();

  void clear();

  void setName(const char* inst, const char* pin);
  void setVariable(const char* riseFall, double min, double max);
  void setSlewRate(const char* riseFall, double min, double max);
  void setCapacitance(double num);
  void setDriveCell(const char* name);
  void setFrom(const char* name);
  void setTo(const char* name);
  void setParallel(double num);

  int hasVariableRise() const;
  int hasVariableFall() const;
  int hasSlewRise() const;
  int hasSlewFall() const;
  int hasCapacitance() const;
  int hasDriveCell() const;
  int hasFrom() const;
  int hasTo() const;
  int hasParallel() const;

  const char* inst() const;
  const char* pin() const;
  double variableFallMin() const;
  double variableRiseMin() const;
  double variableFallMax() const;
  double variableRiseMax() const;
  double slewFallMin() const;
  double slewRiseMin() const;
  double slewFallMax() const;
  double slewRiseMax() const;
  double capacitance() const;
  const char* driveCell() const;
  const char* from() const;
  const char* to() const;
  double parallel() const;

  // debug print
  void print(FILE* f) const;

 protected:
  char* inst_;
  int instLength_;
  char* pin_;
  int pinLength_;
  char* from_;
  int fromLength_;
  char* to_;
  int toLength_;
  char* driveCell_;
  char driveCellLength_;
  char hasVariableRise_;
  char hasVariableFall_;
  char hasSlewRise_;
  char hasSlewFall_;
  char hasCapacitance_;
  char hasDriveCell_;
  char hasFrom_;
  char hasTo_;
  char hasParallel_;
  double variableFallMin_;
  double variableRiseMin_;
  double variableFallMax_;
  double variableRiseMax_;
  double slewFallMin_;
  double slewRiseMin_;
  double slewFallMax_;
  double slewRiseMax_;
  double capacitance_;
  double parallel_;

  defrData* defData;
};

END_LEFDEF_PARSER_NAMESPACE

USE_LEFDEF_PARSER_NAMESPACE

#endif


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>org.resthub.web (RESThub Spring stack 2.2.0-SNAPSHOT API)</title>
<meta name="date" content="2014-09-16">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

org.resthub.web

Interfaces

PageResponse.View

Classes

Client

Http

JsonHelper

LoggingHandlerExceptionResolver

PageResponse

Response

ResthubExceptionHandler

XmlHelper


text:
<?php

/*
 * author: Loubna Aggoun <http://www.laggoun.com>
 */

l::set(array(

  // global
  'ok' => 'Ok',
  'cancel' => 'Annuler',
  'nochanges' => 'Rien n\'a changé',

  // header
  'header.title' => 'Kirby',
  'header.logout' => 'Déconnexion',

  // subheader
  'subheader.home' => 'Accueil',
  'subheader.site' => 'Votre site',
  'subheader.info' => 'Informations',

  // tabs
  'tabs.overview' => 'Vue d\'ensemble',
  'tabs.info' => 'Éditer vos informations',
  'tabs.content' => 'Contenu',
  'tabs.files' => 'Fichiers',
  'tabs.options' => 'URL',
  'tabs.preview' => 'Aperçu',

  // dashboard
  'dashboard.edit' => 'Éditer',
  'dashboard.content' => 'Contenu',
  'dashboard.content.empty' => 'Cette page ne possède aucun contenu',
  'dashboard.files' => 'Fichiers',
  'dashboard.template' => 'Modèle',
  'dashboard.stats.images' => 'Images',
  'dashboard.stats.videos' => 'Vidéos',
  'dashboard.stats.docs' => 'Documents',
  'dashboard.stats.sound' => 'Audio',
  'dashboard.stats.others' => 'Autre',

  // home
  'home.siteinfo' => 'Informations sur le site',
  'home.edit' => 'Éditer',
  'home.warning.title' => 'Veuillez corriger le problème d\'abord !',
  'home.warning.permissions.title' => 'Permissions',
  'home.warning.permissions.text' => 'Les permissions du dossier de contenu ne sont pas correctement paramétrées. Veuillez changer les permissions de tous les dossier en 0755 et celles de tous les fichiers en 0666',
  'home.warning.blueprints.title' => 'Fichiers de strucutre',
  'home.warning.blueprints.text' => 'Aucun fichier de structure n\'est disponible pour le modèle suivant
 En savoir plus à propos de l\'installation de fichiers de structure pour vos modèles',
  'home.warning.thumbs.title' => 'Vignettes',
  'home.warning.thumbs.text' => 'Ajoutez s\'il-vous-plaît un dossier thumbs dans le dossier principal de votre site et changer ses permissions en 0755',

  // siteinfo
  'siteinfo.button' => 'Enregistrer',
  'siteinfo.errors.title' => 'Veuillez ajouter un titre',
  'siteinfo.errors.permissions' => 'content/site.txt n\'est pas modifiable.
Changez ses permissions puis essayez à nouveau.',

  // content form
  'content.save' => 'Enregistrer',
  'content.previous' => 'Précédent',
  'content.next' => 'Suivant',
  'content.invisible' => 'invisible',

  // no content available
  'nocontent.title' => 'Aucun contenu',
  'nocontent.text' => 'Il n\'y a aucun contenu disponible pour cette page',

  // pages
  'pages.title' => 'Pages visibles',
  'pages.title.home' => 'Pages',
  'pages.home' => 'Accueil',
  'pages.sort' => 'Trier',
  'pages.add' => 'Ajouter',
  'pages.delete' => 'Supprimer',
  'pages.invisible' => 'Sous-pages invisibles',
  'pages.invisible.home' => 'Pages invisibles',
  'pages.no.visible' => 'Aucune page visible pour le moment',
  'pages.no.invisible' => 'Aucune page invisible pour le moment',
  'pages.moved' => 'La page a été déplacée',
  'pages.sorted' => 'Les pages ont été triées',
  'pages.show.more' => 'En montrer plus',
  'pages.show.less' => 'En montrer moins',
  'pages.errors.notfound' => 'Cette page n\'a pas pu être trouvée',
  'pages.errors.move' => 'Cette page n\'a pas pu être déplacée',
  'pages.errors.sort' => 'Toutes les pages n\'ont pas pu être triées',
  'pages.errors.nosort' => 'Il n\'y a rien à trier',

  // no subpages allowed
  'nopages.title' => 'Sous-pages',
  'nopages.text' => 'Cette page n\'est pas censée avoir des sous-pages',

  // add page
  'pages.add.title' => 'Ajouter une nouvelle page',
  'pages.add.label.title' => 'Titre',
  'pages.add.label.url' => 'URL',
  'pages.add.label.template' => 'Modèle',
  'pages.add.button' => 'Enregistrer',
  'pages.add.errors.title' => 'Ajoutez un titre',
  'pages.add.errors.url' => 'Ajoutez une URL pour votre page',
  'pages.add.errors.characters' => 'Veuillez vous limiter aux caractères a-z, 0-9, _, - pour votre URL',
  'pages.add.errors.exists' => 'Une page avec cette URL existe déjà',
  'pages.add.errors.permissions' => 'Ce dossier n\'a pas pu être créé',
  'pages.add.success' => 'La page a été créée',

  // update page
  'pages.update.errors' => 'Veuillez remplir correctement tous les champs',

  // delete page
  'pages.delete.title' => 'Supprimer cette page',
  'pages.delete.button' => 'Supprimer',
  'pages.delete.errors.homepage' => 'Vous ne pouvez pas supprimer la page d\'accueil',
  'pages.delete.errors.errorpage' => 'Vous ne pouvez pas supprimer la page d\'erreur',
  'pages.delete.errors.subpages' => 'Cette page possède des sous-pages, supprimez-les d\'abord.',
  'pages.delete.errors.permissions' => 'La page n\'a pas pu être supprimée',
  'pages.delete.success' => 'La page a été supprimée',

  // options
  'options.url' => 'URL',
  'options.button' => 'Enregistrer',
  'options.home.url' => 'URL',
  'options.home.text' => 'Vous ne pouvez pas changer l\'URL de la page d\'accueil',
  'options.error.text' => 'Vous ne pouvez pas changer l\'URL de la page d\'erreur',
  'options.errors.homepage' => 'Vous ne pouvez pas changer l\'URL de la page d\'acceuil',
  'options.errors.errorpage' => 'Vous ne pouvez pas changer l\'URL de la page d\'erreur',
  'options.errors.characters' => 'Veuillez vous limiter aux caractères a-z, 0-9, _, -',
  'options.errors.permissions' => 'Le dossier de contenu ne peut être déplacé',
  'options.errors.exists' => 'La nouvelle URL existe déjà',
  'options.errors.move' => 'Le dossier de contenu ne peut être déplacé',

  // files
  'files.title' => 'Fichier',
  'files.upload' => 'Télécharger un nouveau fichier',
  'files.edit' => 'Éditer',
  'files.replace' => 'Remplacer',
  'files.delete' => 'Supprimer',
  'files.empty' => 'Aucun fichier pour le moment',

  'nofiles.title' => 'Aucun fichier',
  'nofiles.text' => 'Cette page n\'est pas censée contenir des fichiers',

  // delete file
  'files.delete.title' => 'Supprimer le fichier',
  'files.delete.button' => 'Supprimer',
  'files.delete.errors.notfound' => 'Le fichier n\'a pas pu être trouvé',
  'files.delete.errors.permissions' => 'Le fichier n\'a pas pu être supprimé',
  'files.delete.success' => 'Le fichier a été supprimé',

  // edit file
  'files.edit.title' => 'Éditer le fichier',
  'files.edit.filename' => 'Nom du fichier (sans l\'extension)',
  'files.edit.button' => 'Enregistrer',
  'files.edit.errors.filename' => 'Veuillez entrer un nom valide',
  'files.edit.errors.notfound' => 'Le fichier n\'a pas pu être trouvé',
  'files.edit.errors.exists' => 'Le nouveau nom existe déjà',
  'files.edit.errors.permissions' => 'Le fichier n\'a pas pu être renommé',
  'files.edit.success' => 'Le fichier a été enregistré',

  // replace file
  'files.replace.title' => 'Remplacer le fichier',
  'files.replace.file' => 'Fichier',
  'files.replace.choose' => 'Veuillez choisir un nouveau fichier sur votre ordinateur',
  'files.replace.button' => 'Remplacer',
  'files.replace.errors.notfound' => 'Le fichier n\'a pas pu être trouvé',
  'files.replace.success' => 'Le fichier a été remplacé',

  // upload file
  'files.upload.title' => 'Télécharger un nouveau fichier',
  'files.upload.choose' => 'Veuillez choisir un fichier sur votre ordinateur',
  'files.upload.button' => 'Télécharger',

  // login
  'login.button' => 'Connexion',
  'login.username' => 'Nom d\'utilisateur',
  'login.password' => 'Mot de passe',
  'login.error' => 'Nom d\'utilisateur ou mot de passe incorrects',
  'login.success' => 'Vous êtes maintenant connecté',
  'login.error.browser.title' => 'Vous utilisez un navigateur trop ancien',
  'login.error.browser.text' => 'Veuillez utiliser la dernière version de Google Chrome, Firefox, Safari ou Internet Explorer.',

  // upload
  'upload.errors.missing-file' => 'Le fichier n\'a pas pu être trouvé',
  'upload.errors.file-exists' => 'Le fichier existe et n\'est pas inscriptible',
  'upload.errors.invalid-upload' => 'Le téléchargement a échoué',
  'upload.errors.too-big' => 'Le fichier est trop gros',
  'upload.errors.invalid-file' => 'Ce type de fichier n\'est pas autorisé',
  'upload.errors.move-error' => 'Le fichier n\'a pas pu être déplacé vers le serveur',
  'upload.success' => 'Le fichier a été téléchargé',

  // writer
  'writer.errors.permissions' => 'Le fichier n\'est pas inscriptible',
  'writer.errors.write' => 'Les données n\'ont pas pu être ajoutées',
  'writer.success' => 'Le fichier a été sauvegardé',

  // form buttons
  'form.buttons.h1' => 'h1',
  'form.buttons.h2' => 'h2',
  'form.buttons.h3' => 'h3',
  'form.buttons.bold' => 'gras',
  'form.buttons.bold.sample' => 'texte gras',
  'form.buttons.italic' => 'italique',
  'form.buttons.italic.sample' => 'texte italique',
  'form.buttons.link' => 'lien',
  'form.buttons.email' => 'email',

  'form.overlay.link.title' => 'Insérer un lien',
  'form.overlay.link.link' => 'Lien',
  'form.overlay.link.text' => 'Texte du lien (optionnel)',
  'form.overlay.link.button' => 'Insérer le lien',

  'form.overlay.email.title' => 'Insérer une adresse email',
  'form.overlay.email.link' => 'Adresse email',
  'form.overlay.email.text' => 'Texte du lien (optionnel)',
  'form.overlay.email.button' => 'Insérer l\'adresse email',

));

?>


text:
package com.intellij.dvcs.push.ui;

/**
 * Event on this component should start edit mode for appropriate path in JTree
 *
 * @see com.intellij.dvcs.push.ui.PushLog
 */
public interface VcsEditableComponent {
}


text:
import sys

from cratis.generators.module import SettingsModuleFile
from cratis.generators.requirements import add_to_requirements
from pkg_resources import load_entry_point, iter_entry_points

import re

from collections import namedtuple
from cratis.bootstrap import run_env_command

Url = namedtuple('Url', ['feature', 'user', 'version', 'repo', 'protocol'])

# ssh://admin.@django-cratis/cratis-admin#master

def parse_repo_parts(url):

    rx = '^((?P<protocol>[\w-]+):)?(?P<feature>[\w-]+)(?P<exact_feature>\.)?(@(?P<user>[\w-]+))?(/(?P<repo>[\w-]+))?(#(?P<version>[\w-]+))?'

    m = re.match(rx, url)

    feature = m.group('feature')
    exact_feature = m.group('exact_feature')
    if not exact_feature:
        feature = 'cratis-%s' % feature

    user = m.group('user') or 'django-cratis'
    version = m.group('version') or 'master'
    repo = m.group('repo') or feature
    protocol = m.group('protocol') or 'https'
    protocol = 'git+%s' % protocol

    return Url(
        feature=feature,
        user=user,
        version=version,
        repo=repo,
        protocol=protocol
    )

def compile_url(url: Url):
    return '%(protocol)s://github.com/%(user)s/%(repo)s.git@%(version)s#egg=%(feature)s' % url._asdict()

def add_cmd(url, **kwargs):
    data = parse_repo_parts(url)
    url = compile_url(data)

    requirement_url = '-e %s' % url
    run_env_command('pip install %s' % requirement_url)
    run_env_command('cratis-add %s' % data.feature)

    add_to_requirements(data.feature, requirement_url)

def add_feature_to_settings():

    if len(sys.argv) < 2:
        print("Not enough arguments - exit")

    print('\nAdding feature to settings: %s' % sys.argv[1])

    found = []
    for entry_point in iter_entry_points(group='features', name=sys.argv[1]):
        found.append(entry_point.load())

    if not found:
        print("Feature not found")
        sys.exit(1)

    cls = found[0]

    f = SettingsModuleFile('settings')
    f.add_feature(cls.__module__, cls.__name__, getattr(cls, "DEFAULT", None))
    f.save()


text:
cask "igv" do
  version "2.13.0"
  sha256 "f0d751a21a0d6e5078ae7b8f67100a75804111c0111d261c71d8dacd87460bc3"

  url "https://data.broadinstitute.org/igv/projects/downloads/#{version.major_minor}/IGV_MacApp_#{version}.zip"
  name "Integrative Genomics Viewer (IGV)"
  desc "Visual exploration of genomic data"
  homepage "https://software.broadinstitute.org/software/igv/"

  livecheck do
    url "https://software.broadinstitute.org/software/igv/download"
    regex(/href=.*?IGV[._-]MacApp[._-]v?(\d+(?:\.\d+)+)\.zip/i)
  end

  app "IGV_#{version}.app"

  caveats do
    depends_on_java "11+"
  end
end


text:
package richardludev.physicsgame;

import java.awt.Canvas;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.util.List;

import richardludev.utilities.componentmodel.PositionComponent;

/**
 * @author Richard Lu
 */
public class GraphicsSystem {

    public static final int WINDOW_X = 800;
    public static final int WINDOW_Y = 600;

    //TODO: May not need this lock if no immediately noticeable problems.
    private Object offScreenImageLock;
    private BufferedImage offscreenImage;

    private PhysicsGameCanvas gameCanvas;

    public GraphicsSystem(){

        offScreenImageLock = new Object();
        offscreenImage = new BufferedImage(WINDOW_X+10, WINDOW_Y+10, BufferedImage.TYPE_INT_RGB);

        gameCanvas = new PhysicsGameCanvas(this);
        gameCanvas.setPreferredSize(new Dimension(WINDOW_X, WINDOW_Y));
        gameCanvas.setFocusable(true);
    }

    public void update(EntityManager entityManager){
        populateOffscreenImage(entityManager);
        gameCanvas.repaint();
    }

    public Canvas getGameCanvas(){
        return gameCanvas;
    }

    private void populateOffscreenImage(EntityManager entityManager){
        Graphics2D offscreenGraphics = (Graphics2D)offscreenImage.getGraphics();
        offscreenGraphics.clearRect(0, 0, offscreenImage.getWidth(), offscreenImage.getHeight());

        List<PositionComponent> posComponents = entityManager.getPositionComponents();

        for(PositionComponent posComponent : posComponents){
            offscreenGraphics.drawOval((int)posComponent.getX(), (int)posComponent.getY(),
                                        10, 10);
        }
    }

    private void drawOffscreenImage(Graphics g){
        g.drawImage(offscreenImage, 0, 0, null);
    }

    @SuppressWarnings("serial")
    private class PhysicsGameCanvas extends Canvas{

        GraphicsSystem graphicsEngine;

        public PhysicsGameCanvas(GraphicsSystem graphicsEngine) {
            this.graphicsEngine = graphicsEngine;
        }

        @Override
        public void update(Graphics g){
            paint(g);
        }

        @Override
        public void paint(Graphics g){
            graphicsEngine.drawOffscreenImage(g);
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimaryDarkSettings">#D32F2F</color>
    <color name="colorAccentSettings">#FF5252</color>
    <color name="colorBackground">#212121</color>
    <color name="colorWhite">#FFFFFF</color>
    <color name="colorGrey">#616161</color>

    <color name="Background">#303f9f</color>

    <color name="DarkPrimary">#F44336</color>
    <color name="colorPrimaryDark">#F44336</color>

    <color name="Primary">#F44336</color>
    <color name="colorPrimary">#F44336</color>

    <color name="Accent">#F44336</color>
    <color name="colorAccent">#F44336</color>

    <color name="PrimaryText">#212121</color>
    <color name="SecondaryText">#727272</color>

    <color name="LightPrimary">#c5cae9</color>
    <color name="TextIcon">#FFFFFF</color>

    <color name="Divider">#B6B6B6</color>

    <color name="DarkRed">#D32F2F</color>
    <color name="LightRed">#F44336</color>
    <color name="DarkGreen">#388E3C</color>
    <color name="LightGreen">#4CAF50</color>
    <color name="DarkYellow">#F1C30A</color>
    <color name="LightYellow">#EBD92C</color>
</resources>


text:
package com.microsoft.azure.management.cosmosdb.v2020_04_01;

import rx.Observable;
import com.microsoft.azure.management.cosmosdb.v2020_04_01.GremlinDatabaseGetResults;
import rx.Completable;
import com.microsoft.azure.management.cosmosdb.v2020_04_01.GremlinGraphGetResults;

/**
 * Type representing GremlinResources.
 */
public interface GremlinResources {
    /**
     * Begins definition for a new GremlinDatabasis resource.
     * @param name resource name.
     * @return the first stage of the new GremlinDatabasis definition.
     */
    GremlinDatabaseGetResults.DefinitionStages.Blank defineGremlinDatabasis(String name);

    /**
     * Begins definition for a new Graph resource.
     * @param name resource name.
     * @return the first stage of the new Graph definition.
     */
    GremlinGraphGetResults.DefinitionStages.Blank defineGraph(String name);

    /**
     * Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<GremlinDatabaseGetResults> getGremlinDatabaseAsync(String resourceGroupName, String accountName, String databaseName);

    /**
     * Lists the Gremlin databases under an existing Azure Cosmos DB database account.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<GremlinDatabaseGetResults> listGremlinDatabasesAsync(String resourceGroupName, String accountName);

    /**
     * Deletes an existing Azure Cosmos DB Gremlin database.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Completable deleteGremlinDatabaseAsync(String resourceGroupName, String accountName, String databaseName);

    /**
     * Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<ThroughputSettingsGetResults> getGremlinDatabaseThroughputAsync(String resourceGroupName, String accountName, String databaseName);

    /**
     * Update RUs per second of an Azure Cosmos DB Gremlin database.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin database.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<ThroughputSettingsGetResults> updateGremlinDatabaseThroughputAsync(String resourceGroupName, String accountName, String databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters);

    /**
     * Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<ThroughputSettingsGetResults> migrateGremlinDatabaseToAutoscaleAsync(String resourceGroupName, String accountName, String databaseName);

    /**
     * Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<ThroughputSettingsGetResults> migrateGremlinDatabaseToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName);

    /**
     * Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @param graphName Cosmos DB graph name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<ThroughputSettingsGetResults> getGremlinGraphThroughputAsync(String resourceGroupName, String accountName, String databaseName, String graphName);

    /**
     * Update RUs per second of an Azure Cosmos DB Gremlin graph.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @param graphName Cosmos DB graph name.
     * @param updateThroughputParameters The RUs per second of the parameters to provide for the current Gremlin graph.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<ThroughputSettingsGetResults> updateGremlinGraphThroughputAsync(String resourceGroupName, String accountName, String databaseName, String graphName, ThroughputSettingsUpdateParameters updateThroughputParameters);

    /**
     * Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @param graphName Cosmos DB graph name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<ThroughputSettingsGetResults> migrateGremlinGraphToAutoscaleAsync(String resourceGroupName, String accountName, String databaseName, String graphName);

    /**
     * Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @param graphName Cosmos DB graph name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<ThroughputSettingsGetResults> migrateGremlinGraphToManualThroughputAsync(String resourceGroupName, String accountName, String databaseName, String graphName);

    /**
     * Gets the Gremlin graph under an existing Azure Cosmos DB database account.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @param graphName Cosmos DB graph name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<GremlinGraphGetResults> getGremlinGraphAsync(String resourceGroupName, String accountName, String databaseName, String graphName);

    /**
     * Lists the Gremlin graph under an existing Azure Cosmos DB database account.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Observable<GremlinGraphGetResults> listGremlinGraphsAsync(String resourceGroupName, String accountName, String databaseName);

    /**
     * Deletes an existing Azure Cosmos DB Gremlin graph.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param accountName Cosmos DB database account name.
     * @param databaseName Cosmos DB database name.
     * @param graphName Cosmos DB graph name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable for the request
     */
    Completable deleteGremlinGraphAsync(String resourceGroupName, String accountName, String databaseName, String graphName);

}


text:
package com.vmstate.decisionmaking;
import java.util.Scanner;
/**
 * This example demonstrates the usage of if else condition
 * @author Rajesh Abraham
 */
public class Sample2IfElseCondition
{
	// If else in Java code

	public static void main(String[] args)
	{
		int marksObtained, passingMarks;

		passingMarks = 40;

		Scanner input = new Scanner(System.in);

		System.out.println("Input marks scored by you");

		marksObtained = input.nextInt();

		if (marksObtained >= passingMarks)
		{
			System.out.println("You passed the exam.");
		} else
		{
			System.out.println("Unfortunately you failed to pass the exam.");
		}
	}
}


text:
require_relative 'shared_examples'
require 'beaneater'

gem_path   = '/usr/local/bin'
check_name = 'check-beanstalkd.rb'
check      = "#{gem_path}/#{check_name}"

describe 'ruby environment' do
  it_behaves_like 'ruby checks', check
end

describe command("#{check} -s i.do.not.exist.local") do
  its(:exit_status) { should eq 1 }
  its(:stdout) { should match(/beanstalkd queues check WARNING: could not connect to beanstalkd/) }
end

context 'when server contains tube with jobs' do
  before do
    # Connect to pool
    beaneater = Beaneater::Pool.new('127.0.0.1:11300')
    # Enqueue jobs to tube
    tube = beaneater.tubes['test-tube']
    tube.clear
    tube.put('{ "data" : "data" }')
  end
  describe command("#{check} -s 127.0.0.1 -p 11300 -t test-tube") do
    its(:exit_status) { should eq 0 }
    its(:stdout) { should match(/beanstalkd queues check OK: All queues are healthy/) }
  end
  describe command("#{check} -s 127.0.0.1 -p 11300 -t missing-tube -a warning") do
    its(:exit_status) { should eq 1 }
    its(:stdout) { should match(/Tube missing-tube is missing/) }
  end
  describe command("#{check} -s 127.0.0.1 -p 11300 -t missing-tube --alert-on-missing critical") do
    its(:exit_status) { should eq 2 }
    its(:stdout) { should match(/Tube missing-tube is missing/) }
  end
end


text:
namespace httptth
{

// skeletal exception hierarchy, needs some work

class generic_exception : public std::exception
{
public:
    const char* what() const noexcept override
    {
        return "generic_exception";
    }
};

class overflow_error : public generic_exception
{
public:
    const char* what() const noexcept override
    {
        return "overflow_error";
    }
};

class network_exception : public generic_exception
{
public:
    const char* what() const noexcept override
    {
        return "network_exception";
    }
};

class io_exception : public generic_exception
{
public:
    const char* what() const noexcept override
    {
        return "io_exception";
    }
};

class read_error : public io_exception
{
public:
    const char* what() const noexcept override
    {
        return "read_error";
    }
};

class write_error : public io_exception
{
public:
    const char* what() const noexcept override
    {
        return "write_error";
    }
};

} // namespace httptth

#endif // __EXCEPTIONS_H__


text:
@interface PodsDummy_Pods_HNKGooglePlacesAutocomplete_ExampleTests_Kiwi : NSObject
@end
@implementation PodsDummy_Pods_HNKGooglePlacesAutocomplete_ExampleTests_Kiwi
@end


text:
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSuggestedReleaseDateVotesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('suggested_release_date_votes', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('vote');
            $table->integer('user_id')->unsigned();
            $table->foreign('user_id')->references('id')->on('users');
            $table->integer('suggested_release_date_id')->unsigned();
            $table->foreign('suggested_release_date_id')->references('id')->on('suggested_release_dates');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('suggested_release_date_votes');
    }
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: sucel
 * Date: 8/12/15
 * Time: 10:50 AM
 */

class IndexController extends CController {

    public function actionIndex() {
        print 'welcome api service';
    }
}


text: a very simple Brainfuck to C compiler


text:
@interface TFRecommendTagsViewController : UITableViewController

@end


text:
// --------------------------------------------------------------------------------
// <copyright file="https://github.com/ddur/DBCL/blob/master/LICENSE" company="DD">
// Copyright © 2013-2016 Dragan Duric. All Rights Reserved.
// </copyright>
// --------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using DD.Diagnostics;

namespace DD.Collections.ICodeSet
{
    /// <summary>QuickWrap ICodeSet over BitSetArray</summary>
    /// <para>It does not copy constructor argument! It holds reference to external BitSetArray</para>
    /// <para>Use to quick wrap ICodeSet over transient-only BitSetArray</para></remarks>
    public class QuickWrap : CodeSet {

        #region Ctor

        public static QuickWrap Safe (BitSetArray bits) {
            Contract.Requires<ArgumentNullException> (bits.IsNot (null));
            Contract.Requires<ArgumentException> (bits.Count != 0);
            Contract.Requires<ArgumentException> ((int)bits.Last <= Code.MaxValue);

            Contract.Ensures (Theory.Construct (bits, Contract.Result<QuickWrap>(), true));

            return new QuickWrap (BitSetArray.Copy (bits));
        }

        internal static QuickWrap Unsafe (BitSetArray bits) {
            Contract.Requires<ArgumentNullException> (bits.IsNot (null));
            Contract.Requires<ArgumentException> (bits.Count != 0);
            Contract.Requires<ArgumentException> ((int)bits.Last <= Code.MaxValue);

            Contract.Ensures (Theory.Construct (bits, Contract.Result<QuickWrap>()));

            return new QuickWrap (bits);
        }

        private QuickWrap (BitSetArray bits) {
            Contract.Requires<ArgumentNullException> (bits.IsNot (null));
            Contract.Requires<ArgumentException> (bits.Count != 0);
            Contract.Requires<ArgumentException> ((int)bits.Last <= Code.MaxValue);

            Contract.Ensures (Theory.Construct (bits, this));

            this.sorted = bits;

            Contract.Assume (sorted.Count > 0);
            Contract.Assume (sorted.First.HasValue);
            Contract.Assume (sorted.Last.HasValue);
            Contract.Assume (sorted.First.HasCodeValue ());
            Contract.Assume (sorted.Last.HasCodeValue ());

            this.count = sorted.Count;
            this.length = sorted.Span ();
            this.start = (Code)sorted.First;
            this.final = (Code)sorted.Last;
        }

        #endregion

        #region Fields

        private readonly BitSetArray sorted;

        // stupid but so far this helps code-contracts static checker to pass
        private readonly int count;

        private readonly int length;
        private readonly Code start;
        private readonly Code final;

        #endregion

        #region ICodeSet

        [Pure]
        public override bool this[Code code] {
            get {
                return sorted[code.Value];
            }
        }

        [Pure]
        public override bool this[int value] {
            get {
                return sorted[value];
            }
        }

        [Pure]
        public override bool IsEmpty {
            get {
                return false;
            }
        }

        [Pure]
        public override int Count {
            get {
                return this.count;
            }
        }

        [Pure]
        public override int Length {
            get {
                return this.length;
            }
        }

        [Pure]
        public override Code First {
            get {
                return this.start;
            }
        }

        [Pure]
        public override Code Last {
            get {
                return this.final;
            }
        }

        /// <summary>
        /// This ICodeSet implementation is temporary, must be reduced
        /// </summary>
        [Pure]
        public override bool IsReduced {
            get {
                return false;
            }
        }

        [Pure]
        public override IEnumerator<Code> GetEnumerator () {
            foreach (var code in sorted) {
                yield return (Code)code;
            }
        }

        #endregion

        #region To BitSetArray

        public BitSetArray ToBitSetArray () {
            return sorted;
        }

        #endregion

        #region Invariant

        [ContractInvariantMethod]
        private void Invariant () {
            Contract.Invariant(Theory.Invariant(this));
        }

        #endregion

        #region Theory

        private static class Theory {

            [Pure]
            public static bool Construct (BitSetArray bits, QuickWrap self, bool safe = false) {
                Success success = true;

                success.Assert (!bits.IsNull ());
                success.Assert (bits.Count > 0);
                success.Assert (self.IsEmpty == false);

                success.Assert (bits.First.HasValue);
                success.Assert (bits.Last.HasValue);

                success.Assert (self.sorted.First.HasCodeValue ());
                success.Assert (self.sorted.Last.HasCodeValue ());

                if (safe) {
                    success.Assert (!self.sorted.Is (bits));
                } else {
                    success.Assert (self.sorted.Is (bits));
                }

                return success;
            }

            [Pure]
            public static bool Invariant (QuickWrap self) {
                Success success = true;

                // private
                success.Assert (!self.sorted.IsNull ());
                success.Assert (self.sorted.Count > 0);
                success.Assert (self.IsEmpty == false);

                success.Assert (self.sorted.First.HasValue);
                success.Assert (self.sorted.Last.HasValue);
                Contract.Assume (self.sorted.First.HasValue);
                Contract.Assume (self.sorted.Last.HasValue);

                success.Assert (self.sorted.First.HasCodeValue ());
                success.Assert (self.sorted.Last.HasCodeValue ());

                // public <- private
                success.Assert (self.Length == self.sorted.Span ());
                success.Assert (self.Count == self.sorted.Count);
                success.Assert (self.First == (Code)self.sorted.First);
                success.Assert (self.Last == (Code)self.sorted.Last);

                return success;
            }
        }
        #endregion
    }
}


text:
/**
 * Checks if the page url is of an expected value.
 *
 * @example
 * this.demoTest = function (browser) {
 *   browser.expect.url().to.contain('https://');
 *   browser.expect.url().to.endWith('.org');
 * }
 *
 * @method url
 * @display .url()
 * @since v1.1
 * @api expect
 */
const BaseExpect = require('./_baseExpect.js');

class ExpectUrl extends BaseExpect {
  get needsFlags() {
    return [
      'contains',
      'startsWith',
      'endsWith',
      'matches',
      'equal'
    ];
  }

  get assertionType() {
    return 'method';
  }

  get hasAssertions() {
    return false;
  }

  getMessage(negate) {
    return `Expected current url to${negate ? ' not' : ''}`;
  }

  command() {
    return this.transportActions.getCurrentUrl();
  }
}

module.exports = ExpectUrl;


text:
public class SuperBuilderAbstract {
	public static class Parent {
		int parentField;
		@java.lang.SuppressWarnings("all")
		public static abstract class ParentBuilder<C extends Parent, B extends ParentBuilder<C, B>> {
			@java.lang.SuppressWarnings("all")
			private int parentField;
			@java.lang.SuppressWarnings("all")
			protected abstract B self();
			@java.lang.SuppressWarnings("all")
			public abstract C build();
			@java.lang.SuppressWarnings("all")
			public B parentField(final int parentField) {
				this.parentField = parentField;
				return self();
			}
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			public java.lang.String toString() {
				return "SuperBuilderAbstract.Parent.ParentBuilder(parentField=" + this.parentField + ")";
			}
		}
		@java.lang.SuppressWarnings("all")
		private static final class ParentBuilderImpl extends ParentBuilder<Parent, ParentBuilderImpl> {
			@java.lang.SuppressWarnings("all")
			private ParentBuilderImpl() {
			}
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			protected ParentBuilderImpl self() {
				return this;
			}
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			public Parent build() {
				return new Parent(this);
			}
		}
		@java.lang.SuppressWarnings("all")
		protected Parent(final ParentBuilder<?, ?> b) {
			this.parentField = b.parentField;
		}
		@java.lang.SuppressWarnings("all")
		public static ParentBuilder<?, ?> builder() {
			return new ParentBuilderImpl();
		}
	}
	public static abstract class Child extends Parent {
		double childField;
		@java.lang.SuppressWarnings("all")
		public static abstract class ChildBuilder<C extends Child, B extends ChildBuilder<C, B>> extends Parent.ParentBuilder<C, B> {
			@java.lang.SuppressWarnings("all")
			private double childField;
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			protected abstract B self();
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			public abstract C build();
			@java.lang.SuppressWarnings("all")
			public B childField(final double childField) {
				this.childField = childField;
				return self();
			}
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			public java.lang.String toString() {
				return "SuperBuilderAbstract.Child.ChildBuilder(super=" + super.toString() + ", childField=" + this.childField + ")";
			}
		}
		@java.lang.SuppressWarnings("all")
		protected Child(final ChildBuilder<?, ?> b) {
			super(b);
			this.childField = b.childField;
		}
	}
	public static class GrandChild extends Child {
		String grandChildField;
		@java.lang.SuppressWarnings("all")
		public static abstract class GrandChildBuilder<C extends GrandChild, B extends GrandChildBuilder<C, B>> extends Child.ChildBuilder<C, B> {
			@java.lang.SuppressWarnings("all")
			private String grandChildField;
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			protected abstract B self();
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			public abstract C build();
			@java.lang.SuppressWarnings("all")
			public B grandChildField(final String grandChildField) {
				this.grandChildField = grandChildField;
				return self();
			}
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			public java.lang.String toString() {
				return "SuperBuilderAbstract.GrandChild.GrandChildBuilder(super=" + super.toString() + ", grandChildField=" + this.grandChildField + ")";
			}
		}
		@java.lang.SuppressWarnings("all")
		private static final class GrandChildBuilderImpl extends GrandChildBuilder<GrandChild, GrandChildBuilderImpl> {
			@java.lang.SuppressWarnings("all")
			private GrandChildBuilderImpl() {
			}
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			protected GrandChildBuilderImpl self() {
				return this;
			}
			@java.lang.Override
			@java.lang.SuppressWarnings("all")
			public GrandChild build() {
				return new GrandChild(this);
			}
		}
		@java.lang.SuppressWarnings("all")
		protected GrandChild(final GrandChildBuilder<?, ?> b) {
			super(b);
			this.grandChildField = b.grandChildField;
		}
		@java.lang.SuppressWarnings("all")
		public static GrandChildBuilder<?, ?> builder() {
			return new GrandChildBuilderImpl();
		}
	}
	public static void test() {
		GrandChild x = GrandChild.builder().grandChildField("").parentField(5).childField(2.5).build();
	}
}